@ericminassian/platform-core 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/api.d.ts +942 -45
  2. package/dist/api.js +372 -13
  3. package/dist/api.js.map +1 -1
  4. package/dist/auth.js +5 -2
  5. package/dist/auth.js.map +1 -1
  6. package/dist/base64url.d.ts +3 -0
  7. package/dist/base64url.js +15 -0
  8. package/dist/base64url.js.map +1 -0
  9. package/dist/bindings.d.ts +62 -12
  10. package/dist/bindings.js +1 -1
  11. package/dist/bindings.js.map +1 -1
  12. package/dist/cloudfront-function.d.ts +5 -1
  13. package/dist/cloudfront-function.js +64 -2
  14. package/dist/cloudfront-function.js.map +1 -1
  15. package/dist/compute.d.ts +52 -0
  16. package/dist/compute.js +65 -0
  17. package/dist/compute.js.map +1 -0
  18. package/dist/config.d.ts +18 -0
  19. package/dist/config.js +9 -0
  20. package/dist/config.js.map +1 -1
  21. package/dist/constants.d.ts +56 -1
  22. package/dist/constants.js +56 -1
  23. package/dist/constants.js.map +1 -1
  24. package/dist/email.d.ts +84 -0
  25. package/dist/email.js +111 -0
  26. package/dist/email.js.map +1 -0
  27. package/dist/fingerprint.d.ts +9 -0
  28. package/dist/fingerprint.js +19 -0
  29. package/dist/fingerprint.js.map +1 -0
  30. package/dist/index.d.ts +6 -0
  31. package/dist/index.js +6 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/jobs.d.ts +111 -0
  34. package/dist/jobs.js +214 -0
  35. package/dist/jobs.js.map +1 -0
  36. package/dist/manifest.d.ts +270 -29
  37. package/dist/manifest.js +190 -22
  38. package/dist/manifest.js.map +1 -1
  39. package/dist/naming.d.ts +83 -7
  40. package/dist/naming.js +89 -8
  41. package/dist/naming.js.map +1 -1
  42. package/dist/platform-api.d.ts +3733 -1278
  43. package/dist/platform-api.js +120 -8
  44. package/dist/platform-api.js.map +1 -1
  45. package/dist/realtime.d.ts +139 -0
  46. package/dist/realtime.js +201 -0
  47. package/dist/realtime.js.map +1 -0
  48. package/dist/router/decide.d.ts +2 -0
  49. package/dist/router/decide.js +38 -6
  50. package/dist/router.d.ts +35 -13
  51. package/dist/router.js +36 -0
  52. package/dist/router.js.map +1 -1
  53. package/dist/runtime-config.d.ts +57 -0
  54. package/dist/runtime-config.js +12 -0
  55. package/dist/runtime-config.js.map +1 -1
  56. package/dist/storage.d.ts +55 -0
  57. package/dist/storage.js +112 -0
  58. package/dist/storage.js.map +1 -0
  59. package/dist/telemetry.d.ts +124 -19
  60. package/dist/telemetry.js +97 -21
  61. package/dist/telemetry.js.map +1 -1
  62. package/dist/web-compute.d.ts +191 -0
  63. package/dist/web-compute.js +257 -0
  64. package/dist/web-compute.js.map +1 -0
  65. package/package.json +19 -7
  66. package/src/api.ts +445 -15
  67. package/src/auth.ts +6 -2
  68. package/src/base64url.ts +13 -0
  69. package/src/bindings.ts +67 -6
  70. package/src/cloudfront-function.ts +64 -2
  71. package/src/compute.ts +86 -0
  72. package/src/config.ts +31 -1
  73. package/src/constants.ts +64 -1
  74. package/src/email.ts +168 -0
  75. package/src/fingerprint.ts +20 -0
  76. package/src/index.ts +6 -0
  77. package/src/jobs.ts +281 -0
  78. package/src/manifest.ts +415 -45
  79. package/src/naming.ts +93 -9
  80. package/src/platform-api.ts +134 -8
  81. package/src/realtime.ts +298 -0
  82. package/src/router/decide.d.ts +2 -0
  83. package/src/router/decide.js +38 -6
  84. package/src/router.ts +33 -13
  85. package/src/runtime-config.ts +70 -0
  86. package/src/storage.ts +120 -0
  87. package/src/telemetry.ts +104 -21
  88. package/src/web-compute.ts +342 -0
package/dist/manifest.js CHANGED
@@ -1,6 +1,11 @@
1
1
  import { Effect, Schema } from 'effect';
2
+ import { FARGATE_CPUS, fargateSizeIssue } from './compute.js';
2
3
  import { validateCron } from './cron.js';
