@netlify/build 27.16.2 → 27.17.2
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 +4 -4
- package/src/log/messages/compatibility.js +1 -1
- package/src/plugins_core/functions/index.js +1 -0
- package/src/plugins_core/functions/zisi.js +4 -1
- package/src/utils/runtime.js +2 -1
- package/types/config/netlify_config.d.ts +4 -4
- package/types/netlify_plugin_constants.d.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.17.2",
|
|
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.8",
|
|
63
63
|
"@netlify/git-utils": "^4.0.0",
|
|
64
|
-
"@netlify/plugins-list": "^6.
|
|
64
|
+
"@netlify/plugins-list": "^6.42.0",
|
|
65
65
|
"@netlify/run-utils": "^4.0.0",
|
|
66
|
-
"@netlify/zip-it-and-ship-it": "^7.
|
|
66
|
+
"@netlify/zip-it-and-ship-it": "^7.1.1",
|
|
67
67
|
"@sindresorhus/slugify": "^2.0.0",
|
|
68
68
|
"@types/node": "^16.0.0",
|
|
69
69
|
"ajv": "^8.11.0",
|
|
@@ -10,7 +10,7 @@ export const logRuntime = (logs, pluginOptions) => {
|
|
|
10
10
|
const runtimes = pluginOptions.filter(isRuntime)
|
|
11
11
|
|
|
12
12
|
// Once we have more runtimes, this hardcoded check should be removed
|
|
13
|
-
if (runtimes.length
|
|
13
|
+
if (runtimes.length !== 0) {
|
|
14
14
|
const [nextRuntime] = runtimes
|
|
15
15
|
|
|
16
16
|
logSubHeader(logs, `Using Next.js Runtime - v${nextRuntime.pluginPackageJson.version}`)
|
|
@@ -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
|
package/src/utils/runtime.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export const isRuntime = function (
|
|
1
|
+
export const isRuntime = function (pluginOption) {
|
|
2
|
+
const { packageName } = pluginOption
|
|
2
3
|
// Make this a bit more robust in the future
|
|
3
4
|
return ['@netlify/next-runtime', '@netlify/plugin-nextjs'].includes(packageName)
|
|
4
5
|
}
|
|
@@ -22,9 +22,9 @@ interface Header {
|
|
|
22
22
|
values: Partial<Record<string, Many<string, 'mutable'>>>
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
interface
|
|
25
|
+
interface EdgeFunction {
|
|
26
26
|
path?: `/${string}`
|
|
27
|
-
|
|
27
|
+
function: string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface NetlifyPlugin {
|
|
@@ -44,9 +44,9 @@ interface NetlifyConfig {
|
|
|
44
44
|
*/
|
|
45
45
|
headers: Header[]
|
|
46
46
|
/**
|
|
47
|
-
* array of Edge
|
|
47
|
+
* array of Edge Functions with their modifiable options
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
edge_functions: EdgeFunction[]
|
|
50
50
|
/**
|
|
51
51
|
* object with options for modifying [functions](https://docs.netlify.com/configure-builds/file-based-configuration/#functions)
|
|
52
52
|
*/
|
|
@@ -14,10 +14,10 @@ export interface NetlifyPluginConstants {
|
|
|
14
14
|
*/
|
|
15
15
|
FUNCTIONS_SRC?: string
|
|
16
16
|
/**
|
|
17
|
-
* the directory where internal Edge
|
|
18
|
-
* `undefined` if the version of @netlify/build does not support internal Edge
|
|
17
|
+
* the directory where internal Edge Functions source code lives. This is where build plugins should place auto-generated functions.
|
|
18
|
+
* `undefined` if the version of @netlify/build does not support internal Edge Functions
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
INTERNAL_EDGE_FUNCTIONS_SRC?: string
|
|
21
21
|
/**
|
|
22
22
|
* the directory where internal function source code lives. This is where build plugins should place auto-generated functions.
|
|
23
23
|
* `undefined` if the version of @netlify/build does not support internal functions
|
|
@@ -28,14 +28,14 @@ export interface NetlifyPluginConstants {
|
|
|
28
28
|
*/
|
|
29
29
|
FUNCTIONS_DIST: string
|
|
30
30
|
/**
|
|
31
|
-
* the directory where built Edge
|
|
31
|
+
* the directory where built Edge Functions are placed before deployment. Its value is always defined, but the target might not have been created yet.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
EDGE_FUNCTIONS_DIST: string
|
|
34
34
|
/**
|
|
35
|
-
* the directory where Edge
|
|
36
|
-
* `undefined` if no `netlify/edge-
|
|
35
|
+
* the directory where Edge Functions source code lives.
|
|
36
|
+
* `undefined` if no `netlify/edge-functions` directory exists.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
EDGE_FUNCTIONS_SRC?: string
|
|
39
39
|
/**
|
|
40
40
|
* boolean indicating whether the build was [run locally](https://docs.netlify.com/cli/get-started/#run-builds-locally) or on Netlify
|
|
41
41
|
*/
|