@databehave/server 0.1.3 → 0.2.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 (156) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +85 -83
  3. package/dist/cors.d.ts +1 -1
  4. package/dist/cors.js +1 -1
  5. package/dist/cors.js.map +1 -1
  6. package/dist/http.d.ts +94 -0
  7. package/dist/http.d.ts.map +1 -0
  8. package/dist/http.js +23 -0
  9. package/dist/http.js.map +1 -0
  10. package/dist/index.d.ts +10 -20
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +8 -18
  13. package/dist/index.js.map +1 -1
  14. package/dist/log.d.ts +9 -49
  15. package/dist/log.d.ts.map +1 -1
  16. package/dist/log.js +16 -92
  17. package/dist/log.js.map +1 -1
  18. package/dist/node-authority.d.ts +12 -0
  19. package/dist/node-authority.d.ts.map +1 -0
  20. package/dist/node-authority.js +72 -0
  21. package/dist/node-authority.js.map +1 -0
  22. package/dist/node-body.d.ts +11 -0
  23. package/dist/node-body.d.ts.map +1 -0
  24. package/dist/node-body.js +61 -0
  25. package/dist/node-body.js.map +1 -0
  26. package/dist/node-http.d.ts +19 -0
  27. package/dist/node-http.d.ts.map +1 -0
  28. package/dist/node-http.js +210 -0
  29. package/dist/node-http.js.map +1 -0
  30. package/dist/plugins/access-log.d.ts +11 -0
  31. package/dist/plugins/access-log.d.ts.map +1 -0
  32. package/dist/plugins/access-log.js +27 -0
  33. package/dist/plugins/access-log.js.map +1 -0
  34. package/dist/plugins/cors.d.ts +5 -0
  35. package/dist/plugins/cors.d.ts.map +1 -0
  36. package/dist/plugins/cors.js +35 -0
  37. package/dist/plugins/cors.js.map +1 -0
  38. package/dist/plugins/routes.d.ts +5 -0
  39. package/dist/plugins/routes.d.ts.map +1 -0
  40. package/dist/plugins/routes.js +10 -0
  41. package/dist/plugins/routes.js.map +1 -0
  42. package/dist/request.d.ts +2 -2
  43. package/dist/request.d.ts.map +1 -1
  44. package/dist/request.js +6 -4
  45. package/dist/request.js.map +1 -1
  46. package/dist/route-key.d.ts +2 -0
  47. package/dist/route-key.d.ts.map +1 -1
  48. package/dist/route-key.js +5 -1
  49. package/dist/route-key.js.map +1 -1
  50. package/dist/server.d.ts +7 -59
  51. package/dist/server.d.ts.map +1 -1
  52. package/dist/server.js +289 -466
  53. package/dist/server.js.map +1 -1
  54. package/dist/types.d.ts +10 -156
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/types.js +1 -1
  57. package/package.json +9 -22
  58. package/dist/admin/admin-routes.d.ts +0 -42
  59. package/dist/admin/admin-routes.d.ts.map +0 -1
  60. package/dist/admin/admin-routes.js +0 -472
  61. package/dist/admin/admin-routes.js.map +0 -1
  62. package/dist/admin/admin-types.d.ts +0 -170
  63. package/dist/admin/admin-types.d.ts.map +0 -1
  64. package/dist/admin/admin-types.js +0 -30
  65. package/dist/admin/admin-types.js.map +0 -1
  66. package/dist/admin/banner.d.ts +0 -11
  67. package/dist/admin/banner.d.ts.map +0 -1
  68. package/dist/admin/banner.js +0 -5
  69. package/dist/admin/banner.js.map +0 -1
  70. package/dist/admin/header-parser.d.ts +0 -14
  71. package/dist/admin/header-parser.d.ts.map +0 -1
  72. package/dist/admin/header-parser.js +0 -171
  73. package/dist/admin/header-parser.js.map +0 -1
  74. package/dist/admin/inject.d.ts +0 -48
  75. package/dist/admin/inject.d.ts.map +0 -1
  76. package/dist/admin/inject.js +0 -167
  77. package/dist/admin/inject.js.map +0 -1
  78. package/dist/admin/overrides-store.d.ts +0 -18
  79. package/dist/admin/overrides-store.d.ts.map +0 -1
  80. package/dist/admin/overrides-store.js +0 -100
  81. package/dist/admin/overrides-store.js.map +0 -1
  82. package/dist/admin/resolve-cors.d.ts +0 -22
  83. package/dist/admin/resolve-cors.d.ts.map +0 -1
  84. package/dist/admin/resolve-cors.js +0 -28
  85. package/dist/admin/resolve-cors.js.map +0 -1
  86. package/dist/admin/scenarios-store.d.ts +0 -15
  87. package/dist/admin/scenarios-store.d.ts.map +0 -1
  88. package/dist/admin/scenarios-store.js +0 -109
  89. package/dist/admin/scenarios-store.js.map +0 -1
  90. package/dist/admin/ui.css +0 -1
  91. package/dist/admin/ui.html +0 -13
  92. package/dist/admin/ui.js +0 -240
  93. package/dist/bin-helpers.d.ts +0 -46
  94. package/dist/bin-helpers.d.ts.map +0 -1
  95. package/dist/bin-helpers.js +0 -61
  96. package/dist/bin-helpers.js.map +0 -1
  97. package/dist/bin.d.ts +0 -3
  98. package/dist/bin.d.ts.map +0 -1
  99. package/dist/bin.js +0 -86
  100. package/dist/bin.js.map +0 -1
  101. package/dist/define.d.ts +0 -26
  102. package/dist/define.d.ts.map +0 -1
  103. package/dist/define.js +0 -55
  104. package/dist/define.js.map +0 -1
  105. package/dist/json-config.d.ts +0 -170
  106. package/dist/json-config.d.ts.map +0 -1
  107. package/dist/json-config.js +0 -684
  108. package/dist/json-config.js.map +0 -1
  109. package/dist/jsonc.d.ts +0 -24
  110. package/dist/jsonc.d.ts.map +0 -1
  111. package/dist/jsonc.js +0 -125
  112. package/dist/jsonc.js.map +0 -1
  113. package/dist/middleware/request-validation.d.ts +0 -58
  114. package/dist/middleware/request-validation.d.ts.map +0 -1
  115. package/dist/middleware/request-validation.js +0 -328
  116. package/dist/middleware/request-validation.js.map +0 -1
  117. package/dist/mock-mode.d.ts +0 -95
  118. package/dist/mock-mode.d.ts.map +0 -1
  119. package/dist/mock-mode.js +0 -95
  120. package/dist/mock-mode.js.map +0 -1
  121. package/dist/openapi/auto-schema.d.ts +0 -83
  122. package/dist/openapi/auto-schema.d.ts.map +0 -1
  123. package/dist/openapi/auto-schema.js +0 -232
  124. package/dist/openapi/auto-schema.js.map +0 -1
  125. package/dist/openapi/generate.d.ts +0 -20
  126. package/dist/openapi/generate.d.ts.map +0 -1
  127. package/dist/openapi/generate.js +0 -121
  128. package/dist/openapi/generate.js.map +0 -1
  129. package/dist/openapi/loader.d.ts +0 -18
  130. package/dist/openapi/loader.d.ts.map +0 -1
  131. package/dist/openapi/loader.js +0 -25
  132. package/dist/openapi/loader.js.map +0 -1
  133. package/dist/openapi/register.d.ts +0 -58
  134. package/dist/openapi/register.d.ts.map +0 -1
  135. package/dist/openapi/register.js +0 -166
  136. package/dist/openapi/register.js.map +0 -1
  137. package/dist/openapi/seed.d.ts +0 -16
  138. package/dist/openapi/seed.d.ts.map +0 -1
  139. package/dist/openapi/seed.js +0 -58
  140. package/dist/openapi/seed.js.map +0 -1
  141. package/dist/openapi/translate.d.ts +0 -55
  142. package/dist/openapi/translate.d.ts.map +0 -1
  143. package/dist/openapi/translate.js +0 -319
  144. package/dist/openapi/translate.js.map +0 -1
  145. package/dist/openapi/walker.d.ts +0 -44
  146. package/dist/openapi/walker.d.ts.map +0 -1
  147. package/dist/openapi/walker.js +0 -15
  148. package/dist/openapi/walker.js.map +0 -1
  149. package/dist/run.d.ts +0 -27
  150. package/dist/run.d.ts.map +0 -1
  151. package/dist/run.js +0 -87
  152. package/dist/run.js.map +0 -1
  153. package/dist/validation/validate.d.ts +0 -38
  154. package/dist/validation/validate.d.ts.map +0 -1
  155. package/dist/validation/validate.js +0 -372
  156. package/dist/validation/validate.js.map +0 -1
