@crvouga/mockingbird-service-formbricks 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-MYBPU56P.js +4779 -0
- package/dist/chunk-MYBPU56P.js.map +7 -0
- package/dist/{chunk-HE5W4CHW.js → chunk-THESW6F4.js} +203 -22
- package/dist/chunk-THESW6F4.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-HE5W4CHW.js.map +0 -7
- package/dist/chunk-S7RQVW5Z.js +0 -971
- package/dist/chunk-S7RQVW5Z.js.map +0 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -768,6 +768,8 @@ type SnapshotDocument = {
|
|
|
768
768
|
faults?: unknown;
|
|
769
769
|
latency?: unknown;
|
|
770
770
|
virtualTime?: boolean;
|
|
771
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
772
|
+
webhooks?: unknown;
|
|
771
773
|
};
|
|
772
774
|
/** Controls for one namespace. */
|
|
773
775
|
type NamespaceControls = {
|
|
@@ -981,6 +983,8 @@ type CredentialRegistry = {
|
|
|
981
983
|
}[];
|
|
982
984
|
};
|
|
983
985
|
|
|
986
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
987
|
+
|
|
984
988
|
/**
|
|
985
989
|
* A point-in-time copy of everything a service namespace holds.
|
|
986
990
|
*
|
|
@@ -1098,8 +1102,16 @@ type PublishInput = {
|
|
|
1098
1102
|
id?: string;
|
|
1099
1103
|
};
|
|
1100
1104
|
type WebhookHub = {
|
|
1105
|
+
observeDeliveries(listener: (event: {
|
|
1106
|
+
namespace: string;
|
|
1107
|
+
state: string;
|
|
1108
|
+
deliveryId: string;
|
|
1109
|
+
}) => void): () => void;
|
|
1110
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
1101
1111
|
pending(namespace: string): number;
|
|
1102
1112
|
snapshot(namespace: string): unknown;
|
|
1113
|
+
exportSnapshot(handle: unknown): unknown;
|
|
1114
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
1103
1115
|
restore(namespace: string, snapshot: unknown): void;
|
|
1104
1116
|
publish(input: PublishInput): WebhookMessage;
|
|
1105
1117
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -1112,7 +1124,7 @@ type WebhookHub = {
|
|
|
1112
1124
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
1113
1125
|
flush(): Promise<void>;
|
|
1114
1126
|
/** Resolve once nothing is in flight. */
|
|
1115
|
-
idle(): Promise<void>;
|
|
1127
|
+
idle(namespace?: string): Promise<void>;
|
|
1116
1128
|
fault(namespace: string, fault: WebhookFault): void;
|
|
1117
1129
|
clear(namespace?: string): void;
|
|
1118
1130
|
};
|
|
@@ -1156,6 +1168,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
1156
1168
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
1157
1169
|
fleetSnapshot(namespace: string): object;
|
|
1158
1170
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
1171
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
1172
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
1159
1173
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
1160
1174
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
1161
1175
|
/** 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. */
|
|
@@ -1681,6 +1696,8 @@ type SnapshotDocument = {
|
|
|
1681
1696
|
faults?: unknown;
|
|
1682
1697
|
latency?: unknown;
|
|
1683
1698
|
virtualTime?: boolean;
|
|
1699
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
1700
|
+
webhooks?: unknown;
|
|
1684
1701
|
};
|
|
1685
1702
|
/** Controls for one namespace. */
|
|
1686
1703
|
type NamespaceControls = {
|
|
@@ -1894,6 +1911,8 @@ type CredentialRegistry = {
|
|
|
1894
1911
|
}[];
|
|
1895
1912
|
};
|
|
1896
1913
|
|
|
1914
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
1915
|
+
|
|
1897
1916
|
/**
|
|
1898
1917
|
* A point-in-time copy of everything a service namespace holds.
|
|
1899
1918
|
*
|
|
@@ -2011,8 +2030,16 @@ type PublishInput = {
|
|
|
2011
2030
|
id?: string;
|
|
2012
2031
|
};
|
|
2013
2032
|
type WebhookHub = {
|
|
2033
|
+
observeDeliveries(listener: (event: {
|
|
2034
|
+
namespace: string;
|
|
2035
|
+
state: string;
|
|
2036
|
+
deliveryId: string;
|
|
2037
|
+
}) => void): () => void;
|
|
2038
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
2014
2039
|
pending(namespace: string): number;
|
|
2015
2040
|
snapshot(namespace: string): unknown;
|
|
2041
|
+
exportSnapshot(handle: unknown): unknown;
|
|
2042
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
2016
2043
|
restore(namespace: string, snapshot: unknown): void;
|
|
2017
2044
|
publish(input: PublishInput): WebhookMessage;
|
|
2018
2045
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -2025,7 +2052,7 @@ type WebhookHub = {
|
|
|
2025
2052
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
2026
2053
|
flush(): Promise<void>;
|
|
2027
2054
|
/** Resolve once nothing is in flight. */
|
|
2028
|
-
idle(): Promise<void>;
|
|
2055
|
+
idle(namespace?: string): Promise<void>;
|
|
2029
2056
|
fault(namespace: string, fault: WebhookFault): void;
|
|
2030
2057
|
clear(namespace?: string): void;
|
|
2031
2058
|
};
|
|
@@ -2069,6 +2096,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
2069
2096
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
2070
2097
|
fleetSnapshot(namespace: string): object;
|
|
2071
2098
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
2099
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
2100
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
2072
2101
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
2073
2102
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
2074
2103
|
/** 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-formbricks",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Stateful emulator of open-source Formbricks: the client environment state (seeded with a synthetic survey corpus), response creation with upstream's validation and {code, message, details} errors, the v1 management API, the widget script, and signed response webhooks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|