@geekmidas/constructs 10.0.0-alpha.165 → 10.0.0-alpha.167
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/{Cron-D_sfaMGz.d.cts → Cron-Ca_qHQu2.d.cts} +2 -2
- package/dist/{Cron-D6Y7BBt3.d.mts.map → Cron-Ca_qHQu2.d.cts.map} +1 -1
- package/dist/{Cron-D6Y7BBt3.d.mts → Cron-DPJiR7Lt.d.mts} +2 -2
- package/dist/{Cron-D_sfaMGz.d.cts.map → Cron-DPJiR7Lt.d.mts.map} +1 -1
- package/dist/{CronBuilder-4BZhkChG.d.mts → CronBuilder-BC4za5Bx.d.mts} +4 -4
- package/dist/{CronBuilder-4BZhkChG.d.mts.map → CronBuilder-BC4za5Bx.d.mts.map} +1 -1
- package/dist/{CronBuilder-C91MVLSr.d.cts → CronBuilder-C3RrAF1-.d.cts} +4 -4
- package/dist/{CronBuilder-C91MVLSr.d.cts.map → CronBuilder-C3RrAF1-.d.cts.map} +1 -1
- package/dist/{Endpoint-YYwjqtS1.d.cts → Endpoint-BlIZLsBQ.d.cts} +5 -5
- package/dist/{Endpoint-BUoDD96P.d.mts.map → Endpoint-BlIZLsBQ.d.cts.map} +1 -1
- package/dist/{Endpoint-BUoDD96P.d.mts → Endpoint-DC7mreOr.d.mts} +5 -5
- package/dist/{Endpoint-YYwjqtS1.d.cts.map → Endpoint-DC7mreOr.d.mts.map} +1 -1
- package/dist/{EndpointFactory-BbVOeryo.d.mts → EndpointFactory-DCmnCmkX.d.mts} +5 -5
- package/dist/{EndpointFactory-BbVOeryo.d.mts.map → EndpointFactory-DCmnCmkX.d.mts.map} +1 -1
- package/dist/{EndpointFactory-Hh1r6J_C.d.cts → EndpointFactory-cVTb8kCc.d.cts} +5 -5
- package/dist/{EndpointFactory-Hh1r6J_C.d.cts.map → EndpointFactory-cVTb8kCc.d.cts.map} +1 -1
- package/dist/{ObjectSubscriberBuilder-DfzXQEKW.d.mts → ObjectSubscriberBuilder-AwGKoUKy.d.mts} +2 -2
- package/dist/{ObjectSubscriberBuilder-DfzXQEKW.d.mts.map → ObjectSubscriberBuilder-AwGKoUKy.d.mts.map} +1 -1
- package/dist/{ObjectSubscriberBuilder-LWkey_oq.d.cts → ObjectSubscriberBuilder-CB6imsX4.d.cts} +2 -2
- package/dist/{ObjectSubscriberBuilder-LWkey_oq.d.cts.map → ObjectSubscriberBuilder-CB6imsX4.d.cts.map} +1 -1
- package/dist/{ProcessorBuilder-_jdZlbfW.d.cts → ProcessorBuilder-CeEZ2vCx.d.cts} +2 -2
- package/dist/{ProcessorBuilder-D4oYvZeG.d.mts.map → ProcessorBuilder-CeEZ2vCx.d.cts.map} +1 -1
- package/dist/{ProcessorBuilder-D4oYvZeG.d.mts → ProcessorBuilder-CwIlm75W.d.mts} +2 -2
- package/dist/{ProcessorBuilder-_jdZlbfW.d.cts.map → ProcessorBuilder-CwIlm75W.d.mts.map} +1 -1
- package/dist/{QueueBuilder-CVS_qPuo.d.mts → QueueBuilder-CUERv8jt.d.mts} +2 -2
- package/dist/{QueueBuilder-CVS_qPuo.d.mts.map → QueueBuilder-CUERv8jt.d.mts.map} +1 -1
- package/dist/{QueueBuilder-SQli59An.d.cts → QueueBuilder-CmB1vOgn.d.cts} +2 -2
- package/dist/{QueueBuilder-SQli59An.d.cts.map → QueueBuilder-CmB1vOgn.d.cts.map} +1 -1
- package/dist/adaptors/aws.d.cts +2 -2
- package/dist/adaptors/aws.d.mts +2 -2
- package/dist/adaptors/awsWebsocket.d.cts +1 -1
- package/dist/adaptors/awsWebsocket.d.mts +1 -1
- package/dist/adaptors/hono.d.cts +1 -1
- package/dist/adaptors/hono.d.mts +1 -1
- package/dist/adaptors/testing.cjs +1 -1
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +5 -5
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +5 -5
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +1 -1
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/{auth-DnB9H9KL.d.mts → auth-1yI2wR-4.d.cts} +6 -6
- package/dist/{auth-BqWz2JxC.d.cts.map → auth-1yI2wR-4.d.cts.map} +1 -1
- package/dist/{auth-BqWz2JxC.d.cts → auth-D4NMXgLt.d.mts} +6 -6
- package/dist/{auth-DnB9H9KL.d.mts.map → auth-D4NMXgLt.d.mts.map} +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.mts +1 -1
- package/dist/{cache-CCHcO9Oo.d.mts → cache-0VoeOTF9.d.mts} +2 -2
- package/dist/{cache-CCHcO9Oo.d.mts.map → cache-0VoeOTF9.d.mts.map} +1 -1
- package/dist/{cache-CQjMNPrC.d.cts → cache-CW-sArzS.d.cts} +2 -2
- package/dist/{cache-CQjMNPrC.d.cts.map → cache-CW-sArzS.d.cts.map} +1 -1
- package/dist/cache.d.cts +1 -1
- package/dist/cache.d.mts +1 -1
- package/dist/{construct-interface-CSA9VeWM.d.mts → construct-interface-DhbaONW2.d.cts} +20 -4
- package/dist/construct-interface-DhbaONW2.d.cts.map +1 -0
- package/dist/{construct-interface-DugP0E5q.d.cts → construct-interface-DxfkFxkl.d.mts} +20 -4
- package/dist/construct-interface-DxfkFxkl.d.mts.map +1 -0
- package/dist/construct-interface.cjs +9 -0
- package/dist/construct-interface.cjs.map +1 -1
- package/dist/construct-interface.d.cts +2 -2
- package/dist/construct-interface.d.mts +2 -2
- package/dist/construct-interface.mjs +9 -1
- package/dist/construct-interface.mjs.map +1 -1
- package/dist/credential.d.cts +1 -1
- package/dist/credential.d.mts +1 -1
- package/dist/crons/index.d.cts +2 -2
- package/dist/crons/index.d.mts +2 -2
- package/dist/database/kysely.d.cts +1 -1
- package/dist/database/kysely.d.mts +1 -1
- package/dist/email.d.cts +1 -1
- package/dist/email.d.mts +1 -1
- package/dist/encryption.d.cts +1 -1
- package/dist/encryption.d.mts +1 -1
- package/dist/endpoints/index.d.cts +2 -2
- package/dist/endpoints/index.d.mts +2 -2
- package/dist/external-api.d.cts +1 -1
- package/dist/external-api.d.mts +1 -1
- package/dist/{fake-BqhP8RRQ.d.mts → fake-BvOXkZmj.d.mts} +2 -2
- package/dist/{fake-BqhP8RRQ.d.mts.map → fake-BvOXkZmj.d.mts.map} +1 -1
- package/dist/{fake-DqieDYYA.d.cts → fake-Djx8E0o1.d.cts} +2 -2
- package/dist/{fake-DqieDYYA.d.cts.map → fake-Djx8E0o1.d.cts.map} +1 -1
- package/dist/file-server.cjs +79 -20
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +35 -17
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +35 -17
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +80 -22
- package/dist/file-server.mjs.map +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.d.mts +1 -1
- package/dist/{inbox-CR3L1fOI.d.cts → inbox-BjvMs7EJ.d.cts} +2 -2
- package/dist/{inbox-CR3L1fOI.d.cts.map → inbox-BjvMs7EJ.d.cts.map} +1 -1
- package/dist/{inbox-YOdxlyfj.d.mts → inbox-C8bOR9UL.d.mts} +2 -2
- package/dist/{inbox-YOdxlyfj.d.mts.map → inbox-C8bOR9UL.d.mts.map} +1 -1
- package/dist/inbox.d.cts +1 -1
- package/dist/inbox.d.mts +1 -1
- package/dist/{index-DPTHa6Ud.d.cts → index-DaK-C7N3.d.cts} +2 -2
- package/dist/{index-BoQ3-M-K.d.mts.map → index-DaK-C7N3.d.cts.map} +1 -1
- package/dist/{index-BoQ3-M-K.d.mts → index-vCS4HBEG.d.mts} +2 -2
- package/dist/{index-DPTHa6Ud.d.cts.map → index-vCS4HBEG.d.mts.map} +1 -1
- package/dist/{kysely-CebjCWTl.d.cts → kysely-2HqIQ2fC.d.cts} +3 -3
- package/dist/{kysely-CebjCWTl.d.cts.map → kysely-2HqIQ2fC.d.cts.map} +1 -1
- package/dist/{kysely-De5rAC-E.d.mts → kysely-BGvpd_ZH.d.mts} +3 -3
- package/dist/{kysely-De5rAC-E.d.mts.map → kysely-BGvpd_ZH.d.mts.map} +1 -1
- package/dist/mobile-app.cjs +5 -1
- package/dist/mobile-app.cjs.map +1 -1
- package/dist/mobile-app.d.cts +5 -1
- package/dist/mobile-app.d.cts.map +1 -1
- package/dist/mobile-app.d.mts +5 -1
- package/dist/mobile-app.d.mts.map +1 -1
- package/dist/mobile-app.mjs +6 -2
- package/dist/mobile-app.mjs.map +1 -1
- package/dist/object-storage.cjs +6 -6
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +3 -3
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +3 -3
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +6 -6
- package/dist/object-storage.mjs.map +1 -1
- package/dist/processors/index.d.cts +1 -1
- package/dist/processors/index.d.mts +1 -1
- package/dist/queue/index.d.cts +1 -1
- package/dist/queue/index.d.mts +1 -1
- package/dist/random-password.d.cts +1 -1
- package/dist/random-password.d.mts +1 -1
- package/dist/rest-api.d.cts +4 -4
- package/dist/rest-api.d.mts +4 -4
- package/dist/site.cjs +6 -1
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +7 -2
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +7 -2
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +7 -2
- package/dist/site.mjs.map +1 -1
- package/dist/subscribers/index.d.cts +1 -1
- package/dist/subscribers/index.d.mts +1 -1
- package/dist/{telemetry-CObow3Dn.d.mts → telemetry-BirKau0X.d.mts} +2 -2
- package/dist/{telemetry-C1oqncFY.d.cts.map → telemetry-BirKau0X.d.mts.map} +1 -1
- package/dist/{telemetry-C1oqncFY.d.cts → telemetry-DjJgtQ_N.d.cts} +2 -2
- package/dist/{telemetry-CObow3Dn.d.mts.map → telemetry-DjJgtQ_N.d.cts.map} +1 -1
- package/dist/telemetry.d.cts +1 -1
- package/dist/telemetry.d.mts +1 -1
- package/dist/{websocket-api-DkF8Hva-.d.cts → websocket-api-B1Wl3tg4.d.cts} +3 -3
- package/dist/{websocket-api-CPEzJyDt.d.mts.map → websocket-api-B1Wl3tg4.d.cts.map} +1 -1
- package/dist/{websocket-api-CPEzJyDt.d.mts → websocket-api-CvnPDSZB.d.mts} +3 -3
- package/dist/{websocket-api-DkF8Hva-.d.cts.map → websocket-api-CvnPDSZB.d.mts.map} +1 -1
- package/dist/websocket-api.d.cts +1 -1
- package/dist/websocket-api.d.mts +1 -1
- package/dist/worker.d.cts +8 -8
- package/dist/worker.d.mts +8 -8
- package/package.json +31 -31
- package/dist/construct-interface-CSA9VeWM.d.mts.map +0 -1
- package/dist/construct-interface-DugP0E5q.d.cts.map +0 -1
package/dist/object-storage.mjs
CHANGED
|
@@ -26,7 +26,7 @@ var ObjectStorage = class {
|
|
|
26
26
|
this.options = options;
|
|
27
27
|
const canonical = canonicalId(id);
|
|
28
28
|
this.id = canonical;
|
|
29
|
-
this.keys = {
|
|
29
|
+
this.keys = { connectionString: provideKey(canonical, "connectionString") };
|
|
30
30
|
this.expire = expiryDays(canonical, options.expire);
|
|
31
31
|
this.service = {
|
|
32
32
|
serviceName: serviceKey(canonical),
|
|
@@ -37,21 +37,21 @@ var ObjectStorage = class {
|
|
|
37
37
|
return [{
|
|
38
38
|
kind: "objects",
|
|
39
39
|
id: this.id,
|
|
40
|
-
provides: [this.keys.
|
|
40
|
+
provides: [this.keys.connectionString],
|
|
41
41
|
...this.options.versioned ? { versioned: true } : {},
|
|
42
42
|
...this.expire ? { expire: this.expire } : {}
|
|
43
43
|
}];
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Builds the client from the
|
|
46
|
+
* Builds the client from the connection string the adapter supplied.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
48
|
+
* Its scheme selects the driver, so this construct imports no provider
|
|
49
49
|
* and an app that never touches S3 never resolves the AWS SDK. Whoever
|
|
50
50
|
* assembles the application registers the drivers its target needs.
|
|
51
51
|
*/
|
|
52
52
|
async connect({ envParser }) {
|
|
53
|
-
const {
|
|
54
|
-
return createStorageClient(
|
|
53
|
+
const { connectionString } = envParser.create((get) => ({ connectionString: get(this.keys.connectionString).string() })).parse();
|
|
54
|
+
return createStorageClient(connectionString);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-storage.mjs","names":[],"sources":["../src/object-storage.ts"],"sourcesContent":["/**\n * `ObjectStorage` — a declared bucket.\n *\n * Where the three packages meet: it implements the construct contract, derives\n * its env key through `@geekmidas/manifest`, and hands back a\n * `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the\n * injected URL with S3's values, local dev with MinIO's.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tprovideKey,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport { createStorageClient, type StorageClient } from '@geekmidas/storage';\nimport type { Construct } from './construct-interface';\nimport { expiryDays, type ObjectExpiry } from './expire';\n\nexport {\n\tExpiryDaysInvalid,\n\tExpiryPrefixInvalid,\n\ttype ObjectExpiry,\n} from './expire';\n\nexport interface ObjectStorageOptions {\n\t/** Keep previous versions of an object. */\n\tversioned?: boolean;\n\t/**\n\t * Delete the objects under each prefix this many days after they were\n\t * written — `{ 'quotes/': { days: 30 } }`.\n\t */\n\texpire?: ObjectExpiry;\n}\n\nexport class ObjectStorage<TName extends string = string>\n\timplements Construct<TName, StorageClient>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, StorageClient>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * build publishes and the key the client reads cannot drift — the whole point\n\t * of the construct owning both faces.\n\t */\n\tprivate readonly keys: {
|
|
1
|
+
{"version":3,"file":"object-storage.mjs","names":[],"sources":["../src/object-storage.ts"],"sourcesContent":["/**\n * `ObjectStorage` — a declared bucket.\n *\n * Where the three packages meet: it implements the construct contract, derives\n * its env key through `@geekmidas/manifest`, and hands back a\n * `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the\n * injected URL with S3's values, local dev with MinIO's.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tprovideKey,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport { createStorageClient, type StorageClient } from '@geekmidas/storage';\nimport type { Construct } from './construct-interface';\nimport { expiryDays, type ObjectExpiry } from './expire';\n\nexport {\n\tExpiryDaysInvalid,\n\tExpiryPrefixInvalid,\n\ttype ObjectExpiry,\n} from './expire';\n\nexport interface ObjectStorageOptions {\n\t/** Keep previous versions of an object. */\n\tversioned?: boolean;\n\t/**\n\t * Delete the objects under each prefix this many days after they were\n\t * written — `{ 'quotes/': { days: 30 } }`.\n\t */\n\texpire?: ObjectExpiry;\n}\n\nexport class ObjectStorage<TName extends string = string>\n\timplements Construct<TName, StorageClient>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, StorageClient>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * build publishes and the key the client reads cannot drift — the whole point\n\t * of the construct owning both faces.\n\t */\n\tprivate readonly keys: { connectionString: string };\n\n\t/** Checked once, at declaration: prefix → days. */\n\tprivate readonly expire: Record<string, number> | undefined;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: ObjectStorageOptions = {},\n\t) {\n\t\t// Canonicalises, so `uploads` and `Uploads` are one construct rather than\n\t\t// two that collide. Throws on anything that cannot become a valid id.\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = {\n\t\t\tconnectionString: provideKey(canonical, 'connectionString'),\n\t\t};\n\t\tthis.expire = expiryDays(canonical, options.expire);\n\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(canonical) as Uncapitalize<TName>,\n\t\t\tregister: (options) => this.connect(options),\n\t\t};\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'objects',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.connectionString],\n\t\t\t\t...(this.options.versioned ? { versioned: true } : {}),\n\t\t\t\t...(this.expire ? { expire: this.expire } : {}),\n\t\t\t},\n\t\t];\n\t}\n\n\t/**\n\t * Builds the client from the connection string the adapter supplied.\n\t *\n\t * Its scheme selects the driver, so this construct imports no provider\n\t * and an app that never touches S3 never resolves the AWS SDK. Whoever\n\t * assembles the application registers the drivers its target needs.\n\t */\n\tprivate async connect({\n\t\tenvParser,\n\t}: ServiceRegisterOptions): Promise<StorageClient> {\n\t\tconst { connectionString } = envParser\n\t\t\t.create((get) => ({\n\t\t\t\tconnectionString: get(this.keys.connectionString).string(),\n\t\t\t}))\n\t\t\t.parse();\n\n\t\treturn createStorageClient(connectionString);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAqCA,IAAa,gBAAb,MAEA;CAgBmB;CAflB;CACA;;;;;;CAOA;;CAGA;CAEA,YACC,IACA,UAAiD,CAAC,GACjD;EADgB,KAAA,UAAA;EAIjB,MAAM,YAAY,YAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO,EACX,kBAAkB,WAAW,WAAW,kBAAkB,EAC3D;EACA,KAAK,SAAS,WAAW,WAAW,QAAQ,MAAM;EAGlD,KAAK,UAAU;GACd,aAAa,WAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,KAAK,gBAAgB;GACrC,GAAI,KAAK,QAAQ,YAAY,EAAE,WAAW,KAAK,IAAI,CAAC;GACpD,GAAI,KAAK,SAAS,EAAE,QAAQ,KAAK,OAAO,IAAI,CAAC;EAC9C,CACD;CACD;;;;;;;;CASA,MAAc,QAAQ,EACrB,aACkD;EAClD,MAAM,EAAE,qBAAqB,UAC3B,QAAQ,SAAS,EACjB,kBAAkB,IAAI,KAAK,KAAK,gBAAgB,CAAC,CAAC,OAAO,EAC1D,EAAE,CAAC,CACF,MAAM;EAER,OAAO,oBAAoB,gBAAgB;CAC5C;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as parsePattern, a as ProcessorCache, c as ProcessorParams, d as ParsedPattern, f as PatternParams, g as matchPattern, h as fillPattern, i as Processor, l as ProcessorResult, m as ProcessorPatternInvalid, n as ProcessorNativeInvalid, o as ProcessorContext, p as ProcessorParamMissing, r as DERIVED_PREFIX, s as ProcessorHandler, t as ProcessorBuilder, u as SourceObject } from "../ProcessorBuilder-
|
|
1
|
+
import { _ as parsePattern, a as ProcessorCache, c as ProcessorParams, d as ParsedPattern, f as PatternParams, g as matchPattern, h as fillPattern, i as Processor, l as ProcessorResult, m as ProcessorPatternInvalid, n as ProcessorNativeInvalid, o as ProcessorContext, p as ProcessorParamMissing, r as DERIVED_PREFIX, s as ProcessorHandler, t as ProcessorBuilder, u as SourceObject } from "../ProcessorBuilder-CeEZ2vCx.cjs";
|
|
2
2
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
3
3
|
import { ServiceDiscovery } from "@geekmidas/services";
|
|
4
4
|
//#region src/processors/AWSLambdaProcessor.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as parsePattern, a as ProcessorCache, c as ProcessorParams, d as ParsedPattern, f as PatternParams, g as matchPattern, h as fillPattern, i as Processor, l as ProcessorResult, m as ProcessorPatternInvalid, n as ProcessorNativeInvalid, o as ProcessorContext, p as ProcessorParamMissing, r as DERIVED_PREFIX, s as ProcessorHandler, t as ProcessorBuilder, u as SourceObject } from "../ProcessorBuilder-
|
|
1
|
+
import { _ as parsePattern, a as ProcessorCache, c as ProcessorParams, d as ParsedPattern, f as PatternParams, g as matchPattern, h as fillPattern, i as Processor, l as ProcessorResult, m as ProcessorPatternInvalid, n as ProcessorNativeInvalid, o as ProcessorContext, p as ProcessorParamMissing, r as DERIVED_PREFIX, s as ProcessorHandler, t as ProcessorBuilder, u as SourceObject } from "../ProcessorBuilder-CwIlm75W.mjs";
|
|
2
2
|
import { ServiceDiscovery } from "@geekmidas/services";
|
|
3
3
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
4
|
//#region src/processors/AWSLambdaProcessor.d.ts
|
package/dist/queue/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-C4rijiM7.cjs";
|
|
2
|
-
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-CmB1vOgn.cjs";
|
|
3
3
|
export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
|
package/dist/queue/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-B8HGg439.mjs";
|
|
2
|
-
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-CUERv8jt.mjs";
|
|
3
3
|
export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Construct } from "./construct-interface-
|
|
1
|
+
import { n as Construct } from "./construct-interface-DhbaONW2.cjs";
|
|
2
2
|
import { Service } from "@geekmidas/services";
|
|
3
3
|
import { ConstructName, Declaration, SecretFormat } from "@geekmidas/manifest";
|
|
4
4
|
//#region src/random-password.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Construct } from "./construct-interface-
|
|
1
|
+
import { n as Construct } from "./construct-interface-DxfkFxkl.mjs";
|
|
2
2
|
import { ConstructName, Declaration, SecretFormat } from "@geekmidas/manifest";
|
|
3
3
|
import { Service } from "@geekmidas/services";
|
|
4
4
|
//#region src/random-password.d.ts
|
package/dist/rest-api.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as Declarable, n as Construct, t as Authenticator } from "./construct-interface-
|
|
2
|
-
import { n as Telemetry } from "./telemetry-
|
|
3
|
-
import { D as BuiltInSecuritySchemeId } from "./Endpoint-
|
|
4
|
-
import { t as EndpointFactory } from "./EndpointFactory-
|
|
1
|
+
import { i as Declarable, n as Construct, t as Authenticator } from "./construct-interface-DhbaONW2.cjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-DjJgtQ_N.cjs";
|
|
3
|
+
import { D as BuiltInSecuritySchemeId } from "./Endpoint-BlIZLsBQ.cjs";
|
|
4
|
+
import { t as EndpointFactory } from "./EndpointFactory-cVTb8kCc.cjs";
|
|
5
5
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
6
6
|
import { Logger } from "@geekmidas/logger";
|
|
7
7
|
import { Service } from "@geekmidas/services";
|
package/dist/rest-api.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as Declarable, n as Construct, t as Authenticator } from "./construct-interface-
|
|
2
|
-
import { n as Telemetry } from "./telemetry-
|
|
3
|
-
import { D as BuiltInSecuritySchemeId } from "./Endpoint-
|
|
4
|
-
import { t as EndpointFactory } from "./EndpointFactory-
|
|
1
|
+
import { i as Declarable, n as Construct, t as Authenticator } from "./construct-interface-DxfkFxkl.mjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-BirKau0X.mjs";
|
|
3
|
+
import { D as BuiltInSecuritySchemeId } from "./Endpoint-DC7mreOr.mjs";
|
|
4
|
+
import { t as EndpointFactory } from "./EndpointFactory-DCmnCmkX.mjs";
|
|
5
5
|
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
6
6
|
import { Service } from "@geekmidas/services";
|
|
7
7
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
package/dist/site.cjs
CHANGED
|
@@ -125,9 +125,14 @@ var StaticSite = class StaticSite {
|
|
|
125
125
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
126
126
|
* edge is a build-time link and not a service injection — requiring a client
|
|
127
127
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
128
|
+
*
|
|
129
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
130
|
+
* with the address its objects are served on, and handed nothing that
|
|
131
|
+
* writes to the bucket. `.dependsOn([assets.server])` asks for the bucket
|
|
132
|
+
* too, for a server half that uploads.
|
|
128
133
|
*/
|
|
129
134
|
dependsOn(constructs) {
|
|
130
|
-
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(require_construct_interface.
|
|
135
|
+
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(require_construct_interface.frontendEdgeTo)]);
|
|
131
136
|
}
|
|
132
137
|
declare() {
|
|
133
138
|
const { hosts } = this.config;
|
package/dist/site.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.cjs","names":["canonicalId","provideKey","serviceKey","publicUrl","WILDCARD_SUBDOMAIN","edgeTo"],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * A site consumes addresses, not connections: it is built, and the values it\n * needs are inlined or fetched by its own framework, so its own edges take any\n * {@link Declarable}. Its `.service` is its public address — what a worker's\n * cron or an endpoint that builds links to it reads:\n *\n * ```ts\n * export const digest = worker\n * .cron('rate(1 day)')\n * .dependsOn([web])\n * .handle(async ({ services }) => link(services.web, '/inbox'));\n * ```\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n\tserviceKey,\n\tWILDCARD_SUBDOMAIN,\n} from '@geekmidas/manifest';\nimport type { Service } from '@geekmidas/services';\nimport {\n\ttype Construct,\n\ttype Declarable,\n\tedgeTo,\n\tpublicUrl,\n} from './construct-interface';\nimport type { RandomPassword } from './random-password';\nimport type { DeployedStage } from './stages';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t *\n\t * `'*'` answers on every subdomain nothing else does — one host per\n\t * tenant, `acme.myapp.com` — and then `hosts` names which of them are\n\t * real. Every other app keeps its own host, and a project has at most one\n\t * such site.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * With `subdomain: '*'`, the route that says which hosts are tenants: an\n\t * exported `GET` endpoint the edge asks before it serves a host,\n\t * `?domain=<host>`, answering `200` for a tenant and `404` otherwise.\n\t *\n\t * It runs without a session and belongs to no public API.\n\t */\n\thosts?: SiteHostsEndpoint;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n\t/**\n\t * A login the site is served behind on the stages named, so a staging\n\t * build is not public while it is tried.\n\t *\n\t * ```ts\n\t * export const sitePassword = new RandomPassword('SitePassword');\n\t *\n\t * export const web = new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * password: { secret: sitePassword, stages: ['staging'] },\n\t * });\n\t * ```\n\t *\n\t * The edge asks for it with HTTP basic auth before a request reaches the\n\t * site: the user is the stage's name, the password the `RandomPassword`'s\n\t * value on that stage. Like any `RandomPassword` it is generated on the\n\t * first deploy and kept, and one set by hand wins. It is not an edge — the\n\t * site is handed none of it — so export it from a constructs file of its\n\t * own, as any construct is.\n\t *\n\t * The compose target alone serves it so far; another refuses the stage\n\t * rather than serving it publicly.\n\t */\n\tpassword?: {\n\t\tsecret: RandomPassword;\n\t\tstages: readonly [DeployedStage, ...DeployedStage[]];\n\t};\n\t/**\n\t * `'stage'` for a `static` site that pre-renders data at build time\n\t * (vite-ssg and similar): its build fetches from the APIs it\n\t * `.dependsOn()`, and bakes their answers into its files.\n\t *\n\t * ```ts\n\t * new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * variant: 'static',\n\t * prerender: 'stage',\n\t * }).dependsOn([api]);\n\t * ```\n\t *\n\t * The deploy then builds the site only once those APIs are up and\n\t * healthy on the stage, and the build reaches them at their public\n\t * addresses, as a browser would. Without it, a site is built offline,\n\t * before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime\n\t * can fill a page built without its data.\n\t *\n\t * Opt-in, because the image then holds that stage's data: the same commit\n\t * builds a different image per stage, and `gkm compose --build --push`\n\t * needs the stage it builds for already running.\n\t */\n\tprerender?: 'stage';\n}\n\n/**\n * The shape of the endpoint `hosts` names — read structurally, so a site\n * module never loads the endpoint machinery to say which route it means.\n */\nexport interface SiteHostsEndpoint {\n\troute: string;\n\tmethod: string;\n\tsurface: { id: string };\n}\n\n/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */\nexport class WildcardSiteNeedsHosts extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it has to say which of them ` +\n\t\t\t\t`are tenants: pass \\`hosts\\`, a GET endpoint answering 200 for a ` +\n\t\t\t\t`host it serves and 404 otherwise.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteNeedsHosts';\n\t}\n}\n\n/** `hosts` on a site with one host, where there is nothing to check. */\nexport class SiteHostsNeedsWildcard extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' names a \\`hosts\\` check but answers on one host. ` +\n\t\t\t\t`Declare \\`subdomain: '*'\\` to serve every subdomain, or drop \\`hosts\\`.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNeedsWildcard';\n\t}\n}\n\n/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */\nexport class SiteHostsNotGet extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly method: string,\n\t\treadonly route: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' checks its hosts with ${method} ${route}, but the edge asks ` +\n\t\t\t\t`with GET ${route}?domain=<host>. Make it a GET endpoint.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNotGet';\n\t}\n}\n\n/**\n * `prerender: 'stage'` on a site that renders its pages on a server, where a\n * page renders on its first request — which the deploy's warm-up makes — and\n * needs no data at build.\n */\nexport class PrerenderNeedsStaticSite extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly variant: SiteDeclaration['variant'],\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' is a '${variant}' site, which renders its pages on its own ` +\n\t\t\t\t`server, so it never needs its APIs at build: drop \\`prerender\\`, ` +\n\t\t\t\t`and render data-backed pages on request (the deploy warms them). ` +\n\t\t\t\t`\\`prerender: 'stage'\\` is for a 'static' site that bakes data into ` +\n\t\t\t\t`its files.`,\n\t\t);\n\t\tthis.name = 'PrerenderNeedsStaticSite';\n\t}\n}\n\n/** A wildcard site that says it holds the base domain. */\nexport class WildcardSiteCannotBeRoot extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it cannot also hold the base ` +\n\t\t\t\t`domain. Drop \\`root: true\\`, and declare the site the base domain ` +\n\t\t\t\t`points at separately.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteCannotBeRoot';\n\t}\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>, Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\t/**\n\t * Its public address, `https://web.example.com` — a string, no await. The\n\t * same `<ID>_URL` on every command and stage, so a link built from it opens\n\t * in a browser.\n\t */\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(this.id) as Uncapitalize<TName>,\n\t\t\tregister: (options) => publicUrl(options, this.keys.url),\n\t\t};\n\n\t\tconst wildcard = config.subdomain === WILDCARD_SUBDOMAIN;\n\t\tif (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);\n\t\tif (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);\n\t\tif (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);\n\t\tconst variant = config.variant ?? 'static';\n\t\tif (config.prerender && variant !== 'static') {\n\t\t\tthrow new PrerenderNeedsStaticSite(this.id, variant);\n\t\t}\n\t\tif (config.hosts && config.hosts.method.toUpperCase() !== 'GET') {\n\t\t\tthrow new SiteHostsNotGet(\n\t\t\t\tthis.id,\n\t\t\t\tconfig.hosts.method,\n\t\t\t\tconfig.hosts.route,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(edgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\tconst { hosts } = this.config;\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\t...(hosts\n\t\t\t\t\t? {\n\t\t\t\t\t\t\thosts: {\n\t\t\t\t\t\t\t\tsurface: canonicalId(hosts.surface.id),\n\t\t\t\t\t\t\t\tpath: hosts.route,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.password\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpassword: {\n\t\t\t\t\t\t\t\tsecret: this.config.password.secret.id,\n\t\t\t\t\t\t\t\tstages: [...this.config.password.stages],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.prerender ? { prerender: this.config.prerender } : {}),\n\t\t\t\tprovides: [\n\t\t\t\t\tthis.keys.url,\n\t\t\t\t\t...(hosts\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'domain'),\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'protectedSubdomains'),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA,IAAa,yBAAb,cAA4C,MAAM;CAC5B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,IACtC,CAAC;GACJ,GAAI,KAAK,OAAO,WACb,EACA,UAAU;IACT,QAAQ,KAAK,OAAO,SAAS,OAAO;IACpC,QAAQ,CAAC,GAAG,KAAK,OAAO,SAAS,MAAM;GACxC,EACD,IACC,CAAC;GACJ,GAAI,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK,OAAO,UAAU,IAAI,CAAC;GACpE,UAAU,CACT,KAAK,KAAK,KACV,GAAI,QACD,EAAA,GACAC,oBAAAA,WAAAA,CAAW,KAAK,IAAI,QAAQ,IAAA,GAC5BA,oBAAAA,WAAAA,CAAW,KAAK,IAAI,qBAAqB,CAC1C,IACC,CAAC,CACL;EACD,CACD;CACD;AACD"}
|
|
1
|
+
{"version":3,"file":"site.cjs","names":["canonicalId","provideKey","serviceKey","publicUrl","WILDCARD_SUBDOMAIN","frontendEdgeTo"],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * A site consumes addresses, not connections: it is built, and the values it\n * needs are inlined or fetched by its own framework, so its own edges take any\n * {@link Declarable}. Its `.service` is its public address — what a worker's\n * cron or an endpoint that builds links to it reads:\n *\n * ```ts\n * export const digest = worker\n * .cron('rate(1 day)')\n * .dependsOn([web])\n * .handle(async ({ services }) => link(services.web, '/inbox'));\n * ```\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n\tserviceKey,\n\tWILDCARD_SUBDOMAIN,\n} from '@geekmidas/manifest';\nimport type { Service } from '@geekmidas/services';\nimport {\n\ttype Construct,\n\ttype Declarable,\n\tfrontendEdgeTo,\n\tpublicUrl,\n} from './construct-interface';\nimport type { RandomPassword } from './random-password';\nimport type { DeployedStage } from './stages';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t *\n\t * `'*'` answers on every subdomain nothing else does — one host per\n\t * tenant, `acme.myapp.com` — and then `hosts` names which of them are\n\t * real. Every other app keeps its own host, and a project has at most one\n\t * such site.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * With `subdomain: '*'`, the route that says which hosts are tenants: an\n\t * exported `GET` endpoint the edge asks before it serves a host,\n\t * `?domain=<host>`, answering `200` for a tenant and `404` otherwise.\n\t *\n\t * It runs without a session and belongs to no public API.\n\t */\n\thosts?: SiteHostsEndpoint;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n\t/**\n\t * A login the site is served behind on the stages named, so a staging\n\t * build is not public while it is tried.\n\t *\n\t * ```ts\n\t * export const sitePassword = new RandomPassword('SitePassword');\n\t *\n\t * export const web = new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * password: { secret: sitePassword, stages: ['staging'] },\n\t * });\n\t * ```\n\t *\n\t * The edge asks for it with HTTP basic auth before a request reaches the\n\t * site: the user is the stage's name, the password the `RandomPassword`'s\n\t * value on that stage. Like any `RandomPassword` it is generated on the\n\t * first deploy and kept, and one set by hand wins. It is not an edge — the\n\t * site is handed none of it — so export it from a constructs file of its\n\t * own, as any construct is.\n\t *\n\t * The compose target alone serves it so far; another refuses the stage\n\t * rather than serving it publicly.\n\t */\n\tpassword?: {\n\t\tsecret: RandomPassword;\n\t\tstages: readonly [DeployedStage, ...DeployedStage[]];\n\t};\n\t/**\n\t * `'stage'` for a `static` site that pre-renders data at build time\n\t * (vite-ssg and similar): its build fetches from the APIs it\n\t * `.dependsOn()`, and bakes their answers into its files.\n\t *\n\t * ```ts\n\t * new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * variant: 'static',\n\t * prerender: 'stage',\n\t * }).dependsOn([api]);\n\t * ```\n\t *\n\t * The deploy then builds the site only once those APIs are up and\n\t * healthy on the stage, and the build reaches them at their public\n\t * addresses, as a browser would. Without it, a site is built offline,\n\t * before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime\n\t * can fill a page built without its data.\n\t *\n\t * Opt-in, because the image then holds that stage's data: the same commit\n\t * builds a different image per stage, and `gkm compose --build --push`\n\t * needs the stage it builds for already running.\n\t */\n\tprerender?: 'stage';\n}\n\n/**\n * The shape of the endpoint `hosts` names — read structurally, so a site\n * module never loads the endpoint machinery to say which route it means.\n */\nexport interface SiteHostsEndpoint {\n\troute: string;\n\tmethod: string;\n\tsurface: { id: string };\n}\n\n/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */\nexport class WildcardSiteNeedsHosts extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it has to say which of them ` +\n\t\t\t\t`are tenants: pass \\`hosts\\`, a GET endpoint answering 200 for a ` +\n\t\t\t\t`host it serves and 404 otherwise.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteNeedsHosts';\n\t}\n}\n\n/** `hosts` on a site with one host, where there is nothing to check. */\nexport class SiteHostsNeedsWildcard extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' names a \\`hosts\\` check but answers on one host. ` +\n\t\t\t\t`Declare \\`subdomain: '*'\\` to serve every subdomain, or drop \\`hosts\\`.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNeedsWildcard';\n\t}\n}\n\n/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */\nexport class SiteHostsNotGet extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly method: string,\n\t\treadonly route: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' checks its hosts with ${method} ${route}, but the edge asks ` +\n\t\t\t\t`with GET ${route}?domain=<host>. Make it a GET endpoint.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNotGet';\n\t}\n}\n\n/**\n * `prerender: 'stage'` on a site that renders its pages on a server, where a\n * page renders on its first request — which the deploy's warm-up makes — and\n * needs no data at build.\n */\nexport class PrerenderNeedsStaticSite extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly variant: SiteDeclaration['variant'],\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' is a '${variant}' site, which renders its pages on its own ` +\n\t\t\t\t`server, so it never needs its APIs at build: drop \\`prerender\\`, ` +\n\t\t\t\t`and render data-backed pages on request (the deploy warms them). ` +\n\t\t\t\t`\\`prerender: 'stage'\\` is for a 'static' site that bakes data into ` +\n\t\t\t\t`its files.`,\n\t\t);\n\t\tthis.name = 'PrerenderNeedsStaticSite';\n\t}\n}\n\n/** A wildcard site that says it holds the base domain. */\nexport class WildcardSiteCannotBeRoot extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it cannot also hold the base ` +\n\t\t\t\t`domain. Drop \\`root: true\\`, and declare the site the base domain ` +\n\t\t\t\t`points at separately.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteCannotBeRoot';\n\t}\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>, Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\t/**\n\t * Its public address, `https://web.example.com` — a string, no await. The\n\t * same `<ID>_URL` on every command and stage, so a link built from it opens\n\t * in a browser.\n\t */\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(this.id) as Uncapitalize<TName>,\n\t\t\tregister: (options) => publicUrl(options, this.keys.url),\n\t\t};\n\n\t\tconst wildcard = config.subdomain === WILDCARD_SUBDOMAIN;\n\t\tif (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);\n\t\tif (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);\n\t\tif (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);\n\t\tconst variant = config.variant ?? 'static';\n\t\tif (config.prerender && variant !== 'static') {\n\t\t\tthrow new PrerenderNeedsStaticSite(this.id, variant);\n\t\t}\n\t\tif (config.hosts && config.hosts.method.toUpperCase() !== 'GET') {\n\t\t\tthrow new SiteHostsNotGet(\n\t\t\t\tthis.id,\n\t\t\t\tconfig.hosts.method,\n\t\t\t\tconfig.hosts.route,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t *\n\t * A plain edge to a `FileServer` is to its public face: the site is built\n\t * with the address its objects are served on, and handed nothing that\n\t * writes to the bucket. `.dependsOn([assets.server])` asks for the bucket\n\t * too, for a server half that uploads.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(frontendEdgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\tconst { hosts } = this.config;\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\t...(hosts\n\t\t\t\t\t? {\n\t\t\t\t\t\t\thosts: {\n\t\t\t\t\t\t\t\tsurface: canonicalId(hosts.surface.id),\n\t\t\t\t\t\t\t\tpath: hosts.route,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.password\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpassword: {\n\t\t\t\t\t\t\t\tsecret: this.config.password.secret.id,\n\t\t\t\t\t\t\t\tstages: [...this.config.password.stages],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.prerender ? { prerender: this.config.prerender } : {}),\n\t\t\t\tprovides: [\n\t\t\t\t\tthis.keys.url,\n\t\t\t\t\t...(hosts\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'domain'),\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'protectedSubdomains'),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,+JAGR;EALoB,KAAA,KAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,2HAER;EAJoB,KAAA,KAAA;EAKpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa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AAU,CACT,KAAK,KAAK,KACV,GAAI,QACD,EAAA,GACAC,oBAAAA,WAAAA,CAAW,KAAK,IAAI,QAAQ,IAAA,GAC5BA,oBAAAA,WAAAA,CAAW,KAAK,IAAI,qBAAqB,CAC1C,IACC,CAAC,CACL;EACD,CACD;CACD;AACD"}
|
package/dist/site.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Declarable, n as Construct } from "./construct-interface-
|
|
2
|
-
import { n as Telemetry } from "./telemetry-
|
|
1
|
+
import { i as Declarable, n as Construct } from "./construct-interface-DhbaONW2.cjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-DjJgtQ_N.cjs";
|
|
3
3
|
import { n as DeployedStage } from "./stages-DaTaoQei.cjs";
|
|
4
4
|
import { RandomPassword } from "./random-password.cjs";
|
|
5
5
|
import { Service } from "@geekmidas/services";
|
|
@@ -212,6 +212,11 @@ export declare class StaticSite<TName extends string = string> implements Declar
|
|
|
212
212
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
213
213
|
* edge is a build-time link and not a service injection — requiring a client
|
|
214
214
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
215
|
+
*
|
|
216
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
217
|
+
* with the address its objects are served on, and handed nothing that
|
|
218
|
+
* writes to the bucket. `.dependsOn([assets.server])` asks for the bucket
|
|
219
|
+
* too, for a server half that uploads.
|
|
215
220
|
*/
|
|
216
221
|
dependsOn(constructs: readonly Declarable[]): StaticSite<TName>;
|
|
217
222
|
declare(): Declaration[];
|
package/dist/site.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.cts","names":[],"sources":["../src/site.ts"],"mappings":";;;;;;;;;;;;;iBA0DiB;;;;;;;EAOhB;;;;;;;;;;;EAWA;;;;;;;;EAQA,QAAQ;;;;;;;EAOR;;;;;;;EAOA;IAAW;IAAiB;;;;;;;;;;EAS5B;;;;;;;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AW,QAAQ,UAAU;mBActB;;;;;;;mBAOA;WAnBT,IAAI;WACJ;IAAQ;;;;;;;WAOR,SAAS,QAAQ,aAAa;EAEvC,YACC,IAAI,cAAc,QACD,QAAQ,kBAOR;;;;;;;EAAA,wBAAuB;;;;;;;;;;;;;;;;;EA2CzC,UAAU,qBAAqB,eAAe,WAAW;EAOzD,WAAW"}
|
package/dist/site.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Declarable, n as Construct } from "./construct-interface-
|
|
2
|
-
import { n as Telemetry } from "./telemetry-
|
|
1
|
+
import { i as Declarable, n as Construct } from "./construct-interface-DxfkFxkl.mjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-BirKau0X.mjs";
|
|
3
3
|
import { n as DeployedStage } from "./stages-DaTaoQei.mjs";
|
|
4
4
|
import { RandomPassword } from "./random-password.mjs";
|
|
5
5
|
import { ConstructName, Declaration, Dependency, SiteDeclaration } from "@geekmidas/manifest";
|
|
@@ -212,6 +212,11 @@ export declare class StaticSite<TName extends string = string> implements Declar
|
|
|
212
212
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
213
213
|
* edge is a build-time link and not a service injection — requiring a client
|
|
214
214
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
215
|
+
*
|
|
216
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
217
|
+
* with the address its objects are served on, and handed nothing that
|
|
218
|
+
* writes to the bucket. `.dependsOn([assets.server])` asks for the bucket
|
|
219
|
+
* too, for a server half that uploads.
|
|
215
220
|
*/
|
|
216
221
|
dependsOn(constructs: readonly Declarable[]): StaticSite<TName>;
|
|
217
222
|
declare(): Declaration[];
|
package/dist/site.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.mts","names":[],"sources":["../src/site.ts"],"mappings":";;;;;;;;;;;;;iBA0DiB;;;;;;;EAOhB;;;;;;;;;;;EAWA;;;;;;;;EAQA,QAAQ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AAS;;;qBAcP,iCAAiC;WACxB;EAArB,YAAqB;;qBAUT,WAAW,0CACZ,WAAW,QAAQ,UAAU;mBActB;;;;;;;mBAOA;WAnBT,IAAI;WACJ;IAAQ;;;;;;;WAOR,SAAS,QAAQ,aAAa;EAEvC,YACC,IAAI,cAAc,QACD,QAAQ,kBAOR;;;;;;;EAAA,wBAAuB;;;;;;;;;;;;;;;;;EA2CzC,UAAU,qBAAqB,eAAe,WAAW;EAOzD,WAAW"}
|
package/dist/site.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { frontendEdgeTo, publicUrl } from "./construct-interface.mjs";
|
|
2
2
|
import { WILDCARD_SUBDOMAIN, canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
|
|
3
3
|
//#region src/site.ts
|
|
4
4
|
/**
|
|
@@ -124,9 +124,14 @@ var StaticSite = class StaticSite {
|
|
|
124
124
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
125
125
|
* edge is a build-time link and not a service injection — requiring a client
|
|
126
126
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
127
|
+
*
|
|
128
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
129
|
+
* with the address its objects are served on, and handed nothing that
|
|
130
|
+
* writes to the bucket. `.dependsOn([assets.server])` asks for the bucket
|
|
131
|
+
* too, for a server half that uploads.
|
|
127
132
|
*/
|
|
128
133
|
dependsOn(constructs) {
|
|
129
|
-
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(
|
|
134
|
+
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(frontendEdgeTo)]);
|
|
130
135
|
}
|
|
131
136
|
declare() {
|
|
132
137
|
const { hosts } = this.config;
|
package/dist/site.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.mjs","names":[],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * A site consumes addresses, not connections: it is built, and the values it\n * needs are inlined or fetched by its own framework, so its own edges take any\n * {@link Declarable}. Its `.service` is its public address — what a worker's\n * cron or an endpoint that builds links to it reads:\n *\n * ```ts\n * export const digest = worker\n * .cron('rate(1 day)')\n * .dependsOn([web])\n * .handle(async ({ services }) => link(services.web, '/inbox'));\n * ```\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n\tserviceKey,\n\tWILDCARD_SUBDOMAIN,\n} from '@geekmidas/manifest';\nimport type { Service } from '@geekmidas/services';\nimport {\n\ttype Construct,\n\ttype Declarable,\n\tedgeTo,\n\tpublicUrl,\n} from './construct-interface';\nimport type { RandomPassword } from './random-password';\nimport type { DeployedStage } from './stages';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t *\n\t * `'*'` answers on every subdomain nothing else does — one host per\n\t * tenant, `acme.myapp.com` — and then `hosts` names which of them are\n\t * real. Every other app keeps its own host, and a project has at most one\n\t * such site.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * With `subdomain: '*'`, the route that says which hosts are tenants: an\n\t * exported `GET` endpoint the edge asks before it serves a host,\n\t * `?domain=<host>`, answering `200` for a tenant and `404` otherwise.\n\t *\n\t * It runs without a session and belongs to no public API.\n\t */\n\thosts?: SiteHostsEndpoint;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n\t/**\n\t * A login the site is served behind on the stages named, so a staging\n\t * build is not public while it is tried.\n\t *\n\t * ```ts\n\t * export const sitePassword = new RandomPassword('SitePassword');\n\t *\n\t * export const web = new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * password: { secret: sitePassword, stages: ['staging'] },\n\t * });\n\t * ```\n\t *\n\t * The edge asks for it with HTTP basic auth before a request reaches the\n\t * site: the user is the stage's name, the password the `RandomPassword`'s\n\t * value on that stage. Like any `RandomPassword` it is generated on the\n\t * first deploy and kept, and one set by hand wins. It is not an edge — the\n\t * site is handed none of it — so export it from a constructs file of its\n\t * own, as any construct is.\n\t *\n\t * The compose target alone serves it so far; another refuses the stage\n\t * rather than serving it publicly.\n\t */\n\tpassword?: {\n\t\tsecret: RandomPassword;\n\t\tstages: readonly [DeployedStage, ...DeployedStage[]];\n\t};\n\t/**\n\t * `'stage'` for a `static` site that pre-renders data at build time\n\t * (vite-ssg and similar): its build fetches from the APIs it\n\t * `.dependsOn()`, and bakes their answers into its files.\n\t *\n\t * ```ts\n\t * new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * variant: 'static',\n\t * prerender: 'stage',\n\t * }).dependsOn([api]);\n\t * ```\n\t *\n\t * The deploy then builds the site only once those APIs are up and\n\t * healthy on the stage, and the build reaches them at their public\n\t * addresses, as a browser would. Without it, a site is built offline,\n\t * before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime\n\t * can fill a page built without its data.\n\t *\n\t * Opt-in, because the image then holds that stage's data: the same commit\n\t * builds a different image per stage, and `gkm compose --build --push`\n\t * needs the stage it builds for already running.\n\t */\n\tprerender?: 'stage';\n}\n\n/**\n * The shape of the endpoint `hosts` names — read structurally, so a site\n * module never loads the endpoint machinery to say which route it means.\n */\nexport interface SiteHostsEndpoint {\n\troute: string;\n\tmethod: string;\n\tsurface: { id: string };\n}\n\n/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */\nexport class WildcardSiteNeedsHosts extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it has to say which of them ` +\n\t\t\t\t`are tenants: pass \\`hosts\\`, a GET endpoint answering 200 for a ` +\n\t\t\t\t`host it serves and 404 otherwise.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteNeedsHosts';\n\t}\n}\n\n/** `hosts` on a site with one host, where there is nothing to check. */\nexport class SiteHostsNeedsWildcard extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' names a \\`hosts\\` check but answers on one host. ` +\n\t\t\t\t`Declare \\`subdomain: '*'\\` to serve every subdomain, or drop \\`hosts\\`.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNeedsWildcard';\n\t}\n}\n\n/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */\nexport class SiteHostsNotGet extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly method: string,\n\t\treadonly route: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' checks its hosts with ${method} ${route}, but the edge asks ` +\n\t\t\t\t`with GET ${route}?domain=<host>. Make it a GET endpoint.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNotGet';\n\t}\n}\n\n/**\n * `prerender: 'stage'` on a site that renders its pages on a server, where a\n * page renders on its first request — which the deploy's warm-up makes — and\n * needs no data at build.\n */\nexport class PrerenderNeedsStaticSite extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly variant: SiteDeclaration['variant'],\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' is a '${variant}' site, which renders its pages on its own ` +\n\t\t\t\t`server, so it never needs its APIs at build: drop \\`prerender\\`, ` +\n\t\t\t\t`and render data-backed pages on request (the deploy warms them). ` +\n\t\t\t\t`\\`prerender: 'stage'\\` is for a 'static' site that bakes data into ` +\n\t\t\t\t`its files.`,\n\t\t);\n\t\tthis.name = 'PrerenderNeedsStaticSite';\n\t}\n}\n\n/** A wildcard site that says it holds the base domain. */\nexport class WildcardSiteCannotBeRoot extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it cannot also hold the base ` +\n\t\t\t\t`domain. Drop \\`root: true\\`, and declare the site the base domain ` +\n\t\t\t\t`points at separately.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteCannotBeRoot';\n\t}\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>, Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\t/**\n\t * Its public address, `https://web.example.com` — a string, no await. The\n\t * same `<ID>_URL` on every command and stage, so a link built from it opens\n\t * in a browser.\n\t */\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(this.id) as Uncapitalize<TName>,\n\t\t\tregister: (options) => publicUrl(options, this.keys.url),\n\t\t};\n\n\t\tconst wildcard = config.subdomain === WILDCARD_SUBDOMAIN;\n\t\tif (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);\n\t\tif (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);\n\t\tif (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);\n\t\tconst variant = config.variant ?? 'static';\n\t\tif (config.prerender && variant !== 'static') {\n\t\t\tthrow new PrerenderNeedsStaticSite(this.id, variant);\n\t\t}\n\t\tif (config.hosts && config.hosts.method.toUpperCase() !== 'GET') {\n\t\t\tthrow new SiteHostsNotGet(\n\t\t\t\tthis.id,\n\t\t\t\tconfig.hosts.method,\n\t\t\t\tconfig.hosts.route,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(edgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\tconst { hosts } = this.config;\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\t...(hosts\n\t\t\t\t\t? {\n\t\t\t\t\t\t\thosts: {\n\t\t\t\t\t\t\t\tsurface: canonicalId(hosts.surface.id),\n\t\t\t\t\t\t\t\tpath: hosts.route,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.password\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpassword: {\n\t\t\t\t\t\t\t\tsecret: this.config.password.secret.id,\n\t\t\t\t\t\t\t\tstages: [...this.config.password.stages],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.prerender ? { prerender: this.config.prerender } : {}),\n\t\t\t\tprovides: [\n\t\t\t\t\tthis.keys.url,\n\t\t\t\t\t...(hosts\n\t\t\t\t\t\t? [\n\t\t\t\t\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,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;GACzC,cAAc,KAAK;GACnB,GAAI,KAAK,OAAO,YACb,EAAE,WAAW,KAAK,OAAO,UAAU,GAAG,IACtC,CAAC;GACJ,GAAI,KAAK,OAAO,WACb,EACA,UAAU;IACT,QAAQ,KAAK,OAAO,SAAS,OAAO;IACpC,QAAQ,CAAC,GAAG,KAAK,OAAO,SAAS,MAAM;GACxC,EACD,IACC,CAAC;GACJ,GAAI,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK,OAAO,UAAU,IAAI,CAAC;GACpE,UAAU,CACT,KAAK,KAAK,KACV,GAAI,QACD,CACA,WAAW,KAAK,IAAI,QAAQ,GAC5B,WAAW,KAAK,IAAI,qBAAqB,CAC1C,IACC,CAAC,CACL;EACD,CACD;CACD;AACD"}
|
|
1
|
+
{"version":3,"file":"site.mjs","names":[],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * A site consumes addresses, not connections: it is built, and the values it\n * needs are inlined or fetched by its own framework, so its own edges take any\n * {@link Declarable}. Its `.service` is its public address — what a worker's\n * cron or an endpoint that builds links to it reads:\n *\n * ```ts\n * export const digest = worker\n * .cron('rate(1 day)')\n * .dependsOn([web])\n * .handle(async ({ services }) => link(services.web, '/inbox'));\n * ```\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n\tserviceKey,\n\tWILDCARD_SUBDOMAIN,\n} from '@geekmidas/manifest';\nimport type { Service } from '@geekmidas/services';\nimport {\n\ttype Construct,\n\ttype Declarable,\n\tfrontendEdgeTo,\n\tpublicUrl,\n} from './construct-interface';\nimport type { RandomPassword } from './random-password';\nimport type { DeployedStage } from './stages';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t *\n\t * `'*'` answers on every subdomain nothing else does — one host per\n\t * tenant, `acme.myapp.com` — and then `hosts` names which of them are\n\t * real. Every other app keeps its own host, and a project has at most one\n\t * such site.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * With `subdomain: '*'`, the route that says which hosts are tenants: an\n\t * exported `GET` endpoint the edge asks before it serves a host,\n\t * `?domain=<host>`, answering `200` for a tenant and `404` otherwise.\n\t *\n\t * It runs without a session and belongs to no public API.\n\t */\n\thosts?: SiteHostsEndpoint;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n\t/**\n\t * A login the site is served behind on the stages named, so a staging\n\t * build is not public while it is tried.\n\t *\n\t * ```ts\n\t * export const sitePassword = new RandomPassword('SitePassword');\n\t *\n\t * export const web = new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * password: { secret: sitePassword, stages: ['staging'] },\n\t * });\n\t * ```\n\t *\n\t * The edge asks for it with HTTP basic auth before a request reaches the\n\t * site: the user is the stage's name, the password the `RandomPassword`'s\n\t * value on that stage. Like any `RandomPassword` it is generated on the\n\t * first deploy and kept, and one set by hand wins. It is not an edge — the\n\t * site is handed none of it — so export it from a constructs file of its\n\t * own, as any construct is.\n\t *\n\t * The compose target alone serves it so far; another refuses the stage\n\t * rather than serving it publicly.\n\t */\n\tpassword?: {\n\t\tsecret: RandomPassword;\n\t\tstages: readonly [DeployedStage, ...DeployedStage[]];\n\t};\n\t/**\n\t * `'stage'` for a `static` site that pre-renders data at build time\n\t * (vite-ssg and similar): its build fetches from the APIs it\n\t * `.dependsOn()`, and bakes their answers into its files.\n\t *\n\t * ```ts\n\t * new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * variant: 'static',\n\t * prerender: 'stage',\n\t * }).dependsOn([api]);\n\t * ```\n\t *\n\t * The deploy then builds the site only once those APIs are up and\n\t * healthy on the stage, and the build reaches them at their public\n\t * addresses, as a browser would. Without it, a site is built offline,\n\t * before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime\n\t * can fill a page built without its data.\n\t *\n\t * Opt-in, because the image then holds that stage's data: the same commit\n\t * builds a different image per stage, and `gkm compose --build --push`\n\t * needs the stage it builds for already running.\n\t */\n\tprerender?: 'stage';\n}\n\n/**\n * The shape of the endpoint `hosts` names — read structurally, so a site\n * module never loads the endpoint machinery to say which route it means.\n */\nexport interface SiteHostsEndpoint {\n\troute: string;\n\tmethod: string;\n\tsurface: { id: string };\n}\n\n/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */\nexport class WildcardSiteNeedsHosts extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it has to say which of them ` +\n\t\t\t\t`are tenants: pass \\`hosts\\`, a GET endpoint answering 200 for a ` +\n\t\t\t\t`host it serves and 404 otherwise.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteNeedsHosts';\n\t}\n}\n\n/** `hosts` on a site with one host, where there is nothing to check. */\nexport class SiteHostsNeedsWildcard extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' names a \\`hosts\\` check but answers on one host. ` +\n\t\t\t\t`Declare \\`subdomain: '*'\\` to serve every subdomain, or drop \\`hosts\\`.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNeedsWildcard';\n\t}\n}\n\n/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */\nexport class SiteHostsNotGet extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly method: string,\n\t\treadonly route: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' checks its hosts with ${method} ${route}, but the edge asks ` +\n\t\t\t\t`with GET ${route}?domain=<host>. Make it a GET endpoint.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNotGet';\n\t}\n}\n\n/**\n * `prerender: 'stage'` on a site that renders its pages on a server, where a\n * page renders on its first request — which the deploy's warm-up makes — and\n * needs no data at build.\n */\nexport class PrerenderNeedsStaticSite extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly variant: SiteDeclaration['variant'],\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' is a '${variant}' site, which renders its pages on its own ` +\n\t\t\t\t`server, so it never needs its APIs at build: drop \\`prerender\\`, ` +\n\t\t\t\t`and render data-backed pages on request (the deploy warms them). ` +\n\t\t\t\t`\\`prerender: 'stage'\\` is for a 'static' site that bakes data into ` +\n\t\t\t\t`its files.`,\n\t\t);\n\t\tthis.name = 'PrerenderNeedsStaticSite';\n\t}\n}\n\n/** A wildcard site that says it holds the base domain. */\nexport class WildcardSiteCannotBeRoot extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it cannot also hold the base ` +\n\t\t\t\t`domain. Drop \\`root: true\\`, and declare the site the base domain ` +\n\t\t\t\t`points at separately.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteCannotBeRoot';\n\t}\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>, Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\t/**\n\t * Its public address, `https://web.example.com` — a string, no await. The\n\t * same `<ID>_URL` on every command and stage, so a link built from it opens\n\t * in a browser.\n\t */\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(this.id) as Uncapitalize<TName>,\n\t\t\tregister: (options) => publicUrl(options, this.keys.url),\n\t\t};\n\n\t\tconst wildcard = config.subdomain === WILDCARD_SUBDOMAIN;\n\t\tif (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);\n\t\tif (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);\n\t\tif (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);\n\t\tconst variant = config.variant ?? 'static';\n\t\tif (config.prerender && variant !== 'static') {\n\t\t\tthrow new PrerenderNeedsStaticSite(this.id, variant);\n\t\t}\n\t\tif (config.hosts && config.hosts.method.toUpperCase() !== 'GET') {\n\t\t\tthrow new SiteHostsNotGet(\n\t\t\t\tthis.id,\n\t\t\t\tconfig.hosts.method,\n\t\t\t\tconfig.hosts.route,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t *\n\t * A plain edge to a `FileServer` is to its public face: the site is built\n\t * with the address its objects are served on, and handed nothing that\n\t * writes to the bucket. `.dependsOn([assets.server])` asks for the bucket\n\t * too, for a server half that uploads.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(frontendEdgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\tconst { hosts } = this.config;\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\t...(hosts\n\t\t\t\t\t? {\n\t\t\t\t\t\t\thosts: {\n\t\t\t\t\t\t\t\tsurface: canonicalId(hosts.surface.id),\n\t\t\t\t\t\t\t\tpath: hosts.route,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.password\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpassword: {\n\t\t\t\t\t\t\t\tsecret: this.config.password.secret.id,\n\t\t\t\t\t\t\t\tstages: [...this.config.password.stages],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.prerender ? { prerender: this.config.prerender } : {}),\n\t\t\t\tprovides: [\n\t\t\t\t\tthis.keys.url,\n\t\t\t\t\t...(hosts\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'domain'),\n\t\t\t\t\t\t\t\tprovideKey(this.id, 'protectedSubdomains'),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,+JAGR;EALoB,KAAA,KAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,2HAER;EAJoB,KAAA,KAAA;EAKpB,KAAK,OAA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AAqB,CAC1C,IACC,CAAC,CACL;EACD,CACD;CACD;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Subscriber } from "../Subscriber-5rCX1Nph.cjs";
|
|
2
|
-
import { a as ObjectSubscriberHasNoEvents, i as ObjectSubscriberHandler, n as ObjectSubscriberBuilder, o as SubscriberBuilder, r as ObjectSubscriberContext, t as ObjectSubscriber } from "../ObjectSubscriberBuilder-
|
|
2
|
+
import { a as ObjectSubscriberHasNoEvents, i as ObjectSubscriberHandler, n as ObjectSubscriberBuilder, o as SubscriberBuilder, r as ObjectSubscriberContext, t as ObjectSubscriber } from "../ObjectSubscriberBuilder-CB6imsX4.cjs";
|
|
3
3
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
4
|
import { SnsHttpMessage } from "@geekmidas/events/sns/message";
|
|
5
5
|
//#region src/subscribers/SnsPushSubscriberAdaptor.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Subscriber } from "../Subscriber-CtQXhcL7.mjs";
|
|
2
|
-
import { a as ObjectSubscriberHasNoEvents, i as ObjectSubscriberHandler, n as ObjectSubscriberBuilder, o as SubscriberBuilder, r as ObjectSubscriberContext, t as ObjectSubscriber } from "../ObjectSubscriberBuilder-
|
|
2
|
+
import { a as ObjectSubscriberHasNoEvents, i as ObjectSubscriberHandler, n as ObjectSubscriberBuilder, o as SubscriberBuilder, r as ObjectSubscriberContext, t as ObjectSubscriber } from "../ObjectSubscriberBuilder-AwGKoUKy.mjs";
|
|
3
3
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
4
|
import { SnsHttpMessage } from "@geekmidas/events/sns/message";
|
|
5
5
|
//#region src/subscribers/SnsPushSubscriberAdaptor.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Declarable } from "./construct-interface-
|
|
1
|
+
import { i as Declarable } from "./construct-interface-DxfkFxkl.mjs";
|
|
2
2
|
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
3
3
|
//#region src/telemetry.d.ts
|
|
4
4
|
interface TelemetryConfig {
|
|
@@ -37,4 +37,4 @@ interface EndpointTelemetry {
|
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
export { Telemetry as n, TelemetryConfig as r, EndpointTelemetry as t };
|
|
40
|
-
//# sourceMappingURL=telemetry-
|
|
40
|
+
//# sourceMappingURL=telemetry-BirKau0X.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-
|
|
1
|
+
{"version":3,"file":"telemetry-BirKau0X.d.mts","names":[],"sources":["../src/telemetry.ts"],"mappings":";;;UAkCiB;;;;;;;EAOhB;;;;;;EAMA,aAAa,SAAS;;cAGV,UAAU,0CACX,WAAW;WAEb,IAAI;WACJ;WACA,YAAY,SAAS;EAE9B,YAAY,IAAI,cAAc,QAAQ,SAAQ;;;;;;EAW9C,WAAW;;;UAgBK;;EAEhB;;EAEA,aAAa,SAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Declarable } from "./construct-interface-
|
|
1
|
+
import { i as Declarable } from "./construct-interface-DhbaONW2.cjs";
|
|
2
2
|
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
3
3
|
//#region src/telemetry.d.ts
|
|
4
4
|
interface TelemetryConfig {
|
|
@@ -37,4 +37,4 @@ interface EndpointTelemetry {
|
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
export { Telemetry as n, TelemetryConfig as r, EndpointTelemetry as t };
|
|
40
|
-
//# sourceMappingURL=telemetry-
|
|
40
|
+
//# sourceMappingURL=telemetry-DjJgtQ_N.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-
|
|
1
|
+
{"version":3,"file":"telemetry-DjJgtQ_N.d.cts","names":[],"sources":["../src/telemetry.ts"],"mappings":";;;UAkCiB;;;;;;;EAOhB;;;;;;EAMA,aAAa,SAAS;;cAGV,UAAU,0CACX,WAAW;WAEb,IAAI;WACJ;WACA,YAAY,SAAS;EAE9B,YAAY,IAAI,cAAc,QAAQ,SAAQ;;;;;;EAW9C,WAAW;;;UAgBK;;EAEhB;;EAEA,aAAa,SAAS"}
|
package/dist/telemetry.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Telemetry, r as TelemetryConfig, t as EndpointTelemetry } from "./telemetry-
|
|
1
|
+
import { n as Telemetry, r as TelemetryConfig, t as EndpointTelemetry } from "./telemetry-DjJgtQ_N.cjs";
|
|
2
2
|
export { EndpointTelemetry, Telemetry, TelemetryConfig };
|
package/dist/telemetry.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Telemetry, r as TelemetryConfig, t as EndpointTelemetry } from "./telemetry-
|
|
1
|
+
import { n as Telemetry, r as TelemetryConfig, t as EndpointTelemetry } from "./telemetry-BirKau0X.mjs";
|
|
2
2
|
export { EndpointTelemetry, Telemetry, TelemetryConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as StandardSchemaV1 } from "./index-DdRjYhiJ.cjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as Telemetry } from "./telemetry-
|
|
2
|
+
import { i as Declarable, l as ServicesOf, r as Consumable, t as Authenticator } from "./construct-interface-DhbaONW2.cjs";
|
|
3
|
+
import { n as Telemetry } from "./telemetry-DjJgtQ_N.cjs";
|
|
4
4
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
5
5
|
import { Logger } from "@geekmidas/logger";
|
|
6
6
|
import { InferStandardSchema } from "@geekmidas/schema";
|
|
@@ -1198,4 +1198,4 @@ declare class WebSocketApi<TName extends string = string, TMessages extends WebS
|
|
|
1198
1198
|
}
|
|
1199
1199
|
//#endregion
|
|
1200
1200
|
export { TestConnection as $, DuplicateWebSocketRoute as A, RouteKind as B, TokenBucket as C, ConnectOutcome as D, resolveLimits as E, WriteFrame as F, WebSocketRouteResult as G, WebSocketRoute as H, ConnectContext as I, RecordedClose as J, InvalidWebSocketRequest as K, Connection as L, WebSocketCallOptions as M, WebSocketCore as N, ConnectRequest as O, WebSocketCoreOptions as P, TestConnectRequest as Q, DisconnectContext as R, ResolvedWebSocketLimits as S, WebSocketLimits as T, WebSocketRouteBuilder as U, TestCallOverrides as V, WebSocketRouteRequest as W, RecordedSend as X, RecordedMessage as Y, RecordingSink as Z, DEFAULT_WEBSOCKET_LIMITS as _, WebSocketSink as _t, WebSocketSinkDriver as a, WebSocketDataHasDiscriminator as at, MemoryLimitStore as b, WebSocketServerOptions as c, WebSocketMessageDeclaresDiscriminator as ct, MemoryTransport as d, MessageAction as dt, TestDisconnectRequest as et, RedisTransport as f, MessageData as ft, transportFromConnectionString as g, WebSocketPublisher as gt, WebSocketTransport as h, WebSocketMessages as ht, UnregisteredWebSocketScheme as i, WebSocketTestSurface as it, MessageOutcome as j, DisconnectOutcome as k, WebSocketSurfaceServer as l, WebSocketMessageNotAnObject as lt, UnsupportedWebSocketTransport as m, UnknownWebSocketMessage as mt, WebSocketApi as n, TestMessageResponse as nt, registerWebSocketSinkDriver as o, WebSocketDataNotAnObject as ot, TransportSink as p, NoMessages as pt, RecordedBroadcast as q, WebSocketApiConfig as r, TestWebSocketPublisher as rt, CLOSE as s, WebSocketFrame as st, InvalidReplicaCount as t, TestMessageRequest as tt, Delivery as u, InvalidWebSocketMessage as ut, InvalidWebSocketLimit as v, WebSocketLimitStore as w, RedisLimitStore as x, LIMIT_CLOSE as y, MessageContext as z };
|
|
1201
|
-
//# sourceMappingURL=websocket-api-
|
|
1201
|
+
//# sourceMappingURL=websocket-api-B1Wl3tg4.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-api-
|
|
1
|
+
{"version":3,"file":"websocket-api-B1Wl3tg4.d.cts","names":[],"sources":["../src/websocket/publisher.ts","../src/websocket/frame.ts","../src/websocket/testing.ts","../src/websocket/route.ts","../src/websocket/core.ts","../src/websocket/limits.ts","../src/websocket/transport.ts","../src/websocket/server.ts","../src/websocket/drivers.ts","../src/websocket-api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAYiB;EAChB,KAAK,wBAAwB,kBAAkB;;EAE/C,UAAU,iBAAiB,6BAA6B;EACxD,MAAM,wBAAwB,cAAc,iBAAiB;;;;;KAMlD,oBAAoB,eAAe;;KAGnC,aAAa;;KAGb,cAAc,kBAAkB,4BACrC,4CAGE;;KAGG,YACX,kBAAkB,mBAClB,0BACG,sBAAsB,YACvB,iBAAiB,WAAW,UAAU;;cAI5B,gCAAgC;WAElC;WACA;WACA;EAHV,YACU,iBACA,gBACA;;;cAYE,gCAAgC;WAElC;WACA;WACA,iBAAiB,iBAAiB;EAH5C,YACU,iBACA,gBACA,iBAAiB,iBAAiB;;;;;;;;;;;;;;;;cAyBhC,mBACZ,kBAAkB,oBAAoB;;mBAIpB;;mBAEA;;mBAEA;EANlB,YAEkB;;EAAA,MAAM,eAEN;;EAAA;IAAa;IAAiB,UAAU;iBAExC;;EAAA,QAAO;;EAMnB,KAAK,gBAAgB,cAAc,YACxC,iCACA,QAAQ,SACR,MAAM,YAAY,WAAW,WAC3B;;EAMG,UAAU,gBAAgB,cAAc,YAC7C,QAAQ,SACR,MAAM,YAAY,WAAW,UAC7B;IAAW;MACT;;EASG,MACL,iCACA,eACA,kBACE;;;;;;;;UAWW;;;;;UCxHE;;EAEhB;;;UAIgB;EAChB;;EAEA;EACA;;;cAIY,oCAAoC;WAEtC;WACA;WACA;EAHV,YACU,iBACA,gBACA;;;cAUE,8CAA8C;WAEhD;WACA;WACA;EAHV,YACU,iBACA,gBACA;;;cAUE,iCAAiC;WAEnC;WACA;WACA;EAHV,YACU,iBACA,gBACA;;;cAUE,sCAAsC;WAExC;WACA;WACA;EAHV,YACU,iBACA,gBACA;;;cAUE;WAEF;;WAEA;EAHV,YACU,iBAEA;;EAAA;;MAIN;;;;;;;EAUJ,OAAO,gBAAgB,eAAe;;EAuBtC,OAAO,iBAAiB;;E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K,WAAW,gBAAgB,aAAa,OAAO;;;;;;;;;EAgB9C,OACL,SAAS;IAA2B;MAClC;IACF,KAAK;IACL,OAAO,QAAQ;;IAEf,WAAW;IACX,QAAQ,uBAAuB;;;;;;;;;;;;;EA+EhC,KAAK;IACJ,WAAW;IACX,MAAM;IACN;MACG,cAAc;;;;;;EAoBlB,UAAU,MAAM,gBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;EAyBnD,iBAAiB,uBAAuB;;;;;cAW5B;;cAUA;EAMZ,WAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as StandardSchemaV1 } from "./index-DdRjYhiJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as Telemetry } from "./telemetry-
|
|
2
|
+
import { i as Declarable, l as ServicesOf, r as Consumable, t as Authenticator } from "./construct-interface-DxfkFxkl.mjs";
|
|
3
|
+
import { n as Telemetry } from "./telemetry-BirKau0X.mjs";
|
|
4
4
|
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
5
5
|
import { Service, ServiceRecord, ServiceRegisterOptions } from "@geekmidas/services";
|
|
6
6
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
@@ -1198,4 +1198,4 @@ declare class WebSocketApi<TName extends string = string, TMessages extends WebS
|
|
|
1198
1198
|
}
|
|
1199
1199
|
//#endregion
|
|
1200
1200
|
export { TestConnection as $, DuplicateWebSocketRoute as A, RouteKind as B, TokenBucket as C, ConnectOutcome as D, resolveLimits as E, WriteFrame as F, WebSocketRouteResult as G, WebSocketRoute as H, ConnectContext as I, RecordedClose as J, InvalidWebSocketRequest as K, Connection as L, WebSocketCallOptions as M, WebSocketCore as N, ConnectRequest as O, WebSocketCoreOptions as P, TestConnectRequest as Q, DisconnectContext as R, ResolvedWebSocketLimits as S, WebSocketLimits as T, WebSocketRouteBuilder as U, TestCallOverrides as V, WebSocketRouteRequest as W, RecordedSend as X, RecordedMessage as Y, RecordingSink as Z, DEFAULT_WEBSOCKET_LIMITS as _, WebSocketSink as _t, WebSocketSinkDriver as a, WebSocketDataHasDiscriminator as at, MemoryLimitStore as b, WebSocketServerOptions as c, WebSocketMessageDeclaresDiscriminator as ct, MemoryTransport as d, MessageAction as dt, TestDisconnectRequest as et, RedisTransport as f, MessageData as ft, transportFromConnectionString as g, WebSocketPublisher as gt, WebSocketTransport as h, WebSocketMessages as ht, UnregisteredWebSocketScheme as i, WebSocketTestSurface as it, MessageOutcome as j, DisconnectOutcome as k, WebSocketSurfaceServer as l, WebSocketMessageNotAnObject as lt, UnsupportedWebSocketTransport as m, UnknownWebSocketMessage as mt, WebSocketApi as n, TestMessageResponse as nt, registerWebSocketSinkDriver as o, WebSocketDataNotAnObject as ot, TransportSink as p, NoMessages as pt, RecordedBroadcast as q, WebSocketApiConfig as r, TestWebSocketPublisher as rt, CLOSE as s, WebSocketFrame as st, InvalidReplicaCount as t, TestMessageRequest as tt, Delivery as u, InvalidWebSocketMessage as ut, InvalidWebSocketLimit as v, WebSocketLimitStore as w, RedisLimitStore as x, LIMIT_CLOSE as y, MessageContext as z };
|
|
1201
|
-
//# sourceMappingURL=websocket-api-
|
|
1201
|
+
//# sourceMappingURL=websocket-api-CvnPDSZB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-api-
|
|
1
|
+
{"version":3,"file":"websocket-api-CvnPDSZB.d.mts","names":[],"sources":["../src/websocket/publisher.ts","../src/websocket/frame.ts","../src/websocket/testing.ts","../src/websocket/route.ts","../src/websocket/core.ts","../src/websocket/limits.ts","../src/websocket/transport.ts","../src/websocket/server.ts","../src/websocket/drivers.ts","../src/websocket-api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAYiB;EAChB,KAAK,wBAAwB,kBAAkB;;EAE/C,UAAU,iBAAiB,6BAA6B;EACxD,MAAM,wBAAwB,cAAc,iBAAiB;;;;;KAMlD,oBAAoB,eAAe;;KAGnC,aAAa;;KAGb,cAAc,kBAAkB,4BACrC,4CAGE;;KAG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