netlify-cli 17.12.0 → 17.13.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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "17.12.0",
3
+ "version": "17.13.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "17.12.0",
9
+ "version": "17.13.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "17.12.0",
4
+ "version": "17.13.0",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
package/src/lib/build.js CHANGED
@@ -3,7 +3,7 @@ import process from 'process';
3
3
  import build from '@netlify/build';
4
4
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'toml... Remove this comment to see the full error message
5
5
  import tomlify from 'tomlify-j0.4';
6
- import { isFeatureFlagEnabled } from '../utils/feature-flags.js';
6
+ import { getFeatureFlagsFromSiteInfo } from '../utils/feature-flags.js';
7
7
  import { getBootstrapURL } from './edge-functions/bootstrap.js';
8
8
  import { featureFlags as edgeFunctionsFeatureFlags } from './edge-functions/consts.js';
9
9
  /**
@@ -82,16 +82,6 @@ token, }) => {
82
82
  edgeFunctionsBootstrapURL: getBootstrapURL(),
83
83
  };
84
84
  };
85
- /**
86
- * @param {*} siteInfo
87
- * @returns {Record<string, any>}
88
- */
89
- // @ts-expect-error TS(7006) FIXME: Parameter 'siteInfo' implicitly has an 'any' type.
90
- const getFeatureFlagsFromSiteInfo = (siteInfo) => ({
91
- ...siteInfo.feature_flags,
92
- // see https://github.com/netlify/pod-dev-foundations/issues/581#issuecomment-1731022753
93
- zisi_golang_use_al2: isFeatureFlagEnabled('cli_golang_use_al2', siteInfo),
94
- });
95
85
  /**
96
86
  * run the build command
97
87
  * @param {BuildConfig} options
@@ -12,3 +12,11 @@
12
12
  */
13
13
  // @ts-expect-error TS(7006) FIXME: Parameter 'flagName' implicitly has an 'any' type.
14
14
  export const isFeatureFlagEnabled = (flagName, siteInfo) => Boolean(siteInfo.feature_flags && siteInfo.feature_flags[flagName] !== false);
15
+ /**
16
+ * Retrieves all Feature flags from the siteInfo
17
+ */
18
+ export const getFeatureFlagsFromSiteInfo = (siteInfo) => ({
19
+ ...(siteInfo.feature_flags || {}),
20
+ // see https://github.com/netlify/pod-dev-foundations/issues/581#issuecomment-1731022753
21
+ zisi_golang_use_al2: isFeatureFlagEnabled('cli_golang_use_al2', siteInfo),
22
+ });
@@ -6,6 +6,7 @@ import { getPathInProject } from '../lib/settings.js';
6
6
  import { error } from './command-helpers.js';
7
7
  import { startFrameworkServer } from './framework-server.js';
8
8
  import { INTERNAL_FUNCTIONS_FOLDER } from './functions/index.js';
9
+ import { getFeatureFlagsFromSiteInfo } from './feature-flags.js';
9
10
  const netlifyBuildPromise = import('@netlify/build');
10
11
  /**
11
12
  * Copies `netlify.toml`, if one is defined, into the `.netlify` internal
@@ -60,6 +61,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti
60
61
  mode: 'cli',
61
62
  telemetry: false,
62
63
  buffer: false,
64
+ featureFlags: getFeatureFlagsFromSiteInfo(cachedConfig.siteInfo),
63
65
  offline: options.offline,
64
66
  packagePath: command.workspacePackage,
65
67
  cwd: cachedConfig.buildDir,