@sf-kmods/kdataforgejs-cli 2026.4.19 → 2026.4.23

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.
Files changed (38) hide show
  1. package/README.md +29 -2
  2. package/dist/cli.js +35 -2
  3. package/dist/commands/add.js +148 -0
  4. package/dist/commands/dev.js +114 -0
  5. package/dist/commands/doctor.js +56 -0
  6. package/dist/commands/gameData.js +165 -6
  7. package/dist/commands/sync.js +12 -3
  8. package/dist/types/configTypes.js +74 -0
  9. package/dist/types/contentTypes.js +152 -0
  10. package/dist/types/organize.js +4 -2
  11. package/package.json +4 -2
  12. package/schemas/actor-selector.schema.yml +39 -0
  13. package/schemas/asset.schema.yml +27 -0
  14. package/schemas/building.schema.yml +16 -0
  15. package/schemas/category_reorder.schema.yml +41 -0
  16. package/schemas/cdo.schema.yml +92 -0
  17. package/schemas/class.schema.yml +27 -0
  18. package/schemas/common.schema.yml +543 -0
  19. package/schemas/config.schema.yml +208 -0
  20. package/schemas/curve.schema.yml +59 -0
  21. package/schemas/dataasset.schema.yml +33 -0
  22. package/schemas/eventrule.schema.yml +47 -0
  23. package/schemas/gametag.schema.yml +24 -0
  24. package/schemas/item.schema.yml +16 -0
  25. package/schemas/localization.schema.yml +27 -0
  26. package/schemas/mam.schema.yml +5 -0
  27. package/schemas/pack.schema.yml +60 -0
  28. package/schemas/recipe.schema.yml +26 -0
  29. package/schemas/research.schema.yml +76 -0
  30. package/schemas/resource.schema.yml +16 -0
  31. package/schemas/resourcenode.schema.yml +117 -0
  32. package/schemas/schematic.schema.yml +75 -0
  33. package/schemas/sinkpoints.schema.yml +29 -0
  34. package/schemas/sound.schema.yml +45 -0
  35. package/schemas/sublevel.schema.yml +16 -0
  36. package/schemas/unlock.schema.yml +21 -0
  37. package/templates/default/README.md +5 -0
  38. package/templates/default/package.json +2 -0
