factoriomod-debug 1.1.24

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 ADDED
@@ -0,0 +1,1068 @@
1
+ {
2
+ "name": "factoriomod-debug",
3
+ "displayName": "Factorio Modding Tool Kit",
4
+ "version": "1.1.24",
5
+ "publisher": "justarandomgeek",
6
+ "description": "Debug Tools for developing Factorio Mods",
7
+ "author": {
8
+ "name": "justarandomgeek",
9
+ "email": "justarandomgeek@live.com"
10
+ },
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "multi-root ready"
14
+ ],
15
+ "engines": {
16
+ "vscode": "^1.66.0",
17
+ "node": ">=16"
18
+ },
19
+ "icon": "images/factoriomod-debug-icon.png",
20
+ "categories": [
21
+ "Debuggers",
22
+ "Programming Languages",
23
+ "Linters"
24
+ ],
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/justarandomgeek/vscode-factoriomod-debug.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/justarandomgeek/vscode-factoriomod-debug/issues"
31
+ },
32
+ "scripts": {
33
+ "lint": "eslint src --ext ts",
34
+ "typecheck": "tsc -p tsconfig.json --noEmit",
35
+ "typecheck-watch": "tsc -p tsconfig.json --noEmit --watch",
36
+ "esbuild": "ts-node ./build.ts",
37
+ "watch": "npm run esbuild -- --watch",
38
+ "stats": "npm run esbuild -- --meta && esbuild-visualizer --metadata ./out/meta.json --filename ./out/stats.html",
39
+ "vscode:prepublish": "npm run prepare",
40
+ "prepare": "rimraf dist && npm run esbuild",
41
+ "package": "vsce package",
42
+ "publish-vscode": "vsce publish",
43
+ "publish-vscode-prerelease": "vsce publish --pre-release",
44
+ "test": "npm run typecheck && npm run lint"
45
+ },
46
+ "devDependencies": {
47
+ "@types/archiver": "^3.1.1",
48
+ "@types/buffers": "^0.1.31",
49
+ "@types/d3": "^7.4.0",
50
+ "@types/ini": "^1.3.31",
51
+ "@types/node": "^17.0.23",
52
+ "@types/node-fetch": "^2.6.1",
53
+ "@types/request": "^2.48.8",
54
+ "@types/semver": "^7.3.9",
55
+ "@types/vscode": "^1.66.0",
56
+ "@types/vscode-webview": "^1.57.0",
57
+ "@typescript-eslint/eslint-plugin": "^5.17.0",
58
+ "@typescript-eslint/parser": "^5.17.0",
59
+ "@vscode/debugadapter": "^1.55.1",
60
+ "@vscode/debugadapter-testsupport": "^1.55.1",
61
+ "@vscode/vsce": "^2.7.0",
62
+ "archiver": "^5.3.0",
63
+ "commander": "^9.4.0",
64
+ "d3": "^7.6.1",
65
+ "d3-flame-graph": "^4.1.3",
66
+ "esbuild": "^0.14.49",
67
+ "esbuild-plugin-import-glob": "^0.1.1",
68
+ "esbuild-visualizer": "^0.3.1",
69
+ "eslint": "^8.12.0",
70
+ "form-data": "^4.0.0",
71
+ "ini": "^1.3.8",
72
+ "jsonc-parser": "^3.1.0",
73
+ "node-fetch": "^2.6.7",
74
+ "readdir-glob": "^1.1.2",
75
+ "rimraf": "^3.0.2",
76
+ "semver": "^7.3.7",
77
+ "tree-kill": "^1.2.2",
78
+ "ts-node": "^10.9.1",
79
+ "typescript": "^4.7.4",
80
+ "vscode-languageclient": "^8.0.2",
81
+ "vscode-languageserver": "^8.0.2",
82
+ "vscode-languageserver-textdocument": "^1.0.5",
83
+ "vscode-uri": "^3.0.3"
84
+ },
85
+ "main": "./dist/fmtk.js",
86
+ "bin": {
87
+ "fmtk": "./dist/fmtk.js"
88
+ },
89
+ "activationEvents": [
90
+ "onDebug",
91
+ "onCommand:workbench.action.tasks.runTask",
92
+ "onCommand:factorio.openchangelog",
93
+ "onCommand:factorio.datestamp",
94
+ "onCommand:factorio.package",
95
+ "onCommand:factorio.version",
96
+ "onCommand:factorio.upload",
97
+ "onCommand:factorio.publish",
98
+ "onCommand:factorio.clearApiKey",
99
+ "workspaceContains:**/changelog.txt",
100
+ "workspaceContains:**/info.json",
101
+ "workspaceContains:**/control.lua",
102
+ "onLanguage:factorio-locale",
103
+ "onLanguage:factorio-changelog",
104
+ "onView:factoriomods"
105
+ ],
106
+ "contributes": {
107
+ "colors": [
108
+ {
109
+ "id": "factorio.ProfileTimerForeground",
110
+ "description": "Color for line timer text when running Factorio Mod profiler",
111
+ "defaults": {
112
+ "dark": "#ffffff",
113
+ "highContrast": "#ffffff",
114
+ "light": "#000000"
115
+ }
116
+ },
117
+ {
118
+ "id": "factorio.ProfileFunctionTimerForeground",
119
+ "description": "Color for function timer text when running Factorio Mod profiler",
120
+ "defaults": {
121
+ "dark": "#ffffff66",
122
+ "highContrast": "#ffffff",
123
+ "light": "#000000"
124
+ }
125
+ }
126
+ ],
127
+ "configuration": [
128
+ {
129
+ "title": "Factorio",
130
+ "properties": {
131
+ "factorio.portal.apikey": {
132
+ "type": "string",
133
+ "scope": "machine-overridable",
134
+ "deprecationMessage": "This setting is no longer used. API Keys are now stored in secrets storage."
135
+ },
136
+ "factorio.portal.saveKey": {
137
+ "type": "boolean",
138
+ "default": true,
139
+ "description": "Prompt to save newly entered API key to secrets storage"
140
+ },
141
+ "factorio.package.preparingCommitMessage": {
142
+ "type": "string",
143
+ "description": "Commit message for preparing release. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
144
+ "default": "preparing release of version $VERSION",
145
+ "pattern": "\\$VERSION",
146
+ "editPresentation": "multilineText"
147
+ },
148
+ "factorio.package.movedToCommitMessage": {
149
+ "type": "string",
150
+ "description": "Commit message for raising version after release. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
151
+ "default": "moved to version $VERSION",
152
+ "pattern": "\\$VERSION",
153
+ "editPresentation": "multilineText"
154
+ },
155
+ "factorio.package.autoCommitAuthor": {
156
+ "type": "string",
157
+ "description": "Author for automatically created commits",
158
+ "default": "compilatron <compilatron@justarandomgeek.com>"
159
+ },
160
+ "factorio.package.tagName": {
161
+ "type": "string",
162
+ "description": "Template for release tag names. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
163
+ "default": "$VERSION",
164
+ "pattern": "\\$VERSION"
165
+ },
166
+ "factorio.package.defaultPublishBranch": {
167
+ "deprecationMessage": "This setting is no longer used. If not set in `info.json`, the value of git config init.defaultBranch will be used."
168
+ },
169
+ "factorio.package.tagMessage": {
170
+ "type": "string",
171
+ "description": "Message for version tags. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
172
+ "editPresentation": "multilineText"
173
+ },
174
+ "factorio.package.zipLocation": {
175
+ "type": "string",
176
+ "description": "Location to place mod zip packages.",
177
+ "enumDescriptions": [
178
+ "Inside Mod (sibling of info.json)",
179
+ "Outside Mod (one level up from info.json)"
180
+ ],
181
+ "enum": [
182
+ "inside",
183
+ "outside"
184
+ ],
185
+ "default": "inside"
186
+ },
187
+ "factorio.profile.timerHighlightColor": {
188
+ "type": "string",
189
+ "description": "Color to be used to highlight hot timers",
190
+ "pattern": "^#[0-9a-fA-F]{6}$",
191
+ "default": "#FF0000"
192
+ },
193
+ "factorio.profile.displayAverageTime": {
194
+ "type": "boolean",
195
+ "description": "Display average time in labels instead of cumulative time.",
196
+ "default": true
197
+ },
198
+ "factorio.profile.colorBy": {
199
+ "type": "string",
200
+ "description": "Which attribute to color labels by",
201
+ "enum": [
202
+ "count",
203
+ "totaltime",
204
+ "averagetime"
205
+ ],
206
+ "default": "totaltime"
207
+ },
208
+ "factorio.profile.colorScaleFactor": {
209
+ "type": "number",
210
+ "description": "Adjustment factor for color scale function",
211
+ "default": 1,
212
+ "exclusiveMinimum": 0
213
+ },
214
+ "factorio.profile.colorScaleMode": {
215
+ "type": "string",
216
+ "description": "Scale function for coloring timer labels",
217
+ "enum": [
218
+ "boost",
219
+ "linear",
220
+ "mute"
221
+ ],
222
+ "default": "boost"
223
+ },
224
+ "factorio.profile.rulers": {
225
+ "type": "array",
226
+ "description": "Ruler colors and thresholds to display hotspots in the scrollbar",
227
+ "items": {
228
+ "oneOf": [
229
+ {
230
+ "required": [
231
+ "color"
232
+ ],
233
+ "properties": {
234
+ "color": {
235
+ "type": "string",
236
+ "pattern": "^#[0-9a-fA-F]{1,8}$"
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "required": [
242
+ "themeColor"
243
+ ],
244
+ "properties": {
245
+ "themeColor": {
246
+ "type": "string"
247
+ }
248
+ }
249
+ }
250
+ ],
251
+ "required": [
252
+ "threshold"
253
+ ],
254
+ "properties": {
255
+ "threshold": {
256
+ "type": "number",
257
+ "maximum": 1,
258
+ "minimum": 0
259
+ },
260
+ "lane": {
261
+ "enum": [
262
+ "Left",
263
+ "Center",
264
+ "Right",
265
+ "Full"
266
+ ],
267
+ "default": "Right"
268
+ }
269
+ }
270
+ },
271
+ "default": [
272
+ {
273
+ "color": "#FF0000",
274
+ "threshold": 0.75
275
+ },
276
+ {
277
+ "color": "#FF6600",
278
+ "threshold": 0.5
279
+ }
280
+ ]
281
+ },
282
+ "factorio.versions": {
283
+ "type": "array",
284
+ "description": "Factorio installations configured for use with debugging and profiling.",
285
+ "items": {
286
+ "type": "object",
287
+ "required": [
288
+ "name",
289
+ "factorioPath"
290
+ ],
291
+ "properties": {
292
+ "name": {
293
+ "type": "string",
294
+ "description": "Display name for this installation"
295
+ },
296
+ "active": {
297
+ "const": true
298
+ },
299
+ "factorioPath": {
300
+ "type": "string",
301
+ "description": "Path to Factorio binary file.",
302
+ "examples": [
303
+ "C:/Program Files (x86)/Steam/steamapps/common/Factorio/bin/x64/factorio.exe",
304
+ "C:/Program Files/Factorio/bin/x64/factorio.exe",
305
+ "~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio",
306
+ "/Applications/factorio.app/Contents/MacOS/factorio",
307
+ "~/.factorio/bin/x64/factorio",
308
+ "${userHome}/.factorio/bin/x64/factorio",
309
+ "${workspaceFolder}/factorio/bin/x64/factorio"
310
+ ]
311
+ },
312
+ "configPath": {
313
+ "type": "string",
314
+ "description": "Path to Factorio config.ini file."
315
+ },
316
+ "docsPath": {
317
+ "type": "string",
318
+ "description": "Path to runtime-api.json, must be relative to factorioPath."
319
+ },
320
+ "nativeDebugger": {
321
+ "type": "string",
322
+ "description": "Native debugger to launch factorio with",
323
+ "examples": [
324
+ "vsjitdebugger.exe"
325
+ ]
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "factorio.docs.generateDocs": {
331
+ "type": "boolean",
332
+ "description": "Generate docs files when selecting a Factorio version.",
333
+ "default": true
334
+ },
335
+ "factorio.docs.numberStyle": {
336
+ "description": "Type of annotations to generate for specialized number types",
337
+ "default": "aliasNative",
338
+ "enum": [
339
+ "aliasNative",
340
+ "alias",
341
+ "class"
342
+ ],
343
+ "enumDescriptions": [
344
+ "Use `alias` for numeric types which exactly match `number` (or `integer` if enabled), and `class` otherwise",
345
+ "Use `alias` for all numeric types",
346
+ "Use `class` for all numeric types"
347
+ ]
348
+ },
349
+ "factorio.docs.builtinOperators": {
350
+ "description": "Enable generating operators for builtin classes",
351
+ "type": "boolean",
352
+ "default": true
353
+ },
354
+ "factorio.docs.signedUMinus": {
355
+ "description": "Convert uint to int in builtin unary minus operator",
356
+ "type": "boolean",
357
+ "default": true
358
+ },
359
+ "factorio.docs.builtinCustomStyle": {
360
+ "description": "Customize the generation of annotations for builtin types",
361
+ "type": "object",
362
+ "additionalProperties": {
363
+ "type": "object",
364
+ "required": [
365
+ "kind"
366
+ ],
367
+ "properties": {
368
+ "kind": {
369
+ "description": "The kind of annotation to use for this type",
370
+ "enum": [
371
+ "none",
372
+ "alias",
373
+ "class"
374
+ ]
375
+ }
376
+ },
377
+ "oneOf": [
378
+ {
379
+ "properties": {
380
+ "kind": {
381
+ "const": "none"
382
+ }
383
+ }
384
+ },
385
+ {
386
+ "required": [
387
+ "kind",
388
+ "base"
389
+ ],
390
+ "properties": {
391
+ "kind": {
392
+ "const": "alias"
393
+ },
394
+ "base": {
395
+ "description": "The base type this alias refers to",
396
+ "type": "string",
397
+ "examples": [
398
+ "number",
399
+ "integer"
400
+ ]
401
+ }
402
+ }
403
+ },
404
+ {
405
+ "required": [
406
+ "kind",
407
+ "base"
408
+ ],
409
+ "properties": {
410
+ "kind": {
411
+ "const": "class"
412
+ },
413
+ "base": {
414
+ "description": "The base classes, if any, for this class",
415
+ "type": "array",
416
+ "items": {
417
+ "type": "string",
418
+ "examples": [
419
+ "number",
420
+ "integer"
421
+ ]
422
+ }
423
+ },
424
+ "operators": {
425
+ "description": "If this class should have math operators",
426
+ "type": "boolean"
427
+ }
428
+ }
429
+ }
430
+ ]
431
+ }
432
+ },
433
+ "factorio.docs.useInteger": {
434
+ "type": "boolean",
435
+ "description": "Use lua `integer` type for specialized integer types",
436
+ "default": true
437
+ },
438
+ "factorio.docs.docLinksVerion": {
439
+ "description": "What version to use when generating docs links",
440
+ "enumDescriptions": [
441
+ "Always link to the `latest` docs available online",
442
+ "Link to the online version of the specific version used for generation"
443
+ ],
444
+ "enum": [
445
+ "latest",
446
+ "current"
447
+ ],
448
+ "default": "latest"
449
+ },
450
+ "factorio.workspace.library": {
451
+ "deprecationMessage": "Generated files are now placed in workspace private storage."
452
+ },
453
+ "factorio.workspace.manageLibraryDataLinks": {
454
+ "type": "boolean",
455
+ "default": true,
456
+ "description": "Automatically manage /data link in `\"Lua.workspace.library\"`."
457
+ },
458
+ "factorio.debug.runMode": {
459
+ "description": "Run mode for Debug Adapter",
460
+ "default": "inline",
461
+ "enum": [
462
+ "inline",
463
+ "external"
464
+ ],
465
+ "enumDescriptions": [
466
+ "Run inside extension, communicate directly",
467
+ "Run in an external process, communicate via stdio"
468
+ ]
469
+ }
470
+ }
471
+ }
472
+ ],
473
+ "taskDefinitions": [
474
+ {
475
+ "type": "factorio",
476
+ "required": [
477
+ "command"
478
+ ],
479
+ "properties": {
480
+ "command": {
481
+ "type": "string",
482
+ "enum": [
483
+ "datestamp",
484
+ "package",
485
+ "version",
486
+ "upload",
487
+ "publish",
488
+ "run",
489
+ "adjustMods"
490
+ ]
491
+ },
492
+ "modname": {
493
+ "type": "string"
494
+ },
495
+ "script": {
496
+ "type": "string"
497
+ },
498
+ "scriptArgs": {
499
+ "type": "array",
500
+ "items": {
501
+ "type": "string"
502
+ }
503
+ },
504
+ "adjustMods": {
505
+ "type": "object",
506
+ "additionalProperties": {
507
+ "oneOf": [
508
+ {
509
+ "type": "boolean"
510
+ },
511
+ {
512
+ "type": "string",
513
+ "pattern": "(\\d+\\.){2}\\d+"
514
+ }
515
+ ]
516
+ }
517
+ },
518
+ "modsPath": {
519
+ "type": "string"
520
+ },
521
+ "disableExtraMods": {
522
+ "type": "boolean"
523
+ },
524
+ "allowDisableBaseMod": {
525
+ "type": "boolean"
526
+ }
527
+ }
528
+ }
529
+ ],
530
+ "commands": [
531
+ {
532
+ "command": "factorio.openchangelog",
533
+ "category": "Factorio",
534
+ "title": "Open Changelog",
535
+ "icon": "$(versions)"
536
+ },
537
+ {
538
+ "command": "factorio.datestamp",
539
+ "category": "Factorio",
540
+ "title": "Datestamp Changelog",
541
+ "icon": "$(calendar)"
542
+ },
543
+ {
544
+ "command": "factorio.package",
545
+ "category": "Factorio",
546
+ "title": "Package Mod",
547
+ "icon": "$(package)"
548
+ },
549
+ {
550
+ "command": "factorio.version",
551
+ "category": "Factorio",
552
+ "title": "Increment Version",
553
+ "icon": "$(tag)"
554
+ },
555
+ {
556
+ "command": "factorio.upload",
557
+ "category": "Factorio",
558
+ "title": "Upload to Portal",
559
+ "icon": "$(cloud-upload)"
560
+ },
561
+ {
562
+ "command": "factorio.publish",
563
+ "category": "Factorio",
564
+ "title": "Publish Mod",
565
+ "icon": "$(repo-push)"
566
+ },
567
+ {
568
+ "command": "factorio.clearApiKey",
569
+ "category": "Factorio",
570
+ "title": "Clear API Key"
571
+ }
572
+ ],
573
+ "views": {
574
+ "scm": [
575
+ {
576
+ "id": "factoriomods",
577
+ "name": "Factorio Mod Packages",
578
+ "icon": "images/viewicon.svg",
579
+ "contextualTitle": "Factorio Mod Packages"
580
+ }
581
+ ]
582
+ },
583
+ "menus": {
584
+ "commandPalette": [
585
+ {
586
+ "command": "factorio.openchangelog",
587
+ "when": "false"
588
+ },
589
+ {
590
+ "command": "factorio.datestamp",
591
+ "when": "false"
592
+ },
593
+ {
594
+ "command": "factorio.package",
595
+ "when": "false"
596
+ },
597
+ {
598
+ "command": "factorio.version",
599
+ "when": "false"
600
+ },
601
+ {
602
+ "command": "factorio.upload",
603
+ "when": "false"
604
+ },
605
+ {
606
+ "command": "factorio.publish",
607
+ "when": "false"
608
+ }
609
+ ],
610
+ "view/item/context": [
611
+ {
612
+ "command": "factorio.openchangelog",
613
+ "when": "view == factoriomods && viewItem =~ /haschangelog/",
614
+ "group": "1_info@1"
615
+ },
616
+ {
617
+ "command": "factorio.datestamp",
618
+ "when": "view == factoriomods && viewItem =~ /latest/ && viewItem =~ /haschangelog/",
619
+ "group": "2_basic@2"
620
+ },
621
+ {
622
+ "command": "factorio.package",
623
+ "when": "view == factoriomods && viewItem =~ /latest/",
624
+ "group": "2_basic@3"
625
+ },
626
+ {
627
+ "command": "factorio.version",
628
+ "when": "view == factoriomods && viewItem =~ /latest/",
629
+ "group": "2_basic@4"
630
+ },
631
+ {
632
+ "command": "factorio.upload",
633
+ "when": "view == factoriomods && viewItem =~ /latest/",
634
+ "group": "2_basic@5"
635
+ },
636
+ {
637
+ "command": "factorio.publish",
638
+ "when": "view == factoriomods && viewItem =~ /latest/",
639
+ "group": "3_publish@1"
640
+ },
641
+ {
642
+ "command": "factorio.openchangelog",
643
+ "when": "view == factoriomods && viewItem =~ /haschangelog/",
644
+ "group": "inline@1"
645
+ },
646
+ {
647
+ "command": "factorio.datestamp",
648
+ "when": "view == factoriomods && viewItem =~ /latest/ && viewItem =~ /haschangelog/",
649
+ "group": "inline@2"
650
+ },
651
+ {
652
+ "command": "factorio.package",
653
+ "when": "view == factoriomods && viewItem =~ /latest/",
654
+ "group": "inline@3"
655
+ },
656
+ {
657
+ "command": "factorio.version",
658
+ "when": "view == factoriomods && viewItem =~ /latest/",
659
+ "group": "inline@4"
660
+ },
661
+ {
662
+ "command": "factorio.upload",
663
+ "when": "view == factoriomods && viewItem =~ /latest/",
664
+ "group": "inline@5"
665
+ },
666
+ {
667
+ "command": "factorio.publish",
668
+ "when": "view == factoriomods && viewItem =~ /latest/",
669
+ "group": "inline@6"
670
+ }
671
+ ]
672
+ },
673
+ "languages": [
674
+ {
675
+ "id": "factorio-locale",
676
+ "aliases": [
677
+ "Factorio Locale",
678
+ "factorio-locale"
679
+ ],
680
+ "extensions": [
681
+ ".cfg"
682
+ ],
683
+ "configuration": "./language/factorio-locale.language-configuration.json"
684
+ },
685
+ {
686
+ "id": "factorio-changelog",
687
+ "aliases": [
688
+ "Factorio Changelog",
689
+ "factorio-changelog"
690
+ ],
691
+ "filenames": [
692
+ "changelog.txt"
693
+ ],
694
+ "configuration": "./language/factorio-changelog.language-configuration.json"
695
+ }
696
+ ],
697
+ "grammars": [
698
+ {
699
+ "language": "factorio-locale",
700
+ "scopeName": "source.factorio-locale",
701
+ "path": "./language/factorio-locale.tmLanguage.json"
702
+ },
703
+ {
704
+ "language": "factorio-changelog",
705
+ "scopeName": "source.factorio-changelog",
706
+ "path": "./language/factorio-changelog.tmLanguage.json"
707
+ }
708
+ ],
709
+ "snippets": [
710
+ {
711
+ "language": "factorio-changelog",
712
+ "path": "./language/factorio-changelog.json"
713
+ },
714
+ {
715
+ "language": "factorio-locale",
716
+ "path": "./language/factorio-locale.json"
717
+ }
718
+ ],
719
+ "configurationDefaults": {
720
+ "[factorio-changelog]": {
721
+ "editor.detectIndentation": false,
722
+ "editor.insertSpaces": true,
723
+ "editor.tabSize": 2,
724
+ "gitlens.codeLens.symbolScopes": [
725
+ "Namespace",
726
+ "!Class"
727
+ ]
728
+ }
729
+ },
730
+ "jsonValidation": [
731
+ {
732
+ "fileMatch": [
733
+ "map-gen-settings.json",
734
+ "map-gen-settings.*.json",
735
+ "*.map-gen-settings.json",
736
+ "map-gen-settings.example.json"
737
+ ],
738
+ "url": "./schema/mapgen.json"
739
+ },
740
+ {
741
+ "fileMatch": [
742
+ "map-settings.json",
743
+ "map-settings.*.json",
744
+ "*.map-settings.json",
745
+ "map-settings.example.json"
746
+ ],
747
+ "url": "./schema/mapsettings.json"
748
+ },
749
+ {
750
+ "fileMatch": [
751
+ "server-settings.json",
752
+ "server-settings.*.json",
753
+ "*.server-settings.json",
754
+ "server-settings.example.json"
755
+ ],
756
+ "url": "./schema/serversettings.json"
757
+ },
758
+ {
759
+ "fileMatch": [
760
+ "info.json",
761
+ "!locale/*/info.json",
762
+ "!data/**/info.json",
763
+ "!tests/**/info.json",
764
+ "!temp/**/info.json",
765
+ "!campaigns/*/info.json",
766
+ "!scenarios/*/info.json",
767
+ "!saves/**/info.json",
768
+ "!blueprint/info.json"
769
+ ],
770
+ "url": "./schema/modinfo.json"
771
+ },
772
+ {
773
+ "fileMatch": [
774
+ "data/**/info.json",
775
+ "tests/**/info.json",
776
+ "!locale/*/info.json",
777
+ "!campaigns/*/info.json",
778
+ "!scenarios/*/info.json",
779
+ "!saves/**/info.json",
780
+ "!blueprint/info.json"
781
+ ],
782
+ "url": "./schema/datainfo.json"
783
+ },
784
+ {
785
+ "fileMatch": "locale/*/info.json",
786
+ "url": "./schema/localeinfo.json"
787
+ },
788
+ {
789
+ "fileMatch": "scenarios/*/description.json",
790
+ "url": "./schema/scenario.json"
791
+ },
792
+ {
793
+ "fileMatch": "campaigns/*/description.json",
794
+ "url": "./schema/campaign.json"
795
+ }
796
+ ],
797
+ "breakpoints": [
798
+ {
799
+ "language": "lua"
800
+ }
801
+ ],
802
+ "debuggers": [
803
+ {
804
+ "type": "factoriomod",
805
+ "label": "Factorio Mod Debug",
806
+ "program": "./dist/fmtk.js",
807
+ "args": [
808
+ "debug"
809
+ ],
810
+ "runtime": "node",
811
+ "languages": [
812
+ "lua",
813
+ "phobos",
814
+ "typescript"
815
+ ],
816
+ "configurationAttributes": {
817
+ "launch": {
818
+ "properties": {
819
+ "trace": {
820
+ "type": "boolean",
821
+ "description": "Enable logging of the Debug Adapter Protocol.",
822
+ "default": false,
823
+ "examples": [
824
+ true
825
+ ]
826
+ },
827
+ "modsPath": {
828
+ "type": "string",
829
+ "description": "Absolute path to Factorio mods directory."
830
+ },
831
+ "manageMod": {
832
+ "type": "boolean",
833
+ "description": "Enable automatic management of the debugadapter mod",
834
+ "default": true
835
+ },
836
+ "useInstrumentMode": {
837
+ "type": "boolean",
838
+ "description": "Use Instrument Mode to hook all mods. Requires Factorio >= 0.18.10",
839
+ "default": true
840
+ },
841
+ "checkPrototypes": {
842
+ "type": "boolean",
843
+ "description": "Add --check-unused-prototype-data to factorioArgs."
844
+ },
845
+ "checkGlobals": {
846
+ "type": [
847
+ "boolean",
848
+ "array"
849
+ ],
850
+ "description": "Check for assignment to undefined globals. Boolean to enable/disable for all mods, or array of mod names (`#settings` and `#data` for settings/data stage).",
851
+ "items": {
852
+ "type": "string"
853
+ }
854
+ },
855
+ "factorioArgs": {
856
+ "type": "array",
857
+ "items": {
858
+ "type": "string",
859
+ "examples": [
860
+ "--load-scenario",
861
+ "--disable-migration-window"
862
+ ]
863
+ },
864
+ "default": [],
865
+ "description": "Extra command line arguments to pass to Factorio"
866
+ },
867
+ "adjustMods": {
868
+ "description": "Dictionary of modname -> true or version string to enable, false to disable",
869
+ "additionalProperties": {
870
+ "oneOf": [
871
+ {
872
+ "type": "boolean"
873
+ },
874
+ {
875
+ "type": "string",
876
+ "pattern": "(\\d+\\.){2}\\d+"
877
+ }
878
+ ]
879
+ }
880
+ },
881
+ "adjustModSettings": {
882
+ "description": "List of settings to adjust before launching",
883
+ "type": "array",
884
+ "items": {
885
+ "type": "object",
886
+ "defaultSnippets": [
887
+ {
888
+ "label": "setting",
889
+ "body": {
890
+ "scope": "${1|startup,runtime-global,runtime-per-player|}",
891
+ "name": "$2",
892
+ "value": "$3"
893
+ }
894
+ }
895
+ ],
896
+ "required": [
897
+ "scope",
898
+ "name"
899
+ ],
900
+ "properties": {
901
+ "scope": {
902
+ "enum": [
903
+ "startup",
904
+ "runtime-global",
905
+ "runtime-per-player"
906
+ ],
907
+ "description": "The scope of the setting to adjust"
908
+ },
909
+ "name": {
910
+ "type": "string",
911
+ "description": "The prototype name of the setting to adjust"
912
+ },
913
+ "value": {
914
+ "description": "New value for setting, omit to clear setting",
915
+ "type": [
916
+ "boolean",
917
+ "number",
918
+ "string"
919
+ ]
920
+ }
921
+ }
922
+ }
923
+ },
924
+ "disableExtraMods": {
925
+ "description": "Disable any mods not named in `adjustMods`",
926
+ "type": "boolean"
927
+ },
928
+ "allowDisableBaseMod": {
929
+ "description": "Allow disabling the base mod. This is normally prevented, as it usually leaves the game in an unusable state.",
930
+ "type": "boolean"
931
+ },
932
+ "hookSettings": {
933
+ "type": "boolean",
934
+ "description": "Hook Settings Stage for stepping/debug",
935
+ "default": false
936
+ },
937
+ "hookData": {
938
+ "type": "boolean",
939
+ "description": "Hook Data Stage for stepping/debug",
940
+ "default": false
941
+ },
942
+ "hookControl": {
943
+ "type": [
944
+ "array",
945
+ "boolean"
946
+ ],
947
+ "description": "List of mods to hook in Control Stage, or bool to (un)hook all. Use `level` for scenario/campaign scripts.",
948
+ "items": {
949
+ "type": "string"
950
+ },
951
+ "default": true
952
+ },
953
+ "hookMode": {
954
+ "enum": [
955
+ "debug",
956
+ "profile"
957
+ ],
958
+ "default": "debug",
959
+ "description": "Select hook to install. Default is `debug` for stepping. Select `profile` for live profiling."
960
+ },
961
+ "hookLog": {
962
+ "type": "boolean",
963
+ "description": "Hook `log()` and convert to Output events",
964
+ "default": true
965
+ },
966
+ "keepOldLog": {
967
+ "type": "boolean",
968
+ "description": "When hooking `log()`, also call original `log()`",
969
+ "default": false
970
+ },
971
+ "runningBreak": {
972
+ "type": "integer",
973
+ "description": "Frequency of `running` break event, in line hook hits. Lower value is higher performance overhead. Lower value is shorter latency on Pause command.",
974
+ "default": 5000,
975
+ "minimum": 1
976
+ },
977
+ "runningTimeout": {
978
+ "type": "integer",
979
+ "description": "Timeout in ms for eval and variables requests while running",
980
+ "default": 2000,
981
+ "minimum": 1000
982
+ },
983
+ "profileSlowStart": {
984
+ "type": "integer",
985
+ "description": "Number of events to dump profilers after every Lua stack at startup (to allow for saving for migration). Use this if you're trying to profile migrations or other early load behavior.",
986
+ "default": 0,
987
+ "minimum": 0
988
+ },
989
+ "profileUpdateRate": {
990
+ "type": "integer",
991
+ "description": "Number of Lua stacks to accumulate (per mod) after slow-start before dumping. Lower value will update faster but run slower.",
992
+ "default": 500,
993
+ "minimum": 1
994
+ },
995
+ "profileLines": {
996
+ "type": "boolean",
997
+ "description": "Track and display execution time per-line. This greatly increases the noise/overhead in the measurments.",
998
+ "default": true
999
+ },
1000
+ "profileFuncs": {
1001
+ "type": "boolean",
1002
+ "description": "Track and display execution time per-function.",
1003
+ "default": true
1004
+ },
1005
+ "profileTree": {
1006
+ "type": "boolean",
1007
+ "description": "Track and display execution time on a call tree.",
1008
+ "default": true
1009
+ }
1010
+ }
1011
+ }
1012
+ },
1013
+ "initialConfigurations": [
1014
+ {
1015
+ "type": "factoriomod",
1016
+ "request": "launch",
1017
+ "name": "Factorio Mod Debug"
1018
+ },
1019
+ {
1020
+ "type": "factoriomod",
1021
+ "request": "launch",
1022
+ "name": "Factorio Mod Debug (Settings & Data)",
1023
+ "hookSettings": true,
1024
+ "hookData": true
1025
+ },
1026
+ {
1027
+ "type": "factoriomod",
1028
+ "request": "launch",
1029
+ "name": "Factorio Mod Debug (Profile)",
1030
+ "hookMode": "profile"
1031
+ }
1032
+ ],
1033
+ "configurationSnippets": [
1034
+ {
1035
+ "label": "Factorio Mod Debug: Debug",
1036
+ "description": "A new configuration for debugging Factorio mods.",
1037
+ "body": {
1038
+ "type": "factoriomod",
1039
+ "request": "launch",
1040
+ "name": "Factorio Mod Debug"
1041
+ }
1042
+ },
1043
+ {
1044
+ "label": "Factorio Mod Debug: Debug (Settings & Data)",
1045
+ "description": "A new configuration for debugging Factorio mods in Settings & Data stages.",
1046
+ "body": {
1047
+ "type": "factoriomod",
1048
+ "request": "launch",
1049
+ "name": "Factorio Mod Debug",
1050
+ "hookSettings": true,
1051
+ "hookData": true
1052
+ }
1053
+ },
1054
+ {
1055
+ "label": "Factorio Mod Debug: Profile",
1056
+ "description": "A new configuration for profiling Factorio mods.",
1057
+ "body": {
1058
+ "type": "factoriomod",
1059
+ "request": "launch",
1060
+ "name": "Factorio Mod Debug (Profile)",
1061
+ "hookMode": "profile"
1062
+ }
1063
+ }
1064
+ ]
1065
+ }
1066
+ ]
1067
+ }
1068
+ }