@mcpher/gas-fakes 1.0.24 → 1.0.25
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/basic.js +28 -19
- package/gasmess/bruce/package-lock.json +50 -0
- package/gasmess/bruce/package.json +15 -0
- package/mainlocal.js +2 -0
- package/package.json +44 -40
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,50 @@
|
|
|
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
|
+
"name": "@mcpher/gas-fakes",
|
|
17
|
+
"version": "1.0.25",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@google-cloud/logging": "^11.2.1",
|
|
21
|
+
"@mcpher/fake-gasenum": "^1.0.2",
|
|
22
|
+
"@sindresorhus/is": "^7.0.1",
|
|
23
|
+
"archiver": "^7.0.1",
|
|
24
|
+
"exceljs": "^4.4.0",
|
|
25
|
+
"fast-json-stable-stringify": "^2.1.0",
|
|
26
|
+
"get-stream": "^9.0.1",
|
|
27
|
+
"googleapis": "^157.0.0",
|
|
28
|
+
"got": "^14.4.7",
|
|
29
|
+
"into-stream": "^8.0.1",
|
|
30
|
+
"is": "^3.3.2",
|
|
31
|
+
"keyv": "^5.5.0",
|
|
32
|
+
"keyv-file": "^5.1.3",
|
|
33
|
+
"mime": "^4.0.7",
|
|
34
|
+
"sinon": "^21.0.0",
|
|
35
|
+
"sleep-synchronously": "^2.0.0",
|
|
36
|
+
"subsume": "^4.0.0",
|
|
37
|
+
"to-readable-stream": "^4.0.0",
|
|
38
|
+
"unzipper": "^0.12.3",
|
|
39
|
+
"yoctocolors": "^2.1.2"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20.11.0"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"node_modules/@mcpher/gas-fakes": {
|
|
46
|
+
"resolved": "../..",
|
|
47
|
+
"link": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
},
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@mcpher/gas-fakes": "file:../../"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/mainlocal.js
ADDED
package/package.json
CHANGED
|
@@ -26,49 +26,53 @@
|
|
|
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.25",
|
|
70
70
|
"license": "MIT",
|
|
71
|
-
"main": "
|
|
71
|
+
"main": "mainlocal.js",
|
|
72
|
+
"exports": {
|
|
73
|
+
".": "./mainlocal.js",
|
|
74
|
+
"./main.js": "./mainlocal.js"
|
|
75
|
+
},
|
|
72
76
|
"description": "A proof of concept implementation of Apps Script Environment on Node",
|
|
73
77
|
"repository": "github:brucemcpherson/gas-fakes",
|
|
74
78
|
"homepage": "https://ramblings.mcpher.com/a-proof-of-concept-implementation-of-apps-script-environment-on-node/"
|