@@ -0,0 +1,543 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: https://raw.githubusercontent.com/Satisfactory-KMods/KDataForge-Linter/main/src/kdataforge_linter/schemas/common.schema.yml
3
+ title: KDataForge shared schema definitions
4
+ $defs:
5
+ nonEmptyString:
6
+ type: string
7
+ minLength: 1
8
+ token:
9
+ type: string
10
+ pattern: ^[A-Za-z][A-Za-z0-9_.-]*$
11
+ stringOrList:
12
+ oneOf:
13
+ - $ref: '#/$defs/nonEmptyString'
14
+ - type: array
15
+ minItems: 1
16
+ items:
17
+ $ref: '#/$defs/nonEmptyString'
18
+ # Pack configuration field id: dotted segments, expression-safe.
19
+ classExclusion:
20
+ type: string
21
+ minLength: 1
22
+ pattern: '^\s*(?:/.*|[^*?]+)$'
23
+ description: Exact class reference, or full class-path wildcard starting with /.
24
+ classExclusions:
25
+ oneOf:
26
+ - $ref: '#/$defs/classExclusion'
27
+ - type: array
28
+ minItems: 1
29
+ items:
30
+ $ref: '#/$defs/classExclusion'
31
+ configId:
32
+ type: string
33
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*$'
34
+ # Unquoted whole-scalar reference resolved before the stages run (cfg:<id>, cfg:<pack>:<id>, session:/ags:/option:<StrId>).
35
+ typedRef:
36
+ type: string
37
+ pattern: '^(?:cfg|session|ags|option):\S+$'
38
+ # FText identity forms understood by the runtime value codec.
39
+ localizedText:
40
+ oneOf:
41
+ - $ref: '#/$defs/keyedText'
42
+ - $ref: '#/$defs/stringTableText'
43
+ stringTableText:
44
+ type: object
45
+ additionalProperties: false
46
+ required: [stringTable, key]
47
+ properties:
48
+ stringTable:
49
+ $ref: '#/$defs/nonEmptyString'
50
+ key:
51
+ $ref: '#/$defs/nonEmptyString'
52
+ keyedText:
53
+ type: object
54
+ additionalProperties: false
55
+ required: [key]
56
+ properties:
57
+ key:
58
+ $ref: '#/$defs/nonEmptyString'
59
+ ns:
60
+ type: string
61
+ source:
62
+ type: string
63
+ textValue:
64
+ oneOf:
65
+ - $ref: '#/$defs/nonEmptyString'
66
+ - $ref: '#/$defs/localizedText'
67
+ configExpression:
68
+ type: string
69
+ minLength: 1
70
+ # One `where:` filter clause: a property path (may contain `[*]`) plus exactly one operator.
71
+ whereClause:
72
+ type: object
73
+ additionalProperties: false
74
+ required: [path]
75
+ properties:
76
+ path:
77
+ $ref: '#/$defs/nonEmptyString'
78
+ equals: {}
79
+ notEquals: {}
80
+ lessThan:
81
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
82
+ lessOrEqual:
83
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
84
+ greaterThan:
85
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
86
+ greaterOrEqual:
87
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
88
+ contains: {}
89
+ notContains: {}
90
+ in:
91
+ oneOf:
92
+ - $ref: '#/$defs/nonEmptyString'
93
+ - type: number
94
+ - type: boolean
95
+ - type: array
96
+ minItems: 1
97
+ notIn:
98
+ oneOf:
99
+ - $ref: '#/$defs/nonEmptyString'
100
+ - type: number
101
+ - type: boolean
102
+ - type: array
103
+ minItems: 1
104
+ matches:
105
+ $ref: '#/$defs/nonEmptyString'
106
+ isEmpty: { type: boolean }
107
+ oneOf:
108
+ - required: [equals]
109
+ - required: [notEquals]
110
+ - required: [lessThan]
111
+ - required: [lessOrEqual]
112
+ - required: [greaterThan]
113
+ - required: [greaterOrEqual]
114
+ - required: [contains]
115
+ - required: [notContains]
116
+ - required: [in]
117
+ - required: [notIn]
118
+ - required: [matches]
119
+ - required: [isEmpty]
120
+ whereMode:
121
+ type: string
122
+ pattern: '^(?:[Aa][Nn][Dd]|[Oo][Rr])$'
123
+ # The scope-filter keys every selecting document type shares (cdo patches, remove: entries,
124
+ # sublevel block: entries, sinkpoints entries). Whether ofClass is required depends on the
125
+ # document type — see scopeNeedsOfClass.
126
+ scopeFilters:
127
+ type: object
128
+ properties:
129
+ ofClass:
130
+ $ref: '#/$defs/nonEmptyString'
131
+ matchTag:
132
+ $ref: '#/$defs/stringOrList'
133
+ tagProperty:
134
+ $ref: '#/$defs/nonEmptyString'
135
+ matchAssets: { type: boolean, default: true }
136
+ classType:
137
+ type: string
138
+ enum: [any, blueprint, native]
139
+ default: any
140
+ excludeClasses:
141
+ $ref: '#/$defs/classExclusions'
142
+ matchName:
143
+ $ref: '#/$defs/stringOrList'
144
+ producedIn:
145
+ $ref: '#/$defs/stringOrList'
146
+ ingredient:
147
+ $ref: '#/$defs/stringOrList'
148
+ product:
149
+ $ref: '#/$defs/stringOrList'
150
+ where:
151
+ oneOf:
152
+ - $ref: '#/$defs/whereClause'
153
+ - type: array
154
+ minItems: 1
155
+ items:
156
+ $ref: '#/$defs/whereClause'
157
+ whereMode:
158
+ $ref: '#/$defs/whereMode'
159
+ dependentRequired:
160
+ whereMode: [where]
161
+ # CDO patches may use a recipe shortcut instead of an explicit ofClass scope.
162
+ # Other removal/filter entries default their own scope.
163
+ scopeNeedsOfClass:
164
+ if:
165
+ anyOf:
166
+ - required: [matchTag]
167
+ - required: [matchName]
168
+ - required: [where]
169
+ - required: [classType]
170
+ - required: [excludeClasses]
171
+ then:
172
+ anyOf:
173
+ - required: [ofClass]
174
+ - required: [producedIn]
175
+ - required: [ingredient]
176
+ - required: [product]
177
+ hasScopeFilter:
178
+ anyOf:
179
+ - required: [matchTag]
180
+ - required: [matchName]
181
+ - required: [where]
182
+ - required: [producedIn]
183
+ - required: [ingredient]
184
+ - required: [product]
185
+ - required: [classType]
186
+ - required: [excludeClasses]
187
+ sublevelScopeNeedsOfClass:
188
+ if:
189
+ $ref: '#/$defs/hasScopeFilter'
190
+ then:
191
+ required: [ofClass]
192
+ # `remove:` entry of recipe / schematic / research documents: one class reference, or a filter
193
+ # map selecting every class of the type that passes.
194
+ contentRemoval:
195
+ type: array
196
+ minItems: 1
197
+ items:
198
+ oneOf:
199
+ - $ref: '#/$defs/nonEmptyString'
200
+ - allOf:
201
+ - $ref: '#/$defs/scopeFilters'
202
+ - $ref: '#/$defs/hasScopeFilter'
203
+ unevaluatedProperties: false
204
+ schemaReference:
205
+ $ref: '#/$defs/nonEmptyString'
206
+ conditionBehavior:
207
+ type: string
208
+ pattern: '^(?:[Aa][Nn][Dd]|[Oo][Rr])$'
209
+ conditionObject:
210
+ type: object
211
+ additionalProperties: false
212
+ properties:
213
+ gameVersion:
214
+ $ref: '#/$defs/nonEmptyString'
215
+ hasMod:
216
+ $ref: '#/$defs/stringOrList'
217
+ modVersion:
218
+ type: object
219
+ minProperties: 1
220
+ additionalProperties:
221
+ $ref: '#/$defs/nonEmptyString'
222
+ hasClass:
223
+ $ref: '#/$defs/stringOrList'
224
+ # Pack configuration expression(s); a list is AND-combined. Parsed by the semantic rules.
225
+ config:
226
+ oneOf:
227
+ - $ref: '#/$defs/configExpression'
228
+ - type: array
229
+ minItems: 1
230
+ items:
231
+ $ref: '#/$defs/configExpression'
232
+ ifNotMatch:
233
+ type: boolean
234
+ default: false
235
+ conditions:
236
+ if:
237
+ type: array
238
+ then:
239
+ items:
240
+ $ref: '#/$defs/conditionObject'
241
+ else:
242
+ $ref: '#/$defs/conditionObject'
243
+ # Condition keys lifted from a list element (element-level conditions) before kind schema validation.
244
+ conditionHolder:
245
+ type: object
246
+ additionalProperties: false
247
+ properties:
248
+ conditions:
249
+ $ref: '#/$defs/conditions'
250
+ conditionBehaivor:
251
+ $ref: '#/$defs/conditionBehavior'
252
+ conditionBehavior:
253
+ $ref: '#/$defs/conditionBehavior'
254
+ documentBase:
255
+ type: object
256
+ properties:
257
+ $schema:
258
+ $ref: '#/$defs/schemaReference'
259
+ type:
260
+ $ref: '#/$defs/nonEmptyString'
261
+ debug:
262
+ type: boolean
263
+ conditionBehaivor:
264
+ $ref: '#/$defs/conditionBehavior'
265
+ conditionBehavior:
266
+ $ref: '#/$defs/conditionBehavior'
267
+ conditions:
268
+ $ref: '#/$defs/conditions'
269
+ include:
270
+ $ref: '#/$defs/stringOrList'
271
+ propertyPath:
272
+ type: string
273
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*|\[(?:[^\[\]"''*]+|\*|"(?:\\.|[^"\\])*"|''(?:\\.|[^''\\])*'')\])*$'
274
+ operation:
275
+ type: object
276
+ additionalProperties: false
277
+ required: [path]
278
+ properties:
279
+ path:
280
+ description: Concrete property path, or quoted '@tagContainers' for every top-level gameplay tag container.
281
+ oneOf:
282
+ - $ref: '#/$defs/propertyPath'
283
+ - const: '@tagContainers'
284
+ op:
285
+ enum:
286
+ - add
287
+ - append
288
+ - append_unique
289
+ - clamp
290
+ - clear
291
+ - copy
292
+ - divide
293
+ - duplicate
294
+ - insert
295
+ - max
296
+ - min
297
+ - move
298
+ - multiply
299
+ - prepend
300
+ - remove
301
+ - remove_at
302
+ - replace_refs
303
+ - replace
304
+ - reverse
305
+ - set
306
+ - sort
307
+ - subtract
308
+ - swap
309
+ - unique
310
+ - update_where
311
+ value: {}
312
+ where:
313
+ oneOf:
314
+ - $ref: '#/$defs/whereClause'
315
+ - type: array
316
+ minItems: 1
317
+ items:
318
+ $ref: '#/$defs/whereClause'
319
+ whereMode:
320
+ $ref: '#/$defs/whereMode'
321
+ min:
322
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
323
+ max:
324
+ anyOf: [{ type: number }, { $ref: '#/$defs/typedRef' }]
325
+ index:
326
+ anyOf: [{ type: integer }, { $ref: '#/$defs/typedRef' }]
327
+ with:
328
+ anyOf: [{ type: integer }, { $ref: '#/$defs/typedRef' }]
329
+ from:
330
+ $ref: '#/$defs/nonEmptyString'
331
+ allOf:
332
+ - if:
333
+ properties:
334
+ path: { const: '@tagContainers' }
335
+ required: [path]
336
+ then:
337
+ properties:
338
+ op: { enum: [set, append, prepend, remove, clear] }
339
+ - if:
340
+ properties:
341
+ op: { enum: [copy, move] }
342
+ required: [op]
343
+ then:
344
+ properties:
345
+ from:
346
+ $ref: '#/$defs/propertyPath'
347
+ - if:
348
+ required: [whereMode]
349
+ then:
350
+ required: [op, where]
351
+ properties:
352
+ op: { const: update_where }
353
+ properties:
354
+ type: array
355
+ minItems: 1
356
+ items:
357
+ $ref: '#/$defs/operation'
358
+ generatedEntry:
359
+ type: object
360
+ additionalProperties: false
361
+ required: [id]
362
+ properties:
363
+ id:
364
+ $ref: '#/$defs/token'
365
+ parent:
366
+ $ref: '#/$defs/nonEmptyString'
367
+ register:
368
+ type: boolean
369
+ properties:
370
+ $ref: '#/$defs/properties'
371
+ registerableEntry:
372
+ type: object
373
+ additionalProperties: false
374
+ properties:
375
+ id:
376
+ $ref: '#/$defs/token'
377
+ class:
378
+ $ref: '#/$defs/nonEmptyString'
379
+ parent:
380
+ $ref: '#/$defs/nonEmptyString'
381
+ register:
382
+ type: boolean
383
+ properties:
384
+ $ref: '#/$defs/properties'
385
+ oneOf:
386
+ - required: [id]
387
+ not:
388
+ required: [class]
389
+ - required: [class]
390
+ not:
391
+ required: [id]
392
+ instancedObject:
393
+ type: object
394
+ additionalProperties: false
395
+ required: [class]
396
+ properties:
397
+ class:
398
+ $ref: '#/$defs/nonEmptyString'
399
+ properties:
400
+ $ref: '#/$defs/properties'
401
+ coordinate:
402
+ type: object
403
+ additionalProperties: false
404
+ required: [X, Y]
405
+ properties:
406
+ X:
407
+ type: integer
408
+ minimum: -2147483648
409
+ maximum: 2147483647
410
+ Y:
411
+ type: integer
412
+ minimum: -2147483648
413
+ maximum: 2147483647
414
+ nodeReference:
415
+ oneOf:
416
+ - $ref: '#/$defs/coordinate'
417
+ - type: object
418
+ additionalProperties: false
419
+ required: [schematic]
420
+ properties:
421
+ schematic:
422
+ $ref: '#/$defs/nonEmptyString'
423
+ road:
424
+ type: object
425
+ additionalProperties: false
426
+ required: [key, points]
427
+ properties:
428
+ key:
429
+ $ref: '#/$defs/nodeReference'
430
+ points:
431
+ type: array
432
+ minItems: 2
433
+ items:
434
+ $ref: '#/$defs/coordinate'
435
+ researchNode:
436
+ type: object
437
+ additionalProperties: false
438
+ required: [schematic]
439
+ properties:
440
+ schematic:
441
+ $ref: '#/$defs/nonEmptyString'
442
+ class:
443
+ $ref: '#/$defs/nonEmptyString'
444
+ coordinate:
445
+ $ref: '#/$defs/coordinate'
446
+ parents:
447
+ type: array
448
+ items:
449
+ $ref: '#/$defs/nodeReference'
450
+ nodesToUnhide:
451
+ type: array
452
+ items:
453
+ $ref: '#/$defs/nodeReference'
454
+ unhiddenBy:
455
+ type: array
456
+ items:
457
+ $ref: '#/$defs/nodeReference'
458
+ childrenAndRoads:
459
+ oneOf:
460
+ - $ref: '#/$defs/road'
461
+ - type: array
462
+ minItems: 1
463
+ items:
464
+ $ref: '#/$defs/road'
465
+ properties:
466
+ $ref: '#/$defs/properties'
467
+ numericScalar:
468
+ oneOf:
469
+ - type: number
470
+ - type: string
471
+ pattern: '^[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)$'
472
+ numberOrVector:
473
+ oneOf:
474
+ - $ref: '#/$defs/numericScalar'
475
+ - type: array
476
+ minItems: 3
477
+ maxItems: 3
478
+ items:
479
+ $ref: '#/$defs/numericScalar'
480
+ - type: object
481
+ additionalProperties: false
482
+ minProperties: 3
483
+ maxProperties: 3
484
+ properties:
485
+ X: { $ref: '#/$defs/numericScalar' }
486
+ x: { $ref: '#/$defs/numericScalar' }
487
+ Y: { $ref: '#/$defs/numericScalar' }
488
+ y: { $ref: '#/$defs/numericScalar' }
489
+ Z: { $ref: '#/$defs/numericScalar' }
490
+ z: { $ref: '#/$defs/numericScalar' }
491
+ allOf:
492
+ - anyOf:
493
+ - required: [X]
494
+ - required: [x]
495
+ - anyOf:
496
+ - required: [Y]
497
+ - required: [y]
498
+ - anyOf:
499
+ - required: [Z]
500
+ - required: [z]
501
+ sublevelBlockEntry:
502
+ oneOf:
503
+ - $ref: '#/$defs/nonEmptyString'
504
+ - type: object
505
+ allOf:
506
+ - $ref: '#/$defs/scopeFilters'
507
+ - $ref: '#/$defs/sublevelScopeNeedsOfClass'
508
+ properties:
509
+ target:
510
+ $ref: '#/$defs/stringOrList'
511
+ allAssetsOfClass:
512
+ $ref: '#/$defs/nonEmptyString'
513
+ anyOf:
514
+ - required: [target]
515
+ - required: [allAssetsOfClass]
516
+ - $ref: '#/$defs/hasScopeFilter'
517
+ unevaluatedProperties: false
518
+ resourceNodeType:
519
+ type: string
520
+ pattern: '^(?:EResourceNodeType::)?(?:Node|FrackingSatellite|FrackingCore|Geyser|Deposit)$'
521
+ resourceNodeRemoval:
522
+ oneOf:
523
+ - $ref: '#/$defs/nonEmptyString'
524
+ - type: object
525
+ allOf:
526
+ - $ref: '#/$defs/scopeFilters'
527
+ anyOf:
528
+ - required: [resource]
529
+ - $ref: '#/$defs/hasScopeFilter'
530
+ properties:
531
+ resource:
532
+ $ref: '#/$defs/nonEmptyString'
533
+ nodeTypes:
534
+ type: array
535
+ items:
536
+ $ref: '#/$defs/resourceNodeType'
537
+ allowOccupied:
538
+ type: boolean
539
+ default: false
540
+ removeFromScanner:
541
+ type: boolean
542
+ default: true
543
+ unevaluatedProperties: false