backend-skeleton 1.0.0-beta.1 → 1.0.0-beta.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/COMMERCIAL-LICENSE-AGREEMENT.md +399 -0
- package/COMMERCIAL-LICENSE.md +46 -0
- package/LICENSE +661 -21
- package/README.md +20 -8
- package/bin/bskel.mjs +32 -1
- package/contracts/completeness.mjs +35 -0
- package/contracts/emit.mjs +114 -4
- package/contracts/export.mjs +298 -45
- package/contracts/openapi.mjs +593 -17
- package/package.json +6 -3
- package/schemas/feature-contract.schema.json +56 -1
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-skeleton",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Spec-driven backend scaffolding: brownfield-scan gate, feature_id-keyed contracts, UUID bidirectional handles, stack-choice wiring.",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/popixoxipop-collab/backend-skeleton.git"
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
"new/",
|
|
28
28
|
"stack/",
|
|
29
29
|
"schemas/",
|
|
30
|
-
"scripts/preflight-base-ref.sh"
|
|
30
|
+
"scripts/preflight-base-ref.sh",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"COMMERCIAL-LICENSE.md",
|
|
33
|
+
"COMMERCIAL-LICENSE-AGREEMENT.md"
|
|
31
34
|
],
|
|
32
35
|
"scripts": {
|
|
33
36
|
"test": "node --test test/*.test.mjs",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["sbf_contract", "feature_id", "feature_uid", "source", "operations", "warnings", "completeness"],
|
|
9
9
|
"properties": {
|
|
10
|
-
"sbf_contract": { "const": "
|
|
10
|
+
"sbf_contract": { "const": "6" },
|
|
11
11
|
"feature_id": { "type": "string", "pattern": "^[0-9]{3}-[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
12
12
|
"feature_uid": { "type": "string", "format": "uuid" },
|
|
13
13
|
"source": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"provenance": { "type": "string" }
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"sourceSecuritySchemes": {
|
|
23
|
+
"description": "A7: components.securitySchemes entries copied verbatim from a real source document (--openapi-file), restricted to schemes actually referenced by at least one operation's copied sourceSecurity requirement anywhere in this contract. Omitted entirely when openapi reconciliation never resolved any security requirement.",
|
|
24
|
+
"type": "object"
|
|
25
|
+
},
|
|
22
26
|
"operations": {
|
|
23
27
|
"type": "object",
|
|
24
28
|
"additionalProperties": {
|
|
@@ -43,6 +47,57 @@
|
|
|
43
47
|
"errorSchema": {
|
|
44
48
|
"description": "A3: all documented 4xx/5xx application/json response schemas for this operation, fully inlined (no $ref); an anyOf union when 2+ distinct shapes are documented. Present only when matched/adopted AND at least one resolved.",
|
|
45
49
|
"type": "object"
|
|
50
|
+
},
|
|
51
|
+
"sourceParameters": {
|
|
52
|
+
"description": "A7: non-path (query/header/cookie) parameters copied verbatim from a real source document's operation.parameters[], with `schema` resolved through inlineSchema(). Present only when matched/adopted AND the source document declared at least one such parameter that could be copied (a parameter whose own schema failed to resolve is still included here, just without a `schema` key).",
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "type": "object" }
|
|
55
|
+
},
|
|
56
|
+
"sourceSecurity": {
|
|
57
|
+
"description": "A7: the operation's OpenAPI Security Requirement array, copied verbatim from the source document -- including a literal [] (a genuine positive claim of 'no auth required'). Present only when the source document declared `security` for this exact operation AND every scheme it names resolved against components.securitySchemes.",
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "object" }
|
|
60
|
+
},
|
|
61
|
+
"sourceSummary": {
|
|
62
|
+
"description": "A7: the operation's `summary` string, copied verbatim from the source document. Present only when the source document set one -- never synthesized from operationId or module names.",
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"sourceTags": {
|
|
66
|
+
"description": "A7: the operation's `tags` array, copied verbatim from the source document. Present only when the source document set at least one.",
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "type": "string" }
|
|
69
|
+
},
|
|
70
|
+
"sourceResponses": {
|
|
71
|
+
"description": "A8: per-status HTTP responses copied from a real source document, keyed by the document's own literal status key (a literal code, a range key like \"2XX\", or \"default\") -- never re-bucketed. Additive to responseSchema/errorSchema above, never replacing them; contracts/validate.mjs does not read this field. Present only when matched/adopted AND both the response and error union projections resolved cleanly (or had nothing to project) for this operation.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"propertyNames": { "pattern": "^(?:[1-5](?:[0-9]{2}|XX)|default)$" },
|
|
74
|
+
"additionalProperties": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"description": { "type": "string" },
|
|
79
|
+
"schemaFrom": { "enum": ["response", "error"] },
|
|
80
|
+
"schema": { "type": "object" },
|
|
81
|
+
"mediaTypes": { "type": "array", "items": { "type": "string" } }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"sourceRequestBody": {
|
|
86
|
+
"description": "A8: the request body's non-application/json media types (e.g. multipart/form-data), copied from a real source document. `content` never carries an \"application/json\" key -- that stays requestBodySchema above, the one representation of that one fact.",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"properties": {
|
|
90
|
+
"required": { "type": "boolean" },
|
|
91
|
+
"content": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"not": { "required": ["application/json"] },
|
|
94
|
+
"additionalProperties": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"properties": { "schema": { "type": "object" } }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
46
101
|
}
|
|
47
102
|
}
|
|
48
103
|
}
|