3
- import { APP_NAME_PATTERN, ENV_NAME_PATTERN, EVENT_TYPE_PATTERN, RESOURCE_KEY_PATTERN } from './naming.js';
4
+ import { EMAIL_DEFAULT_DAILY_LIMIT, EMAIL_NAME_MESSAGE, EMAIL_NAME_PATTERN } from './email.js';
5
+ import { DEFAULT_ATTEMPTS, MAX_ATTEMPTS } from './jobs.js';
6
+ import { APP_NAME_PATTERN, ENV_NAME_PATTERN, EVENT_TYPE_PATTERN, names, RESOURCE_KEY_PATTERN, } from './naming.js';
7
+ import { CHANNEL_DECLARATION_PATTERN, CHANNEL_MESSAGE, realtimeIssues } from './realtime.js';
8
+ import { WEB_COMPUTE_SETTINGS, WEB_REQUEST_MEMORY_MB } from './web-compute.js';
4
9
  /**
5
10
  * The app's config file, at the app root. `plat` evaluates it and sends the
6
11
  * result to the platform as JSON; the control plane never runs app code.
@@ -39,26 +44,79 @@ const WebSchema = Schema.Struct({
39
44
  serverRoutes: Schema.Array(Schema.String.check(Schema.isStartingWith('/'))).pipe(orElse(['/api/'])),
40
45
  timeoutSeconds: intBetween(3, 900).pipe(orElse(30)),
41
46
  concurrency: intBetween(1, 128).pipe(orElse(64)),
47
+ compute: Schema.Literals(WEB_COMPUTE_SETTINGS).pipe(orElse('auto')),
48
+ memoryMb: intBetween(128, 10240).pipe(orElse(WEB_REQUEST_MEMORY_MB)),
49
+ maxEnvironments: Schema.optional(intBetween(2, 10000)),
42
50
  }).check(Schema.makeFilter((w) => w.server || w.static ? undefined : 'web needs a server, a static directory, or both'));
51
+ const WORKER_TIMEOUT_SECONDS = 60;
52
+ const WORKER_MEMORY_MB = 512;
53
+ const timeoutSeconds = intBetween(1, 900);
54
+ const memoryMb = intBetween(128, 10240);
43
55
  const WorkerSchema = Schema.Struct({
44
56
  entry: Schema.String.pipe(orElse('src/worker.ts')),
45
- timeoutSeconds: intBetween(1, 900).pipe(orElse(60)),
46
- memoryMb: intBetween(128, 10240).pipe(orElse(512)),
57
+ timeoutSeconds: timeoutSeconds.pipe(orElse(WORKER_TIMEOUT_SECONDS)),
58
+ memoryMb: memoryMb.pipe(orElse(WORKER_MEMORY_MB)),
47
59
  });
60
+ /** A queue, event or cron handler's own settings; unset ones are the worker's. */
61
+ const HandlerFields = {
62
+ timeoutSeconds: Schema.optional(timeoutSeconds),
63
+ memoryMb: Schema.optional(memoryMb),
64
+ };
65
+ const attempts = intBetween(1, MAX_ATTEMPTS);
66
+ /** An event handler's settings. Unset attempts are `DEFAULT_ATTEMPTS.event`. */
67
+ const HandlerSchema = Schema.Struct({ ...HandlerFields, maxAttempts: Schema.optional(attempts) });
68
+ const QueueFields = {
69
+ maxAttempts: attempts.pipe(orElse(DEFAULT_ATTEMPTS.queue)),
70
+ concurrency: Schema.optional(intBetween(1, 1000)),
71
+ ...HandlerFields,
72
+ };
73
+ /** A field that was removed: present at all, it fails with `message`. */
74
+ const removed = (message) => Schema.optional(Schema.Unknown.check(Schema.makeFilter(() => message)));
75
+ // Queues were SQS queues polled by Lambda until 0.4.0; these settings had no meaning after.
48
76
  const QueueSchema = Schema.Struct({
49
- batchSize: intBetween(1, 10).pipe(orElse(10)),
50
- visibilityTimeoutSeconds: Schema.optional(intBetween(0, 43200)),
51
- maxReceiveCount: intBetween(1, 1000).pipe(orElse(5)),
52
- concurrency: Schema.optional(intBetween(2, 1000)),
77
+ ...QueueFields,
78
+ batchSize: removed('removed in 0.4.0: a queue delivers one message per run'),
79
+ visibilityTimeoutSeconds: removed("removed in 0.4.0: a run has its handler's timeoutSeconds"),
80
+ maxReceiveCount: removed('renamed to maxAttempts in 0.4.0'),
53
81
  });
54
- const CronSchema = Schema.Union([
55
- Schema.String,
56
- Schema.Struct({ schedule: Schema.String, timezone: Schema.optional(Schema.String) }),
57
- ]).check(Schema.makeFilter((cron) => validateCron(typeof cron === 'string' ? cron : cron.schedule) ?? undefined));
82
+ const CronScheduleSchema = Schema.Struct({
83
+ schedule: Schema.String,
84
+ timezone: Schema.optional(Schema.String),
85
+ maxAttempts: Schema.optional(attempts),
86
+ ...HandlerFields,
87
+ });
88
+ const CronSchema = Schema.Union([Schema.String, CronScheduleSchema]).check(Schema.makeFilter((cron) => validateCron(typeof cron === 'string' ? cron : cron.schedule) ?? undefined));
58
89
  const AuthSchema = Schema.Union([
59
90
  Schema.Boolean,
60
91
  Schema.Struct({ required: Schema.Boolean.pipe(orElse(false)) }),
61
92
  ]);
