@crvouga/mockingbird-service-aha 3.10.7 → 3.10.8
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 -0
- package/dist/{chunk-73ZN7WML.js → chunk-RQ2KJQK2.js} +3 -3
- package/dist/chunk-UC4EBAJC.js +6572 -0
- package/dist/chunk-UC4EBAJC.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +12 -1
- package/dist/server.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-DEBGYVU4.js +0 -6552
- package/dist/chunk-DEBGYVU4.js.map +0 -7
- /package/dist/{chunk-73ZN7WML.js.map → chunk-RQ2KJQK2.js.map} +0 -0
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -773,6 +773,15 @@ type CredentialRegistry = {
|
|
|
773
773
|
}[];
|
|
774
774
|
};
|
|
775
775
|
|
|
776
|
+
type IdempotencyStoreOptions = {
|
|
777
|
+
/** The clock key ages are measured on; pass the runtime's so a test can advance it. */
|
|
778
|
+
now?: () => number;
|
|
779
|
+
/**
|
|
780
|
+
* How long a key is kept, in ms. A reuse at or after this age runs as a new request, as
|
|
781
|
+
* Stripe does once it prunes a key ("at least 24 hours old"). Default: keys never expire.
|
|
782
|
+
*/
|
|
783
|
+
ttlMs?: number;
|
|
784
|
+
};
|
|
776
785
|
type IdempotencyErrors = {
|
|
777
786
|
/** Same key, different parameters. */
|
|
778
787
|
mismatch: () => Response;
|
|
@@ -781,8 +790,9 @@ type IdempotencyErrors = {
|
|
|
781
790
|
};
|
|
782
791
|
declare class IdempotencyStore {
|
|
783
792
|
private readonly namespace;
|
|
793
|
+
private readonly options;
|
|
784
794
|
private readonly responses;
|
|
785
|
-
constructor(sqlite: SqliteClient$1, namespace: string, name?: string);
|
|
795
|
+
constructor(sqlite: SqliteClient$1, namespace: string, name?: string, options?: IdempotencyStoreOptions);
|
|
786
796
|
/**
|
|
787
797
|
* Run `handler` once per `key`. `fingerprint` identifies the request's parameters (e.g.
|
|
788
798
|
* the method, path and canonical body). Only `replayable` responses are stored (default:
|
|
@@ -791,6 +801,7 @@ declare class IdempotencyStore {
|
|
|
791
801
|
* Stripe also saves endpoint-produced 500 responses.
|
|
792
802
|
*/
|
|
793
803
|
run(key: string, fingerprint: string, errors: IdempotencyErrors, handler: () => Promise<Response> | Response, replayable?: (status: number, response: Response) => boolean): Promise<Response>;
|
|
804
|
+
private expired;
|
|
794
805
|
}
|
|
795
806
|
|
|
796
807
|
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -1744,6 +1744,15 @@ type CredentialRegistry = {
|
|
|
1744
1744
|
}[];
|
|
1745
1745
|
};
|
|
1746
1746
|
|
|
1747
|
+
type IdempotencyStoreOptions = {
|
|
1748
|
+
/** The clock key ages are measured on; pass the runtime's so a test can advance it. */
|
|
1749
|
+
now?: () => number;
|
|
1750
|
+
/**
|
|
1751
|
+
* How long a key is kept, in ms. A reuse at or after this age runs as a new request, as
|
|
1752
|
+
* Stripe does once it prunes a key ("at least 24 hours old"). Default: keys never expire.
|
|
1753
|
+
*/
|
|
1754
|
+
ttlMs?: number;
|
|
1755
|
+
};
|
|
1747
1756
|
type IdempotencyErrors = {
|
|
1748
1757
|
/** Same key, different parameters. */
|
|
1749
1758
|
mismatch: () => Response;
|
|
@@ -1752,8 +1761,9 @@ type IdempotencyErrors = {
|
|
|
1752
1761
|
};
|
|
1753
1762
|
declare class IdempotencyStore {
|
|
1754
1763
|
private readonly namespace;
|
|
1764
|
+
private readonly options;
|
|
1755
1765
|
private readonly responses;
|
|
1756
|
-
constructor(sqlite: SqliteClient$1, namespace: string, name?: string);
|
|
1766
|
+
constructor(sqlite: SqliteClient$1, namespace: string, name?: string, options?: IdempotencyStoreOptions);
|
|
1757
1767
|
/**
|
|
1758
1768
|
* Run `handler` once per `key`. `fingerprint` identifies the request's parameters (e.g.
|
|
1759
1769
|
* the method, path and canonical body). Only `replayable` responses are stored (default:
|
|
@@ -1762,6 +1772,7 @@ declare class IdempotencyStore {
|
|
|
1762
1772
|
* Stripe also saves endpoint-produced 500 responses.
|
|
1763
1773
|
*/
|
|
1764
1774
|
run(key: string, fingerprint: string, errors: IdempotencyErrors, handler: () => Promise<Response> | Response, replayable?: (status: number, response: Response) => boolean): Promise<Response>;
|
|
1775
|
+
private expired;
|
|
1765
1776
|
}
|
|
1766
1777
|
|
|
1767
1778
|
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-aha",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.8",
|
|
4
4
|
"description": "Stateful AHA phlebotomy emulator with signed HTTP orders, status webhooks, and a real deterministic SSH/SFTP result server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@crvouga/mockingbird-service-sqlite": "3.4.
|
|
110
|
-
"hono": "4.11
|
|
109
|
+
"@crvouga/mockingbird-service-sqlite": "3.4.2",
|
|
110
|
+
"hono": "4.13.11",
|
|
111
111
|
"ssh2": "1.17.0"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|