@mcpher/gas-fakes 1.0.24 → 1.0.26
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/gasmess/bruce/appsscript.json +47 -0
- package/gasmess/bruce/basic.js +28 -19
- package/gasmess/bruce/package-lock.json +53 -0
- package/gasmess/bruce/package.json +17 -0
- package/gasmess/bruce/pbx.js +2 -2
- package/index.js +0 -0
- package/package.json +47 -39
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timeZone": "Europe/London",
|
|
3
|
+
"exceptionLogging": "STACKDRIVER",
|
|
4
|
+
"runtimeVersion": "V8",
|
|
5
|
+
"oauthScopes": [
|
|
6
|
+
"https://www.googleapis.com/auth/drive",
|
|
7
|
+
"https://www.googleapis.com/auth/script.external_request",
|
|
8
|
+
"https://www.googleapis.com/auth/spreadsheets",
|
|
9
|
+
"https://www.googleapis.com/auth/userinfo.email",
|
|
10
|
+
"https://www.googleapis.com/auth/documents",
|
|
11
|
+
"https://www.googleapis.com/auth/presentations",
|
|
12
|
+
"https://www.googleapis.com/auth/forms",
|
|
13
|
+
"https://www.googleapis.com/auth/gmail.labels"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"libraries": [
|
|
17
|
+
{
|
|
18
|
+
"userSymbol": "bmUnitTester",
|
|
19
|
+
"version": "20",
|
|
20
|
+
"libraryId": "1zOlHMOpO89vqLPe5XpC-wzA9r5yaBkWt_qFjKqFNsIZtNJ-iUjBYDt-x"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"userSymbol": "bmIs",
|
|
24
|
+
"version": "1",
|
|
25
|
+
"libraryId": "1tFa7Gc68142wiiZaNmj0zA-ELDHh0q31eDXodeeCf1LxRR1LeSr3opAd"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"userSymbol": "bmFiddler",
|
|
29
|
+
"version": "30",
|
|
30
|
+
"libraryId": "13EWG4-lPrEf34itxQhAQ7b9JEbmCBfO8uE4Mhr99CHi3Pw65oxXtq-rU",
|
|
31
|
+
"developmentMode": false
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"enabledAdvancedServices": [
|
|
35
|
+
{
|
|
36
|
+
"userSymbol": "Docs",
|
|
37
|
+
"version": "v1",
|
|
38
|
+
"serviceId": "docs"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"userSymbol": "Drive",
|
|
42
|
+
"version": "v3",
|
|
43
|
+
"serviceId": "drive"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
package/gasmess/bruce/basic.js
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @OnlyCurrentDoc
|
|
3
|
+
*/
|
|
4
|
+
import '@mcpher/gas-fakes';
|
|
3
5
|
|
|
4
|
-
//
|
|
5
|
-
const
|
|
6
|
-
|
|
6
|
+
// the test
|
|
7
|
+
const test = () => {
|
|
8
|
+
// enable sandbox mode
|
|
9
|
+
ScriptApp.__behavior.sandboxMode = true;
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const range = sheet.getRange(1,1,values.length,values[0].length)
|
|
11
|
-
range.setValues(values)
|
|
11
|
+
// create a new document
|
|
12
|
+
const doc = DocumentApp.create('--gas-fakes-test');
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
// append a paragraph
|
|
15
|
+
const text = 'coffee turns potential into momentum.';
|
|
16
|
+
doc.getBody().appendParagraph(text);
|
|
17
|
+
doc.saveAndClose();
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
// read the document text and ensure it matches what you created
|
|
20
|
+
const readText = DocumentApp.openById(doc.getId()).getBody().getText();
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
// check it
|
|
23
|
+
if (text !== readText.trim()) {
|
|
24
|
+
throw new Error(`expected "${text}", but got "${readText}"`);
|
|
25
|
+
}
|
|
26
|
+
console.log('document created and read back successfully');
|
|
27
|
+
|
|
28
|
+
// tidy up sandbox
|
|
29
|
+
ScriptApp.__behavior.trash();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// run the test
|
|
33
|
+
test();
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brucemess",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "brucemess",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@mcpher/gas-fakes": "file:../../"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"..": {
|
|
16
|
+
"extraneous": true
|
|
17
|
+
},
|
|
18
|
+
"../..": {
|
|
19
|
+
"name": "@mcpher/gas-fakes",
|
|
20
|
+
"version": "1.0.25",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@google-cloud/logging": "^11.2.1",
|
|
24
|
+
"@mcpher/fake-gasenum": "^1.0.2",
|
|
25
|
+
"@sindresorhus/is": "^7.0.1",
|
|
26
|
+
"archiver": "^7.0.1",
|
|
27
|
+
"exceljs": "^4.4.0",
|
|
28
|
+
"fast-json-stable-stringify": "^2.1.0",
|
|
29
|
+
"get-stream": "^9.0.1",
|
|
30
|
+
"googleapis": "^157.0.0",
|
|
31
|
+
"got": "^14.4.7",
|
|
32
|
+
"into-stream": "^8.0.1",
|
|
33
|
+
"is": "^3.3.2",
|
|
34
|
+
"keyv": "^5.5.0",
|
|
35
|
+
"keyv-file": "^5.1.3",
|
|
36
|
+
"mime": "^4.0.7",
|
|
37
|
+
"sinon": "^21.0.0",
|
|
38
|
+
"sleep-synchronously": "^2.0.0",
|
|
39
|
+
"subsume": "^4.0.0",
|
|
40
|
+
"to-readable-stream": "^4.0.0",
|
|
41
|
+
"unzipper": "^0.12.3",
|
|
42
|
+
"yoctocolors": "^2.1.2"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=20.11.0"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"node_modules/@mcpher/gas-fakes": {
|
|
49
|
+
"resolved": "../..",
|
|
50
|
+
"link": true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brucemess",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "basic.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"dev": "node --conditions=development"
|
|
9
|
+
},
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
|
|
15
|
+
"@mcpher/gas-fakes": "file:../../"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/gasmess/bruce/pbx.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import { moveToTempFolder, deleteTempFile } from '../tempfolder.js';
|
|
3
3
|
import { report, scl } from './dreport.js';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import '@mcpher/gas-fakes';
|
|
7
7
|
const suffix = "-bruce"
|
|
8
8
|
const tli = () => {
|
|
9
9
|
let doc = DocumentApp.create("abc")
|
package/index.js
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -26,49 +26,57 @@
|
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"scripts": {
|
|
29
|
-
"test": "
|
|
30
|
-
"testdrive": "
|
|
31
|
-
"testsheetsdatavalidations": "
|
|
32
|
-
"testsheetspermissions": "
|
|
33
|
-
"testsheetsvalues": "
|
|
34
|
-
"testsheets": "
|
|
35
|
-
"testfetch": "
|
|
36
|
-
"testsession": "
|
|
37
|
-
"testutilities": "
|
|
38
|
-
"teststores": "
|
|
39
|
-
"testscriptapp": "
|
|
40
|
-
"testfiddler": "
|
|
41
|
-
"testenums": "
|
|
42
|
-
"testsheetssets": "
|
|
43
|
-
"testsheetsvui": "
|
|
44
|
-
"testsheetsdeveloper": "
|
|
45
|
-
"testsheetsexotics": "
|
|
46
|
-
"testsheetsdata": "
|
|
47
|
-
"testdocsadv": "
|
|
48
|
-
"testslidesadv": "
|
|
49
|
-
"testform": "
|
|
50
|
-
"testformsadv": "
|
|
51
|
-
"testdocs": "
|
|
52
|
-
"testslides": "
|
|
53
|
-
"testdocsnext": "
|
|
54
|
-
"testsheetstext": "
|
|
55
|
-
"testsheetsrange": "
|
|
56
|
-
"testdocslistitems": "
|
|
57
|
-
"testdocsall": "
|
|
58
|
-
"testdocsheaders": "
|
|
59
|
-
"testdocsfooters": "
|
|
60
|
-
"testdocsfootnotes": "
|
|
61
|
-
"testdocsimages": "
|
|
62
|
-
"testdocsstyles": "
|
|
63
|
-
"testsandbox": "
|
|
64
|
-
"testgmail": "
|
|
65
|
-
"testlogger": "
|
|
66
|
-
"pub": "
|
|
29
|
+
"test": "node ./test/test.js",
|
|
30
|
+
"testdrive": "node ./test/testdrive.js execute",
|
|
31
|
+
"testsheetsdatavalidations": "node ./test/testsheetsdatavalidations.js execute",
|
|
32
|
+
"testsheetspermissions": "node ./test/testsheetspermissions.js execute",
|
|
33
|
+
"testsheetsvalues": "node ./test/testsheetsvalues.js execute",
|
|
34
|
+
"testsheets": "node ./test/testsheets.js execute",
|
|
35
|
+
"testfetch": "node ./test/testfetch.js execute",
|
|
36
|
+
"testsession": "node ./test/testsession.js execute",
|
|
37
|
+
"testutilities": "node ./test/testutilities.js execute",
|
|
38
|
+
"teststores": "node ./test/teststores.js execute",
|
|
39
|
+
"testscriptapp": "node ./test/testscriptapp.js execute",
|
|
40
|
+
"testfiddler": "node ./test/testfiddler.js execute",
|
|
41
|
+
"testenums": "node ./test/testenums.js execute",
|
|
42
|
+
"testsheetssets": "node ./test/testsheetssets.js execute",
|
|
43
|
+
"testsheetsvui": "node ./test/testsheetsvui.js execute",
|
|
44
|
+
"testsheetsdeveloper": "node ./test/testsheetsdeveloper.js execute",
|
|
45
|
+
"testsheetsexotics": "node ./test/testsheetsexotics.js execute",
|
|
46
|
+
"testsheetsdata": "node ./test/testsheetsdata.js execute",
|
|
47
|
+
"testdocsadv": "node ./test/testdocsadv.js execute",
|
|
48
|
+
"testslidesadv": "node ./test/testslidesadv.js execute",
|
|
49
|
+
"testform": "node ./test/testform.js execute",
|
|
50
|
+
"testformsadv": "node ./test/testformsadv.js execute",
|
|
51
|
+
"testdocs": "node ./test/testdocs.js execute",
|
|
52
|
+
"testslides": "node ./test/testslides.js execute",
|
|
53
|
+
"testdocsnext": "node ./test/testdocsnext.js execute",
|
|
54
|
+
"testsheetstext": "node ./test/testsheetstext.js execute",
|
|
55
|
+
"testsheetsrange": "node ./test/testsheetsrange.js execute",
|
|
56
|
+
"testdocslistitems": "node ./test/testdocslistitems.js execute",
|
|
57
|
+
"testdocsall": "node ./test/testdocsall.js",
|
|
58
|
+
"testdocsheaders": "node ./test/testdocsheaders.js execute",
|
|
59
|
+
"testdocsfooters": "node ./test/testdocsfooters.js execute",
|
|
60
|
+
"testdocsfootnotes": "node ./test/testdocsfootnotes.js execute",
|
|
61
|
+
"testdocsimages": "node ./test/testdocsimages.js execute",
|
|
62
|
+
"testdocsstyles": "node ./test/testdocsstyles.js execute",
|
|
63
|
+
"testsandbox": "node ./test/testsandbox.js execute",
|
|
64
|
+
"testgmail": "node ./test/testgmail.js execute",
|
|
65
|
+
"testlogger": "node ./test/testlogger.js execute",
|
|
66
|
+
"pub": "npm publish --access public"
|
|
67
67
|
},
|
|
68
68
|
"name": "@mcpher/gas-fakes",
|
|
69
|
-
"version": "1.0.
|
|
69
|
+
"version": "1.0.26",
|
|
70
70
|
"license": "MIT",
|
|
71
71
|
"main": "main.js",
|
|
72
|
+
"exports": {
|
|
73
|
+
".": {
|
|
74
|
+
"development": "./src/index.js",
|
|
75
|
+
"import": "./main.js",
|
|
76
|
+
"default": "./main.js"
|
|
77
|
+
},
|
|
78
|
+
"./package.json": "./package.json"
|
|
79
|
+
},
|
|
72
80
|
"description": "A proof of concept implementation of Apps Script Environment on Node",
|
|
73
81
|
"repository": "github:brucemcpherson/gas-fakes",
|
|
74
82
|
"homepage": "https://ramblings.mcpher.com/a-proof-of-concept-implementation-of-apps-script-environment-on-node/"
|