staticforge 0.0.0-stage → 0.1.0

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 (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -2
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/bin.d.ts +3 -0
  5. package/dist/bin.d.ts.map +1 -0
  6. package/dist/bin.js +4 -0
  7. package/dist/bin.js.map +1 -0
  8. package/dist/browser.d.ts +3 -0
  9. package/dist/browser.d.ts.map +1 -0
  10. package/dist/browser.js +18 -0
  11. package/dist/browser.js.map +1 -0
  12. package/dist/cloud.d.ts +31 -0
  13. package/dist/cloud.d.ts.map +1 -0
  14. package/dist/cloud.js +102 -0
  15. package/dist/cloud.js.map +1 -0
  16. package/dist/command.d.ts +54 -0
  17. package/dist/command.d.ts.map +1 -0
  18. package/dist/command.js +70 -0
  19. package/dist/command.js.map +1 -0
  20. package/dist/commands/build.d.ts +4 -0
  21. package/dist/commands/build.d.ts.map +1 -0
  22. package/dist/commands/build.js +54 -0
  23. package/dist/commands/build.js.map +1 -0
  24. package/dist/commands/check.d.ts +4 -0
  25. package/dist/commands/check.d.ts.map +1 -0
  26. package/dist/commands/check.js +100 -0
  27. package/dist/commands/check.js.map +1 -0
  28. package/dist/commands/config.d.ts +4 -0
  29. package/dist/commands/config.d.ts.map +1 -0
  30. package/dist/commands/config.js +27 -0
  31. package/dist/commands/config.js.map +1 -0
  32. package/dist/commands/deploy.d.ts +4 -0
  33. package/dist/commands/deploy.d.ts.map +1 -0
  34. package/dist/commands/deploy.js +184 -0
  35. package/dist/commands/deploy.js.map +1 -0
  36. package/dist/commands/dev.d.ts +4 -0
  37. package/dist/commands/dev.d.ts.map +1 -0
  38. package/dist/commands/dev.js +81 -0
  39. package/dist/commands/dev.js.map +1 -0
  40. package/dist/commands/iac.d.ts +4 -0
  41. package/dist/commands/iac.d.ts.map +1 -0
  42. package/dist/commands/iac.js +64 -0
  43. package/dist/commands/iac.js.map +1 -0
  44. package/dist/commands/init.d.ts +4 -0
  45. package/dist/commands/init.d.ts.map +1 -0
  46. package/dist/commands/init.js +55 -0
  47. package/dist/commands/init.js.map +1 -0
  48. package/dist/commands/mcp.d.ts +4 -0
  49. package/dist/commands/mcp.d.ts.map +1 -0
  50. package/dist/commands/mcp.js +46 -0
  51. package/dist/commands/mcp.js.map +1 -0
  52. package/dist/commands/new.d.ts +4 -0
  53. package/dist/commands/new.d.ts.map +1 -0
  54. package/dist/commands/new.js +30 -0
  55. package/dist/commands/new.js.map +1 -0
  56. package/dist/commands/preview.d.ts +4 -0
  57. package/dist/commands/preview.d.ts.map +1 -0
  58. package/dist/commands/preview.js +34 -0
  59. package/dist/commands/preview.js.map +1 -0
  60. package/dist/commands/provision.d.ts +11 -0
  61. package/dist/commands/provision.d.ts.map +1 -0
  62. package/dist/commands/provision.js +133 -0
  63. package/dist/commands/provision.js.map +1 -0
  64. package/dist/commands/schema.d.ts +4 -0
  65. package/dist/commands/schema.d.ts.map +1 -0
  66. package/dist/commands/schema.js +21 -0
  67. package/dist/commands/schema.js.map +1 -0
  68. package/dist/commands/version.d.ts +4 -0
  69. package/dist/commands/version.d.ts.map +1 -0
  70. package/dist/commands/version.js +17 -0
  71. package/dist/commands/version.js.map +1 -0
  72. package/dist/context.d.ts +27 -0
  73. package/dist/context.d.ts.map +1 -0
  74. package/dist/context.js +19 -0
  75. package/dist/context.js.map +1 -0
  76. package/dist/io.d.ts +19 -0
  77. package/dist/io.d.ts.map +1 -0
  78. package/dist/io.js +34 -0
  79. package/dist/io.js.map +1 -0
  80. package/dist/main.d.ts +10 -0
  81. package/dist/main.d.ts.map +1 -0
  82. package/dist/main.js +81 -0
  83. package/dist/main.js.map +1 -0
  84. package/dist/mcp/invoke.d.ts +29 -0
  85. package/dist/mcp/invoke.d.ts.map +1 -0
  86. package/dist/mcp/invoke.js +82 -0
  87. package/dist/mcp/invoke.js.map +1 -0
  88. package/dist/mcp/server.d.ts +25 -0
  89. package/dist/mcp/server.d.ts.map +1 -0
  90. package/dist/mcp/server.js +531 -0
  91. package/dist/mcp/server.js.map +1 -0
  92. package/dist/output.d.ts +17 -0
  93. package/dist/output.d.ts.map +1 -0
  94. package/dist/output.js +37 -0
  95. package/dist/output.js.map +1 -0
  96. package/dist/paths.d.ts +3 -0
  97. package/dist/paths.d.ts.map +1 -0
  98. package/dist/paths.js +9 -0
  99. package/dist/paths.js.map +1 -0
  100. package/dist/project.d.ts +10 -0
  101. package/dist/project.d.ts.map +1 -0
  102. package/dist/project.js +20 -0
  103. package/dist/project.js.map +1 -0
  104. package/dist/schemas.d.ts +16 -0
  105. package/dist/schemas.d.ts.map +1 -0
  106. package/dist/schemas.js +241 -0
  107. package/dist/schemas.js.map +1 -0
  108. package/dist/server-options.d.ts +12 -0
  109. package/dist/server-options.d.ts.map +1 -0
  110. package/dist/server-options.js +26 -0
  111. package/dist/server-options.js.map +1 -0
  112. package/dist/version.d.ts +3 -0
  113. package/dist/version.d.ts.map +1 -0
  114. package/dist/version.js +4 -0
  115. package/dist/version.js.map +1 -0
  116. package/dist/workers.d.ts +7 -0
  117. package/dist/workers.d.ts.map +1 -0
  118. package/dist/workers.js +20 -0
  119. package/dist/workers.js.map +1 -0
  120. package/package.json +64 -3
  121. package/schema/diagnostics.schema.json +183 -0
  122. package/schema/output.schema.json +1537 -0
  123. package/schema/staticforge.schema.json +649 -0
@@ -0,0 +1,1537 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:staticforge:schema:output:v1",
4
+ "title": "staticforge --json output envelope",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "command",
9
+ "ok"
10
+ ],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "const": 1
15
+ },
16
+ "command": {
17
+ "type": "string",
18
+ "description": "Command path, e.g. \"config validate\"; empty for usage errors."
19
+ },
20
+ "ok": {
21
+ "type": "boolean",
22
+ "description": "False when the command failed or found failures."
23
+ },
24
+ "data": {
25
+ "description": "Command-specific result; see the per-command rules below."
26
+ },
27
+ "error": {
28
+ "$ref": "#/$defs/error"
29
+ }
30
+ },
31
+ "allOf": [
32
+ {
33
+ "if": {
34
+ "properties": {
35
+ "command": {
36
+ "const": "init"
37
+ }
38
+ },
39
+ "required": [
40
+ "command",
41
+ "data"
42
+ ]
43
+ },
44
+ "then": {
45
+ "properties": {
46
+ "data": {
47
+ "$ref": "#/$defs/init-data"
48
+ }
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "if": {
54
+ "properties": {
55
+ "command": {
56
+ "const": "new"
57
+ }
58
+ },
59
+ "required": [
60
+ "command",
61
+ "data"
62
+ ]
63
+ },
64
+ "then": {
65
+ "properties": {
66
+ "data": {
67
+ "$ref": "#/$defs/new-data"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "if": {
74
+ "properties": {
75
+ "command": {
76
+ "const": "build"
77
+ }
78
+ },
79
+ "required": [
80
+ "command",
81
+ "data"
82
+ ]
83
+ },
84
+ "then": {
85
+ "properties": {
86
+ "data": {
87
+ "$ref": "#/$defs/build-data"
88
+ }
89
+ }
90
+ }
91
+ },
92
+ {
93
+ "if": {
94
+ "properties": {
95
+ "command": {
96
+ "const": "check"
97
+ }
98
+ },
99
+ "required": [
100
+ "command",
101
+ "data"
102
+ ]
103
+ },
104
+ "then": {
105
+ "properties": {
106
+ "data": {
107
+ "$ref": "#/$defs/check-data"
108
+ }
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "if": {
114
+ "properties": {
115
+ "command": {
116
+ "const": "dev"
117
+ }
118
+ },
119
+ "required": [
120
+ "command",
121
+ "data"
122
+ ]
123
+ },
124
+ "then": {
125
+ "properties": {
126
+ "data": {
127
+ "$ref": "#/$defs/dev-data"
128
+ }
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "if": {
134
+ "properties": {
135
+ "command": {
136
+ "const": "preview"
137
+ }
138
+ },
139
+ "required": [
140
+ "command",
141
+ "data"
142
+ ]
143
+ },
144
+ "then": {
145
+ "properties": {
146
+ "data": {
147
+ "$ref": "#/$defs/preview-data"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ {
153
+ "if": {
154
+ "properties": {
155
+ "command": {
156
+ "const": "provision"
157
+ }
158
+ },
159
+ "required": [
160
+ "command",
161
+ "data"
162
+ ]
163
+ },
164
+ "then": {
165
+ "properties": {
166
+ "data": {
167
+ "$ref": "#/$defs/provision-data"
168
+ }
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "if": {
174
+ "properties": {
175
+ "command": {
176
+ "const": "status"
177
+ }
178
+ },
179
+ "required": [
180
+ "command",
181
+ "data"
182
+ ]
183
+ },
184
+ "then": {
185
+ "properties": {
186
+ "data": {
187
+ "$ref": "#/$defs/status-data"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ {
193
+ "if": {
194
+ "properties": {
195
+ "command": {
196
+ "const": "destroy"
197
+ }
198
+ },
199
+ "required": [
200
+ "command",
201
+ "data"
202
+ ]
203
+ },
204
+ "then": {
205
+ "properties": {
206
+ "data": {
207
+ "$ref": "#/$defs/destroy-data"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "command": {
216
+ "const": "iac"
217
+ }
218
+ },
219
+ "required": [
220
+ "command",
221
+ "data"
222
+ ]
223
+ },
224
+ "then": {
225
+ "properties": {
226
+ "data": {
227
+ "$ref": "#/$defs/iac-data"
228
+ }
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "if": {
234
+ "properties": {
235
+ "command": {
236
+ "const": "deploy"
237
+ }
238
+ },
239
+ "required": [
240
+ "command",
241
+ "data"
242
+ ]
243
+ },
244
+ "then": {
245
+ "properties": {
246
+ "data": {
247
+ "$ref": "#/$defs/deploy-data"
248
+ }
249
+ }
250
+ }
251
+ },
252
+ {
253
+ "if": {
254
+ "properties": {
255
+ "command": {
256
+ "const": "versions"
257
+ }
258
+ },
259
+ "required": [
260
+ "command",
261
+ "data"
262
+ ]
263
+ },
264
+ "then": {
265
+ "properties": {
266
+ "data": {
267
+ "$ref": "#/$defs/versions-data"
268
+ }
269
+ }
270
+ }
271
+ },
272
+ {
273
+ "if": {
274
+ "properties": {
275
+ "command": {
276
+ "const": "rollback"
277
+ }
278
+ },
279
+ "required": [
280
+ "command",
281
+ "data"
282
+ ]
283
+ },
284
+ "then": {
285
+ "properties": {
286
+ "data": {
287
+ "$ref": "#/$defs/rollback-data"
288
+ }
289
+ }
290
+ }
291
+ },
292
+ {
293
+ "if": {
294
+ "properties": {
295
+ "command": {
296
+ "const": "preview-destroy"
297
+ }
298
+ },
299
+ "required": [
300
+ "command",
301
+ "data"
302
+ ]
303
+ },
304
+ "then": {
305
+ "properties": {
306
+ "data": {
307
+ "$ref": "#/$defs/preview-destroy-data"
308
+ }
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "if": {
314
+ "properties": {
315
+ "command": {
316
+ "const": "config validate"
317
+ }
318
+ },
319
+ "required": [
320
+ "command",
321
+ "data"
322
+ ]
323
+ },
324
+ "then": {
325
+ "properties": {
326
+ "data": {
327
+ "$ref": "#/$defs/config-validate-data"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "if": {
334
+ "properties": {
335
+ "command": {
336
+ "const": "config show"
337
+ }
338
+ },
339
+ "required": [
340
+ "command",
341
+ "data"
342
+ ]
343
+ },
344
+ "then": {
345
+ "properties": {
346
+ "data": {
347
+ "$ref": "#/$defs/config-show-data"
348
+ }
349
+ }
350
+ }
351
+ },
352
+ {
353
+ "if": {
354
+ "properties": {
355
+ "command": {
356
+ "const": "schema"
357
+ }
358
+ },
359
+ "required": [
360
+ "command",
361
+ "data"
362
+ ]
363
+ },
364
+ "then": {
365
+ "properties": {
366
+ "data": {
367
+ "$ref": "#/$defs/schema-data"
368
+ }
369
+ }
370
+ }
371
+ },
372
+ {
373
+ "if": {
374
+ "properties": {
375
+ "command": {
376
+ "const": "version"
377
+ }
378
+ },
379
+ "required": [
380
+ "command",
381
+ "data"
382
+ ]
383
+ },
384
+ "then": {
385
+ "properties": {
386
+ "data": {
387
+ "$ref": "#/$defs/version-data"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ ],
393
+ "$defs": {
394
+ "diagnostic": {
395
+ "type": "object",
396
+ "required": [
397
+ "ruleId",
398
+ "severity",
399
+ "message"
400
+ ],
401
+ "additionalProperties": false,
402
+ "properties": {
403
+ "ruleId": {
404
+ "type": "string",
405
+ "description": "Stable rule ID. Rules from html-validate start with \"html/\", axe-core with \"axe/\"."
406
+ },
407
+ "severity": {
408
+ "enum": [
409
+ "error",
410
+ "warning",
411
+ "info"
412
+ ]
413
+ },
414
+ "message": {
415
+ "type": "string"
416
+ },
417
+ "file": {
418
+ "type": "string",
419
+ "description": "Project-relative source file, POSIX separators."
420
+ },
421
+ "line": {
422
+ "type": "integer",
423
+ "minimum": 1
424
+ },
425
+ "column": {
426
+ "type": "integer",
427
+ "minimum": 1
428
+ },
429
+ "url": {
430
+ "type": "string",
431
+ "description": "URL of the built page, e.g. \"/about/\"."
432
+ },
433
+ "selector": {
434
+ "type": "string",
435
+ "description": "CSS selector of the element in the built page."
436
+ },
437
+ "wcag": {
438
+ "type": "string",
439
+ "pattern": "^\\d\\.\\d\\.\\d+$",
440
+ "description": "WCAG success criterion."
441
+ },
442
+ "fixable": {
443
+ "type": "boolean",
444
+ "description": "Whether `sforge check --fix` can repair it."
445
+ },
446
+ "hint": {
447
+ "type": "string"
448
+ },
449
+ "helpUrl": {
450
+ "type": "string",
451
+ "format": "uri"
452
+ }
453
+ }
454
+ },
455
+ "summary": {
456
+ "type": "object",
457
+ "required": [
458
+ "error",
459
+ "warning",
460
+ "info"
461
+ ],
462
+ "additionalProperties": false,
463
+ "properties": {
464
+ "error": {
465
+ "type": "integer",
466
+ "minimum": 0
467
+ },
468
+ "warning": {
469
+ "type": "integer",
470
+ "minimum": 0
471
+ },
472
+ "info": {
473
+ "type": "integer",
474
+ "minimum": 0
475
+ }
476
+ }
477
+ },
478
+ "error": {
479
+ "type": "object",
480
+ "required": [
481
+ "code",
482
+ "message"
483
+ ],
484
+ "additionalProperties": false,
485
+ "properties": {
486
+ "code": {
487
+ "type": "string",
488
+ "pattern": "^SF_[A-Z_]+$"
489
+ },
490
+ "message": {
491
+ "type": "string"
492
+ },
493
+ "details": {},
494
+ "hint": {
495
+ "type": "string"
496
+ }
497
+ }
498
+ },
499
+ "builtPage": {
500
+ "type": "object",
501
+ "required": [
502
+ "url",
503
+ "output",
504
+ "layout"
505
+ ],
506
+ "additionalProperties": false,
507
+ "properties": {
508
+ "url": {
509
+ "type": "string",
510
+ "description": "URL of the page, e.g. \"/about/\"."
511
+ },
512
+ "output": {
513
+ "type": "string",
514
+ "description": "Path of the HTML file relative to the output directory."
515
+ },
516
+ "layout": {
517
+ "type": "string",
518
+ "description": "Layout used, or \"document\" for HTML documents that pass through."
519
+ },
520
+ "source": {
521
+ "type": "string",
522
+ "description": "Project-relative source file; absent for generated pages."
523
+ }
524
+ }
525
+ },
526
+ "resourceChange": {
527
+ "type": "object",
528
+ "required": [
529
+ "address",
530
+ "action"
531
+ ],
532
+ "additionalProperties": false,
533
+ "properties": {
534
+ "address": {
535
+ "type": "string",
536
+ "description": "Resource address, e.g. \"module.site.aws_s3_bucket.site\"."
537
+ },
538
+ "action": {
539
+ "enum": [
540
+ "create",
541
+ "update",
542
+ "delete",
543
+ "replace",
544
+ "read",
545
+ "noop",
546
+ "move"
547
+ ]
548
+ }
549
+ }
550
+ },
551
+ "plan": {
552
+ "type": "object",
553
+ "required": [
554
+ "changes",
555
+ "add",
556
+ "change",
557
+ "remove",
558
+ "import",
559
+ "resources",
560
+ "drift"
561
+ ],
562
+ "additionalProperties": false,
563
+ "properties": {
564
+ "changes": {
565
+ "type": "boolean",
566
+ "description": "True when applying the plan would change something."
567
+ },
568
+ "add": {
569
+ "type": "integer",
570
+ "minimum": 0
571
+ },
572
+ "change": {
573
+ "type": "integer",
574
+ "minimum": 0
575
+ },
576
+ "remove": {
577
+ "type": "integer",
578
+ "minimum": 0
579
+ },
580
+ "import": {
581
+ "type": "integer",
582
+ "minimum": 0
583
+ },
584
+ "resources": {
585
+ "type": "array",
586
+ "items": {
587
+ "$ref": "#/$defs/resourceChange"
588
+ }
589
+ },
590
+ "drift": {
591
+ "type": "array",
592
+ "items": {
593
+ "$ref": "#/$defs/resourceChange"
594
+ },
595
+ "description": "Changes made outside OpenTofu/Terraform, found while refreshing."
596
+ },
597
+ "planFile": {
598
+ "type": "string",
599
+ "description": "Saved plan file."
600
+ }
601
+ }
602
+ },
603
+ "engine": {
604
+ "type": "object",
605
+ "required": [
606
+ "name",
607
+ "version"
608
+ ],
609
+ "additionalProperties": false,
610
+ "properties": {
611
+ "name": {
612
+ "enum": [
613
+ "tofu",
614
+ "terraform"
615
+ ]
616
+ },
617
+ "version": {
618
+ "type": "string"
619
+ }
620
+ }
621
+ },
622
+ "deployedVersion": {
623
+ "type": "object",
624
+ "required": [
625
+ "id",
626
+ "createdAt",
627
+ "files",
628
+ "bytes",
629
+ "active",
630
+ "preview"
631
+ ],
632
+ "additionalProperties": false,
633
+ "properties": {
634
+ "id": {
635
+ "type": "string",
636
+ "description": "Version id (`<UTC timestamp>-<git sha>`) or preview id."
637
+ },
638
+ "createdAt": {
639
+ "type": "string",
640
+ "description": "ISO 8601 time of the deploy."
641
+ },
642
+ "files": {
643
+ "type": "integer",
644
+ "minimum": 0
645
+ },
646
+ "bytes": {
647
+ "type": "integer",
648
+ "minimum": 0
649
+ },
650
+ "active": {
651
+ "type": "boolean",
652
+ "description": "True for the version production serves."
653
+ },
654
+ "preview": {
655
+ "type": "boolean"
656
+ },
657
+ "gitSha": {
658
+ "type": "string"
659
+ },
660
+ "url": {
661
+ "type": "string"
662
+ }
663
+ }
664
+ },
665
+ "init-data": {
666
+ "type": "object",
667
+ "required": [
668
+ "rootDir",
669
+ "configPath",
670
+ "created",
671
+ "skipped"
672
+ ],
673
+ "additionalProperties": false,
674
+ "properties": {
675
+ "rootDir": {
676
+ "type": "string"
677
+ },
678
+ "configPath": {
679
+ "type": "string"
680
+ },
681
+ "created": {
682
+ "type": "array",
683
+ "items": {
684
+ "type": "string"
685
+ },
686
+ "description": "Project-relative paths written."
687
+ },
688
+ "skipped": {
689
+ "type": "array",
690
+ "items": {
691
+ "type": "string"
692
+ },
693
+ "description": "Project-relative paths left alone because they existed."
694
+ }
695
+ }
696
+ },
697
+ "new-data": {
698
+ "type": "object",
699
+ "required": [
700
+ "file",
701
+ "url"
702
+ ],
703
+ "additionalProperties": false,
704
+ "properties": {
705
+ "file": {
706
+ "type": "string",
707
+ "description": "Project-relative path of the new source file."
708
+ },
709
+ "url": {
710
+ "type": "string",
711
+ "description": "URL the page will have."
712
+ }
713
+ }
714
+ },
715
+ "build-data": {
716
+ "type": "object",
717
+ "required": [
718
+ "ok",
719
+ "outDir",
720
+ "pages",
721
+ "fileCount",
722
+ "drafts",
723
+ "diagnostics",
724
+ "summary",
725
+ "durationMs"
726
+ ],
727
+ "additionalProperties": false,
728
+ "properties": {
729
+ "ok": {
730
+ "type": "boolean",
731
+ "description": "False when the build reported errors."
732
+ },
733
+ "outDir": {
734
+ "type": "string",
735
+ "description": "Absolute output directory."
736
+ },
737
+ "pages": {
738
+ "type": "array",
739
+ "items": {
740
+ "$ref": "#/$defs/builtPage"
741
+ }
742
+ },
743
+ "fileCount": {
744
+ "type": "integer",
745
+ "minimum": 0,
746
+ "description": "Files written, including pages."
747
+ },
748
+ "drafts": {
749
+ "type": "object",
750
+ "required": [
751
+ "skipped"
752
+ ],
753
+ "additionalProperties": false,
754
+ "properties": {
755
+ "skipped": {
756
+ "type": "array",
757
+ "items": {
758
+ "type": "string"
759
+ },
760
+ "description": "Draft sources left out of the build."
761
+ }
762
+ }
763
+ },
764
+ "diagnostics": {
765
+ "type": "array",
766
+ "items": {
767
+ "$ref": "#/$defs/diagnostic"
768
+ }
769
+ },
770
+ "summary": {
771
+ "$ref": "#/$defs/summary"
772
+ },
773
+ "durationMs": {
774
+ "type": "integer",
775
+ "minimum": 0
776
+ }
777
+ }
778
+ },
779
+ "check-data": {
780
+ "type": "object",
781
+ "required": [
782
+ "ok",
783
+ "failOn",
784
+ "pages",
785
+ "rendered",
786
+ "diagnostics",
787
+ "summary",
788
+ "durationMs"
789
+ ],
790
+ "additionalProperties": false,
791
+ "properties": {
792
+ "ok": {
793
+ "type": "boolean",
794
+ "description": "No diagnostics at or above failOn."
795
+ },
796
+ "failOn": {
797
+ "enum": [
798
+ "error",
799
+ "warning"
800
+ ]
801
+ },
802
+ "pages": {
803
+ "type": "integer",
804
+ "minimum": 0,
805
+ "description": "Built pages checked."
806
+ },
807
+ "rendered": {
808
+ "enum": [
809
+ "ran",
810
+ "skipped",
811
+ "off"
812
+ ],
813
+ "description": "Whether headless (axe-core) checks ran; skipped when Chromium is missing."
814
+ },
815
+ "diagnostics": {
816
+ "type": "array",
817
+ "items": {
818
+ "$ref": "#/$defs/diagnostic"
819
+ }
820
+ },
821
+ "summary": {
822
+ "type": "object",
823
+ "required": [
824
+ "error",
825
+ "warning",
826
+ "info"
827
+ ],
828
+ "additionalProperties": false,
829
+ "properties": {
830
+ "error": {
831
+ "type": "integer",
832
+ "minimum": 0
833
+ },
834
+ "warning": {
835
+ "type": "integer",
836
+ "minimum": 0
837
+ },
838
+ "info": {
839
+ "type": "integer",
840
+ "minimum": 0
841
+ }
842
+ }
843
+ },
844
+ "fixes": {
845
+ "type": "object",
846
+ "required": [
847
+ "applied",
848
+ "files",
849
+ "diff"
850
+ ],
851
+ "additionalProperties": false,
852
+ "properties": {
853
+ "applied": {
854
+ "type": "boolean",
855
+ "description": "False for --dry-run."
856
+ },
857
+ "files": {
858
+ "type": "array",
859
+ "items": {
860
+ "type": "object",
861
+ "required": [
862
+ "file",
863
+ "ruleIds",
864
+ "edits"
865
+ ],
866
+ "additionalProperties": false,
867
+ "properties": {
868
+ "file": {
869
+ "type": "string"
870
+ },
871
+ "ruleIds": {
872
+ "type": "array",
873
+ "items": {
874
+ "type": "string"
875
+ }
876
+ },
877
+ "edits": {
878
+ "type": "integer",
879
+ "minimum": 0
880
+ }
881
+ }
882
+ }
883
+ },
884
+ "diff": {
885
+ "type": "string",
886
+ "description": "Unified diff of the fixes."
887
+ }
888
+ }
889
+ },
890
+ "durationMs": {
891
+ "type": "integer",
892
+ "minimum": 0
893
+ }
894
+ }
895
+ },
896
+ "dev-data": {
897
+ "type": "object",
898
+ "required": [
899
+ "url",
900
+ "host",
901
+ "port",
902
+ "rootDir",
903
+ "build"
904
+ ],
905
+ "additionalProperties": false,
906
+ "properties": {
907
+ "url": {
908
+ "type": "string",
909
+ "description": "Where the server listens, e.g. \"http://127.0.0.1:4321/\"."
910
+ },
911
+ "host": {
912
+ "type": "string"
913
+ },
914
+ "port": {
915
+ "type": "integer",
916
+ "minimum": 0
917
+ },
918
+ "rootDir": {
919
+ "type": "string"
920
+ },
921
+ "build": {
922
+ "type": "object",
923
+ "required": [
924
+ "ok",
925
+ "diagnostics"
926
+ ],
927
+ "additionalProperties": false,
928
+ "properties": {
929
+ "ok": {
930
+ "type": "boolean"
931
+ },
932
+ "diagnostics": {
933
+ "type": "array",
934
+ "items": {
935
+ "$ref": "#/$defs/diagnostic"
936
+ },
937
+ "description": "Build diagnostics plus the static checker findings."
938
+ },
939
+ "summary": {
940
+ "$ref": "#/$defs/summary"
941
+ },
942
+ "pages": {
943
+ "type": "array",
944
+ "items": {
945
+ "$ref": "#/$defs/builtPage"
946
+ }
947
+ },
948
+ "error": {
949
+ "$ref": "#/$defs/error",
950
+ "description": "Set when the build could not run."
951
+ }
952
+ }
953
+ }
954
+ }
955
+ },
956
+ "preview-data": {
957
+ "type": "object",
958
+ "required": [
959
+ "url",
960
+ "host",
961
+ "port",
962
+ "dir"
963
+ ],
964
+ "additionalProperties": false,
965
+ "properties": {
966
+ "url": {
967
+ "type": "string",
968
+ "description": "Where the server listens, e.g. \"http://127.0.0.1:4321/\"."
969
+ },
970
+ "host": {
971
+ "type": "string"
972
+ },
973
+ "port": {
974
+ "type": "integer",
975
+ "minimum": 0
976
+ },
977
+ "dir": {
978
+ "type": "string",
979
+ "description": "The directory served."
980
+ }
981
+ }
982
+ },
983
+ "provision-data": {
984
+ "type": "object",
985
+ "required": [
986
+ "target",
987
+ "provider",
988
+ "engine",
989
+ "workspace",
990
+ "plan",
991
+ "applied",
992
+ "notices"
993
+ ],
994
+ "additionalProperties": false,
995
+ "properties": {
996
+ "target": {
997
+ "type": "string",
998
+ "description": "Target name from the config."
999
+ },
1000
+ "provider": {
1001
+ "type": "string"
1002
+ },
1003
+ "engine": {
1004
+ "$ref": "#/$defs/engine"
1005
+ },
1006
+ "workspace": {
1007
+ "type": "string",
1008
+ "description": "The generated OpenTofu/Terraform workspace."
1009
+ },
1010
+ "plan": {
1011
+ "$ref": "#/$defs/plan"
1012
+ },
1013
+ "applied": {
1014
+ "type": "boolean",
1015
+ "description": "False for --diff, when nothing changed, or when declined."
1016
+ },
1017
+ "notices": {
1018
+ "type": "array",
1019
+ "items": {
1020
+ "type": "string"
1021
+ },
1022
+ "description": "Instructions for the user, e.g. DNS records to create."
1023
+ },
1024
+ "bootstrap": {
1025
+ "type": "object",
1026
+ "required": [
1027
+ "backend",
1028
+ "description",
1029
+ "created"
1030
+ ],
1031
+ "additionalProperties": false,
1032
+ "properties": {
1033
+ "backend": {
1034
+ "type": "string"
1035
+ },
1036
+ "description": {
1037
+ "type": "string"
1038
+ },
1039
+ "created": {
1040
+ "type": "boolean"
1041
+ }
1042
+ }
1043
+ },
1044
+ "apply": {
1045
+ "type": "object",
1046
+ "required": [
1047
+ "add",
1048
+ "change",
1049
+ "remove"
1050
+ ],
1051
+ "additionalProperties": false,
1052
+ "properties": {
1053
+ "add": {
1054
+ "type": "integer",
1055
+ "minimum": 0
1056
+ },
1057
+ "change": {
1058
+ "type": "integer",
1059
+ "minimum": 0
1060
+ },
1061
+ "remove": {
1062
+ "type": "integer",
1063
+ "minimum": 0
1064
+ }
1065
+ }
1066
+ },
1067
+ "outputs": {
1068
+ "type": "object",
1069
+ "description": "Non-sensitive infrastructure outputs (OpenTofu/Terraform `output` values)."
1070
+ },
1071
+ "pending": {
1072
+ "type": "boolean",
1073
+ "description": "True when provisioning stopped after the pre-phase (--no-wait)."
1074
+ }
1075
+ }
1076
+ },
1077
+ "status-data": {
1078
+ "type": "object",
1079
+ "required": [
1080
+ "target",
1081
+ "provider",
1082
+ "engine",
1083
+ "drift",
1084
+ "drifted",
1085
+ "outputs",
1086
+ "versionId"
1087
+ ],
1088
+ "additionalProperties": false,
1089
+ "properties": {
1090
+ "target": {
1091
+ "type": "string",
1092
+ "description": "Target name from the config."
1093
+ },
1094
+ "provider": {
1095
+ "type": "string"
1096
+ },
1097
+ "engine": {
1098
+ "$ref": "#/$defs/engine"
1099
+ },
1100
+ "drift": {
1101
+ "type": "array",
1102
+ "items": {
1103
+ "$ref": "#/$defs/resourceChange"
1104
+ }
1105
+ },
1106
+ "drifted": {
1107
+ "type": "boolean"
1108
+ },
1109
+ "outputs": {
1110
+ "type": "object",
1111
+ "description": "Non-sensitive infrastructure outputs (OpenTofu/Terraform `output` values)."
1112
+ },
1113
+ "versionId": {
1114
+ "anyOf": [
1115
+ {
1116
+ "type": "string"
1117
+ },
1118
+ {
1119
+ "type": "null"
1120
+ }
1121
+ ],
1122
+ "description": "The version production serves."
1123
+ },
1124
+ "url": {
1125
+ "type": "string"
1126
+ }
1127
+ }
1128
+ },
1129
+ "destroy-data": {
1130
+ "type": "object",
1131
+ "required": [
1132
+ "target",
1133
+ "provider",
1134
+ "plan",
1135
+ "destroyed"
1136
+ ],
1137
+ "additionalProperties": false,
1138
+ "properties": {
1139
+ "target": {
1140
+ "type": "string",
1141
+ "description": "Target name from the config."
1142
+ },
1143
+ "provider": {
1144
+ "type": "string"
1145
+ },
1146
+ "plan": {
1147
+ "$ref": "#/$defs/plan"
1148
+ },
1149
+ "destroyed": {
1150
+ "type": "boolean"
1151
+ }
1152
+ }
1153
+ },
1154
+ "iac-data": {
1155
+ "oneOf": [
1156
+ {
1157
+ "type": "object",
1158
+ "required": [
1159
+ "target",
1160
+ "workspace",
1161
+ "engine"
1162
+ ],
1163
+ "additionalProperties": false,
1164
+ "properties": {
1165
+ "target": {
1166
+ "type": "string",
1167
+ "description": "Target name from the config."
1168
+ },
1169
+ "workspace": {
1170
+ "type": "string"
1171
+ },
1172
+ "engine": {
1173
+ "type": "object",
1174
+ "required": [
1175
+ "name",
1176
+ "path",
1177
+ "version",
1178
+ "source"
1179
+ ],
1180
+ "additionalProperties": false,
1181
+ "properties": {
1182
+ "name": {
1183
+ "enum": [
1184
+ "tofu",
1185
+ "terraform"
1186
+ ]
1187
+ },
1188
+ "path": {
1189
+ "type": "string"
1190
+ },
1191
+ "version": {
1192
+ "type": "string"
1193
+ },
1194
+ "source": {
1195
+ "enum": [
1196
+ "env",
1197
+ "path",
1198
+ "cache",
1199
+ "download"
1200
+ ]
1201
+ }
1202
+ }
1203
+ }
1204
+ }
1205
+ },
1206
+ {
1207
+ "type": "object",
1208
+ "required": [
1209
+ "target",
1210
+ "command",
1211
+ "exitCode",
1212
+ "workspace",
1213
+ "diagnostics"
1214
+ ],
1215
+ "additionalProperties": false,
1216
+ "properties": {
1217
+ "target": {
1218
+ "type": "string",
1219
+ "description": "Target name from the config."
1220
+ },
1221
+ "command": {
1222
+ "type": "string"
1223
+ },
1224
+ "exitCode": {
1225
+ "type": "integer"
1226
+ },
1227
+ "workspace": {
1228
+ "type": "string"
1229
+ },
1230
+ "diagnostics": {
1231
+ "type": "array",
1232
+ "items": {
1233
+ "type": "object",
1234
+ "required": [
1235
+ "severity",
1236
+ "summary"
1237
+ ],
1238
+ "additionalProperties": false,
1239
+ "properties": {
1240
+ "severity": {
1241
+ "enum": [
1242
+ "error",
1243
+ "warning"
1244
+ ]
1245
+ },
1246
+ "summary": {
1247
+ "type": "string"
1248
+ },
1249
+ "detail": {
1250
+ "type": "string"
1251
+ },
1252
+ "address": {
1253
+ "type": "string"
1254
+ },
1255
+ "file": {
1256
+ "type": "string"
1257
+ },
1258
+ "line": {
1259
+ "type": "integer",
1260
+ "minimum": 0
1261
+ }
1262
+ }
1263
+ }
1264
+ }
1265
+ }
1266
+ }
1267
+ ]
1268
+ },
1269
+ "deploy-data": {
1270
+ "type": "object",
1271
+ "required": [
1272
+ "target",
1273
+ "provider",
1274
+ "versionId",
1275
+ "url",
1276
+ "preview",
1277
+ "uploaded",
1278
+ "copied",
1279
+ "skipped",
1280
+ "deleted",
1281
+ "bytes",
1282
+ "pruned",
1283
+ "invalidated",
1284
+ "dryRun",
1285
+ "buildDir"
1286
+ ],
1287
+ "additionalProperties": false,
1288
+ "properties": {
1289
+ "target": {
1290
+ "type": "string",
1291
+ "description": "Target name from the config."
1292
+ },
1293
+ "provider": {
1294
+ "enum": [
1295
+ "aws",
1296
+ "azure"
1297
+ ]
1298
+ },
1299
+ "versionId": {
1300
+ "type": "string",
1301
+ "description": "The new version id, or the preview id."
1302
+ },
1303
+ "url": {
1304
+ "type": "string",
1305
+ "description": "Where the version or preview is served."
1306
+ },
1307
+ "preview": {
1308
+ "type": "boolean"
1309
+ },
1310
+ "uploaded": {
1311
+ "type": "integer",
1312
+ "minimum": 0,
1313
+ "description": "Files sent from this machine."
1314
+ },
1315
+ "copied": {
1316
+ "type": "integer",
1317
+ "minimum": 0,
1318
+ "description": "Unchanged files copied server-side from the previous version."
1319
+ },
1320
+ "skipped": {
1321
+ "type": "integer",
1322
+ "minimum": 0,
1323
+ "description": "Unchanged files already in place (preview redeploys)."
1324
+ },
1325
+ "deleted": {
1326
+ "type": "integer",
1327
+ "minimum": 0,
1328
+ "description": "Files removed (preview redeploys)."
1329
+ },
1330
+ "bytes": {
1331
+ "type": "integer",
1332
+ "minimum": 0,
1333
+ "description": "Bytes uploaded."
1334
+ },
1335
+ "pruned": {
1336
+ "type": "array",
1337
+ "items": {
1338
+ "type": "string"
1339
+ },
1340
+ "description": "Older versions removed beyond retainVersions."
1341
+ },
1342
+ "invalidated": {
1343
+ "type": "boolean",
1344
+ "description": "Whether the CDN cache was invalidated."
1345
+ },
1346
+ "dryRun": {
1347
+ "type": "boolean",
1348
+ "description": "True when nothing was changed."
1349
+ },
1350
+ "buildDir": {
1351
+ "type": "string",
1352
+ "description": "The deployed build directory."
1353
+ },
1354
+ "previousVersionId": {
1355
+ "type": "string",
1356
+ "description": "The version production served before."
1357
+ },
1358
+ "check": {
1359
+ "type": "object",
1360
+ "required": [
1361
+ "summary",
1362
+ "rendered"
1363
+ ],
1364
+ "additionalProperties": false,
1365
+ "properties": {
1366
+ "summary": {
1367
+ "$ref": "#/$defs/summary"
1368
+ },
1369
+ "rendered": {
1370
+ "enum": [
1371
+ "ran",
1372
+ "skipped",
1373
+ "off"
1374
+ ]
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+ },
1380
+ "versions-data": {
1381
+ "type": "object",
1382
+ "required": [
1383
+ "target",
1384
+ "versions"
1385
+ ],
1386
+ "additionalProperties": false,
1387
+ "properties": {
1388
+ "target": {
1389
+ "type": "string",
1390
+ "description": "Target name from the config."
1391
+ },
1392
+ "versions": {
1393
+ "type": "array",
1394
+ "items": {
1395
+ "$ref": "#/$defs/deployedVersion"
1396
+ },
1397
+ "description": "Production versions (newest first), then previews."
1398
+ }
1399
+ }
1400
+ },
1401
+ "rollback-data": {
1402
+ "type": "object",
1403
+ "required": [
1404
+ "target",
1405
+ "versionId",
1406
+ "previousVersionId",
1407
+ "url"
1408
+ ],
1409
+ "additionalProperties": false,
1410
+ "properties": {
1411
+ "target": {
1412
+ "type": "string",
1413
+ "description": "Target name from the config."
1414
+ },
1415
+ "versionId": {
1416
+ "type": "string",
1417
+ "description": "The version now served."
1418
+ },
1419
+ "previousVersionId": {
1420
+ "anyOf": [
1421
+ {
1422
+ "type": "string"
1423
+ },
1424
+ {
1425
+ "type": "null"
1426
+ }
1427
+ ]
1428
+ },
1429
+ "url": {
1430
+ "type": "string"
1431
+ }
1432
+ }
1433
+ },
1434
+ "preview-destroy-data": {
1435
+ "type": "object",
1436
+ "required": [
1437
+ "target",
1438
+ "previewId",
1439
+ "deleted",
1440
+ "existed"
1441
+ ],
1442
+ "additionalProperties": false,
1443
+ "properties": {
1444
+ "target": {
1445
+ "type": "string",
1446
+ "description": "Target name from the config."
1447
+ },
1448
+ "previewId": {
1449
+ "type": "string"
1450
+ },
1451
+ "deleted": {
1452
+ "type": "integer",
1453
+ "minimum": 0,
1454
+ "description": "Files removed."
1455
+ },
1456
+ "existed": {
1457
+ "type": "boolean"
1458
+ }
1459
+ }
1460
+ },
1461
+ "config-validate-data": {
1462
+ "type": "object",
1463
+ "required": [
1464
+ "valid",
1465
+ "path",
1466
+ "rootDir",
1467
+ "targets"
1468
+ ],
1469
+ "additionalProperties": false,
1470
+ "properties": {
1471
+ "valid": {
1472
+ "const": true
1473
+ },
1474
+ "path": {
1475
+ "type": "string",
1476
+ "description": "The config file."
1477
+ },
1478
+ "rootDir": {
1479
+ "type": "string"
1480
+ },
1481
+ "targets": {
1482
+ "type": "array",
1483
+ "items": {
1484
+ "type": "string"
1485
+ },
1486
+ "description": "Target names."
1487
+ }
1488
+ }
1489
+ },
1490
+ "config-show-data": {
1491
+ "type": "object",
1492
+ "required": [
1493
+ "path",
1494
+ "config"
1495
+ ],
1496
+ "additionalProperties": false,
1497
+ "properties": {
1498
+ "path": {
1499
+ "type": "string",
1500
+ "description": "The config file."
1501
+ },
1502
+ "config": {
1503
+ "type": "object",
1504
+ "description": "The resolved config with defaults applied (see `sforge schema config`)."
1505
+ }
1506
+ }
1507
+ },
1508
+ "schema-data": {
1509
+ "type": "object",
1510
+ "description": "The requested JSON Schema."
1511
+ },
1512
+ "version-data": {
1513
+ "type": "object",
1514
+ "required": [
1515
+ "version",
1516
+ "node",
1517
+ "platform",
1518
+ "arch"
1519
+ ],
1520
+ "additionalProperties": false,
1521
+ "properties": {
1522
+ "version": {
1523
+ "type": "string"
1524
+ },
1525
+ "node": {
1526
+ "type": "string"
1527
+ },
1528
+ "platform": {
1529
+ "type": "string"
1530
+ },
1531
+ "arch": {
1532
+ "type": "string"
1533
+ }
1534
+ }
1535
+ }
1536
+ }
1537
+ }