neon 2.47.0 → 3.0.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/_shared/env-core/env.js +558 -0
- package/dist/_shared/env-core/reuse-secrets.js +223 -0
- package/dist/commands/config.js +42 -8
- package/dist/commands/dev.js +47 -6
- package/dist/commands/env.js +1 -1
- package/dist/commands/functions.js +16 -2
- package/dist/dev/env.js +2 -2
- package/dist/dev/functions.js +5 -1
- package/dist/env_services.js +1 -1
- package/dist/parameters.gen.js +42 -42
- package/dist/utils/esbuild.js +51 -6
- package/package.json +5 -5
package/dist/parameters.gen.js
CHANGED
|
@@ -67,23 +67,23 @@ export const projectCreateRequest = {
|
|
|
67
67
|
},
|
|
68
68
|
'project.settings.audit_log_level': {
|
|
69
69
|
type: "string",
|
|
70
|
-
description:
|
|
70
|
+
description: "Audit logging level, set only on HIPAA-enabled organizations (absent otherwise). Values: `base`, `extended`, `full`; HIPAA defaults to `extended`. Cannot be lowered back to `base` once `extended` or `full`.",
|
|
71
71
|
demandOption: false,
|
|
72
72
|
choices: ["base", "extended", "full"],
|
|
73
73
|
},
|
|
74
74
|
'project.settings.hipaa': {
|
|
75
75
|
type: "boolean",
|
|
76
|
-
description:
|
|
76
|
+
description: "Enables HIPAA compliance mode for the project, including audit logging.",
|
|
77
77
|
demandOption: false,
|
|
78
78
|
},
|
|
79
79
|
'project.settings.preload_libraries.use_defaults': {
|
|
80
80
|
type: "boolean",
|
|
81
|
-
description:
|
|
81
|
+
description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.",
|
|
82
82
|
demandOption: false,
|
|
83
83
|
},
|
|
84
84
|
'project.settings.preload_libraries.enabled_libraries': {
|
|
85
85
|
type: "array",
|
|
86
|
-
description:
|
|
86
|
+
description: "Names of shared preload libraries to enable for the project.",
|
|
87
87
|
demandOption: false,
|
|
88
88
|
},
|
|
89
89
|
'project.name': {
|
|
@@ -108,7 +108,7 @@ export const projectCreateRequest = {
|
|
|
108
108
|
},
|
|
109
109
|
'project.provisioner': {
|
|
110
110
|
type: "string",
|
|
111
|
-
description: "
|
|
111
|
+
description: "Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`.",
|
|
112
112
|
demandOption: false,
|
|
113
113
|
},
|
|
114
114
|
'project.region_id': {
|
|
@@ -118,12 +118,12 @@ export const projectCreateRequest = {
|
|
|
118
118
|
},
|
|
119
119
|
'project.default_endpoint_settings.suspend_timeout_seconds': {
|
|
120
120
|
type: "number",
|
|
121
|
-
description: "
|
|
121
|
+
description: "Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value.",
|
|
122
122
|
demandOption: false,
|
|
123
123
|
},
|
|
124
124
|
'project.pg_version': {
|
|
125
125
|
type: "number",
|
|
126
|
-
description: "The major Postgres version number.
|
|
126
|
+
description: "The major Postgres version number. Supported versions are `14`, `15`, `16`, `17`, and `18`. `19` is rolling out and is accepted only in regions where it is enabled; requesting it elsewhere returns an error.",
|
|
127
127
|
demandOption: false,
|
|
128
128
|
},
|
|
129
129
|
'project.store_passwords': {
|
|
@@ -133,12 +133,12 @@ export const projectCreateRequest = {
|
|
|
133
133
|
},
|
|
134
134
|
'project.history_retention_seconds': {
|
|
135
135
|
type: "number",
|
|
136
|
-
description: "
|
|
136
|
+
description: "History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n",
|
|
137
137
|
demandOption: false,
|
|
138
138
|
},
|
|
139
139
|
'project.org_id': {
|
|
140
140
|
type: "string",
|
|
141
|
-
description: "
|
|
141
|
+
description: "ID of the organization that will own the project. If omitted when using an organization API key, it is inferred from the key.\n",
|
|
142
142
|
demandOption: false,
|
|
143
143
|
},
|
|
144
144
|
};
|
|
@@ -210,23 +210,23 @@ export const projectUpdateRequest = {
|
|
|
210
210
|
},
|
|
211
211
|
'project.settings.audit_log_level': {
|
|
212
212
|
type: "string",
|
|
213
|
-
description:
|
|
213
|
+
description: "Audit logging level, set only on HIPAA-enabled organizations (absent otherwise). Values: `base`, `extended`, `full`; HIPAA defaults to `extended`. Cannot be lowered back to `base` once `extended` or `full`.",
|
|
214
214
|
demandOption: false,
|
|
215
215
|
choices: ["base", "extended", "full"],
|
|
216
216
|
},
|
|
217
217
|
'project.settings.hipaa': {
|
|
218
218
|
type: "boolean",
|
|
219
|
-
description:
|
|
219
|
+
description: "Enables HIPAA compliance mode for the project, including audit logging.",
|
|
220
220
|
demandOption: false,
|
|
221
221
|
},
|
|
222
222
|
'project.settings.preload_libraries.use_defaults': {
|
|
223
223
|
type: "boolean",
|
|
224
|
-
description:
|
|
224
|
+
description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.",
|
|
225
225
|
demandOption: false,
|
|
226
226
|
},
|
|
227
227
|
'project.settings.preload_libraries.enabled_libraries': {
|
|
228
228
|
type: "array",
|
|
229
|
-
description:
|
|
229
|
+
description: "Names of shared preload libraries to enable for the project.",
|
|
230
230
|
demandOption: false,
|
|
231
231
|
},
|
|
232
232
|
'project.name': {
|
|
@@ -236,19 +236,19 @@ export const projectUpdateRequest = {
|
|
|
236
236
|
},
|
|
237
237
|
'project.default_endpoint_settings.suspend_timeout_seconds': {
|
|
238
238
|
type: "number",
|
|
239
|
-
description: "
|
|
239
|
+
description: "Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value.",
|
|
240
240
|
demandOption: false,
|
|
241
241
|
},
|
|
242
242
|
'project.history_retention_seconds': {
|
|
243
243
|
type: "number",
|
|
244
|
-
description: "
|
|
244
|
+
description: "History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n",
|
|
245
245
|
demandOption: false,
|
|
246
246
|
},
|
|
247
247
|
};
|
|
248
248
|
export const branchCreateRequest = {
|
|
249
249
|
'endpoints': {
|
|
250
250
|
type: "array",
|
|
251
|
-
description:
|
|
251
|
+
description: "Compute endpoints to create together with the branch. If omitted, the branch is created without any compute endpoint. Endpoints can be added to the branch separately after creation.",
|
|
252
252
|
demandOption: false,
|
|
253
253
|
},
|
|
254
254
|
'branch.parent_id': {
|
|
@@ -268,22 +268,22 @@ export const branchCreateRequest = {
|
|
|
268
268
|
},
|
|
269
269
|
'branch.parent_timestamp': {
|
|
270
270
|
type: "string",
|
|
271
|
-
description: "A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time
|
|
271
|
+
description: "A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time. RFC 3339 format.\n",
|
|
272
272
|
demandOption: false,
|
|
273
273
|
},
|
|
274
274
|
'branch.protected': {
|
|
275
275
|
type: "boolean",
|
|
276
|
-
description: "Whether the branch is protected
|
|
276
|
+
description: "Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n",
|
|
277
277
|
demandOption: false,
|
|
278
278
|
},
|
|
279
279
|
'branch.archived': {
|
|
280
280
|
type: "boolean",
|
|
281
|
-
description: "Whether to create the branch as archived
|
|
281
|
+
description: "Whether to create the branch in the archived state. When omitted, the branch is created as a normal (non-archived) branch.\n",
|
|
282
282
|
demandOption: false,
|
|
283
283
|
},
|
|
284
284
|
'branch.init_source': {
|
|
285
285
|
type: "string",
|
|
286
|
-
description: "
|
|
286
|
+
description: "Source of initialization for the branch. `parent-data` copies schema and data from the parent branch. `parent-schema` copies schema only from the parent branch. `schema-only` creates a new root branch containing schema only, using `parent_id` as the source; optionally, `parent_lsn` or `parent_timestamp` can narrow the source point. `import` initializes the branch from an external import.",
|
|
287
287
|
demandOption: false,
|
|
288
288
|
},
|
|
289
289
|
'branch.expires_at': {
|
|
@@ -295,40 +295,40 @@ export const branchCreateRequest = {
|
|
|
295
295
|
export const branchCreateRequestEndpointOptions = {
|
|
296
296
|
'type': {
|
|
297
297
|
type: "string",
|
|
298
|
-
description: "
|
|
298
|
+
description: "Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch).",
|
|
299
299
|
demandOption: true,
|
|
300
300
|
choices: ["read_only", "read_write"],
|
|
301
301
|
},
|
|
302
302
|
'settings.preload_libraries.use_defaults': {
|
|
303
303
|
type: "boolean",
|
|
304
|
-
description:
|
|
304
|
+
description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.",
|
|
305
305
|
demandOption: false,
|
|
306
306
|
},
|
|
307
307
|
'settings.preload_libraries.enabled_libraries': {
|
|
308
308
|
type: "array",
|
|
309
|
-
description:
|
|
309
|
+
description: "Names of shared preload libraries to enable for the project.",
|
|
310
310
|
demandOption: false,
|
|
311
311
|
},
|
|
312
312
|
'provisioner': {
|
|
313
313
|
type: "string",
|
|
314
|
-
description: "
|
|
314
|
+
description: "Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`.",
|
|
315
315
|
demandOption: false,
|
|
316
316
|
},
|
|
317
317
|
'suspend_timeout_seconds': {
|
|
318
318
|
type: "number",
|
|
319
|
-
description: "
|
|
319
|
+
description: "Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value.",
|
|
320
320
|
demandOption: false,
|
|
321
321
|
},
|
|
322
322
|
};
|
|
323
323
|
export const branchUpdateRequest = {
|
|
324
324
|
'branch.name': {
|
|
325
325
|
type: "string",
|
|
326
|
-
description:
|
|
326
|
+
description: "New display name for the branch.",
|
|
327
327
|
demandOption: false,
|
|
328
328
|
},
|
|
329
329
|
'branch.protected': {
|
|
330
330
|
type: "boolean",
|
|
331
|
-
description:
|
|
331
|
+
description: "Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n",
|
|
332
332
|
demandOption: false,
|
|
333
333
|
},
|
|
334
334
|
'branch.expires_at': {
|
|
@@ -350,33 +350,33 @@ export const endpointCreateRequest = {
|
|
|
350
350
|
},
|
|
351
351
|
'endpoint.type': {
|
|
352
352
|
type: "string",
|
|
353
|
-
description: "
|
|
353
|
+
description: "Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch).",
|
|
354
354
|
demandOption: true,
|
|
355
355
|
choices: ["read_only", "read_write"],
|
|
356
356
|
},
|
|
357
357
|
'endpoint.settings.preload_libraries.use_defaults': {
|
|
358
358
|
type: "boolean",
|
|
359
|
-
description:
|
|
359
|
+
description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.",
|
|
360
360
|
demandOption: false,
|
|
361
361
|
},
|
|
362
362
|
'endpoint.settings.preload_libraries.enabled_libraries': {
|
|
363
363
|
type: "array",
|
|
364
|
-
description:
|
|
364
|
+
description: "Names of shared preload libraries to enable for the project.",
|
|
365
365
|
demandOption: false,
|
|
366
366
|
},
|
|
367
367
|
'endpoint.provisioner': {
|
|
368
368
|
type: "string",
|
|
369
|
-
description: "
|
|
369
|
+
description: "Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`.",
|
|
370
370
|
demandOption: false,
|
|
371
371
|
},
|
|
372
372
|
'endpoint.pooler_enabled': {
|
|
373
373
|
type: "boolean",
|
|
374
|
-
description: "
|
|
374
|
+
description: "Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n",
|
|
375
375
|
demandOption: false,
|
|
376
376
|
},
|
|
377
377
|
'endpoint.pooler_mode': {
|
|
378
378
|
type: "string",
|
|
379
|
-
description: "
|
|
379
|
+
description: "Deprecated. The connection pooler mode. Removal scheduled for June 20, 2026.\n",
|
|
380
380
|
demandOption: false,
|
|
381
381
|
choices: ["transaction"],
|
|
382
382
|
},
|
|
@@ -392,7 +392,7 @@ export const endpointCreateRequest = {
|
|
|
392
392
|
},
|
|
393
393
|
'endpoint.suspend_timeout_seconds': {
|
|
394
394
|
type: "number",
|
|
395
|
-
description: "
|
|
395
|
+
description: "Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value.",
|
|
396
396
|
demandOption: false,
|
|
397
397
|
},
|
|
398
398
|
'endpoint.name': {
|
|
@@ -404,32 +404,32 @@ export const endpointCreateRequest = {
|
|
|
404
404
|
export const endpointUpdateRequest = {
|
|
405
405
|
'endpoint.branch_id': {
|
|
406
406
|
type: "string",
|
|
407
|
-
description: "
|
|
407
|
+
description: "Deprecated. The destination branch ID; must not have an existing read-write endpoint.\n",
|
|
408
408
|
demandOption: false,
|
|
409
409
|
},
|
|
410
410
|
'endpoint.provisioner': {
|
|
411
411
|
type: "string",
|
|
412
|
-
description: "
|
|
412
|
+
description: "Compute provisioner. `k8s-neonvm` (default) supports Autoscaling; `k8s-pod` is fixed-size compute. Also `docker` and `serverless-platform`.",
|
|
413
413
|
demandOption: false,
|
|
414
414
|
},
|
|
415
415
|
'endpoint.settings.preload_libraries.use_defaults': {
|
|
416
416
|
type: "boolean",
|
|
417
|
-
description:
|
|
417
|
+
description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`.",
|
|
418
418
|
demandOption: false,
|
|
419
419
|
},
|
|
420
420
|
'endpoint.settings.preload_libraries.enabled_libraries': {
|
|
421
421
|
type: "array",
|
|
422
|
-
description:
|
|
422
|
+
description: "Names of shared preload libraries to enable for the project.",
|
|
423
423
|
demandOption: false,
|
|
424
424
|
},
|
|
425
425
|
'endpoint.pooler_enabled': {
|
|
426
426
|
type: "boolean",
|
|
427
|
-
description: "
|
|
427
|
+
description: "Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n",
|
|
428
428
|
demandOption: false,
|
|
429
429
|
},
|
|
430
430
|
'endpoint.pooler_mode': {
|
|
431
431
|
type: "string",
|
|
432
|
-
description: "
|
|
432
|
+
description: "Deprecated. The connection pooler mode. Removal scheduled for June 20, 2026.\n",
|
|
433
433
|
demandOption: false,
|
|
434
434
|
choices: ["transaction"],
|
|
435
435
|
},
|
|
@@ -445,7 +445,7 @@ export const endpointUpdateRequest = {
|
|
|
445
445
|
},
|
|
446
446
|
'endpoint.suspend_timeout_seconds': {
|
|
447
447
|
type: "number",
|
|
448
|
-
description: "
|
|
448
|
+
description: "Scale-to-zero idle timeout, in seconds, before the compute suspends. `0` uses the plan default; `-1` disables scale-to-zero (never suspends). Minimum is plan-dependent (Scale: 60); maximum 604800 (one week). Free cannot change it; Launch can only enable or disable; Scale can set any value.",
|
|
449
449
|
demandOption: false,
|
|
450
450
|
},
|
|
451
451
|
'endpoint.name': {
|
|
@@ -457,7 +457,7 @@ export const endpointUpdateRequest = {
|
|
|
457
457
|
export const databaseCreateRequest = {
|
|
458
458
|
'database.name': {
|
|
459
459
|
type: "string",
|
|
460
|
-
description: "
|
|
460
|
+
description: "Name of the database to create.\n",
|
|
461
461
|
demandOption: true,
|
|
462
462
|
},
|
|
463
463
|
'database.owner_name': {
|
package/dist/utils/esbuild.js
CHANGED
|
@@ -68,6 +68,9 @@ const bundleViaModule = async (source, loadEsbuild, externalPackages) => {
|
|
|
68
68
|
banner: { js: ESM_CJS_INTEROP_BANNER },
|
|
69
69
|
// Only what the policy declared unbundleable; everything else is still inlined.
|
|
70
70
|
external: [...externalPackages],
|
|
71
|
+
// Reveals which packages were inlined, so a deploy can report an undeclared
|
|
72
|
+
// native dependency. Free here — esbuild is already running.
|
|
73
|
+
metafile: true,
|
|
71
74
|
logLevel: "silent",
|
|
72
75
|
})
|
|
73
76
|
.catch((err) => {
|
|
@@ -80,7 +83,11 @@ const bundleViaModule = async (source, loadEsbuild, externalPackages) => {
|
|
|
80
83
|
if (files.length === 0) {
|
|
81
84
|
throw new Error(`Failed to bundle function from ${source}. esbuild produced no output.`);
|
|
82
85
|
}
|
|
83
|
-
return
|
|
86
|
+
return {
|
|
87
|
+
files: toFilesByBasename(files),
|
|
88
|
+
...(result.metafile ? { metafile: result.metafile } : {}),
|
|
89
|
+
warnings: [],
|
|
90
|
+
};
|
|
84
91
|
};
|
|
85
92
|
// Find the esbuild binary at deploy time. An explicit override is authoritative
|
|
86
93
|
// (so it fails loudly if wrong); otherwise prefer the host PATH, then a locally
|
|
@@ -119,6 +126,7 @@ const bundleViaBinary = async (source, externalPackages) => {
|
|
|
119
126
|
const bin = resolveEsbuild();
|
|
120
127
|
const outDir = mkdtempSync(join(tmpdir(), "neon-fn-bundle-"));
|
|
121
128
|
const outfile = join(outDir, "index.mjs");
|
|
129
|
+
const metafilePath = join(outDir, "meta.json");
|
|
122
130
|
try {
|
|
123
131
|
const { code, stderr } = await runEsbuild(bin, [
|
|
124
132
|
source,
|
|
@@ -130,6 +138,9 @@ const bundleViaBinary = async (source, externalPackages) => {
|
|
|
130
138
|
`--banner:js=${ESM_CJS_INTEROP_BANNER}`,
|
|
131
139
|
// One flag per package, mirroring the module path's `external` array.
|
|
132
140
|
...externalPackages.map((pkg) => `--external:${pkg}`),
|
|
141
|
+
// Written beside the output so a deploy can report an undeclared native
|
|
142
|
+
// dependency here too, not only on the module path.
|
|
143
|
+
`--metafile=${metafilePath}`,
|
|
133
144
|
"--log-level=error",
|
|
134
145
|
]);
|
|
135
146
|
if (code !== 0) {
|
|
@@ -137,29 +148,63 @@ const bundleViaBinary = async (source, externalPackages) => {
|
|
|
137
148
|
}
|
|
138
149
|
// No `--sourcemap`: the Functions runtime has no source-map support, so an uploaded
|
|
139
150
|
// `index.mjs.map` is never consumed — emitting it only inflated the archive.
|
|
151
|
+
const metafile = readMetafile(metafilePath);
|
|
140
152
|
return {
|
|
141
|
-
"index.mjs": new Uint8Array(readFileSync(outfile)),
|
|
153
|
+
files: { "index.mjs": new Uint8Array(readFileSync(outfile)) },
|
|
154
|
+
...(metafile.metafile ? { metafile: metafile.metafile } : {}),
|
|
155
|
+
warnings: metafile.warnings,
|
|
142
156
|
};
|
|
143
157
|
}
|
|
144
158
|
finally {
|
|
145
159
|
rmSync(outDir, { recursive: true, force: true });
|
|
146
160
|
}
|
|
147
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* Read the metafile the binary path asked esbuild to write.
|
|
164
|
+
*
|
|
165
|
+
* We always pass `--metafile`, so an unreadable one means esbuild did not do what it was
|
|
166
|
+
* told. That is worth saying rather than swallowing — but not worth failing a deploy over,
|
|
167
|
+
* because the metafile only powers an advisory report. Reported and skipped.
|
|
168
|
+
*/
|
|
169
|
+
const readMetafile = (path) => {
|
|
170
|
+
let parsed;
|
|
171
|
+
try {
|
|
172
|
+
parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
173
|
+
}
|
|
174
|
+
catch (cause) {
|
|
175
|
+
return {
|
|
176
|
+
warnings: [
|
|
177
|
+
`esbuild was asked for a metafile but none could be read (${message(cause)}). ` +
|
|
178
|
+
`The bundle is unaffected; this deploy cannot check for an undeclared ` +
|
|
179
|
+
`native dependency.`,
|
|
180
|
+
],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
184
|
+
return {
|
|
185
|
+
warnings: [
|
|
186
|
+
"esbuild wrote a metafile that is not an object. The bundle is unaffected; " +
|
|
187
|
+
"this deploy cannot check for an undeclared native dependency.",
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return { metafile: parsed, warnings: [] };
|
|
192
|
+
};
|
|
148
193
|
// Bundle `source` into the files the Functions archive expects, keyed by
|
|
149
194
|
// basename. npm installs bundle in-process via the esbuild module; the packaged
|
|
150
195
|
// binary (and platforms esbuild can't run on) shell out to an esbuild binary.
|
|
151
196
|
export const bundleEntry = async (source, options = {}) => {
|
|
152
197
|
const isPackaged = options.isPackaged ?? defaultDeps.isPackaged;
|
|
153
198
|
const loadEsbuild = options.loadEsbuild ?? defaultDeps.loadEsbuild;
|
|
154
|
-
const
|
|
199
|
+
const external = options.externalPackages ?? [];
|
|
155
200
|
if (isPackaged())
|
|
156
|
-
return bundleViaBinary(source,
|
|
201
|
+
return bundleViaBinary(source, external);
|
|
157
202
|
try {
|
|
158
|
-
return await bundleViaModule(source, loadEsbuild,
|
|
203
|
+
return await bundleViaModule(source, loadEsbuild, external);
|
|
159
204
|
}
|
|
160
205
|
catch (err) {
|
|
161
206
|
if (err instanceof ModuleNotAvailable)
|
|
162
|
-
return bundleViaBinary(source,
|
|
207
|
+
return bundleViaBinary(source, external);
|
|
163
208
|
throw err;
|
|
164
209
|
}
|
|
165
210
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
".": "./dist/index.js",
|
|
26
26
|
"./cli": "./dist/cli.js",
|
|
27
|
+
"./dist/_shared/*": null,
|
|
27
28
|
"./dist/*": "./dist/*",
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
@@ -60,10 +61,9 @@
|
|
|
60
61
|
"yaml": "^2.9.0",
|
|
61
62
|
"yargs": "17.7.2",
|
|
62
63
|
"yoctocolors": "^2.1.2",
|
|
63
|
-
"@neon/
|
|
64
|
-
"@neon/
|
|
65
|
-
"@neon/
|
|
66
|
-
"@neon/config-runtime": "0.12.5"
|
|
64
|
+
"@neon/config-runtime": "1.0.0",
|
|
65
|
+
"@neon/sdk": "2.0.0",
|
|
66
|
+
"@neon/config": "1.0.0"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
69
|
"esbuild": "0.28.1"
|