@crvouga/mockingbird-service-route53resolver 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-ZBHQ74VK.js";
7
- import "./chunk-SJXUFY2B.js";
6
+ } from "./chunk-6FYSXIEW.js";
7
+ import "./chunk-HTA2IJRP.js";
8
8
 
9
9
  // src/cli.ts
10
10
  var code = await runCli(
package/dist/index.d.ts CHANGED
@@ -544,6 +544,8 @@ type SnapshotDocument = {
544
544
  faults?: unknown;
545
545
  latency?: unknown;
546
546
  virtualTime?: boolean;
547
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
548
+ webhooks?: unknown;
547
549
  };
548
550
  /** Controls for one namespace. */
549
551
  type NamespaceControls = {
@@ -757,6 +759,8 @@ type CredentialRegistry = {
757
759
  }[];
758
760
  };
759
761
 
762
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
763
+
760
764
  /**
761
765
  * A point-in-time copy of everything a service namespace holds.
762
766
  *
@@ -874,8 +878,16 @@ type PublishInput = {
874
878
  id?: string;
875
879
  };
876
880
  type WebhookHub = {
881
+ observeDeliveries(listener: (event: {
882
+ namespace: string;
883
+ state: string;
884
+ deliveryId: string;
885
+ }) => void): () => void;
886
+ setTransportPolicy(policy: OwnedTransport): void;
877
887
  pending(namespace: string): number;
878
888
  snapshot(namespace: string): unknown;
889
+ exportSnapshot(handle: unknown): unknown;
890
+ importSnapshot(namespace: string, document: unknown): unknown;
879
891
  restore(namespace: string, snapshot: unknown): void;
880
892
  publish(input: PublishInput): WebhookMessage;
881
893
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -888,7 +900,7 @@ type WebhookHub = {
888
900
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
889
901
  flush(): Promise<void>;
890
902
  /** Resolve once nothing is in flight. */
891
- idle(): Promise<void>;
903
+ idle(namespace?: string): Promise<void>;
892
904
  fault(namespace: string, fault: WebhookFault): void;
893
905
  clear(namespace?: string): void;
894
906
  };
@@ -932,6 +944,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
932
944
  /** Opaque in-process checkpoint including records, controls and webhook history. */
933
945
  fleetSnapshot(namespace: string): object;
934
946
  fleetRestore(snapshot: unknown, namespace: string): void;
947
+ fleetExport(snapshot: unknown): SnapshotDocument;
948
+ fleetImport(namespace: string, document: unknown): object;
935
949
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
936
950
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
937
951
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  document,
5
5
  operationIds,
6
6
  supportedOperationIds
7
- } from "./chunk-SJXUFY2B.js";
7
+ } from "./chunk-HTA2IJRP.js";
8
8
  export {
9
9
  Route53ResolverAPI,
10
10
  createRuntime,
package/dist/server.d.ts CHANGED
@@ -444,6 +444,8 @@ type SnapshotDocument$1 = {
444
444
  faults?: unknown;
445
445
  latency?: unknown;
446
446
  virtualTime?: boolean;
447
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
448
+ webhooks?: unknown;
447
449
  };
448
450
  /** Controls for one namespace. */
449
451
  type NamespaceControls$1 = {
@@ -657,6 +659,8 @@ type CredentialRegistry$1 = {
657
659
  }[];
658
660
  };
659
661
 
662
+ type OwnedTransport$1 = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
663
+
660
664
  /**
661
665
  * A point-in-time copy of everything a service namespace holds.
662
666
  *
@@ -774,8 +778,16 @@ type PublishInput$1 = {
774
778
  id?: string;
775
779
  };
776
780
  type WebhookHub$1 = {
781
+ observeDeliveries(listener: (event: {
782
+ namespace: string;
783
+ state: string;
784
+ deliveryId: string;
785
+ }) => void): () => void;
786
+ setTransportPolicy(policy: OwnedTransport$1): void;
777
787
  pending(namespace: string): number;
778
788
  snapshot(namespace: string): unknown;
789
+ exportSnapshot(handle: unknown): unknown;
790
+ importSnapshot(namespace: string, document: unknown): unknown;
779
791
  restore(namespace: string, snapshot: unknown): void;
780
792
  publish(input: PublishInput$1): WebhookMessage$1;
781
793
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -788,7 +800,7 @@ type WebhookHub$1 = {
788
800
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
789
801
  flush(): Promise<void>;
790
802
  /** Resolve once nothing is in flight. */
791
- idle(): Promise<void>;
803
+ idle(namespace?: string): Promise<void>;
792
804
  fault(namespace: string, fault: WebhookFault$1): void;
793
805
  clear(namespace?: string): void;
794
806
  };
