@mcpher/gas-fakes 1.2.0 → 1.2.1
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/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@mcpher/fake-gasenum": "^1.0.2",
|
|
7
|
-
"@mcpher/gas-flex-cache": "^1.1.
|
|
7
|
+
"@mcpher/gas-flex-cache": "^1.1.2",
|
|
8
8
|
"@sindresorhus/is": "^7.0.1",
|
|
9
9
|
"archiver": "^7.0.1",
|
|
10
10
|
"exceljs": "^4.4.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"pub": "npm publish --access public"
|
|
67
67
|
},
|
|
68
68
|
"name": "@mcpher/gas-fakes",
|
|
69
|
-
"version": "1.2.
|
|
69
|
+
"version": "1.2.1",
|
|
70
70
|
"license": "MIT",
|
|
71
71
|
"main": "main.js",
|
|
72
72
|
"description": "A proof of concept implementation of Apps Script Environment on Node",
|
|
@@ -8,7 +8,7 @@ import { Syncit } from '../../support/syncit.js'
|
|
|
8
8
|
import { Auth } from '../../support/auth.js'
|
|
9
9
|
import { Proxies } from '../../support/proxies.js'
|
|
10
10
|
import { newFakeBehavior } from './behavior.js'
|
|
11
|
-
import { newCacheDropin } from '@mcpher/gas-flex-cache'
|
|
11
|
+
import { newCacheDropin , getUserIdFromToken} from '@mcpher/gas-flex-cache'
|
|
12
12
|
/**
|
|
13
13
|
* fake ScriptApp.getOAuthToken
|
|
14
14
|
* @return {string} token
|
|
@@ -117,17 +117,18 @@ if (typeof globalThis[name] === typeof undefined) {
|
|
|
117
117
|
requireAllScopes,
|
|
118
118
|
requireScopes,
|
|
119
119
|
getScriptId: Auth.getScriptId,
|
|
120
|
-
get __projectId
|
|
120
|
+
get __projectId() {
|
|
121
121
|
return Auth.getProjectId()
|
|
122
122
|
},
|
|
123
|
-
get __userId
|
|
123
|
+
get __userId() {
|
|
124
124
|
return Auth.getUserId()
|
|
125
125
|
},
|
|
126
126
|
AuthMode: {
|
|
127
127
|
FULL: 'FULL'
|
|
128
128
|
},
|
|
129
129
|
__behavior: newFakeBehavior(),
|
|
130
|
-
__newCacheDropin: newCacheDropin
|
|
130
|
+
__newCacheDropin: newCacheDropin,
|
|
131
|
+
__getUserIdFromToken: getUserIdFromToken
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {Auth} from '../../support/auth.js'
|
|
2
|
+
import { getUserIdFromToken} from '@mcpher/gas-flex-cache'
|
|
3
|
+
|
|
2
4
|
// these are the default models to match live apps script
|
|
3
5
|
export const storeModels = {
|
|
4
6
|
SCRIPT: {
|
|
@@ -6,7 +8,7 @@ export const storeModels = {
|
|
|
6
8
|
},
|
|
7
9
|
USER: {
|
|
8
10
|
scriptId: ScriptApp.getScriptId(),
|
|
9
|
-
userId:
|
|
11
|
+
userId: getUserIdFromToken(ScriptApp.getOAuthToken())
|
|
10
12
|
},
|
|
11
13
|
DOCUMENT: {
|
|
12
14
|
scriptId: ScriptApp.getScriptId(),
|