93
+ const StoreSchema = Schema.Struct({
94
+ public: Schema.Boolean.pipe(orElse(false)),
95
+ expireAfterDays: Schema.optional(intBetween(1, 3650)),
96
+ });
97
+ const ServiceSchema = Schema.Struct({
98
+ entry: Schema.String,
99
+ cpu: Schema.Literals(FARGATE_CPUS).pipe(orElse(0.25)),
100
+ memoryMb: Schema.Int.pipe(orElse(512)),
101
+ spot: Schema.Boolean.pipe(orElse(true)),
102
+ previewMinutes: intBetween(0, 1440).pipe(orElse(30)),
103
+ }).check(Schema.makeFilter((s) => {
104
+ const issue = fargateSizeIssue(s.cpu, s.memoryMb);
105
+ return issue ? [{ path: ['memoryMb'], issue }] : undefined;
106
+ }));
107
+ const RealtimeSubscribeSchema = Schema.Literals(['public', 'signed-in']);
108
+ const EmailSchema = Schema.Union([
109
+ Schema.Boolean,
110
+ Schema.Struct({
111
+ name: Schema.optional(Schema.String.check(Schema.isPattern(EMAIL_NAME_PATTERN, { message: EMAIL_NAME_MESSAGE }))),
112
+ // The platform's ceiling (`limits.emailsPerDay`) is checked when a deployment is created.
113
+ dailyLimit: Schema.optional(intBetween(1, 1_000_000)),
114
+ }),
115
+ ]);
116
+ const RealtimeSchema = Schema.Struct({
117
+ subscribe: RealtimeSubscribeSchema.pipe(orElse('public')),
118
+ channels: recordOf(CHANNEL_DECLARATION_PATTERN, Schema.Struct({}), CHANNEL_MESSAGE),
119
+ });
62
120
  export const ManifestSchema = Schema.Struct({
63
121
  // Reserved names are enforced when an app is registered (API), not here:
64
122
  // the control plane itself is the app named `platform`.
@@ -71,12 +129,29 @@ export const ManifestSchema = Schema.Struct({
71
129
  queues: recordOf(RESOURCE_KEY_PATTERN, QueueSchema, RESOURCE_KEY_MESSAGE).pipe(orElse({})),
72
130
  // The array form predates typed event payloads; deployments recorded
73
131
  // before then still store it.
74
- events: Schema.Union([Schema.Array(eventType), recordOf(EVENT_TYPE_PATTERN, Schema.Struct({}))]).pipe(orElse([])),
132
+ events: Schema.Union([Schema.Array(eventType), recordOf(EVENT_TYPE_PATTERN, HandlerSchema)]).pipe(orElse([])),
75
133
  crons: recordOf(RESOURCE_KEY_PATTERN, CronSchema, RESOURCE_KEY_MESSAGE).pipe(orElse({})),
76
- storage: Schema.Array(resourceKey).pipe(orElse([])),
134
+ // The array form (every store private, kept forever) is still accepted.
135
+ storage: Schema.Union([
136
+ Schema.Array(resourceKey),
137
+ recordOf(RESOURCE_KEY_PATTERN, StoreSchema, RESOURCE_KEY_MESSAGE),
138
+ ]).pipe(orElse([])),
77
139
  secrets: Schema.Array(envName).pipe(orElse([])),
78
140
  env: recordOf(ENV_NAME_PATTERN, Schema.String).pipe(orElse({})),
79
- });
141
+ realtime: Schema.optional(RealtimeSchema),
142
+ email: EmailSchema.pipe(orElse(false)),
143
+ services: recordOf(RESOURCE_KEY_PATTERN, ServiceSchema, RESOURCE_KEY_MESSAGE).pipe(orElse({})),
144
+ }).check(Schema.makeFilter((m) => {
145
+ if (!m.realtime)
146
+ return undefined;
147
+ const issues = realtimeIssues({
148
+ subscribe: m.realtime.subscribe,
149
+ channels: Object.keys(m.realtime.channels),
150
+ auth: m.auth !== false,
151
+ server: Boolean(m.web?.server),
152
+ });
153
+ return issues.map((i) => ({ path: ['realtime', ...i.path], issue: i.message }));
154
+ }));
80
155
  /**
81
156
  * The default export of `plat.config.ts`. Returns the config unchanged with
82
157
  * its literal names, which `Register` hands to the SDK so queue, event, cron,
@@ -85,12 +160,16 @@ export const ManifestSchema = Schema.Struct({
85
160
  export function defineApp(config) {
86
161
  return config;
87
162
  }
88
- /** A queue whose messages are `Body`: `queues: { emails: queue<EmailJob>({ batchSize: 5 }) }`. */
163
+ /** A queue whose messages are `Body`: `queues: { emails: queue<EmailJob>({ maxAttempts: 3 }) }`. */
89
164
  export function queue(options = {}) {
90
165
  return options;
91
166
  }
92
167
  /** An event subscription whose detail is `Detail`: `events: { 'todo.created': event<TodoCreated>() }`. */
