@netlify/edge-bundler 12.1.0 → 12.1.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/dist/node/bundler.d.ts +1 -1
- package/dist/node/bundler.js +4 -2
- package/package.json +2 -2
package/dist/node/bundler.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface BundleOptions {
|
|
|
12
12
|
distImportMapPath?: string;
|
|
13
13
|
featureFlags?: FeatureFlags;
|
|
14
14
|
importMapPaths?: (string | undefined)[];
|
|
15
|
-
internalSrcFolder?: string;
|
|
15
|
+
internalSrcFolder?: string | string[];
|
|
16
16
|
onAfterDownload?: OnAfterDownloadHook;
|
|
17
17
|
onBeforeDownload?: OnBeforeDownloadHook;
|
|
18
18
|
rootPath?: string;
|
package/dist/node/bundler.js
CHANGED
|
@@ -15,6 +15,7 @@ import { getLogger } from './logger.js';
|
|
|
15
15
|
import { writeManifest } from './manifest.js';
|
|
16
16
|
import { vendorNPMSpecifiers } from './npm_dependencies.js';
|
|
17
17
|
import { ensureLatestTypes } from './types.js';
|
|
18
|
+
import { nonNullable } from './utils/non_nullable.js';
|
|
18
19
|
export const bundle = async (sourceDirectories, distDirectory, tomlDeclarations = [], { basePath: inputBasePath, cacheDirectory, configPath, debug, distImportMapPath, featureFlags: inputFeatureFlags, importMapPaths = [], internalSrcFolder, onAfterDownload, onBeforeDownload, rootPath, userLogger, systemLogger, vendorDirectory, } = {}) => {
|
|
19
20
|
const logger = getLogger(systemLogger, userLogger, debug);
|
|
20
21
|
const featureFlags = getFlags(inputFeatureFlags);
|
|
@@ -41,11 +42,12 @@ export const bundle = async (sourceDirectories, distDirectory, tomlDeclarations
|
|
|
41
42
|
// Layers are marked as externals in the ESZIP, so that those specifiers are
|
|
42
43
|
// not actually included in the bundle.
|
|
43
44
|
const externals = deployConfig.layers.map((layer) => layer.name);
|
|
44
|
-
const
|
|
45
|
+
const internalSrcFolders = (Array.isArray(internalSrcFolder) ? internalSrcFolder : [internalSrcFolder]).filter(nonNullable);
|
|
46
|
+
const userSourceDirectories = sourceDirectories.filter((dir) => !internalSrcFolders.includes(dir));
|
|
45
47
|
const importMap = new ImportMap();
|
|
46
48
|
await importMap.addFiles([deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.importMap, ...importMapPaths], logger);
|
|
47
49
|
const userFunctions = userSourceDirectories.length === 0 ? [] : await findFunctions(userSourceDirectories);
|
|
48
|
-
const internalFunctions = internalSrcFolder ? await findFunctions(
|
|
50
|
+
const internalFunctions = internalSrcFolder ? await findFunctions(internalSrcFolders) : [];
|
|
49
51
|
const functions = [...internalFunctions, ...userFunctions];
|
|
50
52
|
const vendor = await safelyVendorNPMSpecifiers({
|
|
51
53
|
basePath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/edge-bundler",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.1",
|
|
4
4
|
"description": "Intelligently prepare Netlify Edge Functions for deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/node/index.js",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"urlpattern-polyfill": "8.0.2",
|
|
85
85
|
"uuid": "^9.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "b993b18469d4355e164f605e742e69dcb5612905"
|
|
88
88
|
}
|