diff --git a/src/types.ts b/src/types.ts index a97bf9baf..b20298ea2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -82,6 +82,7 @@ type RemoteType = { type RemoteStateType = { cwd : string, + env0 : string, // in base64 "env -0" form }; type RemoteInstanceType = { diff --git a/src/util.ts b/src/util.ts index b20729973..8c2372268 100644 --- a/src/util.ts +++ b/src/util.ts @@ -142,4 +142,24 @@ function genMergeData, DataType extends IData objs.replace(newObjs); } -export {handleJsonFetchResponse, base64ToArray, genMergeData, genMergeSimpleData}; +function parseEnv0(envStr64 : string) : Map { + let envStr = atob(envStr64); + let parts = envStr.split("\x00"); + let rtn : Map = new Map(); + for (let i=0; i