@netlify/build 29.10.1 → 29.11.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/lib/log/header.js CHANGED
@@ -6,8 +6,7 @@ export const getHeader = function (message) {
6
6
  const messageWidth = stringWidth(message);
7
7
  const headerWidth = Math.max(HEADER_MIN_WIDTH, messageWidth);
8
8
  const line = '─'.repeat(headerWidth + PADDING_WIDTH * 2);
9
- const paddingLeft = ' '.repeat(PADDING_WIDTH);
10
9
  const paddingRight = ' '.repeat(PADDING_WIDTH + headerWidth - messageWidth);
11
- return `${paddingLeft}${message}${paddingRight}
10
+ return `${message}${paddingRight}
12
11
  ${line}`;
13
12
  };
@@ -1,10 +1,10 @@
1
1
  import { getLogHeaderFunc } from '../header_func.js';
2
2
  import { log, logMessage } from '../logger.js';
3
3
  import { THEME } from '../theme.js';
4
- export const logStepStart = function ({ logs, event, packageName, coreStepDescription, index, error, netlifyConfig }) {
4
+ export const logStepStart = function ({ logs, event, packageName, coreStepDescription, error, netlifyConfig }) {
5
5
  const description = getDescription({ coreStepDescription, netlifyConfig, packageName, event });
6
6
  const logHeaderFunc = getLogHeaderFunc(error);
7
- logHeaderFunc(logs, `${index + 1}. ${description}`);
7
+ logHeaderFunc(logs, `${description}`);
8
8
  logMessage(logs, '');
9
9
  };
10
10
  const getDescription = function ({ coreStepDescription, netlifyConfig, packageName, event }) {
@@ -3,12 +3,12 @@ import { logPluginMethodStart, logPluginMethodEnd } from '../../log/messages/ipc
3
3
  import { cloneNetlifyConfig, getConfigMutations } from './diff.js';
4
4
  import { getUtils } from './utils.js';
5
5
  // Run a specific plugin event handler
6
- export const run = async function ({ event, error, constants, envChanges, netlifyConfig }, { methods, inputs, packageJson, verbose }) {
6
+ export const run = async function ({ event, error, constants, envChanges, featureFlags, netlifyConfig }, { methods, inputs, packageJson, verbose }) {
7
7
  const method = methods[event];
8
8
  const runState = {};
9
9
  const utils = getUtils({ event, constants, runState });
10
10
  const netlifyConfigCopy = cloneNetlifyConfig(netlifyConfig);
11
- const runOptions = { utils, constants, inputs, netlifyConfig: netlifyConfigCopy, packageJson, error };
11
+ const runOptions = { utils, constants, inputs, netlifyConfig: netlifyConfigCopy, packageJson, error, featureFlags };
12
12
  const envBefore = setEnvChanges(envChanges);
13
13
  logPluginMethodStart(verbose);
14
14
  await method(runOptions);
@@ -6,14 +6,22 @@ import { getSuccessStatus } from '../status/success.js';
6
6
  import { getPluginErrorType } from './error.js';
7
7
  import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js';
8
8
  // Fire a plugin step
9
- export const firePluginStep = async function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, debug, verbose, }) {
9
+ export const firePluginStep = async function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, featureFlags, debug, verbose, }) {
10
10
  const listeners = pipePluginOutput(childProcess, logs);
11
+ const isTrustedPlugin = pluginPackageJson?.name?.startsWith('@netlify/');
11
12
  try {
12
13
  const configSideFiles = await listConfigSideFiles([headersPath, redirectsPath]);
13
14
  const { newEnvChanges, configMutations: newConfigMutations, status, } = await callChild({
14
15
  childProcess,
15
16
  eventName: 'run',
16
- payload: { event, error, envChanges, netlifyConfig, constants },
17
+ payload: {
18
+ event,
19
+ error,
20
+ envChanges,
21
+ featureFlags: isTrustedPlugin ? featureFlags : undefined,
22
+ netlifyConfig,
23
+ constants,
24
+ },
17
25
  logs,
18
26
  verbose,
19
27
  });
@@ -24,7 +24,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
24
24
  return {};
25
25
  }
26
26
  if (!quiet) {
27
- logStepStart({ logs, event, packageName, coreStepDescription, index, error, netlifyConfig });
27
+ logStepStart({ logs, event, packageName, coreStepDescription, error, netlifyConfig });
28
28
  }
29
29
  const fireStep = getFireStep(packageName, coreStepId, event);
30
30
  const { newEnvChanges, netlifyConfig: netlifyConfigA = netlifyConfig, configMutations: configMutationsA = configMutations, headersPath: headersPathA = headersPath, redirectsPath: redirectsPathA = redirectsPath, newError, newStatus, timers: timersA, durationNs, metrics, } = await fireStep({
@@ -194,6 +194,7 @@ const tFireStep = function ({ event, childProcess, packageName, pluginPackageJso
194
194
  steps,
195
195
  error,
196
196
  logs,
197
+ featureFlags,
197
198
  debug,
198
199
  verbose,
199
200
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.10.1",
3
+ "version": "29.11.0",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -147,5 +147,5 @@
147
147
  "module": "commonjs"
148
148
  }
149
149
  },
150
- "gitHead": "3d1699220b89fad0095efd7adc0bb5c49c47b3de"
150
+ "gitHead": "a31568099761e32f3d24600403021143ac614b44"
151
151
  }