@crvouga/mockingbird-service-sentry 1.3.0 → 1.4.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/dist/cli.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  runCli,
4
4
  serveCommand,
5
5
  serveTarget
6
- } from "./chunk-BZOGSXLS.js";
7
- import "./chunk-UQ4IDYKE.js";
6
+ } from "./chunk-I3GAHZ2G.js";
7
+ import "./chunk-3XKUROOO.js";
8
8
 
9
9
  // src/cli.ts
10
10
  var code = await runCli(
package/dist/index.d.ts CHANGED
@@ -541,6 +541,8 @@ type SnapshotDocument = {
541
541
  faults?: unknown;
542
542
  latency?: unknown;
543
543
  virtualTime?: boolean;
544
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
545
+ webhooks?: unknown;
544
546
  };
545
547
  /** Controls for one namespace. */
546
548
  type NamespaceControls = {
@@ -754,6 +756,8 @@ type CredentialRegistry = {
754
756
  }[];
755
757
  };
756
758
 
759
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
760
+
757
761
  /**
758
762
  * A point-in-time copy of everything a service namespace holds.
759
763
  *
@@ -871,8 +875,16 @@ type PublishInput = {
871
875
  id?: string;
872
876
  };
873
877
  type WebhookHub = {
878
+ observeDeliveries(listener: (event: {
879
+ namespace: string;
880
+ state: string;
881
+ deliveryId: string;
882
+ }) => void): () => void;
883
+ setTransportPolicy(policy: OwnedTransport): void;
874
884
  pending(namespace: string): number;
875
885
  snapshot(namespace: string): unknown;
886
+ exportSnapshot(handle: unknown): unknown;
887
+ importSnapshot(namespace: string, document: unknown): unknown;
876
888
  restore(namespace: string, snapshot: unknown): void;
877
889
  publish(input: PublishInput): WebhookMessage;
878
890
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -885,7 +897,7 @@ type WebhookHub = {
885
897
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
886
898
  flush(): Promise<void>;
887
899
  /** Resolve once nothing is in flight. */
888
- idle(): Promise<void>;
900
+ idle(namespace?: string): Promise<void>;
889
901
  fault(namespace: string, fault: WebhookFault): void;
890
902
  clear(namespace?: string): void;
891
903
  };
@@ -929,6 +941,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
929
941
  /** Opaque in-process checkpoint including records, controls and webhook history. */
930
942
  fleetSnapshot(namespace: string): object;
931
943
  fleetRestore(snapshot: unknown, namespace: string): void;
944
+ fleetExport(snapshot: unknown): SnapshotDocument;
945
+ fleetImport(namespace: string, document: unknown): object;
932
946
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
933
947
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
934
948
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  document,
9
9
  sentryCredential,
10
10
  supportedOperationIds
11
- } from "./chunk-UQ4IDYKE.js";
11
+ } from "./chunk-3XKUROOO.js";
12
12
  export {
13
13
  DEFAULT_PROJECT,
14
14
  SENTRY_NAMESPACE,
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. */
@@ -1454,6 +1469,8 @@ type SnapshotDocument = {
1454
1469
  faults?: unknown;
1455
1470
  latency?: unknown;
1456
1471
  virtualTime?: boolean;
1472
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
1473
+ webhooks?: unknown;
1457
1474
  };
1458
1475
  /** Controls for one namespace. */
1459
1476
  type NamespaceControls = {
@@ -1667,6 +1684,8 @@ type CredentialRegistry = {
1667
1684
  }[];
1668
1685
  };
1669
1686
 
1687
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
1688
+
1670
1689
  /**
1671
1690
  * A point-in-time copy of everything a service namespace holds.
1672
1691
  *
@@ -1784,8 +1803,16 @@ type PublishInput = {
1784
1803
  id?: string;
1785
1804
  };
1786
1805
  type WebhookHub = {
1806
+ observeDeliveries(listener: (event: {
1807
+ namespace: string;
1808
+ state: string;
1809
+ deliveryId: string;
1810
+ }) => void): () => void;
1811
+ setTransportPolicy(policy: OwnedTransport): void;
1787
1812
  pending(namespace: string): number;
1788
1813
  snapshot(namespace: string): unknown;
1814
+ exportSnapshot(handle: unknown): unknown;
1815
+ importSnapshot(namespace: string, document: unknown): unknown;
1789
1816
  restore(namespace: string, snapshot: unknown): void;
1790
1817
  publish(input: PublishInput): WebhookMessage;
1791
1818
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -1798,7 +1825,7 @@ type WebhookHub = {
1798
1825
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
1799
1826
  flush(): Promise<void>;
1800
1827
  /** Resolve once nothing is in flight. */
1801
- idle(): Promise<void>;
1828
+ idle(namespace?: string): Promise<void>;
1802
1829
  fault(namespace: string, fault: WebhookFault): void;
1803
1830
  clear(namespace?: string): void;
1804
1831
  };
@@ -1842,6 +1869,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
1842
1869
  /** Opaque in-process checkpoint including records, controls and webhook history. */
1843
1870
  fleetSnapshot(namespace: string): object;
1844
1871
  fleetRestore(snapshot: unknown, namespace: string): void;
1872
+ fleetExport(snapshot: unknown): SnapshotDocument;
1873
+ fleetImport(namespace: string, document: unknown): object;
1845
1874
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
1846
1875
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
1847
1876
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
package/dist/server.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_PORT,
3
3
  createServer,
4
4
  serveTarget
5
- } from "./chunk-BZOGSXLS.js";
6
- import "./chunk-UQ4IDYKE.js";
5
+ } from "./chunk-I3GAHZ2G.js";
6
+ import "./chunk-3XKUROOO.js";
7
7
  export {
8
8
  DEFAULT_PORT,
9
9
  createServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/mockingbird-service-sentry",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Stateful Sentry emulator: SDK envelope/store/minidump ingestion, events, issues, attachments and deterministic transport controls.",
5
5
  "license": "MIT",
6
6
  "type": "module",