gemi 0.144.0 → 0.145.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/ai/AgentController.d.ts +2 -2
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +11 -11
- package/dist/ai/index.js.map +3 -3
- package/dist/ai/store/Nonces.d.ts +68 -0
- package/dist/ai/store/Nonces.d.ts.map +1 -1
- package/dist/ai/store/index.d.ts +1 -1
- package/dist/ai/store/index.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-fg2k18d2.js → chunk-0k8fk96c.js} +2 -2
- package/dist/{chunk-fg2k18d2.js.map → chunk-0k8fk96c.js.map} +1 -1
- package/dist/{chunk-y5yac6n1.js → chunk-0mt7kqwx.js} +2 -2
- package/dist/{chunk-y5yac6n1.js.map → chunk-0mt7kqwx.js.map} +1 -1
- package/dist/{chunk-1ed75a7b.js → chunk-1fyn63ka.js} +3 -3
- package/dist/{chunk-1ed75a7b.js.map → chunk-1fyn63ka.js.map} +1 -1
- package/dist/{chunk-tkvamktq.js → chunk-1ttd4rn9.js} +2 -2
- package/dist/{chunk-tkvamktq.js.map → chunk-1ttd4rn9.js.map} +1 -1
- package/dist/{chunk-m70hn4eg.js → chunk-1wz6kwjc.js} +2 -2
- package/dist/{chunk-m70hn4eg.js.map → chunk-1wz6kwjc.js.map} +1 -1
- package/dist/{chunk-fsem81ec.js → chunk-29jmaj16.js} +1 -1
- package/dist/{chunk-fpz9e3xx.js → chunk-2b3hh9xw.js} +3 -3
- package/dist/{chunk-fpz9e3xx.js.map → chunk-2b3hh9xw.js.map} +1 -1
- package/dist/{chunk-n9zycjm1.js → chunk-2djjs8f1.js} +3 -3
- package/dist/{chunk-n9zycjm1.js.map → chunk-2djjs8f1.js.map} +1 -1
- package/dist/{chunk-p81qeav5.js → chunk-2ery6a75.js} +3 -3
- package/dist/{chunk-p81qeav5.js.map → chunk-2ery6a75.js.map} +1 -1
- package/dist/{chunk-hyhbk12v.js → chunk-2k3935ke.js} +2 -2
- package/dist/{chunk-hyhbk12v.js.map → chunk-2k3935ke.js.map} +1 -1
- package/dist/{chunk-qt6x2r6a.js → chunk-2x6cv37t.js} +2 -2
- package/dist/{chunk-qt6x2r6a.js.map → chunk-2x6cv37t.js.map} +1 -1
- package/dist/{chunk-68f0jpje.js → chunk-313593t3.js} +2 -2
- package/dist/{chunk-68f0jpje.js.map → chunk-313593t3.js.map} +1 -1
- package/dist/{chunk-5qfzvnyp.js → chunk-3csz8pfk.js} +3 -3
- package/dist/{chunk-5qfzvnyp.js.map → chunk-3csz8pfk.js.map} +1 -1
- package/dist/{chunk-rezmtdyt.js → chunk-3x8zrsby.js} +2 -2
- package/dist/{chunk-rezmtdyt.js.map → chunk-3x8zrsby.js.map} +1 -1
- package/dist/{chunk-6d3m2w2p.js → chunk-43ws58db.js} +2 -2
- package/dist/{chunk-6d3m2w2p.js.map → chunk-43ws58db.js.map} +1 -1
- package/dist/chunk-49s8wwp2.js +5 -0
- package/dist/{chunk-b6mgrrk6.js.map → chunk-49s8wwp2.js.map} +1 -1
- package/dist/{chunk-ncb1qtae.js → chunk-4d4td4k9.js} +2 -2
- package/dist/{chunk-ncb1qtae.js.map → chunk-4d4td4k9.js.map} +1 -1
- package/dist/{chunk-v57ndv0h.js → chunk-4jd25v6d.js} +2 -2
- package/dist/{chunk-v57ndv0h.js.map → chunk-4jd25v6d.js.map} +1 -1
- package/dist/{chunk-78bfmwp0.js → chunk-4m0eqq80.js} +2 -2
- package/dist/{chunk-78bfmwp0.js.map → chunk-4m0eqq80.js.map} +1 -1
- package/dist/{chunk-ktrm6y5j.js → chunk-563ksar3.js} +3 -3
- package/dist/{chunk-ktrm6y5j.js.map → chunk-563ksar3.js.map} +1 -1
- package/dist/{chunk-z80v4z8y.js → chunk-5q2pmve9.js} +2 -2
- package/dist/{chunk-z80v4z8y.js.map → chunk-5q2pmve9.js.map} +1 -1
- package/dist/{chunk-20d0n391.js → chunk-5yz684rw.js} +2 -2
- package/dist/{chunk-20d0n391.js.map → chunk-5yz684rw.js.map} +1 -1
- package/dist/{chunk-236be97q.js → chunk-63xwah5k.js} +1 -1
- package/dist/{chunk-b4jx4fzq.js → chunk-65wy1r1a.js} +1 -1
- package/dist/{chunk-9tgcmx4h.js → chunk-70yz9e7f.js} +2 -2
- package/dist/{chunk-9tgcmx4h.js.map → chunk-70yz9e7f.js.map} +1 -1
- package/dist/{chunk-t03nda3s.js → chunk-73rzf7ys.js} +2 -2
- package/dist/{chunk-t03nda3s.js.map → chunk-73rzf7ys.js.map} +1 -1
- package/dist/{chunk-1cn7ets3.js → chunk-7txqv2qq.js} +3 -3
- package/dist/{chunk-1cn7ets3.js.map → chunk-7txqv2qq.js.map} +1 -1
- package/dist/{chunk-1skdsmjx.js → chunk-86zhngpg.js} +2 -2
- package/dist/{chunk-1skdsmjx.js.map → chunk-86zhngpg.js.map} +1 -1
- package/dist/{chunk-ce9wm3r9.js → chunk-877yc341.js} +3 -3
- package/dist/{chunk-ce9wm3r9.js.map → chunk-877yc341.js.map} +1 -1
- package/dist/{chunk-wffc5k3m.js → chunk-87y2nrjy.js} +2 -2
- package/dist/{chunk-wffc5k3m.js.map → chunk-87y2nrjy.js.map} +1 -1
- package/dist/{chunk-9zd7c4wq.js → chunk-8k346pjw.js} +14 -14
- package/dist/{chunk-9zd7c4wq.js.map → chunk-8k346pjw.js.map} +3 -3
- package/dist/{chunk-27xsjq8a.js → chunk-8km4drvv.js} +3 -3
- package/dist/{chunk-27xsjq8a.js.map → chunk-8km4drvv.js.map} +1 -1
- package/dist/{chunk-sa6a0wy1.js → chunk-94hcjdbe.js} +2 -2
- package/dist/{chunk-sa6a0wy1.js.map → chunk-94hcjdbe.js.map} +1 -1
- package/dist/{chunk-kaphqnpp.js → chunk-9z8zq4rx.js} +3 -3
- package/dist/{chunk-kaphqnpp.js.map → chunk-9z8zq4rx.js.map} +1 -1
- package/dist/{chunk-8ex0y47w.js → chunk-apga49vp.js} +2 -2
- package/dist/{chunk-8ex0y47w.js.map → chunk-apga49vp.js.map} +1 -1
- package/dist/{chunk-yjszzjyj.js → chunk-attr793y.js} +2 -2
- package/dist/{chunk-yjszzjyj.js.map → chunk-attr793y.js.map} +1 -1
- package/dist/{chunk-1x9ghjpt.js → chunk-bsa6b82q.js} +1 -1
- package/dist/{chunk-ceb4jcrm.js → chunk-bstn00nx.js} +2 -2
- package/dist/{chunk-ceb4jcrm.js.map → chunk-bstn00nx.js.map} +1 -1
- package/dist/{chunk-azd6da5h.js → chunk-bykkqvd8.js} +2 -2
- package/dist/{chunk-azd6da5h.js.map → chunk-bykkqvd8.js.map} +1 -1
- package/dist/{chunk-9k46m1vf.js → chunk-cee5gq7t.js} +2 -2
- package/dist/{chunk-9k46m1vf.js.map → chunk-cee5gq7t.js.map} +1 -1
- package/dist/{chunk-9dkpv8ev.js → chunk-dxh8njb4.js} +2 -2
- package/dist/{chunk-9dkpv8ev.js.map → chunk-dxh8njb4.js.map} +1 -1
- package/dist/{chunk-maqkrbsb.js → chunk-e06t0625.js} +2 -2
- package/dist/{chunk-maqkrbsb.js.map → chunk-e06t0625.js.map} +1 -1
- package/dist/{chunk-0839f72f.js → chunk-e9z8p2fy.js} +2 -2
- package/dist/{chunk-0839f72f.js.map → chunk-e9z8p2fy.js.map} +1 -1
- package/dist/{chunk-6hs102jh.js → chunk-eqv7yxk7.js} +2 -2
- package/dist/{chunk-6hs102jh.js.map → chunk-eqv7yxk7.js.map} +1 -1
- package/dist/{chunk-m6t5a0me.js → chunk-fqqbnp0z.js} +2 -2
- package/dist/{chunk-m6t5a0me.js.map → chunk-fqqbnp0z.js.map} +1 -1
- package/dist/{chunk-1w5dnkd1.js → chunk-g22kph4n.js} +2 -2
- package/dist/{chunk-1w5dnkd1.js.map → chunk-g22kph4n.js.map} +1 -1
- package/dist/{chunk-rvm5mkwm.js → chunk-g8sh9btf.js} +2 -2
- package/dist/{chunk-rvm5mkwm.js.map → chunk-g8sh9btf.js.map} +1 -1
- package/dist/{chunk-a78b9v7h.js → chunk-gvdg52ew.js} +4 -4
- package/dist/{chunk-a78b9v7h.js.map → chunk-gvdg52ew.js.map} +1 -1
- package/dist/{chunk-8ky8cmde.js → chunk-h8eawyhx.js} +2 -2
- package/dist/{chunk-8ky8cmde.js.map → chunk-h8eawyhx.js.map} +1 -1
- package/dist/{chunk-r567t83k.js → chunk-hcw671mg.js} +4 -4
- package/dist/{chunk-r567t83k.js.map → chunk-hcw671mg.js.map} +1 -1
- package/dist/{chunk-ej4kf7m5.js → chunk-hh5bs656.js} +3 -3
- package/dist/{chunk-ej4kf7m5.js.map → chunk-hh5bs656.js.map} +1 -1
- package/dist/{chunk-3q7sc68p.js → chunk-j6ygdvj8.js} +2 -2
- package/dist/{chunk-3q7sc68p.js.map → chunk-j6ygdvj8.js.map} +1 -1
- package/dist/{chunk-t2nsn0r2.js → chunk-jzpbwvbt.js} +2 -2
- package/dist/{chunk-t2nsn0r2.js.map → chunk-jzpbwvbt.js.map} +1 -1
- package/dist/{chunk-en33hg1c.js → chunk-k79ajvtc.js} +2 -2
- package/dist/{chunk-en33hg1c.js.map → chunk-k79ajvtc.js.map} +1 -1
- package/dist/{chunk-t0wfj6hy.js → chunk-k8pn2qvf.js} +2 -2
- package/dist/{chunk-t0wfj6hy.js.map → chunk-k8pn2qvf.js.map} +1 -1
- package/dist/{chunk-83cvkhzn.js → chunk-kmh402m4.js} +2 -2
- package/dist/{chunk-83cvkhzn.js.map → chunk-kmh402m4.js.map} +1 -1
- package/dist/{chunk-b4mg6v4g.js → chunk-m9am5fqq.js} +5 -5
- package/dist/{chunk-b4mg6v4g.js.map → chunk-m9am5fqq.js.map} +3 -3
- package/dist/{chunk-m8yd59gg.js → chunk-mr3szvr3.js} +2 -2
- package/dist/{chunk-m8yd59gg.js.map → chunk-mr3szvr3.js.map} +1 -1
- package/dist/{chunk-mkw35cz7.js → chunk-mtamgvf4.js} +2 -2
- package/dist/{chunk-mkw35cz7.js.map → chunk-mtamgvf4.js.map} +1 -1
- package/dist/{chunk-5xfpqda5.js → chunk-mv1rs9he.js} +1 -1
- package/dist/{chunk-s29tgy4y.js → chunk-mzkzgp2j.js} +2 -2
- package/dist/{chunk-s29tgy4y.js.map → chunk-mzkzgp2j.js.map} +1 -1
- package/dist/{chunk-9xzg05xg.js → chunk-n9n4qt20.js} +3 -3
- package/dist/{chunk-9xzg05xg.js.map → chunk-n9n4qt20.js.map} +1 -1
- package/dist/{chunk-2ra5skyk.js → chunk-p27y4xrw.js} +2 -2
- package/dist/{chunk-2ra5skyk.js.map → chunk-p27y4xrw.js.map} +1 -1
- package/dist/{chunk-sgwgj2q0.js → chunk-pq657qcp.js} +1 -1
- package/dist/{chunk-63q7ycwt.js → chunk-pwbm3x1y.js} +2 -2
- package/dist/{chunk-63q7ycwt.js.map → chunk-pwbm3x1y.js.map} +1 -1
- package/dist/{chunk-w4ma7978.js → chunk-q4qw629n.js} +2 -2
- package/dist/{chunk-w4ma7978.js.map → chunk-q4qw629n.js.map} +1 -1
- package/dist/{chunk-f2e7n064.js → chunk-q9na1syb.js} +2 -2
- package/dist/{chunk-f2e7n064.js.map → chunk-q9na1syb.js.map} +1 -1
- package/dist/{chunk-x0t3t7g3.js → chunk-rkbwb3v5.js} +2 -2
- package/dist/{chunk-x0t3t7g3.js.map → chunk-rkbwb3v5.js.map} +1 -1
- package/dist/{chunk-0t2ym9ap.js → chunk-rma7afjd.js} +3 -3
- package/dist/{chunk-0t2ym9ap.js.map → chunk-rma7afjd.js.map} +1 -1
- package/dist/{chunk-f5qdyw45.js → chunk-tr9ynv3w.js} +2 -2
- package/dist/{chunk-f5qdyw45.js.map → chunk-tr9ynv3w.js.map} +1 -1
- package/dist/{chunk-kzc6bn8n.js → chunk-twrf6d08.js} +2 -2
- package/dist/{chunk-kzc6bn8n.js.map → chunk-twrf6d08.js.map} +1 -1
- package/dist/{chunk-6jd0e1dz.js → chunk-v9z4x5j2.js} +2 -2
- package/dist/{chunk-6jd0e1dz.js.map → chunk-v9z4x5j2.js.map} +1 -1
- package/dist/{chunk-jmhrpfqn.js → chunk-vm5t0j24.js} +2 -2
- package/dist/{chunk-jmhrpfqn.js.map → chunk-vm5t0j24.js.map} +1 -1
- package/dist/{chunk-a37shxb1.js → chunk-xv58jnpb.js} +2 -2
- package/dist/{chunk-a37shxb1.js.map → chunk-xv58jnpb.js.map} +1 -1
- package/dist/{chunk-p57nt0pm.js → chunk-ydkv9e8w.js} +3 -3
- package/dist/{chunk-p57nt0pm.js.map → chunk-ydkv9e8w.js.map} +1 -1
- package/dist/{chunk-aw8gj99f.js → chunk-ymdpt00k.js} +2 -2
- package/dist/{chunk-aw8gj99f.js.map → chunk-ymdpt00k.js.map} +1 -1
- package/dist/{chunk-5g7m7g4a.js → chunk-z7tsh9qr.js} +3 -3
- package/dist/{chunk-5g7m7g4a.js.map → chunk-z7tsh9qr.js.map} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +9 -9
- package/dist/services/index.js.map +4 -3
- package/dist/services/mcp/http/McpHttpServer.d.ts +81 -1
- package/dist/services/mcp/http/McpHttpServer.d.ts.map +1 -1
- package/dist/services/mcp/http/oauth/prismaStore.d.ts +112 -0
- package/dist/services/mcp/http/oauth/prismaStore.d.ts.map +1 -0
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/stats/route-table.js +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-b6mgrrk6.js +0 -5
- /package/dist/{chunk-fsem81ec.js.map → chunk-29jmaj16.js.map} +0 -0
- /package/dist/{chunk-236be97q.js.map → chunk-63xwah5k.js.map} +0 -0
- /package/dist/{chunk-b4jx4fzq.js.map → chunk-65wy1r1a.js.map} +0 -0
- /package/dist/{chunk-1x9ghjpt.js.map → chunk-bsa6b82q.js.map} +0 -0
- /package/dist/{chunk-5xfpqda5.js.map → chunk-mv1rs9he.js.map} +0 -0
- /package/dist/{chunk-sgwgj2q0.js.map → chunk-pq657qcp.js.map} +0 -0
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* the same answer once.
|
|
20
20
|
* RedisNonceStore — `SET key 1 PX <ttl> NX` on the app's Redis. Shared,
|
|
21
21
|
* atomic, and Redis drops each key at the token's expiry.
|
|
22
|
+
* PrismaNonceStore — an insert keyed by the nonce, in a table of the app's
|
|
23
|
+
* database (a gemi ORM model or a Prisma delegate).
|
|
22
24
|
* your own — e.g. a table with the nonce as its primary key:
|
|
23
25
|
*
|
|
24
26
|
* class DbNonceStore implements NonceStore {
|
|
@@ -104,6 +106,72 @@ export declare class RedisNonceStore implements NonceStore {
|
|
|
104
106
|
consume(nonce: string, expiresAt: number): Promise<boolean>;
|
|
105
107
|
private get client();
|
|
106
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* The slice of a model a `PrismaNonceStore` writes to: a Prisma client's
|
|
111
|
+
* delegate (`prisma.mcpOAuthUse`) or a gemi ORM model class (`McpOAuthUse`).
|
|
112
|
+
* Rows are `{ key: string; expiresAt: Date }`, `key` the primary key.
|
|
113
|
+
*/
|
|
114
|
+
export interface NonceModel {
|
|
115
|
+
create(args: {
|
|
116
|
+
data: {
|
|
117
|
+
key: string;
|
|
118
|
+
expiresAt: Date;
|
|
119
|
+
};
|
|
120
|
+
}): PromiseLike<unknown>;
|
|
121
|
+
deleteMany(args: {
|
|
122
|
+
where: Record<string, unknown>;
|
|
123
|
+
}): PromiseLike<{
|
|
124
|
+
count: number;
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
export interface PrismaNonceStoreOptions {
|
|
128
|
+
/**
|
|
129
|
+
* Put in front of every nonce, so a table shared with other single-use keys
|
|
130
|
+
* (`McpOAuthUse`, whose keys are SHA-256 hex) cannot collide with them.
|
|
131
|
+
* Default `""`.
|
|
132
|
+
*/
|
|
133
|
+
prefix?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Spent nonces in a table of the app's database, shared by every instance
|
|
137
|
+
* that shares the database: for an app with no Redis. Spending is an
|
|
138
|
+
* `INSERT` of the nonce as the primary key, so the database settles a race:
|
|
139
|
+
* of two instances handed the same answer, one insert goes in and the other
|
|
140
|
+
* hits the key and is told "already spent".
|
|
141
|
+
*
|
|
142
|
+
* ```prisma
|
|
143
|
+
* model McpOAuthUse {
|
|
144
|
+
* key String @id
|
|
145
|
+
* expiresAt DateTime
|
|
146
|
+
* }
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
149
|
+
* ```ts
|
|
150
|
+
* const nonces = new PrismaNonceStore(McpOAuthUse, { prefix: "nonce:" }); // gemi ORM model
|
|
151
|
+
* const nonces = new PrismaNonceStore(prisma.mcpOAuthUse, { prefix: "nonce:" }); // Prisma client
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* A row past its `expiresAt` binds nothing (the token it was spent for fails
|
|
155
|
+
* verification on its own), so `prune()` deletes them; run it from a
|
|
156
|
+
* scheduled job. A failing database rejects, and the answer is refused (see
|
|
157
|
+
* `NonceStore.consume`).
|
|
158
|
+
*/
|
|
159
|
+
export declare class PrismaNonceStore implements NonceStore {
|
|
160
|
+
private readonly model;
|
|
161
|
+
private readonly prefix;
|
|
162
|
+
constructor(model: NonceModel, options?: PrismaNonceStoreOptions);
|
|
163
|
+
consume(nonce: string, expiresAt: number): Promise<boolean>;
|
|
164
|
+
/** Deletes the nonces that have expired, and resolves to how many. */
|
|
165
|
+
prune(now?: number): Promise<number>;
|
|
166
|
+
private insert;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A write refused by a unique key: gemi ORM's `UniqueConstraintError`, or
|
|
170
|
+
* Prisma's `P2002` for an app whose models are a Prisma client. The Prisma
|
|
171
|
+
* code is recognised here, inside a store written for both, and is not part
|
|
172
|
+
* of gemi's public surface (see `UniqueConstraintError`).
|
|
173
|
+
*/
|
|
174
|
+
export declare function isUniqueViolation(error: unknown): boolean;
|
|
107
175
|
/** The process-wide default, shared by every agent that is not given a store. */
|
|
108
176
|
export declare const defaultNonceStore: MemoryNonceStore;
|
|
109
177
|
//# sourceMappingURL=Nonces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nonces.d.ts","sourceRoot":"","sources":["../../../ai/store/Nonces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Nonces.d.ts","sourceRoot":"","sources":["../../../ai/store/Nonces.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7D;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KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtF;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,gBAAiB,YAAW,UAAU;IAI/C,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAGb,KAAK,EAAE,UAAU,EAClC,OAAO,GAAE,uBAA4B;IAUjC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYjE,sEAAsE;IAChE,KAAK,CAAC,GAAG,SAAa,GAAG,OAAO,CAAC,MAAM,CAAC;YAOhC,MAAM;CASrB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGzD;AAED,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,kBAAyB,CAAC"}
|
package/dist/ai/store/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { type Attachment, ATTACHMENT_ID_PREFIX, type AttachmentDestination, attachmentObjectName, AttachmentNotFoundError, type AttachmentScope, type AttachmentStorage, type AttachmentStore, defaultAttachmentStore, InvalidAttachmentScopeError, MemoryAttachmentStore, newAttachmentId, type PutAttachmentParams, ScopedAttachments, type ToolAttachmentPut, type ToolAttachmentRecord, type ToolAttachments, } from "./Attachments";
|
|
2
2
|
export { defaultFileOwners, type FileOwnerRecord, type FileOwners, MemoryFileOwners, } from "./FileOwners";
|
|
3
3
|
export { defaultAgentStore, MemoryAgentStore } from "./MemoryAgentStore";
|
|
4
|
-
export { defaultNonceStore, MemoryNonceStore, type NonceRedisClient, type NonceStore, RedisNonceStore, type RedisNonceStoreOptions, } from "./Nonces";
|
|
4
|
+
export { defaultNonceStore, MemoryNonceStore, type NonceModel, type NonceRedisClient, type NonceStore, PrismaNonceStore, type PrismaNonceStoreOptions, RedisNonceStore, type RedisNonceStoreOptions, } from "./Nonces";
|
|
5
5
|
export { MemoryReceiptStore, type ReceiptClaim, type ReceiptRedisClient, type ReceiptStore, RedisReceiptStore, type RedisReceiptStoreOptions, } from "./Receipts";
|
|
6
6
|
export { FrameCursorEvictedError, LiveRunNotFoundError, liveRuns, MemoryLiveRuns, type RegisterParams, } from "./LiveRuns";
|
|
7
7
|
export { encodeFrame, sseHeaders, sseResponse } from "./sse";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,EACf,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,QAAQ,EACR,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,EACf,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,QAAQ,EACR,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/app/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Da as a}from"../chunk-
|
|
2
|
+
import{Da as a}from"../chunk-ymdpt00k.js";import"../chunk-fqqbnp0z.js";import"../chunk-jzpbwvbt.js";export{a as App};
|
|
3
3
|
|
|
4
4
|
//# debugId=F6AD769F4DAEBF5D64756E2164756E21
|
package/dist/bun/plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ea as a}from"../chunk-
|
|
2
|
+
import{ea as a}from"../chunk-pq657qcp.js";import"../chunk-2djjs8f1.js";import"../chunk-4jd25v6d.js";import"../chunk-2k3935ke.js";import"../chunk-jzpbwvbt.js";export{a as gemiPlugin};
|
|
3
3
|
|
|
4
4
|
//# debugId=2B4506B393745EFE64756E2164756E21
|
package/dist/bun/preload.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ea as k}from"../chunk-
|
|
2
|
+
import{ea as k}from"../chunk-pq657qcp.js";import"../chunk-2djjs8f1.js";import"../chunk-4jd25v6d.js";import"../chunk-2k3935ke.js";import{ya as j}from"../chunk-r3v2cnrj.js";import"../chunk-jzpbwvbt.js";var{plugin:q}=globalThis.Bun;q(k());var y=await j(process.cwd());for(let x of y.bun?.plugins??[])q(x);
|
|
3
3
|
|
|
4
4
|
//# debugId=4C9148510A2605D864756E2164756E21
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function v(j){return Object.freeze({name:j})}class T extends Error{key;constructor(j){super(`Request state "${j.name}" is not set. Check that whatever sets it (a middleware, \`context()\`) ran for this request.`);this.key=j;this.name="MissingRequestStateError"}}class K{#j=new Map;get(j){return this.#j.get(j)}require(j){if(!this.#j.has(j))throw new T(j);return this.#j.get(j)}set(j,J){return this.#j.set(j,J),J}has(j){return this.#j.has(j)}delete(j){return this.#j.delete(j)}static carry(j,J){for(let[Q,V]of j.#j)if(!J.#j.has(Q))J.#j.set(Q,V)}}function P(){for(let j of["HOST_NAME","APP_URL"]){let J=process.env[j]?.trim().replace(/\/+$/,"");if(J)return J}return}function g(j){let J=P(),Q=J===void 0?"fallback":J===process.env.HOST_NAME?.trim().replace(/\/+$/,"")?"HOST_NAME":"APP_URL",V=J??j?.trim().replace(/\/+$/,"");if(!V)throw Error("The app's public origin is not configured: set HOST_NAME (or APP_URL), e.g. HOST_NAME=https://example.com.");let $=URL.canParse(V)?new URL(V).protocol:null;if($!=="http:"&&$!=="https:")throw Error(`The app's public origin from ${Q} (${JSON.stringify(V)}) is not an absolute http(s) URL, e.g. https://example.com.`);return V}import{AsyncLocalStorage as y}from"async_hooks";var C=new Set(["woff2","woff","truetype","opentype","collection","embedded-opentype","svg"]),S={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype",ttc:"collection",eot:"embedded-opentype",svg:"svg"};var I=new Set(["auto","block","swap","fallback","optional"]),w=/^[a-zA-Z0-9.%+\- ]+$/,R=/^[uU]\+[0-9a-fA-F?]{1,6}(-[0-9a-fA-F]{1,6})?(\s*,\s*[uU]\+[0-9a-fA-F?]{1,6}(-[0-9a-fA-F]{1,6})?)*$/;function G(j){throw TypeError(`Meta.fonts: ${j}`)}function q(j){let J=(j.split(/[?#]/)[0]??"").split("/").pop()??"",Q=J.lastIndexOf(".");return Q===-1?null:S[J.slice(Q+1).toLowerCase()]??null}function U(j,J){if(J===void 0||J===null)return null;let Q=String(J).trim();if(!Q||!w.test(Q))G(`${j} ${JSON.stringify(J)} is not a valid font-${j} value`);return Q}function W(j){if(!Array.isArray(j))G("expected an array of fonts");return j.map((J)=>{if(typeof J?.family!=="string"||!J.family.trim())G("every font needs a family");let Q=typeof J.src==="string"?[{url:J.src}]:J.src;if(!Array.isArray(Q)||Q.length===0)G(`font "${J.family}" needs a src`);let V=Q.map((Z)=>{if(typeof Z?.url!=="string"||!Z.url.trim())G(`font "${J.family}" has a source without a url`);if(Z.format!==void 0&&!C.has(Z.format))G(`font "${J.family}" has an unknown format ${JSON.stringify(Z.format)}`);return{url:Z.url.trim(),format:Z.format??q(Z.url)}}),$=J.display??"swap";if(!I.has($))G(`display ${JSON.stringify($)} is not a valid font-display value`);let X=J.unicodeRange?.trim()||null;if(X&&!R.test(X))G(`unicodeRange ${JSON.stringify(J.unicodeRange)} is not a valid unicode-range`);return{family:J.family.trim(),src:V,weight:U("weight",J.weight),style:U("style",J.style),stretch:U("stretch",J.stretch),display:$,unicodeRange:X,preload:J.preload===!0}})}class Y{content={title:"Gemi App",description:null,openGraph:null,htmlAttributes:null,canonical:null,alternates:null,fonts:null};touched=!1;render(){return{title:this.content.title,description:this.content.description,openGraph:this.content.openGraph,htmlAttributes:this.content.htmlAttributes,canonical:this.content.canonical,alternates:this.content.alternates,fonts:this.content.fonts}}htmlAttributes(j){this.touched=!0;let J=Object.fromEntries(Object.entries(j).filter(([,Q])=>Q!==void 0));this.content.htmlAttributes={...this.content.htmlAttributes,...J}}canonical(j){this.touched=!0,this.content.canonical=j}alternates(j){this.touched=!0,this.content.alternates=j}fonts(j){let J=W(j);this.touched=!0,this.content.fonts=[...this.content.fonts??[],...J]}title(j){this.touched=!0,this.content.title=j}description(j){this.touched=!0,this.content.description=j}openGraph({title:j,description:J,type:Q,url:V,image:$,imageAlt:X,imageWidth:Z,imageHeight:D,twitterImage:H=$,twitterImageAlt:E=X,twitterImageWidth:b=Z,twitterImageHeight:x=D,twitterCard:A=H?"summary_large_image":"summary"}){this.touched=!0;let N=(z)=>z&&!z.startsWith("http")?`${P()}${z}`:z;this.content.openGraph=Object.fromEntries(Object.entries({title:j,description:J,type:Q,url:V,image:N($),imageAlt:X,imageWidth:Z,imageHeight:D,twitterImage:N(H),twitterImageAlt:E,twitterImageWidth:b,twitterImageHeight:x,twitterCard:A}).filter(([z,O])=>O!==void 0))}}function F(j,J,Q={}){return[`${j}=${J}`,Q.maxAge?`Max-Age=${Q.maxAge}`:"",Q.httpOnly?"HttpOnly":"",Q.secure?"Secure":"",Q.sameSite?`SameSite=${Q.sameSite}`:"SameSite=Strict",Q.path?`Path=${Q.path}`:"Path=/",Q.domain?`Domain=${Q.domain}`:"",Q.expires?`Expires=${Q.expires.toUTCString()}`:"",Q.partitioned?"Partitioned":""].filter((V)=>V!=="").join("; ")}var B=new y;class M{req;cookies=new Set;headers=new Headers;serverQueries=null;user=null;csrfHmac=null;locale=null;metadata=new Y;rangeRequest=null;sessionId=null;featureEvaluations=null;featureContext=null;featureBuckets=null;pendingWork=new Set;ended=!1;constructor(j){this.req=j}waitUntil(j){if(this.ended)return;let J=Promise.resolve(j).then(()=>{},()=>{});this.pendingWork.add(J),J.then(()=>this.pendingWork.delete(J))}hasPendingWork(){return this.pendingWork.size>0}async whenIdle(){while(this.pendingWork.size>0)await Promise.all(Array.from(this.pendingWork))}setLocale(j){this.locale=j}renderMeta(){return this.metadata.render()}setCSRFHmac(j){this.csrfHmac=j}setCookie(j,J,Q={}){this.cookies.add(F(j,J,Q))}deleteCookie(j,J={}){this.cookies.add(F(j,"",{...J,maxAge:-1}))}setHeaders(j,J){this.headers.set(j,J)}setUser(j){this.user=j}setRequest(j){this.req=j}destroy(){this.ended=!0,delete this.cookies,delete this.headers,this.serverQueries=null,this.sessionId=null,this.featureEvaluations=null,this.featureContext=null,this.featureBuckets=null,delete this.user}}var _="session_id";function k(){let j=L.getStore();if(!j)return null;if(j.sessionId)return j.sessionId;let J=j.req?.cookies?.get(_);if(J)j.sessionId=J;return j.sessionId}function a(){let j=L.getStore();if(!j)return null;let J=k();if(J)return J;let Q=Bun.randomUUIDv7();return j.sessionId=Q,j.setCookie(_,Q,{httpOnly:!0,secure:Bun.env.NODE_ENV==="production",sameSite:"Lax",expires:new Date(Date.now()+31536000000)}),Q}class L{static getStore(){return B.getStore()}static setRequest(j){B.getStore().req=j}static run(j,J,Q){let V=new M(j);if(Q){if(V.user=Q.user,Q.state&&j.state)K.carry(Q.state,j.state)}return B.run(V,J)}static runWith(j,J){return B.run(j,J)}static exit(j){return B.exit(j)}}
|
|
3
|
-
export{P as
|
|
3
|
+
export{P as Mi,g as Ni,v as Oi,T as Pi,K as Qi,k as Ri,a as Si,L as Ti};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=1F16938DB3300AD264756E2164756E21
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"import { type MetaFont, type NormalizedFont, normalizeFonts } from \"../client/fonts\";\nimport { configuredAppOrigin } from \"../utils/appOrigin\";\n\nexport type { MetaFont };\n\nexport type OpenGraphParams = {\n title: string;\n description?: string;\n type: string;\n url: string;\n /** Rendered as `og:image` only when set. A path is prefixed with the app origin. */\n image?: string;\n imageAlt?: string;\n imageWidth?: number;\n imageHeight?: number;\n twitterImage?: string;\n twitterImageAlt?: string;\n twitterImageWidth?: number;\n twitterImageHeight?: number;\n /**\n * The `twitter:card` type. Defaults to `\"summary_large_image\"` when the page\n * has an image (`twitterImage ?? image`), `\"summary\"` otherwise.\n */\n twitterCard?: \"summary\" | \"summary_large_image\";\n};\n/**\n * Attributes for the document's `<html>` element, handed to the root (or a\n * static view's) layout as its `htmlAttributes` prop.\n */\nexport type HtmlAttributes = {\n /** The document's language, e.g. `\"tr\"`. Defaults to the request's locale. */\n lang?: string;\n /** Text direction. Defaults to the one `lang` is written in. */\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n};\n\n/** One `<link rel=\"alternate\" hreflang>`: the same page in another language. */\nexport type AlternateLink = {\n /** A BCP 47 tag, or `\"x-default\"` for the page to use when none matches. */\n hrefLang: string;\n href: string;\n};\n\nexport class Metadata {\n content: any = {\n title: \"Gemi App\",\n description: null,\n openGraph: null,\n htmlAttributes: null,\n canonical: null,\n alternates: null,\n fonts: null,\n };\n\n /**\n * Whether a handler set anything, as opposed to `content` still being the\n * defaults. A partially rendered response that touched no metadata sends\n * none, so the client keeps what the skipped segments put there.\n */\n touched = false;\n\n render() {\n return {\n title: this.content.title,\n description: this.content.description,\n openGraph: this.content.openGraph,\n htmlAttributes: this.content.htmlAttributes,\n canonical: this.content.canonical,\n alternates: this.content.alternates,\n fonts: this.content.fonts,\n };\n }\n\n /** Merged into what earlier calls set; `undefined` leaves an attribute alone. */\n htmlAttributes(attributes: HtmlAttributes) {\n this.touched = true;\n const defined = Object.fromEntries(\n Object.entries(attributes).filter(([, value]) => value !== undefined),\n );\n this.content.htmlAttributes = { ...this.content.htmlAttributes, ...defined };\n }\n\n canonical(url: string) {\n this.touched = true;\n this.content.canonical = url;\n }\n\n alternates(links: AlternateLink[]) {\n this.touched = true;\n this.content.alternates = links;\n }\n\n /** Added to what earlier calls declared, so a layout and its page can both declare fonts. */\n fonts(fonts: MetaFont[]) {\n const normalized: NormalizedFont[] = normalizeFonts(fonts);\n this.touched = true;\n this.content.fonts = [...(this.content.fonts ?? []), ...normalized];\n }\n\n title(title: string) {\n this.touched = true;\n this.content.title = title;\n }\n\n description(description: string) {\n this.touched = true;\n this.content.description = description;\n }\n\n openGraph({\n title,\n description,\n type,\n url,\n image,\n imageAlt,\n imageWidth,\n imageHeight,\n twitterImage = image,\n twitterImageAlt = imageAlt,\n twitterImageWidth = imageWidth,\n twitterImageHeight = imageHeight,\n twitterCard = twitterImage ? \"summary_large_image\" : \"summary\",\n }: OpenGraphParams) {\n this.touched = true;\n const absolute = (src: string | undefined) =>\n src && !src.startsWith(\"http\") ? `${configuredAppOrigin()}${src}` : src;\n this.content.openGraph = Object.fromEntries(\n Object.entries({\n title,\n description,\n type,\n url,\n image: absolute(image),\n imageAlt,\n imageWidth,\n imageHeight,\n twitterImage: absolute(twitterImage),\n twitterImageAlt,\n twitterImageWidth,\n twitterImageHeight,\n twitterCard,\n }).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"
|
|
10
10
|
],
|
|
11
11
|
"mappings": ";AAkCO,SAAS,CAAW,CAAC,EAA2B,CACrD,OAAO,OAAO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W,EACnC,GAAI,GAEF,GADA,EAAM,KAAO,EAAQ,KACjB,EAAQ,OAAS,EAAY,MAC/B,EAAa,MAAM,EAAQ,MAAO,EAAY,KAAK,EAGvD,OAAO,EAAe,IAAI,EAAO,CAAE,QAU9B,QAAU,CAAC,EAAc,EAAgB,CAC9C,OAAO,EAAe,IAAI,EAAO,CAAE,QAQ9B,KAAO,CAAC,EAAgB,CAC7B,OAAO,EAAe,KAAK,CAAE,EAEjC",
|
|
12
|
-
"debugId": "
|
|
12
|
+
"debugId": "1F16938DB3300AD264756E2164756E21",
|
|
13
13
|
"names": []
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Q as C}from"./chunk-
|
|
2
|
+
import{Q as C}from"./chunk-1wz6kwjc.js";import{aa as A}from"./chunk-mtamgvf4.js";import{sl as _}from"./chunk-jzpbwvbt.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as a,a as b,i as c,I as d,d as e,v as f,T as g};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=199671867EEE0B6C64756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";sIAAA,SACA,KACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "199671867EEE0B6C64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{D as
|
|
2
|
+
import{_k as B}from"./chunk-e9z8p2fy.js";function $(z){return z.split(".")}class Y{static token="config";items;constructor(z={}){this.items=z}has(z){let F=this.items;for(let E of $(z)){if(F===null||typeof F!=="object"||!(E in F))return!1;F=F[E]}return!0}get(z,F){let E=this.items;for(let G of $(z)){if(E===null||typeof E!=="object"||!(G in E))return F;E=E[G]}return E===void 0?F:E}getMany(z){let F=Array.isArray(z)?z.map((G)=>[G,void 0]):Object.entries(z),E={};for(let[G,H]of F)E[G]=this.get(G,H);return E}set(z,F){let E=typeof z==="string"?[[z,F]]:Object.entries(z);for(let[G,H]of E){let U=$(G),Z=U.pop(),J=this.items;for(let Q of U){let W=J[Q];if(W===null||typeof W!=="object")J[Q]={};J=J[Q]}J[Z]=H}}prepend(z,F){let E=this.get(z,[]);E.unshift(F),this.set(z,E)}push(z,F){let E=this.get(z,[]);E.push(F),this.set(z,E)}merge(z){for(let[F,E]of Object.entries(z)){let G=this.items[F];if(G!==null&&typeof G==="object"&&!Array.isArray(G)&&E!==null&&typeof E==="object"&&!Array.isArray(E))this.items[F]={...G,...E};else this.items[F]=E}}all(){return this.items}}var j=Symbol.for("gemi.foundation.Application");class X extends B{[j]=!0;static isApplication(z){return typeof z==="object"&&z!==null&&j in z}config;providers=[];booted=!1;constructor(z=new Y){super();this.config=z,this.instance(Y,z)}static currentInstance;static getInstance(){return X.currentInstance}static setInstance(z){return X.currentInstance=z,z}register(z){let F=this.providers.find((G)=>G instanceof z);if(F)return F;let E=new z(this);return E.register(),this.providers.push(E),E}registerMany(z){for(let F of z)this.register(F)}getProviders(){return[...this.providers]}isBooted(){return this.booted}async boot(){if(this.booted)return;for(let z of this.providers)await z.boot();this.booted=!0}shutdown(z={}){return this.shutdownPromise??=this.shutdownProviders(z.timeoutMs??5000),this.shutdownPromise}shutdownPromise;async shutdownProviders(z){let F={failed:[],timedOut:[]};if(z<=0){if(this.providers.length>0)console.log(`[gemi] Skipping ${this.providers.length} provider shutdown hook(s): no time is budgeted for them.`);return F}let E=Date.now()+z;for(let G of[...this.providers].reverse()){let H=G.constructor.name,U=E-Date.now();if(U<=0){console.error(`[gemi] ${H}.shutdown() skipped: the provider shutdown deadline had passed.`),F.timedOut.push(H);continue}let Z,J=await Promise.race([Promise.resolve().then(()=>G.shutdown({timeoutMs:U})).then((Q)=>Q?.abandoned?"abandoned":"done",(Q)=>{return console.error(`[gemi] ${H}.shutdown() failed:`,Q),"failed"}),new Promise((Q)=>{Z=setTimeout(()=>Q("timeout"),U)})]);if(clearTimeout(Z),J==="failed")F.failed.push(H);if(J==="abandoned")F.timedOut.push(H);if(J==="timeout")console.error(`[gemi] ${H}.shutdown() did not finish within the provider shutdown deadline; moving on.`),F.timedOut.push(H)}return F}flush(){super.flush(),this.instance(Y,this.config),this.providers=[],this.booted=!1,this.shutdownPromise=void 0}}import{AsyncLocalStorage as K}from"async_hooks";var D=new K;function I(z){let F=D.getStore(),E=X.isApplication(F)?F:X.getInstance();if(!E)throw Error("No Application instance is available. Boot a Kernel before resolving services.");return z?E.make(z):E}
|
|
3
|
+
export{D as Vk,Y as Wk,X as Xk,I as Yk};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=822EFD9F8361C65764756E2164756E21
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"import type { ServiceToken } from \"../container/Container\";\nimport { kernelContext } from \"../kernel/context\";\nimport { Application } from \"./Application\";\n\n/**\n * Resolves the Application for the current async context. Reads the kernel\n * AsyncLocalStorage — there is exactly one ALS in the framework, and\n * `Kernel.run()` stores the Application in it, so this is the primary path for\n * anything running inside a request or a cron tick.\n *\n * The static instance (Laravel's `Container::setInstance`, set by\n * `Kernel.boot()`) is the fallback for code that runs outside any `run()`\n * scope — build-time tooling, module top level, a stray `setTimeout`.\n */\nexport function app(): Application;\nexport function app<T>(token: ServiceToken<T>): T;\nexport function app<T>(token?: ServiceToken<T>): Application | T {\n const store = kernelContext.getStore();\n const instance = Application.isApplication(store)\n ? store\n : Application.getInstance();\n\n if (!instance) {\n throw new Error(\n \"No Application instance is available. Boot a Kernel before resolving services.\",\n );\n }\n\n return token ? instance.make(token) : instance;\n}\n"
|
|
9
9
|
],
|
|
10
10
|
"mappings": ";yCAOA,SAAS,CAAQ,CAAC,EAAuB,CACvC,OAAO,EAAI,MAAM,GAAG,EAGf,MAAM,CAAW,OAGf,OAAQ,SAEP,MAER,WAAW,CAAC,EAAqB,CAAC,EAAG,CACnC,KAAK,MAAQ,EAGf,GAAG,CAAC,EAAsB,CACxB,IAAI,EAAc,KAAK,MACvB,QAAW,KAAW,EAAS,CAAG,EAAG,CACnC,GAAI,IAAW,MAAQ,OAAO,IAAW,UAAY,EAAE,KAAW,GAChE,MAAO,GAET,EAAS,EAAO,GAElB,MAAO,GAGT,GAAY,CAAC,EAAa,EAAqB,CAC7C,IAAI,EAAc,KAAK,MACvB,QAAW,KAAW,EAAS,CAAG,EAAG,CACnC,GAAI,IAAW,MAAQ,OAAO,IAAW,UAAY,EAAE,KAAW,GAChE,OAAO,EAET,EAAS,EAAO,GAElB,OAAO,IAAW,OAAa,EAAsB,EAKvD,OAAO,CAAC,EAA2D,CACjE,IAAM,EAAgC,MAAM,QAAQ,CAAI,EACpD,EAAK,IAAI,CAAC,IAAuB,CAAC,EAAK,MAAS,CAAC,EACjD,OAAO,QAAQ,CAA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o,i as er,k as M,l as vo,m as Eo,n as So,p as Gr,q as zr,r as kt,s as Io,t as cr,u as Po,v as xo,w as ar,x as eo,y as ro,z as to}from"./chunk-kaphqnpp.js";import{D as hr,E as mt,G as Qt,K as Ue,O as f}from"./chunk-0t2ym9ap.js";import{P as Oo}from"./chunk-1w5dnkd1.js";import"./chunk-m70hn4eg.js";import{X as zt}from"./chunk-f2e7n064.js";import{Y as gt}from"./chunk-z80v4z8y.js";import{Z as Ht}from"./chunk-jmhrpfqn.js";import"./chunk-9dkpv8ev.js";import"./chunk-8ky8cmde.js";import"./chunk-mkw35cz7.js";import{la as Zt}from"./chunk-hyhbk12v.js";import{sl as S}from"./chunk-t2nsn0r2.js";var A=S((oe)=>{Object.defineProperty(oe,"__esModule",{value:!0});oe.resolveHttpAuthSchemeConfig=oe.defaultSSOOIDCHttpAuthSchemeProvider=oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var Rr=M(),w=hr(),fr=async(e,r,i)=>{return{operation:(0,w.getSmithyContext)(r).operation,region:await(0,w.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=fr;function Fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,i)=>({signingProperties:{config:r,context:i}})}}function Ur(e){return{schemeId:"smithy.api#noAuth"}}var $r=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(Ur(e));break}default:r.push(Fr(e))}return r};oe.defaultSSOOIDCHttpAuthSchemeProvider=$r;var jr=(e)=>{let r=(0,Rr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,w.normalizeProvider)(e.authSchemePreference??[])})};oe.resolveHttpAuthSchemeConfig=jr});var De=S((xe)=>{Object.defineProperty(xe,"__esModule",{value:!0});xe.ruleSet=void 0;var Ee="required",p="fn",d="argv",q="ref",se=!0,ne="isSet",N="booleanEquals",D="error",b="endpoint",I="tree",G="PartitionResult",z="getAttr",pe={[Ee]:!1,type:"string"},de={[Ee]:!0,default:!1,type:"boolean"},ce={[q]:"Endpoint"},Se={[p]:N,[d]:[{[q]:"UseFIPS"},!0]},Ie={[p]:N,[d]:[{[q]:"UseDualStack"},!0]},n={},ae={[p]:z,[d]:[{[q]:G},"supportsFIPS"]},Pe={[q]:G},le={[p]:N,[d]:[!0,{[p]:z,[d]:[Pe,"supportsDualStack"]}]},ue=[Se],Oe=[Ie],ve=[{[q]:"Region"}],Ar={version:"1.0",parameters:{Region:pe,UseDualStack:de,UseFIPS:de,Endpoint:pe},rules:[{conditions:[{[p]:ne,[d]:[ce]}],rules:[{conditions:ue,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{conditions:Oe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{url:ce,properties:n,headers:n},type:b}],type:I},{conditions:[{[p]:ne,[d]:ve}],rules:[{conditions:[{[p]:"aws.partition",[d]:ve,assign:G}],rules:[{conditions:[Se,Ie],rules:[{conditions:[{[p]:N,[d]:[se,ae]},le],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:I},{conditions:ue,rules:[{conditions:[{[p]:N,[d]:[ae,se]}],rules:[{conditions:[{[p]:"stringEquals",[d]:[{[p]:z,[d]:[Pe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:n,headers:n},type:b},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:I},{conditions:Oe,rules:[{conditions:[le],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:I},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I}],type:I},{error:"Invalid Configuration: Missing Region",type:D}]};xe.ruleSet=Ar});var Ne=S((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.defaultEndpointResolver=void 0;var mr=zr(),m=Gr(),Hr=De(),Lr=new m.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tr=(e,r={})=>{return Lr.get(e,()=>(0,m.resolveEndpoint)(Hr.ruleSet,{endpointParams:e,logger:r.logger}))};be.defaultEndpointResolver=Tr;m.customEndpointFunctions.aws=mr.awsEndpointFunctions});var F=S((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.SSOOIDCServiceException=L.__ServiceException=void 0;var he=f();Object.defineProperty(L,"__ServiceException",{enumerable:!0,get:function(){return he.ServiceException}});class H extends he.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,H.prototype)}}L.SSOOIDCServiceException=H});var k=S((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.UnsupportedGrantTypeException=fe.UnauthorizedClientException=fe.SlowDownException=fe.InvalidScopeException=fe.InvalidRequestException=fe.InvalidGrantException=fe.InvalidClientException=fe.InternalServerException=fe.ExpiredTokenException=fe.AuthorizationPendingException=fe.AccessDeniedException=void 0;var l=F();class T extends l.SSOOIDCServiceException{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.AccessDeniedException=T;class B extends l.SSOOIDCServiceException{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}fe.AuthorizationPendingException=B;class V extends l.SSOOIDCServiceException{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}fe.ExpiredTokenException=V;class W extends l.SSOOIDCServiceException{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InternalServerException=W;class Y extends l.SSOOIDCServiceException{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidClientException=Y;class J extends l.SSOOIDCServiceException{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidGrantException=J;class K extends l.SSOOIDCServiceException{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.InvalidRequestException=K;class X extends l.SSOOIDCServiceException{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidScopeException=X;class C extends l.SSOOIDCServiceException{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}fe.SlowDownException=C;class Q extends l.SSOOIDCServiceException{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnauthorizedClientException=Q;class Z extends l.SSOOIDCServiceException{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnsupportedGrantTypeException=Z});var g=S((ze)=>{Object.defineProperty(ze,"__esModule",{value:!0});ze.CreateToken$=ze.CreateTokenResponse$=ze.CreateTokenRequest$=ze.errorTypeRegistries=ze.UnsupportedGrantTypeException$=ze.UnauthorizedClientException$=ze.SlowDownException$=ze.InvalidScopeException$=ze.InvalidRequestException$=ze.InvalidGrantException$=ze.InvalidClientException$=ze.InternalServerException$=ze.ExpiredTokenException$=ze.AuthorizationPendingException$=ze.AccessDeniedException$=ze.SSOOIDCServiceException$=void 0;var kr="AccessDeniedException",gr="AuthorizationPendingException",_r="AccessToken",et="ClientSecret",rt="CreateToken",tt="CreateTokenRequest",ot="CreateTokenResponse",it="CodeVerifier",st="ExpiredTokenException",nt="InvalidClientException",pt="InvalidGrantException",dt="InvalidRequestException",ct="InternalServerException",at="InvalidScopeException",lt="IdToken",ut="RefreshToken",Ot="SlowDownException",vt="UnauthorizedClientException",Et="UnsupportedGrantTypeException",St="accessToken",E="client",It="clientId",Pt="clientSecret",xt="codeVerifier",yt="code",Dt="deviceCode",t="error",bt="expiresIn",u="error_description",qt="grantType",Nt="http",O="httpError",ht="idToken",$e="reason",je="refreshToken",Rt="redirectUri",we="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",ft="scope",Ft="server",Ut="tokenType",o="com.amazonaws.ssooidc",Me=Ue(),v=k(),$t=F(),Ae=Me.TypeRegistry.for(we);ze.SSOOIDCServiceException$=[-3,we,"SSOOIDCServiceException",0,[],[]];Ae.registerError(ze.SSOOIDCServiceException$,$t.SSOOIDCServiceException);var c=Me.TypeRegistry.for(o);ze.AccessDeniedException$=[-3,o,kr,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.AccessDeniedException$,v.AccessDeniedException);ze.AuthorizationPendingException$=[-3,o,gr,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.AuthorizationPendingException$,v.AuthorizationPendingException);ze.ExpiredTokenException$=[-3,o,st,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.ExpiredTokenException$,v.ExpiredTokenException);ze.InternalServerException$=[-3,o,ct,{[t]:Ft,[O]:500},[t,u],[0,0]];c.registerError(ze.InternalServerException$,v.InternalServerException);ze.InvalidClientException$=[-3,o,nt,{[t]:E,[O]:401},[t,u],[0,0]];c.registerError(ze.InvalidClientException$,v.InvalidClientException);ze.InvalidGrantException$=[-3,o,pt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidGrantException$,v.InvalidGrantException);ze.InvalidRequestException$=[-3,o,dt,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.InvalidRequestException$,v.InvalidRequestException);ze.InvalidScopeException$=[-3,o,at,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidScopeException$,v.InvalidScopeException);ze.SlowDownException$=[-3,o,Ot,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.SlowDownException$,v.SlowDownException);ze.UnauthorizedClientException$=[-3,o,vt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnauthorizedClientException$,v.UnauthorizedClientException);ze.UnsupportedGrantTypeException$=[-3,o,Et,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnsupportedGrantTypeException$,v.UnsupportedGrantTypeException);ze.errorTypeRegistries=[Ae,c];var jt=[0,o,_r,8,0],wt=[0,o,et,8,0],Mt=[0,o,it,8,0],At=[0,o,lt,8,0],Ge=[0,o,ut,8,0];ze.CreateTokenRequest$=[3,o,tt,0,[It,Pt,qt,Dt,yt,je,ft,Rt,xt],[0,[()=>wt,0],0,0,0,[()=>Ge,0],64,0,[()=>Mt,0]],3];ze.CreateTokenResponse$=[3,o,ot,0,[St,Ut,bt,je,ht],[[()=>jt,0],0,1,[()=>Ge,0],[()=>At,0]]];ze.CreateToken$=[9,o,rt,{[Nt]:["POST","/token",200]},()=>ze.CreateTokenRequest$,()=>ze.CreateTokenResponse$]});var or=S((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var Tt=M(),Bt=Lt(),Vt=er(),Wt=f(),Yt=Ht(),ge=mt(),_e=zt(),Jt=A(),Kt=Ne(),Xt=g(),Ct=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ge.fromBase64,base64Encoder:e?.base64Encoder??ge.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kt.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jt.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Tt.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vt.NoAuthSigner}],logger:e?.logger??new Wt.NoOpLogger,protocol:e?.protocol??Bt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Xt.errorTypeRegistries,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Yt.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=Ct});var Or=S((lr)=>{Object.defineProperty(lr,"__esModule",{value:!0});lr.getRuntimeConfig=void 0;var io=Zt(),so=io.__importDefault(_t()),ir=M(),sr=eo(),U=cr(),no=ro(),nr=ar(),x=gt(),pr=Qt(),dr=f(),po=to(),co=oo(),ao=kt(),lo=or(),uo=(e)=>{(0,dr.emitWarningIfUnsupportedVersion)(process.version);let r=(0,co.resolveDefaultsModeConfig)(e),i=()=>r().then(dr.loadConfigsForDefaultMode),a=(0,lo.getRuntimeConfig)(e);(0,ir.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,x.loadConfig)(ir.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??po.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,sr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:so.default.version}),maxAttempts:e?.maxAttempts??(0,x.loadConfig)(nr.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,x.loadConfig)(U.NODE_REGION_CONFIG_OPTIONS,{...U.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:pr.NodeHttpHandler.create(e?.requestHandler??i),retryMode:e?.retryMode??(0,x.loadConfig)({...nr.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await i()).retryMode||ao.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??no.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??pr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,x.loadConfig)(U.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,x.loadConfig)(U.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,x.loadConfig)(sr.NODE_APP_ID_CONFIG_OPTIONS,s)}};lr.getRuntimeConfig=uo});var Yo=S((P)=>{var vr=vo(),Do=Eo(),bo=So(),Er=Io(),qo=cr(),_=er(),No=Ue(),ho=Po(),yr=xo(),Sr=ar(),y=f(),Ir=A(),Ro=Or(),Pr=yo(),xr=Oo(),h=g(),$=k(),fo=F(),Fo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Uo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$o=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:i,credentials:a}=e;return{setHttpAuthScheme(s){let R=r.findIndex((j)=>j.schemeId===s.schemeId);if(R===-1)r.push(s);else r.splice(R,1,s)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(s){i=s},httpAuthSchemeProvider(){return i},setCredentials(s){a=s},credentials(){return a}}},jo=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},wo=(e,r)=>{let i=Object.assign(Pr.getAwsRegionExtensionConfiguration(e),y.getDefaultExtensionConfiguration(e),xr.getHttpHandlerExtensionConfiguration(e),$o(e));return r.forEach((a)=>a.configure(i)),Object.assign(e,Pr.resolveAwsRegionExtensionConfiguration(i),y.resolveDefaultRuntimeConfig(i),xr.resolveHttpHandlerRuntimeConfig(i),jo(i))};class ee extends y.Client{config;constructor(...[e]){let r=Ro.getRuntimeConfig(e||{});super(r);this.initConfig=r;let i=Fo(r),a=Er.resolveUserAgentConfig(i),s=Sr.resolveRetryConfig(a),R=qo.resolveRegionConfig(s),j=vr.resolveHostHeaderConfig(R),Dr=yr.resolveEndpointConfig(j),br=Ir.resolveHttpAuthSchemeConfig(Dr),qr=wo(br,e?.extensions||[]);this.config=qr,this.middlewareStack.use(No.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Er.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(ho.getContentLengthPlugin(this.config)),this.middlewareStack.use(vr.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Do.getLoggerPlugin(this.config)),this.middlewareStack.use(bo.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ir.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Nr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends y.Command.classBuilder().ep(Uo).m(function(e,r,i,a){return[yr.getEndpointPlugin(i,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(h.CreateToken$).build(){}var Mo={CreateTokenCommand:re};class te extends ee{}y.createAggregatedClient(Mo,te);var Ao={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Go={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};P.$Command=y.Command;P.__Client=y.Client;P.SSOOIDCServiceException=fo.SSOOIDCServiceException;P.AccessDeniedExceptionReason=Ao;P.CreateTokenCommand=re;P.InvalidRequestExceptionReason=Go;P.SSOOIDC=te;P.SSOOIDCClient=ee;Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=h[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=$[e]})});export default Yo();
|
|
2
|
+
import{h as _t}from"./chunk-5yz684rw.js";import{A as oo,B as Lt,C as yo,i as er,k as M,l as vo,m as Eo,n as So,p as Gr,q as zr,r as kt,s as Io,t as cr,u as Po,v as xo,w as ar,x as eo,y as ro,z as to}from"./chunk-9z8zq4rx.js";import{D as hr,E as mt,G as Qt,K as Ue,O as f}from"./chunk-rma7afjd.js";import{P as Oo}from"./chunk-g22kph4n.js";import"./chunk-1wz6kwjc.js";import{X as zt}from"./chunk-q9na1syb.js";import{Y as gt}from"./chunk-5q2pmve9.js";import{Z as Ht}from"./chunk-vm5t0j24.js";import"./chunk-dxh8njb4.js";import"./chunk-h8eawyhx.js";import"./chunk-mtamgvf4.js";import{la as Zt}from"./chunk-2k3935ke.js";import{tl as S}from"./chunk-jzpbwvbt.js";var A=S((oe)=>{Object.defineProperty(oe,"__esModule",{value:!0});oe.resolveHttpAuthSchemeConfig=oe.defaultSSOOIDCHttpAuthSchemeProvider=oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var Rr=M(),w=hr(),fr=async(e,r,i)=>{return{operation:(0,w.getSmithyContext)(r).operation,region:await(0,w.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=fr;function Fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,i)=>({signingProperties:{config:r,context:i}})}}function Ur(e){return{schemeId:"smithy.api#noAuth"}}var $r=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(Ur(e));break}default:r.push(Fr(e))}return r};oe.defaultSSOOIDCHttpAuthSchemeProvider=$r;var jr=(e)=>{let r=(0,Rr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,w.normalizeProvider)(e.authSchemePreference??[])})};oe.resolveHttpAuthSchemeConfig=jr});var De=S((xe)=>{Object.defineProperty(xe,"__esModule",{value:!0});xe.ruleSet=void 0;var Ee="required",p="fn",d="argv",q="ref",se=!0,ne="isSet",N="booleanEquals",D="error",b="endpoint",I="tree",G="PartitionResult",z="getAttr",pe={[Ee]:!1,type:"string"},de={[Ee]:!0,default:!1,type:"boolean"},ce={[q]:"Endpoint"},Se={[p]:N,[d]:[{[q]:"UseFIPS"},!0]},Ie={[p]:N,[d]:[{[q]:"UseDualStack"},!0]},n={},ae={[p]:z,[d]:[{[q]:G},"supportsFIPS"]},Pe={[q]:G},le={[p]:N,[d]:[!0,{[p]:z,[d]:[Pe,"supportsDualStack"]}]},ue=[Se],Oe=[Ie],ve=[{[q]:"Region"}],Ar={version:"1.0",parameters:{Region:pe,UseDualStack:de,UseFIPS:de,Endpoint:pe},rules:[{conditions:[{[p]:ne,[d]:[ce]}],rules:[{conditions:ue,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{conditions:Oe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{url:ce,properties:n,headers:n},type:b}],type:I},{conditions:[{[p]:ne,[d]:ve}],rules:[{conditions:[{[p]:"aws.partition",[d]:ve,assign:G}],rules:[{conditions:[Se,Ie],rules:[{conditions:[{[p]:N,[d]:[se,ae]},le],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:I},{conditions:ue,rules:[{conditions:[{[p]:N,[d]:[ae,se]}],rules:[{conditions:[{[p]:"stringEquals",[d]:[{[p]:z,[d]:[Pe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:n,headers:n},type:b},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:I},{conditions:Oe,rules:[{conditions:[le],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:I},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I}],type:I},{error:"Invalid Configuration: Missing Region",type:D}]};xe.ruleSet=Ar});var Ne=S((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.defaultEndpointResolver=void 0;var mr=zr(),m=Gr(),Hr=De(),Lr=new m.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tr=(e,r={})=>{return Lr.get(e,()=>(0,m.resolveEndpoint)(Hr.ruleSet,{endpointParams:e,logger:r.logger}))};be.defaultEndpointResolver=Tr;m.customEndpointFunctions.aws=mr.awsEndpointFunctions});var F=S((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.SSOOIDCServiceException=L.__ServiceException=void 0;var he=f();Object.defineProperty(L,"__ServiceException",{enumerable:!0,get:function(){return he.ServiceException}});class H extends he.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,H.prototype)}}L.SSOOIDCServiceException=H});var k=S((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.UnsupportedGrantTypeException=fe.UnauthorizedClientException=fe.SlowDownException=fe.InvalidScopeException=fe.InvalidRequestException=fe.InvalidGrantException=fe.InvalidClientException=fe.InternalServerException=fe.ExpiredTokenException=fe.AuthorizationPendingException=fe.AccessDeniedException=void 0;var l=F();class T extends l.SSOOIDCServiceException{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.AccessDeniedException=T;class B extends l.SSOOIDCServiceException{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}fe.AuthorizationPendingException=B;class V extends l.SSOOIDCServiceException{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}fe.ExpiredTokenException=V;class W extends l.SSOOIDCServiceException{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InternalServerException=W;class Y extends l.SSOOIDCServiceException{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidClientException=Y;class J extends l.SSOOIDCServiceException{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidGrantException=J;class K extends l.SSOOIDCServiceException{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.InvalidRequestException=K;class X extends l.SSOOIDCServiceException{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidScopeException=X;class C extends l.SSOOIDCServiceException{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}fe.SlowDownException=C;class Q extends l.SSOOIDCServiceException{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnauthorizedClientException=Q;class Z extends l.SSOOIDCServiceException{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnsupportedGrantTypeException=Z});var g=S((ze)=>{Object.defineProperty(ze,"__esModule",{value:!0});ze.CreateToken$=ze.CreateTokenResponse$=ze.CreateTokenRequest$=ze.errorTypeRegistries=ze.UnsupportedGrantTypeException$=ze.UnauthorizedClientException$=ze.SlowDownException$=ze.InvalidScopeException$=ze.InvalidRequestException$=ze.InvalidGrantException$=ze.InvalidClientException$=ze.InternalServerException$=ze.ExpiredTokenException$=ze.AuthorizationPendingException$=ze.AccessDeniedException$=ze.SSOOIDCServiceException$=void 0;var kr="AccessDeniedException",gr="AuthorizationPendingException",_r="AccessToken",et="ClientSecret",rt="CreateToken",tt="CreateTokenRequest",ot="CreateTokenResponse",it="CodeVerifier",st="ExpiredTokenException",nt="InvalidClientException",pt="InvalidGrantException",dt="InvalidRequestException",ct="InternalServerException",at="InvalidScopeException",lt="IdToken",ut="RefreshToken",Ot="SlowDownException",vt="UnauthorizedClientException",Et="UnsupportedGrantTypeException",St="accessToken",E="client",It="clientId",Pt="clientSecret",xt="codeVerifier",yt="code",Dt="deviceCode",t="error",bt="expiresIn",u="error_description",qt="grantType",Nt="http",O="httpError",ht="idToken",$e="reason",je="refreshToken",Rt="redirectUri",we="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",ft="scope",Ft="server",Ut="tokenType",o="com.amazonaws.ssooidc",Me=Ue(),v=k(),$t=F(),Ae=Me.TypeRegistry.for(we);ze.SSOOIDCServiceException$=[-3,we,"SSOOIDCServiceException",0,[],[]];Ae.registerError(ze.SSOOIDCServiceException$,$t.SSOOIDCServiceException);var c=Me.TypeRegistry.for(o);ze.AccessDeniedException$=[-3,o,kr,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.AccessDeniedException$,v.AccessDeniedException);ze.AuthorizationPendingException$=[-3,o,gr,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.AuthorizationPendingException$,v.AuthorizationPendingException);ze.ExpiredTokenException$=[-3,o,st,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.ExpiredTokenException$,v.ExpiredTokenException);ze.InternalServerException$=[-3,o,ct,{[t]:Ft,[O]:500},[t,u],[0,0]];c.registerError(ze.InternalServerException$,v.InternalServerException);ze.InvalidClientException$=[-3,o,nt,{[t]:E,[O]:401},[t,u],[0,0]];c.registerError(ze.InvalidClientException$,v.InvalidClientException);ze.InvalidGrantException$=[-3,o,pt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidGrantException$,v.InvalidGrantException);ze.InvalidRequestException$=[-3,o,dt,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.InvalidRequestException$,v.InvalidRequestException);ze.InvalidScopeException$=[-3,o,at,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidScopeException$,v.InvalidScopeException);ze.SlowDownException$=[-3,o,Ot,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.SlowDownException$,v.SlowDownException);ze.UnauthorizedClientException$=[-3,o,vt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnauthorizedClientException$,v.UnauthorizedClientException);ze.UnsupportedGrantTypeException$=[-3,o,Et,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnsupportedGrantTypeException$,v.UnsupportedGrantTypeException);ze.errorTypeRegistries=[Ae,c];var jt=[0,o,_r,8,0],wt=[0,o,et,8,0],Mt=[0,o,it,8,0],At=[0,o,lt,8,0],Ge=[0,o,ut,8,0];ze.CreateTokenRequest$=[3,o,tt,0,[It,Pt,qt,Dt,yt,je,ft,Rt,xt],[0,[()=>wt,0],0,0,0,[()=>Ge,0],64,0,[()=>Mt,0]],3];ze.CreateTokenResponse$=[3,o,ot,0,[St,Ut,bt,je,ht],[[()=>jt,0],0,1,[()=>Ge,0],[()=>At,0]]];ze.CreateToken$=[9,o,rt,{[Nt]:["POST","/token",200]},()=>ze.CreateTokenRequest$,()=>ze.CreateTokenResponse$]});var or=S((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var Tt=M(),Bt=Lt(),Vt=er(),Wt=f(),Yt=Ht(),ge=mt(),_e=zt(),Jt=A(),Kt=Ne(),Xt=g(),Ct=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ge.fromBase64,base64Encoder:e?.base64Encoder??ge.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kt.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jt.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Tt.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vt.NoAuthSigner}],logger:e?.logger??new Wt.NoOpLogger,protocol:e?.protocol??Bt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Xt.errorTypeRegistries,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Yt.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=Ct});var Or=S((lr)=>{Object.defineProperty(lr,"__esModule",{value:!0});lr.getRuntimeConfig=void 0;var io=Zt(),so=io.__importDefault(_t()),ir=M(),sr=eo(),U=cr(),no=ro(),nr=ar(),x=gt(),pr=Qt(),dr=f(),po=to(),co=oo(),ao=kt(),lo=or(),uo=(e)=>{(0,dr.emitWarningIfUnsupportedVersion)(process.version);let r=(0,co.resolveDefaultsModeConfig)(e),i=()=>r().then(dr.loadConfigsForDefaultMode),a=(0,lo.getRuntimeConfig)(e);(0,ir.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,x.loadConfig)(ir.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??po.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,sr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:so.default.version}),maxAttempts:e?.maxAttempts??(0,x.loadConfig)(nr.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,x.loadConfig)(U.NODE_REGION_CONFIG_OPTIONS,{...U.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:pr.NodeHttpHandler.create(e?.requestHandler??i),retryMode:e?.retryMode??(0,x.loadConfig)({...nr.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await i()).retryMode||ao.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??no.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??pr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,x.loadConfig)(U.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,x.loadConfig)(U.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,x.loadConfig)(sr.NODE_APP_ID_CONFIG_OPTIONS,s)}};lr.getRuntimeConfig=uo});var Yo=S((P)=>{var vr=vo(),Do=Eo(),bo=So(),Er=Io(),qo=cr(),_=er(),No=Ue(),ho=Po(),yr=xo(),Sr=ar(),y=f(),Ir=A(),Ro=Or(),Pr=yo(),xr=Oo(),h=g(),$=k(),fo=F(),Fo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Uo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$o=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:i,credentials:a}=e;return{setHttpAuthScheme(s){let R=r.findIndex((j)=>j.schemeId===s.schemeId);if(R===-1)r.push(s);else r.splice(R,1,s)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(s){i=s},httpAuthSchemeProvider(){return i},setCredentials(s){a=s},credentials(){return a}}},jo=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},wo=(e,r)=>{let i=Object.assign(Pr.getAwsRegionExtensionConfiguration(e),y.getDefaultExtensionConfiguration(e),xr.getHttpHandlerExtensionConfiguration(e),$o(e));return r.forEach((a)=>a.configure(i)),Object.assign(e,Pr.resolveAwsRegionExtensionConfiguration(i),y.resolveDefaultRuntimeConfig(i),xr.resolveHttpHandlerRuntimeConfig(i),jo(i))};class ee extends y.Client{config;constructor(...[e]){let r=Ro.getRuntimeConfig(e||{});super(r);this.initConfig=r;let i=Fo(r),a=Er.resolveUserAgentConfig(i),s=Sr.resolveRetryConfig(a),R=qo.resolveRegionConfig(s),j=vr.resolveHostHeaderConfig(R),Dr=yr.resolveEndpointConfig(j),br=Ir.resolveHttpAuthSchemeConfig(Dr),qr=wo(br,e?.extensions||[]);this.config=qr,this.middlewareStack.use(No.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Er.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(ho.getContentLengthPlugin(this.config)),this.middlewareStack.use(vr.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Do.getLoggerPlugin(this.config)),this.middlewareStack.use(bo.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ir.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Nr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends y.Command.classBuilder().ep(Uo).m(function(e,r,i,a){return[yr.getEndpointPlugin(i,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(h.CreateToken$).build(){}var Mo={CreateTokenCommand:re};class te extends ee{}y.createAggregatedClient(Mo,te);var Ao={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Go={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};P.$Command=y.Command;P.__Client=y.Client;P.SSOOIDCServiceException=fo.SSOOIDCServiceException;P.AccessDeniedExceptionReason=Ao;P.CreateTokenCommand=re;P.InvalidRequestExceptionReason=Go;P.SSOOIDC=te;P.SSOOIDCClient=ee;Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=h[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=$[e]})});export default Yo();
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=B307B4ADCDEDBD4364756E2164756E21
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"'use strict';\n\nvar middlewareHostHeader = require('@aws-sdk/middleware-host-header');\nvar middlewareLogger = require('@aws-sdk/middleware-logger');\nvar middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');\nvar middlewareUserAgent = require('@aws-sdk/middleware-user-agent');\nvar configResolver = require('@smithy/config-resolver');\nvar core = require('@smithy/core');\nvar schema = require('@smithy/core/schema');\nvar middlewareContentLength = require('@smithy/middleware-content-length');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar middlewareRetry = require('@smithy/middleware-retry');\nvar smithyClient = require('@smithy/smithy-client');\nvar httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');\nvar runtimeConfig = require('./runtimeConfig');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar protocolHttp = require('@smithy/protocol-http');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar SSOOIDCServiceException = require('./models/SSOOIDCServiceException');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends smithyClient.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);\n const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);\n const _config_4 = configResolver.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);\n const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));\n this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));\n this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));\n this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateTokenCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSSOOIDCService\", \"CreateToken\", {})\n .n(\"SSOOIDCClient\", \"CreateTokenCommand\")\n .sc(schemas_0.CreateToken$)\n .build() {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\nsmithyClient.createAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.$Command = smithyClient.Command;\nexports.__Client = smithyClient.Client;\nexports.SSOOIDCServiceException = SSOOIDCServiceException.SSOOIDCServiceException;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n"
|
|
14
14
|
],
|
|
15
15
|
"mappings": ";uuBACA,CAAO,SAAe,HAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,yBAAsC,kCAA+C,4CAAsD,OACnJ,IAAM,OACA,OACA,GAAiD,MAAO,EAAQ,EAAS,IAAU,CACrF,MAAO,CACH,WAAY,EAAG,EAAkB,kBAAkB,CAAO,EAAE,UAC5D,OAAS,MAAO,EAAG,EAAkB,mBAAmB,EAAO,MAAM,EAAE,IAClE,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEI,kDAAiD,GACzD,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,YACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,M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AG,CACxC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAU,GACpG,EACD,OAAO,UAAU,eAAe,KAAK,EAAQ,WAAW,GACpD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAO,SAClB,CAAC,EAEL,OAAO,KAAK,CAAM,EAAE,QAAQ,QAAS,CAAC,EAAG,CACrC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAO,GACjG",
|
|
16
|
-
"debugId": "
|
|
16
|
+
"debugId": "B307B4ADCDEDBD4364756E2164756E21",
|
|
17
17
|
"names": []
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{tl as n}from"./chunk-jzpbwvbt.js";var w=n((p)=>{var r={warningEmitted:!1},a=(e)=>{if(e&&!r.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20)r.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
3
3
|
no longer support Node.js ${e} in January 2026.
|
|
4
4
|
|
|
5
5
|
To continue receiving updates to AWS services, bug fixes, and security
|
|
@@ -8,4 +8,4 @@ updates please upgrade to a supported Node.js LTS version.
|
|
|
8
8
|
More information can be found at: https://a.co/c895JFp`)};function o(e,t,s){if(!e.$source)e.$source={};return e.$source[t]=s,e}function u(e,t,s){if(!e.__aws_sdk_context)e.__aws_sdk_context={features:{}};else if(!e.__aws_sdk_context.features)e.__aws_sdk_context.features={};e.__aws_sdk_context.features[t]=s}function i(e,t,s){if(!e.$source)e.$source={};return e.$source[t]=s,e}p.emitWarningIfUnsupportedVersion=a;p.setCredentialFeature=o;p.setFeature=u;p.setTokenFeature=i;p.state=r});
|
|
9
9
|
export{w as Q};
|
|
10
10
|
|
|
11
|
-
//# debugId=
|
|
11
|
+
//# debugId=4270C1BD6F4BB76864756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"'use strict';\n\nconst state = {\n warningEmitted: false,\n};\nconst emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 20) {\n state.warningEmitted = true;\n process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${version} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n};\n\nfunction setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n\nfunction setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n\nfunction setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n\nexports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;\nexports.setCredentialFeature = setCredentialFeature;\nexports.setFeature = setFeature;\nexports.setTokenFeature = setTokenFeature;\nexports.state = state;\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";uDAEA,IAAM,EAAQ,CACV,eAAgB,EACpB,EACM,EAAkC,CAAC,IAAY,CACjD,GAAI,GAAW,CAAC,EAAM,gBAAkB,SAAS,EAAQ,UAAU,EAAG,EAAQ,QAAQ,GAAG,CAAC,CAAC,EAAI,GAC3F,EAAM,eAAiB,GACvB,QAAQ,YAAY;AAAA,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA,uDAK2B,GAIvD,SAAS,CAAoB,CAAC,EAAa,EAAS,EAAO,CACvD,GAAI,CAAC,EAAY,QACb,EAAY,QAAU,CAAC,EAG3B,OADA,EAAY,QAAQ,GAAW,EACxB,EAGX,SAAS,CAAU,CAAC,EAAS,EAAS,EAAO,CACzC,GAAI,CAAC,EAAQ,kBACT,EAAQ,kBAAoB,CACxB,SAAU,CAAC,CACf,EAEC,QAAI,CAAC,EAAQ,kBAAkB,SAChC,EAAQ,kBAAkB,SAAW,CAAC,EAE1C,EAAQ,kBAAkB,SAAS,GAAW,EAGlD,SAAS,CAAe,CAAC,EAAO,EAAS,EAAO,CAC5C,GAAI,CAAC,EAAM,QACP,EAAM,QAAU,CAAC,EAGrB,OADA,EAAM,QAAQ,GAAW,EAClB,EAGH,kCAAkC,EAClC,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,QAAQ",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "4270C1BD6F4BB76864756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-jzpbwvbt.js";function R(f,D){let P=new Map;for(let p of[...D.tables].sort())P.set(p,{name:p,columns:[],primaryKey:[],relations:[]});for(let{table:p,...s}of D.columns)P.get(p)?.columns.push(s);for(let{table:p,column:s}of D.primaryKeys)P.get(p)?.primaryKey.push(s);let d=new Map;for(let p of D.foreignKeys){let s=P.get(p.table);if(!s)continue;let M=`${p.table}\x00${p.key}`,q=d.get(M);if(!q)q={name:p.name,columns:[],referencedTable:p.referencedTable,referencedColumns:[],onDelete:p.onDelete,onUpdate:p.onUpdate},d.set(M,q),s.relations.push(q);q.columns.push(p.column),q.referencedColumns.push(p.referencedColumn)}return{dialect:f,tables:[...P.values()]}}async function h(f,D){let P=await f.unsafe(`
|
|
3
3
|
select TABLE_NAME as name
|
|
4
4
|
from information_schema.TABLES
|
|
5
5
|
where TABLE_SCHEMA = database() and TABLE_TYPE = 'BASE TABLE'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dd as R}from"./chunk-v9z4x5j2.js";import{Kd as Q,Td as S,Yd as E}from"./chunk-877yc341.js";import{Yk as K}from"./chunk-1fyn63ka.js";import{nl as A,ol as $,pl as D}from"./chunk-apga49vp.js";class j extends Error{code;constructor(q,z=1){super(q);this.code=z;this.name="CommandFailed"}}class J{static commandName="unset";static description="";static args=[];static options=[];run(q){}}function p(q){return q}function C(){return{commands:[],commandsDir:"app/commands"}}var I=Symbol.for("gemi.console.builder");function k(q){if(q.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(q)||/\s/.test(q))throw Error(`Invalid command name ${JSON.stringify(q)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
|
|
3
3
|
|
|
4
4
|
defineCommand("mail:send")
|
|
5
5
|
.arg("user", { required: true })
|
|
@@ -14,6 +14,6 @@ import{Cd as R}from"./chunk-6jd0e1dz.js";import{Jd as Q,Sd as S,Xd as E}from"./c
|
|
|
14
14
|
static event = UserRegistered;
|
|
15
15
|
|
|
16
16
|
If this is an abstract base its subclasses extend, move it out of the `+"listeners directory \u2014 the walk excludes gemi's `Listener` and "+"nothing else, so a base sitting beside its subclasses is registered and run like one of them.")}function v(q){for(let z of q){if(Object.getOwnPropertyDescriptor(z,"name")?.writable)continue;console.warn(`Event listener ${z.name} does not declare \`static name\`, so it is registered under its class name, which a production build renames. Nothing reads that name across a build boundary while the `+"listener is sync, which is why this is a warning \u2014 but adding "+`\`queued = true\` to it is refused at boot for the same reason, because the queue's key is that string. Add: static name = "${z.name}";`)}}function u(q){let z=new Set;for(let{event:F}of q){if(z.has(F))continue;if(Object.getOwnPropertyDescriptor(F,"name")?.writable)continue;z.add(F),console.warn(`Event ${F.name} does not declare \`static name\`, so it is dispatched under its class name. A production build minifies the code that dispatches it and renames the class, while discovery reads `+"the listener's copy from source and does not \u2014 so the dispatch would "+`reach no listener in production and nowhere else. Add: static name = "${F.name}";`)}}
|
|
17
|
-
export{j as
|
|
17
|
+
export{j as nd,J as od,p as pd,C as qd,c as rd,o as sd,T as td,i as ud,B as vd,U as wd,W as xd,Sq as yd,Zq as zd,_q as Ad,Iq as Bd,Uq as Cd};
|
|
18
18
|
|
|
19
|
-
//# debugId=
|
|
19
|
+
//# debugId=0039D2F9D2223AA264756E2164756E21
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
"import { existsSync } from \"node:fs\";\nimport { dirname, isAbsolute, join } from \"node:path\";\n\nimport {\n discoverClasses,\n DiscoveryError,\n projectRoot,\n} from \"../support/discover\";\nimport { Command, type CommandClass } from \"../console/Command\";\nimport { commandConfigDefaults } from \"../console/config\";\nimport { isUnfinishedBuilder } from \"../console/builder\";\nimport { CronJob } from \"./cron/CronJob\";\nimport { scheduleConfigDefaults } from \"./cron/config\";\nimport { eventConfigDefaults } from \"./events/config\";\nimport type { EventClass } from \"./events/Event\";\nimport { Listener, type ListenerClass } from \"./events/Listener\";\nimport { Job } from \"./queue/Job\";\nimport { queueConfigDefaults } from \"./queue/config\";\nimport { Workflow, type WorkflowClass } from \"./queue/workflow/Workflow\";\n\n/**\n * Reading an application's jobs off the filesystem, for the two subsystems that\n * were asking every app to write its job list twice.\n *\n * Both functions here are the same call to `discoverClasses` with a different\n * base class, which is deliberate: one walk, one set of skip rules, one answer\n * to \"what does this app have\". They are exported from `gemi/services` rather\n * than kept private to the providers because the list stopped being something\n * an app could import — a test that used to walk the exported `jobs` array\n * needs somewhere to ask the same question, and so does a script.\n *\n * What the providers add on top of these is the decision of *whether* to ask,\n * which is the config's to make and not this file's.\n */\n\n/**\n * A directory the app named, resolved the way the app meant it.\n *\n * Relative paths hang off the project root rather than `process.cwd()` at the\n * moment of the call, because a config slice saying `app/jobs` means the app's\n * `app/jobs` and not whatever directory somebody happened to launch a script\n * from. Absolute paths are taken as given, which is what makes these callable\n * from a test that has no project around it.\n */\nfunction resolveDir(dir: string): string {\n return isAbsolute(dir) ? dir : join(projectRoot(), dir);\n}\n\n/**\n * Says something when the directory is missing *and so is the tree it lives in*.\n *\n * A missing directory has two readings and they want opposite responses. An app\n * that has never written a cron job has no `app/cron`, and warning about that on\n * every boot for the rest of its life is noise — the answer \"you have no cron\n * jobs\" is correct and uninteresting. But a deploy that ships `dist/` and\n * `node_modules/` without the source has no `app/cron` *and no `app/`*, and\n * there discovery quietly returns nothing while the app very much does have\n * jobs: the exact silence #322 and #323 exist to remove, reintroduced one layer\n * down and in production only.\n *\n * The parent directory is what tells them apart. If neither the directory nor\n * the one above it is there, the tree this was pointed into is not there\n * either, and that is worth a sentence.\n */\nfunction warnIfSourceIsMissing(\n resolved: string,\n subject: string,\n slice: string,\n) {\n if (existsSync(resolved) || existsSync(dirname(resolved))) return;\n\n console.warn(\n `No ${subject} were discovered: neither ${resolved} nor the directory ` +\n `above it exists, so this process cannot see the application's source. ` +\n `If this is a deploy that ships only the build output, list the classes ` +\n `explicitly in app/config/${slice}.ts so they travel with it.`,\n );\n}\n\n/**\n * The `Job` subclasses under `dir`, defaulting to the config slice's `app/jobs`.\n *\n * This is what a `queue` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array:\n * every job this application would register, in the order it would register\n * them.\n *\n * Every file underneath is imported, so calling this runs the app's job modules\n * — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverJobs(\n dir: string = queueConfigDefaults().jobsDir,\n): Promise<Array<new () => Job>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"queue jobs\", \"queue\");\n const jobs = await discoverClasses(resolved, Job);\n warnIfNameWillNotSurviveTheBuild(jobs);\n return jobs;\n}\n\n/**\n * The `Workflow` subclasses under `dir`, defaulting to the queue slice's\n * `app/workflows`: what a `queue` slice with no `workflows` key resolves to.\n * A missing directory is no workflows, said nothing about unless the tree\n * above it is missing too.\n */\nexport async function discoverWorkflows(\n dir: string = queueConfigDefaults().workflowsDir,\n): Promise<WorkflowClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"workflows\", \"queue\");\n const workflows = (await discoverClasses(resolved, Workflow)) as WorkflowClass[];\n for (const workflow of workflows) {\n if (Object.getOwnPropertyDescriptor(workflow, \"name\")?.writable) continue;\n console.warn(\n `Workflow ${workflow.name} does not declare \\`static name\\`. A workflow ` +\n `is stored under its name, and a production build renames the class. ` +\n `Add: static name = \"${workflow.name}\";`,\n );\n }\n return workflows;\n}\n\n/**\n * Says something about a discovered job that never declared `static name`.\n *\n * This is the one hazard discovery introduces rather than removes, and it is\n * production-only. `gemi build` minifies the server entry, and app code\n * reachable from it — a controller, and every job class that controller\n * imports to dispatch — is bundled and minified with it. Minification renames\n * the class binding, and a class's implicit `.name` is that binding: a\n * `TestJob` in the bundle reports `\"D\"`. Discovery, meanwhile, imports\n * `app/jobs/TestJob.ts` from source at runtime, where it is still `\"TestJob\"`.\n * The queue is keyed by that name, so the two halves stop agreeing and the\n * dispatch is dropped — in production, and only there.\n *\n * A declared `static name = \"TestJob\"` is a string literal, which survives\n * minification intact, and the two halves agree again. `docs/jobs-and-queues.md`\n * has always called it required; before discovery an app could get away without\n * it, because the explicit `jobs` array was bundled too and both sides were\n * wrong in the same way.\n *\n * The check is exact rather than a guess: a `static name = \"...\"` class field\n * defines a *writable* own property, while the implicit class name is\n * non-writable. Cron is unaffected — `CronJob.name` is an instance field\n * holding a string literal, not the class binding.\n */\nfunction warnIfNameWillNotSurviveTheBuild(jobs: Array<new () => Job>) {\n for (const job of jobs) {\n if (Object.getOwnPropertyDescriptor(job, \"name\")?.writable) continue;\n\n console.warn(\n `Queued job ${job.name} does not declare \\`static name\\`, so it is ` +\n `registered under its class name. A production build minifies the ` +\n `class that dispatches it and renames it, while discovery reads this ` +\n `file from source and does not — so the dispatch would be dropped in ` +\n `production and nowhere else. Add: static name = \"${job.name}\";`,\n );\n }\n}\n\n/**\n * The `CronJob` subclasses under `dir`, defaulting to the config slice's\n * `app/cron`.\n *\n * This is what a `schedule` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array —\n * though after boot `app(Scheduler).jobs` is the better one, because it is what\n * the scheduler actually took rather than what this would find if asked again.\n *\n * Every file underneath is imported, so calling this runs the app's cron\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCronJobs(\n dir: string = scheduleConfigDefaults().jobsDir,\n): Promise<Array<new () => CronJob>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"cron jobs\", \"schedule\");\n return await discoverClasses(resolved, CronJob);\n}\n\n/**\n * The `Command` subclasses under `dir`, defaulting to the config slice's\n * `app/commands`.\n *\n * This is what a `commands`-less `command` slice resolves to, and what\n * `gemi run` lists. Unlike the two above it is not called during boot — a\n * command registry has one consumer, and importing every file under\n * `app/commands` into every server process would be a cost paid on every start\n * for code no request reaches.\n *\n * Every file underneath is imported, so calling this runs the app's command\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCommands(\n dir: string = commandConfigDefaults().commandsDir,\n): Promise<CommandClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"commands\", \"command\");\n\n const unfinished: string[] = [];\n\n const commands = await discoverClasses(\n resolved,\n Command,\n [],\n (value, file) => {\n if (isUnfinishedBuilder(value)) unfinished.push(file);\n },\n );\n\n refuseUnfinishedBuilders(unfinished);\n\n return commands as CommandClass[];\n}\n\n/**\n * Stops the walk for a builder chain that was never finished.\n *\n * This is the one silence the builder introduces, and it is the exact shape\n * #322 and #323 exist to remove. `defineCommand(...).arg(...)` without a\n * trailing `.handle(...)` is a plain object rather than a class, so\n * `discoverClasses` discards it along with every constant and helper a command\n * file happens to export — and the command disappears from `gemi run` with\n * nothing raised. The author sees a listing containing every command except the\n * one they just wrote.\n *\n * A throw rather than a warning, because there is no reading of an unfinished\n * builder under which the author meant it: the chain builds a description of a\n * command and then discards it.\n *\n * \"Unfinished\" is decided by `.handle()` clearing the brand, not by the export\n * still being a builder object. Those differ for the natural way to share\n * declarations —\n *\n * export const base = defineCommand(\"reindex\").option(\"verbose\", …);\n * export default base.handle(async () => {});\n *\n * — where `base` is a builder that *did* produce a command. Keying off the shape\n * alone made that file abort the whole of `gemi run`, taking every other command\n * in the project down with it, under a message that was untrue for it.\n */\nfunction refuseUnfinishedBuilders(files: string[]): void {\n if (files.length === 0) return;\n\n const subject =\n files.length === 1\n ? `${files[0]} exports a command builder that never called \\`.handle()\\``\n : `${files.length} files export a command builder that never called ` +\n `\\`.handle()\\`:\\n ${files.join(\"\\n \")}`;\n\n throw new DiscoveryError(\n `${subject}, so there is no command to run. \\`.handle()\\` is what turns ` +\n `the chain into a command — finish it:\\n\\n` +\n ` export default defineCommand(\"my-command\")\\n` +\n ` .handle(async ({ line }) => { line(\"hello\") })`,\n );\n}\n\n/**\n * The `Listener` subclasses under `dir`, defaulting to the config slice's\n * `app/listeners`.\n *\n * This is what an `events` config slice with no `listeners` key resolves to.\n * Call it directly to ask what an application would register: every listener,\n * in the order it would register them.\n *\n * Only listeners are walked. Event classes are never discovered — each is\n * imported by the listener that binds to it and by the code that dispatches it,\n * so there is nothing a walk over them would find that is not already in the\n * module graph.\n *\n * **Known residual, matching jobs and cron.** `discoverClasses` excludes the\n * `base` it is handed and not intermediates, so an abstract listener base\n * written in `listenersDir` and extended by its siblings is discovered and\n * registered alongside them — constructed, with its `handle` called, on every\n * dispatch of whatever event it declares. Keep shared bases outside the\n * directory.\n *\n * Every file underneath is imported, so calling this runs the app's listener\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n *\n * @throws DiscoveryError if a discovered listener declares no `static event`.\n */\nexport async function discoverListeners(\n dir: string = eventConfigDefaults().listenersDir,\n): Promise<ListenerClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"event listeners\", \"events\");\n\n const listeners = (await discoverClasses(\n resolved,\n Listener,\n )) as ListenerClass[];\n\n refuseListenersWithNoEvent(listeners);\n warnIfListenerNameWillNotSurviveTheBuild(listeners);\n warnIfEventNameWillNotSurviveTheBuild(listeners);\n\n return listeners;\n}\n\n/**\n * Stops the walk for a listener that binds to nothing.\n *\n * `static event` is declared as required on the base and the compiler still\n * cannot see it missing: every subclass inherits the declaration whether or not\n * it assigns to one, so `typeof SomeListener` type-checks either way. What the\n * author gets instead is a file that is imported, registered under no name, and\n * never called — the silence this whole module is arranged against.\n *\n * A throw rather than a warning, because there is no reading of a listener with\n * no event under which the author meant it. The usual cause is the residual\n * above: an abstract base sharing a gate between two listeners, sitting in\n * `listenersDir` where the walk finds it. Moving it out is the fix, and the\n * message says so — the alternative, excluding it by some guess about\n * abstractness, is how a discovery pass ends up quietly covering less than the\n * directory holds.\n */\nfunction refuseListenersWithNoEvent(listeners: ListenerClass[]): void {\n const orphans = listeners.filter((listener) => !listener.event);\n if (orphans.length === 0) return;\n\n throw new DiscoveryError(\n `${orphans\n .map((listener) => listener.name)\n .join(\", \")} declare no \\`static event\\`, so there is no event name to ` +\n `register them under and their \\`handle\\` would never run. Every ` +\n `listener binds to exactly one event:\\n\\n` +\n ` static event = UserRegistered;\\n\\n` +\n `If this is an abstract base its subclasses extend, move it out of the ` +\n `listeners directory — the walk excludes gemi's \\`Listener\\` and ` +\n `nothing else, so a base sitting beside its subclasses is registered ` +\n `and run like one of them.`,\n );\n}\n\n/**\n * Says something about a discovered listener that never declared `static name`.\n *\n * The hazard is `warnIfNameWillNotSurviveTheBuild`'s, one subsystem over: a\n * `static name = \"...\"` class field defines a *writable* own property while the\n * implicit class binding does not, and a minifier renames the binding while\n * leaving the string literal alone. The two spellings are indistinguishable by\n * value — both read `\"SendWelcomeEmail\"` in development — so the descriptor is\n * the only thing that tells them apart, and the difference only becomes visible\n * in a production build.\n *\n * A warning rather than a refusal, because a *sync* listener's name has no\n * second half to disagree with: every reader of it comes from this same\n * source-side walk, so a minified build and this walk cannot produce two\n * different strings for it. A **queued** listener does have one — the name is\n * the queue's key and it crosses a JSON boundary — and that case is refused\n * outright, by `jobForListener`, at the point the listener is registered with\n * the queue rather than here. This walk cannot tell the two apart without\n * constructing every listener it found; the registry constructs them anyway.\n */\nfunction warnIfListenerNameWillNotSurviveTheBuild(listeners: ListenerClass[]) {\n for (const listener of listeners) {\n if (Object.getOwnPropertyDescriptor(listener, \"name\")?.writable) continue;\n\n console.warn(\n `Event listener ${listener.name} does not declare \\`static name\\`, so ` +\n `it is registered under its class name, which a production build ` +\n `renames. Nothing reads that name across a build boundary while the ` +\n `listener is sync, which is why this is a warning — but adding ` +\n `\\`queued = true\\` to it is refused at boot for the same reason, ` +\n `because the queue's key is that string. Add: static name = ` +\n `\"${listener.name}\";`,\n );\n }\n}\n\n/**\n * Says something about the *event* a discovered listener binds to, when that\n * event's name is the implicit class binding.\n *\n * This is the check that matters from the first dispatch, and it is the reason\n * `discoverListeners` reads `static event` at all. The registry is keyed by the\n * event's name; the dispatcher supplies that name from the class it constructs.\n * A production build minifies the server entry and the app code reachable from\n * it — the controller, and the event class it imports in order to dispatch —\n * while discovery imports `app/listeners/*.ts` from source, and those files\n * import `app/events/*.ts` from source too. Two module graphs, two class\n * objects, and an implicit `.name` that reads `\"UserRegistered\"` on one side\n * and `\"D\"` on the other. The dispatch then finds no listeners, which is legal,\n * normal, and completely silent.\n *\n * A declared `static name` is a string literal, which survives minification\n * intact, and the two halves agree again.\n *\n * Checked through the descriptor rather than the string, and not by comparing\n * `event.name` to anything: in development the two spellings produce the same\n * value, so a check on the string would be a tautology that passes forever.\n */\nfunction warnIfEventNameWillNotSurviveTheBuild(listeners: ListenerClass[]) {\n const warned = new Set<EventClass>();\n\n for (const { event } of listeners) {\n if (warned.has(event)) continue;\n if (Object.getOwnPropertyDescriptor(event, \"name\")?.writable) continue;\n warned.add(event);\n\n console.warn(\n `Event ${event.name} does not declare \\`static name\\`, so it is ` +\n `dispatched under its class name. A production build minifies the ` +\n `code that dispatches it and renames the class, while discovery reads ` +\n `the listener's copy from source and does not — so the dispatch would ` +\n `reach no listener in production and nowhere else. Add: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