@crvouga/mockingbird-service-prism 3.3.0 → 3.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 +18 -4
- package/dist/chunk-PBOYVURR.js +4776 -0
- package/dist/chunk-PBOYVURR.js.map +7 -0
- package/dist/{chunk-FMOVUFAE.js → chunk-WQBFFEMX.js} +108 -5
- package/dist/chunk-WQBFFEMX.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +15 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +31 -2
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-BUVISTQJ.js +0 -968
- package/dist/chunk-BUVISTQJ.js.map +0 -7
- package/dist/chunk-FMOVUFAE.js.map +0 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -534,6 +534,8 @@ type SnapshotDocument = {
|
|
|
534
534
|
faults?: unknown;
|
|
535
535
|
latency?: unknown;
|
|
536
536
|
virtualTime?: boolean;
|
|
537
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
538
|
+
webhooks?: unknown;
|
|
537
539
|
};
|
|
538
540
|
/** Controls for one namespace. */
|
|
539
541
|
type NamespaceControls = {
|
|
@@ -747,6 +749,8 @@ type CredentialRegistry = {
|
|
|
747
749
|
}[];
|
|
748
750
|
};
|
|
749
751
|
|
|
752
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
753
|
+
|
|
750
754
|
/**
|
|
751
755
|
* A point-in-time copy of everything a service namespace holds.
|
|
752
756
|
*
|
|
@@ -864,8 +868,16 @@ type PublishInput = {
|
|
|
864
868
|
id?: string;
|
|
865
869
|
};
|
|
866
870
|
type WebhookHub = {
|
|
871
|
+
observeDeliveries(listener: (event: {
|
|
872
|
+
namespace: string;
|
|
873
|
+
state: string;
|
|
874
|
+
deliveryId: string;
|
|
875
|
+
}) => void): () => void;
|
|
876
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
867
877
|
pending(namespace: string): number;
|
|
868
878
|
snapshot(namespace: string): unknown;
|
|
879
|
+
exportSnapshot(handle: unknown): unknown;
|
|
880
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
869
881
|
restore(namespace: string, snapshot: unknown): void;
|
|
870
882
|
publish(input: PublishInput): WebhookMessage;
|
|
871
883
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -878,7 +890,7 @@ type WebhookHub = {
|
|
|
878
890
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
879
891
|
flush(): Promise<void>;
|
|
880
892
|
/** Resolve once nothing is in flight. */
|
|
881
|
-
idle(): Promise<void>;
|
|
893
|
+
idle(namespace?: string): Promise<void>;
|
|
882
894
|
fault(namespace: string, fault: WebhookFault): void;
|
|
883
895
|
clear(namespace?: string): void;
|
|
884
896
|
};
|
|
@@ -922,6 +934,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
922
934
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
923
935
|
fleetSnapshot(namespace: string): object;
|
|
924
936
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
937
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
938
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
925
939
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
926
940
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
927
941
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -445,6 +445,8 @@ type SnapshotDocument$1 = {
|
|
|
445
445
|
faults?: unknown;
|
|
446
446
|
latency?: unknown;
|
|
447
447
|
virtualTime?: boolean;
|
|
448
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
449
|
+
webhooks?: unknown;
|
|
448
450
|
};
|
|
449
451
|
/** Controls for one namespace. */
|
|
450
452
|
type NamespaceControls$1 = {
|
|
@@ -658,6 +660,8 @@ type CredentialRegistry$1 = {
|
|
|
658
660
|
}[];
|
|
659
661
|
};
|
|
660
662
|
|
|
663
|
+
type OwnedTransport$1 = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
664
|
+
|
|
661
665
|
/**
|
|
662
666
|
* A point-in-time copy of everything a service namespace holds.
|
|
663
667
|
*
|
|
@@ -775,8 +779,16 @@ type PublishInput$1 = {
|
|
|
775
779
|
id?: string;
|
|
776
780
|
};
|
|
777
781
|
type WebhookHub$1 = {
|
|
782
|
+
observeDeliveries(listener: (event: {
|
|
783
|
+
namespace: string;
|
|
784
|
+
state: string;
|
|
785
|
+
deliveryId: string;
|
|
786
|
+
}) => void): () => void;
|
|
787
|
+
setTransportPolicy(policy: OwnedTransport$1): void;
|
|
778
788
|
pending(namespace: string): number;
|
|
779
789
|
snapshot(namespace: string): unknown;
|
|
790
|
+
exportSnapshot(handle: unknown): unknown;
|
|
791
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
780
792
|
restore(namespace: string, snapshot: unknown): void;
|
|
781
793
|
publish(input: PublishInput$1): WebhookMessage$1;
|
|
782
794
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -789,7 +801,7 @@ type WebhookHub$1 = {
|
|
|
789
801
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
790
802
|
flush(): Promise<void>;
|
|
791
803
|
/** Resolve once nothing is in flight. */
|
|
792
|
-
idle(): Promise<void>;
|
|
804
|
+
idle(namespace?: string): Promise<void>;
|
|
793
805
|
fault(namespace: string, fault: WebhookFault$1): void;
|
|
794
806
|
clear(namespace?: string): void;
|
|
795
807
|
};
|
|
@@ -833,6 +845,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$2 & {
|
|
|
833
845
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
834
846
|
fleetSnapshot(namespace: string): object;
|
|
835
847
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
848
|
+
fleetExport(snapshot: unknown): SnapshotDocument$1;
|
|
849
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
836
850
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
837
851
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule$1>): FaultRule$1[];
|
|
838
852
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
|
@@ -925,6 +939,7 @@ type CommonServeOptions = {
|
|
|
925
939
|
* `serveTarget`, which is also how `serve --config` finds services by name.
|
|
926
940
|
*/
|
|
927
941
|
type ServeTarget = {
|
|
942
|
+
packageVersion?: string;
|
|
928
943
|
name: string;
|
|
929
944
|
defaultPort: number;
|
|
930
945
|
/** Serve flags beyond the common ones. */
|
|
@@ -1447,6 +1462,8 @@ type SnapshotDocument = {
|
|
|
1447
1462
|
faults?: unknown;
|
|
1448
1463
|
latency?: unknown;
|
|
1449
1464
|
virtualTime?: boolean;
|
|
1465
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
1466
|
+
webhooks?: unknown;
|
|
1450
1467
|
};
|
|
1451
1468
|
/** Controls for one namespace. */
|
|
1452
1469
|
type NamespaceControls = {
|
|
@@ -1660,6 +1677,8 @@ type CredentialRegistry = {
|
|
|
1660
1677
|
}[];
|
|
1661
1678
|
};
|
|
1662
1679
|
|
|
1680
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
1681
|
+
|
|
1663
1682
|
/**
|
|
1664
1683
|
* A point-in-time copy of everything a service namespace holds.
|
|
1665
1684
|
*
|
|
@@ -1777,8 +1796,16 @@ type PublishInput = {
|
|
|
1777
1796
|
id?: string;
|
|
1778
1797
|
};
|
|
1779
1798
|
type WebhookHub = {
|
|
1799
|
+
observeDeliveries(listener: (event: {
|
|
1800
|
+
namespace: string;
|
|
1801
|
+
state: string;
|
|
1802
|
+
deliveryId: string;
|
|
1803
|
+
}) => void): () => void;
|
|
1804
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
1780
1805
|
pending(namespace: string): number;
|
|
1781
1806
|
snapshot(namespace: string): unknown;
|
|
1807
|
+
exportSnapshot(handle: unknown): unknown;
|
|
1808
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
1782
1809
|
restore(namespace: string, snapshot: unknown): void;
|
|
1783
1810
|
publish(input: PublishInput): WebhookMessage;
|
|
1784
1811
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -1791,7 +1818,7 @@ type WebhookHub = {
|
|
|
1791
1818
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
1792
1819
|
flush(): Promise<void>;
|
|
1793
1820
|
/** Resolve once nothing is in flight. */
|
|
1794
|
-
idle(): Promise<void>;
|
|
1821
|
+
idle(namespace?: string): Promise<void>;
|
|
1795
1822
|
fault(namespace: string, fault: WebhookFault): void;
|
|
1796
1823
|
clear(namespace?: string): void;
|
|
1797
1824
|
};
|
|
@@ -1835,6 +1862,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
1835
1862
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
1836
1863
|
fleetSnapshot(namespace: string): object;
|
|
1837
1864
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
1865
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
1866
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
1838
1867
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
1839
1868
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
1840
1869
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-prism",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Stateful emulator of the Prism Labs body-scan API: subjects, scans, presigned capture upload, processing stages to READY, and deterministic body-composition, measurement, health-report and asset results.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|