@crvouga/mockingbird-service-workos 1.15.1 → 1.17.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 +24 -2
- package/dist/chunk-WKRHUOZR.js +1 -1
- package/dist/index.d.ts +30 -1
- package/dist/server.d.ts +37 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-workos
|
|
2
2
|
|
|
3
|
+
## 1.17.0 (2026-11-25)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- let a long-running mock forget idle namespaces and cap what each holds ([60847a9](https://github.com/crvouga/mockingbird/commit/60847a9bcb8f12200f45ce81e554d9eb23245ccf))
|
|
8
|
+
|
|
9
|
+
### Fixes and improvements
|
|
10
|
+
|
|
11
|
+
- keep same-tick writes through idle expiry and expire controls-only namespaces ([e153e21](https://github.com/crvouga/mockingbird/commit/e153e21c4fcbe1a54e7b6dc0321f3a50c6ede1ac))
|
|
12
|
+
- make namespace clean-up safe under failure, sharing and concurrency ([0ec2009](https://github.com/crvouga/mockingbird/commit/0ec20094d0031d628d467d3c81625ef23cdbcd8d))
|
|
13
|
+
|
|
14
|
+
### Dependencies
|
|
15
|
+
|
|
16
|
+
- `@crvouga/mockingbird-runtime`
|
|
17
|
+
|
|
18
|
+
## 1.16.0 (2026-11-22)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- unify admin and notifications shells ([3ae91bb](https://github.com/crvouga/mockingbird/commit/3ae91bb5357c06519330bf3fbc24e06b448ab144))
|
|
23
|
+
- rewrite every Mockingbird-owned UI on React and HeroUI ([c57b75a](https://github.com/crvouga/mockingbird/commit/c57b75a7940712df2773aec11ddef2e0e670b906))
|
|
24
|
+
- standardize React components on HeroUI ([b19008e](https://github.com/crvouga/mockingbird/commit/b19008eb86e78b0553e7b0cef7d38b79576013b1))
|
|
25
|
+
- add reusable browser preview packages and emulator integration features ([c87e9b4](https://github.com/crvouga/mockingbird/commit/c87e9b466d2d728c69a6ad35b73fa387726a1a61))
|
|
26
|
+
|
|
3
27
|
## 1.15.1 (2026-11-18)
|
|
4
28
|
|
|
5
29
|
### Fixes and improvements
|
|
@@ -24,8 +48,6 @@
|
|
|
24
48
|
### Features
|
|
25
49
|
|
|
26
50
|
- expand in-process emulation and resolve Plane and streaming gaps ([e6733fd](https://github.com/crvouga/mockingbird/commit/e6733fd00f5dd03259f36cc0f452780a7e0deea4))
|
|
27
|
-
- add browser runtime polyfills and edge-snapping app cycle ([815b739](https://github.com/crvouga/mockingbird/commit/815b7399f1e058b89b3fa025f79a5014172b3ab8))
|
|
28
|
-
- run lab systems in browser PR previews ([df14882](https://github.com/crvouga/mockingbird/commit/df148828ca66db1e20cf9fa2fdf38b56b5116da4))
|
|
29
51
|
- publish the shared runtime once; services depend on it instead of inlining it ([4903c4a](https://github.com/crvouga/mockingbird/commit/4903c4a748fd801001ad3fd34b6016b55e0f9953))
|
|
30
52
|
- add transcript storage, signature and meetings; tags, teams, messages, macros and calls ([ee21e12](https://github.com/crvouga/mockingbird/commit/ee21e12024768bd52c6902b1722fb35a94d2444b))
|
|
31
53
|
|
package/dist/chunk-WKRHUOZR.js
CHANGED
|
@@ -28,7 +28,7 @@ __export(service_exports, {
|
|
|
28
28
|
__reExport(service_exports, service_star);
|
|
29
29
|
import * as service_star from "@crvouga/mockingbird-runtime/service";
|
|
30
30
|
import { PACKAGE_VERSION as SHARED_VERSION, createRuntime as sharedRuntime } from "@crvouga/mockingbird-runtime/service";
|
|
31
|
-
var PACKAGE_VERSION = true ? "1.
|
|
31
|
+
var PACKAGE_VERSION = true ? "1.17.0" : SHARED_VERSION;
|
|
32
32
|
var ADMIN_BRAND = typeof define_MOCKINGBIRD_ADMIN_BRAND_default === "object" ? define_MOCKINGBIRD_ADMIN_BRAND_default : void 0;
|
|
33
33
|
var createRuntime = (options) => sharedRuntime({
|
|
34
34
|
...options,
|
package/dist/index.d.ts
CHANGED
|
@@ -664,6 +664,29 @@ type MetricsReport = {
|
|
|
664
664
|
faults: number;
|
|
665
665
|
totalDurationMs: number;
|
|
666
666
|
};
|
|
667
|
+
/** What a runtime holds across every namespace: the gauges a long-running mock is watched by. */
|
|
668
|
+
type ResourceReport = {
|
|
669
|
+
/** Namespaces that hold state now (`GET /__admin/namespaces`). */
|
|
670
|
+
namespaces: number;
|
|
671
|
+
/** Stored records, every collection and branch included. */
|
|
672
|
+
records: number;
|
|
673
|
+
/** Journal entries held (`GET /__admin/requests`). */
|
|
674
|
+
journalEntries: number;
|
|
675
|
+
/** Named snapshots held. */
|
|
676
|
+
snapshots: number;
|
|
677
|
+
/** Webhook deliveries waiting for an attempt or a retry. */
|
|
678
|
+
webhooksPending: number;
|
|
679
|
+
/** Heap in use, or `null` where the host cannot say. */
|
|
680
|
+
heapUsedBytes: number | null;
|
|
681
|
+
/** Namespaces forgotten for being idle since the runtime started. */
|
|
682
|
+
namespacesExpired: number;
|
|
683
|
+
/** Idle namespaces whose drop failed; each is retried on a later request. */
|
|
684
|
+
idleExpiryFailures: number;
|
|
685
|
+
/** Requests answered `507` for the record cap, their writes rolled back. */
|
|
686
|
+
recordLimitRefusals: number;
|
|
687
|
+
/** Snapshots refused for the snapshot cap. */
|
|
688
|
+
snapshotLimitRefusals: number;
|
|
689
|
+
};
|
|
667
690
|
type Metrics = {
|
|
668
691
|
record(entry: RequestLog): void;
|
|
669
692
|
report(namespace?: string): MetricsReport;
|
|
@@ -694,6 +717,8 @@ type Journal = {
|
|
|
694
717
|
readonly size: number;
|
|
695
718
|
record(entry: JournalEntry): void;
|
|
696
719
|
list(query?: JournalQuery): JournalEntry[];
|
|
720
|
+
/** Entries held for one namespace, or for every namespace. */
|
|
721
|
+
count(namespace?: string): number;
|
|
697
722
|
/** Forget one namespace's entries, or every namespace's. */
|
|
698
723
|
clear(namespace?: string): void;
|
|
699
724
|
};
|
|
@@ -810,6 +835,7 @@ declare class Collection<T> {
|
|
|
810
835
|
nextSequence(): number;
|
|
811
836
|
get(id: string): T | undefined;
|
|
812
837
|
has(id: string): boolean;
|
|
838
|
+
private assertRoom;
|
|
813
839
|
/** Insert a new record, assigning it the next sequence number. */
|
|
814
840
|
insert(id: string, value: T): Stored<T>;
|
|
815
841
|
/** Replace an existing record's value, keeping its position. */
|
|
@@ -931,7 +957,8 @@ type WebhookHub = {
|
|
|
931
957
|
deliveryId: string;
|
|
932
958
|
}) => void): () => void;
|
|
933
959
|
setTransportPolicy(policy: OwnedTransport): void;
|
|
934
|
-
|
|
960
|
+
/** Deliveries waiting in one namespace, or in every namespace. */
|
|
961
|
+
pending(namespace?: string): number;
|
|
935
962
|
snapshot(namespace: string): unknown;
|
|
936
963
|
exportSnapshot(handle: unknown): unknown;
|
|
937
964
|
importSnapshot(namespace: string, document: unknown): unknown;
|
|
@@ -1009,6 +1036,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
1009
1036
|
reset(namespace?: string): Promise<void>;
|
|
1010
1037
|
/** Reset a namespace and forget it, releasing everything it held. */
|
|
1011
1038
|
dropNamespace(namespace: string): Promise<void>;
|
|
1039
|
+
/** What the runtime holds across every namespace, as `GET /__admin/metrics` reports it. */
|
|
1040
|
+
resources(): ResourceReport;
|
|
1012
1041
|
/** A namespace's controls: seed, clock, virtual time, latency, faults and snapshots. */
|
|
1013
1042
|
controls(namespace?: string): ControlState & {
|
|
1014
1043
|
snapshots: SnapshotInfo[];
|
package/dist/server.d.ts
CHANGED
|
@@ -140,6 +140,12 @@ type UpstreamState = {
|
|
|
140
140
|
mode: "emulated" | "forward";
|
|
141
141
|
baseUrl: string;
|
|
142
142
|
};
|
|
143
|
+
type UpstreamOptions = {
|
|
144
|
+
fetch: (request: Request) => Response | Promise<Response>;
|
|
145
|
+
baseUrl: string;
|
|
146
|
+
mode?: "emulated" | "forward";
|
|
147
|
+
rewriteAuth?: (request: Request) => Request | Promise<Request>;
|
|
148
|
+
};
|
|
143
149
|
|
|
144
150
|
/**
|
|
145
151
|
* Seeded pseudo-random numbers, so anything a mock invents — ids, jitter, which
|
|
@@ -601,6 +607,29 @@ type MetricsReport = {
|
|
|
601
607
|
faults: number;
|
|
602
608
|
totalDurationMs: number;
|
|
603
609
|
};
|
|
610
|
+
/** What a runtime holds across every namespace: the gauges a long-running mock is watched by. */
|
|
611
|
+
type ResourceReport = {
|
|
612
|
+
/** Namespaces that hold state now (`GET /__admin/namespaces`). */
|
|
613
|
+
namespaces: number;
|
|
614
|
+
/** Stored records, every collection and branch included. */
|
|
615
|
+
records: number;
|
|
616
|
+
/** Journal entries held (`GET /__admin/requests`). */
|
|
617
|
+
journalEntries: number;
|
|
618
|
+
/** Named snapshots held. */
|
|
619
|
+
snapshots: number;
|
|
620
|
+
/** Webhook deliveries waiting for an attempt or a retry. */
|
|
621
|
+
webhooksPending: number;
|
|
622
|
+
/** Heap in use, or `null` where the host cannot say. */
|
|
623
|
+
heapUsedBytes: number | null;
|
|
624
|
+
/** Namespaces forgotten for being idle since the runtime started. */
|
|
625
|
+
namespacesExpired: number;
|
|
626
|
+
/** Idle namespaces whose drop failed; each is retried on a later request. */
|
|
627
|
+
idleExpiryFailures: number;
|
|
628
|
+
/** Requests answered `507` for the record cap, their writes rolled back. */
|
|
629
|
+
recordLimitRefusals: number;
|
|
630
|
+
/** Snapshots refused for the snapshot cap. */
|
|
631
|
+
snapshotLimitRefusals: number;
|
|
632
|
+
};
|
|
604
633
|
type Metrics = {
|
|
605
634
|
record(entry: RequestLog): void;
|
|
606
635
|
report(namespace?: string): MetricsReport;
|
|
@@ -631,6 +660,8 @@ type Journal = {
|
|
|
631
660
|
readonly size: number;
|
|
632
661
|
record(entry: JournalEntry): void;
|
|
633
662
|
list(query?: JournalQuery): JournalEntry[];
|
|
663
|
+
/** Entries held for one namespace, or for every namespace. */
|
|
664
|
+
count(namespace?: string): number;
|
|
634
665
|
/** Forget one namespace's entries, or every namespace's. */
|
|
635
666
|
clear(namespace?: string): void;
|
|
636
667
|
};
|
|
@@ -822,7 +853,8 @@ type WebhookHub = {
|
|
|
822
853
|
deliveryId: string;
|
|
823
854
|
}) => void): () => void;
|
|
824
855
|
setTransportPolicy(policy: OwnedTransport): void;
|
|
825
|
-
|
|
856
|
+
/** Deliveries waiting in one namespace, or in every namespace. */
|
|
857
|
+
pending(namespace?: string): number;
|
|
826
858
|
snapshot(namespace: string): unknown;
|
|
827
859
|
exportSnapshot(handle: unknown): unknown;
|
|
828
860
|
importSnapshot(namespace: string, document: unknown): unknown;
|
|
@@ -900,6 +932,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
900
932
|
reset(namespace?: string): Promise<void>;
|
|
901
933
|
/** Reset a namespace and forget it, releasing everything it held. */
|
|
902
934
|
dropNamespace(namespace: string): Promise<void>;
|
|
935
|
+
/** What the runtime holds across every namespace, as `GET /__admin/metrics` reports it. */
|
|
936
|
+
resources(): ResourceReport;
|
|
903
937
|
/** A namespace's controls: seed, clock, virtual time, latency, faults and snapshots. */
|
|
904
938
|
controls(namespace?: string): ControlState & {
|
|
905
939
|
snapshots: SnapshotInfo[];
|
|
@@ -966,6 +1000,7 @@ type CliOption = {
|
|
|
966
1000
|
};
|
|
967
1001
|
type CliValues = Record<string, string | boolean | undefined>;
|
|
968
1002
|
type CommonServeOptions = {
|
|
1003
|
+
upstream?: UpstreamOptions;
|
|
969
1004
|
adminPrefix?: string;
|
|
970
1005
|
adminKey: string | undefined;
|
|
971
1006
|
seed: string | undefined;
|
|
@@ -988,6 +1023,7 @@ type CommonServeOptions = {
|
|
|
988
1023
|
* `serveTarget`, which is also how `serve --config` finds services by name.
|
|
989
1024
|
*/
|
|
990
1025
|
type ServeTarget = {
|
|
1026
|
+
supportsUpstream?: boolean;
|
|
991
1027
|
packageVersion?: string;
|
|
992
1028
|
name: string;
|
|
993
1029
|
defaultPort: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-workos",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Stateful WorkOS AuthKit emulator with signed sessions, rotating refresh tokens and user pagination.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@crvouga/mockingbird-runtime": "0.
|
|
107
|
-
"@crvouga/mockingbird-service-sqlite": "3.
|
|
106
|
+
"@crvouga/mockingbird-runtime": "0.5.0",
|
|
107
|
+
"@crvouga/mockingbird-service-sqlite": "3.7.0",
|
|
108
108
|
"hono": "4.13.11"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|