@netlify/build 29.54.9 → 29.55.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/lib/log/messages/core_steps.d.ts +1 -1
- package/lib/log/messages/core_steps.js +7 -0
- package/lib/plugins/ipc.js +2 -2
- package/lib/plugins/manifest/check.d.ts +1 -1
- package/lib/plugins_core/functions/index.d.ts +4 -8
- package/lib/plugins_core/functions/index.js +4 -2
- package/lib/plugins_core/functions/zisi.d.ts +2 -1
- package/lib/plugins_core/functions/zisi.js +2 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function logBundleResults({ logs, results }: {
|
|
2
2
|
logs: any;
|
|
3
|
-
results
|
|
3
|
+
results: import("@netlify/zip-it-and-ship-it").FunctionResult[];
|
|
4
4
|
}): void;
|
|
5
5
|
export function logFunctionsNonExistingDir(logs: any, relativeFunctionsSrc: any): void;
|
|
6
6
|
export function logFunctionsToBundle({ logs, userFunctions, userFunctionsSrc, userFunctionsSrcExists, internalFunctions, internalFunctionsSrc, frameworkFunctions, type, }: {
|
|
@@ -11,6 +11,13 @@ const logBundleResultFunctions = ({ functions, headerMessage, logs, error }) =>
|
|
|
11
11
|
}
|
|
12
12
|
logArray(logs, functionNames);
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Logs the result of bundling functions
|
|
16
|
+
*
|
|
17
|
+
* @param {object} options
|
|
18
|
+
* @param {any} options.logs
|
|
19
|
+
* @param {import("@netlify/zip-it-and-ship-it").FunctionResult[]} options.results
|
|
20
|
+
*/
|
|
14
21
|
export const logBundleResults = ({ logs, results = [] }) => {
|
|
15
22
|
const resultsWithErrors = results.filter(({ bundlerErrors }) => bundlerErrors && bundlerErrors.length !== 0);
|
|
16
23
|
const resultsWithWarnings = results.filter(({ bundler, bundlerWarnings }) => bundler === 'esbuild' && bundlerWarnings && bundlerWarnings.length !== 0);
|
package/lib/plugins/ipc.js
CHANGED
|
@@ -29,8 +29,8 @@ export const getEventFromChild = async function (childProcess, callId) {
|
|
|
29
29
|
if (childProcessHasExited(childProcess)) {
|
|
30
30
|
throw getChildExitError('Could not receive event from child process because it already exited.');
|
|
31
31
|
}
|
|
32
|
-
const messagePromise = pEvent(childProcess, 'message', { filter: (
|
|
33
|
-
const errorPromise = pEvent(childProcess, 'message', { filter: (
|
|
32
|
+
const messagePromise = pEvent(childProcess, 'message', { filter: (data) => data?.[0] === callId });
|
|
33
|
+
const errorPromise = pEvent(childProcess, 'message', { filter: (data) => data?.[0] === 'error' });
|
|
34
34
|
const exitPromise = pEvent(childProcess, 'exit', { multiArgs: true });
|
|
35
35
|
try {
|
|
36
36
|
return await Promise.race([getMessage(messagePromise), getError(errorPromise), getExit(exitPromise)]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { FunctionResult } from '@netlify/zip-it-and-ship-it';
|
|
1
2
|
export declare const bundleFunctions: {
|
|
2
3
|
event: string;
|
|
3
|
-
coreStep: ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir, packagePath, logs, netlifyConfig, featureFlags, repositoryRoot, userNodeVersion, systemLog, }: {
|
|
4
|
+
coreStep: ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir, branch, packagePath, logs, netlifyConfig, featureFlags, repositoryRoot, userNodeVersion, systemLog, }: {
|
|
4
5
|
childEnv: any;
|
|
5
6
|
constants: {
|
|
6
7
|
INTERNAL_FUNCTIONS_SRC: any;
|
|
@@ -9,6 +10,7 @@ export declare const bundleFunctions: {
|
|
|
9
10
|
FUNCTIONS_DIST: any;
|
|
10
11
|
};
|
|
11
12
|
buildDir: any;
|
|
13
|
+
branch: any;
|
|
12
14
|
packagePath: any;
|
|
13
15
|
logs: any;
|
|
14
16
|
netlifyConfig: any;
|
|
@@ -46,11 +48,5 @@ export declare const bundleFunctions: {
|
|
|
46
48
|
}) => Promise<boolean>;
|
|
47
49
|
};
|
|
48
50
|
export declare const zipItAndShipIt: {
|
|
49
|
-
zipFunctions(relativeSrcFolders: string | string[], destFolder: string, args_2?: import("@netlify/zip-it-and-ship-it").ZipFunctionsOptions | undefined): Promise<
|
|
50
|
-
routes?: import("@netlify/zip-it-and-ship-it").ExtendedRoute[];
|
|
51
|
-
excludedRoutes?: import("@netlify/zip-it-and-ship-it").Route[];
|
|
52
|
-
runtime: import("@netlify/zip-it-and-ship-it").RuntimeName;
|
|
53
|
-
schedule?: string;
|
|
54
|
-
runtimeAPIVersion?: number;
|
|
55
|
-
})[]>;
|
|
51
|
+
zipFunctions(relativeSrcFolders: string | string[], destFolder: string, args_2?: import("@netlify/zip-it-and-ship-it").ZipFunctionsOptions | undefined): Promise<FunctionResult[]>;
|
|
56
52
|
};
|
|
@@ -46,8 +46,9 @@ const validateCustomRoutes = function (functions) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
const zipFunctionsAndLogResults = async ({ buildDir, childEnv, featureFlags, functionsConfig, functionsDist, functionsSrc, frameworkFunctionsSrc, internalFunctionsSrc, isRunningLocally, logs, repositoryRoot, userNodeVersion, systemLog, }) => {
|
|
49
|
+
const zipFunctionsAndLogResults = async ({ branch, buildDir, childEnv, featureFlags, functionsConfig, functionsDist, functionsSrc, frameworkFunctionsSrc, internalFunctionsSrc, isRunningLocally, logs, repositoryRoot, userNodeVersion, systemLog, }) => {
|
|
50
50
|
const zisiParameters = getZisiParameters({
|
|
51
|
+
branch,
|
|
51
52
|
buildDir,
|
|
52
53
|
childEnv,
|
|
53
54
|
featureFlags,
|
|
@@ -74,7 +75,7 @@ const zipFunctionsAndLogResults = async ({ buildDir, childEnv, featureFlags, fun
|
|
|
74
75
|
}
|
|
75
76
|
};
|
|
76
77
|
// Plugin to package Netlify functions with @netlify/zip-it-and-ship-it
|
|
77
|
-
const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir, packagePath, logs, netlifyConfig, featureFlags, repositoryRoot, userNodeVersion, systemLog, }) {
|
|
78
|
+
const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir, branch, packagePath, logs, netlifyConfig, featureFlags, repositoryRoot, userNodeVersion, systemLog, }) {
|
|
78
79
|
const functionsSrc = relativeFunctionsSrc === undefined ? undefined : resolve(buildDir, relativeFunctionsSrc);
|
|
79
80
|
const functionsDist = resolve(buildDir, relativeFunctionsDist);
|
|
80
81
|
const internalFunctionsSrc = resolve(buildDir, relativeInternalFunctionsSrc);
|
|
@@ -110,6 +111,7 @@ const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC
|
|
|
110
111
|
return {};
|
|
111
112
|
}
|
|
112
113
|
const { bundlers } = await zipFunctionsAndLogResults({
|
|
114
|
+
branch,
|
|
113
115
|
buildDir,
|
|
114
116
|
childEnv,
|
|
115
117
|
featureFlags,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FunctionConfig, ZipFunctionsOptions } from '@netlify/zip-it-and-ship-it';
|
|
2
2
|
import type { FeatureFlags } from '../../core/feature_flags.js';
|
|
3
3
|
type GetZisiParametersType = {
|
|
4
|
+
branch?: string;
|
|
4
5
|
buildDir: string;
|
|
5
6
|
childEnv: Record<string, string>;
|
|
6
7
|
featureFlags: FeatureFlags;
|
|
@@ -12,7 +13,7 @@ type GetZisiParametersType = {
|
|
|
12
13
|
userNodeVersion: string;
|
|
13
14
|
systemLog: ZipFunctionsOptions['systemLog'];
|
|
14
15
|
};
|
|
15
|
-
export declare const getZisiParameters: ({ buildDir, childEnv, featureFlags, functionsConfig, functionsDist, internalFunctionsSrc, isRunningLocally, repositoryRoot, userNodeVersion, systemLog, }: GetZisiParametersType) => ZipFunctionsOptions;
|
|
16
|
+
export declare const getZisiParameters: ({ branch, buildDir, childEnv, featureFlags, functionsConfig, functionsDist, internalFunctionsSrc, isRunningLocally, repositoryRoot, userNodeVersion, systemLog, }: GetZisiParametersType) => ZipFunctionsOptions;
|
|
16
17
|
export declare const normalizeFunctionConfig: ({ buildDir, functionConfig, isRunningLocally, nodeVersion, }: {
|
|
17
18
|
buildDir: string;
|
|
18
19
|
functionConfig: Record<string, any>;
|
|
@@ -17,7 +17,7 @@ const getLambdaNodeVersion = (childEnv, userNodeVersion) => {
|
|
|
17
17
|
}
|
|
18
18
|
return undefined;
|
|
19
19
|
};
|
|
20
|
-
export const getZisiParameters = ({ buildDir, childEnv, featureFlags, functionsConfig, functionsDist, internalFunctionsSrc, isRunningLocally, repositoryRoot, userNodeVersion, systemLog, }) => {
|
|
20
|
+
export const getZisiParameters = ({ branch, buildDir, childEnv, featureFlags, functionsConfig, functionsDist, internalFunctionsSrc, isRunningLocally, repositoryRoot, userNodeVersion, systemLog, }) => {
|
|
21
21
|
const nodeVersion = getLambdaNodeVersion(childEnv, userNodeVersion);
|
|
22
22
|
const manifest = join(functionsDist, 'manifest.json');
|
|
23
23
|
const config = mapObject(functionsConfig, (expression, object) => [
|
|
@@ -30,6 +30,7 @@ export const getZisiParameters = ({ buildDir, childEnv, featureFlags, functionsC
|
|
|
30
30
|
const configFileDirectories = internalFunctionsSrc ? [resolve(internalFunctionsSrc)] : undefined;
|
|
31
31
|
return {
|
|
32
32
|
basePath: buildDir,
|
|
33
|
+
branch,
|
|
33
34
|
config,
|
|
34
35
|
manifest,
|
|
35
36
|
featureFlags: zisiFeatureFlags,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.55.1",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"@netlify/config": "^20.19.0",
|
|
74
74
|
"@netlify/edge-bundler": "12.2.3",
|
|
75
75
|
"@netlify/framework-info": "^9.8.13",
|
|
76
|
-
"@netlify/functions-utils": "^5.2.
|
|
76
|
+
"@netlify/functions-utils": "^5.2.90",
|
|
77
77
|
"@netlify/git-utils": "^5.1.1",
|
|
78
78
|
"@netlify/opentelemetry-utils": "^1.2.1",
|
|
79
79
|
"@netlify/plugins-list": "^6.80.0",
|
|
80
80
|
"@netlify/run-utils": "^5.1.1",
|
|
81
|
-
"@netlify/zip-it-and-ship-it": "9.
|
|
81
|
+
"@netlify/zip-it-and-ship-it": "9.40.1",
|
|
82
82
|
"@sindresorhus/slugify": "^2.0.0",
|
|
83
83
|
"ansi-escapes": "^6.0.0",
|
|
84
84
|
"chalk": "^5.0.0",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"engines": {
|
|
166
166
|
"node": "^14.16.0 || >=16.0.0"
|
|
167
167
|
},
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "db33121e34a844baeb3be9715e44af8d2b5df8f3"
|
|
169
169
|
}
|