@neondatabase/config 1.6.0 → 1.7.1
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/README.md +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/lib/define-config.d.ts +3 -2
- package/dist/lib/define-config.d.ts.map +1 -1
- package/dist/lib/define-config.js +23 -6
- package/dist/lib/define-config.js.map +1 -1
- package/dist/lib/diff.d.ts +3 -3
- package/dist/lib/diff.d.ts.map +1 -1
- package/dist/lib/diff.js +41 -23
- package/dist/lib/diff.js.map +1 -1
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +1 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/neon-api-real.d.ts.map +1 -1
- package/dist/lib/neon-api-real.js +75 -21
- package/dist/lib/neon-api-real.js.map +1 -1
- package/dist/lib/neon-api.d.ts +34 -7
- package/dist/lib/neon-api.d.ts.map +1 -1
- package/dist/lib/schema.d.ts +17 -38
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +43 -42
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/types.d.ts +50 -13
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/v1.d.ts +17 -38
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/schema.d.ts
CHANGED
|
@@ -120,13 +120,6 @@ declare const functionDefSchema: z.ZodObject<{
|
|
|
120
120
|
dev: z.ZodOptional<z.ZodObject<{
|
|
121
121
|
port: z.ZodOptional<z.ZodNumber>;
|
|
122
122
|
}, z.core.$strict>>;
|
|
123
|
-
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
-
type: z.ZodLiteral<"schedule">;
|
|
125
|
-
name: z.ZodString;
|
|
126
|
-
cron: z.ZodString;
|
|
127
|
-
functionPath: z.ZodOptional<z.ZodString>;
|
|
128
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
-
}, z.core.$strict>>>;
|
|
130
123
|
customDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
124
|
}, z.core.$strict>;
|
|
132
125
|
/** Static definition of a bucket (existence). Name is the record key. */
|
|
@@ -134,9 +127,9 @@ declare const bucketDefSchema: z.ZodObject<{
|
|
|
134
127
|
access: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"private">, z.ZodLiteral<"public_read">]>>;
|
|
135
128
|
}, z.core.$strict>;
|
|
136
129
|
/**
|
|
137
|
-
* Functions record
|
|
138
|
-
*
|
|
139
|
-
*
|
|
130
|
+
* Functions record. Used as both top-level `functions` and `preview.functions`
|
|
131
|
+
* so {@link previewInputSchema} (`schemas.preview`) keeps the same validation
|
|
132
|
+
* when parsed on its own.
|
|
140
133
|
*/
|
|
141
134
|
declare const functionsRecordSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
142
135
|
name: z.ZodString;
|
|
@@ -150,13 +143,6 @@ declare const functionsRecordSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
150
143
|
dev: z.ZodOptional<z.ZodObject<{
|
|
151
144
|
port: z.ZodOptional<z.ZodNumber>;
|
|
152
145
|
}, z.core.$strict>>;
|
|
153
|
-
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
-
type: z.ZodLiteral<"schedule">;
|
|
155
|
-
name: z.ZodString;
|
|
156
|
-
cron: z.ZodString;
|
|
157
|
-
functionPath: z.ZodOptional<z.ZodString>;
|
|
158
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
-
}, z.core.$strict>>>;
|
|
160
146
|
customDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
147
|
}, z.core.$strict>>;
|
|
162
148
|
/** Static, beta Preview feature set: AI Gateway toggle + functions/buckets records. */
|
|
@@ -176,13 +162,6 @@ declare const previewInputSchema: z.ZodObject<{
|
|
|
176
162
|
dev: z.ZodOptional<z.ZodObject<{
|
|
177
163
|
port: z.ZodOptional<z.ZodNumber>;
|
|
178
164
|
}, z.core.$strict>>;
|
|
179
|
-
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
180
|
-
type: z.ZodLiteral<"schedule">;
|
|
181
|
-
name: z.ZodString;
|
|
182
|
-
cron: z.ZodString;
|
|
183
|
-
functionPath: z.ZodOptional<z.ZodString>;
|
|
184
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
-
}, z.core.$strict>>>;
|
|
186
165
|
customDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
187
166
|
}, z.core.$strict>>>;
|
|
188
167
|
buckets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -263,18 +242,25 @@ declare const configInputSchema: z.ZodObject<{
|
|
|
263
242
|
dev: z.ZodOptional<z.ZodObject<{
|
|
264
243
|
port: z.ZodOptional<z.ZodNumber>;
|
|
265
244
|
}, z.core.$strict>>;
|
|
266
|
-
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
267
|
-
type: z.ZodLiteral<"schedule">;
|
|
268
|
-
name: z.ZodString;
|
|
269
|
-
cron: z.ZodString;
|
|
270
|
-
functionPath: z.ZodOptional<z.ZodString>;
|
|
271
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
-
}, z.core.$strict>>>;
|
|
273
245
|
customDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
246
|
}, z.core.$strict>>>;
|
|
275
247
|
buckets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
276
248
|
access: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"private">, z.ZodLiteral<"public_read">]>>;
|
|
277
249
|
}, z.core.$strict>>>;
|
|
250
|
+
triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
251
|
+
type: z.ZodLiteral<"schedule">;
|
|
252
|
+
function: z.ZodString;
|
|
253
|
+
cron: z.ZodString;
|
|
254
|
+
functionPath: z.ZodOptional<z.ZodString>;
|
|
255
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"storage_object_created">;
|
|
258
|
+
function: z.ZodString;
|
|
259
|
+
bucket: z.ZodString;
|
|
260
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
261
|
+
functionPath: z.ZodOptional<z.ZodString>;
|
|
262
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
}, z.core.$strict>], "type">>>;
|
|
278
264
|
preview: z.ZodOptional<z.ZodObject<{
|
|
279
265
|
aiGateway: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
280
266
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -291,13 +277,6 @@ declare const configInputSchema: z.ZodObject<{
|
|
|
291
277
|
dev: z.ZodOptional<z.ZodObject<{
|
|
292
278
|
port: z.ZodOptional<z.ZodNumber>;
|
|
293
279
|
}, z.core.$strict>>;
|
|
294
|
-
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
295
|
-
type: z.ZodLiteral<"schedule">;
|
|
296
|
-
name: z.ZodString;
|
|
297
|
-
cron: z.ZodString;
|
|
298
|
-
functionPath: z.ZodOptional<z.ZodString>;
|
|
299
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
300
|
-
}, z.core.$strict>>>;
|
|
301
280
|
customDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
281
|
}, z.core.$strict>>>;
|
|
303
282
|
buckets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
package/dist/lib/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","names":[],"sources":["../../src/lib/schema.ts"],"mappings":";;;;;;;AAkCA;AAsDG;;;;;;;;;;AAAA;AAtD+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AA,EAAA"}
|
package/dist/lib/schema.js
CHANGED
|
@@ -162,11 +162,22 @@ const devPortSchema = z.number().int().min(1).max(65535);
|
|
|
162
162
|
const functionDevConfigSchema = z.strictObject({ port: devPortSchema.optional() });
|
|
163
163
|
const functionScheduleTriggerSchema = z.strictObject({
|
|
164
164
|
type: z.literal("schedule"),
|
|
165
|
-
|
|
165
|
+
function: functionSlugSchema,
|
|
166
166
|
cron: z.string().min(1),
|
|
167
167
|
functionPath: z.string().min(1).optional(),
|
|
168
168
|
enabled: z.boolean().optional()
|
|
169
169
|
});
|
|
170
|
+
const functionStorageObjectCreatedTriggerSchema = z.strictObject({
|
|
171
|
+
type: z.literal("storage_object_created"),
|
|
172
|
+
function: functionSlugSchema,
|
|
173
|
+
bucket: bucketNameSchema,
|
|
174
|
+
prefix: z.string().min(1).max(1024).optional(),
|
|
175
|
+
functionPath: z.string().min(1).optional(),
|
|
176
|
+
enabled: z.boolean().optional()
|
|
177
|
+
});
|
|
178
|
+
const functionTriggerSchema = z.discriminatedUnion("type", [functionScheduleTriggerSchema, functionStorageObjectCreatedTriggerSchema]);
|
|
179
|
+
const triggerNameSchema = z.string().min(1).max(255);
|
|
180
|
+
const triggersRecordSchema = z.record(triggerNameSchema, functionTriggerSchema);
|
|
170
181
|
const customDomainSchema = z.string().superRefine((value, ctx) => {
|
|
171
182
|
const message = customDomainValidationError(value);
|
|
172
183
|
if (message) ctx.addIssue({
|
|
@@ -256,7 +267,6 @@ const functionDefSchema = z.strictObject({
|
|
|
256
267
|
externalPackages: functionExternalPackagesSchema.optional(),
|
|
257
268
|
bundler: bundlerSchema.optional(),
|
|
258
269
|
dev: functionDevConfigSchema.optional(),
|
|
259
|
-
triggers: z.array(functionScheduleTriggerSchema).optional(),
|
|
260
270
|
customDomains: customDomainsSchema.optional()
|
|
261
271
|
}).check((ctx) => {
|
|
262
272
|
const entries = ctx.value.externalPackages ?? [];
|
|
@@ -314,47 +324,11 @@ const functionDefSchema = z.strictObject({
|
|
|
314
324
|
/** Static definition of a bucket (existence). Name is the record key. */
|
|
315
325
|
const bucketDefSchema = z.strictObject({ access: z.union([z.literal("private"), z.literal("public_read")]).optional() });
|
|
316
326
|
/**
|
|
317
|
-
* Functions record
|
|
318
|
-
*
|
|
319
|
-
*
|
|
327
|
+
* Functions record. Used as both top-level `functions` and `preview.functions`
|
|
328
|
+
* so {@link previewInputSchema} (`schemas.preview`) keeps the same validation
|
|
329
|
+
* when parsed on its own.
|
|
320
330
|
*/
|
|
321
|
-
const functionsRecordSchema = z.record(functionSlugSchema, functionDefSchema)
|
|
322
|
-
const byName = /* @__PURE__ */ new Map();
|
|
323
|
-
for (const [slug, fn] of Object.entries(functions)) {
|
|
324
|
-
const seenOnFn = /* @__PURE__ */ new Set();
|
|
325
|
-
for (const [index, trigger] of (fn.triggers ?? []).entries()) {
|
|
326
|
-
if (seenOnFn.has(trigger.name)) {
|
|
327
|
-
ctx.addIssue({
|
|
328
|
-
code: "custom",
|
|
329
|
-
path: [
|
|
330
|
-
slug,
|
|
331
|
-
"triggers",
|
|
332
|
-
index,
|
|
333
|
-
"name"
|
|
334
|
-
],
|
|
335
|
-
message: `trigger name "${trigger.name}" is listed more than once on function "${slug}"`
|
|
336
|
-
});
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
seenOnFn.add(trigger.name);
|
|
340
|
-
const prior = byName.get(trigger.name);
|
|
341
|
-
if (prior !== void 0) {
|
|
342
|
-
ctx.addIssue({
|
|
343
|
-
code: "custom",
|
|
344
|
-
path: [
|
|
345
|
-
slug,
|
|
346
|
-
"triggers",
|
|
347
|
-
index,
|
|
348
|
-
"name"
|
|
349
|
-
],
|
|
350
|
-
message: `trigger name "${trigger.name}" is already used by function "${prior}"`
|
|
351
|
-
});
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
byName.set(trigger.name, slug);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
});
|
|
331
|
+
const functionsRecordSchema = z.record(functionSlugSchema, functionDefSchema);
|
|
358
332
|
/** Static, beta Preview feature set: AI Gateway toggle + functions/buckets records. */
|
|
359
333
|
const previewInputSchema = z.strictObject({
|
|
360
334
|
aiGateway: serviceToggleInputSchema.optional(),
|
|
@@ -410,6 +384,7 @@ const configInputSchema = z.strictObject({
|
|
|
410
384
|
aiGateway: serviceToggleInputSchema.optional(),
|
|
411
385
|
functions: functionsRecordSchema.optional(),
|
|
412
386
|
buckets: z.record(bucketNameSchema, bucketDefSchema).optional(),
|
|
387
|
+
triggers: triggersRecordSchema.optional(),
|
|
413
388
|
preview: previewInputSchema.optional(),
|
|
414
389
|
branch: z.custom((value) => typeof value === "function", { message: "branch must be a function: `branch: (branch) => ({ … })`" }).optional()
|
|
415
390
|
}).superRefine((cfg, ctx) => {
|
|
@@ -431,6 +406,7 @@ const configInputSchema = z.strictObject({
|
|
|
431
406
|
gaPath: "buckets",
|
|
432
407
|
previewPath: "preview.buckets"
|
|
433
408
|
});
|
|
409
|
+
validateAuthoredTriggers(cfg, ctx);
|
|
434
410
|
if (!isToggleEnabledValue(cfg.dataApi)) return;
|
|
435
411
|
if (dataApiAuthProviderValue(cfg.dataApi) !== "neon") return;
|
|
436
412
|
if (!isToggleEnabledValue(cfg.auth)) ctx.addIssue({
|
|
@@ -439,6 +415,31 @@ const configInputSchema = z.strictObject({
|
|
|
439
415
|
message: "dataApi with authProvider \"neon\" requires Neon Auth — set `auth: true` (or `auth: { enabled: true }`), or use `dataApi.authProvider: \"external\"` with your own `jwksUrl`."
|
|
440
416
|
});
|
|
441
417
|
});
|
|
418
|
+
function validateAuthoredTriggers(cfg, ctx) {
|
|
419
|
+
if (cfg.triggers === void 0) return;
|
|
420
|
+
const functions = new Set(Object.keys(cfg.functions ?? cfg.preview?.functions ?? {}));
|
|
421
|
+
const buckets = new Set(Object.keys(cfg.buckets ?? cfg.preview?.buckets ?? {}));
|
|
422
|
+
for (const [name, trigger] of Object.entries(cfg.triggers)) {
|
|
423
|
+
if (!functions.has(trigger.function)) ctx.addIssue({
|
|
424
|
+
code: "custom",
|
|
425
|
+
path: [
|
|
426
|
+
"triggers",
|
|
427
|
+
name,
|
|
428
|
+
"function"
|
|
429
|
+
],
|
|
430
|
+
message: `trigger "${name}" references function "${trigger.function}", which is not declared in functions (or preview.functions)`
|
|
431
|
+
});
|
|
432
|
+
if (trigger.type === "storage_object_created" && !buckets.has(trigger.bucket)) ctx.addIssue({
|
|
433
|
+
code: "custom",
|
|
434
|
+
path: [
|
|
435
|
+
"triggers",
|
|
436
|
+
name,
|
|
437
|
+
"bucket"
|
|
438
|
+
],
|
|
439
|
+
message: `trigger "${name}" references bucket "${trigger.bucket}", which is not declared in buckets (or preview.buckets)`
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
442
443
|
function rejectDuplicateHome(ctx, args) {
|
|
443
444
|
if (!args.gaPresent || !args.previewPresent) return;
|
|
444
445
|
ctx.addIssue({
|
package/dist/lib/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../src/lib/schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n\tcustomDomainValidationError,\n\tnormalizeCustomDomain,\n} from \"./custom-domain.js\";\nimport { parseBranchTtl, parseSuspendTimeout } from \"./duration.js\";\nimport { externalPackageRoot } from \"./external-packages.js\";\nimport { isWildcardPattern, validatePattern } from \"./patterns.js\";\nimport { COMPUTE_UNITS, type FunctionBundlerInput } from \"./types.js\";\n\n/** Autoscaling max from the compute size table; larger sizes are fixed-size only. */\nconst AUTOSCALING_MAX_CU = 16;\n/** Documented ceiling on `max - min` when both bounds are set and differ. */\nconst AUTOSCALING_MAX_RANGE_CU = 8;\n\nconst computeUnitSchema = z.literal(COMPUTE_UNITS, {\n\terror: (issue) =>\n\t\t`must be a compute size Neon offers: 0.25, 0.5, an integer 1-16, or an even integer 18-56 (got ${JSON.stringify(issue.input)})`,\n});\n\n/**\n * Zod schema for {@link import(\"./types.js\").ComputeSettings}.\n *\n * CU values come from {@link COMPUTE_UNITS} (the Console size table). Plan limits are\n * the API's job. Cross-field autoscaling rules apply only when both bounds are set:\n * `min <= max`; if they differ, each bound is ≤ 16 and `max - min` ≤ 8. A single bound\n * cannot be checked against those rules because the other end is the project's default.\n *\n * `suspendTimeout` can be:\n * - `false` (never suspend)\n * - duration string like \"5m\", \"1h\" (must be 60s-604800s when parsed)\n * - number in seconds (60-604800, or -1/0 for special values)\n * - `undefined` (use platform default)\n */\nexport const computeSettingsSchema = z\n\t.strictObject({\n\t\tautoscalingLimitMinCu: computeUnitSchema.optional(),\n\t\tautoscalingLimitMaxCu: computeUnitSchema.optional(),\n\t\tsuspendTimeout: z\n\t\t\t.union([z.literal(false), z.string(), z.number()])\n\t\t\t.optional()\n\t\t\t.superRefine((value, ctx) => {\n\t\t\t\tif (value === undefined) return; // undefined is valid (use platform default)\n\t\t\t\tconst result = parseSuspendTimeout(value);\n\t\t\t\tif (\"error\" in result) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: result.error,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}),\n\t})\n\t.superRefine((settings, ctx) => {\n\t\tconst { autoscalingLimitMinCu: min, autoscalingLimitMaxCu: max } =\n\t\t\tsettings;\n\t\tif (min === undefined || max === undefined) return;\n\t\tif (min > max) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMinCu\"],\n\t\t\t\tmessage: `autoscalingLimitMinCu (${min}) must be <= autoscalingLimitMaxCu (${max})`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (min === max) return;\n\t\tconst overMaxMessage = (field: string, value: number) =>\n\t\t\t`${field} (${value}) exceeds the autoscaling maximum of ${AUTOSCALING_MAX_CU} CU — sizes above ${AUTOSCALING_MAX_CU} are fixed-size only (set autoscalingLimitMinCu = autoscalingLimitMaxCu)`;\n\t\tif (min > AUTOSCALING_MAX_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMinCu\"],\n\t\t\t\tmessage: overMaxMessage(\"autoscalingLimitMinCu\", min),\n\t\t\t});\n\t\t}\n\t\tif (max > AUTOSCALING_MAX_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMaxCu\"],\n\t\t\t\tmessage: overMaxMessage(\"autoscalingLimitMaxCu\", max),\n\t\t\t});\n\t\t}\n\t\tif (max - min > AUTOSCALING_MAX_RANGE_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMaxCu\"],\n\t\t\t\tmessage: `autoscaling range cannot exceed ${AUTOSCALING_MAX_RANGE_CU} CU: min ${min} to max ${max} is a range of ${max - min}`,\n\t\t\t});\n\t\t}\n\t});\n\n/** Object form of a service toggle (`{ enabled?: boolean }`). */\nexport const serviceToggleSchema = z.strictObject({\n\tenabled: z.boolean().optional(),\n});\n\n/** A service toggle as written in a policy: `boolean` or `{ enabled?: boolean }`. */\nexport const serviceToggleInputSchema = z.union([\n\tz.boolean(),\n\tserviceToggleSchema,\n]);\n\n/**\n * Reusable Data API runtime settings (camelCase mirror of the Neon API `DataAPISettings`).\n * `strictObject` so a typo / snake_case key fails loudly instead of being silently dropped.\n */\nexport const dataApiSettingsSchema = z.strictObject({\n\tdbAggregatesEnabled: z.boolean().optional(),\n\tdbAnonRole: z.string().optional(),\n\tdbExtraSearchPath: z.string().optional(),\n\tdbMaxRows: z.number().int().optional(),\n\tdbSchemas: z.array(z.string()).optional(),\n\tjwtRoleClaimKey: z.string().optional(),\n\tjwtCacheMaxLifetime: z.number().int().optional(),\n\topenapiMode: z\n\t\t.union([z.literal(\"ignore-privileges\"), z.literal(\"disabled\")])\n\t\t.optional(),\n\tserverCorsAllowedOrigins: z.string().optional(),\n\tserverTimingEnabled: z.boolean().optional(),\n});\n\n/** Names of the external-IdP-only fields, forbidden when `authProvider` is `\"neon\"`. */\nconst DATA_API_EXTERNAL_ONLY_KEYS = [\n\t\"jwksUrl\",\n\t\"providerName\",\n\t\"jwtAudience\",\n] as const;\n\n/**\n * Object form of the `dataApi` toggle. A single `strictObject` plus a `superRefine` (rather\n * than a discriminated union) so the `\"neon\"` default works without the discriminator being\n * present, and so the \"external-only field with authProvider neon\" error points at the exact\n * offending key — mirroring the `?: never` type-level guard at runtime.\n */\nexport const dataApiConfigSchema = z\n\t.strictObject({\n\t\tenabled: z.boolean().optional(),\n\t\tauthProvider: z\n\t\t\t.union([z.literal(\"neon\"), z.literal(\"external\")])\n\t\t\t.optional(),\n\t\tjwksUrl: z.string().optional(),\n\t\tproviderName: z.string().optional(),\n\t\tjwtAudience: z.string().optional(),\n\t\tsettings: dataApiSettingsSchema.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\tconst provider = cfg.authProvider ?? \"neon\";\n\t\tif (provider !== \"neon\") return;\n\t\tfor (const key of DATA_API_EXTERNAL_ONLY_KEYS) {\n\t\t\tif (cfg[key] !== undefined) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tpath: [key],\n\t\t\t\t\tmessage: `${key} is only allowed with authProvider: \"external\" — Neon supplies it for authProvider: \"neon\".`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\n/** A `dataApi` toggle as written in a policy: `boolean` or {@link dataApiConfigSchema}. */\nexport const dataApiInputSchema = z.union([z.boolean(), dataApiConfigSchema]);\n\nexport const postgresConfigSchema = z.strictObject({\n\tcomputeSettings: computeSettingsSchema.optional(),\n});\n\n/**\n * Branch-unique function slug. Mirrors the Neon Functions API path-segment rule\n * (`platform/internal/platform/functions/name.go`): 1–20 lowercase letters and digits.\n * Used as the **key schema** of the `functions` record, so a bad slug fails\n * validation with a path pointing at the offending key and duplicate slugs are impossible\n * by construction (object keys are unique).\n */\nconst functionSlugSchema = z\n\t.string()\n\t.regex(\n\t\t/^[a-z0-9]{1,20}$/,\n\t\t\"function slug must be 1-20 lowercase letters and digits (no hyphens or other characters)\",\n\t);\n\n/** Bucket name: 1–255 chars. Used as the key schema of the `buckets` record. */\nconst bucketNameSchema = z.string().min(1).max(255);\n\n/**\n * A single function environment-variable value. Must be a defined string: a `process.env.X`\n * that is unset evaluates to `undefined`, and the bare `z.string()` message for that case\n * (`Invalid input: expected string, received undefined`) gives no hint that an env var is the\n * culprit. The custom `error` replaces *only* the `undefined` case with a message that names\n * the offending function + env key (read from the issue path) and how to fix it; any other\n * wrong type keeps zod's default (`expected string, received number`, …).\n */\nconst functionEnvValueSchema = z.string({\n\terror: (issue) => {\n\t\tif (issue.input !== undefined) return undefined;\n\t\tconst path = issue.path ?? [];\n\t\tconst key = path.length > 0 ? String(path[path.length - 1]) : undefined;\n\t\tconst functionsIndex = path.indexOf(\"functions\");\n\t\tconst slug =\n\t\t\tfunctionsIndex >= 0 && functionsIndex + 1 < path.length\n\t\t\t\t? String(path[functionsIndex + 1])\n\t\t\t\t: undefined;\n\t\tconst subject =\n\t\t\tslug !== undefined && key !== undefined\n\t\t\t\t? `Environment variable \"${key}\" for function \"${slug}\"`\n\t\t\t\t: key !== undefined\n\t\t\t\t\t? `Environment variable \"${key}\"`\n\t\t\t\t\t: \"An environment variable\";\n\t\treturn `${subject} is undefined — its value (typically a \\`process.env.*\\`) is unset. Set it (for example \\`neon deploy --env <file>\\`) or omit the key from neon.ts if you do not want to write it. Do not coerce a missing value to an empty string: that uploads and deletes the live key.`;\n\t},\n});\n\n/**\n * Per-function environment map. Every value must be a defined string (see\n * {@link functionEnvValueSchema}): a `process.env.X` that is unset surfaces as `undefined` and\n * is rejected here (rather than silently shipping `undefined` into the deployment).\n */\nconst functionEnvSchema = z.record(z.string(), functionEnvValueSchema);\n\n/**\n * TCP port for a function's local dev server. Excludes 0 (which means \"any port\" to the OS\n * — `neon dev` expresses \"pick one for me\" by omitting `port`, not by passing 0).\n */\nconst devPortSchema = z.number().int().min(1).max(65535);\n\n/**\n * Local-dev settings for a function (`neon dev` only; never affects deploy). `port` is bound\n * exactly when set (and `neon dev` fails if it is taken), or a free port is found when omitted.\n */\nconst functionDevConfigSchema = z.strictObject({\n\tport: devPortSchema.optional(),\n});\n\nconst functionScheduleTriggerSchema = z.strictObject({\n\ttype: z.literal(\"schedule\"),\n\tname: z.string().min(1).max(255),\n\tcron: z.string().min(1),\n\tfunctionPath: z.string().min(1).optional(),\n\tenabled: z.boolean().optional(),\n});\n\nconst customDomainSchema = z.string().superRefine((value, ctx) => {\n\tconst message = customDomainValidationError(value);\n\tif (message) {\n\t\tctx.addIssue({ code: \"custom\", message });\n\t}\n});\n\nconst customDomainsSchema = z\n\t.array(customDomainSchema)\n\t.superRefine((domains, ctx) => {\n\t\tconst seen = new Set<string>();\n\t\tfor (const [index, domain] of domains.entries()) {\n\t\t\tconst normalized = normalizeCustomDomain(domain);\n\t\t\tif (seen.has(normalized)) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tpath: [index],\n\t\t\t\t\tmessage: `custom domain \"${normalized}\" is listed more than once`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(normalized);\n\t\t}\n\t});\n\n/**\n * The name of a package the bundler must leave alone. Accepts what esbuild's `external`\n * accepts for a package — a bare name, a scope, or a subpath — and rejects a relative or\n * absolute path, which names a local module rather than a dependency and is never the right\n * thing to externalize (the bundle would ship an import of a file that isn't deployed).\n */\nconst externalPackageNameSchema = z\n\t.string()\n\t.min(1)\n\t.refine((value) => !value.startsWith(\".\") && !value.startsWith(\"/\"), {\n\t\terror: 'must be a package name such as \"microsandbox\" or \"@scope/pkg\", not a relative or absolute path',\n\t});\n\n/**\n * An entry whose files are staged has to name one installable package, because the deploy\n * hands its root to `npm install`. esbuild's `external` additionally accepts a `*` wildcard\n * and a bare scope, which name a set rather than a package — legal only when nothing is\n * being installed for them.\n */\nconst stageablePackageName = (value: string): boolean => {\n\t// A protocol (`node:fs`, `npm:pkg`) is a specifier, not something to install.\n\tif (/^[a-z][a-z0-9+.-]*:/i.test(value)) return false;\n\t// An empty segment (`foo//bar`) or a traversal is not a subpath the deploy can act on.\n\tconst segments = value.split(\"/\");\n\tif (segments.some((segment) => segment === \"\" || segment === \"..\")) {\n\t\treturn false;\n\t}\n\treturn isNpmPackageName(externalPackageRoot(value));\n};\n\n/**\n * npm's own rules for a package name, which is what the deploy hands to `npm install`.\n * Deliberately strict: whatever slips through here becomes a subprocess argument.\n */\nconst NPM_NAME_SEGMENT = /^[a-z0-9~][a-z0-9._~-]*$/;\n\nconst isNpmPackageName = (root: string): boolean => {\n\tif (root.length === 0 || root.length > 214) return false;\n\tif (!root.startsWith(\"@\")) return NPM_NAME_SEGMENT.test(root);\n\tconst [scope, name, ...rest] = root.slice(1).split(\"/\");\n\t// A bare scope names every package in it, not one package.\n\tif (rest.length > 0 || name === undefined) return false;\n\treturn NPM_NAME_SEGMENT.test(scope) && NPM_NAME_SEGMENT.test(name);\n};\n\n/**\n * One entry of `externalPackages`. A bare string is the common case and ships the package's\n * files; the object form exists only to turn that off. See {@link FunctionDef.externalPackages}.\n */\nconst externalPackageEntrySchema = z.union([\n\texternalPackageNameSchema,\n\tz.strictObject({\n\t\tname: externalPackageNameSchema,\n\t\tincludeFiles: z.boolean().optional(),\n\t}),\n]);\n\n/**\n * Per-function list of packages esbuild leaves unresolved at deploy time. See\n * {@link FunctionDef.externalPackages}.\n */\nconst functionExternalPackagesSchema = z.array(externalPackageEntrySchema);\n\nconst runtimeSchema = z.literal(\"nodejs24\");\n\nconst bundlerSchema = z.custom<FunctionBundlerInput>(\n\t(value) =>\n\t\tvalue === \"esbuild\" || value === \"none\" || typeof value === \"function\",\n\t{\n\t\tmessage:\n\t\t\t'bundler must be \"esbuild\", \"none\", or a function (fn) => Promise<FunctionBundle>',\n\t},\n);\n\nconst isEsbuildBundler = (\n\tbundler: z.infer<typeof bundlerSchema> | undefined,\n): boolean => bundler === undefined || bundler === \"esbuild\";\n\n/** The declared name of an entry, whichever form it was written in. */\nconst entryName = (\n\tentry: z.infer<typeof externalPackageEntrySchema>,\n): string => (typeof entry === \"string\" ? entry : entry.name);\n\n/** Whether an entry ships its files. Absent means yes — see `FunctionDef.externalPackages`. */\nconst entryIncludesFiles = (\n\tentry: z.infer<typeof externalPackageEntrySchema>,\n): boolean => (typeof entry === \"string\" ? true : entry.includeFiles !== false);\n\n/**\n * Static definition of a function (existence). The slug is the record key (validated by\n * {@link functionSlugSchema}), so it is not a field here. Deploy tuning (`runtime`) lives\n * in the `branch` closure, not here.\n *\n * `externalPackages` entries are checked for contradictions: the same package named twice,\n * or named once bare and once through a subpath with a different `includeFiles`. Both state\n * two intents for one package, and files are staged per package rather than per subpath, so\n * neither can be honoured as written.\n */\nexport const functionDefSchema = z\n\t.strictObject({\n\t\tname: z.string().min(1).max(255),\n\t\tsource: z.string().min(1),\n\t\tenv: functionEnvSchema.optional(),\n\t\texternalPackages: functionExternalPackagesSchema.optional(),\n\t\tbundler: bundlerSchema.optional(),\n\t\tdev: functionDevConfigSchema.optional(),\n\t\ttriggers: z.array(functionScheduleTriggerSchema).optional(),\n\t\tcustomDomains: customDomainsSchema.optional(),\n\t})\n\t.check((ctx) => {\n\t\tconst entries = ctx.value.externalPackages ?? [];\n\n\t\t// Other bundlers own their output, so `externalPackages` would be ignored.\n\t\tif (\n\t\t\tctx.value.externalPackages !== undefined &&\n\t\t\t!isEsbuildBundler(ctx.value.bundler)\n\t\t) {\n\t\t\tctx.issues.push({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tinput: ctx.value.externalPackages,\n\t\t\t\tpath: [\"externalPackages\"],\n\t\t\t\tmessage: `externalPackages only applies to the \"esbuild\" bundler; the \"${\n\t\t\t\t\ttypeof ctx.value.bundler === \"function\"\n\t\t\t\t\t\t? \"custom\"\n\t\t\t\t\t\t: ctx.value.bundler\n\t\t\t\t}\" bundler controls its own output. Remove externalPackages or switch to the esbuild bundler`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst seenNames = new Map<string, number>();\n\t\tconst rootIntent = new Map<\n\t\t\tstring,\n\t\t\t{ includeFiles: boolean; at: string }\n\t\t>();\n\n\t\tentries.forEach((entry, index) => {\n\t\t\tconst name = entryName(entry);\n\t\t\tconst includeFiles = entryIncludesFiles(entry);\n\n\t\t\tif (includeFiles && !stageablePackageName(name)) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`\"${name}\" does not name a single installable package, so its files cannot ` +\n\t\t\t\t\t\t`be staged. Name one package, or set includeFiles: false to leave the ` +\n\t\t\t\t\t\t`import unresolved without shipping anything for it`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst firstIndex = seenNames.get(name);\n\t\t\tif (firstIndex !== undefined) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage: `\"${name}\" is listed more than once (first at index ${firstIndex})`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tseenNames.set(name, index);\n\n\t\t\t// Files are installed and traced per package, so two specifiers that resolve to the\n\t\t\t// same package cannot disagree about whether that package's files ship.\n\t\t\tconst root = externalPackageRoot(name);\n\t\t\tconst prior = rootIntent.get(root);\n\t\t\tif (prior !== undefined && prior.includeFiles !== includeFiles) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`\"${name}\" and \"${prior.at}\" are both part of the \"${root}\" package but disagree ` +\n\t\t\t\t\t\t`about includeFiles; files ship per package, so the whole package either ships or does not`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trootIntent.set(root, { includeFiles, at: name });\n\t\t});\n\t});\n\n/** Static definition of a bucket (existence). Name is the record key. */\nexport const bucketDefSchema = z.strictObject({\n\taccess: z\n\t\t.union([z.literal(\"private\"), z.literal(\"public_read\")])\n\t\t.optional(),\n});\n\n/**\n * Functions record with trigger-name uniqueness. Used as both top-level `functions`\n * and `preview.functions` so {@link previewInputSchema} (`schemas.preview`) keeps the\n * same validation when parsed on its own.\n */\nexport const functionsRecordSchema = z\n\t.record(functionSlugSchema, functionDefSchema)\n\t.superRefine((functions, ctx) => {\n\t\tconst byName = new Map<string, string>();\n\t\tfor (const [slug, fn] of Object.entries(functions)) {\n\t\t\tconst seenOnFn = new Set<string>();\n\t\t\tfor (const [index, trigger] of (fn.triggers ?? []).entries()) {\n\t\t\t\tif (seenOnFn.has(trigger.name)) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tpath: [slug, \"triggers\", index, \"name\"],\n\t\t\t\t\t\tmessage: `trigger name \"${trigger.name}\" is listed more than once on function \"${slug}\"`,\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tseenOnFn.add(trigger.name);\n\t\t\t\tconst prior = byName.get(trigger.name);\n\t\t\t\tif (prior !== undefined) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tpath: [slug, \"triggers\", index, \"name\"],\n\t\t\t\t\t\tmessage: `trigger name \"${trigger.name}\" is already used by function \"${prior}\"`,\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbyName.set(trigger.name, slug);\n\t\t\t}\n\t\t}\n\t});\n\n/** Static, beta Preview feature set: AI Gateway toggle + functions/buckets records. */\nexport const previewInputSchema = z.strictObject({\n\taiGateway: serviceToggleInputSchema.optional(),\n\tfunctions: functionsRecordSchema.optional(),\n\tbuckets: z.record(bucketNameSchema, bucketDefSchema).optional(),\n});\n\n/** Per-function deploy tuning returned by the `branch` closure. */\nexport const functionTuningSchema = z.strictObject({\n\truntime: runtimeSchema.optional(),\n\tcustomDomains: customDomainsSchema.optional(),\n});\n\n/** Per-branch Preview tuning. Keys must be slugs declared in the static `preview`. */\nconst previewTuningSchema = z.strictObject({\n\tfunctions: z.record(functionSlugSchema, functionTuningSchema).optional(),\n});\n\n/**\n * The object returned by the `branch` closure. Validated on every `resolveConfig` call so\n * tuning errors point at the concrete branch target that triggered them.\n */\nexport const branchTuningSchema = z\n\t.strictObject({\n\t\tparent: z.string().optional(),\n\t\tprotected: z.boolean().optional(),\n\t\tttl: z\n\t\t\t.union([z.string(), z.number()])\n\t\t\t.optional()\n\t\t\t.superRefine((value, ctx) => {\n\t\t\t\tif (value === undefined) return;\n\t\t\t\tconst result = parseBranchTtl(value);\n\t\t\t\tif (\"error\" in result) {\n\t\t\t\t\tctx.addIssue({ code: \"custom\", message: result.error });\n\t\t\t\t}\n\t\t\t}),\n\t\tpostgres: postgresConfigSchema.optional(),\n\t\tfunctions: z\n\t\t\t.record(functionSlugSchema, functionTuningSchema)\n\t\t\t.optional(),\n\t\tpreview: previewTuningSchema.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\tvalidateParentReference({\n\t\t\tctx,\n\t\t\tpath: [\"parent\"],\n\t\t\tparent: cfg.parent,\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.functions !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.functions !== undefined,\n\t\t\tgaPath: \"functions\",\n\t\t\tpreviewPath: \"preview.functions\",\n\t\t});\n\t});\n\n/**\n * The top-level object accepted by `defineConfig`. The `branch` closure is validated\n * structurally as a function here; its returned tuning is validated per-evaluation by\n * {@link branchTuningSchema} inside `resolveConfig`.\n */\nexport const configInputSchema = z\n\t.strictObject({\n\t\tauth: serviceToggleInputSchema.optional(),\n\t\tdataApi: dataApiInputSchema.optional(),\n\t\taiGateway: serviceToggleInputSchema.optional(),\n\t\tfunctions: functionsRecordSchema.optional(),\n\t\tbuckets: z.record(bucketNameSchema, bucketDefSchema).optional(),\n\t\tpreview: previewInputSchema.optional(),\n\t\tbranch: z\n\t\t\t.custom<(...args: unknown[]) => unknown>(\n\t\t\t\t(value) => typeof value === \"function\",\n\t\t\t\t{\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"branch must be a function: `branch: (branch) => ({ … })`\",\n\t\t\t\t},\n\t\t\t)\n\t\t\t.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.aiGateway !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.aiGateway !== undefined,\n\t\t\tgaPath: \"aiGateway\",\n\t\t\tpreviewPath: \"preview.aiGateway\",\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.functions !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.functions !== undefined,\n\t\t\tgaPath: \"functions\",\n\t\t\tpreviewPath: \"preview.functions\",\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.buckets !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.buckets !== undefined,\n\t\t\tgaPath: \"buckets\",\n\t\t\tpreviewPath: \"preview.buckets\",\n\t\t});\n\t\t// A Data API verified by Neon Auth (`authProvider: \"neon\"`, the default) needs Neon\n\t\t// Auth enabled on the same branch so the tokens it verifies actually exist. Enforce\n\t\t// the same invariant the `defineConfig` type-level check expresses, at runtime.\n\t\tif (!isToggleEnabledValue(cfg.dataApi)) return;\n\t\tif (dataApiAuthProviderValue(cfg.dataApi) !== \"neon\") return;\n\t\tif (!isToggleEnabledValue(cfg.auth)) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"auth\"],\n\t\t\t\tmessage:\n\t\t\t\t\t'dataApi with authProvider \"neon\" requires Neon Auth — set `auth: true` (or `auth: { enabled: true }`), or use `dataApi.authProvider: \"external\"` with your own `jwksUrl`.',\n\t\t\t});\n\t\t}\n\t});\n\nfunction rejectDuplicateHome(\n\tctx: z.RefinementCtx,\n\targs: {\n\t\tgaPresent: boolean;\n\t\tpreviewPresent: boolean;\n\t\tgaPath: string;\n\t\tpreviewPath: string;\n\t},\n): void {\n\tif (!args.gaPresent || !args.previewPresent) return;\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tpath: args.gaPath.split(\".\"),\n\t\tmessage: `${args.gaPath} is also declared as ${args.previewPath}. Keep ${args.gaPath} and remove ${args.previewPath}.`,\n\t});\n}\n\n/**\n * Whether a parsed `auth` / `dataApi` toggle value is enabled: a present object (or `true`)\n * is on unless `enabled` is explicitly `false`. Mirrors `isServiceEnabled` in\n * `define-config.ts`, operating on the already-validated runtime value.\n */\nfunction isToggleEnabledValue(value: unknown): boolean {\n\tif (value === undefined || value === null) return false;\n\tif (typeof value === \"boolean\") return value;\n\tif (typeof value === \"object\") {\n\t\treturn (value as { enabled?: unknown }).enabled !== false;\n\t}\n\treturn false;\n}\n\n/** Read the (defaulted) `authProvider` from a parsed `dataApi` value. */\nfunction dataApiAuthProviderValue(value: unknown): \"neon\" | \"external\" {\n\tif (value !== null && typeof value === \"object\") {\n\t\tconst provider = (value as { authProvider?: unknown }).authProvider;\n\t\tif (provider === \"external\") return \"external\";\n\t}\n\treturn \"neon\";\n}\n\nfunction validateParentReference(args: {\n\tctx: z.RefinementCtx;\n\tpath: (string | number)[];\n\tparent: string | undefined;\n}): void {\n\tconst { ctx, path, parent } = args;\n\tif (parent === undefined) return;\n\n\tconst patternCheck = validatePattern(parent);\n\tif (\"error\" in patternCheck) {\n\t\tctx.addIssue({ code: \"custom\", path, message: patternCheck.error });\n\t} else if (isWildcardPattern(parent)) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath,\n\t\t\tmessage: `parent must be a concrete branch name (no wildcards), got \"${parent}\"`,\n\t\t});\n\t}\n}\n\n/**\n * Convert the structured {@link z.ZodError} produced by `configSchema.safeParse` into the\n * `string[]` shape used by {@link import(\"./errors.js\").ConfigValidationError}.\n *\n * Issue paths are rendered as dot-separated property accesses (`postgres.computeSettings`)\n * and unknown-key issues from `strictObject` are normalised so the message contains the\n * substring \"unknown key\" — keeping pre-zod assertions in test suites and downstream tools\n * stable.\n */\nexport function formatZodIssues(error: z.ZodError): string[] {\n\treturn error.issues.map((issue) => {\n\t\tconst path = renderPath(issue.path);\n\t\tconst message = normaliseIssueMessage(issue);\n\t\treturn path ? `${path}: ${message}` : message;\n\t});\n}\n\nfunction renderPath(path: ReadonlyArray<PropertyKey>): string {\n\tlet out = \"\";\n\tfor (const segment of path) {\n\t\tif (typeof segment === \"number\") out += `[${segment}]`;\n\t\telse if (out === \"\") out += String(segment);\n\t\telse out += `.${String(segment)}`;\n\t}\n\treturn out;\n}\n\nfunction normaliseIssueMessage(issue: z.core.$ZodIssue): string {\n\tif (issue.code === \"unrecognized_keys\") {\n\t\tconst keys = issue.keys ?? [];\n\t\tconst formatted = keys.map((k) => JSON.stringify(k)).join(\", \");\n\t\treturn `unknown key${keys.length === 1 ? \"\" : \"s\"}: ${formatted}`;\n\t}\n\tif (issue.code === \"invalid_key\") {\n\t\t// A record *key* that fails its key schema (e.g. a bad function slug) surfaces in\n\t\t// zod as a single `invalid_key` issue whose own `message` is the generic, useless\n\t\t// \"Invalid key in record\". The actual reason — the function-slug regex rule, say —\n\t\t// lives in the nested key-schema `issues`. Hoist those so the user sees *why* the\n\t\t// key was rejected (the offending key itself is already in the issue `path`).\n\t\tconst reasons = issue.issues\n\t\t\t.map((nested) => nested.message)\n\t\t\t.filter((message) => message.length > 0);\n\t\tif (reasons.length > 0) return reasons.join(\"; \");\n\t}\n\treturn issue.message;\n}\n"],"mappings":";;;;;;;;AAWA,MAAM,qBAAqB;;AAE3B,MAA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":["../../src/lib/schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n\tcustomDomainValidationError,\n\tnormalizeCustomDomain,\n} from \"./custom-domain.js\";\nimport { parseBranchTtl, parseSuspendTimeout } from \"./duration.js\";\nimport { externalPackageRoot } from \"./external-packages.js\";\nimport { isWildcardPattern, validatePattern } from \"./patterns.js\";\nimport { COMPUTE_UNITS, type FunctionBundlerInput } from \"./types.js\";\n\n/** Autoscaling max from the compute size table; larger sizes are fixed-size only. */\nconst AUTOSCALING_MAX_CU = 16;\n/** Documented ceiling on `max - min` when both bounds are set and differ. */\nconst AUTOSCALING_MAX_RANGE_CU = 8;\n\nconst computeUnitSchema = z.literal(COMPUTE_UNITS, {\n\terror: (issue) =>\n\t\t`must be a compute size Neon offers: 0.25, 0.5, an integer 1-16, or an even integer 18-56 (got ${JSON.stringify(issue.input)})`,\n});\n\n/**\n * Zod schema for {@link import(\"./types.js\").ComputeSettings}.\n *\n * CU values come from {@link COMPUTE_UNITS} (the Console size table). Plan limits are\n * the API's job. Cross-field autoscaling rules apply only when both bounds are set:\n * `min <= max`; if they differ, each bound is ≤ 16 and `max - min` ≤ 8. A single bound\n * cannot be checked against those rules because the other end is the project's default.\n *\n * `suspendTimeout` can be:\n * - `false` (never suspend)\n * - duration string like \"5m\", \"1h\" (must be 60s-604800s when parsed)\n * - number in seconds (60-604800, or -1/0 for special values)\n * - `undefined` (use platform default)\n */\nexport const computeSettingsSchema = z\n\t.strictObject({\n\t\tautoscalingLimitMinCu: computeUnitSchema.optional(),\n\t\tautoscalingLimitMaxCu: computeUnitSchema.optional(),\n\t\tsuspendTimeout: z\n\t\t\t.union([z.literal(false), z.string(), z.number()])\n\t\t\t.optional()\n\t\t\t.superRefine((value, ctx) => {\n\t\t\t\tif (value === undefined) return; // undefined is valid (use platform default)\n\t\t\t\tconst result = parseSuspendTimeout(value);\n\t\t\t\tif (\"error\" in result) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: result.error,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}),\n\t})\n\t.superRefine((settings, ctx) => {\n\t\tconst { autoscalingLimitMinCu: min, autoscalingLimitMaxCu: max } =\n\t\t\tsettings;\n\t\tif (min === undefined || max === undefined) return;\n\t\tif (min > max) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMinCu\"],\n\t\t\t\tmessage: `autoscalingLimitMinCu (${min}) must be <= autoscalingLimitMaxCu (${max})`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (min === max) return;\n\t\tconst overMaxMessage = (field: string, value: number) =>\n\t\t\t`${field} (${value}) exceeds the autoscaling maximum of ${AUTOSCALING_MAX_CU} CU — sizes above ${AUTOSCALING_MAX_CU} are fixed-size only (set autoscalingLimitMinCu = autoscalingLimitMaxCu)`;\n\t\tif (min > AUTOSCALING_MAX_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMinCu\"],\n\t\t\t\tmessage: overMaxMessage(\"autoscalingLimitMinCu\", min),\n\t\t\t});\n\t\t}\n\t\tif (max > AUTOSCALING_MAX_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMaxCu\"],\n\t\t\t\tmessage: overMaxMessage(\"autoscalingLimitMaxCu\", max),\n\t\t\t});\n\t\t}\n\t\tif (max - min > AUTOSCALING_MAX_RANGE_CU) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"autoscalingLimitMaxCu\"],\n\t\t\t\tmessage: `autoscaling range cannot exceed ${AUTOSCALING_MAX_RANGE_CU} CU: min ${min} to max ${max} is a range of ${max - min}`,\n\t\t\t});\n\t\t}\n\t});\n\n/** Object form of a service toggle (`{ enabled?: boolean }`). */\nexport const serviceToggleSchema = z.strictObject({\n\tenabled: z.boolean().optional(),\n});\n\n/** A service toggle as written in a policy: `boolean` or `{ enabled?: boolean }`. */\nexport const serviceToggleInputSchema = z.union([\n\tz.boolean(),\n\tserviceToggleSchema,\n]);\n\n/**\n * Reusable Data API runtime settings (camelCase mirror of the Neon API `DataAPISettings`).\n * `strictObject` so a typo / snake_case key fails loudly instead of being silently dropped.\n */\nexport const dataApiSettingsSchema = z.strictObject({\n\tdbAggregatesEnabled: z.boolean().optional(),\n\tdbAnonRole: z.string().optional(),\n\tdbExtraSearchPath: z.string().optional(),\n\tdbMaxRows: z.number().int().optional(),\n\tdbSchemas: z.array(z.string()).optional(),\n\tjwtRoleClaimKey: z.string().optional(),\n\tjwtCacheMaxLifetime: z.number().int().optional(),\n\topenapiMode: z\n\t\t.union([z.literal(\"ignore-privileges\"), z.literal(\"disabled\")])\n\t\t.optional(),\n\tserverCorsAllowedOrigins: z.string().optional(),\n\tserverTimingEnabled: z.boolean().optional(),\n});\n\n/** Names of the external-IdP-only fields, forbidden when `authProvider` is `\"neon\"`. */\nconst DATA_API_EXTERNAL_ONLY_KEYS = [\n\t\"jwksUrl\",\n\t\"providerName\",\n\t\"jwtAudience\",\n] as const;\n\n/**\n * Object form of the `dataApi` toggle. A single `strictObject` plus a `superRefine` (rather\n * than a discriminated union) so the `\"neon\"` default works without the discriminator being\n * present, and so the \"external-only field with authProvider neon\" error points at the exact\n * offending key — mirroring the `?: never` type-level guard at runtime.\n */\nexport const dataApiConfigSchema = z\n\t.strictObject({\n\t\tenabled: z.boolean().optional(),\n\t\tauthProvider: z\n\t\t\t.union([z.literal(\"neon\"), z.literal(\"external\")])\n\t\t\t.optional(),\n\t\tjwksUrl: z.string().optional(),\n\t\tproviderName: z.string().optional(),\n\t\tjwtAudience: z.string().optional(),\n\t\tsettings: dataApiSettingsSchema.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\tconst provider = cfg.authProvider ?? \"neon\";\n\t\tif (provider !== \"neon\") return;\n\t\tfor (const key of DATA_API_EXTERNAL_ONLY_KEYS) {\n\t\t\tif (cfg[key] !== undefined) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tpath: [key],\n\t\t\t\t\tmessage: `${key} is only allowed with authProvider: \"external\" — Neon supplies it for authProvider: \"neon\".`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\n/** A `dataApi` toggle as written in a policy: `boolean` or {@link dataApiConfigSchema}. */\nexport const dataApiInputSchema = z.union([z.boolean(), dataApiConfigSchema]);\n\nexport const postgresConfigSchema = z.strictObject({\n\tcomputeSettings: computeSettingsSchema.optional(),\n});\n\n/**\n * Branch-unique function slug. Mirrors the Neon Functions API path-segment rule\n * (`platform/internal/platform/functions/name.go`): 1–20 lowercase letters and digits.\n * Used as the **key schema** of the `functions` record, so a bad slug fails\n * validation with a path pointing at the offending key and duplicate slugs are impossible\n * by construction (object keys are unique).\n */\nconst functionSlugSchema = z\n\t.string()\n\t.regex(\n\t\t/^[a-z0-9]{1,20}$/,\n\t\t\"function slug must be 1-20 lowercase letters and digits (no hyphens or other characters)\",\n\t);\n\n/** Bucket name: 1–255 chars. Used as the key schema of the `buckets` record. */\nconst bucketNameSchema = z.string().min(1).max(255);\n\n/**\n * A single function environment-variable value. Must be a defined string: a `process.env.X`\n * that is unset evaluates to `undefined`, and the bare `z.string()` message for that case\n * (`Invalid input: expected string, received undefined`) gives no hint that an env var is the\n * culprit. The custom `error` replaces *only* the `undefined` case with a message that names\n * the offending function + env key (read from the issue path) and how to fix it; any other\n * wrong type keeps zod's default (`expected string, received number`, …).\n */\nconst functionEnvValueSchema = z.string({\n\terror: (issue) => {\n\t\tif (issue.input !== undefined) return undefined;\n\t\tconst path = issue.path ?? [];\n\t\tconst key = path.length > 0 ? String(path[path.length - 1]) : undefined;\n\t\tconst functionsIndex = path.indexOf(\"functions\");\n\t\tconst slug =\n\t\t\tfunctionsIndex >= 0 && functionsIndex + 1 < path.length\n\t\t\t\t? String(path[functionsIndex + 1])\n\t\t\t\t: undefined;\n\t\tconst subject =\n\t\t\tslug !== undefined && key !== undefined\n\t\t\t\t? `Environment variable \"${key}\" for function \"${slug}\"`\n\t\t\t\t: key !== undefined\n\t\t\t\t\t? `Environment variable \"${key}\"`\n\t\t\t\t\t: \"An environment variable\";\n\t\treturn `${subject} is undefined — its value (typically a \\`process.env.*\\`) is unset. Set it (for example \\`neon deploy --env <file>\\`) or omit the key from neon.ts if you do not want to write it. Do not coerce a missing value to an empty string: that uploads and deletes the live key.`;\n\t},\n});\n\n/**\n * Per-function environment map. Every value must be a defined string (see\n * {@link functionEnvValueSchema}): a `process.env.X` that is unset surfaces as `undefined` and\n * is rejected here (rather than silently shipping `undefined` into the deployment).\n */\nconst functionEnvSchema = z.record(z.string(), functionEnvValueSchema);\n\n/**\n * TCP port for a function's local dev server. Excludes 0 (which means \"any port\" to the OS\n * — `neon dev` expresses \"pick one for me\" by omitting `port`, not by passing 0).\n */\nconst devPortSchema = z.number().int().min(1).max(65535);\n\n/**\n * Local-dev settings for a function (`neon dev` only; never affects deploy). `port` is bound\n * exactly when set (and `neon dev` fails if it is taken), or a free port is found when omitted.\n */\nconst functionDevConfigSchema = z.strictObject({\n\tport: devPortSchema.optional(),\n});\n\nconst functionScheduleTriggerSchema = z.strictObject({\n\ttype: z.literal(\"schedule\"),\n\tfunction: functionSlugSchema,\n\tcron: z.string().min(1),\n\tfunctionPath: z.string().min(1).optional(),\n\tenabled: z.boolean().optional(),\n});\n\nconst functionStorageObjectCreatedTriggerSchema = z.strictObject({\n\ttype: z.literal(\"storage_object_created\"),\n\tfunction: functionSlugSchema,\n\tbucket: bucketNameSchema,\n\tprefix: z.string().min(1).max(1024).optional(),\n\tfunctionPath: z.string().min(1).optional(),\n\tenabled: z.boolean().optional(),\n});\n\nconst functionTriggerSchema = z.discriminatedUnion(\"type\", [\n\tfunctionScheduleTriggerSchema,\n\tfunctionStorageObjectCreatedTriggerSchema,\n]);\n\nconst triggerNameSchema = z.string().min(1).max(255);\n\nconst triggersRecordSchema = z.record(triggerNameSchema, functionTriggerSchema);\n\nconst customDomainSchema = z.string().superRefine((value, ctx) => {\n\tconst message = customDomainValidationError(value);\n\tif (message) {\n\t\tctx.addIssue({ code: \"custom\", message });\n\t}\n});\n\nconst customDomainsSchema = z\n\t.array(customDomainSchema)\n\t.superRefine((domains, ctx) => {\n\t\tconst seen = new Set<string>();\n\t\tfor (const [index, domain] of domains.entries()) {\n\t\t\tconst normalized = normalizeCustomDomain(domain);\n\t\t\tif (seen.has(normalized)) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tpath: [index],\n\t\t\t\t\tmessage: `custom domain \"${normalized}\" is listed more than once`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(normalized);\n\t\t}\n\t});\n\n/**\n * The name of a package the bundler must leave alone. Accepts what esbuild's `external`\n * accepts for a package — a bare name, a scope, or a subpath — and rejects a relative or\n * absolute path, which names a local module rather than a dependency and is never the right\n * thing to externalize (the bundle would ship an import of a file that isn't deployed).\n */\nconst externalPackageNameSchema = z\n\t.string()\n\t.min(1)\n\t.refine((value) => !value.startsWith(\".\") && !value.startsWith(\"/\"), {\n\t\terror: 'must be a package name such as \"microsandbox\" or \"@scope/pkg\", not a relative or absolute path',\n\t});\n\n/**\n * An entry whose files are staged has to name one installable package, because the deploy\n * hands its root to `npm install`. esbuild's `external` additionally accepts a `*` wildcard\n * and a bare scope, which name a set rather than a package — legal only when nothing is\n * being installed for them.\n */\nconst stageablePackageName = (value: string): boolean => {\n\t// A protocol (`node:fs`, `npm:pkg`) is a specifier, not something to install.\n\tif (/^[a-z][a-z0-9+.-]*:/i.test(value)) return false;\n\t// An empty segment (`foo//bar`) or a traversal is not a subpath the deploy can act on.\n\tconst segments = value.split(\"/\");\n\tif (segments.some((segment) => segment === \"\" || segment === \"..\")) {\n\t\treturn false;\n\t}\n\treturn isNpmPackageName(externalPackageRoot(value));\n};\n\n/**\n * npm's own rules for a package name, which is what the deploy hands to `npm install`.\n * Deliberately strict: whatever slips through here becomes a subprocess argument.\n */\nconst NPM_NAME_SEGMENT = /^[a-z0-9~][a-z0-9._~-]*$/;\n\nconst isNpmPackageName = (root: string): boolean => {\n\tif (root.length === 0 || root.length > 214) return false;\n\tif (!root.startsWith(\"@\")) return NPM_NAME_SEGMENT.test(root);\n\tconst [scope, name, ...rest] = root.slice(1).split(\"/\");\n\t// A bare scope names every package in it, not one package.\n\tif (rest.length > 0 || name === undefined) return false;\n\treturn NPM_NAME_SEGMENT.test(scope) && NPM_NAME_SEGMENT.test(name);\n};\n\n/**\n * One entry of `externalPackages`. A bare string is the common case and ships the package's\n * files; the object form exists only to turn that off. See {@link FunctionDef.externalPackages}.\n */\nconst externalPackageEntrySchema = z.union([\n\texternalPackageNameSchema,\n\tz.strictObject({\n\t\tname: externalPackageNameSchema,\n\t\tincludeFiles: z.boolean().optional(),\n\t}),\n]);\n\n/**\n * Per-function list of packages esbuild leaves unresolved at deploy time. See\n * {@link FunctionDef.externalPackages}.\n */\nconst functionExternalPackagesSchema = z.array(externalPackageEntrySchema);\n\nconst runtimeSchema = z.literal(\"nodejs24\");\n\nconst bundlerSchema = z.custom<FunctionBundlerInput>(\n\t(value) =>\n\t\tvalue === \"esbuild\" || value === \"none\" || typeof value === \"function\",\n\t{\n\t\tmessage:\n\t\t\t'bundler must be \"esbuild\", \"none\", or a function (fn) => Promise<FunctionBundle>',\n\t},\n);\n\nconst isEsbuildBundler = (\n\tbundler: z.infer<typeof bundlerSchema> | undefined,\n): boolean => bundler === undefined || bundler === \"esbuild\";\n\n/** The declared name of an entry, whichever form it was written in. */\nconst entryName = (\n\tentry: z.infer<typeof externalPackageEntrySchema>,\n): string => (typeof entry === \"string\" ? entry : entry.name);\n\n/** Whether an entry ships its files. Absent means yes — see `FunctionDef.externalPackages`. */\nconst entryIncludesFiles = (\n\tentry: z.infer<typeof externalPackageEntrySchema>,\n): boolean => (typeof entry === \"string\" ? true : entry.includeFiles !== false);\n\n/**\n * Static definition of a function (existence). The slug is the record key (validated by\n * {@link functionSlugSchema}), so it is not a field here. Deploy tuning (`runtime`) lives\n * in the `branch` closure, not here.\n *\n * `externalPackages` entries are checked for contradictions: the same package named twice,\n * or named once bare and once through a subpath with a different `includeFiles`. Both state\n * two intents for one package, and files are staged per package rather than per subpath, so\n * neither can be honoured as written.\n */\nexport const functionDefSchema = z\n\t.strictObject({\n\t\tname: z.string().min(1).max(255),\n\t\tsource: z.string().min(1),\n\t\tenv: functionEnvSchema.optional(),\n\t\texternalPackages: functionExternalPackagesSchema.optional(),\n\t\tbundler: bundlerSchema.optional(),\n\t\tdev: functionDevConfigSchema.optional(),\n\t\tcustomDomains: customDomainsSchema.optional(),\n\t})\n\t.check((ctx) => {\n\t\tconst entries = ctx.value.externalPackages ?? [];\n\n\t\t// Other bundlers own their output, so `externalPackages` would be ignored.\n\t\tif (\n\t\t\tctx.value.externalPackages !== undefined &&\n\t\t\t!isEsbuildBundler(ctx.value.bundler)\n\t\t) {\n\t\t\tctx.issues.push({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tinput: ctx.value.externalPackages,\n\t\t\t\tpath: [\"externalPackages\"],\n\t\t\t\tmessage: `externalPackages only applies to the \"esbuild\" bundler; the \"${\n\t\t\t\t\ttypeof ctx.value.bundler === \"function\"\n\t\t\t\t\t\t? \"custom\"\n\t\t\t\t\t\t: ctx.value.bundler\n\t\t\t\t}\" bundler controls its own output. Remove externalPackages or switch to the esbuild bundler`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst seenNames = new Map<string, number>();\n\t\tconst rootIntent = new Map<\n\t\t\tstring,\n\t\t\t{ includeFiles: boolean; at: string }\n\t\t>();\n\n\t\tentries.forEach((entry, index) => {\n\t\t\tconst name = entryName(entry);\n\t\t\tconst includeFiles = entryIncludesFiles(entry);\n\n\t\t\tif (includeFiles && !stageablePackageName(name)) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`\"${name}\" does not name a single installable package, so its files cannot ` +\n\t\t\t\t\t\t`be staged. Name one package, or set includeFiles: false to leave the ` +\n\t\t\t\t\t\t`import unresolved without shipping anything for it`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst firstIndex = seenNames.get(name);\n\t\t\tif (firstIndex !== undefined) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage: `\"${name}\" is listed more than once (first at index ${firstIndex})`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tseenNames.set(name, index);\n\n\t\t\t// Files are installed and traced per package, so two specifiers that resolve to the\n\t\t\t// same package cannot disagree about whether that package's files ship.\n\t\t\tconst root = externalPackageRoot(name);\n\t\t\tconst prior = rootIntent.get(root);\n\t\t\tif (prior !== undefined && prior.includeFiles !== includeFiles) {\n\t\t\t\tctx.issues.push({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tinput: entry,\n\t\t\t\t\tpath: [\"externalPackages\", index],\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`\"${name}\" and \"${prior.at}\" are both part of the \"${root}\" package but disagree ` +\n\t\t\t\t\t\t`about includeFiles; files ship per package, so the whole package either ships or does not`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trootIntent.set(root, { includeFiles, at: name });\n\t\t});\n\t});\n\n/** Static definition of a bucket (existence). Name is the record key. */\nexport const bucketDefSchema = z.strictObject({\n\taccess: z\n\t\t.union([z.literal(\"private\"), z.literal(\"public_read\")])\n\t\t.optional(),\n});\n\n/**\n * Functions record. Used as both top-level `functions` and `preview.functions`\n * so {@link previewInputSchema} (`schemas.preview`) keeps the same validation\n * when parsed on its own.\n */\nexport const functionsRecordSchema = z.record(\n\tfunctionSlugSchema,\n\tfunctionDefSchema,\n);\n\n/** Static, beta Preview feature set: AI Gateway toggle + functions/buckets records. */\nexport const previewInputSchema = z.strictObject({\n\taiGateway: serviceToggleInputSchema.optional(),\n\tfunctions: functionsRecordSchema.optional(),\n\tbuckets: z.record(bucketNameSchema, bucketDefSchema).optional(),\n});\n\n/** Per-function deploy tuning returned by the `branch` closure. */\nexport const functionTuningSchema = z.strictObject({\n\truntime: runtimeSchema.optional(),\n\tcustomDomains: customDomainsSchema.optional(),\n});\n\n/** Per-branch Preview tuning. Keys must be slugs declared in the static `preview`. */\nconst previewTuningSchema = z.strictObject({\n\tfunctions: z.record(functionSlugSchema, functionTuningSchema).optional(),\n});\n\n/**\n * The object returned by the `branch` closure. Validated on every `resolveConfig` call so\n * tuning errors point at the concrete branch target that triggered them.\n */\nexport const branchTuningSchema = z\n\t.strictObject({\n\t\tparent: z.string().optional(),\n\t\tprotected: z.boolean().optional(),\n\t\tttl: z\n\t\t\t.union([z.string(), z.number()])\n\t\t\t.optional()\n\t\t\t.superRefine((value, ctx) => {\n\t\t\t\tif (value === undefined) return;\n\t\t\t\tconst result = parseBranchTtl(value);\n\t\t\t\tif (\"error\" in result) {\n\t\t\t\t\tctx.addIssue({ code: \"custom\", message: result.error });\n\t\t\t\t}\n\t\t\t}),\n\t\tpostgres: postgresConfigSchema.optional(),\n\t\tfunctions: z\n\t\t\t.record(functionSlugSchema, functionTuningSchema)\n\t\t\t.optional(),\n\t\tpreview: previewTuningSchema.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\tvalidateParentReference({\n\t\t\tctx,\n\t\t\tpath: [\"parent\"],\n\t\t\tparent: cfg.parent,\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.functions !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.functions !== undefined,\n\t\t\tgaPath: \"functions\",\n\t\t\tpreviewPath: \"preview.functions\",\n\t\t});\n\t});\n\n/**\n * The top-level object accepted by `defineConfig`. The `branch` closure is validated\n * structurally as a function here; its returned tuning is validated per-evaluation by\n * {@link branchTuningSchema} inside `resolveConfig`.\n */\nexport const configInputSchema = z\n\t.strictObject({\n\t\tauth: serviceToggleInputSchema.optional(),\n\t\tdataApi: dataApiInputSchema.optional(),\n\t\taiGateway: serviceToggleInputSchema.optional(),\n\t\tfunctions: functionsRecordSchema.optional(),\n\t\tbuckets: z.record(bucketNameSchema, bucketDefSchema).optional(),\n\t\ttriggers: triggersRecordSchema.optional(),\n\t\tpreview: previewInputSchema.optional(),\n\t\tbranch: z\n\t\t\t.custom<(...args: unknown[]) => unknown>(\n\t\t\t\t(value) => typeof value === \"function\",\n\t\t\t\t{\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"branch must be a function: `branch: (branch) => ({ … })`\",\n\t\t\t\t},\n\t\t\t)\n\t\t\t.optional(),\n\t})\n\t.superRefine((cfg, ctx) => {\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.aiGateway !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.aiGateway !== undefined,\n\t\t\tgaPath: \"aiGateway\",\n\t\t\tpreviewPath: \"preview.aiGateway\",\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.functions !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.functions !== undefined,\n\t\t\tgaPath: \"functions\",\n\t\t\tpreviewPath: \"preview.functions\",\n\t\t});\n\t\trejectDuplicateHome(ctx, {\n\t\t\tgaPresent: cfg.buckets !== undefined,\n\t\t\tpreviewPresent: cfg.preview?.buckets !== undefined,\n\t\t\tgaPath: \"buckets\",\n\t\t\tpreviewPath: \"preview.buckets\",\n\t\t});\n\t\tvalidateAuthoredTriggers(cfg, ctx);\n\t\t// A Data API verified by Neon Auth (`authProvider: \"neon\"`, the default) needs Neon\n\t\t// Auth enabled on the same branch so the tokens it verifies actually exist. Enforce\n\t\t// the same invariant the `defineConfig` type-level check expresses, at runtime.\n\t\tif (!isToggleEnabledValue(cfg.dataApi)) return;\n\t\tif (dataApiAuthProviderValue(cfg.dataApi) !== \"neon\") return;\n\t\tif (!isToggleEnabledValue(cfg.auth)) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"auth\"],\n\t\t\t\tmessage:\n\t\t\t\t\t'dataApi with authProvider \"neon\" requires Neon Auth — set `auth: true` (or `auth: { enabled: true }`), or use `dataApi.authProvider: \"external\"` with your own `jwksUrl`.',\n\t\t\t});\n\t\t}\n\t});\n\nfunction validateAuthoredTriggers(\n\tcfg: {\n\t\tfunctions?: Record<string, unknown>;\n\t\tbuckets?: Record<string, unknown>;\n\t\tpreview?: {\n\t\t\tfunctions?: Record<string, unknown>;\n\t\t\tbuckets?: Record<string, unknown>;\n\t\t};\n\t\ttriggers?: Record<string, z.infer<typeof functionTriggerSchema>>;\n\t},\n\tctx: z.RefinementCtx,\n): void {\n\tif (cfg.triggers === undefined) return;\n\tconst functions = new Set(\n\t\tObject.keys(cfg.functions ?? cfg.preview?.functions ?? {}),\n\t);\n\tconst buckets = new Set(\n\t\tObject.keys(cfg.buckets ?? cfg.preview?.buckets ?? {}),\n\t);\n\tfor (const [name, trigger] of Object.entries(cfg.triggers)) {\n\t\tif (!functions.has(trigger.function)) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"triggers\", name, \"function\"],\n\t\t\t\tmessage: `trigger \"${name}\" references function \"${trigger.function}\", which is not declared in functions (or preview.functions)`,\n\t\t\t});\n\t\t}\n\t\tif (\n\t\t\ttrigger.type === \"storage_object_created\" &&\n\t\t\t!buckets.has(trigger.bucket)\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tpath: [\"triggers\", name, \"bucket\"],\n\t\t\t\tmessage: `trigger \"${name}\" references bucket \"${trigger.bucket}\", which is not declared in buckets (or preview.buckets)`,\n\t\t\t});\n\t\t}\n\t}\n}\n\nfunction rejectDuplicateHome(\n\tctx: z.RefinementCtx,\n\targs: {\n\t\tgaPresent: boolean;\n\t\tpreviewPresent: boolean;\n\t\tgaPath: string;\n\t\tpreviewPath: string;\n\t},\n): void {\n\tif (!args.gaPresent || !args.previewPresent) return;\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tpath: args.gaPath.split(\".\"),\n\t\tmessage: `${args.gaPath} is also declared as ${args.previewPath}. Keep ${args.gaPath} and remove ${args.previewPath}.`,\n\t});\n}\n\n/**\n * Whether a parsed `auth` / `dataApi` toggle value is enabled: a present object (or `true`)\n * is on unless `enabled` is explicitly `false`. Mirrors `isServiceEnabled` in\n * `define-config.ts`, operating on the already-validated runtime value.\n */\nfunction isToggleEnabledValue(value: unknown): boolean {\n\tif (value === undefined || value === null) return false;\n\tif (typeof value === \"boolean\") return value;\n\tif (typeof value === \"object\") {\n\t\treturn (value as { enabled?: unknown }).enabled !== false;\n\t}\n\treturn false;\n}\n\n/** Read the (defaulted) `authProvider` from a parsed `dataApi` value. */\nfunction dataApiAuthProviderValue(value: unknown): \"neon\" | \"external\" {\n\tif (value !== null && typeof value === \"object\") {\n\t\tconst provider = (value as { authProvider?: unknown }).authProvider;\n\t\tif (provider === \"external\") return \"external\";\n\t}\n\treturn \"neon\";\n}\n\nfunction validateParentReference(args: {\n\tctx: z.RefinementCtx;\n\tpath: (string | number)[];\n\tparent: string | undefined;\n}): void {\n\tconst { ctx, path, parent } = args;\n\tif (parent === undefined) return;\n\n\tconst patternCheck = validatePattern(parent);\n\tif (\"error\" in patternCheck) {\n\t\tctx.addIssue({ code: \"custom\", path, message: patternCheck.error });\n\t} else if (isWildcardPattern(parent)) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath,\n\t\t\tmessage: `parent must be a concrete branch name (no wildcards), got \"${parent}\"`,\n\t\t});\n\t}\n}\n\n/**\n * Convert the structured {@link z.ZodError} produced by `configSchema.safeParse` into the\n * `string[]` shape used by {@link import(\"./errors.js\").ConfigValidationError}.\n *\n * Issue paths are rendered as dot-separated property accesses (`postgres.computeSettings`)\n * and unknown-key issues from `strictObject` are normalised so the message contains the\n * substring \"unknown key\" — keeping pre-zod assertions in test suites and downstream tools\n * stable.\n */\nexport function formatZodIssues(error: z.ZodError): string[] {\n\treturn error.issues.map((issue) => {\n\t\tconst path = renderPath(issue.path);\n\t\tconst message = normaliseIssueMessage(issue);\n\t\treturn path ? `${path}: ${message}` : message;\n\t});\n}\n\nfunction renderPath(path: ReadonlyArray<PropertyKey>): string {\n\tlet out = \"\";\n\tfor (const segment of path) {\n\t\tif (typeof segment === \"number\") out += `[${segment}]`;\n\t\telse if (out === \"\") out += String(segment);\n\t\telse out += `.${String(segment)}`;\n\t}\n\treturn out;\n}\n\nfunction normaliseIssueMessage(issue: z.core.$ZodIssue): string {\n\tif (issue.code === \"unrecognized_keys\") {\n\t\tconst keys = issue.keys ?? [];\n\t\tconst formatted = keys.map((k) => JSON.stringify(k)).join(\", \");\n\t\treturn `unknown key${keys.length === 1 ? \"\" : \"s\"}: ${formatted}`;\n\t}\n\tif (issue.code === \"invalid_key\") {\n\t\t// A record *key* that fails its key schema (e.g. a bad function slug) surfaces in\n\t\t// zod as a single `invalid_key` issue whose own `message` is the generic, useless\n\t\t// \"Invalid key in record\". The actual reason — the function-slug regex rule, say —\n\t\t// lives in the nested key-schema `issues`. Hoist those so the user sees *why* the\n\t\t// key was rejected (the offending key itself is already in the issue `path`).\n\t\tconst reasons = issue.issues\n\t\t\t.map((nested) => nested.message)\n\t\t\t.filter((message) => message.length > 0);\n\t\tif (reasons.length > 0) return reasons.join(\"; \");\n\t}\n\treturn issue.message;\n}\n"],"mappings":";;;;;;;;AAWA,MAAM,qBAAqB;;AAE3B,MAAM,2BAA2B;AAEjC,MAAM,oBAAoB,EAAE,QAAQ,eAAe,EAClD,QAAQ,UACP,iGAAiG,KAAK,UAAU,MAAM,KAAK,EAAE,GAC/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IAAI,IAAI;CACvD;CACA,IAAI,MAAM,SAAS,eAAe;EAMjC,MAAM,UAAU,MAAM,OACpB,KAAK,WAAW,OAAO,OAAO,CAAC,CAC/B,QAAQ,YAAY,QAAQ,SAAS,CAAC;EACxC,IAAI,QAAQ,SAAS,GAAG,OAAO,QAAQ,KAAK,IAAI;CACjD;CACA,OAAO,MAAM;AACd"}
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -416,13 +416,6 @@ interface FunctionDef {
|
|
|
416
416
|
* `neon.ts`. Ignored at deploy time. See {@link FunctionDevConfig}.
|
|
417
417
|
*/
|
|
418
418
|
dev?: FunctionDevConfig;
|
|
419
|
-
/**
|
|
420
|
-
* Schedule triggers that invoke this function on a cron. Names must be unique among
|
|
421
|
-
* every trigger visible on the branch, including other functions. Applied after the
|
|
422
|
-
* function is deployed. Triggers that exist remotely but are omitted here are left
|
|
423
|
-
* alone.
|
|
424
|
-
*/
|
|
425
|
-
triggers?: FunctionScheduleTriggerDef[];
|
|
426
419
|
/**
|
|
427
420
|
* Customer-owned hostnames that should point at this function (beta).
|
|
428
421
|
* v1 only supports functions. Hostnames are unique across functions in the resolved
|
|
@@ -436,18 +429,41 @@ interface FunctionDef {
|
|
|
436
429
|
customDomains?: string[];
|
|
437
430
|
}
|
|
438
431
|
/**
|
|
439
|
-
* A
|
|
440
|
-
*
|
|
432
|
+
* A trigger that invokes a function. The trigger name is the record key in
|
|
433
|
+
* {@link Config.triggers}. `functionPath` defaults to `/`. `enabled` defaults to `true`.
|
|
434
|
+
*
|
|
435
|
+
* @example { type: "schedule", function: "cron", cron: "0 * * * *" }
|
|
436
|
+
* @example { type: "storage_object_created", function: "ingest", bucket: "assets", prefix: "logos/" }
|
|
437
|
+
*/
|
|
438
|
+
type FunctionTriggerDef = FunctionScheduleTriggerDef | FunctionStorageObjectCreatedTriggerDef;
|
|
439
|
+
/**
|
|
440
|
+
* A cron schedule that invokes a function. `function` is a slug from {@link Config.functions}
|
|
441
|
+
* (or deprecated `preview.functions`). `cron` is a numeric five-field expression in UTC.
|
|
441
442
|
*
|
|
442
|
-
* @example { type: "schedule",
|
|
443
|
+
* @example { type: "schedule", function: "cron", cron: "0 * * * *" }
|
|
443
444
|
*/
|
|
444
445
|
interface FunctionScheduleTriggerDef {
|
|
445
446
|
type: "schedule";
|
|
446
|
-
|
|
447
|
+
function: string;
|
|
447
448
|
cron: string;
|
|
448
449
|
functionPath?: string;
|
|
449
450
|
enabled?: boolean;
|
|
450
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* Invokes a function when an object is created in a bucket from {@link Config.buckets}
|
|
454
|
+
* (or deprecated `preview.buckets`). `prefix` is an exact object-key prefix; omit it to
|
|
455
|
+
* match every key in the bucket.
|
|
456
|
+
*
|
|
457
|
+
* @example { type: "storage_object_created", function: "ingest", bucket: "assets", prefix: "logos/" }
|
|
458
|
+
*/
|
|
459
|
+
interface FunctionStorageObjectCreatedTriggerDef {
|
|
460
|
+
type: "storage_object_created";
|
|
461
|
+
function: string;
|
|
462
|
+
bucket: string;
|
|
463
|
+
prefix?: string;
|
|
464
|
+
functionPath?: string;
|
|
465
|
+
enabled?: boolean;
|
|
466
|
+
}
|
|
451
467
|
/**
|
|
452
468
|
* A single capability a branch-scoped service credential may exercise (Preview). A
|
|
453
469
|
* credential is granted a set of these and may only perform the listed actions. Mirrors
|
|
@@ -624,6 +640,12 @@ interface Config<Auth extends ServiceToggleInput | undefined = ServiceToggleInpu
|
|
|
624
640
|
* Object-storage buckets to create, keyed by bucket name.
|
|
625
641
|
*/
|
|
626
642
|
buckets?: Buckets;
|
|
643
|
+
/**
|
|
644
|
+
* Function triggers, keyed by branch-unique name. Each value names the function
|
|
645
|
+
* (and, for `storage_object_created`, the bucket) it binds. Applied after functions
|
|
646
|
+
* are deployed. Triggers that exist remotely but are omitted here are left alone.
|
|
647
|
+
*/
|
|
648
|
+
triggers?: Record<string, FunctionTriggerDef>;
|
|
627
649
|
/**
|
|
628
650
|
* @deprecated Use top-level `aiGateway`, `functions`, and `buckets`.
|
|
629
651
|
*/
|
|
@@ -655,20 +677,30 @@ interface ResolvedFunctionConfig {
|
|
|
655
677
|
* (no defaults applied). Only consumed by `neon dev`; deploy ignores it.
|
|
656
678
|
*/
|
|
657
679
|
dev?: FunctionDevConfig;
|
|
658
|
-
triggers?: ResolvedFunctionScheduleTrigger[];
|
|
659
680
|
/**
|
|
660
681
|
* Normalized hostnames this function should own on the branch. Absent when this
|
|
661
682
|
* branch has no list to apply. Empty when tuning replaced the list with `[]`.
|
|
662
683
|
*/
|
|
663
684
|
customDomains?: string[];
|
|
664
685
|
}
|
|
686
|
+
type ResolvedFunctionTrigger = ResolvedFunctionScheduleTrigger | ResolvedFunctionStorageObjectCreatedTrigger;
|
|
665
687
|
interface ResolvedFunctionScheduleTrigger {
|
|
666
688
|
type: "schedule";
|
|
667
689
|
name: string;
|
|
690
|
+
functionSlug: string;
|
|
668
691
|
cron: string;
|
|
669
692
|
functionPath: string;
|
|
670
693
|
enabled: boolean;
|
|
671
694
|
}
|
|
695
|
+
interface ResolvedFunctionStorageObjectCreatedTrigger {
|
|
696
|
+
type: "storage_object_created";
|
|
697
|
+
name: string;
|
|
698
|
+
functionSlug: string;
|
|
699
|
+
bucketName: string;
|
|
700
|
+
prefix?: string;
|
|
701
|
+
functionPath: string;
|
|
702
|
+
enabled: boolean;
|
|
703
|
+
}
|
|
672
704
|
/** A bucket with its access level defaulted to `private`. */
|
|
673
705
|
interface ResolvedBucketConfig {
|
|
674
706
|
name: string;
|
|
@@ -712,6 +744,11 @@ interface ResolvedBranchConfig {
|
|
|
712
744
|
*/
|
|
713
745
|
dataApi?: ResolvedDataApiConfig;
|
|
714
746
|
preview?: ResolvedPreviewConfig;
|
|
747
|
+
/**
|
|
748
|
+
* Resolved triggers from {@link Config.triggers}. Absent when none are declared
|
|
749
|
+
* (hand-built configs may omit it).
|
|
750
|
+
*/
|
|
751
|
+
triggers?: ResolvedFunctionTrigger[];
|
|
715
752
|
}
|
|
716
753
|
/**
|
|
717
754
|
* One concrete change `pushConfig` made (or, in dry-run, would make) on the remote.
|
|
@@ -782,5 +819,5 @@ interface PushResult {
|
|
|
782
819
|
warnings: string[];
|
|
783
820
|
}
|
|
784
821
|
//#endregion
|
|
785
|
-
export { AppliedChange, BranchTarget, BranchTuning, BranchTuningFn, BucketAccessLevel, BucketDef, COMPUTE_UNITS, ComputeSettings, ComputeUnit, Config, ConflictReport, CredentialPrincipalType, CredentialScope, DATA_API_AUTH_PROVIDERS, DataApiAuthProvider, DataApiConfig, DataApiExternalAuthConfig, DataApiInput, DataApiNeonAuthConfig, DataApiSettings, DurationString, DurationUnit, ExternalPackageDef, ExternalPackageEntry, FunctionBundle, FunctionBundler, FunctionBundlerInput, FunctionDef, FunctionDevConfig, FunctionRuntime, FunctionScheduleTriggerDef, FunctionTuning, PostgresConfig, PreviewInput, PreviewTuning, PushResult, ResolvedBranchConfig, ResolvedBucketConfig, ResolvedDataApiConfig, ResolvedExternalPackage, ResolvedFunctionConfig, ResolvedFunctionScheduleTrigger, ResolvedPreviewConfig, ServiceEnabled, ServiceToggle, ServiceToggleInput };
|
|
822
|
+
export { AppliedChange, BranchTarget, BranchTuning, BranchTuningFn, BucketAccessLevel, BucketDef, COMPUTE_UNITS, ComputeSettings, ComputeUnit, Config, ConflictReport, CredentialPrincipalType, CredentialScope, DATA_API_AUTH_PROVIDERS, DataApiAuthProvider, DataApiConfig, DataApiExternalAuthConfig, DataApiInput, DataApiNeonAuthConfig, DataApiSettings, DurationString, DurationUnit, ExternalPackageDef, ExternalPackageEntry, FunctionBundle, FunctionBundler, FunctionBundlerInput, FunctionDef, FunctionDevConfig, FunctionRuntime, FunctionScheduleTriggerDef, FunctionStorageObjectCreatedTriggerDef, FunctionTriggerDef, FunctionTuning, PostgresConfig, PreviewInput, PreviewTuning, PushResult, ResolvedBranchConfig, ResolvedBucketConfig, ResolvedDataApiConfig, ResolvedExternalPackage, ResolvedFunctionConfig, ResolvedFunctionScheduleTrigger, ResolvedFunctionStorageObjectCreatedTrigger, ResolvedFunctionTrigger, ResolvedPreviewConfig, ServiceEnabled, ServiceToggle, ServiceToggleInput };
|
|
786
823
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/lib/types.ts"],"mappings":";;AAKA;AAKA;AAGA;AAeA;AAQK,cA/BQ,aA+BgB,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAiBxB,KA3CO,WAAA,GA2CM,CAAA,OA3CgB,aA2ChB,CAAA,CAAA,MAAA,CAAA;AAAA;AAQA,KAhDN,YAAA,GAgDM,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA;AAAqB;AACpC;AACC;AAAiB;AAAW;AAUhC;AAAgC;AAcP;AASA;AAqBe;AAAd;AAAa;AASvC;AAqBiB,KAvHL,cAAA,GAuHkB,GAAA,MAAA,GAvHW,YAuHX,EAAA;AAgB9B;AAeA;AAA0B;AAAO;AAE7B;AAEC;AAEC,KApJD,wBAAA,GAoJC,IAAA,GAAA,IAAA,GAAA,KAAA,GAAA,KAAA,GAAA,IAAA,GAAA,IAAA,GAAA,KAAA,GAAA,IAAA,GAA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