93
- export function event() {
168
+ export function event(options = {}) {
169
+ return options;
170
+ }
171
+ /** A realtime channel whose events are `Event`: `realtime: { channels: { board: channel<BoardEvent>() } }`. */
172
+ export function channel() {
94
173
  return {};
95
174
  }
96
175
  // ---------------------------------------------------------------------------
@@ -107,12 +186,31 @@ export const ResolvedManifest = Schema.Struct({
107
186
  worker: Schema.optional(WorkerSchema),
108
187
  auth: Schema.Struct({ enabled: Schema.Boolean, required: Schema.Boolean }),
109
188
  db: Schema.Boolean,
110
- queues: Schema.Record(Schema.String, Schema.Struct({ ...QueueSchema.fields, visibilityTimeoutSeconds: Schema.Finite })),
189
+ queues: Schema.Record(Schema.String, Schema.Struct(QueueFields)),
111
190
  events: Schema.Array(Schema.String),
112
- crons: Schema.Record(Schema.String, Schema.Struct({ schedule: Schema.String, timezone: Schema.optional(Schema.String) })),
191
+ /**
192
+ * Each event handler's own settings, by type. Absent from deployments
193
+ * recorded before handlers had any. A field of its own, so clients that
194
+ * know only `events` keep decoding manifests.
195
+ */
196
+ eventOptions: Schema.Record(Schema.String, HandlerSchema).pipe(orElse({})),
197
+ crons: Schema.Record(Schema.String, CronScheduleSchema),
198
+ /** Every store's name. */
113
199
  storage: Schema.Array(Schema.String),
200
+ /**
201
+ * Each store's options, by name. Absent from deployments recorded before
202
+ * stores had any: those stores are private and kept until deleted. A field
203
+ * of its own, so clients that know only `storage` keep decoding manifests.
204
+ */
205
+ storageOptions: Schema.Record(Schema.String, Schema.Struct({ public: Schema.Boolean, expireAfterDays: Schema.optional(Schema.Finite) })).pipe(orElse({})),
114
206
  secrets: Schema.Array(Schema.String),
115
207
  env: Schema.Record(Schema.String, Schema.String),
208
+ /** Present when the stage has a channel namespace. `channels` are the declared patterns. */
209
+ realtime: Schema.optional(Schema.Struct({ subscribe: RealtimeSubscribeSchema, channels: Schema.Array(Schema.String) })),
210
+ /** Present when the stage sends email. `dailyLimit` is the declared one (prod's). */
211
+ email: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String), dailyLimit: Schema.Finite })),
212
+ /** Long-running services, with defaults applied. */
213
+ services: Schema.Record(Schema.String, ServiceSchema).pipe(orElse({})),
116
214
  });
