@ericminassian/platform-core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +947 -209
- package/dist/api.js +335 -1
- package/dist/api.js.map +1 -1
- package/dist/auth.d.ts +19 -0
- package/dist/auth.js +29 -0
- package/dist/auth.js.map +1 -1
- package/dist/bindings.d.ts +8 -2
- package/dist/bindings.js.map +1 -1
- package/dist/cloudfront-function.js +6 -0
- package/dist/cloudfront-function.js.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +11 -0
- package/dist/constants.js.map +1 -1
- package/dist/manifest.d.ts +96 -92
- package/dist/manifest.js +96 -66
- package/dist/manifest.js.map +1 -1
- package/dist/naming.d.ts +13 -2
- package/dist/naming.js +12 -1
- package/dist/naming.js.map +1 -1
- package/dist/platform-api.d.ts +5337 -0
- package/dist/platform-api.js +343 -0
- package/dist/platform-api.js.map +1 -0
- package/dist/router/decide.d.ts +5 -1
- package/dist/router/decide.js +7 -2
- package/dist/router.d.ts +1 -1
- package/dist/telemetry.d.ts +236 -74
- package/dist/telemetry.js +97 -0
- package/dist/telemetry.js.map +1 -1
- package/package.json +10 -2
- package/src/api.ts +427 -231
- package/src/auth.ts +33 -0
- package/src/bindings.ts +8 -2
- package/src/cloudfront-function.ts +6 -0
- package/src/config.ts +3 -1
- package/src/constants.ts +12 -0
- package/src/manifest.ts +145 -87
- package/src/naming.ts +13 -2
- package/src/platform-api.ts +504 -0
- package/src/router/decide.d.ts +5 -1
- package/src/router/decide.js +7 -2
- package/src/router.ts +1 -1
- package/src/telemetry.ts +107 -85
package/dist/manifest.d.ts
CHANGED
|
@@ -1,76 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
2
|
/**
|
|
3
3
|
* The app's config file, at the app root. `plat` evaluates it and sends the
|
|
4
4
|
* result to the platform as JSON; the control plane never runs app code.
|
|
5
5
|
*/
|
|
6
6
|
export declare const APP_CONFIG_FILE = "plat.config.ts";
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
worker: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
entry: z.ZodDefault<z.ZodString>;
|
|
49
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
50
|
-
memoryMb: z.ZodDefault<z.ZodNumber>;
|
|
51
|
-
}, z.core.$strip>>;
|
|
52
|
-
auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
53
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
-
}, z.core.$strip>]>>;
|
|
55
|
-
db: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
queues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
57
|
-
batchSize: z.ZodDefault<z.ZodNumber>;
|
|
58
|
-
visibilityTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
maxReceiveCount: z.ZodDefault<z.ZodNumber>;
|
|
60
|
-
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
}, z.core.$strip>>>;
|
|
62
|
-
events: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodObject<{}, z.core.$strip>>]>>;
|
|
63
|
-
crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
64
|
-
schedule: z.ZodString;
|
|
65
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>]>>>;
|
|
67
|
-
storage: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
68
|
-
secrets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
69
|
-
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
70
|
-
}, z.core.$strip>;
|
|
7
|
+
export declare const ManifestSchema: Schema.Struct<{
|
|
8
|
+
readonly name: Schema.String;
|
|
9
|
+
readonly description: Schema.optional<Schema.String>;
|
|
10
|
+
readonly web: Schema.optional<Schema.Struct<{
|
|
11
|
+
readonly server: Schema.optional<Schema.String>;
|
|
12
|
+
readonly static: Schema.optional<Schema.String>;
|
|
13
|
+
readonly build: Schema.optional<Schema.String>;
|
|
14
|
+
readonly dev: Schema.optional<Schema.Struct<{
|
|
15
|
+
readonly command: Schema.String;
|
|
16
|
+
readonly port: Schema.optional<Schema.Int>;
|
|
17
|
+
}>>;
|
|
18
|
+
readonly spa: Schema.withDecodingDefault<Schema.Boolean, never>;
|
|
19
|
+
readonly serverRoutes: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
|
|
20
|
+
readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
|
|
21
|
+
readonly concurrency: Schema.withDecodingDefault<Schema.Int, never>;
|
|
22
|
+
}>>;
|
|
23
|
+
readonly worker: Schema.optional<Schema.Struct<{
|
|
24
|
+
readonly entry: Schema.withDecodingDefault<Schema.String, never>;
|
|
25
|
+
readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
|
|
26
|
+
readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
|
|
27
|
+
}>>;
|
|
28
|
+
readonly auth: Schema.withDecodingDefault<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
29
|
+
readonly required: Schema.withDecodingDefault<Schema.Boolean, never>;
|
|
30
|
+
}>]>, never>;
|
|
31
|
+
readonly db: Schema.withDecodingDefault<Schema.Boolean, never>;
|
|
32
|
+
readonly queues: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
|
|
33
|
+
readonly batchSize: Schema.withDecodingDefault<Schema.Int, never>;
|
|
34
|
+
readonly visibilityTimeoutSeconds: Schema.optional<Schema.Int>;
|
|
35
|
+
readonly maxReceiveCount: Schema.withDecodingDefault<Schema.Int, never>;
|
|
36
|
+
readonly concurrency: Schema.optional<Schema.Int>;
|
|
37
|
+
}>>, never>;
|
|
38
|
+
readonly events: Schema.withDecodingDefault<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.$Record<Schema.String, Schema.Struct<{}>>]>, never>;
|
|
39
|
+
readonly crons: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
40
|
+
readonly schedule: Schema.String;
|
|
41
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
42
|
+
}>]>>, never>;
|
|
43
|
+
readonly storage: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
|
|
44
|
+
readonly secrets: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
|
|
45
|
+
readonly env: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.String>, never>;
|
|
46
|
+
}>;
|
|
71
47
|
/** The evaluated config as JSON: what the CLI sends and deployments store. */
|
|
72
|
-
export type ManifestInput =
|
|
73
|
-
export type Manifest =
|
|
48
|
+
export type ManifestInput = typeof ManifestSchema.Encoded;
|
|
49
|
+
export type Manifest = typeof ManifestSchema.Type;
|
|
74
50
|
/** Type-only marker for a queue's message body or an event's detail. Never set at runtime. */
|
|
75
51
|
declare const payloadType: unique symbol;
|
|
76
52
|
type Payload<T> = {
|
|
@@ -79,16 +55,20 @@ type Payload<T> = {
|
|
|
79
55
|
/** The message or detail type declared with `queue<T>()` / `event<T>()`; `unknown` if none. */
|
|
80
56
|
export type PayloadOf<D> = D extends Payload<infer T> ? (unknown extends T ? unknown : T) : unknown;
|
|
81
57
|
export interface WebConfig {
|
|
82
|
-
/** Entry module whose default export is
|
|
58
|
+
/** Entry module whose default export is `toFetchHandler(...)` from `@ericminassian/platform`. */
|
|
83
59
|
server?: string;
|
|
84
60
|
/** Directory of built static assets, served from the edge. */
|
|
85
61
|
static?: string;
|
|
86
62
|
/** Shell command that builds `static` (run by `plat build`). */
|
|
87
63
|
build?: string;
|
|
88
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Dev server for the frontend, proxied by `plat dev` (e.g. Vite). The command
|
|
66
|
+
* listens on the port `plat dev` passes in `PLATFORM_DEV_WEB_PORT` (and `PORT`):
|
|
67
|
+
* `port` when it is free, otherwise any free port.
|
|
68
|
+
*/
|
|
89
69
|
dev?: {
|
|
90
70
|
command: string;
|
|
91
|
-
port
|
|
71
|
+
port?: number;
|
|
92
72
|
};
|
|
93
73
|
/** Serve `index.html` for unknown non-file paths (client-side routing). Default `true`. */
|
|
94
74
|
spa?: boolean;
|
|
@@ -177,30 +157,54 @@ export declare function defineApp<const T extends AppConfig>(config: T & Exact<T
|
|
|
177
157
|
export declare function queue<Body>(options?: QueueConfig): QueueConfig<Body>;
|
|
178
158
|
/** An event subscription whose detail is `Detail`: `events: { 'todo.created': event<TodoCreated>() }`. */
|
|
179
159
|
export declare function event<Detail>(): EventConfig<Detail>;
|
|
180
|
-
/**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Manifest with defaults applied and derived fields normalized: what
|
|
162
|
+
* deployments store. Decoding fills defaults for fields added since a stored
|
|
163
|
+
* manifest was written, so earlier deployments keep decoding.
|
|
164
|
+
*/
|
|
165
|
+
export declare const ResolvedManifest: Schema.Struct<{
|
|
166
|
+
readonly name: Schema.String;
|
|
167
|
+
readonly description: Schema.optional<Schema.String>;
|
|
168
|
+
readonly web: Schema.optional<Schema.Struct<{
|
|
169
|
+
readonly server: Schema.optional<Schema.String>;
|
|
170
|
+
readonly static: Schema.optional<Schema.String>;
|
|
171
|
+
readonly build: Schema.optional<Schema.String>;
|
|
172
|
+
readonly dev: Schema.optional<Schema.Struct<{
|
|
173
|
+
readonly command: Schema.String;
|
|
174
|
+
readonly port: Schema.optional<Schema.Int>;
|
|
175
|
+
}>>;
|
|
176
|
+
readonly spa: Schema.withDecodingDefault<Schema.Boolean, never>;
|
|
177
|
+
readonly serverRoutes: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
|
|
178
|
+
readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
|
|
179
|
+
readonly concurrency: Schema.withDecodingDefault<Schema.Int, never>;
|
|
180
|
+
}>>;
|
|
185
181
|
/** Present when any queue, event subscription or cron exists. */
|
|
186
|
-
worker
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}>;
|
|
195
|
-
events: string[];
|
|
196
|
-
crons: Record<string, {
|
|
197
|
-
schedule: string;
|
|
198
|
-
timezone?: string;
|
|
182
|
+
readonly worker: Schema.optional<Schema.Struct<{
|
|
183
|
+
readonly entry: Schema.withDecodingDefault<Schema.String, never>;
|
|
184
|
+
readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
|
|
185
|
+
readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
|
|
186
|
+
}>>;
|
|
187
|
+
readonly auth: Schema.Struct<{
|
|
188
|
+
readonly enabled: Schema.Boolean;
|
|
189
|
+
readonly required: Schema.Boolean;
|
|
199
190
|
}>;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
191
|
+
readonly db: Schema.Boolean;
|
|
192
|
+
readonly queues: Schema.$Record<Schema.String, Schema.Struct<{
|
|
193
|
+
readonly batchSize: Schema.withDecodingDefault<Schema.Int, never>;
|
|
194
|
+
readonly maxReceiveCount: Schema.withDecodingDefault<Schema.Int, never>;
|
|
195
|
+
readonly concurrency: Schema.optional<Schema.Int>;
|
|
196
|
+
readonly visibilityTimeoutSeconds: Schema.Finite;
|
|
197
|
+
}>>;
|
|
198
|
+
readonly events: Schema.$Array<Schema.String>;
|
|
199
|
+
readonly crons: Schema.$Record<Schema.String, Schema.Struct<{
|
|
200
|
+
readonly schedule: Schema.String;
|
|
201
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
202
|
+
}>>;
|
|
203
|
+
readonly storage: Schema.$Array<Schema.String>;
|
|
204
|
+
readonly secrets: Schema.$Array<Schema.String>;
|
|
205
|
+
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
206
|
+
}>;
|
|
207
|
+
export type ResolvedManifest = typeof ResolvedManifest.Type;
|
|
204
208
|
export declare class ManifestError extends Error {
|
|
205
209
|
readonly issues: string[];
|
|
206
210
|
constructor(issues: string[]);
|
package/dist/manifest.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
2
|
import { validateCron } from './cron.js';
|
|
3
3
|
import { APP_NAME_PATTERN, ENV_NAME_PATTERN, EVENT_TYPE_PATTERN, RESOURCE_KEY_PATTERN } from './naming.js';
|
|
4
4
|
/**
|
|
@@ -15,60 +15,67 @@ export const APP_CONFIG_FILE = 'plat.config.ts';
|
|
|
15
15
|
* below is the same shape written for authors. `test/manifest-types.test.ts`
|
|
16
16
|
* keeps the two in step.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
const RESOURCE_KEY_MESSAGE = 'must be 1-20 chars of a-z, 0-9, hyphens';
|
|
19
|
+
const resourceKey = Schema.String.check(Schema.isPattern(RESOURCE_KEY_PATTERN, { message: RESOURCE_KEY_MESSAGE }));
|
|
20
|
+
const eventType = Schema.String.check(Schema.isPattern(EVENT_TYPE_PATTERN));
|
|
21
|
+
const envName = Schema.String.check(Schema.isPattern(ENV_NAME_PATTERN));
|
|
22
|
+
/**
|
|
23
|
+
* A record whose keys must match `pattern`. `Schema.Record` drops keys that fail
|
|
24
|
+
* its key schema, which would make a misnamed queue silently disappear, so
|
|
25
|
+
* keys are checked here and reported at their path instead.
|
|
26
|
+
*/
|
|
27
|
+
const recordOf = (pattern, value, message = `must match ${pattern}`) => Schema.Record(Schema.String, value).check(Schema.makeFilter((record) => Object.keys(record)
|
|
28
|
+
.filter((key) => !pattern.test(key))
|
|
29
|
+
.map((key) => ({ path: [key], issue: message }))));
|
|
30
|
+
const intBetween = (minimum, maximum) => Schema.Int.check(Schema.isBetween({ minimum, maximum }));
|
|
31
|
+
/** Absent (or `undefined`) decodes to `value`. */
|
|
32
|
+
const orElse = (value) => (schema) => schema.pipe(Schema.withDecodingDefault(Effect.succeed(value)));
|
|
33
|
+
const WebSchema = Schema.Struct({
|
|
34
|
+
server: Schema.optional(Schema.String),
|
|
35
|
+
static: Schema.optional(Schema.String),
|
|
36
|
+
build: Schema.optional(Schema.String),
|
|
37
|
+
dev: Schema.optional(Schema.Struct({ command: Schema.String, port: Schema.optional(intBetween(1, 65535)) })),
|
|
38
|
+
spa: Schema.Boolean.pipe(orElse(true)),
|
|
39
|
+
serverRoutes: Schema.Array(Schema.String.check(Schema.isStartingWith('/'))).pipe(orElse(['/api/'])),
|
|
40
|
+
timeoutSeconds: intBetween(3, 900).pipe(orElse(30)),
|
|
41
|
+
concurrency: intBetween(1, 128).pipe(orElse(64)),
|
|
42
|
+
}).check(Schema.makeFilter((w) => w.server || w.static ? undefined : 'web needs a server, a static directory, or both'));
|
|
43
|
+
const WorkerSchema = Schema.Struct({
|
|
44
|
+
entry: Schema.String.pipe(orElse('src/worker.ts')),
|
|
45
|
+
timeoutSeconds: intBetween(1, 900).pipe(orElse(60)),
|
|
46
|
+
memoryMb: intBetween(128, 10240).pipe(orElse(512)),
|
|
36
47
|
});
|
|
37
|
-
const QueueSchema =
|
|
38
|
-
batchSize:
|
|
39
|
-
visibilityTimeoutSeconds:
|
|
40
|
-
maxReceiveCount:
|
|
41
|
-
concurrency:
|
|
48
|
+
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)),
|
|
42
53
|
});
|
|
43
|
-
const CronSchema =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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));
|
|
58
|
+
const AuthSchema = Schema.Union([
|
|
59
|
+
Schema.Boolean,
|
|
60
|
+
Schema.Struct({ required: Schema.Boolean.pipe(orElse(false)) }),
|
|
61
|
+
]);
|
|
62
|
+
export const ManifestSchema = Schema.Struct({
|
|
63
|
+
// Reserved names are enforced when an app is registered (API), not here:
|
|
64
|
+
// the control plane itself is the app named `platform`.
|
|
65
|
+
name: Schema.String.check(Schema.isPattern(APP_NAME_PATTERN, { message: 'must be 3-30 chars of a-z, 0-9, single hyphens' })),
|
|
66
|
+
description: Schema.optional(Schema.String.check(Schema.isMaxLength(200))),
|
|
67
|
+
web: Schema.optional(WebSchema),
|
|
68
|
+
worker: Schema.optional(WorkerSchema),
|
|
69
|
+
auth: AuthSchema.pipe(orElse(false)),
|
|
70
|
+
db: Schema.Boolean.pipe(orElse(false)),
|
|
71
|
+
queues: recordOf(RESOURCE_KEY_PATTERN, QueueSchema, RESOURCE_KEY_MESSAGE).pipe(orElse({})),
|
|
58
72
|
// The array form predates typed event payloads; deployments recorded
|
|
59
73
|
// before then still store it.
|
|
60
|
-
events:
|
|
61
|
-
crons:
|
|
62
|
-
storage:
|
|
63
|
-
secrets:
|
|
64
|
-
env:
|
|
65
|
-
})
|
|
66
|
-
.superRefine((m, ctx) => {
|
|
67
|
-
for (const [key, cron] of Object.entries(m.crons)) {
|
|
68
|
-
const err = validateCron(typeof cron === 'string' ? cron : cron.schedule);
|
|
69
|
-
if (err)
|
|
70
|
-
ctx.addIssue({ code: 'custom', path: ['crons', key], message: err });
|
|
71
|
-
}
|
|
74
|
+
events: Schema.Union([Schema.Array(eventType), recordOf(EVENT_TYPE_PATTERN, Schema.Struct({}))]).pipe(orElse([])),
|
|
75
|
+
crons: recordOf(RESOURCE_KEY_PATTERN, CronSchema, RESOURCE_KEY_MESSAGE).pipe(orElse({})),
|
|
76
|
+
storage: Schema.Array(resourceKey).pipe(orElse([])),
|
|
77
|
+
secrets: Schema.Array(envName).pipe(orElse([])),
|
|
78
|
+
env: recordOf(ENV_NAME_PATTERN, Schema.String).pipe(orElse({})),
|
|
72
79
|
});
|
|
73
80
|
/**
|
|
74
81
|
* The default export of `plat.config.ts`. Returns the config unchanged with
|
|
@@ -86,6 +93,27 @@ export function queue(options = {}) {
|
|
|
86
93
|
export function event() {
|
|
87
94
|
return {};
|
|
88
95
|
}
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
/**
|
|
98
|
+
* Manifest with defaults applied and derived fields normalized: what
|
|
99
|
+
* deployments store. Decoding fills defaults for fields added since a stored
|
|
100
|
+
* manifest was written, so earlier deployments keep decoding.
|
|
101
|
+
*/
|
|
102
|
+
export const ResolvedManifest = Schema.Struct({
|
|
103
|
+
name: Schema.String,
|
|
104
|
+
description: Schema.optional(Schema.String),
|
|
105
|
+
web: Schema.optional(WebSchema),
|
|
106
|
+
/** Present when any queue, event subscription or cron exists. */
|
|
107
|
+
worker: Schema.optional(WorkerSchema),
|
|
108
|
+
auth: Schema.Struct({ enabled: Schema.Boolean, required: Schema.Boolean }),
|
|
109
|
+
db: Schema.Boolean,
|
|
110
|
+
queues: Schema.Record(Schema.String, Schema.Struct({ ...QueueSchema.fields, visibilityTimeoutSeconds: Schema.Finite })),
|
|
111
|
+
events: Schema.Array(Schema.String),
|
|
112
|
+
crons: Schema.Record(Schema.String, Schema.Struct({ schedule: Schema.String, timezone: Schema.optional(Schema.String) })),
|
|
113
|
+
storage: Schema.Array(Schema.String),
|
|
114
|
+
secrets: Schema.Array(Schema.String),
|
|
115
|
+
env: Schema.Record(Schema.String, Schema.String),
|
|
116
|
+
});
|
|
89
117
|
export class ManifestError extends Error {
|
|
90
118
|
issues;
|
|
91
119
|
constructor(issues) {
|
|
@@ -93,30 +121,32 @@ export class ManifestError extends Error {
|
|
|
93
121
|
this.issues = issues;
|
|
94
122
|
}
|
|
95
123
|
}
|
|
124
|
+
const validateManifest = Schema.toStandardSchemaV1(ManifestSchema, { parseOptions: { errors: 'all' } })['~standard'].validate;
|
|
96
125
|
export function parseManifest(input) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
126
|
+
const result = validateManifest(input);
|
|
127
|
+
// The schema has no asynchronous checks, so validation is synchronous.
|
|
128
|
+
if (result instanceof Promise)
|
|
129
|
+
throw new Error('manifest validation must be synchronous');
|
|
130
|
+
if (result.issues) {
|
|
131
|
+
throw new ManifestError(result.issues.map((i) => {
|
|
132
|
+
const path = (i.path ?? []).map((p) => String(typeof p === 'object' ? p.key : p)).join('.');
|
|
133
|
+
return `${path || '(root)'}: ${i.message}`;
|
|
134
|
+
}));
|
|
100
135
|
}
|
|
101
|
-
return resolveManifest(
|
|
136
|
+
return resolveManifest(result.value);
|
|
102
137
|
}
|
|
103
138
|
export function resolveManifest(m) {
|
|
104
139
|
const events = Array.isArray(m.events) ? m.events : Object.keys(m.events);
|
|
105
140
|
const needsWorker = Object.keys(m.queues).length > 0 || events.length > 0 || Object.keys(m.crons).length > 0;
|
|
106
|
-
const worker = m.worker ?? (needsWorker ?
|
|
141
|
+
const worker = m.worker ?? (needsWorker ? Schema.decodeUnknownSync(WorkerSchema)({}) : undefined);
|
|
107
142
|
const auth = typeof m.auth === 'boolean'
|
|
108
143
|
? { enabled: m.auth, required: false }
|
|
109
144
|
: { enabled: true, required: m.auth.required };
|
|
110
|
-
const queues =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const crons = {};
|
|
118
|
-
for (const [key, c] of Object.entries(m.crons))
|
|
119
|
-
crons[key] = typeof c === 'string' ? { schedule: c } : c;
|
|
145
|
+
const queues = Object.fromEntries(Object.entries(m.queues).map(([key, q]) => [
|
|
146
|
+
key,
|
|
147
|
+
{ ...q, visibilityTimeoutSeconds: q.visibilityTimeoutSeconds ?? (worker?.timeoutSeconds ?? 60) * 6 },
|
|
148
|
+
]));
|
|
149
|
+
const crons = Object.fromEntries(Object.entries(m.crons).map(([key, c]) => [key, typeof c === 'string' ? { schedule: c } : c]));
|
|
120
150
|
return {
|
|
121
151
|
name: m.name,
|
|
122
152
|
...(m.description ? { description: m.description } : {}),
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
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,CAAC,CAAC,IAAI;QACZ,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,IAAI;QACJ,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,MAAM;QACN,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC5B,KAAK;QACL,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAChC,GAAG,EAAE,CAAC,CAAC,GAAG;KACX,CAAC;AACJ,CAAC"}
|
package/dist/naming.d.ts
CHANGED
|
@@ -36,7 +36,12 @@ export declare const names: {
|
|
|
36
36
|
readonly base: (app: string, stage: string) => string;
|
|
37
37
|
readonly table: (app: string, stage: string) => string;
|
|
38
38
|
readonly webFunction: (app: string, stage: string) => string;
|
|
39
|
-
|
|
39
|
+
/**
|
|
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).
|
|
43
|
+
*/
|
|
44
|
+
readonly webEndpoints: () => readonly ['live', 'live-b'];
|
|
40
45
|
readonly workerFunction: (app: string, stage: string) => string;
|
|
41
46
|
/** IAM role name; created under {@link IAM_APP_PATH}. */
|
|
42
47
|
readonly role: (app: string, stage: string) => string;
|
|
@@ -48,10 +53,16 @@ export declare const names: {
|
|
|
48
53
|
readonly scheduleGroup: (app: string, stage: string) => string;
|
|
49
54
|
readonly schedule: (cronKey: string) => string;
|
|
50
55
|
readonly userPoolClient: (app: string, stage: string) => string;
|
|
51
|
-
|
|
56
|
+
/**
|
|
57
|
+
* A stage's log groups. Lambda also writes a Web Function's environments to
|
|
58
|
+
* `<web group>.local`, so the engine creates that one too.
|
|
59
|
+
*/
|
|
60
|
+
readonly logGroup: (app: string, stage: string, component: 'web' | 'web.local' | 'worker') => string;
|
|
52
61
|
readonly logGroupPrefix: (app: string, stage?: string) => string;
|
|
53
62
|
readonly secretsPath: (app: string, stage: string) => string;
|
|
54
63
|
readonly sharedSecretsPath: (app: string) => string;
|
|
64
|
+
/** SSM SecureString holding the stage key (see `Bindings.stageKey`); outside the secrets path. */
|
|
65
|
+
readonly stageKeyParameter: (app: string, stage: string) => string;
|
|
55
66
|
/** Prefix inside the shared storage bucket: `<app>/<stage>/<bucket>/`. */
|
|
56
67
|
readonly storagePrefix: (app: string, stage: string, bucket?: string) => string;
|
|
57
68
|
/** Prefix inside the shared sites bucket for one deployment's static files. */
|
package/dist/naming.js
CHANGED
|
@@ -85,7 +85,12 @@ export const names = {
|
|
|
85
85
|
base: (app, stage) => `${app}--${stage}`,
|
|
86
86
|
table: (app, stage) => `${app}--${stage}`,
|
|
87
87
|
webFunction: (app, stage) => `${app}--${stage}`,
|
|
88
|
-
|
|
88
|
+
/**
|
|
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).
|
|
92
|
+
*/
|
|
93
|
+
webEndpoints: () => ['live', 'live-b'],
|
|
89
94
|
workerFunction: (app, stage) => `${app}--${stage}--worker`,
|
|
90
95
|
/** IAM role name; created under {@link IAM_APP_PATH}. */
|
|
91
96
|
role: (app, stage) => `${app}--${stage}`,
|
|
@@ -97,10 +102,16 @@ export const names = {
|
|
|
97
102
|
scheduleGroup: (app, stage) => `${app}--${stage}`,
|
|
98
103
|
schedule: (cronKey) => cronKey,
|
|
99
104
|
userPoolClient: (app, stage) => `${app}--${stage}`,
|
|
105
|
+
/**
|
|
106
|
+
* A stage's log groups. Lambda also writes a Web Function's environments to
|
|
107
|
+
* `<web group>.local`, so the engine creates that one too.
|
|
108
|
+
*/
|
|
100
109
|
logGroup: (app, stage, component) => `/platform/apps/${app}/${stage}/${component}`,
|
|
101
110
|
logGroupPrefix: (app, stage) => stage ? `/platform/apps/${app}/${stage}/` : `/platform/apps/${app}/`,
|
|
102
111
|
secretsPath: (app, stage) => `/platform/apps/${app}/${stage}/secrets/`,
|
|
103
112
|
sharedSecretsPath: (app) => `/platform/apps/${app}/_shared/secrets/`,
|
|
113
|
+
/** SSM SecureString holding the stage key (see `Bindings.stageKey`); outside the secrets path. */
|
|
114
|
+
stageKeyParameter: (app, stage) => `/platform/apps/${app}/${stage}/stage-key`,
|
|
104
115
|
/** Prefix inside the shared storage bucket: `<app>/<stage>/<bucket>/`. */
|
|
105
116
|
storagePrefix: (app, stage, bucket) => bucket ? `${app}/${stage}/${bucket}/` : `${app}/${stage}/`,
|
|
106
117
|
/** Prefix inside the shared sites bucket for one deployment's static files. */
|
package/dist/naming.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming.js","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,0CAA0C,CAAC;AAE3E,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG,0CAA0C,CAAC;AAE7E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,6CAA6C,CAAC;AAElF,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,iCAAiC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