netlify-cli 11.8.2 → 11.8.3
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.3",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "11.8.
|
|
9
|
+
"version": "11.8.3",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@netlify/build": "^27.18.
|
|
13
|
+
"@netlify/build": "^27.18.5",
|
|
14
14
|
"@netlify/config": "^18.2.3",
|
|
15
15
|
"@netlify/edge-bundler": "^2.2.0",
|
|
16
16
|
"@netlify/framework-info": "^9.2.0",
|
|
17
17
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
18
|
-
"@netlify/plugins-list": "^6.
|
|
18
|
+
"@netlify/plugins-list": "^6.46.0",
|
|
19
19
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
20
20
|
"@octokit/rest": "^18.0.0",
|
|
21
21
|
"@sindresorhus/slugify": "^1.1.0",
|
|
@@ -1194,9 +1194,9 @@
|
|
|
1194
1194
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
1195
1195
|
},
|
|
1196
1196
|
"node_modules/@netlify/build": {
|
|
1197
|
-
"version": "27.18.
|
|
1198
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.18.
|
|
1199
|
-
"integrity": "sha512-
|
|
1197
|
+
"version": "27.18.5",
|
|
1198
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.18.5.tgz",
|
|
1199
|
+
"integrity": "sha512-SmLOcgp/VJiCe9ft/8oUmCdPBOvQ/k7G4Y0fUb1BXusRePdultUDzC0pHFybNa/YyIsA4HDTAtGsTAk8GJpu7g==",
|
|
1200
1200
|
"dependencies": {
|
|
1201
1201
|
"@bugsnag/js": "^7.0.0",
|
|
1202
1202
|
"@netlify/cache-utils": "^4.0.0",
|
|
@@ -1204,7 +1204,7 @@
|
|
|
1204
1204
|
"@netlify/edge-bundler": "^2.2.0",
|
|
1205
1205
|
"@netlify/functions-utils": "^4.2.9",
|
|
1206
1206
|
"@netlify/git-utils": "^4.0.0",
|
|
1207
|
-
"@netlify/plugins-list": "^6.
|
|
1207
|
+
"@netlify/plugins-list": "^6.46.0",
|
|
1208
1208
|
"@netlify/run-utils": "^4.0.0",
|
|
1209
1209
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
1210
1210
|
"@sindresorhus/slugify": "^2.0.0",
|
|
@@ -3696,9 +3696,9 @@
|
|
|
3696
3696
|
"integrity": "sha512-1n9VvO/9qM7cRB5f7NgSNqeUrovM7j9WVAY7ZQ4LtQuXSquFmO9Fku7WrV3zAUC6v2Y62fxGyJ0fRllYz5uXLw=="
|
|
3697
3697
|
},
|
|
3698
3698
|
"node_modules/@netlify/plugins-list": {
|
|
3699
|
-
"version": "6.
|
|
3700
|
-
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.
|
|
3701
|
-
"integrity": "sha512-
|
|
3699
|
+
"version": "6.46.0",
|
|
3700
|
+
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.46.0.tgz",
|
|
3701
|
+
"integrity": "sha512-kUX90Eacqko9ni3cepVZKXFTLmhdwES/HDRlMYxyUh+SmvXWRC+h43b11nA0/6M5PEPolUChQOZN9wZql6oJJw==",
|
|
3702
3702
|
"engines": {
|
|
3703
3703
|
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
3704
3704
|
}
|
|
@@ -23493,9 +23493,9 @@
|
|
|
23493
23493
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
23494
23494
|
},
|
|
23495
23495
|
"@netlify/build": {
|
|
23496
|
-
"version": "27.18.
|
|
23497
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.18.
|
|
23498
|
-
"integrity": "sha512-
|
|
23496
|
+
"version": "27.18.5",
|
|
23497
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.18.5.tgz",
|
|
23498
|
+
"integrity": "sha512-SmLOcgp/VJiCe9ft/8oUmCdPBOvQ/k7G4Y0fUb1BXusRePdultUDzC0pHFybNa/YyIsA4HDTAtGsTAk8GJpu7g==",
|
|
23499
23499
|
"requires": {
|
|
23500
23500
|
"@bugsnag/js": "^7.0.0",
|
|
23501
23501
|
"@netlify/cache-utils": "^4.0.0",
|
|
@@ -23503,7 +23503,7 @@
|
|
|
23503
23503
|
"@netlify/edge-bundler": "^2.2.0",
|
|
23504
23504
|
"@netlify/functions-utils": "^4.2.9",
|
|
23505
23505
|
"@netlify/git-utils": "^4.0.0",
|
|
23506
|
-
"@netlify/plugins-list": "^6.
|
|
23506
|
+
"@netlify/plugins-list": "^6.46.0",
|
|
23507
23507
|
"@netlify/run-utils": "^4.0.0",
|
|
23508
23508
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
23509
23509
|
"@sindresorhus/slugify": "^2.0.0",
|
|
@@ -24941,9 +24941,9 @@
|
|
|
24941
24941
|
"integrity": "sha512-1n9VvO/9qM7cRB5f7NgSNqeUrovM7j9WVAY7ZQ4LtQuXSquFmO9Fku7WrV3zAUC6v2Y62fxGyJ0fRllYz5uXLw=="
|
|
24942
24942
|
},
|
|
24943
24943
|
"@netlify/plugins-list": {
|
|
24944
|
-
"version": "6.
|
|
24945
|
-
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.
|
|
24946
|
-
"integrity": "sha512-
|
|
24944
|
+
"version": "6.46.0",
|
|
24945
|
+
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.46.0.tgz",
|
|
24946
|
+
"integrity": "sha512-kUX90Eacqko9ni3cepVZKXFTLmhdwES/HDRlMYxyUh+SmvXWRC+h43b11nA0/6M5PEPolUChQOZN9wZql6oJJw=="
|
|
24947
24947
|
},
|
|
24948
24948
|
"@netlify/run-utils": {
|
|
24949
24949
|
"version": "4.0.1",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "11.8.
|
|
4
|
+
"version": "11.8.3",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"@whitep4nth3r (https://twitter.com/whitep4nth3r)",
|
|
@@ -223,12 +223,12 @@
|
|
|
223
223
|
"prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!**/*/package-lock.json\" \"!.github/**/*.md\""
|
|
224
224
|
},
|
|
225
225
|
"dependencies": {
|
|
226
|
-
"@netlify/build": "^27.18.
|
|
226
|
+
"@netlify/build": "^27.18.5",
|
|
227
227
|
"@netlify/config": "^18.2.3",
|
|
228
228
|
"@netlify/edge-bundler": "^2.2.0",
|
|
229
229
|
"@netlify/framework-info": "^9.2.0",
|
|
230
230
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
231
|
-
"@netlify/plugins-list": "^6.
|
|
231
|
+
"@netlify/plugins-list": "^6.46.0",
|
|
232
232
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
233
233
|
"@octokit/rest": "^18.0.0",
|
|
234
234
|
"@sindresorhus/slugify": "^1.1.0",
|
|
@@ -7,7 +7,11 @@ const { error, exit, generateNetlifyGraphJWT, getEnvelopeEnv, getToken, normaliz
|
|
|
7
7
|
/**
|
|
8
8
|
* @param {import('../../lib/build').BuildConfig} options
|
|
9
9
|
*/
|
|
10
|
-
const checkOptions = ({ token }) => {
|
|
10
|
+
const checkOptions = ({ cachedConfig: { siteInfo = {} }, token }) => {
|
|
11
|
+
if (!siteInfo.id) {
|
|
12
|
+
error('Could not find the site ID. Please run netlify link.')
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
if (!token) {
|
|
12
16
|
error('Could not find the access token. Please run netlify login.')
|
|
13
17
|
}
|
|
@@ -68,7 +72,7 @@ const build = async (options, command) => {
|
|
|
68
72
|
await injectEnv(command, { api, buildOptions, context, site, siteInfo })
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
const { exitCode } = await runBuild(buildOptions
|
|
75
|
+
const { exitCode } = await runBuild(buildOptions)
|
|
72
76
|
exit(exitCode)
|
|
73
77
|
}
|
|
74
78
|
|
|
@@ -375,11 +375,10 @@ const runDeploy = async ({
|
|
|
375
375
|
*
|
|
376
376
|
* @param {object} config
|
|
377
377
|
* @param {*} config.cachedConfig
|
|
378
|
-
* @param {*} config.command
|
|
379
378
|
* @param {import('commander').OptionValues} config.options The options of the command
|
|
380
379
|
* @returns
|
|
381
380
|
*/
|
|
382
|
-
const handleBuild = async ({ cachedConfig,
|
|
381
|
+
const handleBuild = async ({ cachedConfig, options }) => {
|
|
383
382
|
if (!options.build) {
|
|
384
383
|
return {}
|
|
385
384
|
}
|
|
@@ -389,7 +388,7 @@ const handleBuild = async ({ cachedConfig, command, options }) => {
|
|
|
389
388
|
token,
|
|
390
389
|
options,
|
|
391
390
|
})
|
|
392
|
-
const { configMutations, exitCode, newConfig } = await runBuild(resolvedOptions
|
|
391
|
+
const { configMutations, exitCode, newConfig } = await runBuild(resolvedOptions)
|
|
393
392
|
if (exitCode !== 0) {
|
|
394
393
|
exit(exitCode)
|
|
395
394
|
}
|
|
@@ -574,7 +573,6 @@ const deploy = async (options, command) => {
|
|
|
574
573
|
|
|
575
574
|
const { newConfig, configMutations = [] } = await handleBuild({
|
|
576
575
|
cachedConfig: command.netlify.cachedConfig,
|
|
577
|
-
command,
|
|
578
576
|
options,
|
|
579
577
|
})
|
|
580
578
|
const config = newConfig || command.netlify.config
|
package/src/lib/build.js
CHANGED
|
@@ -3,8 +3,6 @@ const process = require('process')
|
|
|
3
3
|
|
|
4
4
|
const netlifyBuildPromise = import('@netlify/build')
|
|
5
5
|
|
|
6
|
-
const { NETLIFYDEVERR, detectServerSettings, error, log } = require('../utils')
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* The buildConfig + a missing cachedConfig
|
|
10
8
|
* @typedef BuildConfig
|
|
@@ -44,20 +42,11 @@ const getBuildOptions = ({ cachedConfig, options: { context, cwd, debug, dry, js
|
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
44
|
* run the build command
|
|
47
|
-
* @param {BuildConfig}
|
|
48
|
-
* @param {import('../commands/base-command').BaseCommand} command
|
|
49
|
-
* @param {import('commander').OptionValues} commandOptions
|
|
45
|
+
* @param {BuildConfig} options
|
|
50
46
|
* @returns
|
|
51
47
|
*/
|
|
52
|
-
const runBuild = async (
|
|
48
|
+
const runBuild = async (options) => {
|
|
53
49
|
const { default: build } = await netlifyBuildPromise
|
|
54
|
-
const { cachedConfig, config, site } = command.netlify
|
|
55
|
-
const devConfig = {
|
|
56
|
-
framework: '#auto',
|
|
57
|
-
...(config.functionsDirectory && { functions: config.functionsDirectory }),
|
|
58
|
-
...config.dev,
|
|
59
|
-
...commandOptions,
|
|
60
|
-
}
|
|
61
50
|
|
|
62
51
|
// If netlify NETLIFY_API_URL is set we need to pass this information to @netlify/build
|
|
63
52
|
// TODO don't use testOpts, but add real properties to do this.
|
|
@@ -67,52 +56,10 @@ const runBuild = async (buildOptions, command, commandOptions) => {
|
|
|
67
56
|
scheme: apiUrl.protocol.slice(0, -1),
|
|
68
57
|
host: apiUrl.host,
|
|
69
58
|
}
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** @type {Partial<import('../../utils/types').ServerSettings>} */
|
|
74
|
-
let settings = {}
|
|
75
|
-
try {
|
|
76
|
-
settings = await detectServerSettings(devConfig, commandOptions, site.root)
|
|
77
|
-
|
|
78
|
-
const defaultConfig = { build: {} }
|
|
79
|
-
|
|
80
|
-
if (settings.buildCommand && settings.dist) {
|
|
81
|
-
buildOptions.cachedConfig.config.build.command = settings.buildCommand
|
|
82
|
-
defaultConfig.build.command = settings.buildCommand
|
|
83
|
-
buildOptions.cachedConfig.config.build.publish = settings.buildCommand
|
|
84
|
-
defaultConfig.build.publish = settings.dist
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (defaultConfig.build.command && defaultConfig.build.publish) {
|
|
88
|
-
buildOptions.defaultConfig = defaultConfig
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// If there are plugins that we should be running for this site, add them
|
|
92
|
-
// to the config as if they were declared in netlify.toml. We must check
|
|
93
|
-
// whether the plugin has already been added by another source (like the
|
|
94
|
-
// TOML file or the UI), as we don't want to run the same plugin twice.
|
|
95
|
-
if (settings.plugins) {
|
|
96
|
-
const { plugins: existingPlugins = [] } = cachedConfig.config
|
|
97
|
-
const existingPluginNames = new Set(existingPlugins.map((plugin) => plugin.package))
|
|
98
|
-
const newPlugins = settings.plugins
|
|
99
|
-
.map((pluginName) => {
|
|
100
|
-
if (existingPluginNames.has(pluginName)) {
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return { package: pluginName, origin: 'config', inputs: {} }
|
|
105
|
-
})
|
|
106
|
-
.filter(Boolean)
|
|
107
|
-
|
|
108
|
-
buildOptions.cachedConfig.config.plugins = [...newPlugins, ...cachedConfig.config.plugins]
|
|
109
|
-
}
|
|
110
|
-
} catch (detectServerSettingsError) {
|
|
111
|
-
log(NETLIFYDEVERR, detectServerSettingsError.message)
|
|
112
|
-
error(detectServerSettingsError)
|
|
59
|
+
options = { ...options, testOpts }
|
|
113
60
|
}
|
|
114
61
|
|
|
115
|
-
const { configMutations, netlifyConfig: newConfig, severityCode: exitCode } = await build(
|
|
62
|
+
const { configMutations, netlifyConfig: newConfig, severityCode: exitCode } = await build(options)
|
|
116
63
|
return { exitCode, newConfig, configMutations }
|
|
117
64
|
}
|
|
118
65
|
|
|
@@ -158,10 +158,7 @@ const handleStaticServer = async ({ devConfig, options, projectDir }) => {
|
|
|
158
158
|
*/
|
|
159
159
|
const getSettingsFromFramework = (framework) => {
|
|
160
160
|
const {
|
|
161
|
-
build: {
|
|
162
|
-
directory: dist,
|
|
163
|
-
commands: [buildCommand],
|
|
164
|
-
},
|
|
161
|
+
build: { directory: dist },
|
|
165
162
|
dev: {
|
|
166
163
|
commands: [command],
|
|
167
164
|
port: frameworkPort,
|
|
@@ -175,7 +172,6 @@ const getSettingsFromFramework = (framework) => {
|
|
|
175
172
|
|
|
176
173
|
return {
|
|
177
174
|
command,
|
|
178
|
-
buildCommand,
|
|
179
175
|
frameworkPort,
|
|
180
176
|
dist: staticDir || dist,
|
|
181
177
|
framework: frameworkName,
|
|
@@ -254,7 +250,6 @@ const handleCustomFramework = ({ devConfig }) => {
|
|
|
254
250
|
const mergeSettings = async ({ devConfig, frameworkSettings = {} }) => {
|
|
255
251
|
const {
|
|
256
252
|
command: frameworkCommand,
|
|
257
|
-
buildCommand,
|
|
258
253
|
frameworkPort: frameworkDetectedPort,
|
|
259
254
|
dist,
|
|
260
255
|
framework,
|
|
@@ -268,7 +263,6 @@ const mergeSettings = async ({ devConfig, frameworkSettings = {} }) => {
|
|
|
268
263
|
const useStaticServer = !(command && frameworkPort)
|
|
269
264
|
return {
|
|
270
265
|
command,
|
|
271
|
-
buildCommand,
|
|
272
266
|
frameworkPort: useStaticServer ? await getStaticServerPort({ devConfig }) : frameworkPort,
|
|
273
267
|
dist: devConfig.publish || dist || getDefaultDist(),
|
|
274
268
|
framework,
|