@dhaneshpurohit/mockstar 0.1.3
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/CHANGELOG.md +180 -0
- package/LICENSE +21 -0
- package/README.md +260 -0
- package/dist/cli/commands/init.d.ts +13 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/migrate.d.ts +13 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +15076 -0
- package/dist/core/config/index.d.ts +5 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/loader.d.ts +14 -0
- package/dist/core/config/loader.d.ts.map +1 -0
- package/dist/core/config/schema.d.ts +5706 -0
- package/dist/core/config/schema.d.ts.map +1 -0
- package/dist/core/config/snapshot.d.ts +52 -0
- package/dist/core/config/snapshot.d.ts.map +1 -0
- package/dist/core/config/watcher.d.ts +13 -0
- package/dist/core/config/watcher.d.ts.map +1 -0
- package/dist/core/errors/boundary.d.ts +22 -0
- package/dist/core/errors/boundary.d.ts.map +1 -0
- package/dist/core/errors/index.d.ts +3 -0
- package/dist/core/errors/index.d.ts.map +1 -0
- package/dist/core/errors/process.d.ts +17 -0
- package/dist/core/errors/process.d.ts.map +1 -0
- package/dist/core/handlers/index.d.ts +4 -0
- package/dist/core/handlers/index.d.ts.map +1 -0
- package/dist/core/handlers/registry.d.ts +22 -0
- package/dist/core/handlers/registry.d.ts.map +1 -0
- package/dist/core/handlers/types.d.ts +42 -0
- package/dist/core/handlers/types.d.ts.map +1 -0
- package/dist/core/journal/index.d.ts +2 -0
- package/dist/core/journal/index.d.ts.map +1 -0
- package/dist/core/journal/ring-buffer.d.ts +46 -0
- package/dist/core/journal/ring-buffer.d.ts.map +1 -0
- package/dist/core/matching/discriminators.d.ts +29 -0
- package/dist/core/matching/discriminators.d.ts.map +1 -0
- package/dist/core/matching/index.d.ts +24 -0
- package/dist/core/matching/index.d.ts.map +1 -0
- package/dist/core/matching/path-trie.d.ts +21 -0
- package/dist/core/matching/path-trie.d.ts.map +1 -0
- package/dist/core/observability/index.d.ts +3 -0
- package/dist/core/observability/index.d.ts.map +1 -0
- package/dist/core/observability/logger.d.ts +18 -0
- package/dist/core/observability/logger.d.ts.map +1 -0
- package/dist/core/observability/metrics.d.ts +23 -0
- package/dist/core/observability/metrics.d.ts.map +1 -0
- package/dist/core/preflight.d.ts +18 -0
- package/dist/core/preflight.d.ts.map +1 -0
- package/dist/core/scenarios/evaluator.d.ts +52 -0
- package/dist/core/scenarios/evaluator.d.ts.map +1 -0
- package/dist/core/scenarios/index.d.ts +5 -0
- package/dist/core/scenarios/index.d.ts.map +1 -0
- package/dist/core/scenarios/merger.d.ts +45 -0
- package/dist/core/scenarios/merger.d.ts.map +1 -0
- package/dist/core/templating/compiler.d.ts +118 -0
- package/dist/core/templating/compiler.d.ts.map +1 -0
- package/dist/core/templating/faker.d.ts +14 -0
- package/dist/core/templating/faker.d.ts.map +1 -0
- package/dist/core/templating/index.d.ts +4 -0
- package/dist/core/templating/index.d.ts.map +1 -0
- package/dist/core/templating/tier2/id.d.ts +27 -0
- package/dist/core/templating/tier2/id.d.ts.map +1 -0
- package/dist/core/templating/tier2/index.d.ts +4 -0
- package/dist/core/templating/tier2/index.d.ts.map +1 -0
- package/dist/core/templating/tier2/now.d.ts +15 -0
- package/dist/core/templating/tier2/now.d.ts.map +1 -0
- package/dist/core/templating/tier2/walker.d.ts +43 -0
- package/dist/core/templating/tier2/walker.d.ts.map +1 -0
- package/dist/core/tenancy/extractor.d.ts +20 -0
- package/dist/core/tenancy/extractor.d.ts.map +1 -0
- package/dist/core/tenancy/index.d.ts +2 -0
- package/dist/core/tenancy/index.d.ts.map +1 -0
- package/dist/features/admin/auth.d.ts +19 -0
- package/dist/features/admin/auth.d.ts.map +1 -0
- package/dist/features/admin/endpoints.d.ts +21 -0
- package/dist/features/admin/endpoints.d.ts.map +1 -0
- package/dist/features/admin/index.d.ts +3 -0
- package/dist/features/admin/index.d.ts.map +1 -0
- package/dist/features/dynamic-mock.d.ts +16 -0
- package/dist/features/dynamic-mock.d.ts.map +1 -0
- package/dist/features/enhance/boundary.d.ts +26 -0
- package/dist/features/enhance/boundary.d.ts.map +1 -0
- package/dist/features/enhance/field-mapping.d.ts +23 -0
- package/dist/features/enhance/field-mapping.d.ts.map +1 -0
- package/dist/features/enhance/index.d.ts +21 -0
- package/dist/features/enhance/index.d.ts.map +1 -0
- package/dist/features/openapi/converter.d.ts +55 -0
- package/dist/features/openapi/converter.d.ts.map +1 -0
- package/dist/features/openapi/importer.d.ts +11 -0
- package/dist/features/openapi/importer.d.ts.map +1 -0
- package/dist/features/openapi/index.d.ts +3 -0
- package/dist/features/openapi/index.d.ts.map +1 -0
- package/dist/features/pass-through.d.ts +9 -0
- package/dist/features/pass-through.d.ts.map +1 -0
- package/dist/features/proxy/ca.d.ts +49 -0
- package/dist/features/proxy/ca.d.ts.map +1 -0
- package/dist/features/proxy/cert-cache.d.ts +34 -0
- package/dist/features/proxy/cert-cache.d.ts.map +1 -0
- package/dist/features/proxy/cli.d.ts +2 -0
- package/dist/features/proxy/cli.d.ts.map +1 -0
- package/dist/features/proxy/config.d.ts +71 -0
- package/dist/features/proxy/config.d.ts.map +1 -0
- package/dist/features/proxy/dns.d.ts +18 -0
- package/dist/features/proxy/dns.d.ts.map +1 -0
- package/dist/features/proxy/env-detector.d.ts +7 -0
- package/dist/features/proxy/env-detector.d.ts.map +1 -0
- package/dist/features/proxy/index.d.ts +15 -0
- package/dist/features/proxy/index.d.ts.map +1 -0
- package/dist/features/proxy/install-journal.d.ts +51 -0
- package/dist/features/proxy/install-journal.d.ts.map +1 -0
- package/dist/features/proxy/port-bind.d.ts +33 -0
- package/dist/features/proxy/port-bind.d.ts.map +1 -0
- package/dist/features/proxy/server.d.ts +19 -0
- package/dist/features/proxy/server.d.ts.map +1 -0
- package/dist/features/proxy/sni-gate.d.ts +17 -0
- package/dist/features/proxy/sni-gate.d.ts.map +1 -0
- package/dist/features/proxy/tls-adapter.d.ts +52 -0
- package/dist/features/proxy/tls-adapter.d.ts.map +1 -0
- package/dist/features/proxy/types.d.ts +103 -0
- package/dist/features/proxy/types.d.ts.map +1 -0
- package/dist/features/proxy/upstream.d.ts +23 -0
- package/dist/features/proxy/upstream.d.ts.map +1 -0
- package/dist/features/spec/index.d.ts +17 -0
- package/dist/features/spec/index.d.ts.map +1 -0
- package/dist/features/static-mock.d.ts +23 -0
- package/dist/features/static-mock.d.ts.map +1 -0
- package/dist/features/url-validator.d.ts +53 -0
- package/dist/features/url-validator.d.ts.map +1 -0
- package/dist/features/webhooks/circuit-breaker.d.ts +49 -0
- package/dist/features/webhooks/circuit-breaker.d.ts.map +1 -0
- package/dist/features/webhooks/compile.d.ts +16 -0
- package/dist/features/webhooks/compile.d.ts.map +1 -0
- package/dist/features/webhooks/dispatcher.d.ts +45 -0
- package/dist/features/webhooks/dispatcher.d.ts.map +1 -0
- package/dist/features/webhooks/event-registry.d.ts +36 -0
- package/dist/features/webhooks/event-registry.d.ts.map +1 -0
- package/dist/features/webhooks/index.d.ts +13 -0
- package/dist/features/webhooks/index.d.ts.map +1 -0
- package/dist/features/webhooks/journal.d.ts +32 -0
- package/dist/features/webhooks/journal.d.ts.map +1 -0
- package/dist/features/webhooks/queue.d.ts +93 -0
- package/dist/features/webhooks/queue.d.ts.map +1 -0
- package/dist/features/webhooks/signing.d.ts +35 -0
- package/dist/features/webhooks/signing.d.ts.map +1 -0
- package/dist/features/webhooks/types.d.ts +96 -0
- package/dist/features/webhooks/types.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12813 -0
- package/dist/server.d.ts +62 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { Entry } from "../config/schema.ts";
|
|
2
|
+
import type { FakerInstance } from "./faker.ts";
|
|
3
|
+
import type { IdHelpers } from "./tier2/id.ts";
|
|
4
|
+
import type { Clock } from "./tier2/now.ts";
|
|
5
|
+
import { RenderBudget } from "./tier2/walker.ts";
|
|
6
|
+
export interface TemplateContext {
|
|
7
|
+
faker: FakerInstance;
|
|
8
|
+
request: {
|
|
9
|
+
method: string;
|
|
10
|
+
path: string;
|
|
11
|
+
query: Record<string, string>;
|
|
12
|
+
headers: Record<string, string>;
|
|
13
|
+
body: unknown;
|
|
14
|
+
params: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
tenant: string;
|
|
17
|
+
requestId: string;
|
|
18
|
+
clock: Clock;
|
|
19
|
+
idHelpers: IdHelpers;
|
|
20
|
+
}
|
|
21
|
+
export type TemplateOp = {
|
|
22
|
+
kind: "literal";
|
|
23
|
+
value: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "faker";
|
|
26
|
+
method: keyof FakerInstance;
|
|
27
|
+
args: readonly unknown[];
|
|
28
|
+
} | {
|
|
29
|
+
kind: "request";
|
|
30
|
+
path: readonly string[];
|
|
31
|
+
} | {
|
|
32
|
+
kind: "var";
|
|
33
|
+
name: "tenant" | "requestId";
|
|
34
|
+
} | {
|
|
35
|
+
kind: "id";
|
|
36
|
+
prefix: string;
|
|
37
|
+
length: number;
|
|
38
|
+
alphabet: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: "id_named";
|
|
41
|
+
name: string;
|
|
42
|
+
prefix: string;
|
|
43
|
+
length: number;
|
|
44
|
+
alphabet: string;
|
|
45
|
+
} | {
|
|
46
|
+
kind: "now";
|
|
47
|
+
field: "unix" | "millis" | "iso";
|
|
48
|
+
} | {
|
|
49
|
+
kind: "env";
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
export interface CompiledTemplate {
|
|
53
|
+
render(ctx: TemplateContext): string;
|
|
54
|
+
}
|
|
55
|
+
export interface CompiledResponse {
|
|
56
|
+
/** Non-null if the response body is a string template. */
|
|
57
|
+
bodyTemplate: CompiledTemplate | null;
|
|
58
|
+
/** Non-null if the response body is a JSON value with templates pre-compiled at every string leaf. */
|
|
59
|
+
bodyJson: CompiledJsonValue | null;
|
|
60
|
+
headers: ReadonlyMap<string, CompiledTemplate>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A JSON tree where every string leaf has been pre-compiled to a CompiledTemplate at config-load.
|
|
64
|
+
*
|
|
65
|
+
* - `template` — string-mode: surrounding literals + placeholders. Renders as string.
|
|
66
|
+
* - `type_placeholder` — pure placeholder (whole string is one {{...}}). Renders type-preservingly
|
|
67
|
+
* (numbers stay numbers, objects stay objects, arrays stay arrays).
|
|
68
|
+
* Satisfies RT-1.2 and TN3 segmentation.
|
|
69
|
+
* - `literal` — scalar pass-through.
|
|
70
|
+
* - `array` / `object` — recursive structural nodes.
|
|
71
|
+
*/
|
|
72
|
+
export type CompiledJsonValue = {
|
|
73
|
+
kind: "template";
|
|
74
|
+
template: CompiledTemplate;
|
|
75
|
+
} | {
|
|
76
|
+
kind: "type_placeholder";
|
|
77
|
+
op: TemplateOp;
|
|
78
|
+
} | {
|
|
79
|
+
kind: "literal";
|
|
80
|
+
value: string | number | boolean | null;
|
|
81
|
+
} | {
|
|
82
|
+
kind: "array";
|
|
83
|
+
items: CompiledJsonValue[];
|
|
84
|
+
} | {
|
|
85
|
+
kind: "object";
|
|
86
|
+
entries: Record<string, CompiledJsonValue>;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Compile a template string into an op sequence. Called at config-load only.
|
|
90
|
+
*/
|
|
91
|
+
export declare function compileTemplate(template: string): CompiledTemplate;
|
|
92
|
+
/**
|
|
93
|
+
* Build compiled responses keyed by entry id. Called once at config-load.
|
|
94
|
+
*/
|
|
95
|
+
export declare function compileEntryResponses(entries: readonly Entry[]): Map<string, CompiledResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* Walk a JSON value at config-load, compiling every string leaf that contains `{{` into a
|
|
98
|
+
* CompiledTemplate. Strings without `{{` become literal nodes; numbers / booleans / null pass
|
|
99
|
+
* through unchanged. Arrays and objects recurse.
|
|
100
|
+
*
|
|
101
|
+
* Pure-placeholder strings (where the WHOLE string is a single {{...}}) become `type_placeholder`
|
|
102
|
+
* nodes that render type-preservingly at request time. Mixed strings (literal + placeholder)
|
|
103
|
+
* remain `template` nodes and render as strings.
|
|
104
|
+
*/
|
|
105
|
+
export declare function compileJsonValue(value: unknown): CompiledJsonValue;
|
|
106
|
+
/**
|
|
107
|
+
* Render a compiled JSON tree at request time. O(node count) with budget tracking.
|
|
108
|
+
*
|
|
109
|
+
* The `budget` parameter (RenderBudget) is threaded through the walk and enforces:
|
|
110
|
+
* - incremental byte cap (S4 / RT-1.5): throws PAYLOAD_TOO_LARGE before serialization
|
|
111
|
+
* - max recursion depth (T14 / RT-1.3): throws MAX_DEPTH_EXCEEDED
|
|
112
|
+
* - cycle detection on substituted request-body values (RT-1.3): throws CYCLE_DETECTED
|
|
113
|
+
*
|
|
114
|
+
* The budget is OPTIONAL for backward compatibility — callers without a budget get a permissive
|
|
115
|
+
* default (1 MB / depth 64). Explicit budgets let the HTTP boundary (static-mock) tighten limits.
|
|
116
|
+
*/
|
|
117
|
+
export declare function renderCompiledJson(node: CompiledJsonValue, ctx: TemplateContext, budget?: RenderBudget): unknown;
|
|
118
|
+
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../../src/core/templating/compiler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,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B,CA2BlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,EACvB,GAAG,EAAE,eAAe,EACpB,MAAM,GAAE,YAAiC,GACxC,OAAO,CAwCT"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FakerInstance {
|
|
2
|
+
uuid(): string;
|
|
3
|
+
email(): string;
|
|
4
|
+
name(): string;
|
|
5
|
+
integer(min: number, max: number): number;
|
|
6
|
+
pick<T>(items: readonly T[]): T;
|
|
7
|
+
boolean(): boolean;
|
|
8
|
+
dateIso(): string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createFaker(opts: {
|
|
11
|
+
deterministic: boolean;
|
|
12
|
+
seed?: number;
|
|
13
|
+
}): FakerInstance;
|
|
14
|
+
//# sourceMappingURL=faker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faker.d.ts","sourceRoot":"","sources":["../../../src/core/templating/faker.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,IAAI,IAAI,MAAM,CAAC;IACf,KAAK,IAAI,MAAM,CAAC;IAChB,IAAI,IAAI,MAAM,CAAC;IACf,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,OAAO,IAAI,OAAO,CAAC;IACnB,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,aAAa,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAiB1F"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { compileTemplate, compileEntryResponses, compileJsonValue, renderCompiledJson, type CompiledTemplate, type CompiledResponse, type CompiledJsonValue, type TemplateContext, type TemplateOp, } from "./compiler.ts";
|
|
2
|
+
export { createFaker, type FakerInstance } from "./faker.ts";
|
|
3
|
+
export { createClock, createIdHelpers, RenderBudget, Tier2RenderError, BASE62, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_MAX_DEPTH, fnv1a, mulberry32, type Clock, type ClockOptions, type IdHelpers, type IdSeed, type Tier2ErrorCode, type RenderBudgetOptions, } from "./tier2/index.ts";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/templating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
2
|
+
export interface IdSeed {
|
|
3
|
+
deterministic: boolean;
|
|
4
|
+
tenant: string;
|
|
5
|
+
endpoint: string;
|
|
6
|
+
requestCounter: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IdHelpers {
|
|
9
|
+
/** Generate an opaque ID of `length` characters prefixed with `prefix` from `alphabet` (default base62). */
|
|
10
|
+
id(prefix: string, length: number, alphabet?: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Like `id()` but memoised by `name` within this helper instance (i.e. per request).
|
|
13
|
+
* Multiple `{{id.named("order_id", ...)}}` tokens in the same fixture resolve to the *same*
|
|
14
|
+
* value, so cross-referenced fields (e.g. `body.id` and `body.links[].href`) stay consistent.
|
|
15
|
+
* First call wins — later calls with different prefix/length/alphabet are *ignored* and the
|
|
16
|
+
* cached value is returned (they would produce a mismatch anyway).
|
|
17
|
+
*/
|
|
18
|
+
namedId(name: string, prefix: string, length: number, alphabet?: string): string;
|
|
19
|
+
}
|
|
20
|
+
export declare function createIdHelpers(seed: IdSeed): IdHelpers;
|
|
21
|
+
type RandBytes = (size: number) => Uint8Array;
|
|
22
|
+
/** 32-bit FNV-1a hash. Produces a 32-bit unsigned seed from a string. */
|
|
23
|
+
export declare function fnv1a(str: string): number;
|
|
24
|
+
/** Mulberry32 PRNG — 32-bit state, chosen for being small, fast, and well-tested in JS contexts. */
|
|
25
|
+
export declare function mulberry32(seed: number): RandBytes;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../../src/core/templating/tier2/id.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,MAAM,mEAAmE,CAAC;AAEvF,MAAM,WAAW,MAAM;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,4GAA4G;IAC5G,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9D;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CA0BvD;AAID,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC;AA+B9C,yEAAyE;AACzE,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOzC;AAED,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAalD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createIdHelpers, fnv1a, mulberry32, BASE62, type IdHelpers, type IdSeed, } from "./id.ts";
|
|
2
|
+
export { createClock, type Clock, type ClockOptions } from "./now.ts";
|
|
3
|
+
export { RenderBudget, Tier2RenderError, estimateJsonSize, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_MAX_DEPTH, type Tier2ErrorCode, type RenderBudgetOptions, } from "./walker.ts";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/templating/tier2/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,KAAK,EACL,UAAU,EACV,MAAM,EACN,KAAK,SAAS,EACd,KAAK,MAAM,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Clock {
|
|
2
|
+
/** Unix seconds (integer). */
|
|
3
|
+
unix(): number;
|
|
4
|
+
/** Unix milliseconds (integer). */
|
|
5
|
+
millis(): number;
|
|
6
|
+
/** RFC 3339 / ISO-8601 timestamp string. */
|
|
7
|
+
iso(): string;
|
|
8
|
+
}
|
|
9
|
+
export interface ClockOptions {
|
|
10
|
+
deterministic: boolean;
|
|
11
|
+
/** When deterministic, the fixed epoch used for every call. Default: 2026-01-01T00:00:00Z. */
|
|
12
|
+
fixedEpochMs?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function createClock(opts: ClockOptions): Clock;
|
|
15
|
+
//# sourceMappingURL=now.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now.d.ts","sourceRoot":"","sources":["../../../../src/core/templating/tier2/now.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,KAAK;IACpB,8BAA8B;IAC9B,IAAI,IAAI,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,IAAI,MAAM,CAAC;IACjB,4CAA4C;IAC5C,GAAG,IAAI,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,KAAK,CAgBrD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const DEFAULT_MAX_RESPONSE_BYTES = 1000000;
|
|
2
|
+
export declare const DEFAULT_MAX_DEPTH = 64;
|
|
3
|
+
export type Tier2ErrorCode = "PAYLOAD_TOO_LARGE" | "MAX_DEPTH_EXCEEDED" | "CYCLE_DETECTED";
|
|
4
|
+
export declare class Tier2RenderError extends Error {
|
|
5
|
+
readonly code: Tier2ErrorCode;
|
|
6
|
+
readonly httpStatus: number;
|
|
7
|
+
constructor(code: Tier2ErrorCode, message: string);
|
|
8
|
+
}
|
|
9
|
+
export interface RenderBudgetOptions {
|
|
10
|
+
maxBytes?: number;
|
|
11
|
+
maxDepth?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Mutable per-request state. Single instance threaded through the walker; we avoid closure/allocation
|
|
15
|
+
* overhead on the hot path by mutating in place.
|
|
16
|
+
*/
|
|
17
|
+
export declare class RenderBudget {
|
|
18
|
+
readonly maxBytes: number;
|
|
19
|
+
readonly maxDepth: number;
|
|
20
|
+
bytes: number;
|
|
21
|
+
depth: number;
|
|
22
|
+
/** Visit set for cycle detection. Keyed by object identity (objects/arrays only). */
|
|
23
|
+
private readonly seen;
|
|
24
|
+
constructor(opts?: RenderBudgetOptions);
|
|
25
|
+
/** Add `delta` bytes; throw 413 if this would exceed the cap. Check happens BEFORE the write. */
|
|
26
|
+
consume(delta: number): void;
|
|
27
|
+
enterDepth(): void;
|
|
28
|
+
exitDepth(): void;
|
|
29
|
+
/** Register a visited object for cycle detection. Returns true if already seen (cycle). */
|
|
30
|
+
markSeen(obj: object): boolean;
|
|
31
|
+
/** Remove from visit set on unwind (objects can legitimately appear twice in siblings, not ancestry). */
|
|
32
|
+
forget(obj: object): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Estimate the on-wire size of a fully-rendered JSON value. Used for leaves produced by
|
|
36
|
+
* `{{request.body.x}}` substitutions that materialise foreign (non-template) values — we need
|
|
37
|
+
* to know their size BEFORE JSON.stringify allocates the whole response string.
|
|
38
|
+
*
|
|
39
|
+
* Tight enough for the budget check; does NOT have to match JSON.stringify byte-for-byte
|
|
40
|
+
* (it's intentionally a lower bound with small overhead).
|
|
41
|
+
*/
|
|
42
|
+
export declare function estimateJsonSize(value: unknown, budget: RenderBudget): number;
|
|
43
|
+
//# sourceMappingURL=walker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../../../src/core/templating/tier2/walker.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,0BAA0B,UAAY,CAAC;AACpD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAE3F,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAChB,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM;CAMlD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,KAAK,SAAK;IACV,KAAK,SAAK;IACV,qFAAqF;IACrF,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkC;gBAE3C,IAAI,GAAE,mBAAwB;IAK1C,iGAAiG;IACjG,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAU5B,UAAU,IAAI,IAAI;IAOlB,SAAS,IAAI,IAAI;IAIjB,2FAA2F;IAC3F,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAM9B,yGAAyG;IACzG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAG1B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CAsC7E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Context, MiddlewareHandler } from "hono";
|
|
2
|
+
import type { TenancyModeT } from "../config/schema.ts";
|
|
3
|
+
export declare class MissingTenantError extends Error {
|
|
4
|
+
readonly mode: TenancyModeT;
|
|
5
|
+
constructor(mode: TenancyModeT);
|
|
6
|
+
}
|
|
7
|
+
export interface TenancyOptions {
|
|
8
|
+
modes: readonly TenancyModeT[];
|
|
9
|
+
/** When true, respond 400 if no tenant can be extracted. Otherwise rewrite to 'default'. */
|
|
10
|
+
strict?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The first middleware in the chain. Extracts tenant identity exactly once
|
|
14
|
+
* and attaches it to the request context. Downstream code reads only
|
|
15
|
+
* `ctx.var.tenant` (RT-4.1, RT-4.2).
|
|
16
|
+
*/
|
|
17
|
+
export declare function tenantMiddleware(opts: TenancyOptions): MiddlewareHandler;
|
|
18
|
+
/** Read the effective path for route matching (after /t/{tenant} stripping, if any). */
|
|
19
|
+
export declare function effectivePath(ctx: Context): string;
|
|
20
|
+
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/core/tenancy/extractor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,qBAAa,kBAAmB,SAAQ,KAAK;aACf,IAAI,EAAE,YAAY;gBAAlB,IAAI,EAAE,YAAY;CAI/C;AAID,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,4FAA4F;IAC5F,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,iBAAiB,CAgBxE;AAoCD,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tenancy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MiddlewareHandler } from "hono";
|
|
2
|
+
import type { ConfigSnapshot } from "../../core/config/snapshot.ts";
|
|
3
|
+
export type AdminScope = "tenant" | "root";
|
|
4
|
+
export interface AdminAuthContext {
|
|
5
|
+
scope: AdminScope;
|
|
6
|
+
tenant: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface AdminAuthOptions {
|
|
9
|
+
snapshot: () => ConfigSnapshot;
|
|
10
|
+
/** Which scope this endpoint accepts — tenant means tenant-scoped tokens only. */
|
|
11
|
+
scope: AdminScope;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Middleware producing 401 on missing/bad token, 403 on correct-but-wrong-scope.
|
|
15
|
+
* Populates `ctx.var.adminAuth` for downstream handlers.
|
|
16
|
+
*/
|
|
17
|
+
export declare function adminAuthMiddleware(opts: AdminAuthOptions): MiddlewareHandler;
|
|
18
|
+
export declare function constantTimeEquals(a: string, b: string): boolean;
|
|
19
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/features/admin/auth.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,cAAc,CAAC;IAC/B,kFAAkF;IAClF,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CAoC7E;AAaD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAchE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Hono } from "hono";
|
|
2
|
+
import type { SnapshotHolder } from "../../core/config/snapshot.ts";
|
|
3
|
+
import type { JournalRegistry } from "../../core/journal/index.ts";
|
|
4
|
+
import type { Metrics } from "../../core/observability/index.ts";
|
|
5
|
+
import type { ReplayResult } from "../../server.ts";
|
|
6
|
+
import type { DeliveryEventRegistry, WebhookJournalRegistry } from "../webhooks/index.ts";
|
|
7
|
+
export interface AdminDeps {
|
|
8
|
+
holder: SnapshotHolder;
|
|
9
|
+
journal: JournalRegistry;
|
|
10
|
+
metrics: Metrics;
|
|
11
|
+
ready: {
|
|
12
|
+
current: () => boolean;
|
|
13
|
+
set: (v: boolean) => void;
|
|
14
|
+
};
|
|
15
|
+
webhookJournal?: WebhookJournalRegistry;
|
|
16
|
+
webhookEvents?: DeliveryEventRegistry;
|
|
17
|
+
/** INT-2: re-enqueue a delivery by id. Provided by createServer when webhooks are enabled. */
|
|
18
|
+
replayWebhook?: (tenant: string, deliveryId: string) => ReplayResult;
|
|
19
|
+
}
|
|
20
|
+
export declare function adminRouter(deps: AdminDeps): Hono;
|
|
21
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/features/admin/endpoints.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAG1F,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,OAAO,CAAC;QAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;IAC7D,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,8FAA8F;IAC9F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,YAAY,CAAC;CACtE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAqLjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from "hono";
|
|
2
|
+
import type { Entry } from "../core/config/schema.ts";
|
|
3
|
+
import { type BoundaryOptions } from "../core/errors/index.ts";
|
|
4
|
+
import type { HandlerRegistry } from "../core/handlers/index.ts";
|
|
5
|
+
import type { FakerInstance } from "../core/templating/faker.ts";
|
|
6
|
+
export interface DynamicInput {
|
|
7
|
+
entry: Entry;
|
|
8
|
+
ctx: Context;
|
|
9
|
+
registry: HandlerRegistry;
|
|
10
|
+
tenant: string;
|
|
11
|
+
requestId: string;
|
|
12
|
+
faker: FakerInstance;
|
|
13
|
+
boundary: BoundaryOptions;
|
|
14
|
+
}
|
|
15
|
+
export declare function renderDynamic(input: DynamicInput): Promise<Response>;
|
|
16
|
+
//# sourceMappingURL=dynamic-mock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-mock.d.ts","sourceRoot":"","sources":["../../src/features/dynamic-mock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuC1E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const GENERATED_KEY = "_mockstarGenerated";
|
|
2
|
+
export declare const GENERATED_VERSION = 1;
|
|
3
|
+
/** Rewrite recorded per-mock entry. */
|
|
4
|
+
export interface GeneratedEntry {
|
|
5
|
+
/** Mock entry id (from `mocks[].id`). */
|
|
6
|
+
entry: string;
|
|
7
|
+
/** JSON-pointer-ish dot path into the response body where a substitution was made. */
|
|
8
|
+
path: string;
|
|
9
|
+
/** The Tier 2 template token that was injected (e.g. `{{id("order_", 14)}}`). */
|
|
10
|
+
token: string;
|
|
11
|
+
/** The original literal value, preserved so re-enhance can detect drift vs. user edits. */
|
|
12
|
+
original: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface GeneratedManifest {
|
|
15
|
+
version: typeof GENERATED_VERSION;
|
|
16
|
+
enhancedAt: string;
|
|
17
|
+
entries: GeneratedEntry[];
|
|
18
|
+
providerTag: string | null;
|
|
19
|
+
}
|
|
20
|
+
/** Extract the generated manifest from a raw mock-file object, if present. */
|
|
21
|
+
export declare function readManifest(raw: Record<string, unknown>): GeneratedManifest | null;
|
|
22
|
+
/** Write a fresh manifest into the mock-file object, replacing any prior generated block. */
|
|
23
|
+
export declare function writeManifest(raw: Record<string, unknown>, manifest: GeneratedManifest): void;
|
|
24
|
+
/** Remove the generated manifest entirely (for reset-before-re-enhance). */
|
|
25
|
+
export declare function clearManifest(raw: Record<string, unknown>): void;
|
|
26
|
+
//# sourceMappingURL=boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../src/features/enhance/boundary.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAClD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,iBAAiB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAYnF;AAED,6FAA6F;AAC7F,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAE7F;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAEhE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Provider -> ID prefix mapping. Kept generic via a lookup table; provider names never leak into core. */
|
|
2
|
+
export interface EnhanceHint {
|
|
3
|
+
providerTag: string | null;
|
|
4
|
+
/** Hints from a parsed spec — field names known to belong to this endpoint (optional). */
|
|
5
|
+
knownFieldNames?: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
export interface FieldRewrite {
|
|
8
|
+
/** The Tier 2 template token to substitute for the original literal value. */
|
|
9
|
+
token: string;
|
|
10
|
+
/** Reason for rewrite (goes into the manifest for diagnostics). */
|
|
11
|
+
reason: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Decide whether a `field: value` leaf should be rewritten to a Tier 2 placeholder. Returns
|
|
15
|
+
* null if no rewrite applies (literal preserved).
|
|
16
|
+
*
|
|
17
|
+
* The heuristic is intentionally simple and conservative: if in doubt, leave it alone. A false
|
|
18
|
+
* negative (no rewrite) only reduces dynamism; a false positive (wrong rewrite) breaks provider
|
|
19
|
+
* regex validation. Per TN6 resolution: ambiguous mappings are left as literals plus a warning,
|
|
20
|
+
* not silently substituted.
|
|
21
|
+
*/
|
|
22
|
+
export declare function decideRewrite(fieldName: string, value: unknown, hint: EnhanceHint): FieldRewrite | null;
|
|
23
|
+
//# sourceMappingURL=field-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-mapping.d.ts","sourceRoot":"","sources":["../../../src/features/enhance/field-mapping.ts"],"names":[],"mappings":"AAGA,2GAA2G;AAC3G,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,0FAA0F;IAC1F,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,YAAY,GAAG,IAAI,CA0BvG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface EnhanceOptions {
|
|
2
|
+
/** Directory containing Mockstar mock files (JSON). Walked non-recursively. */
|
|
3
|
+
inputDir: string;
|
|
4
|
+
/** Optional spec file to harvest field-name hints from (per TN6). */
|
|
5
|
+
specPath?: string;
|
|
6
|
+
/** Dry run: print diff without writing. */
|
|
7
|
+
dryRun?: boolean;
|
|
8
|
+
/** Fixed timestamp for `enhancedAt` — used by tests to make byte-identity assertions possible. */
|
|
9
|
+
now?: () => string;
|
|
10
|
+
/** When true, override an existing manifest's provenance; otherwise we preserve `enhancedAt`
|
|
11
|
+
for unchanged files so re-runs are byte-identical (O3). */
|
|
12
|
+
forceRefreshTimestamp?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface EnhanceResult {
|
|
15
|
+
filesScanned: number;
|
|
16
|
+
filesChanged: number;
|
|
17
|
+
rewrites: number;
|
|
18
|
+
warnings: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function runEnhance(opts: EnhanceOptions): Promise<EnhanceResult>;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/enhance/index.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB;kEAC8D;IAC9D,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAWD,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAuB7E"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface OpenApiDoc {
|
|
2
|
+
openapi?: string;
|
|
3
|
+
swagger?: string;
|
|
4
|
+
servers?: Array<{
|
|
5
|
+
url: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}>;
|
|
8
|
+
paths?: Record<string, PathItemObject>;
|
|
9
|
+
components?: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface PathItemObject {
|
|
12
|
+
[method: string]: OperationObject | unknown;
|
|
13
|
+
}
|
|
14
|
+
interface OperationObject {
|
|
15
|
+
operationId?: string;
|
|
16
|
+
responses?: Record<string, ResponseObject>;
|
|
17
|
+
parameters?: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
in: string;
|
|
20
|
+
schema?: unknown;
|
|
21
|
+
example?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
interface ResponseObject {
|
|
25
|
+
description?: string;
|
|
26
|
+
content?: Record<string, MediaTypeObject>;
|
|
27
|
+
}
|
|
28
|
+
interface MediaTypeObject {
|
|
29
|
+
example?: unknown;
|
|
30
|
+
examples?: Record<string, {
|
|
31
|
+
value?: unknown;
|
|
32
|
+
}>;
|
|
33
|
+
schema?: unknown;
|
|
34
|
+
}
|
|
35
|
+
export declare class OpenApiImportError extends Error {
|
|
36
|
+
readonly detail?: unknown | undefined;
|
|
37
|
+
constructor(message: string, detail?: unknown | undefined);
|
|
38
|
+
}
|
|
39
|
+
export interface ConvertOptions {
|
|
40
|
+
allowPrivateUpstreams?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Convert an OpenAPI document into Mockstar mock entries. Rejects any input
|
|
44
|
+
* that contains external `$ref`s ($ref values starting with '#' are allowed;
|
|
45
|
+
* anything else is a security error — CVE-2026-39885 class).
|
|
46
|
+
*/
|
|
47
|
+
export declare function convertOpenApi(doc: unknown, opts?: ConvertOptions): Array<Record<string, unknown>>;
|
|
48
|
+
/**
|
|
49
|
+
* OpenAPI uses `{name}` path params; we rewrite to `:name` for Hono-style
|
|
50
|
+
* matching. Path segments are URL-encoded to prevent traversal attacks
|
|
51
|
+
* (RT-8.4, addresses FastMCP CVE-2026-32871).
|
|
52
|
+
*/
|
|
53
|
+
export declare function encodePathTemplate(openapiPath: string): string;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../src/features/openapi/converter.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,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
|
2
|
+
specPath: string;
|
|
3
|
+
outDir: string;
|
|
4
|
+
allowPrivateUpstreams?: boolean;
|
|
5
|
+
tenantName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function runImporter(args: ImporterArgs): Promise<{
|
|
8
|
+
entryCount: number;
|
|
9
|
+
outFile: string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=importer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importer.d.ts","sourceRoot":"","sources":["../../../src/features/openapi/importer.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAUtG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/openapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Context } from "hono";
|
|
2
|
+
import type { Entry } from "../core/config/schema.ts";
|
|
3
|
+
import type { StructuredLogger } from "../core/observability/logger.ts";
|
|
4
|
+
export interface PassThroughOptions {
|
|
5
|
+
allowPrivateUpstreams: boolean;
|
|
6
|
+
logger: StructuredLogger;
|
|
7
|
+
}
|
|
8
|
+
export declare function renderPassThrough(entry: Entry, ctx: Context, opts: PassThroughOptions): Promise<Response>;
|
|
9
|
+
//# sourceMappingURL=pass-through.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pass-through.d.ts","sourceRoot":"","sources":["../../src/features/pass-through.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,QAAQ,CAAC,CAsFnB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface CaPaths {
|
|
2
|
+
readonly caRoot: string;
|
|
3
|
+
readonly rootCertPem: string;
|
|
4
|
+
readonly rootKeyPem: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CaFacts {
|
|
7
|
+
readonly paths: CaPaths;
|
|
8
|
+
readonly installed: boolean;
|
|
9
|
+
readonly commonName: string;
|
|
10
|
+
readonly nodeExtraCaCertsCommand: string;
|
|
11
|
+
}
|
|
12
|
+
/** Build the scoped CN used for the dev CA (S5 — self-identifying). */
|
|
13
|
+
export declare function scopedCommonName(user: string, host: string): string;
|
|
14
|
+
/** Return the mkcert CAROOT directory and the standard file paths within it. */
|
|
15
|
+
export declare function resolveCaPaths(): Promise<CaPaths>;
|
|
16
|
+
/** Is the CA currently trusted by the OS? Inferred by whether rootCA.pem exists + mkcert reports installed. */
|
|
17
|
+
export declare function isCaInstalled(paths: CaPaths): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Run `mkcert -install`. Safe to call multiple times (mkcert itself is idempotent).
|
|
20
|
+
* Records no journal entry here — the caller is responsible for journaling via install-journal.ts.
|
|
21
|
+
*/
|
|
22
|
+
export declare function installCa(): Promise<void>;
|
|
23
|
+
/** Run `mkcert -uninstall`. Safe to call multiple times. */
|
|
24
|
+
export declare function uninstallCa(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Enforce 0600 on rootCA-key.pem (S1). Returns the file's mode after normalisation.
|
|
27
|
+
* Refuses if the file is currently readable by others and chmod cannot reach 0600.
|
|
28
|
+
*/
|
|
29
|
+
export declare function enforceKeyPermissions(paths: CaPaths): Promise<number>;
|
|
30
|
+
/**
|
|
31
|
+
* Generate a leaf cert + key for the given hostname, valid for `ttlHours`.
|
|
32
|
+
* Writes to a scratch dir (mkcert's default is CWD), returns PEM strings in memory.
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateLeaf(host: string, opts: {
|
|
35
|
+
ttlHours: number;
|
|
36
|
+
scratchDir: string;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
certPem: string;
|
|
39
|
+
keyPem: string;
|
|
40
|
+
expiresAt: number;
|
|
41
|
+
}>;
|
|
42
|
+
/** The user-facing string for the install output (U4). */
|
|
43
|
+
export declare function nodeExtraCaCertsMessage(paths: CaPaths): string;
|
|
44
|
+
/** Return a CaFacts summary suitable for `mockstar proxy status`. */
|
|
45
|
+
export declare function caFacts(params: {
|
|
46
|
+
user: string;
|
|
47
|
+
hostname: string;
|
|
48
|
+
}): Promise<CaFacts>;
|
|
49
|
+
//# sourceMappingURL=ca.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ca.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/ca.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;A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