factoriomod-debug 2.0.14 → 2.1.2

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "factoriomod-debug",
3
3
  "displayName": "Factorio Modding Tool Kit",
4
- "version": "2.0.14",
4
+ "version": "2.1.2",
5
5
  "publisher": "justarandomgeek",
6
6
  "description": "Debug Tools for developing Factorio Mods",
7
7
  "author": {
@@ -47,14 +47,14 @@
47
47
  "@inquirer/input": "^5.0.13",
48
48
  "@inquirer/password": "^5.0.13",
49
49
  "@stylistic/eslint-plugin": "^5.10.0",
50
- "@types/archiver": "^7.0.0",
50
+ "@types/archiver": "^8.0.0",
51
51
  "@types/buffers": "^0.1.34",
52
52
  "@types/d3": "^7.4.3",
53
53
  "@types/dateformat": "^5.0.3",
54
54
  "@types/ini": "^4.1.1",
55
- "@types/inquirer": "^9.0.9",
55
+ "@types/inquirer": "^9.0.10",
56
56
  "@types/mute-stream": "^0.0.4",
57
- "@types/node": "^25.6.2",
57
+ "@types/node": "^26.0.0",
58
58
  "@types/readdir-glob": "^1.1.5",
59
59
  "@types/request": "^2.48.13",
60
60
  "@types/semver": "^7.7.1",
@@ -63,20 +63,20 @@
63
63
  "@vscode/codicons": "^0.0.45",
64
64
  "@vscode/debugadapter": "^1.68.0",
65
65
  "@vscode/debugadapter-testsupport": "^1.68.0",
66
- "@vscode/vsce": "^3.9.1",
66
+ "@vscode/vsce": "^3.9.2",
67
67
  "@vscode/webview-ui-toolkit": "^1.4.0",
68
68
  "archiver": "^8.0.0",
69
69
  "c8": "^11.0.0",
70
- "commander": "^14.0.3",
70
+ "commander": "^15.0.0",
71
71
  "d3": "^7.9.0",
72
72
  "d3-flame-graph": "^5.0.0",
73
73
  "dateformat": "^5.0.3",
74
74
  "dotize": "^0.6.0",
75
- "esbuild": "^0.28.0",
75
+ "esbuild": "^0.28.1",
76
76
  "esbuild-compress": "^2.2.0",
77
77
  "esbuild-plugin-import-glob": "^0.1.1",
78
78
  "esbuild-visualizer": "^0.7.0",
79
- "eslint": "^10.3.0",
79
+ "eslint": "^10.5.0",
80
80
  "globals": "^17.6.0",
81
81
  "ini": "^6.0.0",
82
82
  "jsonc-parser": "^3.3.1",
@@ -85,19 +85,16 @@
85
85
  "readdir-glob": "^3.0.0",
86
86
  "remark": "^15.0.1",
87
87
  "rimraf": "^6.1.3",
88
- "semver": "^7.8.0",
88
+ "semver": "^7.8.5",
89
89
  "tree-kill": "^1.2.2",
90
90
  "typescript": "^6.0.3",
91
- "typescript-eslint": "^8.59.3",
92
- "vscode-languageclient": "^9.0.1",
93
- "vscode-languageserver": "^9.0.1",
91
+ "typescript-eslint": "^8.61.1",
92
+ "vscode-languageclient": "^10.0.0",
93
+ "vscode-languageserver": "^10.0.0",
94
94
  "vscode-languageserver-textdocument": "^1.0.12",
95
95
  "vscode-uri": "^3.1.0",
96
96
  "yoctocolors": "^2.1.2"
97
97
  },
98
- "extensionDependencies": [
99
- "sumneko.lua"
100
- ],
101
98
  "type": "module",
102
99
  "main": "dist/fmtk-vscode.js",
103
100
  "bin": {
@@ -114,26 +111,6 @@
114
111
  "workspaceContains:**/mod-settings.dat"
115
112
  ],
