@mcpher/gas-fakes 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +4 -4
- package/src/support/syncit.js +5 -7
package/README.md
CHANGED
|
@@ -20,11 +20,11 @@ Collaborators should fork the repo and use the local versions of these files - s
|
|
|
20
20
|
|
|
21
21
|
### Use exactly the same code as in Apps Script
|
|
22
22
|
|
|
23
|
-
Just as on Apps Script, everything is executed synchronously so you don't need to bother with handling Promises/async/await. Just write normal Apps Script code. Usually you would have an associated App Script project if that's your eventual target,
|
|
23
|
+
Just as on Apps Script, everything is executed synchronously so you don't need to bother with handling Promises/async/await. Just write normal Apps Script code. Usually you would have an associated App Script project if that's your eventual target. Just like Apps Script, you need a manifest file (appsscript.json) so you can be sure that the correct scopes are authroized and asked for.
|
|
24
24
|
|
|
25
25
|
# gas-fakes-cli
|
|
26
26
|
|
|
27
|
-
Now you can run apps script code directly from your console - for example
|
|
27
|
+
Now you can run apps script code directly from your console - for example
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
gas-fakes -s "const files=DriveApp.getRootFolder().searchFiles('title contains \"Untitled\"');while (files.hasNext()) {console.log(files.next().getName())};"
|
package/package.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"@mcpher/fake-gasenum": "^1.0.6",
|
|
8
8
|
"@mcpher/gas-flex-cache": "^1.1.5",
|
|
9
9
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
10
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
10
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
11
11
|
"@sindresorhus/is": "^7.2.0",
|
|
12
|
-
"acorn": "^8.
|
|
12
|
+
"acorn": "^8.16.0",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"commander": "^14.0.3",
|
|
15
15
|
"dotenv": "^17.3.1",
|
|
16
|
-
"fast-xml-parser": "^5.
|
|
16
|
+
"fast-xml-parser": "^5.4.2",
|
|
17
17
|
"get-stream": "^9.0.1",
|
|
18
18
|
"googleapis": "^171.4.0",
|
|
19
19
|
"got": "^14.6.6",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"name": "@mcpher/gas-fakes",
|
|
43
43
|
"author": "bruce mcpherson",
|
|
44
|
-
"version": "2.2.
|
|
44
|
+
"version": "2.2.2",
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"main": "main.js",
|
|
47
47
|
"description": "An implementation of the Google Workspace Apps Script runtime: Run native App Script Code on Node and Cloud Run",
|
package/src/support/syncit.js
CHANGED
|
@@ -284,21 +284,19 @@ export const fxInit = ({
|
|
|
284
284
|
propertiesPath = propertiesDefaultPath,
|
|
285
285
|
platformAuth
|
|
286
286
|
} = {}) => {
|
|
287
|
-
//
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
// Resolve defaults relative to mainDir if they are relative
|
|
291
|
-
const resolve = (p) => path.isAbsolute(p) ? p : path.resolve(mainDir, p);
|
|
287
|
+
// Use current working directory to resolve relative paths
|
|
288
|
+
const cwd = process.cwd();
|
|
289
|
+
const resolve = (p) => (path.isAbsolute(p) ? p : path.resolve(cwd, p));
|
|
292
290
|
|
|
293
291
|
// because this is all run in a synced subprocess it's not an async result
|
|
294
292
|
const synced = callSync("sxInit", {
|
|
295
293
|
claspPath: resolve(claspPath),
|
|
296
294
|
manifestPath: resolve(manifestPath),
|
|
297
|
-
|
|
295
|
+
cwd,
|
|
298
296
|
cachePath,
|
|
299
297
|
propertiesPath,
|
|
300
298
|
fakeId: randomUUID(),
|
|
301
|
-
platformAuth: platformAuth ||
|
|
299
|
+
platformAuth: platformAuth || global.ScriptApp?.__platformAuth,
|
|
302
300
|
});
|
|
303
301
|
|
|
304
302
|
const {
|