netlify-cli 9.9.3 → 9.10.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/npm-shrinkwrap.json +9 -9
- package/package.json +2 -2
- package/src/commands/deploy/deploy.js +20 -2
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "9.
|
|
9
|
+
"version": "9.10.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@netlify/framework-info": "^9.0.2",
|
|
16
16
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
17
17
|
"@netlify/plugin-edge-handlers": "^3.0.7",
|
|
18
|
-
"@netlify/plugins-list": "^6.
|
|
18
|
+
"@netlify/plugins-list": "^6.15.0",
|
|
19
19
|
"@netlify/routing-local-proxy": "^0.34.1",
|
|
20
20
|
"@netlify/zip-it-and-ship-it": "^5.9.0",
|
|
21
21
|
"@octokit/rest": "^18.0.0",
|
|
@@ -4328,9 +4328,9 @@
|
|
|
4328
4328
|
}
|
|
4329
4329
|
},
|
|
4330
4330
|
"node_modules/@netlify/plugins-list": {
|
|
4331
|
-
"version": "6.
|
|
4332
|
-
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.
|
|
4333
|
-
"integrity": "sha512-
|
|
4331
|
+
"version": "6.15.0",
|
|
4332
|
+
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.15.0.tgz",
|
|
4333
|
+
"integrity": "sha512-CGvHVRS+IInm+dyn8qEGrADsFiWY/HC8z+taIPQ9d7sZlNr3ShtXHq5fdHVHGH2A9WDVeh8+Xan87196KyE3IQ==",
|
|
4334
4334
|
"engines": {
|
|
4335
4335
|
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
4336
4336
|
}
|
|
@@ -27317,9 +27317,9 @@
|
|
|
27317
27317
|
}
|
|
27318
27318
|
},
|
|
27319
27319
|
"@netlify/plugins-list": {
|
|
27320
|
-
"version": "6.
|
|
27321
|
-
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.
|
|
27322
|
-
"integrity": "sha512-
|
|
27320
|
+
"version": "6.15.0",
|
|
27321
|
+
"resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.15.0.tgz",
|
|
27322
|
+
"integrity": "sha512-CGvHVRS+IInm+dyn8qEGrADsFiWY/HC8z+taIPQ9d7sZlNr3ShtXHq5fdHVHGH2A9WDVeh8+Xan87196KyE3IQ=="
|
|
27323
27323
|
},
|
|
27324
27324
|
"@netlify/routing-local-proxy": {
|
|
27325
27325
|
"version": "0.34.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": "9.
|
|
4
|
+
"version": "9.10.0",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Abraham Schilling <AbrahamSchilling@gmail.com> (https://gitlab.com/n4bb12)",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"@netlify/framework-info": "^9.0.2",
|
|
206
206
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
207
207
|
"@netlify/plugin-edge-handlers": "^3.0.7",
|
|
208
|
-
"@netlify/plugins-list": "^6.
|
|
208
|
+
"@netlify/plugins-list": "^6.15.0",
|
|
209
209
|
"@netlify/routing-local-proxy": "^0.34.1",
|
|
210
210
|
"@netlify/zip-it-and-ship-it": "^5.9.0",
|
|
211
211
|
"@octokit/rest": "^18.0.0",
|
|
@@ -302,6 +302,7 @@ const runDeploy = async ({
|
|
|
302
302
|
}) => {
|
|
303
303
|
let results
|
|
304
304
|
let deployId
|
|
305
|
+
|
|
305
306
|
try {
|
|
306
307
|
if (deployToProduction) {
|
|
307
308
|
await prepareProductionDeploy({ siteData, api })
|
|
@@ -462,10 +463,26 @@ const deploy = async (options, command) => {
|
|
|
462
463
|
await command.authenticate(options.auth)
|
|
463
464
|
|
|
464
465
|
let siteId = options.site || site.id
|
|
466
|
+
|
|
465
467
|
let siteData = {}
|
|
466
468
|
if (siteId) {
|
|
467
469
|
try {
|
|
468
|
-
|
|
470
|
+
const [{ siteError, siteFoundById }, sites] = await Promise.all([
|
|
471
|
+
api
|
|
472
|
+
.getSite({ siteId })
|
|
473
|
+
.then((data) => ({ siteFoundById: data }))
|
|
474
|
+
.catch((error_) => ({ siteError: error_ })),
|
|
475
|
+
api.listSites({ name: options.site, filter: 'all' }),
|
|
476
|
+
])
|
|
477
|
+
const siteFoundByName = sites.find((filteredSite) => filteredSite.name === options.site)
|
|
478
|
+
if (siteFoundById) {
|
|
479
|
+
siteData = siteFoundById
|
|
480
|
+
} else if (siteFoundByName) {
|
|
481
|
+
siteData = siteFoundByName
|
|
482
|
+
siteId = siteFoundByName.id
|
|
483
|
+
} else {
|
|
484
|
+
throw siteError
|
|
485
|
+
}
|
|
469
486
|
} catch (error_) {
|
|
470
487
|
// TODO specifically handle known cases (e.g. no account access)
|
|
471
488
|
if (error_.status === 404) {
|
|
@@ -674,7 +691,7 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co
|
|
|
674
691
|
.option('-o, --open', 'Open site after deploy', false)
|
|
675
692
|
.option('-m, --message <message>', 'A short message to include in the deploy log')
|
|
676
693
|
.option('-a, --auth <token>', 'Netlify auth token to deploy with', env.NETLIFY_AUTH_TOKEN)
|
|
677
|
-
.option('-s, --site <id>', 'A site ID to deploy to', env.NETLIFY_SITE_ID)
|
|
694
|
+
.option('-s, --site <name-or-id>', 'A site name or ID to deploy to', env.NETLIFY_SITE_ID)
|
|
678
695
|
.option('--json', 'Output deployment data as JSON')
|
|
679
696
|
.option('--timeout <number>', 'Timeout to wait for deployment to finish', (value) => Number.parseInt(value))
|
|
680
697
|
.option('--trigger', 'Trigger a new build of your site on Netlify without uploading local files')
|
|
@@ -687,6 +704,7 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co
|
|
|
687
704
|
)
|
|
688
705
|
.addExamples([
|
|
689
706
|
'netlify deploy',
|
|
707
|
+
'netlify deploy --site my-first-site',
|
|
690
708
|
'netlify deploy --prod',
|
|
691
709
|
'netlify deploy --prod --open',
|
|
692
710
|
'netlify deploy --prodIfUnlocked',
|