@netlify/edge-bundler 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno/bundle.ts +1 -1
- package/dist/bundler.js +10 -8
- package/dist/formats/javascript.js +1 -1
- package/dist/server/util.d.ts +1 -1
- package/package.json +1 -1
package/deno/bundle.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { writeStage2 } from 'https://
|
|
1
|
+
import { writeStage2 } from 'https://62ac9c589c16c50008b6ef55--edge-bootstrap.netlify.app/bundler/mod.ts'
|
|
2
2
|
|
|
3
3
|
const [payload] = Deno.args
|
|
4
4
|
const { basePath, destPath, functions } = JSON.parse(payload)
|
package/dist/bundler.js
CHANGED
|
@@ -9,6 +9,7 @@ import { bundle as bundleESZIP } from './formats/eszip.js';
|
|
|
9
9
|
import { bundle as bundleJS } from './formats/javascript.js';
|
|
10
10
|
import { ImportMap } from './import_map.js';
|
|
11
11
|
import { writeManifest } from './manifest.js';
|
|
12
|
+
// eslint-disable-next-line max-statements
|
|
12
13
|
const bundle = async (sourceDirectories, distDirectory, declarations = [], { cacheDirectory, debug, distImportMapPath, featureFlags: inputFeatureFlags, importMaps, onAfterDownload, onBeforeDownload, } = {}) => {
|
|
13
14
|
const featureFlags = getFlags(inputFeatureFlags);
|
|
14
15
|
const deno = new DenoBridge({
|
|
@@ -26,24 +27,25 @@ const bundle = async (sourceDirectories, distDirectory, declarations = [], { cac
|
|
|
26
27
|
// if any.
|
|
27
28
|
const importMap = new ImportMap(importMaps);
|
|
28
29
|
const functions = await findFunctions(sourceDirectories);
|
|
29
|
-
const bundleOps = [
|
|
30
|
-
|
|
30
|
+
const bundleOps = [];
|
|
31
|
+
if (featureFlags.edge_functions_produce_eszip) {
|
|
32
|
+
bundleOps.push(bundleESZIP({
|
|
33
|
+
basePath,
|
|
31
34
|
buildID,
|
|
32
35
|
debug,
|
|
33
36
|
deno,
|
|
34
37
|
distDirectory,
|
|
35
38
|
functions,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
bundleOps.push(bundleESZIP({
|
|
41
|
-
basePath,
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
bundleOps.push(bundleJS({
|
|
42
43
|
buildID,
|
|
43
44
|
debug,
|
|
44
45
|
deno,
|
|
45
46
|
distDirectory,
|
|
46
47
|
functions,
|
|
48
|
+
importMap,
|
|
47
49
|
}));
|
|
48
50
|
}
|
|
49
51
|
const bundles = await Promise.all(bundleOps);
|
|
@@ -5,7 +5,7 @@ import { pathToFileURL } from 'url';
|
|
|
5
5
|
import del from 'del';
|
|
6
6
|
import { wrapBundleError } from '../bundle_error.js';
|
|
7
7
|
import { getFileHash } from '../utils/sha256.js';
|
|
8
|
-
const BOOTSTRAP_LATEST = 'https://
|
|
8
|
+
const BOOTSTRAP_LATEST = 'https://62ac9c589c16c50008b6ef55--edge-bootstrap.netlify.app/bootstrap/index-combined.ts';
|
|
9
9
|
const bundle = async (options) => {
|
|
10
10
|
try {
|
|
11
11
|
return await bundleJS(options);
|
package/dist/server/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ExecaChildProcess } from 'execa';
|
|
2
2
|
declare const killProcess: (ps: ExecaChildProcess<string>) => Promise<unknown> | undefined;
|
|
3
|
-
declare const waitForServer: (port: number, ps?: ExecaChildProcess<string>
|
|
3
|
+
declare const waitForServer: (port: number, ps?: ExecaChildProcess<string>) => Promise<boolean>;
|
|
4
4
|
export { killProcess, waitForServer };
|