-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpackage.json
More file actions
352 lines (352 loc) · 10.5 KB
/
package.json
File metadata and controls
352 lines (352 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
{
"name": "choicescript-vscode",
"displayName": "ChoiceScript Language",
"description": "ChoiceScript language support for VS Code",
"version": "3.1.1",
"author": {
"name": "Stephen Granade",
"email": "stephen@granades.com",
"url": "https://github.com/sgranade"
},
"license": "SEE LICENSE IN License.txt",
"contributors": [
{
"name": "KLNeidecker"
},
{
"name": "Carey Williams",
"url": "https://github.com/CareyJWilliams"
}
],
"repository": {
"type": "git",
"url": "https://github.com/sgranade/choicescript_vscode"
},
"publisher": "StephenGranade",
"categories": [
"Programming Languages",
"Linters",
"Snippets"
],
"keywords": [
"ChoiceScript",
"cyoa",
"interactive fiction"
],
"engines": {
"vscode": "^1.75.0"
},
"capabilities": {
"untrustedWorkspaces": {
"supported": "limited",
"description": "ChoiceScript requires trust to run or perform QuickTest or RandomTest on games."
},
"virtualWorkspaces": {
"supported": false,
"description": "ChoiceScript only works with local file paths."
}
},
"icon": "images/ChoiceOfGames.png",
"galleryBanner": {
"color": "#C80000",
"theme": "dark"
},
"main": "./client/dist/node/extension",
"browser": "./client/dist/web/extension",
"contributes": {
"languages": [
{
"id": "choicescript",
"aliases": [
"ChoiceScript",
"choicescript",
"cs"
],
"extensions": [
".txt"
],
"configuration": "./language-configuration.json"
}
],
"commands": [
{
"command": "choicescript.italicize",
"title": "Italicize",
"category": "ChoiceScript"
},
{
"command": "choicescript.bold",
"title": "Bold",
"category": "ChoiceScript"
},
{
"command": "choicescript.runGame",
"title": "Run Game",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
},
{
"command": "choicescript.runQuicktest",
"title": "Run Quicktest",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
},
{
"command": "choicescript.runRandomtestInteractive",
"title": "Run Randomtest",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
},
{
"command": "choicescript.runRandomtestDefault",
"title": "Run Randomtest with Default Settings",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
},
{
"command": "choicescript.rerunRandomtest",
"title": "Re-run Randomtest with Previous Settings",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
},
{
"command": "choicescript.cancelTest",
"title": "Cancel Running Test",
"category": "ChoiceScript",
"enablement": "isWorkspaceTrusted"
}
],
"menus": {
"commandPalette": [
{
"command": "choicescript.italicize",
"when": "editorLangId == choicescript"
},
{
"command": "choicescript.bold",
"when": "editorLangId == choicescript"
},
{
"command": "choicescript.runGame",
"when": "editorLangId == choicescript && choicescript.projectLoaded"
},
{
"command": "choicescript.runQuicktest",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning"
},
{
"command": "choicescript.runRandomtestInteractive",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning"
},
{
"command": "choicescript.runRandomtestDefault",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning"
},
{
"command": "choicescript.rerunRandomtest",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && choicescript.previousRandomtestSettingsExist && !choicescript.testRunning"
},
{
"command": "choicescript.cancelTest",
"when": "!isWeb && editorLangId == choicescript && choicescript.testRunning"
}
],
"editor/context": [
{
"command": "choicescript.runGame",
"when": "editorLangId == choicescript && choicescript.projectLoaded",
"group": "ChoiceScript@1"
},
{
"command": "choicescript.runQuicktest",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning",
"group": "ChoiceScript@3"
},
{
"command": "choicescript.runRandomtestInteractive",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning",
"group": "ChoiceScript@4"
},
{
"command": "choicescript.runRandomtestDefault",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && !choicescript.testRunning",
"group": "ChoiceScript@5"
},
{
"command": "choicescript.rerunRandomtest",
"when": "!isWeb && editorLangId == choicescript && choicescript.projectLoaded && choicescript.previousRandomtestSettingsExist && !choicescript.testRunning",
"group": "ChoiceScript@6"
},
{
"command": "choicescript.cancelTest",
"when": "!isWeb && editorLangId == choicescript && choicescript.testRunning",
"group": "ChoiceScript@7"
}
]
},
"keybindings": [
{
"command": "choicescript.italicize",
"key": "ctrl+i",
"mac": "cmd+i",
"when": "editorTextFocus && editorLangId == choicescript"
},
{
"command": "choicescript.italicize",
"key": "ctrl+shift+i",
"mac": "cmd+shift+i",
"when": "editorTextFocus && editorLangId == choicescript"
},
{
"command": "choicescript.bold",
"key": "ctrl+shift+b",
"mac": "cmd+shift+b",
"when": "editorTextFocus && editorLangId == choicescript"
}
],
"grammars": [
{
"language": "choicescript",
"scopeName": "source.cs",
"path": "./syntaxes/cs.tmLanguage.json"
}
],
"snippets": [
{
"language": "choicescript",
"path": "./snippets.json"
}
],
"configuration": {
"title": "ChoiceScript",
"properties": {
"choicescript.useChoiceOfGamesStyleGuide": {
"type": "boolean",
"default": true,
"description": "Whether to check your game's text and length of options against Choice of Games's in-house style guide."
},
"choicescript.disableQuickSuggestions": {
"type": "boolean",
"default": true,
"description": "Whether to turn off VS Code's automatic suggestions when typing text (as opposed to commands or variables)."
},
"choicescript.allowUnsafeScript": {
"type": "string",
"default": "never",
"enum": [
"never",
"warn",
"allow"
],
"enumDescriptions": [
"Do not allow *script calls and mark their usage with error diagnostics",
"Allow *script calls but mark their usage with warning diagnostics",
"Allow *script calls and do not mark them with any diagnostics"
],
"description": "Whether to allow execution of *script commands in ChoiceScript games you're running inside VS Code. This poses a security risk and you should only run games who's code you've vetted whilst this setting is not 'never'."
},
"choicescript.randomtest.putResultsInDocument": {
"type": "string",
"default": "fulltext",
"enum": [
"never",
"always",
"fulltext"
],
"enumDescriptions": [
"Never put the results in a document",
"Always put the results in a document",
"Only put the results in a document when showing full game text"
],
"description": "When to put Randomtest results in a VS Code document that you can save."
},
"choicescript.randomtest.putResultsInUniqueDocument": {
"type": "boolean",
"default": true,
"description": "After the test, put the results in a unique document so previous test results aren't overwritten."
},
"choicescript.randomtest.iterations": {
"type": "integer",
"default": 1000,
"description": "Number of times to run randomtest on a game."
},
"choicescript.randomtest.randomSeed": {
"type": "integer",
"default": 0,
"description": "Fixed random seed to use."
},
"choicescript.randomtest.avoidUsedOptions": {
"type": "boolean",
"default": true,
"description": "Avoid used options in testing, which is less random but can find bugs faster."
},
"choicescript.randomtest.showChoices": {
"type": "boolean",
"default": false,
"description": "Show the choices randomtest made."
},
"choicescript.randomtest.showFullText": {
"type": "boolean",
"default": false,
"description": "Show the full text that randomtest encounters."
},
"choicescript.randomtest.showLineCoverageStatistics": {
"type": "boolean",
"default": false,
"description": "After the test, show how many times each line was encountered."
}
}
}
},
"scripts": {
"lint": "eslint",
"vscode:prepublish": "npm run webpack",
"webpack": "npm run minify-cs && webpack --mode production --config ./client/webpack.config.js --devtool hidden-source-map && webpack --mode production --config ./server/webpack.config.js --devtool hidden-source-map",
"webpack:dev": "npm run minify-cs && concurrently \"npm run dev-client\" \"npm run dev-server\"",
"dev-client": "webpack --mode none --config ./client/webpack.config.js --watch",
"dev-server": "webpack --mode none --config ./server/webpack.config.js --watch",
"minify-cs": "node utilities/minify-cs.js",
"test": "nyc mocha",
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov",
"clean": "npm run clean-client && npm run clean-server",
"clean-client": "rimraf client/dist",
"clean-server": "rimraf server/dist",
"postinstall": "cd client && npm install && cd ../server && npm install && cd .."
},
"devDependencies": {
"@eslint/js": "^9.7.0",
"@fluffy-spoon/substitute": "^1.208.0",
"@types/chai": "^4.3.10",
"@types/eslint__js": "^8.42.3",
"@types/mocha": "^10.0.4",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.9.2",
"@types/urijs": "^1.19.23",
"@types/vscode": "^1.75.0",
"chai": "^4.4.1",
"concurrently": "^9.0.1",
"date-fns": "^2.30.0",
"esbuild-loader": "^4.0.2",
"eslint": "^8.57.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"merge-options": "^3.0.4",
"mocha": "^10.2.0",
"mock-fs": "^5.2.0",
"nyc": "^15.1.0",
"rimraf": "^6.0.1",
"terser": "^5.24.0",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.16.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.11",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"path-browserify": "^1.0.1",
"uuid": "^9.0.1",
"vscode-uri": "^3.0.8"
}
}