117
215
  export class ManifestError extends Error {
118
216
  issues;
@@ -136,17 +234,35 @@ export function parseManifest(input) {
136
234
  return resolveManifest(result.value);
137
235
  }
138
236
  export function resolveManifest(m) {
139
- const events = Array.isArray(m.events) ? m.events : Object.keys(m.events);
237
+ const eventOptions = isEventList(m.events)
238
+ ? Object.fromEntries(m.events.map((type) => [type, {}]))
239
+ : m.events;
240
+ const events = Object.keys(eventOptions);
140
241
  const needsWorker = Object.keys(m.queues).length > 0 || events.length > 0 || Object.keys(m.crons).length > 0;
141
242
  const worker = m.worker ?? (needsWorker ? Schema.decodeUnknownSync(WorkerSchema)({}) : undefined);
142
243
  const auth = typeof m.auth === 'boolean'
143
244
  ? { enabled: m.auth, required: false }
144
245
  : { enabled: true, required: m.auth.required };
246
+ // Validation refused the removed queue settings, so only the current ones remain.
145
247
  const queues = Object.fromEntries(Object.entries(m.queues).map(([key, q]) => [
146
248
  key,
147
- { ...q, visibilityTimeoutSeconds: q.visibilityTimeoutSeconds ?? (worker?.timeoutSeconds ?? 60) * 6 },
249
+ {
250
+ maxAttempts: q.maxAttempts,
251
+ ...(q.concurrency !== undefined ? { concurrency: q.concurrency } : {}),
252
+ ...(q.timeoutSeconds !== undefined ? { timeoutSeconds: q.timeoutSeconds } : {}),
253
+ ...(q.memoryMb !== undefined ? { memoryMb: q.memoryMb } : {}),
254
+ },
148
255
  ]));
256
+ const email = m.email === false
257
+ ? undefined
258
+ : {
259
+ ...(m.email !== true && m.email.name ? { name: m.email.name } : {}),
260
+ dailyLimit: (m.email !== true && m.email.dailyLimit) || EMAIL_DEFAULT_DAILY_LIMIT,
261
+ };
149
262
  const crons = Object.fromEntries(Object.entries(m.crons).map(([key, c]) => [key, typeof c === 'string' ? { schedule: c } : c]));
263
+ const stores = isStoreList(m.storage)
264
+ ? Object.fromEntries(m.storage.map((name) => [name, { public: false }]))
265
+ : m.storage;
150
266
  return {
151
267
  name: m.name,
152
268
  ...(m.description ? { description: m.description } : {}),
@@ -155,11 +271,63 @@ export function resolveManifest(m) {
155
271
  auth,
156
272
  db: m.db,
157
273
  queues,
158
- events: [...new Set(events)],
274
+ events,
275
+ eventOptions,
159
276
  crons,
160
- storage: [...new Set(m.storage)],
277
+ storage: Object.keys(stores),
278
+ storageOptions: stores,
161
279
  secrets: [...new Set(m.secrets)],
162
280
  env: m.env,
281
+ ...(m.realtime
282
+ ? { realtime: { subscribe: m.realtime.subscribe, channels: Object.keys(m.realtime.channels) } }
283
+ : {}),
284
+ ...(email ? { email } : {}),
285
+ services: m.services,
163
286
  };
164
287
  }
288
+ const isStoreList = (storage) => Array.isArray(storage);
289
+ const isEventList = (events) => Array.isArray(events);
290
+ /** The stores the edge serves (`public: true`). */
291
+ export function publicStores(m) {
292
+ return m.storage.filter((name) => m.storageOptions[name]?.public === true);
293
+ }
294
+ // ---------------------------------------------------------------------------
295
+ // Worker functions
296
+ const HANDLER_KINDS = ['queue', 'event', 'cron'];
297
+ /** Each kind's handlers, by name, with what they set. */
298
+ const declaredHandlers = (m) => ({
299
+ queue: m.queues,
300
+ event: m.eventOptions,
301
+ cron: m.crons,
302
+ });
303
+ /** A handler's settings: its own, and the worker's for any it doesn't set. */
304
+ export function handlerSettings(m, kind, name) {
305
+ const own = declaredHandlers(m)[kind][name] ?? {};
306
+ // Reserved concurrency is per function, so a queue that caps it needs one to itself.
307
+ const concurrency = kind === 'queue' ? own.concurrency : undefined;
308
+ return {
309
+ kind,
310
+ name,
311
+ timeoutSeconds: own.timeoutSeconds ?? m.worker?.timeoutSeconds ?? WORKER_TIMEOUT_SECONDS,
312
+ memoryMb: own.memoryMb ?? m.worker?.memoryMb ?? WORKER_MEMORY_MB,
313
+ maxAttempts: own.maxAttempts ?? DEFAULT_ATTEMPTS[kind],
314
+ ...(concurrency !== undefined ? { concurrency } : {}),
315
+ own: own.timeoutSeconds !== undefined || own.memoryMb !== undefined || concurrency !== undefined,
316
+ };
317
+ }
318
+ /** Every queue, event and cron handler with its settings. */
319
+ export function workerHandlers(m) {
320
+ const declared = declaredHandlers(m);
321
+ return HANDLER_KINDS.flatMap((kind) => Object.keys(declared[kind]).map((name) => handlerSettings(m, kind, name)));
322
+ }
323
+ /** The handlers that run in functions of their own. The worker's function runs the rest. */
324
+ export function ownFunctionHandlers(m) {
325
+ return workerHandlers(m).filter((h) => h.own);
326
+ }
327
+ /** The Lambda function a handler runs in: its own, or the worker's. */
328
+ export function handlerFunctionName(app, stage, m, kind, name) {
329
+ return handlerSettings(m, kind, name).own
330
+ ? names.handlerFunction(app, stage, kind, name)
331
+ : names.workerFunction(app, stage);
332
+ }
165
333
  //# sourceMappingURL=manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3G;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GAAG,yCAAyC,CAAC;AACvE,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CACrC,MAAM,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAC1E,CAAC;AACF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,C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KAAK,CAAC,CAAC;AACvC,CAAC"}
package/dist/naming.d.ts CHANGED
@@ -35,24 +35,66 @@ export declare function parseStageHost(host: string, domain: string): {
35
35
  export declare const names: {
36
36
  readonly base: (app: string, stage: string) => string;
37
37
  readonly table: (app: string, stage: string) => string;
38
+ /** The server's Lambda Web Function (instance mode). */
38
39
  readonly webFunction: (app: string, stage: string) => string;
39
40
  /**
40
- * The Web Function's two endpoints, each pinned to one revision. Neither
41
- * name means "current": a deploy uses whichever the live route doesn't
42
- * (`live` predates the second one).
41
+ * The server's Lambda function in request mode. Not a worker function,
42
+ * though it shares their `<app>--<stage>--` prefix: a handler's own
43
+ * function is `…--worker--…`, or a cut of that ending in `-<hash>`.
44
+ */
45
+ readonly requestFunction: (app: string, stage: string) => string;
46
+ /**
47
+ * The Web Function's two endpoints, and the request-mode function's two
48
+ * aliases (each with a function URL), each pinned to one revision or
49
+ * version. Neither name means "current": a deploy uses whichever the live
50
+ * route doesn't (`live` predates the second one).
43
51
  */
44
52
  readonly webEndpoints: () => readonly ['live', 'live-b'];
45
53
  readonly workerFunction: (app: string, stage: string) => string;
54
+ /**
55
+ * The function a queue, event or cron handler with its own memory or timeout
56
+ * runs in, from the worker's bundle. Function names are ≤ 64 chars of
57
+ * A-Z, a-z, 0-9, `-` and `_`: long names are hashed, and an event type's
58
+ * `.` becomes `_` (which no event type contains). `:` has no such stand-in,
59
+ * so a type with one always carries a hash of the type.
60
+ */
61
+ readonly handlerFunction: (app: string, stage: string, kind: 'queue' | 'event' | 'cron', name: string) => string;
46
62
  /** IAM role name; created under {@link IAM_APP_PATH}. */
47
63
  readonly role: (app: string, stage: string) => string;
48
- readonly queue: (app: string, stage: string, key: string) => string;
49
- readonly deadLetterQueue: (app: string, stage: string, key: string) => string;
64
+ /**
65
+ * The stage's dead-letter queue (SQS, never polled): every job that failed
66
+ * its last attempt. Queue keys can't contain `--` and the old dead-letter
67
+ * queues end in `--dlq`, so this can't be a pre-0.4.0 queue's name.
68
+ */
69
+ readonly deadLetters: (app: string, stage: string) => string;
70
+ /** The SQS queue `plat dev` points the stage's event rules at, to run events in the local worker. */
71
+ readonly devEventTap: (app: string, stage: string) => string;
72
+ /** A queue's SQS queue and its dead-letter queue, before queues were pushed (0.4.0). */
73
+ readonly legacyQueue: (app: string, stage: string, key: string) => string;
74
+ readonly legacyDeadLetterQueue: (app: string, stage: string, key: string) => string;
50
75
  readonly eventBus: (app: string, stage: string) => string;
51
76
  /** EventBridge rule names are ≤ 64 chars; long event types are hashed. */
52
77
  readonly eventRule: (app: string, stage: string, eventType: string) => string;
53
78
  readonly scheduleGroup: (app: string, stage: string) => string;
54
79
  readonly schedule: (cronKey: string) => string;
80
+ /**
81
+ * A long-running service's ECS service and task definition family (ECS
82
+ * names are their own namespace, so `worker` can't clash with the Lambda).
83
+ */
84
+ readonly service: (app: string, stage: string, key: string) => string;
85
+ readonly serviceLogGroup: (app: string, stage: string, key: string) => string;
86
+ /** Tag of a service's image for one deployment in the container repository (≤ 103 of ECR's 128 chars). */
87
+ readonly serviceImageTag: (app: string, stage: string, key: string, deploymentId: string) => string;
88
+ /**
89
+ * One-shot schedule, in the stage's schedule group, that stops a preview's
90
+ * service. Cron keys can't contain `--`, so it never clashes with a cron.
91
+ */
92
+ readonly serviceStopSchedule: (key: string) => string;
55
93
  readonly userPoolClient: (app: string, stage: string) => string;
94
+ /** SES tenant and its configuration set (≤ 64 chars each; the base is ≤ 52). */
95
+ readonly emailTenant: (app: string, stage: string) => string;
96
+ /** AppSync Events channel namespace; names are ≤ 50 chars, so long ones are hashed. */
97
+ readonly realtimeNamespace: (app: string, stage: string) => string;
56
98
  /**
57
99
  * A stage's log groups. Lambda also writes a Web Function's environments to
58
100
  * `<web group>.local`, so the engine creates that one too.
@@ -63,8 +105,10 @@ export declare const names: {
63
105
  readonly sharedSecretsPath: (app: string) => string;
64
106
  /** SSM SecureString holding the stage key (see `Bindings.stageKey`); outside the secrets path. */
65
107
  readonly stageKeyParameter: (app: string, stage: string) => string;
66
- /** Prefix inside the shared storage bucket: `<app>/<stage>/<bucket>/`. */
67
- readonly storagePrefix: (app: string, stage: string, bucket?: string) => string;
108
+ /** A private store's prefix in the shared storage bucket: `<app>/<stage>/<store>/`. */
109
+ readonly storagePrefix: (app: string, stage: string, store?: string) => string;
110
+ /** A public store's prefix in the shared storage bucket: `_public/<app>/<stage>/<store>/` (see `storage.ts`). */
111
+ readonly publicStoragePrefix: (app: string, stage: string, store?: string) => string;
68
112
  /** Prefix inside the shared sites bucket for one deployment's static files. */
69
113
  readonly sitePrefix: (app: string, stage: string, deploymentId: string) => string;
70
114
  readonly artifactKey: (app: string, stage: string, deploymentId: string, file: string) => string;
@@ -82,9 +126,41 @@ export declare const platformNames: {
82
126
  readonly routerFunction: 'platform-router';
83
127
  readonly userPool: 'platform-users';
84
128
  readonly boundaryPolicy: 'platform-app-boundary';
129
+ /** The AppSync Event API every stage's channel namespace lives in. */
130
+ readonly realtimeApi: 'platform-realtime';
131
+ /** Its Lambda authorizer (signed-in subscribe tokens). */
132
+ readonly realtimeAuthorizer: 'platform-realtime-authorizer';
133
+ /** ECS cluster every stage's containers run in (long-running services). */
134
+ readonly containerCluster: 'platform';
135
+ /** VPC and security group containers run in: public subnets, no NAT, egress only. */
136
+ readonly containerNetwork: 'platform-containers';
137
+ /** ECR repository of every container image the platform builds; tags name app, stage and deployment. */
138
+ readonly containerRepository: 'platform-containers';
139
+ /** Role ECS uses to pull images and ship container logs (the app's code runs as its stage role). */
140
+ readonly containerExecutionRole: 'platform-container-execution';
141
+ /** Role EventBridge Scheduler uses to scale containers (a preview's stop schedule). */
142
+ readonly containerSchedulerRole: 'platform-container-scheduler';
143
+ /** Description of the API's subscribe-only key for `public` stages (how the control plane finds it). */
144
+ readonly realtimePublicKey: 'platform-public-subscribe';
145
+ /** The control plane's own app name (services/control-plane/plat.config.ts), stage prod. */
146
+ readonly controlPlaneApp: 'platform';
85
147
  readonly controlPlaneRole: 'platform-control-plane';
86
148
  readonly ciRole: 'platform-ci';
87
149
  readonly alertsTopic: 'platform-alerts';
150
+ /**
151
+ * The edge floor's AWS WAF web ACL, which the control plane creates and attaches to the router
152
+ * while the floor is on; also its CloudWatch metric name. Not `platform-edge`, the always-on web
153
+ * ACL the foundation stack used to own: the stack deletes that one only after updating the
154
+ * distribution, so the two names can't collide while it goes.
155
+ */
156
+ readonly edgeWebAcl: 'platform-edge-floor';
157
+ /** Its rate-based rule, and that rule's metric name. */
158
+ readonly edgeFloorRule: 'requests-per-client';
159
+ /**
160
+ * The CloudWatch alarm on the router's requests per minute (`limits.edgeFloorAt`) that turns the
161
+ * floor on, and the EventBridge rule that tells the control plane when it goes off.
162
+ */
163
+ readonly edgeFloorAlarm: 'platform-edge-floor';
88
164
  readonly runtimeConfigParameter: '/platform/config/runtime';
89
165
  readonly sessionKeyParameter: '/platform/config/session-key';
90
166
  readonly githubAppParameterPrefix: '/platform/config/github-app/';
package/dist/naming.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PROD_STAGE } from './constants.js';
2
- import { fingerprint } from './telemetry.js';
2
+ import { fingerprint } from './fingerprint.js';
3
+ import { PUBLIC_STORAGE_ROOT } from './storage.js';
3
4
  /**
4
5
  * App names: 3-30 chars, lowercase letters/digits/single hyphens, starting with
5
6
  * a letter. `--` is reserved as the app/stage separator in hostnames and
@@ -84,24 +85,70 @@ export function parseStageHost(host, domain) {
84
85
  export const names = {
85
86
  base: (app, stage) => `${app}--${stage}`,
86
87
  table: (app, stage) => `${app}--${stage}`,
88
+ /** The server's Lambda Web Function (instance mode). */
87
89
  webFunction: (app, stage) => `${app}--${stage}`,
88
90
  /**
89
- * The Web Function's two endpoints, each pinned to one revision. Neither
90
- * name means "current": a deploy uses whichever the live route doesn't
91
- * (`live` predates the second one).
91
+ * The server's Lambda function in request mode. Not a worker function,
92
+ * though it shares their `<app>--<stage>--` prefix: a handler's own
93
+ * function is `…--worker--…`, or a cut of that ending in `-<hash>`.
94
+ */
95
+ requestFunction: (app, stage) => `${app}--${stage}--web`,
96
+ /**
97
+ * The Web Function's two endpoints, and the request-mode function's two
98
+ * aliases (each with a function URL), each pinned to one revision or
99
+ * version. Neither name means "current": a deploy uses whichever the live
100
+ * route doesn't (`live` predates the second one).
92
101
  */
93
102
  webEndpoints: () => ['live', 'live-b'],
94
103
  workerFunction: (app, stage) => `${app}--${stage}--worker`,
104
+ /**
105
+ * The function a queue, event or cron handler with its own memory or timeout
106
+ * runs in, from the worker's bundle. Function names are ≤ 64 chars of
107
+ * A-Z, a-z, 0-9, `-` and `_`: long names are hashed, and an event type's
108
+ * `.` becomes `_` (which no event type contains). `:` has no such stand-in,
109
+ * so a type with one always carries a hash of the type.
110
+ */
111
+ handlerFunction: (app, stage, kind, name) => {
112
+ const full = `${app}--${stage}--worker--${kind}-${name}`;
113
+ const safe = full.replaceAll('.', '_').replaceAll(':', '_');
114
+ return name.includes(':') ? `${safe.slice(0, 55)}-${fingerprint([full])}` : fit(safe, 64);
115
+ },
95
116
  /** IAM role name; created under {@link IAM_APP_PATH}. */
96
117
  role: (app, stage) => `${app}--${stage}`,
97
- queue: (app, stage, key) => `${app}--${stage}--${key}`,
98
- deadLetterQueue: (app, stage, key) => `${app}--${stage}--${key}--dlq`,
118
+ /**
119
+ * The stage's dead-letter queue (SQS, never polled): every job that failed
120
+ * its last attempt. Queue keys can't contain `--` and the old dead-letter
121
+ * queues end in `--dlq`, so this can't be a pre-0.4.0 queue's name.
122
+ */
123
+ deadLetters: (app, stage) => `${app}--${stage}--jobs--dead`,
124
+ /** The SQS queue `plat dev` points the stage's event rules at, to run events in the local worker. */
125
+ devEventTap: (app, stage) => `${app}--${stage}--plat-dev-events`,
126
+ /** A queue's SQS queue and its dead-letter queue, before queues were pushed (0.4.0). */
127
+ legacyQueue: (app, stage, key) => `${app}--${stage}--${key}`,
128
+ legacyDeadLetterQueue: (app, stage, key) => `${app}--${stage}--${key}--dlq`,
99
129
  eventBus: (app, stage) => `${app}--${stage}`,
100
130
  /** EventBridge rule names are ≤ 64 chars; long event types are hashed. */
101
131
  eventRule: (app, stage, eventType) => fit(`${app}--${stage}--${eventType.replace(/[^A-Za-z0-9._-]/g, '_')}`, 64),
102
132
  scheduleGroup: (app, stage) => `${app}--${stage}`,
103
133
  schedule: (cronKey) => cronKey,
134
+ /**
135
+ * A long-running service's ECS service and task definition family (ECS
136
+ * names are their own namespace, so `worker` can't clash with the Lambda).
137
+ */
138
+ service: (app, stage, key) => `${app}--${stage}--${key}`,
139
+ serviceLogGroup: (app, stage, key) => `/platform/apps/${app}/${stage}/services/${key}`,
140
+ /** Tag of a service's image for one deployment in the container repository (≤ 103 of ECR's 128 chars). */
141
+ serviceImageTag: (app, stage, key, deploymentId) => `${app}--${stage}--${key}--${deploymentId}`,
142
+ /**
143
+ * One-shot schedule, in the stage's schedule group, that stops a preview's
144
+ * service. Cron keys can't contain `--`, so it never clashes with a cron.
145
+ */
146
+ serviceStopSchedule: (key) => `${key}--stop`,
104
147
  userPoolClient: (app, stage) => `${app}--${stage}`,
148
+ /** SES tenant and its configuration set (≤ 64 chars each; the base is ≤ 52). */
149
+ emailTenant: (app, stage) => `${app}--${stage}`,
150
+ /** AppSync Events channel namespace; names are ≤ 50 chars, so long ones are hashed. */
151
+ realtimeNamespace: (app, stage) => fit(`${app}--${stage}`, 50),
105
152
  /**
106
153
  * A stage's log groups. Lambda also writes a Web Function's environments to
107
154
  * `<web group>.local`, so the engine creates that one too.
@@ -112,8 +159,10 @@ export const names = {
112
159
  sharedSecretsPath: (app) => `/platform/apps/${app}/_shared/secrets/`,
113
160
  /** SSM SecureString holding the stage key (see `Bindings.stageKey`); outside the secrets path. */
114
161
  stageKeyParameter: (app, stage) => `/platform/apps/${app}/${stage}/stage-key`,
115
- /** Prefix inside the shared storage bucket: `<app>/<stage>/<bucket>/`. */
116
- storagePrefix: (app, stage, bucket) => bucket ? `${app}/${stage}/${bucket}/` : `${app}/${stage}/`,
162
+ /** A private store's prefix in the shared storage bucket: `<app>/<stage>/<store>/`. */
163
+ storagePrefix: (app, stage, store) => store ? `${app}/${stage}/${store}/` : `${app}/${stage}/`,
164
+ /** A public store's prefix in the shared storage bucket: `_public/<app>/<stage>/<store>/` (see `storage.ts`). */
165
+ publicStoragePrefix: (app, stage, store) => `${PUBLIC_STORAGE_ROOT}${names.storagePrefix(app, stage, store)}`,
117
166
  /** Prefix inside the shared sites bucket for one deployment's static files. */
118
167
  sitePrefix: (app, stage, deploymentId) => `${app}/${stage}/${deploymentId}`,
119
168
  artifactKey: (app, stage, deploymentId, file) => `${app}/${stage}/${deploymentId}/${file}`,
@@ -131,9 +180,41 @@ export const platformNames = {
131
180
  routerFunction: 'platform-router',
132
181
  userPool: 'platform-users',
133
182
  boundaryPolicy: 'platform-app-boundary',
183
+ /** The AppSync Event API every stage's channel namespace lives in. */
184
+ realtimeApi: 'platform-realtime',
185
+ /** Its Lambda authorizer (signed-in subscribe tokens). */
186
+ realtimeAuthorizer: 'platform-realtime-authorizer',
187
+ /** ECS cluster every stage's containers run in (long-running services). */
188
+ containerCluster: 'platform',
189
+ /** VPC and security group containers run in: public subnets, no NAT, egress only. */
190
+ containerNetwork: 'platform-containers',
191
+ /** ECR repository of every container image the platform builds; tags name app, stage and deployment. */
192
+ containerRepository: 'platform-containers',
193
+ /** Role ECS uses to pull images and ship container logs (the app's code runs as its stage role). */
194
+ containerExecutionRole: 'platform-container-execution',
195
+ /** Role EventBridge Scheduler uses to scale containers (a preview's stop schedule). */
196
+ containerSchedulerRole: 'platform-container-scheduler',
197
+ /** Description of the API's subscribe-only key for `public` stages (how the control plane finds it). */
198
+ realtimePublicKey: 'platform-public-subscribe',
199
+ /** The control plane's own app name (services/control-plane/plat.config.ts), stage prod. */
200
+ controlPlaneApp: 'platform',
134
201
  controlPlaneRole: 'platform-control-plane',
135
202
  ciRole: 'platform-ci',
136
203
  alertsTopic: 'platform-alerts',
204
+ /**
205
+ * The edge floor's AWS WAF web ACL, which the control plane creates and attaches to the router
206
+ * while the floor is on; also its CloudWatch metric name. Not `platform-edge`, the always-on web
207
+ * ACL the foundation stack used to own: the stack deletes that one only after updating the
208
+ * distribution, so the two names can't collide while it goes.
209
+ */
210
+ edgeWebAcl: 'platform-edge-floor',
211
+ /** Its rate-based rule, and that rule's metric name. */
212
+ edgeFloorRule: 'requests-per-client',
213
+ /**
214
+ * The CloudWatch alarm on the router's requests per minute (`limits.edgeFloorAt`) that turns the
215
+ * floor on, and the EventBridge rule that tells the control plane when it goes off.
216
+ */
217
+ edgeFloorAlarm: 'platform-edge-floor',
137
218
  runtimeConfigParameter: '/platform/config/runtime',
138
219
  sessionKeyParameter: '/platform/config/session-key',
139
220
  githubAppParameterPrefix: '/platform/config/github-app/',