116
113
  "contributes": {
117
- "colors": [
118
- {
119
- "id": "factorio.ProfileTimerForeground",
120
- "description": "Color for line timer text when running Factorio Mod profiler",
121
- "defaults": {
122
- "dark": "#ffffff",
123
- "highContrast": "#ffffff",
124
- "light": "#000000"
125
- }
126
- },
127
- {
128
- "id": "factorio.ProfileFunctionTimerForeground",
129
- "description": "Color for function timer text when running Factorio Mod profiler",
130
- "defaults": {
131
- "dark": "#ffffff66",
132
- "highContrast": "#ffffff",
133
- "light": "#000000"
134
- }
135
- }
136
- ],
137
114
  "configuration": [
138
115
  {
139
116
  "title": "Factorio",
@@ -184,101 +161,6 @@
184
161
  ],
185
162
  "default": "inside"
186
163
  },
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
164
  "factorio.versions": {
283
165
  "type": "array",
284
166
  "description": "Factorio installations configured for use with debugging and profiling.",
@@ -367,9 +249,12 @@
367
249
  "default": "latest"
368
250
  },
369
251
  "factorio.workspace.manageLibraryDataLinks": {
370
- "type": "boolean",
371
- "default": false,
372
- "description": "Automatically manage /data link in `\"Lua.workspace.library\"`. Setting to false will remove the link if present."
252
+ "type": [
253
+ "boolean",
254
+ "null"
255
+ ],
256
+ "default": null,
257
+ "description": "Automatically manage /data link in `\"Lua.workspace.library\"`. Setting to false will remove the link if present. Default off for LuaLS, on for EmmyLua."
373
258
  },
374
259
  "factorio.debug.env": {
375
260
  "type": "object",
@@ -378,16 +263,11 @@
378
263
  "type": "string"
379
264
  }
380
265
  },
381
- "factorio.debug.runMode": {
382
- "description": "Run mode for Debug Adapter",
383
- "default": "inline",
384
- "enum": [
385
- "inline",
386
- "external"
387
- ],
388
- "enumDescriptions": [
389
- "Run inside extension, communicate directly",
390
- "Run in an external process, communicate via stdio"
266
+ "factorio.debug.shim": {
267
+ "description": "debug shim to launch instead of native DAP",
268
+ "type": "string",
269
+ "examples": [
270
+ "vsjitdebugger.exe"
391
271
  ]
392
272
  },
393
273
  "factorio.tasks.execArgvOptions": {
@@ -542,6 +422,20 @@
542
422
  "command": "factorio.disableMouseAutoCapture",
543
423
  "category": "Factorio",
544
424
  "title": "Disable Mouse Auto Capture"
425
+ },
426
+ {
427
+ "command": "factorio.startProfile",
428
+ "category": "Factorio",
429
+ "title": "Start Profile",
430
+ "icon": "$(record)",
431
+ "enablement": "!factorio.debugProfileStarting"
432
+ },
433
+ {
434
+ "command": "factorio.stopProfile",
435
+ "category": "Factorio",
436
+ "title": "Stop Profile",
437
+ "icon": "$(stop-circle)",
438
+ "enablement": "!factorio.debugProfileStopping"
545
439
  }
546
440
  ],
547
441
  "views": {
@@ -651,6 +545,18 @@
651
545
  "when": "view == factoriomods && viewItem =~ /latest/",
652
546
  "group": "inline@6"
653
547
  }
548
+ ],
549
+ "debug/toolBar": [
550
+ {
551
+ "command": "factorio.startProfile",
552
+ "group": "navigation",
553
+ "when": "debugType == 'factorio' && !factorio.debugProfileIsRunning"
554
+ },
555
+ {
556
+ "command": "factorio.stopProfile",
557
+ "group": "navigation",
558
+ "when": "debugType == 'factorio' && factorio.debugProfileIsRunning"
559
+ }
654
560
  ]
655
561
  },
656
562
  "languages": [
@@ -791,49 +697,21 @@
791
697
  ],
