@netlify/edge-bundler 2.7.0 → 2.8.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/node/bundler.d.ts +1 -1
- package/dist/node/finder.js +4 -2
- package/package.json +3 -3
package/dist/node/bundler.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface BundleOptions {
|
|
|
15
15
|
onBeforeDownload?: OnBeforeDownloadHook;
|
|
16
16
|
systemLogger?: LogFunction;
|
|
17
17
|
}
|
|
18
|
-
declare const bundle: (sourceDirectories: string[], distDirectory: string, tomlDeclarations?: Declaration[], { basePath, cacheDirectory, debug, distImportMapPath, featureFlags, importMaps, onAfterDownload, onBeforeDownload, systemLogger, }?: BundleOptions) => Promise<{
|
|
18
|
+
declare const bundle: (sourceDirectories: string[], distDirectory: string, tomlDeclarations?: Declaration[], { basePath: inputBasePath, cacheDirectory, debug, distImportMapPath, featureFlags: inputFeatureFlags, importMaps, onAfterDownload, onBeforeDownload, systemLogger, }?: BundleOptions) => Promise<{
|
|
19
19
|
functions: EdgeFunction[];
|
|
20
20
|
manifest: import("./manifest.js").Manifest;
|
|
21
21
|
}>;
|
package/dist/node/finder.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { promises as fs } from 'fs';
|
|
2
2
|
import { basename, extname, join } from 'path';
|
|
3
3
|
import { nonNullable } from './utils/non_nullable.js';
|
|
4
|
-
const ALLOWED_EXTENSIONS = new Set(['.js', '.ts']);
|
|
4
|
+
const ALLOWED_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx']);
|
|
5
5
|
const findFunctionInDirectory = async (directory) => {
|
|
6
6
|
const name = basename(directory);
|
|
7
|
-
const candidatePaths = [
|
|
7
|
+
const candidatePaths = [...ALLOWED_EXTENSIONS]
|
|
8
|
+
.flatMap((extension) => [`${name}${extension}`, `index${extension}`])
|
|
9
|
+
.map((filename) => join(directory, filename));
|
|
8
10
|
let functionPath;
|
|
9
11
|
for (const candidatePath of candidatePaths) {
|
|
10
12
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/edge-bundler",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Intelligently prepare Netlify Edge Functions for deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/node/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/semver": "^7.3.9",
|
|
58
58
|
"@types/sinon": "^10.0.8",
|
|
59
59
|
"@types/uuid": "^8.3.4",
|
|
60
|
-
"@vitest/coverage-c8": "^0.
|
|
60
|
+
"@vitest/coverage-c8": "^0.24.0",
|
|
61
61
|
"archiver": "^5.3.1",
|
|
62
62
|
"husky": "^8.0.0",
|
|
63
63
|
"nock": "^13.2.4",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"tar": "^6.1.11",
|
|
66
66
|
"typescript": "^4.5.4",
|
|
67
67
|
"vite": "^3.1.3",
|
|
68
|
-
"vitest": "^0.
|
|
68
|
+
"vitest": "^0.24.0"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|