@netlify/config 20.22.0 → 21.0.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/env/main.js CHANGED
@@ -66,7 +66,7 @@ const convertToString = (value) => {
66
66
  };
67
67
  // Environment variables not set by users, but meant to mimic the production
68
68
  // environment.
69
- const getGeneralEnv = async function ({ siteInfo, siteInfo: { id, name }, buildDir, branch, deployId, buildId, context, }) {
69
+ const getGeneralEnv = async function ({ siteInfo, siteInfo: { id, name, account_id: accountId }, buildDir, branch, deployId, buildId, context, }) {
70
70
  const gitEnv = await getGitEnv(buildDir, branch);
71
71
  const deployUrls = getDeployUrls({ siteInfo: siteInfo, branch, deployId });
72
72
  return removeFalsy({
@@ -74,6 +74,7 @@ const getGeneralEnv = async function ({ siteInfo, siteInfo: { id, name }, buildD
74
74
  SITE_NAME: name,
75
75
  DEPLOY_ID: deployId,
76
76
  BUILD_ID: buildId,
77
+ ACCOUNT_ID: accountId,
77
78
  ...deployUrls,
78
79
  CONTEXT: context,
79
80
  NETLIFY_LOCAL: 'true',
package/lib/headers.d.ts CHANGED
@@ -3,14 +3,13 @@ export function getHeadersPath({ build: { publish } }: {
3
3
  publish: any;
4
4
  };
5
5
  }): string;
6
- export function addHeaders({ config: { headers: configHeaders, ...config }, headersPath, logs, featureFlags, }: {
6
+ export function addHeaders({ config: { headers: configHeaders, ...config }, headersPath, logs }: {
7
7
  config: {
8
8
  [x: string]: any;
9
9
  headers: any;
10
10
  };
11
11
  headersPath: any;
12
12
  logs: any;
13
- featureFlags: any;
14
13
  }): Promise<{
15
- headers: import("packages/headers-parser/lib/types.js").Header[];
14
+ headers: (import("@netlify/headers-parser").MinimalHeader | import("@netlify/headers-parser").Header)[];
16
15
  }>;
package/lib/headers.js CHANGED
@@ -7,12 +7,11 @@ export const getHeadersPath = function ({ build: { publish } }) {
7
7
  };
8
8
  const HEADERS_FILENAME = '_headers';
9
9
  // Add `config.headers`
10
- export const addHeaders = async function ({ config: { headers: configHeaders, ...config }, headersPath, logs, featureFlags, }) {
10
+ export const addHeaders = async function ({ config: { headers: configHeaders, ...config }, headersPath, logs }) {
11
11
  const { headers, errors } = await parseAllHeaders({
12
12
  headersFiles: [headersPath],
13
13
  configHeaders,
14
14
  minimal: true,
15
- featureFlags,
16
15
  });
17
16
  warnHeadersParsing(logs, errors);
18
17
  warnHeadersCaseSensitivity(logs, headers);
package/lib/main.js CHANGED
@@ -205,7 +205,7 @@ const getFullConfig = async function ({ configOpt, cwd, context, repositoryRoot,
205
205
  });
206
206
  const { config: configB, buildDir, base: baseA, } = await resolveFiles({ packagePath, config: configA, repositoryRoot, base, baseRelDir });
207
207
  const headersPath = getHeadersPath(configB);
208
- const configC = await addHeaders({ config: configB, headersPath, logs, featureFlags });
208
+ const configC = await addHeaders({ config: configB, headersPath, logs });
209
209
  const redirectsPath = getRedirectsPath(configC);
210
210
  const configD = await addRedirects({ config: configC, redirectsPath, logs, featureFlags });
211
211
  return { configPath, config: configD, buildDir, base: baseA, redirectsPath, headersPath };
@@ -16,7 +16,7 @@ export const updateConfig = async function (configMutations, { buildDir, configP
16
16
  const inlineConfig = applyMutations({}, configMutations);
17
17
  const normalizedInlineConfig = ensureConfigPriority(inlineConfig, context, branch);
18
18
  const updatedConfig = await mergeWithConfig(normalizedInlineConfig, configPath);
19
- const configWithHeaders = await addHeaders({ config: updatedConfig, headersPath, logs, featureFlags });
19
+ const configWithHeaders = await addHeaders({ config: updatedConfig, headersPath, logs });
20
20
  const finalConfig = await addRedirects({ config: configWithHeaders, redirectsPath, logs, featureFlags });
21
21
  const simplifiedConfig = simplifyConfig(finalConfig);
22
22
  await backupConfig({ buildDir, configPath, headersPath, redirectsPath });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "20.22.0",
3
+ "version": "21.0.0",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -59,7 +59,7 @@
59
59
  "license": "MIT",
60
60
  "dependencies": {
61
61
  "@iarna/toml": "^2.2.5",
62
- "@netlify/headers-parser": "^7.3.0",
62
+ "@netlify/headers-parser": "^8.0.0",
63
63
  "@netlify/redirect-parser": "^14.5.0",
64
64
  "chalk": "^5.0.0",
65
65
  "cron-parser": "^4.1.0",
@@ -95,5 +95,5 @@
95
95
  "engines": {
96
96
  "node": "^14.16.0 || >=16.0.0"
97
97
  },
98
- "gitHead": "b1de419113daee962ab37b1e75bcfc0d32f778e7"
98
+ "gitHead": "65206cf82369d2e0412c707c763590690cc1819a"
99
99
  }