@@ -832,6 +844,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$1 & {
832
844
  /** Opaque in-process checkpoint including records, controls and webhook history. */
833
845
  fleetSnapshot(namespace: string): object;
834
846
  fleetRestore(snapshot: unknown, namespace: string): void;
847
+ fleetExport(snapshot: unknown): SnapshotDocument$1;
848
+ fleetImport(namespace: string, document: unknown): object;
835
849
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
836
850
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule$1>): FaultRule$1[];
837
851
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
@@ -924,6 +938,7 @@ type CommonServeOptions = {
924
938
  * `serveTarget`, which is also how `serve --config` finds services by name.
925
939
  */
926
940
  type ServeTarget = {
941
+ packageVersion?: string;
927
942
  name: string;
928
943
  defaultPort: number;
929
944
  /** Serve flags beyond the common ones. */
@@ -1481,6 +1496,8 @@ type SnapshotDocument = {
1481
1496
  faults?: unknown;
1482
1497
  latency?: unknown;
1483
1498
  virtualTime?: boolean;
1499
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
1500
+ webhooks?: unknown;
1484
1501
  };
1485
1502
  /** Controls for one namespace. */
1486
1503
  type NamespaceControls = {
@@ -1694,6 +1711,8 @@ type CredentialRegistry = {
1694
1711
  }[];
1695
1712
  };
1696
1713
 
1714
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
1715
+
1697
1716
  /**
1698
1717
  * A point-in-time copy of everything a service namespace holds.
1699
1718
  *
@@ -1811,8 +1830,16 @@ type PublishInput = {
1811
1830
  id?: string;
1812
1831
  };
1813
1832
  type WebhookHub = {
1833
+ observeDeliveries(listener: (event: {
1834
+ namespace: string;
1835
+ state: string;
1836
+ deliveryId: string;
1837
+ }) => void): () => void;
1838
+ setTransportPolicy(policy: OwnedTransport): void;
1814
1839
  pending(namespace: string): number;
1815
1840
  snapshot(namespace: string): unknown;
1841
+ exportSnapshot(handle: unknown): unknown;
1842
+ importSnapshot(namespace: string, document: unknown): unknown;
1816
1843
  restore(namespace: string, snapshot: unknown): void;
1817
1844
  publish(input: PublishInput): WebhookMessage;
1818
1845
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -1825,7 +1852,7 @@ type WebhookHub = {
1825
1852
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
1826
1853
  flush(): Promise<void>;
1827
1854
  /** Resolve once nothing is in flight. */
1828
- idle(): Promise<void>;
1855
+ idle(namespace?: string): Promise<void>;
1829
1856
  fault(namespace: string, fault: WebhookFault): void;
1830
1857
  clear(namespace?: string): void;
1831
1858
  };
@@ -1869,6 +1896,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
1869
1896
  /** Opaque in-process checkpoint including records, controls and webhook history. */
1870
1897
  fleetSnapshot(namespace: string): object;
1871
1898
  fleetRestore(snapshot: unknown, namespace: string): void;
1899
+ fleetExport(snapshot: unknown): SnapshotDocument;
1900
+ fleetImport(namespace: string, document: unknown): object;
1872
1901
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
1873
1902
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
1874
1903
  /** 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-ZBHQ74VK.js";
6
- import "./chunk-SJXUFY2B.js";
5
+ } from "./chunk-6FYSXIEW.js";
6
+ import "./chunk-HTA2IJRP.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-route53resolver",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Work-in-progress Amazon Route 53 Resolver transport scaffold; vendor operations are not implemented.",
5
5
  "license": "MIT",
6
6
  "type": "module",