@crvouga/mockingbird-service-resource-groups-tagging-api 1.13.0 → 1.14.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 +11 -1
- package/dist/chunk-MPNDCOJE.js +31 -0
- package/dist/chunk-MPNDCOJE.js.map +7 -0
- package/dist/chunk-QWGAHYKF.js +132 -0
- package/dist/chunk-QWGAHYKF.js.map +7 -0
- package/dist/cli.js +3 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +149 -141
- package/dist/index.js +1 -2
- package/dist/server.d.ts +45 -37
- package/dist/server.js +2 -3
- package/package.json +3 -2
- package/dist/admin-ui.js +0 -27
- package/dist/admin-ui.js.map +0 -7
- package/dist/chunk-OQAFJ3R5.js +0 -9559
- package/dist/chunk-OQAFJ3R5.js.map +0 -7
- package/dist/chunk-UDZ2FWI4.js +0 -5078
- package/dist/chunk-UDZ2FWI4.js.map +0 -7
- package/dist/chunk-YAI47YFC.js +0 -7
- package/dist/chunk-YAI47YFC.js.map +0 -7
package/dist/server.d.ts
CHANGED
|
@@ -104,41 +104,6 @@ interface FetchAPI {
|
|
|
104
104
|
/** A bare function form of {@link FetchAPI}, compatible with `Bun.serve`, workerd, and Deno. */
|
|
105
105
|
type FetchHandler = (request: Request) => Promise<Response>;
|
|
106
106
|
|
|
107
|
-
/** Bind values accepted by Mockingbird's SQLite port (matches sqlite-mem / better-sqlite3). */
|
|
108
|
-
type SqliteValue = null | number | bigint | string | Uint8Array | boolean;
|
|
109
|
-
/** Mutation counters returned by {@link SqliteStatement.run}. */
|
|
110
|
-
type SqliteRunResult = {
|
|
111
|
-
changes: number;
|
|
112
|
-
lastInsertRowid: number | bigint;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Prepared statement bound to a {@link SqliteClient}.
|
|
116
|
-
*
|
|
117
|
-
* Pass bind values as rest arguments on each call (no sticky `bind()`).
|
|
118
|
-
*/
|
|
119
|
-
interface SqliteStatement {
|
|
120
|
-
run(...params: SqliteValue[]): SqliteRunResult;
|
|
121
|
-
all<T = Record<string, unknown>>(...params: SqliteValue[]): T[];
|
|
122
|
-
get<T = Record<string, unknown>>(...params: SqliteValue[]): T | undefined;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Sync SQLite client port owned by Mockingbird.
|
|
126
|
-
*
|
|
127
|
-
* Duck-typed so `@crvouga/mockingbird-service-sqlite` `Database`, better-sqlite3, and wrapped
|
|
128
|
-
* `bun:sqlite` instances all work when they expose this surface.
|
|
129
|
-
*/
|
|
130
|
-
interface SqliteClient {
|
|
131
|
-
exec(sql: string): void;
|
|
132
|
-
prepare(sql: string): SqliteStatement;
|
|
133
|
-
transaction<T>(fn: () => T): T;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* What names an id base: a non-negative safe integer (or its decimal string) or `"boot"`,
|
|
138
|
-
* which derives the base from the wall clock when the runtime is created.
|
|
139
|
-
*/
|
|
140
|
-
type IdBase = number | string;
|
|
141
|
-
|
|
142
107
|
/**
|
|
143
108
|
* The single source of time for a service.
|
|
144
109
|
*
|
|
@@ -169,6 +134,11 @@ type Clock = {
|
|
|
169
134
|
state(): ClockState;
|
|
170
135
|
};
|
|
171
136
|
|
|
137
|
+
type UpstreamState = {
|
|
138
|
+
mode: "emulated" | "forward";
|
|
139
|
+
baseUrl: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
172
142
|
/**
|
|
173
143
|
* Seeded pseudo-random numbers, so anything a mock invents — ids, jitter, which
|
|
174
144
|
* request a percentage fault hits — is reproducible from a seed.
|
|
@@ -432,6 +402,7 @@ declare const SNAPSHOT_FORMAT = "mockingbird.snapshot/v1";
|
|
|
432
402
|
* `records` are required, so a hand-written seed file is a valid snapshot.
|
|
433
403
|
*/
|
|
434
404
|
type SnapshotDocument = {
|
|
405
|
+
upstream?: UpstreamState;
|
|
435
406
|
format: typeof SNAPSHOT_FORMAT;
|
|
436
407
|
/** The service that wrote it. A snapshot is rejected by any other service. */
|
|
437
408
|
service?: string;
|
|
@@ -505,6 +476,7 @@ type LatencyState = LatencyRule & {
|
|
|
505
476
|
};
|
|
506
477
|
/** What {@link controlHeaders} turns into request headers. */
|
|
507
478
|
type ControlHeaderInput = {
|
|
479
|
+
upstream?: "emulated" | "forward";
|
|
508
480
|
namespace?: string;
|
|
509
481
|
adminKey?: string;
|
|
510
482
|
branch?: string;
|
|
@@ -522,6 +494,35 @@ type ControlHeaderInput = {
|
|
|
522
494
|
snapshot?: string;
|
|
523
495
|
};
|
|
524
496
|
|
|
497
|
+
/** Bind values accepted by Mockingbird's SQLite port (matches sqlite-mem / better-sqlite3). */
|
|
498
|
+
type SqliteValue = null | number | bigint | string | Uint8Array | boolean;
|
|
499
|
+
/** Mutation counters returned by {@link SqliteStatement.run}. */
|
|
500
|
+
type SqliteRunResult = {
|
|
501
|
+
changes: number;
|
|
502
|
+
lastInsertRowid: number | bigint;
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Prepared statement bound to a {@link SqliteClient}.
|
|
506
|
+
*
|
|
507
|
+
* Pass bind values as rest arguments on each call (no sticky `bind()`).
|
|
508
|
+
*/
|
|
509
|
+
interface SqliteStatement {
|
|
510
|
+
run(...params: SqliteValue[]): SqliteRunResult;
|
|
511
|
+
all<T = Record<string, unknown>>(...params: SqliteValue[]): T[];
|
|
512
|
+
get<T = Record<string, unknown>>(...params: SqliteValue[]): T | undefined;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Sync SQLite client port owned by Mockingbird.
|
|
516
|
+
*
|
|
517
|
+
* Duck-typed so `@crvouga/mockingbird-service-sqlite` `Database`, better-sqlite3, and wrapped
|
|
518
|
+
* `bun:sqlite` instances all work when they expose this surface.
|
|
519
|
+
*/
|
|
520
|
+
interface SqliteClient {
|
|
521
|
+
exec(sql: string): void;
|
|
522
|
+
prepare(sql: string): SqliteStatement;
|
|
523
|
+
transaction<T>(fn: () => T): T;
|
|
524
|
+
}
|
|
525
|
+
|
|
525
526
|
/**
|
|
526
527
|
* One problem with a request body, at a dotted path (`patient.address.city`, `items.0.sku`).
|
|
527
528
|
* `kind` is `media_type` when the body is present but its media type is not one the operation
|
|
@@ -548,6 +549,7 @@ type RejectedRequest = {
|
|
|
548
549
|
};
|
|
549
550
|
/** One handled request, as the structured log sees it. */
|
|
550
551
|
type RequestLog = {
|
|
552
|
+
upstream?: boolean;
|
|
551
553
|
service: string;
|
|
552
554
|
namespace: string;
|
|
553
555
|
operationId: string | undefined;
|
|
@@ -682,8 +684,6 @@ type CredentialRegistry = {
|
|
|
682
684
|
}[];
|
|
683
685
|
};
|
|
684
686
|
|
|
685
|
-
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
686
|
-
|
|
687
687
|
/**
|
|
688
688
|
* A point-in-time copy of everything a service namespace holds.
|
|
689
689
|
*
|
|
@@ -736,6 +736,14 @@ type StateView = {
|
|
|
736
736
|
collections: StateCollectionView[];
|
|
737
737
|
};
|
|
738
738
|
|
|
739
|
+
/**
|
|
740
|
+
* What names an id base: a non-negative safe integer (or its decimal string) or `"boot"`,
|
|
741
|
+
* which derives the base from the wall clock when the runtime is created.
|
|
742
|
+
*/
|
|
743
|
+
type IdBase = number | string;
|
|
744
|
+
|
|
745
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
746
|
+
|
|
739
747
|
type WebhookEndpoint = {
|
|
740
748
|
/** Stable id; generated when omitted. */
|
|
741
749
|
id?: string;
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-resource-groups-tagging-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Stateful Amazon Resource Groups Tagging API emulator with AWS SDK wire compatibility and deterministic local controls.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -110,7 +110,8 @@
|
|
|
110
110
|
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
|
-
"@crvouga/mockingbird-
|
|
113
|
+
"@crvouga/mockingbird-runtime": "0.0.1",
|
|
114
|
+
"@crvouga/mockingbird-service-sqlite": "3.5.0"
|
|
114
115
|
},
|
|
115
116
|
"devDependencies": {
|
|
116
117
|
"@crvouga/mockingbird-adapter-node": "0.0.0-development",
|