@netlify/build 27.16.2-pidgey → 27.17.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.17.0",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./src/core/main.js",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@netlify/edge-bundler": "^1.14.1",
|
|
60
60
|
"@netlify/cache-utils": "^4.0.0",
|
|
61
61
|
"@netlify/config": "^18.2.3",
|
|
62
|
-
"@netlify/functions-utils": "^4.2.
|
|
62
|
+
"@netlify/functions-utils": "^4.2.6",
|
|
63
63
|
"@netlify/git-utils": "^4.0.0",
|
|
64
64
|
"@netlify/plugins-list": "^6.41.0",
|
|
65
65
|
"@netlify/run-utils": "^4.0.0",
|
|
66
|
-
"@netlify/zip-it-and-ship-it": "^
|
|
66
|
+
"@netlify/zip-it-and-ship-it": "^7.0.0",
|
|
67
67
|
"@sindresorhus/slugify": "^2.0.0",
|
|
68
68
|
"@types/node": "^16.0.0",
|
|
69
69
|
"ajv": "^8.11.0",
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import path, { resolve } from 'path'
|
|
3
|
-
import process from 'process'
|
|
1
|
+
import { resolve } from 'path'
|
|
4
2
|
|
|
5
3
|
import { zipFunctions } from '@netlify/zip-it-and-ship-it'
|
|
6
4
|
import { pathExists } from 'path-exists'
|
|
@@ -28,7 +26,6 @@ const zipFunctionsAndLogResults = async ({
|
|
|
28
26
|
isRunningLocally,
|
|
29
27
|
logs,
|
|
30
28
|
repositoryRoot,
|
|
31
|
-
publishDir,
|
|
32
29
|
}) => {
|
|
33
30
|
const zisiParameters = getZisiParameters({
|
|
34
31
|
buildDir,
|
|
@@ -36,6 +33,7 @@ const zipFunctionsAndLogResults = async ({
|
|
|
36
33
|
featureFlags,
|
|
37
34
|
functionsConfig,
|
|
38
35
|
functionsDist,
|
|
36
|
+
internalFunctionsSrc,
|
|
39
37
|
isRunningLocally,
|
|
40
38
|
repositoryRoot,
|
|
41
39
|
})
|
|
@@ -47,13 +45,6 @@ const zipFunctionsAndLogResults = async ({
|
|
|
47
45
|
|
|
48
46
|
const sourceDirectories = [internalFunctionsSrc, functionsSrc].filter(Boolean)
|
|
49
47
|
const results = await zipItAndShipIt.zipFunctions(sourceDirectories, functionsDist, zisiParameters)
|
|
50
|
-
if (process.env.NF_BUNDLE_FOR_FLY === 'true') {
|
|
51
|
-
const destDir = path.join(publishDir, '.netlify/internal/fly-functions')
|
|
52
|
-
await fs.mkdir(destDir, { recursive: true })
|
|
53
|
-
await Promise.all(
|
|
54
|
-
results.map((result) => fs.copyFile(result.path, path.join(destDir, path.basename(result.path)))),
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
48
|
|
|
58
49
|
logBundleResults({ logs, results })
|
|
59
50
|
|
|
@@ -72,7 +63,6 @@ const coreStep = async function ({
|
|
|
72
63
|
IS_LOCAL: isRunningLocally,
|
|
73
64
|
FUNCTIONS_SRC: relativeFunctionsSrc,
|
|
74
65
|
FUNCTIONS_DIST: relativeFunctionsDist,
|
|
75
|
-
PUBLISH_DIR: publishDir,
|
|
76
66
|
},
|
|
77
67
|
buildDir,
|
|
78
68
|
logs,
|
|
@@ -125,7 +115,6 @@ const coreStep = async function ({
|
|
|
125
115
|
isRunningLocally,
|
|
126
116
|
logs,
|
|
127
117
|
repositoryRoot,
|
|
128
|
-
publishDir,
|
|
129
118
|
})
|
|
130
119
|
|
|
131
120
|
return {
|
|
@@ -10,6 +10,7 @@ export const getZisiParameters = ({
|
|
|
10
10
|
featureFlags,
|
|
11
11
|
functionsConfig,
|
|
12
12
|
functionsDist,
|
|
13
|
+
internalFunctionsSrc,
|
|
13
14
|
isRunningLocally,
|
|
14
15
|
repositoryRoot,
|
|
15
16
|
}) => {
|
|
@@ -20,8 +21,10 @@ export const getZisiParameters = ({
|
|
|
20
21
|
normalizeFunctionConfig({ buildDir, featureFlags, functionConfig: object, isRunningLocally, nodeVersion }),
|
|
21
22
|
])
|
|
22
23
|
const zisiFeatureFlags = getZisiFeatureFlags(featureFlags)
|
|
24
|
+
// Only internal functions are allowed to have a json config file
|
|
25
|
+
const configFileDirectories = [resolve(internalFunctionsSrc)]
|
|
23
26
|
|
|
24
|
-
return { basePath: buildDir, config, manifest, featureFlags: zisiFeatureFlags, repositoryRoot }
|
|
27
|
+
return { basePath: buildDir, config, manifest, featureFlags: zisiFeatureFlags, repositoryRoot, configFileDirectories }
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
// The function configuration keys returned by @netlify/config are not an exact
|