@crvouga/mockingbird-service-workos 1.2.0 → 1.3.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/dist/{chunk-LE5B6IJG.js → chunk-DW6XZF4X.js} +108 -5
- package/dist/chunk-DW6XZF4X.js.map +7 -0
- package/dist/chunk-JPFEQTV6.js +4743 -0
- package/dist/chunk-JPFEQTV6.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-LE5B6IJG.js.map +0 -7
- package/dist/chunk-X5OR3IYU.js +0 -935
- package/dist/chunk-X5OR3IYU.js.map +0 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -552,6 +552,8 @@ type SnapshotDocument = {
|
|
|
552
552
|
faults?: unknown;
|
|
553
553
|
latency?: unknown;
|
|
554
554
|
virtualTime?: boolean;
|
|
555
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
556
|
+
webhooks?: unknown;
|
|
555
557
|
};
|
|
556
558
|
/** Controls for one namespace. */
|
|
557
559
|
type NamespaceControls = {
|
|
@@ -765,6 +767,8 @@ type CredentialRegistry = {
|
|
|
765
767
|
}[];
|
|
766
768
|
};
|
|
767
769
|
|
|
770
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
771
|
+
|
|
768
772
|
/**
|
|
769
773
|
* A point-in-time copy of everything a service namespace holds.
|
|
770
774
|
*
|
|
@@ -882,8 +886,16 @@ type PublishInput = {
|
|
|
882
886
|
id?: string;
|
|
883
887
|
};
|
|
884
888
|
type WebhookHub = {
|
|
889
|
+
observeDeliveries(listener: (event: {
|
|
890
|
+
namespace: string;
|
|
891
|
+
state: string;
|
|
892
|
+
deliveryId: string;
|
|
893
|
+
}) => void): () => void;
|
|
894
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
885
895
|
pending(namespace: string): number;
|
|
886
896
|
snapshot(namespace: string): unknown;
|
|
897
|
+
exportSnapshot(handle: unknown): unknown;
|
|
898
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
887
899
|
restore(namespace: string, snapshot: unknown): void;
|
|
888
900
|
publish(input: PublishInput): WebhookMessage;
|
|
889
901
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -896,7 +908,7 @@ type WebhookHub = {
|
|
|
896
908
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
897
909
|
flush(): Promise<void>;
|
|
898
910
|
/** Resolve once nothing is in flight. */
|
|
899
|
-
idle(): Promise<void>;
|
|
911
|
+
idle(namespace?: string): Promise<void>;
|
|
900
912
|
fault(namespace: string, fault: WebhookFault): void;
|
|
901
913
|
clear(namespace?: string): void;
|
|
902
914
|
};
|
|
@@ -940,6 +952,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
940
952
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
941
953
|
fleetSnapshot(namespace: string): object;
|
|
942
954
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
955
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
956
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
943
957
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
944
958
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
945
959
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -446,6 +446,8 @@ type SnapshotDocument$1 = {
|
|
|
446
446
|
faults?: unknown;
|
|
447
447
|
latency?: unknown;
|
|
448
448
|
virtualTime?: boolean;
|
|
449
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
450
|
+
webhooks?: unknown;
|
|
449
451
|
};
|
|
450
452
|
/** Controls for one namespace. */
|
|
451
453
|
type NamespaceControls$1 = {
|
|
@@ -659,6 +661,8 @@ type CredentialRegistry$1 = {
|
|
|
659
661
|
}[];
|
|
660
662
|
};
|
|
661
663
|
|
|
664
|
+
type OwnedTransport$1 = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
665
|
+
|
|
662
666
|
/**
|
|
663
667
|
* A point-in-time copy of everything a service namespace holds.
|
|
664
668
|
*
|
|
@@ -776,8 +780,16 @@ type PublishInput$1 = {
|
|
|
776
780
|
id?: string;
|
|
777
781
|
};
|
|
778
782
|
type WebhookHub$1 = {
|
|
783
|
+
observeDeliveries(listener: (event: {
|
|
784
|
+
namespace: string;
|
|
785
|
+
state: string;
|
|
786
|
+
deliveryId: string;
|
|
787
|
+
}) => void): () => void;
|
|
788
|
+
setTransportPolicy(policy: OwnedTransport$1): void;
|
|
779
789
|
pending(namespace: string): number;
|
|
780
790
|
snapshot(namespace: string): unknown;
|
|
791
|
+
exportSnapshot(handle: unknown): unknown;
|
|
792
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
781
793
|
restore(namespace: string, snapshot: unknown): void;
|
|
782
794
|
publish(input: PublishInput$1): WebhookMessage$1;
|
|
783
795
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -790,7 +802,7 @@ type WebhookHub$1 = {
|
|
|
790
802
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
791
803
|
flush(): Promise<void>;
|
|
792
804
|
/** Resolve once nothing is in flight. */
|
|
793
|
-
idle(): Promise<void>;
|
|
805
|
+
idle(namespace?: string): Promise<void>;
|
|
794
806
|
fault(namespace: string, fault: WebhookFault$1): void;
|
|
795
807
|
clear(namespace?: string): void;
|
|
796
808
|
};
|
|
@@ -834,6 +846,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$2 & {
|
|
|
834
846
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
835
847
|
fleetSnapshot(namespace: string): object;
|
|
836
848
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
849
|
+
fleetExport(snapshot: unknown): SnapshotDocument$1;
|
|
850
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
837
851
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
838
852
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule$1>): FaultRule$1[];
|
|
839
853
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
|
@@ -926,6 +940,7 @@ type CommonServeOptions = {
|
|
|
926
940
|
* `serveTarget`, which is also how `serve --config` finds services by name.
|
|
927
941
|
*/
|
|
928
942
|
type ServeTarget = {
|
|
943
|
+
packageVersion?: string;
|
|
929
944
|
name: string;
|
|
930
945
|
defaultPort: number;
|
|
931
946
|
/** Serve flags beyond the common ones. */
|
|
@@ -1436,6 +1451,8 @@ type SnapshotDocument = {
|
|
|
1436
1451
|
faults?: unknown;
|
|
1437
1452
|
latency?: unknown;
|
|
1438
1453
|
virtualTime?: boolean;
|
|
1454
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
1455
|
+
webhooks?: unknown;
|
|
1439
1456
|
};
|
|
1440
1457
|
/** Controls for one namespace. */
|
|
1441
1458
|
type NamespaceControls = {
|
|
@@ -1649,6 +1666,8 @@ type CredentialRegistry = {
|
|
|
1649
1666
|
}[];
|
|
1650
1667
|
};
|
|
1651
1668
|
|
|
1669
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
1670
|
+
|
|
1652
1671
|
/**
|
|
1653
1672
|
* A point-in-time copy of everything a service namespace holds.
|
|
1654
1673
|
*
|
|
@@ -1766,8 +1785,16 @@ type PublishInput = {
|
|
|
1766
1785
|
id?: string;
|
|
1767
1786
|
};
|
|
1768
1787
|
type WebhookHub = {
|
|
1788
|
+
observeDeliveries(listener: (event: {
|
|
1789
|
+
namespace: string;
|
|
1790
|
+
state: string;
|
|
1791
|
+
deliveryId: string;
|
|
1792
|
+
}) => void): () => void;
|
|
1793
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
1769
1794
|
pending(namespace: string): number;
|
|
1770
1795
|
snapshot(namespace: string): unknown;
|
|
1796
|
+
exportSnapshot(handle: unknown): unknown;
|
|
1797
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
1771
1798
|
restore(namespace: string, snapshot: unknown): void;
|
|
1772
1799
|
publish(input: PublishInput): WebhookMessage;
|
|
1773
1800
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -1780,7 +1807,7 @@ type WebhookHub = {
|
|
|
1780
1807
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
1781
1808
|
flush(): Promise<void>;
|
|
1782
1809
|
/** Resolve once nothing is in flight. */
|
|
1783
|
-
idle(): Promise<void>;
|
|
1810
|
+
idle(namespace?: string): Promise<void>;
|
|
1784
1811
|
fault(namespace: string, fault: WebhookFault): void;
|
|
1785
1812
|
clear(namespace?: string): void;
|
|
1786
1813
|
};
|
|
@@ -1824,6 +1851,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
1824
1851
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
1825
1852
|
fleetSnapshot(namespace: string): object;
|
|
1826
1853
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
1854
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
1855
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
1827
1856
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
1828
1857
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
1829
1858
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/server.js
CHANGED
package/package.json
CHANGED