@netlify/build 29.4.1 → 29.4.4-rc
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/core/bin.js +4 -4
- package/lib/core/build.js +15 -1
- package/lib/core/main.js +1 -0
- package/package.json +3 -4
package/lib/core/bin.js
CHANGED
|
@@ -3,10 +3,10 @@ import process from 'process';
|
|
|
3
3
|
import filterObj from 'filter-obj';
|
|
4
4
|
import yargs from 'yargs';
|
|
5
5
|
import { hideBin } from 'yargs/helpers';
|
|
6
|
-
import { normalizeCliFeatureFlags } from '
|
|
7
|
-
import { FLAGS } from '
|
|
8
|
-
import build from '
|
|
9
|
-
import { FALLBACK_SEVERITY_ENTRY } from '
|
|
6
|
+
import { normalizeCliFeatureFlags } from '../../lib/core/feature_flags.js';
|
|
7
|
+
import { FLAGS } from '../../lib/core/flags.js';
|
|
8
|
+
import build from '../../lib/core/main.js';
|
|
9
|
+
import { FALLBACK_SEVERITY_ENTRY } from '../../lib/core/severity.js';
|
|
10
10
|
// CLI entry point.
|
|
11
11
|
// Before adding logic to this file, please consider adding it to the main
|
|
12
12
|
// programmatic command instead, so that the new logic is available when run
|
package/lib/core/build.js
CHANGED
|
@@ -30,7 +30,7 @@ export const startBuild = function (flags) {
|
|
|
30
30
|
const errorMonitor = startErrorMonitor({ flags: flagsA, logs, bugsnagKey });
|
|
31
31
|
return { ...flagsA, errorMonitor, logs, timers };
|
|
32
32
|
};
|
|
33
|
-
const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, }) {
|
|
33
|
+
const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, framework, }) {
|
|
34
34
|
const configOpts = getConfigOpts({
|
|
35
35
|
config,
|
|
36
36
|
defaultConfig,
|
|
@@ -61,6 +61,16 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
|
|
|
61
61
|
timers,
|
|
62
62
|
quiet,
|
|
63
63
|
});
|
|
64
|
+
if (framework) {
|
|
65
|
+
const runtime = supportedRuntimes[framework];
|
|
66
|
+
if (runtime !== undefined) {
|
|
67
|
+
const dontSkip = childEnv[runtime.skipFlag] !== 'true';
|
|
68
|
+
const installed = netlifyConfig.plugins.map((plugin) => plugin.package).includes(runtime.package);
|
|
69
|
+
if (!installed && dontSkip) {
|
|
70
|
+
netlifyConfig.plugins.push({ package: runtime.package });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
64
74
|
const constants = await getConstants({
|
|
65
75
|
configPath,
|
|
66
76
|
buildDir,
|
|
@@ -366,3 +376,7 @@ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig
|
|
|
366
376
|
});
|
|
367
377
|
return { stepsCount, netlifyConfig: netlifyConfigA, statuses, failedPlugins, timers: timersB, configMutations };
|
|
368
378
|
};
|
|
379
|
+
const supportedRuntimes = {
|
|
380
|
+
next: { package: '@netlify/plugin-nextjs', skipFlag: 'NETLIFY_NEXT_PLUGIN_SKIP' },
|
|
381
|
+
gatsby: { package: '@netlify/plugin-gatsby', skipFlag: 'NETLIFY_GATSBY_PLUGIN_SKIP' },
|
|
382
|
+
};
|
package/lib/core/main.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.4.
|
|
3
|
+
"version": "29.4.4-rc",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@netlify/edge-bundler": "8.0.0",
|
|
70
70
|
"@netlify/functions-utils": "^5.1.1",
|
|
71
71
|
"@netlify/git-utils": "^5.1.0",
|
|
72
|
-
"@netlify/plugins-list": "^6.
|
|
72
|
+
"@netlify/plugins-list": "^6.59.0",
|
|
73
73
|
"@netlify/run-utils": "^5.1.0",
|
|
74
74
|
"@netlify/zip-it-and-ship-it": "^8.2.0",
|
|
75
75
|
"@sindresorhus/slugify": "^2.0.0",
|
|
@@ -148,6 +148,5 @@
|
|
|
148
148
|
"compilerOptions": {
|
|
149
149
|
"module": "commonjs"
|
|
150
150
|
}
|
|
151
|
-
}
|
|
152
|
-
"gitHead": "4bd8537773af176971af17d2c871b0f3fd8d74fd"
|
|
151
|
+
}
|
|
153
152
|
}
|