@netlify/build 26.3.13 → 26.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "26.3.13",
3
+ "version": "26.4.0",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./src/core/main.js",
@@ -61,7 +61,7 @@
61
61
  "@netlify/functions-utils": "^4.0.0",
62
62
  "@netlify/git-utils": "^4.0.0",
63
63
  "@netlify/plugin-edge-handlers": "^3.0.7",
64
- "@netlify/plugins-list": "^6.15.0",
64
+ "@netlify/plugins-list": "^6.16.0",
65
65
  "@netlify/run-utils": "^4.0.0",
66
66
  "@netlify/zip-it-and-ship-it": "5.9.0",
67
67
  "@sindresorhus/slugify": "^2.0.0",
@@ -11,6 +11,7 @@ export const getConstants = async function ({
11
11
  configPath,
12
12
  buildDir,
13
13
  functionsDistDir,
14
+ edgeHandlersDistDir,
14
15
  cacheDir,
15
16
  netlifyConfig,
16
17
  siteInfo: { id: siteId },
@@ -26,6 +27,8 @@ export const getConstants = async function ({
26
27
  CONFIG_PATH: configPath,
27
28
  // The directory where built serverless functions are placed before deployment
28
29
  FUNCTIONS_DIST: functionsDistDir,
30
+ // The directory where built Edge Handlers are placed before deployment
31
+ EDGE_HANDLERS_DIST: edgeHandlersDistDir,
29
32
  // Path to the Netlify build cache folder
30
33
  CACHE_DIR: normalizedCacheDir,
31
34
  // Boolean indicating whether the build was run locally (Netlify CLI) or in the production CI
@@ -142,6 +145,7 @@ const CONSTANT_PATHS = new Set([
142
145
  'FUNCTIONS_SRC',
143
146
  'FUNCTIONS_DIST',
144
147
  'INTERNAL_FUNCTIONS_SRC',
148
+ 'EDGE_HANDLERS_DIST',
145
149
  'EDGE_HANDLERS_SRC',
146
150
  'CACHE_DIR',
147
151
  ])
package/src/core/flags.js CHANGED
@@ -107,6 +107,12 @@ Default: Current Node.js binary`,
107
107
  functionsDistDir: {
108
108
  string: true,
109
109
  describe: `Path to the directory where packaged functions are kept.
110
+ Default: automatically guessed`,
111
+ hidden: true,
112
+ },
113
+ edgeHandlersDistDir: {
114
+ string: true,
115
+ describe: `Path to the directory where packaged Edge Handlers are kept.
110
116
  Default: automatically guessed`,
111
117
  hidden: true,
112
118
  },
package/src/core/main.js CHANGED
@@ -164,6 +164,7 @@ const tExecBuild = async function ({
164
164
  verbose,
165
165
  nodePath,
166
166
  functionsDistDir,
167
+ edgeHandlersDistDir,
167
168
  cacheDir,
168
169
  dry,
169
170
  mode,
@@ -229,6 +230,7 @@ const tExecBuild = async function ({
229
230
  configPath,
230
231
  buildDir,
231
232
  functionsDistDir,
233
+ edgeHandlersDistDir,
232
234
  cacheDir,
233
235
  netlifyConfig,
234
236
  siteInfo,
@@ -41,6 +41,7 @@ const getDefaultFlags = function ({ env: envOpt = {} }, combinedEnv) {
41
41
  telemetry: false,
42
42
  verbose: Boolean(combinedEnv.NETLIFY_BUILD_DEBUG),
43
43
  functionsDistDir: DEFAULT_FUNCTIONS_DIST,
44
+ edgeHandlersDistDir: DEFAULT_EDGE_HANDLERS_DIST,
44
45
  cacheDir: DEFAULT_CACHE_DIR,
45
46
  deployId: combinedEnv.DEPLOY_ID,
46
47
  buildId: combinedEnv.BUILD_ID,
@@ -62,6 +63,7 @@ const computeTelemetry = function (flags, envOpts) {
62
63
  }
63
64
 
64
65
  const REQUIRE_MODE = 'require'
66
+ const DEFAULT_EDGE_HANDLERS_DIST = '.netlify/edge-handlers-dist/'
65
67
  const DEFAULT_FUNCTIONS_DIST = '.netlify/functions/'
66
68
  const DEFAULT_CACHE_DIR = '.netlify/cache/'
67
69
  const DEFAULT_STATSD_PORT = 8125
@@ -34,6 +34,7 @@ const TEST_FLAGS = ['buffer', 'telemetry']
34
34
  const INTERNAL_FLAGS = [
35
35
  'nodePath',
36
36
  'functionsDistDir',
37
+ 'edgeHandlersDistDir',
37
38
  'defaultConfig',
38
39
  'cachedConfigPath',
39
40
  'sendStatus',
@@ -22,6 +22,10 @@ export interface NetlifyPluginConstants {
22
22
  * the directory where built serverless functions are placed before deployment. Its value is always defined, but the target might not have been created yet.
23
23
  */
24
24
  FUNCTIONS_DIST: string
25
+ /**
26
+ * the directory where built Edge Handlers are placed before deployment. Its value is always defined, but the target might not have been created yet.
27
+ */
28
+ EDGE_HANDLERS_DIST: string
25
29
  /**
26
30
  * the directory where Edge Handlers source code lives.
27
31
  * `undefined` if no `netlify/edge-handlers` directory exists in the base directory and if not specified in `netlify.toml`.