@substrat-run/contracts 0.145.0 → 0.147.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/control-plane.d.ts +36 -0
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +29 -0
- package/dist/control-plane.js.map +1 -1
- package/dist/deploy.d.ts +299 -3
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +346 -14
- package/dist/deploy.js.map +1 -1
- package/dist/errors.d.ts +50 -14
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +88 -7
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/introspection.d.ts +29 -1
- package/dist/introspection.d.ts.map +1 -1
- package/dist/introspection.js +11 -0
- package/dist/introspection.js.map +1 -1
- package/dist/invocation-record.d.ts +15 -0
- package/dist/invocation-record.d.ts.map +1 -1
- package/dist/invocation-record.js +15 -0
- package/dist/invocation-record.js.map +1 -1
- package/dist/peer.d.ts +9 -1
- package/dist/peer.d.ts.map +1 -1
- package/dist/peer.js +13 -2
- package/dist/peer.js.map +1 -1
- package/dist/routing.d.ts +4 -0
- package/dist/routing.d.ts.map +1 -1
- package/dist/routing.js +7 -0
- package/dist/routing.js.map +1 -1
- package/dist/scope-store-mac.d.ts +24 -0
- package/dist/scope-store-mac.d.ts.map +1 -0
- package/dist/scope-store-mac.js +61 -0
- package/dist/scope-store-mac.js.map +1 -0
- package/dist/scope-store-transport.d.ts +47 -0
- package/dist/scope-store-transport.d.ts.map +1 -0
- package/dist/scope-store-transport.js +58 -0
- package/dist/scope-store-transport.js.map +1 -0
- package/dist/script-names.d.ts +25 -1
- package/dist/script-names.d.ts.map +1 -1
- package/dist/script-names.js +37 -1
- package/dist/script-names.js.map +1 -1
- package/dist/sql-in-list.d.ts +39 -0
- package/dist/sql-in-list.d.ts.map +1 -0
- package/dist/sql-in-list.js +10 -0
- package/dist/sql-in-list.js.map +1 -0
- package/dist/tenancy.d.ts +1 -1
- package/dist/tenancy.d.ts.map +1 -1
- package/dist/tenancy.js +10 -1
- package/dist/tenancy.js.map +1 -1
- package/package.json +5 -1
package/dist/peer.d.ts
CHANGED
|
@@ -19,11 +19,19 @@ import { z } from 'zod';
|
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
21
|
* WHO is calling: the calling vertical's registry slug, and the instance (scope) that called.
|
|
22
|
-
* The platform supplies it — never the request — and the target's door records
|
|
22
|
+
* The platform supplies it — never the request — and the target's door records `{ vertical,
|
|
23
|
+
* scope }`.
|
|
24
|
+
*
|
|
25
|
+
* `tenantSlug` (#2252) is the directory's slug for the tenant the platform authenticated the
|
|
26
|
+
* call in, with the same provenance as `vertical`: set by the router or the drain, never by
|
|
27
|
+
* anything a vertical sends. The door reads it only to match a pinned `<tenantSlug>/<slug>`
|
|
28
|
+
* caller against the bare slug its `peers` declares (`peerCallerAt`); it is never recorded.
|
|
29
|
+
* Optional, and stripped by a door that predates it, which then matches exactly as before.
|
|
23
30
|
*/
|
|
24
31
|
export declare const verticalCaller: z.ZodObject<{
|
|
25
32
|
vertical: z.ZodString;
|
|
26
33
|
scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
34
|
+
tenantSlug: z.ZodOptional<z.ZodString>;
|
|
27
35
|
}, z.core.$strip>;
|
|
28
36
|
export type VerticalCaller = z.infer<typeof verticalCaller>;
|
|
29
37
|
/** The most operations one peer entry may allow, and the most keys it may hold. */
|
package/dist/peer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;GAiBG;AAEH
|
|
1
|
+
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../src/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,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;iBAQ5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,yFAAyF;AACzF,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAS3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,YAAY;;;iBAA6D,CAAC;AACvF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;iBAG1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/peer.js
CHANGED
|
@@ -20,9 +20,20 @@ import { auditOperationId, instant, permissionKey, platformActorId, scopeId, ten
|
|
|
20
20
|
*/
|
|
21
21
|
/**
|
|
22
22
|
* WHO is calling: the calling vertical's registry slug, and the instance (scope) that called.
|
|
23
|
-
* The platform supplies it — never the request — and the target's door records
|
|
23
|
+
* The platform supplies it — never the request — and the target's door records `{ vertical,
|
|
24
|
+
* scope }`.
|
|
25
|
+
*
|
|
26
|
+
* `tenantSlug` (#2252) is the directory's slug for the tenant the platform authenticated the
|
|
27
|
+
* call in, with the same provenance as `vertical`: set by the router or the drain, never by
|
|
28
|
+
* anything a vertical sends. The door reads it only to match a pinned `<tenantSlug>/<slug>`
|
|
29
|
+
* caller against the bare slug its `peers` declares (`peerCallerAt`); it is never recorded.
|
|
30
|
+
* Optional, and stripped by a door that predates it, which then matches exactly as before.
|
|
24
31
|
*/
|
|
25
|
-
export const verticalCaller = z.object({
|
|
32
|
+
export const verticalCaller = z.object({
|
|
33
|
+
vertical: verticalSlug,
|
|
34
|
+
scope: scopeId,
|
|
35
|
+
tenantSlug: z.string().min(1).optional(),
|
|
36
|
+
});
|
|
26
37
|
/** The most operations one peer entry may allow, and the most keys it may hold. */
|
|
27
38
|
export const PEER_OPERATIONS_MAX = 64;
|
|
28
39
|
export const PEER_PERMISSIONS_MAX = 32;
|
package/dist/peer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.js","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtH;;;;;;;;;;;;;;;;;GAiBG;AAEH
|
|
1
|
+
{"version":3,"file":"peer.js","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAGH,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GA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AAE,eAAe;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,EAAE,EAAE,OAAO;KACZ,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
package/dist/routing.d.ts
CHANGED
|
@@ -186,6 +186,10 @@ export declare const routeTarget: z.ZodObject<{
|
|
|
186
186
|
}>>;
|
|
187
187
|
outboundHosts: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
188
188
|
calls: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
189
|
+
scopeStores: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
190
|
+
binding: z.ZodString;
|
|
191
|
+
kind: z.ZodString;
|
|
192
|
+
}, z.core.$strip>>>;
|
|
189
193
|
primary: z.ZodDefault<z.ZodBoolean>;
|
|
190
194
|
hostnames: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
191
195
|
}, z.core.$strip>;
|
package/dist/routing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,aAA4B,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc;;GAA4B,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;;;;;EAAuD,CAAC;AACnF,MAAM,MAAM,cAA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cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;;;;;;;;iBAQpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,aAA2C,CAAC;AAEjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;iBAO5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;iBAuDtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/routing.js
CHANGED
|
@@ -198,6 +198,13 @@ export const routeTarget = z.object({
|
|
|
198
198
|
* this field still parses.
|
|
199
199
|
*/
|
|
200
200
|
calls: z.array(verticalSlug).nullable().default(null),
|
|
201
|
+
/**
|
|
202
|
+
* Scope stores the dispatched version declares (#2207): `{ binding, kind }` from
|
|
203
|
+
* the same manifest. The router hands the list to egress, which is what a store
|
|
204
|
+
* call is judged against. Defaulted to `[]`, so a resolver that predates the
|
|
205
|
+
* field parses, and a store call is refused until a version declares one.
|
|
206
|
+
*/
|
|
207
|
+
scopeStores: z.array(z.object({ binding: z.string(), kind: z.string() })).default([]),
|
|
201
208
|
/**
|
|
202
209
|
* Whether the scope is the real install (`isPrimaryScope`, #2005) — false for a fork, a
|
|
203
210
|
* snapshot or a preview of either kind. The router hands it to the egress worker, which
|
package/dist/routing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEpE;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CACjC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAGxD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGnF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACjC,4FAA4F;IAC5F,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC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AE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3D;;;;;;;OAOG;IACH,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACrD;;;;;OAKG;IACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrF;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC;;;;;OAKG;IACH,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signature a scope-store object checks before it answers (#2210).
|
|
3
|
+
*
|
|
4
|
+
* HMAC-SHA256 over the object name, Web Crypto only. It binds no audience, operation or time,
|
|
5
|
+
* so it is not the store's authentication: RFC scope-stores §10.3 replaces it with a signed
|
|
6
|
+
* envelope (migration step 5).
|
|
7
|
+
*
|
|
8
|
+
* @internal Not a supported API: exported only so the platform's own signer and the store
|
|
9
|
+
* fixture share one implementation until the §10.3 envelope replaces it.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Sign an object name. The result is base64url, with no padding.
|
|
13
|
+
*
|
|
14
|
+
* @internal Not a supported API; replaced by the RFC scope-stores §10.3 envelope (step 5).
|
|
15
|
+
*/
|
|
16
|
+
export declare function signScopeStoreName(secret: string, objectName: string): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Whether `signature` is the HMAC of `objectName` under `secret`. A malformed
|
|
19
|
+
* signature is false. The comparison is Web Crypto's verify, not a string compare.
|
|
20
|
+
*
|
|
21
|
+
* @internal Not a supported API; replaced by the RFC scope-stores §10.3 envelope (step 5).
|
|
22
|
+
*/
|
|
23
|
+
export declare function verifyScopeStoreName(secret: string, objectName: string, signature: string): Promise<boolean>;
|
|
24
|
+
//# sourceMappingURL=scope-store-mac.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-mac.d.ts","sourceRoot":"","sources":["../src/scope-store-mac.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmCH;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI5F;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOlH"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signature a scope-store object checks before it answers (#2210).
|
|
3
|
+
*
|
|
4
|
+
* HMAC-SHA256 over the object name, Web Crypto only. It binds no audience, operation or time,
|
|
5
|
+
* so it is not the store's authentication: RFC scope-stores §10.3 replaces it with a signed
|
|
6
|
+
* envelope (migration step 5).
|
|
7
|
+
*
|
|
8
|
+
* @internal Not a supported API: exported only so the platform's own signer and the store
|
|
9
|
+
* fixture share one implementation until the §10.3 envelope replaces it.
|
|
10
|
+
*/
|
|
11
|
+
function bytesToBase64Url(bytes) {
|
|
12
|
+
const view = new Uint8Array(bytes);
|
|
13
|
+
let binary = '';
|
|
14
|
+
for (const byte of view)
|
|
15
|
+
binary += String.fromCharCode(byte);
|
|
16
|
+
return btoa(binary).replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '');
|
|
17
|
+
}
|
|
18
|
+
function base64UrlToBytes(value) {
|
|
19
|
+
if (!/^[A-Za-z0-9_-]+$/.test(value))
|
|
20
|
+
return undefined;
|
|
21
|
+
const padded = value.replaceAll('-', '+').replaceAll('_', '/') + '='.repeat((4 - (value.length % 4)) % 4);
|
|
22
|
+
try {
|
|
23
|
+
const binary = atob(padded);
|
|
24
|
+
const bytes = new Uint8Array(binary.length);
|
|
25
|
+
for (let i = 0; i < binary.length; i++)
|
|
26
|
+
bytes[i] = binary.charCodeAt(i);
|
|
27
|
+
return bytes;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async function hmacKey(secret, usage) {
|
|
34
|
+
return crypto.subtle.importKey('raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, [usage]);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sign an object name. The result is base64url, with no padding.
|
|
38
|
+
*
|
|
39
|
+
* @internal Not a supported API; replaced by the RFC scope-stores §10.3 envelope (step 5).
|
|
40
|
+
*/
|
|
41
|
+
export async function signScopeStoreName(secret, objectName) {
|
|
42
|
+
const key = await hmacKey(secret, 'sign');
|
|
43
|
+
const mac = await crypto.subtle.sign('HMAC', key, new TextEncoder().encode(objectName));
|
|
44
|
+
return bytesToBase64Url(mac);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Whether `signature` is the HMAC of `objectName` under `secret`. A malformed
|
|
48
|
+
* signature is false. The comparison is Web Crypto's verify, not a string compare.
|
|
49
|
+
*
|
|
50
|
+
* @internal Not a supported API; replaced by the RFC scope-stores §10.3 envelope (step 5).
|
|
51
|
+
*/
|
|
52
|
+
export async function verifyScopeStoreName(secret, objectName, signature) {
|
|
53
|
+
const bytes = base64UrlToBytes(signature);
|
|
54
|
+
if (!bytes)
|
|
55
|
+
return false;
|
|
56
|
+
const copy = new ArrayBuffer(bytes.byteLength);
|
|
57
|
+
new Uint8Array(copy).set(bytes);
|
|
58
|
+
const key = await hmacKey(secret, 'verify');
|
|
59
|
+
return crypto.subtle.verify('HMAC', key, copy, new TextEncoder().encode(objectName));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=scope-store-mac.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-mac.js","sourceRoot":"","sources":["../src/scope-store-mac.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,SAAS,gBAAgB,CAAC,KAAkB;IAC1C,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,IAAI;QAAE,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACtD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1G,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE;YA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,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The hosted transport for a scope-store call (#2207).
|
|
4
|
+
*
|
|
5
|
+
* A vertical fetches `store.substrat.internal`. It names a binding, an operation
|
|
6
|
+
* and an input. It does not name a script, an object or a key: the egress worker
|
|
7
|
+
* hands the call to the router with the dispatch parameters the router set, and
|
|
8
|
+
* the router is what signs the object name and addresses the store script.
|
|
9
|
+
* `*.substrat.internal` is in no DNS zone, so a call from inside a Durable Object
|
|
10
|
+
* — which an outbound worker does not see — fails instead of leaving the isolate.
|
|
11
|
+
*/
|
|
12
|
+
/** The one reserved host a scope-store call is addressed to. */
|
|
13
|
+
export declare const STORE_CALL_HOST = "store.substrat.internal";
|
|
14
|
+
/** The address a platform-transport `getScopeStore` fetches. The caller does not build it. */
|
|
15
|
+
export declare const STORE_CALL_URL = "https://store.substrat.internal/invoke";
|
|
16
|
+
/** An exact host match. A suffix would admit a name the platform does not own. */
|
|
17
|
+
export declare const isStoreCallHost: (hostname: string) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* What the vertical puts in the body. The scope it may name is the one the
|
|
20
|
+
* router dispatched it for; the router refuses any other. Strict, so a body
|
|
21
|
+
* that tries to carry a signature or a script name is not a request.
|
|
22
|
+
*/
|
|
23
|
+
export declare const storeCallRequest: z.ZodObject<{
|
|
24
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
25
|
+
binding: z.ZodString;
|
|
26
|
+
operation: z.ZodString;
|
|
27
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export type StoreCallRequest = z.infer<typeof storeCallRequest>;
|
|
30
|
+
/** Who the signature was made for. A reserved operation accepts only the platform's. */
|
|
31
|
+
export declare const storeCallAudience: z.ZodEnum<{
|
|
32
|
+
caller: "caller";
|
|
33
|
+
platform: "platform";
|
|
34
|
+
}>;
|
|
35
|
+
export type StoreCallAudience = z.infer<typeof storeCallAudience>;
|
|
36
|
+
/** A `substrat.*` operation is the platform's. A caller signature does not open it. */
|
|
37
|
+
export declare function storeAudienceAllows(operation: string, audience: StoreCallAudience): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The name an object keeps.
|
|
40
|
+
*
|
|
41
|
+
* The first accepted name is stored. A later call whose name differs is not
|
|
42
|
+
* this object's call, even when the signature over that other name is valid.
|
|
43
|
+
* That is the check that stops a signature for one tenant's object being
|
|
44
|
+
* presented to another's.
|
|
45
|
+
*/
|
|
46
|
+
export declare function rememberStoreObjectName(remembered: string | null, presented: string): string | undefined;
|
|
47
|
+
//# sourceMappingURL=scope-store-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-transport.d.ts","sourceRoot":"","sources":["../src/scope-store-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AAEH,gEAAgE;AAChE,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD,8FAA8F;AAC9F,eAAO,MAAM,cAAc,2CAAsC,CAAC;AAElE,kFAAkF;AAClF,eAAO,MAAM,eAAe,aAAc,MAAM,KAAG,OACP,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;kBAQlB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,wFAAwF;AACxF,eAAO,MAAM,iBAAiB;;;EAAiC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIlE,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAG3F;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { scopeId } from './ids.js';
|
|
3
|
+
import { RESERVED_STORE_OPERATIONS, storeOperationName } from './deploy.js';
|
|
4
|
+
/**
|
|
5
|
+
* The hosted transport for a scope-store call (#2207).
|
|
6
|
+
*
|
|
7
|
+
* A vertical fetches `store.substrat.internal`. It names a binding, an operation
|
|
8
|
+
* and an input. It does not name a script, an object or a key: the egress worker
|
|
9
|
+
* hands the call to the router with the dispatch parameters the router set, and
|
|
10
|
+
* the router is what signs the object name and addresses the store script.
|
|
11
|
+
* `*.substrat.internal` is in no DNS zone, so a call from inside a Durable Object
|
|
12
|
+
* — which an outbound worker does not see — fails instead of leaving the isolate.
|
|
13
|
+
*/
|
|
14
|
+
/** The one reserved host a scope-store call is addressed to. */
|
|
15
|
+
export const STORE_CALL_HOST = 'store.substrat.internal';
|
|
16
|
+
/** The address a platform-transport `getScopeStore` fetches. The caller does not build it. */
|
|
17
|
+
export const STORE_CALL_URL = `https://${STORE_CALL_HOST}/invoke`;
|
|
18
|
+
/** An exact host match. A suffix would admit a name the platform does not own. */
|
|
19
|
+
export const isStoreCallHost = (hostname) => hostname.toLowerCase() === STORE_CALL_HOST;
|
|
20
|
+
/**
|
|
21
|
+
* What the vertical puts in the body. The scope it may name is the one the
|
|
22
|
+
* router dispatched it for; the router refuses any other. Strict, so a body
|
|
23
|
+
* that tries to carry a signature or a script name is not a request.
|
|
24
|
+
*/
|
|
25
|
+
export const storeCallRequest = z
|
|
26
|
+
.object({
|
|
27
|
+
scopeId,
|
|
28
|
+
binding: z.string().regex(/^[A-Z][A-Z0-9_]*$/),
|
|
29
|
+
// The same fixed-label rule a log line and a kind's catalog hold (#2245).
|
|
30
|
+
operation: storeOperationName,
|
|
31
|
+
input: z.unknown().optional(),
|
|
32
|
+
})
|
|
33
|
+
.strict();
|
|
34
|
+
/** Who the signature was made for. A reserved operation accepts only the platform's. */
|
|
35
|
+
export const storeCallAudience = z.enum(['caller', 'platform']);
|
|
36
|
+
const reserved = new Set(RESERVED_STORE_OPERATIONS);
|
|
37
|
+
/** A `substrat.*` operation is the platform's. A caller signature does not open it. */
|
|
38
|
+
export function storeAudienceAllows(operation, audience) {
|
|
39
|
+
if (reserved.has(operation))
|
|
40
|
+
return audience === 'platform';
|
|
41
|
+
return audience === 'caller';
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The name an object keeps.
|
|
45
|
+
*
|
|
46
|
+
* The first accepted name is stored. A later call whose name differs is not
|
|
47
|
+
* this object's call, even when the signature over that other name is valid.
|
|
48
|
+
* That is the check that stops a signature for one tenant's object being
|
|
49
|
+
* presented to another's.
|
|
50
|
+
*/
|
|
51
|
+
export function rememberStoreObjectName(remembered, presented) {
|
|
52
|
+
if (presented.length === 0)
|
|
53
|
+
return undefined;
|
|
54
|
+
if (remembered === null)
|
|
55
|
+
return presented;
|
|
56
|
+
return remembered === presented ? remembered : undefined;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=scope-store-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-transport.js","sourceRoot":"","sources":["../src/scope-store-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE5E;;;;;;;;;GASG;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GA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
CHANGED
|
@@ -22,10 +22,34 @@ export declare const PLATFORM_SCRIPT_NAMES: ReadonlySet<string>;
|
|
|
22
22
|
* is exactly this; a per-version script is this plus `-<ulid>`.
|
|
23
23
|
*/
|
|
24
24
|
export declare function verticalScriptStem(slug: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The name space scope-store scripts are uploaded into (RFC scope-stores §10.7, L20). Store
|
|
27
|
+
* scripts share the dispatch namespace with every vertical's scripts, so no vertical script may
|
|
28
|
+
* be named inside it: {@link platformScriptCollision} refuses a slug whose stem is the bare
|
|
29
|
+
* prefix or starts with it, which covers its stable, jurisdictional and per-version scripts.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SCOPE_STORE_SCRIPT_PREFIX = "substrat-store-";
|
|
32
|
+
/** A store kind id (L20). No `-` and no `_`, which is what keeps {@link scopeStoreScriptName} injective. */
|
|
33
|
+
export declare const STORE_KIND_ID: RegExp;
|
|
34
|
+
/**
|
|
35
|
+
* The script a scope-store kind is uploaded as, for one vertical (#2210).
|
|
36
|
+
*
|
|
37
|
+
* Stable across releases and across the vertical's own pushes: a new release of the kind
|
|
38
|
+
* replaces this script in place, and the objects stay where `scopeStoreObjectName` addresses
|
|
39
|
+
* them, since that carries no version either.
|
|
40
|
+
*
|
|
41
|
+
* Injective over (kind, vertical) (L20): `substrat-store-<kind>-<vertical>`, with the `/` of a
|
|
42
|
+
* `<tenant>/<name>` slug written as `_`. A slug never contains `_` and a kind never contains `-`,
|
|
43
|
+
* so the kind ends at the first `-` after the prefix and the rest maps back to exactly one slug.
|
|
44
|
+
* A vertical's own stem flattens `/` to `-`, which is not injective; this name does not reuse it.
|
|
45
|
+
* Anything outside those two grammars is refused rather than flattened.
|
|
46
|
+
*/
|
|
47
|
+
export declare function scopeStoreScriptName(vertical: string, kind: string): string;
|
|
25
48
|
/**
|
|
26
49
|
* The platform script name a vertical with this slug would deploy under, or `null`. Checks the
|
|
27
50
|
* stable script and its jurisdictional variants. A per-version script ends in a 26-character
|
|
28
|
-
* ULID, which no platform name does.
|
|
51
|
+
* ULID, which no platform name does. A stem inside the scope-store name space is returned as
|
|
52
|
+
* itself: every script the slug could deploy under would fall in it.
|
|
29
53
|
*/
|
|
30
54
|
export declare function platformScriptCollision(slug: string): string | null;
|
|
31
55
|
/** The refusal a registration or a deploy gives for {@link platformScriptCollision}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-names.d.ts","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAgD,CAAC;AAElG,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAapD,CAAC;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED
|
|
1
|
+
{"version":3,"file":"script-names.d.ts","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAgD,CAAC;AAElG,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAapD,CAAC;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,4GAA4G;AAC5G,eAAO,MAAM,aAAa,QAAgB,CAAC;AAK3C;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ3E;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOnE;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
package/dist/script-names.js
CHANGED
|
@@ -39,13 +39,49 @@ const JURISDICTION_SUFFIXES = ['eu', 'us'];
|
|
|
39
39
|
export function verticalScriptStem(slug) {
|
|
40
40
|
return slug.toLowerCase().replace(/[^a-z0-9_-]+/g, '-').replace(/^-+|-+$/g, '');
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The name space scope-store scripts are uploaded into (RFC scope-stores §10.7, L20). Store
|
|
44
|
+
* scripts share the dispatch namespace with every vertical's scripts, so no vertical script may
|
|
45
|
+
* be named inside it: {@link platformScriptCollision} refuses a slug whose stem is the bare
|
|
46
|
+
* prefix or starts with it, which covers its stable, jurisdictional and per-version scripts.
|
|
47
|
+
*/
|
|
48
|
+
export const SCOPE_STORE_SCRIPT_PREFIX = 'substrat-store-';
|
|
49
|
+
/** A store kind id (L20). No `-` and no `_`, which is what keeps {@link scopeStoreScriptName} injective. */
|
|
50
|
+
export const STORE_KIND_ID = /^[a-z0-9]+$/;
|
|
51
|
+
/** The registry id grammar `verticalSlug` parses (ids.ts), repeated so this file imports nothing. */
|
|
52
|
+
const VERTICAL_SLUG = /^([a-z0-9](?:[a-z0-9-]*[a-z0-9])?\/)?[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
53
|
+
/**
|
|
54
|
+
* The script a scope-store kind is uploaded as, for one vertical (#2210).
|
|
55
|
+
*
|
|
56
|
+
* Stable across releases and across the vertical's own pushes: a new release of the kind
|
|
57
|
+
* replaces this script in place, and the objects stay where `scopeStoreObjectName` addresses
|
|
58
|
+
* them, since that carries no version either.
|
|
59
|
+
*
|
|
60
|
+
* Injective over (kind, vertical) (L20): `substrat-store-<kind>-<vertical>`, with the `/` of a
|
|
61
|
+
* `<tenant>/<name>` slug written as `_`. A slug never contains `_` and a kind never contains `-`,
|
|
62
|
+
* so the kind ends at the first `-` after the prefix and the rest maps back to exactly one slug.
|
|
63
|
+
* A vertical's own stem flattens `/` to `-`, which is not injective; this name does not reuse it.
|
|
64
|
+
* Anything outside those two grammars is refused rather than flattened.
|
|
65
|
+
*/
|
|
66
|
+
export function scopeStoreScriptName(vertical, kind) {
|
|
67
|
+
if (!STORE_KIND_ID.test(kind)) {
|
|
68
|
+
throw new Error(`not a scope-store kind id: '${kind}' (expected [a-z0-9]+)`);
|
|
69
|
+
}
|
|
70
|
+
if (!VERTICAL_SLUG.test(vertical)) {
|
|
71
|
+
throw new Error(`not a vertical slug: '${vertical}'`);
|
|
72
|
+
}
|
|
73
|
+
return `${SCOPE_STORE_SCRIPT_PREFIX}${kind}-${vertical.replace('/', '_')}`;
|
|
74
|
+
}
|
|
42
75
|
/**
|
|
43
76
|
* The platform script name a vertical with this slug would deploy under, or `null`. Checks the
|
|
44
77
|
* stable script and its jurisdictional variants. A per-version script ends in a 26-character
|
|
45
|
-
* ULID, which no platform name does.
|
|
78
|
+
* ULID, which no platform name does. A stem inside the scope-store name space is returned as
|
|
79
|
+
* itself: every script the slug could deploy under would fall in it.
|
|
46
80
|
*/
|
|
47
81
|
export function platformScriptCollision(slug) {
|
|
48
82
|
const stem = verticalScriptStem(slug);
|
|
83
|
+
if (`${stem}-`.startsWith(SCOPE_STORE_SCRIPT_PREFIX))
|
|
84
|
+
return stem;
|
|
49
85
|
for (const name of [stem, ...JURISDICTION_SUFFIXES.map((j) => `${stem}-${j}`)]) {
|
|
50
86
|
if (PLATFORM_SCRIPT_NAMES.has(name))
|
|
51
87
|
return name;
|
package/dist/script-names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-names.js","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;AAElG,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,CAAC,IAAY,EAAE,SAAiB;IACnE,OAAO,kBAAkB,IAAI,yBAAyB,SAAS,iDAAiD,CAAC;AACnH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter by a list of any length in ONE bound parameter (#2248).
|
|
3
|
+
*
|
|
4
|
+
* A Durable Object's SQLite refuses a statement binding more than 100 parameters, so the
|
|
5
|
+
* natural spelling — `WHERE id IN (${ids.map(() => '?').join(', ')})` — passes every small
|
|
6
|
+
* fixture and fails the first hosted call whose list outgrew it. The list goes in as one JSON
|
|
7
|
+
* array instead, read back with `json_each`, which is SQLite's own JSON1 table-valued function
|
|
8
|
+
* and runs the same on both adapters (better-sqlite3 and the Durable Object):
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* const ids = inList(usedIds);
|
|
12
|
+
* ctx.sql.exec(`UPDATE acme_items SET used = used + 1 WHERE id IN ${ids.sql}`, [now, ...ids.params]);
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* `IN` stays in the caller's SQL, so the statement still reads as what it is. An empty list
|
|
16
|
+
* matches nothing, which is what `IN` of nothing means (a hand-built `IN ()` is a syntax
|
|
17
|
+
* error).
|
|
18
|
+
*
|
|
19
|
+
* **Pass values in the column's own type.** A `json_each` value carries no affinity, so only a
|
|
20
|
+
* numeric column converts: `inList(['123'])` matches an INTEGER `123`, but `inList([1])` matches
|
|
21
|
+
* NO row of a TEXT column — not `'1'`, and not the `'1.0'` a bound `1` would match. A TEXT id is
|
|
22
|
+
* passed as a string (`ids.map(String)`), or the comparison is cast (`CAST(col AS INTEGER)`).
|
|
23
|
+
*
|
|
24
|
+
* Only strings and finite numbers: JSON has no `bigint` or blob, and it writes `NaN` and
|
|
25
|
+
* `Infinity` as `null`, which would drop the value from the list without a word — so a
|
|
26
|
+
* non-finite number throws instead.
|
|
27
|
+
*
|
|
28
|
+
* boundary-lint R12 refuses the hand-built placeholder list in module code and points here.
|
|
29
|
+
*/
|
|
30
|
+
export interface InList {
|
|
31
|
+
/** `(SELECT value FROM json_each(?))` — write it after `IN` / `NOT IN`. */
|
|
32
|
+
readonly sql: typeof IN_LIST_SQL;
|
|
33
|
+
/** The one parameter `sql` binds, in its position among the statement's others. */
|
|
34
|
+
readonly params: readonly [string];
|
|
35
|
+
}
|
|
36
|
+
declare const IN_LIST_SQL = "(SELECT value FROM json_each(?))";
|
|
37
|
+
export declare function inList(values: readonly (string | number)[]): InList;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=sql-in-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-in-list.d.ts","sourceRoot":"","sources":["../src/sql-in-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,MAAM;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,OAAO,WAAW,CAAC;IACjC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACpC;AAED,QAAA,MAAM,WAAW,qCAAqC,CAAC;AAEvD,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAOnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const IN_LIST_SQL = '(SELECT value FROM json_each(?))';
|
|
2
|
+
export function inList(values) {
|
|
3
|
+
for (const v of values) {
|
|
4
|
+
if (typeof v === 'number' ? !Number.isFinite(v) : typeof v !== 'string') {
|
|
5
|
+
throw new TypeError(`inList: ${String(v)} is not a string or a finite number`);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return { sql: IN_LIST_SQL, params: [JSON.stringify(values)] };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=sql-in-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-in-list.js","sourceRoot":"","sources":["../src/sql-in-list.ts"],"names":[],"mappings":"AAoCA,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAEvD,MAAM,UAAU,MAAM,CAAC,MAAoC;IACzD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YACxE,MAAM,IAAI,SAAS,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
|
package/dist/tenancy.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export declare const tenant: z.ZodObject<{
|
|
|
23
23
|
export type Tenant = z.infer<typeof tenant>;
|
|
24
24
|
export declare const createTenantInput: z.ZodObject<{
|
|
25
25
|
id: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
26
|
-
slug: z.ZodString;
|
|
27
26
|
name: z.ZodString;
|
|
27
|
+
slug: z.ZodString;
|
|
28
28
|
provisionedByTenant: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "TenantId", "out">>>;
|
|
29
29
|
}, z.core.$strip>;
|
|
30
30
|
export type CreateTenantInput = z.infer<typeof createTenantInput>;
|
package/dist/tenancy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenancy.d.ts","sourceRoot":"","sources":["../src/tenancy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tenancy.d.ts","sourceRoot":"","sources":["../src/tenancy.ts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AAC;AAElE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4GhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
package/dist/tenancy.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { instant, orgId, scopeId, slug, tenantId } from './ids.js';
|
|
3
|
+
import { SCOPE_STORE_SCRIPT_PREFIX } from './script-names.js';
|
|
3
4
|
export const tenantStatus = z.enum([
|
|
4
5
|
'active',
|
|
5
6
|
'suspended',
|
|
@@ -40,7 +41,15 @@ export const tenant = z.object({
|
|
|
40
41
|
// create omits it (→ null).
|
|
41
42
|
export const createTenantInput = tenant
|
|
42
43
|
.pick({ id: true, slug: true, name: true })
|
|
43
|
-
.extend({
|
|
44
|
+
.extend({
|
|
45
|
+
// L20: every vertical this tenant owns has a script stem starting with its slug, so a slug
|
|
46
|
+
// inside the scope-store script name space could register nothing. Refused at the claim, on
|
|
47
|
+
// the input only: a stored tenant is read back with the plain `tenant` schema.
|
|
48
|
+
slug: slug.refine((value) => !`${value}-`.startsWith(SCOPE_STORE_SCRIPT_PREFIX), {
|
|
49
|
+
message: `a tenant slug cannot start with '${SCOPE_STORE_SCRIPT_PREFIX}': that script name space is the platform's`,
|
|
50
|
+
}),
|
|
51
|
+
provisionedByTenant: tenantId.nullable().optional(),
|
|
52
|
+
});
|
|
44
53
|
/**
|
|
45
54
|
* An organization inside a tenant (K-22) — who membership tuples point at and what
|
|
46
55
|
* `grantToOrg` targets. Portal customers, staff groups, partner companies.
|
package/dist/tenancy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenancy.js","sourceRoot":"","sources":["../src/tenancy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAA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AC,QAAQ,EAAE;IAClD;;;;;;;;;OASG;IACH,4BAA4B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;IACzD;;;;;;;OAOG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE;IACpG,6EAA6E;IAC7E,iFAAiF;IACjF,gFAAgF;IAChF,+EAA+E;IAC/E,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,gBAAgB;IAChB;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC5B;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC7B;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;IACvC;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC9B;;;;;;OAMG;IACH,kBAAkB,EAAE,WAAW,CAAC,OAAO,EAAE;IACzC,SAAS,EAAE,OAAO;CACnB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.147.0",
|
|
4
4
|
"description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"types": "./dist/invocation-record.d.ts",
|
|
22
22
|
"default": "./dist/invocation-record.js"
|
|
23
23
|
},
|
|
24
|
+
"./scope-store-mac": {
|
|
25
|
+
"types": "./dist/scope-store-mac.d.ts",
|
|
26
|
+
"default": "./dist/scope-store-mac.js"
|
|
27
|
+
},
|
|
24
28
|
"./wire-headers": {
|
|
25
29
|
"types": "./dist/wire-headers.d.ts",
|
|
26
30
|
"default": "./dist/wire-headers.js"
|