792
698
  "debuggers": [
793
699
  {
794
- "type": "factoriomod",
795
- "label": "Factorio Mod Debug",
796
- "program": "./dist/fmtk-cli.js",
700
+ "type": "factorio",
701
+ "label": "Factorio Debug Adapter Adapter",
702
+ "program": "factorio",
797
703
  "args": [
798
- "debug"
704
+ "--dap"
799
705
  ],
800
- "runtime": "node",
801
706
  "languages": [
802
- "lua",
803
- "typescript"
707
+ "lua"
804
708
  ],
805
709
  "configurationAttributes": {
806
710
  "launch": {
807
711
  "properties": {
808
- "trace": {
809
- "type": "boolean",
810
- "description": "Enable logging of the Debug Adapter Protocol.",
811
- "default": false,
812
- "examples": [
813
- true
814
- ]
815
- },
816
712
  "tags": {
817
713
  "type": "object",
818
- "description": "Extra debug session tags, readable under `__DebugAdapter.tags` during this session."
819
- },
820
- "modsPath": {
821
- "type": "string",
822
- "description": "Absolute path to Factorio mods directory."
823
- },
824
- "manageMod": {
825
- "type": "boolean",
826
- "description": "Enable automatic management of the debugadapter mod",
827
- "default": true
828
- },
829
- "useInstrumentMode": {
830
- "type": "boolean",
831
- "description": "Use Instrument Mode to hook all mods. Requires Factorio >= 0.18.10",
832
- "default": true
833
- },
834
- "checkPrototypes": {
835
- "type": "boolean",
836
- "description": "Add --check-unused-prototype-data to factorioArgs."
714
+ "description": "Extra debug session tags, readable under `debugadapter.tags` during this session."
837
715
  },
838
716
  "factorioArgs": {
839
717
  "type": "array",
@@ -847,211 +725,34 @@
847
725
  "default": [],
848
726
  "description": "Extra command line arguments to pass to Factorio"
849
727
  },
850
- "env": {
851
- "type": "object",
852
- "description": "Environment variables to pass to Factorio",
853
- "additionalProperties": {
854
- "type": "string"
855
- }
856
- },
857
- "adjustMods": {
858
- "description": "Dictionary of modname -> true or version string to enable, false to disable",
859
- "additionalProperties": {
860
- "oneOf": [
861
- {
862
- "type": "boolean"
863
- },
864
- {
865
- "type": "string",
866
- "pattern": "(\\d+\\.){2}\\d+"
867
- }
868
- ]
869
- }
870
- },
871
- "adjustModSettings": {
872
- "description": "List of settings to adjust before launching",
873
- "type": "array",
874
- "items": {
875
- "type": "object",
876
- "defaultSnippets": [
877
- {
878
- "label": "setting",
879
- "body": {
880
- "scope": "${1|startup,runtime-global,runtime-per-player|}",
881
- "name": "$2",
882
- "value": "$3"
883
- }
884
- }
885
- ],
886
- "required": [
887
- "scope",
888
- "name"
889
- ],
890
- "properties": {
891
- "scope": {
892
- "enum": [
893
- "startup",
894
- "runtime-global",
895
- "runtime-per-player"
896
- ],
897
- "description": "The scope of the setting to adjust"
898
- },
899
- "name": {
900
- "type": "string",
901
- "description": "The prototype name of the setting to adjust"
902
- },
903
- "value": {
904
- "description": "New value for setting, omit to clear setting",
905
- "type": [
906
- "boolean",
907
- "number",
908
- "string"
909
- ]
910
- }
911
- }
912
- }
913
- },
914
- "disableExtraMods": {
915
- "description": "Disable any mods not named in `adjustMods`",
916
- "type": "boolean"
917
- },
918
- "allowDisableBaseMod": {
919
- "description": "Allow disabling the base mod. This is normally prevented, as it usually leaves the game in an unusable state.",
920
- "type": "boolean"
921
- },
922
- "hookSettings": {
923
- "type": "boolean",
924
- "description": "Hook Settings Stage for stepping/debug",
925
- "default": false
926
- },
927
- "hookData": {
728
+ "followSymlinks": {
928
729
  "type": "boolean",
929
- "description": "Hook Data Stage for stepping/debug",
930
- "default": false
931
- },
932
- "hookControl": {
933
- "type": [
934
- "array",
935
- "boolean"
936
- ],
937
- "description": "List of mods to hook in Control Stage, or bool to (un)hook all. Use `level` for scenario/campaign scripts.",
938
- "items": {
939
- "type": "string"
940
- },
941
- "default": true
942
- },
943
- "hookMode": {
944
- "enum": [
945
- "debug",
946
- "profile"
947
- ],
948
- "default": "debug",
949
- "description": "Select hook to install. Default is `debug` for stepping. Select `profile` for live profiling."
950
- },
951
- "hookLog": {
952
- "type": "boolean",
953
- "description": "Hook `log()` and convert to Output events",
954
- "default": true
955
- },
956
- "keepOldLog": {
957
- "type": "boolean",
958
- "description": "When hooking `log()`, also call original `log()`",
959
- "default": false
960
- },
961
- "runningBreak": {
962
- "type": "integer",
963
- "description": "Frequency of `running` break event, in line hook hits. Lower value is higher performance overhead. Lower value is shorter latency on Pause command.",
964
- "default": 5000,
965
- "minimum": 1
966
- },
967
- "runningTimeout": {
968
- "type": "integer",
969
- "description": "Timeout in ms for eval and variables requests while running",
970
- "default": 2000,
971
- "minimum": 1000
972
- },
973
- "profileSlowStart": {
974
- "type": "integer",
975
- "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.",
976
- "default": 0,
977
- "minimum": 0
978
- },
979
- "profileUpdateRate": {
980
- "type": "integer",
981
- "description": "Number of Lua stacks to accumulate (per mod) after slow-start before dumping. Lower value will update faster but run slower.",
982
- "default": 500,
983
- "minimum": 1
984
- },
985
- "profileLines": {
986
- "type": "boolean",
987
- "description": "Track and display execution time per-line. This greatly increases the noise/overhead in the measurments.",
988
- "default": true
989
- },
990
- "profileFuncs": {
991
- "type": "boolean",
992
- "description": "Track and display execution time per-function.",
993
- "default": true
994
- },
995
- "profileTree": {
996
- "type": "boolean",
997
- "description": "Track and display execution time on a call tree.",
998
- "default": true
730
+ "default": true,
731
+ "description": "Follow symlinks when emitting source locations"
999
732
  }
1000
733
  }
1001
734
  }
1002
735
  },
1003
736
  "initialConfigurations": [
1004
737
  {
1005
- "type": "factoriomod",
738
+ "type": "factorio",
1006
739
  "request": "launch",
1007
- "name": "Factorio Mod Debug"
1008
- },
1009
- {
1010
- "type": "factoriomod",
1011
- "request": "launch",
1012
- "name": "Factorio Mod Debug (Settings & Data)",
1013
- "hookSettings": true,
1014
- "hookData": true
1015
- },
1016
- {
1017
- "type": "factoriomod",
1018
- "request": "launch",
1019
- "name": "Factorio Mod Debug (Profile)",
1020
- "hookMode": "profile"
740
+ "name": "Factorio Debug Adapter"
1021
741
  }
1022
742
  ],
1023
743
  "configurationSnippets": [
1024
744
  {
1025
- "label": "Factorio Mod Debug: Debug",
1026
- "description": "A new configuration for debugging Factorio mods.",
1027
- "body": {
1028
- "type": "factoriomod",
1029
- "request": "launch",
1030
- "name": "Factorio Mod Debug"
1031
- }
1032
- },
1033
- {
1034
- "label": "Factorio Mod Debug: Debug (Settings & Data)",
1035
- "description": "A new configuration for debugging Factorio mods in Settings & Data stages.",
1036
- "body": {
1037
- "type": "factoriomod",
1038
- "request": "launch",
1039
- "name": "Factorio Mod Debug",
1040
- "hookSettings": true,
1041
- "hookData": true
1042
- }
1043
- },
1044
- {
1045
- "label": "Factorio Mod Debug: Profile",
1046
- "description": "A new configuration for profiling Factorio mods.",
1047
- "body": {
1048
- "type": "factoriomod",
1049
- "request": "launch",
1050
- "name": "Factorio Mod Debug (Profile)",
1051
- "hookMode": "profile"
1052
- }
745
+ "type": "factorio",
746
+ "request": "launch",
747
+ "name": "Factorio Debug Adapter",
748
+ "factorioArgs": [],
749
+ "tags": {}
1053
750
  }
1054
751
  ]
752
+ },
753
+ {
754
+ "type": "factoriomod",
755
+ "deprecated": "Please upgrade to `factorio` launch type"
1055
756
  }
1056
757
  ],
1057
758
  "customEditors": [
package/readme.md CHANGED
@@ -2,11 +2,10 @@
2
2
 
3
3
  A collection of tools for developing Factorio mods. This package is both [an npm package](https://www.npmjs.com/package/factoriomod-debug) providing the command line tool `fmtk`, and a [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=justarandomgeek.factoriomod-debug) providing additional editor integration.
4
4
 
5
- * [Debug Adapter](doc/debugadapter.md)
6
- * [Mod Profiling](doc/profile.md)
5
+ * Debug Adapter - This extension uses Factorio's native [LuaDebugAdapter](https://lua-api.factorio.com/latest/classes/LuaDebugAdapter.html) support to enable debugging and profiling of mods
7
6
  * [JSON Validation](doc/language-json.md)
8
7
  * [Language Support for Locale and Changelog files](doc/language.md)
9
- * [Language Server integration for Lua](doc/language-lua.md) via [sumneko.lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
8
+ * [Language Server integration for Lua](doc/language-lua.md) via [sumneko.lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) or [tangzx.emmylua](https://marketplace.visualstudio.com/items?itemName=tangzx.emmylua), [xuhuanzy.emmylua-luals](https://open-vsx.org/extension/xuhuanzy/emmylua-luals), [theo.emmylua](https://open-vsx.org/extension/theo/emmylua)
10
9
  * [Packaging and Publishing](doc/package.md)
11
10
 
12
11
  * [Getting LSP on text editors other than vscode](doc/lsptutorial.md)
@@ -51,7 +51,7 @@
51
51
  "title": "Mods this mod depends on or are incompatible with",
52
52
  "items": {
53
53
  "type":"string",
54
- "pattern": "^(([!?~]|\\(\\?\\)) *)?([a-zA-Z0-9_ -]+)( *([<>=]=?) *((\\d+\\.){1,2}\\d+))?$",
54
+ "pattern": "^(([!?~+]|\\(\\?\\)) *)?([a-zA-Z0-9_ -]+)( *([<>]=?|=) *((\\d+\\.){1,2}\\d+))?$",
55
55
  "defaultSnippets": [
56
56
  {
57
57
  "label": "simple",
@@ -69,6 +69,10 @@
69
69
  "label": "optional",
70
70
  "body": "? ${1:modname}"
71
71
  },
72
+ {
73
+ "label": "recommended",
74
+ "body": "+ ${1:modname}"
75
+ },
72
76
  {
73
77
  "label": "hidden",
74
78
  "body": "(?) ${1:modname}"
@@ -19,13 +19,13 @@
19
19
  "description": "$3",
20
20
  "version": "${4:0.0.0}",
21
21
  "author": "$5",
22
- "factorio_version": "2.0"
22
+ "factorio_version": "2.1"
23
23
  }
24
24
  }
25
25
  ],
26
26
  "properties": {
27
27
  "factorio_version": {
28
- "default": "2.0"
28
+ "default": "2.1"
29
29
  },
30
30
  "package": {
31
31
  "type":"object",
@@ -1,2 +0,0 @@
1
- .d3-flame-graph rect{stroke:#eee;fill-opacity:.8}.d3-flame-graph rect:hover{stroke:#474747;stroke-width:.5;cursor:pointer}.d3-flame-graph-label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;font-family:Verdana;margin-left:4px;margin-right:4px;line-height:1.5;padding:0;font-weight:400;color:#000;text-align:left}.d3-flame-graph .fade{opacity:.6!important}.d3-flame-graph .title{font-size:20px;font-family:Verdana}.d3-flame-graph-tip{background-color:#000;border:none;border-radius:3px;padding:5px 10px;min-width:250px;text-align:left;color:#fff;z-index:10}
2
- /*# sourceMappingURL=Flamegraph.css.map */