neonctl 2.26.1 → 2.26.3
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 +1 -1
- package/commands/auth.js +7 -0
- package/commands/bootstrap.js +18 -31
- package/commands/bucket.js +27 -3
- package/commands/checkout.js +9 -1
- package/commands/config.js +37 -21
- package/commands/dev.js +2 -3
- package/commands/env.js +44 -5
- package/commands/functions.js +62 -19
- package/commands/init.js +30 -4
- package/env_file.js +28 -15
- package/functions_api.js +3 -2
- package/package.json +5 -5
- package/test_utils/fixtures.js +1 -1
- package/utils/bootstrap.js +247 -126
- package/utils/branch_notice.js +22 -0
- package/utils/enrichers.js +39 -0
- package/utils/esbuild.js +4 -5
- package/utils/zip.js +2 -2
package/utils/esbuild.js
CHANGED
|
@@ -59,7 +59,6 @@ const bundleViaModule = async (source, loadEsbuild) => {
|
|
|
59
59
|
// output as a module without needing a `package.json` type marker alongside it.
|
|
60
60
|
outfile: 'index.mjs',
|
|
61
61
|
write: false,
|
|
62
|
-
sourcemap: true,
|
|
63
62
|
minify: true,
|
|
64
63
|
format: 'esm',
|
|
65
64
|
platform: 'node',
|
|
@@ -73,8 +72,8 @@ const bundleViaModule = async (source, loadEsbuild) => {
|
|
|
73
72
|
throw new Error(`Failed to bundle function from ${source}. ${message(err)}`.trim());
|
|
74
73
|
});
|
|
75
74
|
const files = result.outputFiles ?? [];
|
|
76
|
-
// write:false with one entry always yields index.mjs
|
|
77
|
-
// means the API contract changed under us — fail loud rather than ship an
|
|
75
|
+
// write:false with one entry always yields index.mjs (no source map — we don't emit one);
|
|
76
|
+
// an empty set means the API contract changed under us — fail loud rather than ship an
|
|
78
77
|
// empty archive.
|
|
79
78
|
if (files.length === 0) {
|
|
80
79
|
throw new Error(`Failed to bundle function from ${source}. esbuild produced no output.`);
|
|
@@ -123,7 +122,6 @@ const bundleViaBinary = async (source) => {
|
|
|
123
122
|
source,
|
|
124
123
|
'--bundle',
|
|
125
124
|
`--outfile=${outfile}`,
|
|
126
|
-
'--sourcemap',
|
|
127
125
|
'--minify',
|
|
128
126
|
'--format=esm',
|
|
129
127
|
'--platform=node',
|
|
@@ -133,9 +131,10 @@ const bundleViaBinary = async (source) => {
|
|
|
133
131
|
if (code !== 0) {
|
|
134
132
|
throw new Error(`Failed to bundle function from ${source}. ${stderr.trim()}`.trim());
|
|
135
133
|
}
|
|
134
|
+
// No `--sourcemap`: the Functions runtime has no source-map support, so an uploaded
|
|
135
|
+
// `index.mjs.map` is never consumed — emitting it only inflated the archive.
|
|
136
136
|
return {
|
|
137
137
|
'index.mjs': new Uint8Array(readFileSync(outfile)),
|
|
138
|
-
'index.mjs.map': new Uint8Array(readFileSync(`${outfile}.map`)),
|
|
139
138
|
};
|
|
140
139
|
}
|
|
141
140
|
finally {
|
package/utils/zip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { zipSync } from 'fflate';
|
|
2
|
-
// Zip the esbuild output (index.mjs
|
|
3
|
-
//
|
|
2
|
+
// Zip the esbuild output (index.mjs) into the archive the Functions deploy endpoint
|
|
3
|
+
// expects. Compression level 6 matches the previous bundler.
|
|
4
4
|
export const zipBundle = (entries) => zipSync(entries, { level: 6 });
|