@crvouga/mockingbird-service-junction 1.3.0 → 1.5.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.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -0
- package/dist/{chunk-LJHOIA7Q.js → chunk-7HA4XGOS.js} +3 -2
- package/dist/{chunk-LJHOIA7Q.js.map → chunk-7HA4XGOS.js.map} +2 -2
- package/dist/{chunk-KSSFYWXV.js → chunk-AKZJPCBU.js} +1484 -94
- package/dist/chunk-AKZJPCBU.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +32 -0
- package/dist/index.js +1 -1
- package/dist/server.d.ts +64 -0
- package/dist/server.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-KSSFYWXV.js.map +0 -7
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
runCli,
|
|
5
5
|
serveCommand,
|
|
6
6
|
serveTarget
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7HA4XGOS.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_JUNCTION_BASE_URL,
|
|
10
10
|
createRuntime,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isSandboxKey,
|
|
13
13
|
pullCorpus,
|
|
14
14
|
verifyAgainstReal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AKZJPCBU.js";
|
|
16
16
|
import {
|
|
17
17
|
defaultCorpus
|
|
18
18
|
} from "./chunk-C2UGIPPM.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -398,6 +398,36 @@ type NamespaceSnapshot = {
|
|
|
398
398
|
}[];
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
+
declare const STATE_FIELD_KINDS: readonly ["string", "number", "boolean", "null", "object", "array", "unknown"];
|
|
402
|
+
type StateFieldKind = (typeof STATE_FIELD_KINDS)[number];
|
|
403
|
+
/** JSON-safe annotations a bespoke admin UI may read. The default UI shows them as text. */
|
|
404
|
+
type StateMeta = Readonly<Record<string, string | number | boolean | null>>;
|
|
405
|
+
type StateField = {
|
|
406
|
+
name: string;
|
|
407
|
+
kind: StateFieldKind;
|
|
408
|
+
optional: boolean;
|
|
409
|
+
description?: string;
|
|
410
|
+
/** One level of nested object fields. */
|
|
411
|
+
fields?: StateField[];
|
|
412
|
+
meta?: StateMeta;
|
|
413
|
+
};
|
|
414
|
+
type StateCollectionView = {
|
|
415
|
+
name: string;
|
|
416
|
+
label: string;
|
|
417
|
+
description?: string;
|
|
418
|
+
count: number;
|
|
419
|
+
/** `mixed` when a declaration and stored rows both contribute fields. */
|
|
420
|
+
source: "declared" | "inferred" | "mixed";
|
|
421
|
+
fields: StateField[];
|
|
422
|
+
meta?: StateMeta;
|
|
423
|
+
};
|
|
424
|
+
/** The shape of one namespace, for an admin UI that has never seen the service before. */
|
|
425
|
+
type StateView = {
|
|
426
|
+
namespace: string;
|
|
427
|
+
storageNamespace: string;
|
|
428
|
+
collections: StateCollectionView[];
|
|
429
|
+
};
|
|
430
|
+
|
|
401
431
|
type WebhookEndpoint$1 = {
|
|
402
432
|
/** Stable id; generated when omitted. */
|
|
403
433
|
id?: string;
|
|
@@ -524,6 +554,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
524
554
|
}): void;
|
|
525
555
|
/** Inspect the retained history for a namespace. */
|
|
526
556
|
timeline(namespace?: string): Timeline<ServiceTimelineState>;
|
|
557
|
+
/** Collections in one namespace: declared shape plus what the rows actually hold. */
|
|
558
|
+
state(namespace?: string): StateView;
|
|
527
559
|
};
|
|
528
560
|
|
|
529
561
|
/** Bind values accepted by Mockingbird's SQLite port (matches sqlite-mem / better-sqlite3). */
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -386,6 +386,36 @@ type NamespaceSnapshot$1 = {
|
|
|
386
386
|
}[];
|
|
387
387
|
};
|
|
388
388
|
|
|
389
|
+
declare const STATE_FIELD_KINDS$1: readonly ["string", "number", "boolean", "null", "object", "array", "unknown"];
|
|
390
|
+
type StateFieldKind$1 = (typeof STATE_FIELD_KINDS$1)[number];
|
|
391
|
+
/** JSON-safe annotations a bespoke admin UI may read. The default UI shows them as text. */
|
|
392
|
+
type StateMeta$1 = Readonly<Record<string, string | number | boolean | null>>;
|
|
393
|
+
type StateField$1 = {
|
|
394
|
+
name: string;
|
|
395
|
+
kind: StateFieldKind$1;
|
|
396
|
+
optional: boolean;
|
|
397
|
+
description?: string;
|
|
398
|
+
/** One level of nested object fields. */
|
|
399
|
+
fields?: StateField$1[];
|
|
400
|
+
meta?: StateMeta$1;
|
|
401
|
+
};
|
|
402
|
+
type StateCollectionView$1 = {
|
|
403
|
+
name: string;
|
|
404
|
+
label: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
count: number;
|
|
407
|
+
/** `mixed` when a declaration and stored rows both contribute fields. */
|
|
408
|
+
source: "declared" | "inferred" | "mixed";
|
|
409
|
+
fields: StateField$1[];
|
|
410
|
+
meta?: StateMeta$1;
|
|
411
|
+
};
|
|
412
|
+
/** The shape of one namespace, for an admin UI that has never seen the service before. */
|
|
413
|
+
type StateView$1 = {
|
|
414
|
+
namespace: string;
|
|
415
|
+
storageNamespace: string;
|
|
416
|
+
collections: StateCollectionView$1[];
|
|
417
|
+
};
|
|
418
|
+
|
|
389
419
|
type WebhookEndpoint$2 = {
|
|
390
420
|
/** Stable id; generated when omitted. */
|
|
391
421
|
id?: string;
|
|
@@ -512,6 +542,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$2 & {
|
|
|
512
542
|
}): void;
|
|
513
543
|
/** Inspect the retained history for a namespace. */
|
|
514
544
|
timeline(namespace?: string): Timeline$1<ServiceTimelineState$1>;
|
|
545
|
+
/** Collections in one namespace: declared shape plus what the rows actually hold. */
|
|
546
|
+
state(namespace?: string): StateView$1;
|
|
515
547
|
};
|
|
516
548
|
|
|
517
549
|
type CliOption = {
|
|
@@ -949,6 +981,36 @@ type NamespaceSnapshot = {
|
|
|
949
981
|
}[];
|
|
950
982
|
};
|
|
951
983
|
|
|
984
|
+
declare const STATE_FIELD_KINDS: readonly ["string", "number", "boolean", "null", "object", "array", "unknown"];
|
|
985
|
+
type StateFieldKind = (typeof STATE_FIELD_KINDS)[number];
|
|
986
|
+
/** JSON-safe annotations a bespoke admin UI may read. The default UI shows them as text. */
|
|
987
|
+
type StateMeta = Readonly<Record<string, string | number | boolean | null>>;
|
|
988
|
+
type StateField = {
|
|
989
|
+
name: string;
|
|
990
|
+
kind: StateFieldKind;
|
|
991
|
+
optional: boolean;
|
|
992
|
+
description?: string;
|
|
993
|
+
/** One level of nested object fields. */
|
|
994
|
+
fields?: StateField[];
|
|
995
|
+
meta?: StateMeta;
|
|
996
|
+
};
|
|
997
|
+
type StateCollectionView = {
|
|
998
|
+
name: string;
|
|
999
|
+
label: string;
|
|
1000
|
+
description?: string;
|
|
1001
|
+
count: number;
|
|
1002
|
+
/** `mixed` when a declaration and stored rows both contribute fields. */
|
|
1003
|
+
source: "declared" | "inferred" | "mixed";
|
|
1004
|
+
fields: StateField[];
|
|
1005
|
+
meta?: StateMeta;
|
|
1006
|
+
};
|
|
1007
|
+
/** The shape of one namespace, for an admin UI that has never seen the service before. */
|
|
1008
|
+
type StateView = {
|
|
1009
|
+
namespace: string;
|
|
1010
|
+
storageNamespace: string;
|
|
1011
|
+
collections: StateCollectionView[];
|
|
1012
|
+
};
|
|
1013
|
+
|
|
952
1014
|
type WebhookEndpoint$1 = {
|
|
953
1015
|
/** Stable id; generated when omitted. */
|
|
954
1016
|
id?: string;
|
|
@@ -1075,6 +1137,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
1075
1137
|
}): void;
|
|
1076
1138
|
/** Inspect the retained history for a namespace. */
|
|
1077
1139
|
timeline(namespace?: string): Timeline<ServiceTimelineState>;
|
|
1140
|
+
/** Collections in one namespace: declared shape plus what the rows actually hold. */
|
|
1141
|
+
state(namespace?: string): StateView;
|
|
1078
1142
|
};
|
|
1079
1143
|
|
|
1080
1144
|
/** Bind values accepted by Mockingbird's SQLite port (matches sqlite-mem / better-sqlite3). */
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-junction",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Stateful mock of the Junction (Vital) user API driven by its OpenAPI contract and verified by differential property tests against the Junction sandbox.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"verify": "bun src/cli.ts verify"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@crvouga/mockingbird-service-sqlite": "1.
|
|
89
|
+
"@crvouga/mockingbird-service-sqlite": "1.1.0",
|
|
90
90
|
"hono": "4.11.9"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|