@@ -1,319 +0,0 @@
1
- const DEPTH_CAP = 64;
2
- const PATTERN_MAX_LENGTH = 1024;
3
- const UNSUPPORTED_KEYWORDS = new Set([
4
- 'if', 'then', 'else',
5
- 'dependentSchemas', 'dependentRequired',
6
- 'unevaluatedProperties', 'unevaluatedItems',
7
- 'contentEncoding', 'contentMediaType',
8
- 'propertyNames', 'patternProperties',
9
- ]);
10
- const FORMAT_MAP = {
11
- date: 'date',
12
- 'date-time': 'datetime',
13
- email: 'email',
14
- uuid: 'uuid',
15
- uri: 'url',
16
- };
17
- const isObj = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
18
- const buildErr = (pointer, message) => new Error(`@databehave/server/openapi: ${message} (at ${pointer})`);
19
- const resolveRef = (ref, doc, pointer) => {
20
- if (ref.includes('://'))
21
- throw buildErr(pointer, `unsupported $ref: ${ref}`);
22
- const m = /^#\/components\/schemas\/(.+)$/.exec(ref);
23
- if (!m)
24
- throw buildErr(pointer, `unsupported $ref: ${ref}`);
25
- const name = decodeURIComponent(m[1]);
26
- const target = doc.components?.schemas?.[name];
27
- if (!target)
28
- throw buildErr(pointer, `$ref not found: ${ref}`);
29
- return target;
30
- };
31
- /**
32
- * Build a databehave Schema from an arbitrary JSON value, used when
33
- * an OAS node carries a literal `example` / `examples[0]` / `const`
34
- * payload. Recursively maps objects → `obj({...})` and arrays →
35
- * `tuple(...)` so the entire value is preserved in the IR.
36
- */
37
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
- const literalize = (value, m, pointer, depth) => {
39
- if (depth > DEPTH_CAP) {
40
- throw buildErr(pointer, `schema nesting exceeds depth cap of ${DEPTH_CAP}`);
41
- }
42
- if (value === null ||
43
- typeof value === 'string' ||
44
- typeof value === 'number' ||
45
- typeof value === 'boolean') {
46
- return m.literal(value);
47
- }
48
- if (Array.isArray(value)) {
49
- if (value.length === 0)
50
- return m.tuple();
51
- return m.tuple(...value.map((v) => literalize(v, m, pointer, depth + 1)));
52
- }
53
- if (isObj(value)) {
54
- const fields = {};
55
- for (const [k, v] of Object.entries(value)) {
56
- fields[k] = literalize(v, m, pointer, depth + 1);
57
- }
58
- return m.obj(fields);
59
- }
60
- throw buildErr(pointer, `cannot literalize value of type ${typeof value}`);
61
- };
62
- const enterPtr = (ctx, segment) => ({
63
- ...ctx,
64
- pointer: `${ctx.pointer}/${segment}`,
65
- depth: ctx.depth + 1,
66
- });
67
- const pickType = (node) => {
68
- if (Array.isArray(node.type))
69
- return node.type.find((t) => t !== 'null');
70
- return node.type;
71
- };
72
- const isNullable = (node) => node.nullable === true || (Array.isArray(node.type) && node.type.includes('null'));
73
- const buildString = (node, ctx) => {
74
- if (typeof node.pattern === 'string') {
75
- if (node.pattern.length > PATTERN_MAX_LENGTH) {
76
- throw buildErr(ctx.pointer, `pattern length ${node.pattern.length} exceeds cap of ${PATTERN_MAX_LENGTH} (ReDoS guard)`);
77
- }
78
- if (typeof node.maxLength !== 'number') {
79
- throw buildErr(ctx.pointer, 'pattern requires maxLength on the same schema (footgun: ReDoS)');
80
- }
81
- try {
82
- new RegExp(node.pattern);
83
- }
84
- catch (err) {
85
- throw buildErr(ctx.pointer, `invalid pattern: ${err instanceof Error ? err.message : String(err)}`);
86
- }
87
- }
88
- const fmt = typeof node.format === 'string' ? FORMAT_MAP[node.format] : undefined;
89
- const stringNode = { kind: 'string', format: fmt ?? 'plain' };
90
- if (typeof node.minLength === 'number')
91
- stringNode.min = node.minLength;
92
- if (typeof node.maxLength === 'number')
93
- stringNode.max = node.maxLength;
94
- if (typeof node.pattern === 'string')
95
- stringNode.pattern = node.pattern;
96
- return new ctx.m.StringSchema(stringNode);
97
- };
98
- const buildNumber = (node, ctx, isInt) => {
99
- // schema's IR has only min/max (inclusive). exclusiveMinimum/Maximum are
100
- // approximated as inclusive for IR mock-generation purposes — the
101
- // generated value drift is at most one ulp / one int and acceptable for
102
- // placeholder fixtures. The validator (validate.ts) still enforces the
103
- // exact exclusive semantics on real inbound requests.
104
- const numNode = { kind: 'number', int: isInt };
105
- if (typeof node.minimum === 'number')
106
- numNode.min = node.minimum;
107
- else if (typeof node.exclusiveMinimum === 'number') {
108
- numNode.min = node.exclusiveMinimum;
109
- }
110
- if (typeof node.maximum === 'number')
111
- numNode.max = node.maximum;
112
- else if (typeof node.exclusiveMaximum === 'number') {
113
- numNode.max = node.exclusiveMaximum;
114
- }
115
- return new ctx.m.NumberSchema(numNode);
116
- };
117
- const buildArray = (node, ctx) => {
118
- const itemNode = node.items ?? {};
119
- const itemSchema = translate(itemNode, enterPtr(ctx, 'items'));
120
- let arr = ctx.m.arr(itemSchema);
121
- if (typeof node.minItems === 'number')
122
- arr = arr.min(node.minItems);
123
- if (typeof node.maxItems === 'number')
124
- arr = arr.max(node.maxItems);
125
- return arr;
126
- };
127
- const buildObject = (node, ctx) => {
128
- const required = new Set(Array.isArray(node.required) ? node.required : []);
129
- const fields = {};
130
- for (const [k, child] of Object.entries(node.properties ?? {})) {
131
- const childSchema = translate(child, enterPtr(ctx, `properties/${k}`));
132
- fields[k] = required.has(k) ? childSchema : childSchema.optional();
133
- }
134
- // `additionalProperties` is a no-op for *generation* — we only ever
135
- // emit the declared `properties` above, so we never invent extra
136
- // keys regardless of the keyword's value. We still acknowledge it
137
- // explicitly so the translator's keyword surface mirrors
138
- // `validation/validate.ts` (which DOES enforce it on inbound bodies).
139
- const ap = node.additionalProperties;
140
- if (ap === false) {
141
- // Strict-extra-keys: aligned with validator behaviour. No-op here.
142
- }
143
- else if (ap === true || ap === undefined) {
144
- // Open object: no-op — generator never invents undeclared keys.
145
- }
146
- else if (isObj(ap)) {
147
- // Schema form: translate-and-discard. We don't use the result for
148
- // generation (we never emit extra keys), but recursing now means
149
- // an unsupported nested keyword (e.g. `if`) FAILS LOUD at build
150
- // time instead of being silently accepted.
151
- translate(ap, enterPtr(ctx, 'additionalProperties'));
152
- }
153
- return ctx.m.obj(fields);
154
- };
155
- const buildDiscriminated = (node, ctx, disc) => {
156
- const branches = {};
157
- for (const [tag, ref] of Object.entries(disc.mapping)) {
158
- const childCtx = enterPtr(ctx, `discriminator/mapping/${tag}`);
159
- if (childCtx.refStack.includes(ref)) {
160
- throw buildErr(childCtx.pointer, `$ref cycle detected: ${ref}`);
161
- }
162
- const target = resolveRef(ref, ctx.doc, childCtx.pointer);
163
- const branchSchema = translate(target, {
164
- ...childCtx,
165
- refStack: [...childCtx.refStack, ref],
166
- pointer: ref,
167
- });
168
- if (!(branchSchema instanceof ctx.m.ObjectSchema)) {
169
- throw buildErr(childCtx.pointer, `discriminator branch ${JSON.stringify(tag)} must be an object schema`);
170
- }
171
- // Force the discriminator field to literal(tag) so `discriminated()`
172
- // accepts the branch — OAS schemas typically declare it as
173
- // `type: 'string'` rather than constraining to the tag value.
174
- const objBranch = branchSchema;
175
- const newFields = {
176
- ...objBranch._fields,
177
- [disc.propertyName]: ctx.m.literal(tag),
178
- };
179
- branches[tag] = ctx.m.obj(newFields);
180
- }
181
- return ctx.m.discriminated(disc.propertyName, branches);
182
- };
183
- const buildAllOfMerge = (node, ctx) => {
184
- // Mirror generate.ts: shallow-merge object-typed branches into a
185
- // single obj schema. If any branch isn't object-typed once translated
186
- // we bail and let the caller fall through to other precedence rules.
187
- const merged = {};
188
- let allObjects = true;
189
- for (let i = 0; i < node.allOf.length; i++) {
190
- const branch = translate(node.allOf[i], enterPtr(ctx, `allOf/${i}`));
191
- if (!(branch instanceof ctx.m.ObjectSchema)) {
192
- allObjects = false;
193
- break;
194
- }
195
- const fields = branch._fields;
196
- for (const [k, v] of Object.entries(fields))
197
- merged[k] = v;
198
- }
199
- if (!allObjects)
200
- return null;
201
- return ctx.m.obj(merged);
202
- };
203
- const translate = (node, ctx) => {
204
- if (ctx.depth > DEPTH_CAP) {
205
- throw buildErr(ctx.pointer, `schema nesting exceeds depth cap of ${DEPTH_CAP}`);
206
- }
207
- if (!isObj(node))
208
- throw buildErr(ctx.pointer, 'schema node must be an object');
209
- for (const key of Object.keys(node)) {
210
- if (UNSUPPORTED_KEYWORDS.has(key)) {
211
- throw buildErr(ctx.pointer, `unsupported JSON Schema keyword: ${key}`);
212
- }
213
- }
214
- // Precedence (mirrors generate.ts):
215
- // example > examples[0] > enum > const > $ref > allOf > oneOf > anyOf > type
216
- if (node.example !== undefined) {
217
- return literalize(node.example, ctx.m, ctx.pointer, ctx.depth);
218
- }
219
- if (Array.isArray(node.examples) && node.examples.length > 0) {
220
- return literalize(node.examples[0], ctx.m, ctx.pointer, ctx.depth);
221
- }
222
- if (Array.isArray(node.enum) && node.enum.length > 0) {
223
- const allStrNum = node.enum.every((v) => typeof v === 'string' || typeof v === 'number');
224
- return allStrNum
225
- ? ctx.m.enum_(node.enum)
226
- : ctx.m.union(...node.enum.map((v) => literalize(v, ctx.m, ctx.pointer, ctx.depth)));
227
- }
228
- if (node.const !== undefined) {
229
- return literalize(node.const, ctx.m, ctx.pointer, ctx.depth);
230
- }
231
- if (typeof node.$ref === 'string') {
232
- if (ctx.refStack.includes(node.$ref)) {
233
- throw buildErr(ctx.pointer, `$ref cycle detected: ${[...ctx.refStack, node.$ref].join(' -> ')}`);
234
- }
235
- const target = resolveRef(node.$ref, ctx.doc, ctx.pointer);
236
- const out = translate(target, {
237
- ...ctx,
238
- refStack: [...ctx.refStack, node.$ref],
239
- depth: ctx.depth + 1,
240
- pointer: node.$ref,
241
- });
242
- return isNullable(node) ? out.nullable() : out;
243
- }
244
- if (Array.isArray(node.allOf) && node.allOf.length > 0) {
245
- const merged = buildAllOfMerge(node, ctx);
246
- if (merged !== null)
247
- return isNullable(node) ? merged.nullable() : merged;
248
- }
249
- const disc = node.discriminator;
250
- if (Array.isArray(node.oneOf) && node.oneOf.length > 0) {
251
- if (disc && disc.mapping) {
252
- const out = buildDiscriminated(node, ctx, { propertyName: disc.propertyName, mapping: disc.mapping });
253
- return isNullable(node) ? out.nullable() : out;
254
- }
255
- const branches = node.oneOf.map((b, i) => translate(b, enterPtr(ctx, `oneOf/${i}`)));
256
- const out = ctx.m.union(...branches);
257
- return isNullable(node) ? out.nullable() : out;
258
- }
259
- if (Array.isArray(node.anyOf) && node.anyOf.length > 0) {
260
- const branches = node.anyOf.map((b, i) => translate(b, enterPtr(ctx, `anyOf/${i}`)));
261
- const out = ctx.m.union(...branches);
262
- return isNullable(node) ? out.nullable() : out;
263
- }
264
- // type-fallback
265
- let t = pickType(node);
266
- if (!t && node.properties)
267
- t = 'object';
268
- if (!t && node.items !== undefined)
269
- t = 'array';
270
- if (!t) {
271
- // Unknown / open node: best-effort — empty object schema, with
272
- // nullable applied if requested.
273
- const empty = ctx.m.obj({});
274
- return isNullable(node) ? empty.nullable() : empty;
275
- }
276
- let built;
277
- switch (t) {
278
- case 'string':
279
- built = buildString(node, ctx);
280
- break;
281
- case 'integer':
282
- built = buildNumber(node, ctx, true);
283
- break;
284
- case 'number':
285
- built = buildNumber(node, ctx, false);
286
- break;
287
- case 'boolean':
288
- built = ctx.m.bool();
289
- break;
290
- case 'null':
291
- built = ctx.m.null_();
292
- break;
293
- case 'array':
294
- built = buildArray(node, ctx);
295
- break;
296
- case 'object':
297
- built = buildObject(node, ctx);
298
- break;
299
- default:
300
- throw buildErr(ctx.pointer, `unsupported OpenAPI type: ${t}`);
301
- }
302
- return isNullable(node) ? built.nullable() : built;
303
- };
304
- /**
305
- * Translate an OpenAPI schema node into a `@databehave/schema` IR
306
- * Schema instance. Throws at translate time on unsupported keywords,
307
- * malformed `$ref`s, `$ref` cycles, ReDoS-vulnerable patterns, and
308
- * schemas that exceed the depth cap. See the file header for the
309
- * full keyword matrix and security guarantees.
310
- */
311
- export async function translateOasToIR(node, doc) {
312
- // Genuine-separation invariant: dynamic import only. Do NOT replace
313
- // with a static `import { ... } from '@databehave/schema'` — that
314
- // would re-introduce a runtime dependency on the schema package and
315
- // break the OAS-only consumer's zero-dep posture.
316
- const m = await import('@databehave/schema');
317
- return translate(node, { doc, refStack: [], depth: 0, pointer: '#', m });
318
- }
319
- //# sourceMappingURL=translate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"translate.js","sourceRoot":"","sources":["../../src/openapi/translate.ts"],"names":[],"mappings":"AA+CA,MAAM,SAAS,GAAG,EAAE,CAAA;AACpB,MAAM,kBAAkB,GAAG,IAAI,CAAA;AAE/B,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC;IACxD,IAAI,EAAE,MAAM,EAAE,MAAM;IACpB,kBAAkB,EAAE,mBAAmB;IACvC,uBAAuB,EAAE,kBAAkB;IAC3C,iBAAiB,EAAE,kBAAkB;IACrC,eAAe,EAAE,mBAAmB;CACrC,CAAC,CAAA;AAEF,MAAM,UAAU,GAAqC;IACnD,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;CACX,C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,CAAC,CAAC,KAAK,EAAqB,CAAC;YAAC,MAAK;QAC5D,KAAK,OAAO;YAAE,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAAC,MAAK;QAClD,KAAK,QAAQ;YAAE,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAAC,MAAK;QACpD;YACE,MAAM,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,6BAA6B,CAAC,EAAE,CAAC,CAAA;IACjE,CAAC;IACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,EAAsB,CAAC,CAAC,CAAC,KAAK,CAAA;AACzE,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAmB,EACnB,GAAgB;IAEhB,oEAAoE;IACpE,kEAAkE;IAClE,oEAAoE;IACpE,kDAAkD;IAClD,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAA;IAC5C,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;AAC1E,CAAC"}
@@ -1,44 +0,0 @@
1
- /**
2
- * OpenAPI structural types consumed by the in-server mock generator.
3
- *
4
- * Kept as a types-only module so the actual generation logic lives
5
- * in a single place (`./generate.ts`) and consumers — including the
6
- * route registrar (`./register.ts`) — can refer to a stable shape
7
- * without pulling the generator in just for its types.
8
- *
9
- * Only the fields the generator and registrar actually read are
10
- * declared. Unknown OAS keywords pass through as structural casts
11
- * inside `register.ts` and are surfaced as walk errors when the
12
- * generator hits them.
13
- */
14
- export type OasNode = {
15
- $ref?: string;
16
- type?: string | string[];
17
- format?: string;
18
- enum?: unknown[];
19
- const?: unknown;
20
- example?: unknown;
21
- examples?: unknown[];
22
- properties?: Record<string, OasNode>;
23
- required?: string[];
24
- items?: OasNode;
25
- additionalProperties?: boolean | OasNode;
26
- nullable?: boolean;
27
- allOf?: OasNode[];
28
- oneOf?: OasNode[];
29
- anyOf?: OasNode[];
30
- minimum?: number;
31
- maximum?: number;
32
- minLength?: number;
33
- maxLength?: number;
34
- minItems?: number;
35
- maxItems?: number;
36
- pattern?: string;
37
- title?: string;
38
- };
39
- export type OasDoc = {
40
- components?: {
41
- schemas?: Record<string, OasNode>;
42
- };
43
- };
44
- //# sourceMappingURL=walker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/openapi/walker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,oBAAoB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,UAAU,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAA;CACnD,CAAA"}
@@ -1,15 +0,0 @@
1
- /**
2
- * OpenAPI structural types consumed by the in-server mock generator.
3
- *
4
- * Kept as a types-only module so the actual generation logic lives
5
- * in a single place (`./generate.ts`) and consumers — including the
6
- * route registrar (`./register.ts`) — can refer to a stable shape
7
- * without pulling the generator in just for its types.
8
- *
9
- * Only the fields the generator and registrar actually read are
10
- * declared. Unknown OAS keywords pass through as structural casts
11
- * inside `register.ts` and are surfaced as walk errors when the
12
- * generator hits them.
13
- */
14
- export {};
15
- //# sourceMappingURL=walker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/openapi/walker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
package/dist/run.d.ts DELETED
@@ -1,27 +0,0 @@
1
- /** Options accepted by `run()`. */
2
- export interface RunOptions {
3
- /** Path to the databehave config (JSONC). Resolved relative to `process.cwd()`. */
4
- config: string;
5
- /**
6
- * After the server emits `listening`, open the admin URL in the
7
- * default browser. No-op (with a log line) when `admin` is
8
- * absent or `admin.enabled !== true`. Default: `false`.
9
- *
10
- * ORed with `admin.openBrowserOnStart` from the resolved
11
- * config — either trigger launches the browser exactly once.
12
- */
13
- open?: boolean;
14
- }
15
- /** Handle returned by `run()`. */
16
- export interface RunHandle {
17
- /** The bound HTTP URL, e.g. `"http://127.0.0.1:8000"`. */
18
- url: string;
19
- /** Stop the server. Idempotent: a second call is a no-op. Resolves once the port is free. */
20
- close(): Promise<void>;
21
- }
22
- /**
23
- * Programmatic entry. Resolves AFTER the server has emitted
24
- * `listening`.
25
- */
26
- export declare const run: (opts: RunOptions) => Promise<RunHandle>;
27
- //# sourceMappingURL=run.d.ts.map
package/dist/run.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAuBA,mCAAmC;AACnC,MAAM,WAAW,UAAU;IACzB,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,kCAAkC;AAClC,MAAM,WAAW,SAAS;IACxB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,6FAA6F;IAC7F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AA8CD;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAU,MAAM,UAAU,KAAG,OAAO,CAAC,SAAS,CAsB7D,CAAA"}
package/dist/run.js DELETED
@@ -1,87 +0,0 @@
1
- /**
2
- * Programmatic `run()` entry — boots the kit's HTTP server from a
3
- * JSONC config file and optionally opens the admin UI in the default
4
- * browser after `listening` is observed.
5
- *
6
- * This is the implementation that both `bin.ts` (CLI) and direct
7
- * library consumers route through. Keeping a single code path here
8
- * means the binary and the `import { run } from '@databehave/server'`
9
- * surface behave identically (same log lines, same error model).
10
- *
11
- * `RunHandle.close()` is idempotent.
12
- *
13
- * The kit ships no watcher. Use `tsx watch server.ts` (or any
14
- * process supervisor) in dev — see README.
15
- */
16
- import { spawn } from 'node:child_process';
17
- import { isAbsolute, resolve } from 'node:path';
18
- import { composeAdminUrl, resolveOpener } from './bin-helpers.js';
19
- import { loadConfig } from './json-config.js';
20
- import { createServer } from './server.js';
21
- /** Spawn the platform browser opener detached, log on failure. */
22
- const openInBrowser = (url) => {
23
- const { cmd, args } = resolveOpener(process.platform, url);
24
- try {
25
- const child = spawn(cmd, args, { detached: true, stdio: 'ignore' });
26
- child.on('error', (err) => {
27
- const msg = err instanceof Error ? err.message : String(err);
28
- console.warn(`[@databehave/server] could not open browser (${cmd}): ${msg}`);
29
- });
30
- child.unref();
31
- }
32
- catch (err) {
33
- const msg = err instanceof Error ? err.message : String(err);
34
- console.warn(`[@databehave/server] could not open browser (${cmd}): ${msg}`);
35
- }
36
- };
37
- /**
38
- * Boot a single server instance from the JSONC config at `configPath`.
39
- * Logs the standard `listening on …` line and, when `open` is set,
40
- * the `--open: …` URL (or the admin-disabled skip line).
41
- */
42
- const bootOnce = async (configPath, open) => {
43
- const { config, server: listenOpts } = await loadConfig(configPath);
44
- const server = createServer(config);
45
- const handle = await server.listen(listenOpts);
46
- console.info(`[@databehave/server] listening on http://${handle.host}:${handle.port}`);
47
- const shouldOpen = open || config.admin?.openBrowserOnStart === true;
48
- if (shouldOpen) {
49
- const url = composeAdminUrl(handle, config.admin);
50
- if (url === null) {
51
- console.info('[@databehave/server] --open: admin is not enabled — not opening browser');
52
- }
53
- else {
54
- console.info(`[@databehave/server] --open: ${url}`);
55
- openInBrowser(url);
56
- }
57
- }
58
- return handle;
59
- };
60
- /**
61
- * Programmatic entry. Resolves AFTER the server has emitted
62
- * `listening`.
63
- */
64
- export const run = async (opts) => {
65
- const configPath = isAbsolute(opts.config)
66
- ? opts.config
67
- : resolve(process.cwd(), opts.config);
68
- const open = opts.open === true;
69
- const handle = await bootOnce(configPath, open);
70
- const url = `http://${handle.host}:${handle.port}`;
71
- let closed = false;
72
- return {
73
- url,
74
- async close() {
75
- if (closed)
76
- return;
77
- closed = true;
78
- try {
79
- await handle.close();
80
- }
81
- catch {
82
- // best-effort during shutdown
83
- }
84
- },
85
- };
86
- };
87
- //# sourceMappingURL=run.js.map
package/dist/run.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAA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,MAAM,GAAG,GAAG,UAAU,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAA;IAElD,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,OAAO;QACL,GAAG;QACH,KAAK,CAAC,KAAK;YACT,IAAI,MAAM;gBAAE,OAAM;YAClB,MAAM,GAAG,IAAI,CAAA;YACb,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;YACtB,CAAC;YAAC,MAAM,CAAC;gBACP,8BAA8B;YAChC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Hand-rolled, zero-runtime-dependency JSON-Schema-subset validator.
3
- *
4
- * Audit-it-yourself moat: small, defensive, top-to-bottom readable.
5
- * FAIL LOUD on unsupported keywords at build time — never silently
6
- * pass an unrecognised constraint at runtime.
7
- *
8
- * Supported keywords (see README → "Validator scope" for the table):
9
- * type / enum / required / properties / additionalProperties /
10
- * items / pattern / minLength / maxLength / minimum / maximum /
11
- * exclusiveMinimum / exclusiveMaximum / minItems / maxItems /
12
- * $ref (intra-document only) / oneOf / anyOf / allOf /
13
- * discriminator / format (date | date-time | email | uuid | uri) /
14
- * nullable (OAS 3.0) and ["X","null"] (OAS 3.1).
15
- *
16
- * Security guarantees implemented in this file:
17
- * - No `eval`, no `new Function`, no dynamic `require`. Pure recursion.
18
- * - Prototype-pollution guard: input objects whose own keys include
19
- * `__proto__` / `constructor` / `prototype` are rejected as a
20
- * per-property violation rather than coerced or thrown on.
21
- * - ReDoS mitigation: pattern length capped at 1024 chars; invalid
22
- * regexes rejected at build time (never at request time).
23
- * - Recursion bounded: hard-cap depth at 64 levels.
24
- * - $ref cycle detection via a build-time visited-pointer set.
25
- * - No `JSON.parse` on user input — input arrives as a JS value.
26
- */
27
- import type { OasDoc, OasNode } from '../openapi/walker.js';
28
- export interface Violation {
29
- /** JSON-Pointer style path from the validation root. */
30
- readonly path: string;
31
- /** The JSON Schema keyword that rejected the value. */
32
- readonly keyword: string;
33
- /** Short, human-readable description. Never echoes user input. */
34
- readonly message: string;
35
- }
36
- export type Validator = (value: unknown, pointer: string) => Violation[];
37
- export declare const compileValidator: (node: OasNode, doc: OasDoc, schemaPointer?: string) => Validator;
38
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/validation/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,WAAW,SAAS;IACxB,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,CAAA;AAqHxE,eAAO,MAAM,gBAAgB,GAC3B,MAAM,OAAO,EACb,KAAK,MAAM,EACX,sBAAmB,KAClB,SAAwE,CAAA"}