netlify-cli 6.9.13 → 6.9.17

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.
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "6.9.13",
3
+ "version": "6.9.17",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "6.9.13",
9
+ "version": "6.9.17",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^18.13.0",
13
+ "@netlify/build": "^18.13.1",
14
14
  "@netlify/config": "^15.6.3",
15
15
  "@netlify/framework-info": "^5.9.2",
16
16
  "@netlify/local-functions-proxy": "^1.1.1",
17
17
  "@netlify/plugin-edge-handlers": "^1.11.22",
18
- "@netlify/plugins-list": "^3.6.0",
18
+ "@netlify/plugins-list": "^3.6.1",
19
19
  "@netlify/routing-local-proxy": "^0.33.2",
20
- "@netlify/zip-it-and-ship-it": "4.22.0",
20
+ "@netlify/zip-it-and-ship-it": "4.23.0",
21
21
  "@oclif/command": "^1.6.1",
22
22
  "@oclif/config": "^1.15.1",
23
23
  "@oclif/errors": "^1.3.4",
@@ -32,7 +32,6 @@
32
32
  "ascii-table": "0.0.9",
33
33
  "backoff": "^2.5.0",
34
34
  "better-opn": "^2.1.1",
35
- "body-parser": "^1.19.0",
36
35
  "boxen": "^5.0.0",
37
36
  "chalk": "^4.0.0",
38
37
  "chokidar": "^3.0.2",
@@ -2341,9 +2340,9 @@
2341
2340
  }
2342
2341
  },
2343
2342
  "node_modules/@netlify/build": {
2344
- "version": "18.13.0",
2345
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-18.13.0.tgz",
2346
- "integrity": "sha512-c/+KxutCLeN7h3BmV+SEesskbepP9SPZ5QkPdWl5JamMCKvqVxlfv/J9o9gAqq/NvAdwl09PVly9tUYdfxdnOQ==",
2343
+ "version": "18.13.1",
2344
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-18.13.1.tgz",
2345
+ "integrity": "sha512-E5tmUV+fvC5mdQUiJjQpMrWgoHkvfqKFhmbnox43yJ2bU98xL2mq/tLLQqKV9STzMa8/amSBb+CLSJ9iB0THvA==",
2347
2346
  "dependencies": {
2348
2347
  "@bugsnag/js": "^7.0.0",
2349
2348
  "@netlify/cache-utils": "^2.0.0",
@@ -2353,7 +2352,7 @@
2353
2352
  "@netlify/plugin-edge-handlers": "^1.11.22",
2354
2353
  "@netlify/plugins-list": "^3.6.0",
2355
2354
  "@netlify/run-utils": "^2.0.0",
2356
- "@netlify/zip-it-and-ship-it": "^4.22.0",
2355
+ "@netlify/zip-it-and-ship-it": "^4.23.0",
2357
2356
  "@sindresorhus/slugify": "^1.1.0",
2358
2357
  "@ungap/from-entries": "^0.2.1",
2359
2358
  "ansi-escapes": "^4.3.2",
@@ -3243,9 +3242,9 @@
3243
3242
  }
3244
3243
  },
3245
3244
  "node_modules/@netlify/plugins-list": {
3246
- "version": "3.6.0",
3247
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-3.6.0.tgz",
3248
- "integrity": "sha512-yRgsmBw8Wzk6/I/afcerhC+3XtVxXUF0xrSMOYgxV0bmaKJmB/0StJG4FY9TOAmb/IzCp82mR/63ZpzwIvpVzw==",
3245
+ "version": "3.6.1",
3246
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-3.6.1.tgz",
3247
+ "integrity": "sha512-MuFaJ9XzhsO0Mam0717TVNe9smrAe8MpWLvB4Sr3nWN6x2aiRmJqv5vsp7Sd6x2UwFZ5CKLD6tO3zhDW76kx0g==",
3249
3248
  "engines": {
3250
3249
  "node": ">=8.3.0"
3251
3250
  }
@@ -3321,12 +3320,12 @@
3321
3320
  }
3322
3321
  },
3323
3322
  "node_modules/@netlify/zip-it-and-ship-it": {
3324
- "version": "4.22.0",
3325
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-4.22.0.tgz",
3326
- "integrity": "sha512-etOGaq248ws55tYiJ16qnkpD9UKisiVH4g/RnO1oVP45+BSdRmNynUZkFbAZqpkEe8F61r4lxGBHsStuxXfXMQ==",
3323
+ "version": "4.23.0",
3324
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-4.23.0.tgz",
3325
+ "integrity": "sha512-hefNXuzWnQqEClsgQMOAubkScTiIf+r+AmsrEShNkUUrg9pUoQpNVpbIpQUiP9VEIvnrCwAtPmSOaus0ijTOXQ==",
3327
3326
  "dependencies": {
3327
+ "@babel/parser": "^7.15.7",
3328
3328
  "@netlify/esbuild": "^0.13.6",
3329
- "acorn": "^8.4.0",
3330
3329
  "archiver": "^5.3.0",
3331
3330
  "array-flat-polyfill": "^1.0.1",
3332
3331
  "common-path-prefix": "^3.0.0",
@@ -3339,6 +3338,7 @@
3339
3338
  "filter-obj": "^2.0.1",
3340
3339
  "find-up": "^5.0.0",
3341
3340
  "glob": "^7.1.6",
3341
+ "is-builtin-module": "^3.1.0",
3342
3342
  "junk": "^3.1.0",
3343
3343
  "locate-path": "^6.0.0",
3344
3344
  "make-dir": "^3.1.0",
@@ -4811,6 +4811,7 @@
4811
4811
  "version": "8.5.0",
4812
4812
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz",
4813
4813
  "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==",
4814
+ "dev": true,
4814
4815
  "bin": {
4815
4816
  "acorn": "bin/acorn"
4816
4817
  },
@@ -12375,7 +12376,6 @@
12375
12376
  "version": "3.1.0",
12376
12377
  "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz",
12377
12378
  "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==",
12378
- "dev": true,
12379
12379
  "dependencies": {
12380
12380
  "builtin-modules": "^3.0.0"
12381
12381
  },
@@ -22749,9 +22749,9 @@
22749
22749
  }
22750
22750
  },
22751
22751
  "@netlify/build": {
22752
- "version": "18.13.0",
22753
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-18.13.0.tgz",
22754
- "integrity": "sha512-c/+KxutCLeN7h3BmV+SEesskbepP9SPZ5QkPdWl5JamMCKvqVxlfv/J9o9gAqq/NvAdwl09PVly9tUYdfxdnOQ==",
22752
+ "version": "18.13.1",
22753
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-18.13.1.tgz",
22754
+ "integrity": "sha512-E5tmUV+fvC5mdQUiJjQpMrWgoHkvfqKFhmbnox43yJ2bU98xL2mq/tLLQqKV9STzMa8/amSBb+CLSJ9iB0THvA==",
22755
22755
  "requires": {
22756
22756
  "@bugsnag/js": "^7.0.0",
22757
22757
  "@netlify/cache-utils": "^2.0.0",
@@ -22761,7 +22761,7 @@
22761
22761
  "@netlify/plugin-edge-handlers": "^1.11.22",
22762
22762
  "@netlify/plugins-list": "^3.6.0",
22763
22763
  "@netlify/run-utils": "^2.0.0",
22764
- "@netlify/zip-it-and-ship-it": "^4.22.0",
22764
+ "@netlify/zip-it-and-ship-it": "^4.23.0",
22765
22765
  "@sindresorhus/slugify": "^1.1.0",
22766
22766
  "@ungap/from-entries": "^0.2.1",
22767
22767
  "ansi-escapes": "^4.3.2",
@@ -23393,9 +23393,9 @@
23393
23393
  }
23394
23394
  },
23395
23395
  "@netlify/plugins-list": {
23396
- "version": "3.6.0",
23397
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-3.6.0.tgz",
23398
- "integrity": "sha512-yRgsmBw8Wzk6/I/afcerhC+3XtVxXUF0xrSMOYgxV0bmaKJmB/0StJG4FY9TOAmb/IzCp82mR/63ZpzwIvpVzw=="
23396
+ "version": "3.6.1",
23397
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-3.6.1.tgz",
23398
+ "integrity": "sha512-MuFaJ9XzhsO0Mam0717TVNe9smrAe8MpWLvB4Sr3nWN6x2aiRmJqv5vsp7Sd6x2UwFZ5CKLD6tO3zhDW76kx0g=="
23399
23399
  },
23400
23400
  "@netlify/routing-local-proxy": {
23401
23401
  "version": "0.33.2",
@@ -23441,12 +23441,12 @@
23441
23441
  }
23442
23442
  },
23443
23443
  "@netlify/zip-it-and-ship-it": {
23444
- "version": "4.22.0",
23445
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-4.22.0.tgz",
23446
- "integrity": "sha512-etOGaq248ws55tYiJ16qnkpD9UKisiVH4g/RnO1oVP45+BSdRmNynUZkFbAZqpkEe8F61r4lxGBHsStuxXfXMQ==",
23444
+ "version": "4.23.0",
23445
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-4.23.0.tgz",
23446
+ "integrity": "sha512-hefNXuzWnQqEClsgQMOAubkScTiIf+r+AmsrEShNkUUrg9pUoQpNVpbIpQUiP9VEIvnrCwAtPmSOaus0ijTOXQ==",
23447
23447
  "requires": {
23448
+ "@babel/parser": "^7.15.7",
23448
23449
  "@netlify/esbuild": "^0.13.6",
23449
- "acorn": "^8.4.0",
23450
23450
  "archiver": "^5.3.0",
23451
23451
  "array-flat-polyfill": "^1.0.1",
23452
23452
  "common-path-prefix": "^3.0.0",
@@ -23459,6 +23459,7 @@
23459
23459
  "filter-obj": "^2.0.1",
23460
23460
  "find-up": "^5.0.0",
23461
23461
  "glob": "^7.1.6",
23462
+ "is-builtin-module": "^3.1.0",
23462
23463
  "junk": "^3.1.0",
23463
23464
  "locate-path": "^6.0.0",
23464
23465
  "make-dir": "^3.1.0",
@@ -24644,7 +24645,8 @@
24644
24645
  "acorn": {
24645
24646
  "version": "8.5.0",
24646
24647
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz",
24647
- "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q=="
24648
+ "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==",
24649
+ "dev": true
24648
24650
  },
24649
24651
  "acorn-jsx": {
24650
24652
  "version": "5.3.2",
@@ -30408,7 +30410,6 @@
30408
30410
  "version": "3.1.0",
30409
30411
  "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz",
30410
30412
  "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==",
30411
- "dev": true,
30412
30413
  "requires": {
30413
30414
  "builtin-modules": "^3.0.0"
30414
30415
  }
@@ -1 +1 @@
1
- {"version":"6.9.13","commands":{"api":{"id":"api","description":"Run any Netlify API method\n\nFor more information on available methods checkout https://open-api.netlify.com/ or run \"netlify api --list\"\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify api --list","netlify api getSite --data '{ \"site_id\": \"123456\"}'"],"flags":{"data":{"name":"data","type":"option","char":"d","description":"Data to use"},"list":{"name":"list","type":"boolean","description":"List out available API methods","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"apiMethod","description":"Open API method to run"}]},"deploy":{"id":"deploy","description":"Create a new deploy from the contents of a folder\n\nDeploys from the build settings found in the netlify.toml file, or settings from the API.\n\nThe following environment variables can be used to override configuration file lookups and prompts:\n\n- `NETLIFY_AUTH_TOKEN` - an access token to use when authenticating commands. Keep this value private.\n- `NETLIFY_SITE_ID` - override any linked site in the current working directory.\n\nLambda functions in the function folder can be in the following configurations for deployment:\n\n\nBuilt Go binaries:\n------------------\n\n```\nfunctions/\n└── nameOfGoFunction\n```\n\nBuild binaries of your Go language functions into the functions folder as part of your build process.\n\n\nSingle file Node.js functions:\n-----------------------------\n\nBuild dependency bundled Node.js lambda functions with tools like netlify-lambda, webpack or browserify into the function folder as part of your build process.\n\n```\nfunctions/\n└── nameOfBundledNodeJSFunction.js\n```\n\nUnbundled Node.js functions that have dependencies outside or inside of the functions folder:\n---------------------------------------------------------------------------------------------\n\nYou can ship unbundled Node.js functions with the CLI, utilizing top level project dependencies, or a nested package.json.\nIf you use nested dependencies, be sure to populate the nested node_modules as part of your build process before deploying using npm or yarn.\n\n```\nproject/\n├── functions\n│ ├── functionName/\n│ │ ├── functionName.js (Note the folder and the function name need to match)\n│ │ ├── package.json\n│ │ └── node_modules/\n│ └── unbundledFunction.js\n├── package.json\n├── netlify.toml\n└── node_modules/\n```\n\nAny mix of these configurations works as well.\n\n\nNode.js function entry points\n-----------------------------\n\nFunction entry points are determined by the file name and name of the folder they are in:\n\n```\nfunctions/\n├── aFolderlessFunctionEntrypoint.js\n└── functionName/\n ├── notTheEntryPoint.js\n └── functionName.js\n```\n\nSupport for package.json's main field, and intrinsic index.js entrypoints are coming soon.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify deploy","netlify deploy --prod","netlify deploy --prod --open","netlify deploy --prodIfUnlocked","netlify deploy --message \"A message with an $ENV_VAR\"","netlify deploy --auth $NETLIFY_AUTH_TOKEN","netlify deploy --trigger"],"flags":{"dir":{"name":"dir","type":"option","char":"d","description":"Specify a folder to deploy"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions folder to deploy"},"prod":{"name":"prod","type":"boolean","char":"p","description":"Deploy to production","allowNo":false},"prodIfUnlocked":{"name":"prodIfUnlocked","type":"boolean","description":"Deploy to production if unlocked, create a draft otherwise","allowNo":false},"alias":{"name":"alias","type":"option","description":"Specifies the alias for deployment, the string at the beginning of the deploy subdomain. Useful for creating predictable deployment URLs. Avoid setting an alias string to the same value as a deployed branch. `alias` doesn’t create a branch deploy and can’t be used in conjunction with the branch subdomain feature. Maximum 37 characters."},"branch":{"name":"branch","type":"option","char":"b","description":"Serves the same functionality as --alias. Deprecated and will be removed in future versions"},"open":{"name":"open","type":"boolean","char":"o","description":"Open site after deploy","allowNo":false},"message":{"name":"message","type":"option","char":"m","description":"A short message to include in the deploy log"},"auth":{"name":"auth","type":"option","char":"a","description":"Netlify auth token to deploy with"},"site":{"name":"site","type":"option","char":"s","description":"A site ID to deploy to"},"json":{"name":"json","type":"boolean","description":"Output deployment data as JSON","allowNo":false},"timeout":{"name":"timeout","type":"option","description":"Timeout to wait for deployment to finish"},"trigger":{"name":"trigger","type":"boolean","description":"Trigger a new build of your site on Netlify without uploading local files","allowNo":false},"build":{"name":"build","type":"boolean","description":"Run build command before deploying","allowNo":false},"skip-functions-cache":{"name":"skip-functions-cache","type":"boolean","description":"Ignore any functions created as part of a previous `build` or `deploy` commands, forcing them to be bundled again as part of the deployment","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"init":{"id":"init","description":"Configure continuous deployment for a new or existing site. To create a new site without continuous deployment, use `netlify sites:create`","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"manual":{"name":"manual","type":"boolean","char":"m","description":"Manually configure a git remote for CI","allowNo":false},"force":{"name":"force","type":"boolean","description":"Reinitialize CI hooks if the linked site is already configured to use CI","allowNo":false},"gitRemoteName":{"name":"gitRemoteName","type":"option","description":"Name of Git remote to use. e.g. \"origin\""},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"link":{"id":"link","description":"Link a local repo or project folder to an existing site on Netlify","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify link","netlify link --id 123-123-123-123","netlify link --name my-site-name"],"flags":{"id":{"name":"id","type":"option","description":"ID of site to link to"},"name":{"name":"name","type":"option","description":"Name of site to link to"},"gitRemoteName":{"name":"gitRemoteName","type":"option","description":"Name of Git remote to use. e.g. \"origin\""},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"login":{"id":"login","description":"Login to your Netlify account\n\nOpens a web browser to acquire an OAuth token.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"new":{"name":"new","type":"boolean","description":"Login to new Netlify account","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"logout":{"id":"logout","description":"Logout of your Netlify account","pluginName":"netlify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"switch":{"id":"switch","description":"Switch your active Netlify account","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"unlink":{"id":"unlink","description":"Unlink a local folder from a Netlify site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"watch":{"id":"watch","description":"Watch for site deploy to finish","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify watch","git push && netlify watch"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"addons:auth":{"id":"addons:auth","description":"Login to add-on provider","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:auth"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on slug","required":true}]},"addons:config":{"id":"addons:config","description":"Configure add-on settings","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:config"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons:create":{"id":"addons:create","description":"Add an add-on extension to your site\n...\nAdd-ons are a way to extend the functionality of your Netlify site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:create"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons:delete":{"id":"addons:delete","description":"Remove an add-on extension to your site\n...\nAdd-ons are a way to extend the functionality of your Netlify site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:delete"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete without prompting (useful for CI)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons":{"id":"addons","description":"(Beta) Manage Netlify Add-ons","pluginName":"netlify-cli","pluginType":"core","aliases":["addon"],"examples":["netlify addons:create addon-xyz","netlify addons:list","netlify addons:config addon-xyz","netlify addons:delete addon-xyz","netlify addons:auth addon-xyz"],"flags":{},"args":[]},"addons:list":{"id":"addons:list","description":"List currently installed add-ons for site","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:list"],"flags":{"json":{"name":"json","type":"boolean","description":"Output add-on data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"build":{"id":"build","description":"(Beta) Build on your local machine","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify build"],"flags":{"dry":{"name":"dry","type":"boolean","description":"Dry run: show instructions without running them","allowNo":false},"context":{"name":"context","type":"option","description":"Build context"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev:exec":{"id":"dev:exec","description":"Exec command\nRuns a command within the netlify dev environment, e.g. with env variables from any installed addons\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev:exec npm run bootstrap"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev":{"id":"dev","description":"Local dev server\nThe dev command will run a local dev server with Netlify's proxy and redirect rules\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev","$ netlify dev -d public","$ netlify dev -c \"hugo server -w\" --targetPort 1313"],"flags":{"command":{"name":"command","type":"option","char":"c","description":"command to run"},"port":{"name":"port","type":"option","char":"p","description":"port of netlify dev"},"targetPort":{"name":"targetPort","type":"option","description":"port of target app server"},"framework":{"name":"framework","type":"option","description":"framework to use. Defaults to #auto which automatically detects a framework"},"staticServerPort":{"name":"staticServerPort","type":"option","description":"port of the static app server used when no framework is detected","hidden":true},"dir":{"name":"dir","type":"option","char":"d","description":"dir with static files"},"functions":{"name":"functions","type":"option","char":"f","description":"specify a functions folder to serve"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"live":{"name":"live","type":"boolean","char":"l","description":"start a public live session","allowNo":false},"edgeHandlers":{"name":"edgeHandlers","type":"boolean","char":"e","description":"activates the Edge Handlers runtime","hidden":true,"allowNo":false},"trafficMesh":{"name":"trafficMesh","type":"boolean","char":"t","description":"(DEPRECATED: use --edgeHandlers or -e instead) uses Traffic Mesh for proxying requests","hidden":true,"allowNo":false},"locationDb":{"name":"locationDb","type":"option","char":"g","description":"specify the path to a local GeoIP location database in MMDB format","hidden":true},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev:trace":{"id":"dev:trace","description":"Trace command\nSimulates Netlify's Edge routing logic to match specific requests.\nThis command is designed to mimic cURL's command line, so the flags are more familiar.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev:trace http://localhost/routing-path","$ netlify dev:trace -w dist-directory http://localhost/routing-path","$ netlify dev:trace -X POST http://localhost/routing-path","$ netlify dev:trace -H \"Accept-Language es\" http://localhost/routing-path","$ netlify dev:trace --cookie nf_jwt=token http://localhost/routing-path"],"flags":{"request":{"name":"request","type":"option","char":"X","description":"Specifies a custom request method [default: GET]"},"cookie":{"name":"cookie","type":"option","char":"b","description":"Request cookie, this flag can be used multiple times. Example: \"nf_jwt=token\""},"header":{"name":"header","type":"option","char":"H","description":"Request header, this flag can be used multiple times. Example: \"Host: netlify.test\""},"watch":{"name":"watch","type":"option","char":"w","description":"Path to the publish directory"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false}},"args":[{"name":"url","description":"Sets the request URL","required":true}]},"env:get":{"id":"env:get","description":"Get resolved value of specified environment variable (includes netlify.toml)","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true}]},"env:import":{"id":"env:import","description":"Import and set environment variables from .env file","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"replaceExisting":{"name":"replaceExisting","type":"boolean","char":"r","description":"Replace all existing variables instead of merging them with the current ones","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"fileName","description":".env file to import","required":true}]},"env":{"id":"env","description":"(Beta) Control environment variables for the current site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify env:list","netlify env:get VAR_NAME","netlify env:set VAR_NAME value","netlify env:unset VAR_NAME","netlify env:import fileName"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"env:list":{"id":"env:list","description":"Lists resolved environment variables for site (includes netlify.toml)","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"env:set":{"id":"env:set","description":"Set value of environment variable","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true},{"name":"value","description":"Value to set to","required":false,"default":""}]},"env:unset":{"id":"env:unset","description":"Unset an environment variable which removes it from the UI","pluginName":"netlify-cli","pluginType":"core","aliases":["env:delete","env:remove"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true}]},"functions:build":{"id":"functions:build","description":"Build functions locally\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:build"],"flags":{"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to build to"},"src":{"name":"src","type":"option","char":"s","description":"Specify the source directory for the functions"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"functions:create":{"id":"functions:create","description":"Create a new function locally","pluginName":"netlify-cli","pluginType":"core","aliases":["function:create"],"examples":["netlify functions:create","netlify functions:create hello-world","netlify functions:create --name hello-world"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"function name"},"url":{"name":"url","type":"option","char":"u","description":"pull template from URL"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"name of your new function file inside your functions directory"}]},"functions":{"id":"functions","description":"Manage netlify functions\nThe `functions` command will help you manage the functions in this site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function"],"examples":["netlify functions:create --name function-xyz","netlify functions:build --name function-abc --timeout 30s"],"flags":{},"args":[]},"functions:invoke":{"id":"functions:invoke","description":"Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions","pluginName":"netlify-cli","pluginType":"core","aliases":["function:trigger"],"examples":["$ netlify functions:invoke","$ netlify functions:invoke myfunction","$ netlify functions:invoke --name myfunction","$ netlify functions:invoke --name myfunction --identity","$ netlify functions:invoke --name myfunction --no-identity","$ netlify functions:invoke myfunction --payload '{\"foo\": 1}'","$ netlify functions:invoke myfunction --querystring \"foo=1","$ netlify functions:invoke myfunction --payload \"./pathTo.json\""],"flags":{"name":{"name":"name","type":"option","char":"n","description":"function name to invoke"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions folder to parse, overriding netlify.toml"},"querystring":{"name":"querystring","type":"option","char":"q","description":"Querystring to add to your function invocation"},"payload":{"name":"payload","type":"option","char":"p","description":"Supply POST payload in stringified json, or a path to a json file"},"identity":{"name":"identity","type":"boolean","description":"simulate Netlify Identity authentication JWT. pass --no-identity to affirm unauthenticated request","allowNo":true},"port":{"name":"port","type":"option","description":"Port where netlify dev is accessible. e.g. 8888"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"function name to invoke"}]},"functions:list":{"id":"functions:list","description":"List functions that exist locally\n\nHelpful for making sure that you have formatted your functions correctly\n\nNOT the same as listing the functions that have been deployed. For that info you need to go to your Netlify deploy log.\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:list"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name to print"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to list"},"json":{"name":"json","type":"boolean","description":"Output function data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"functions:serve":{"id":"functions:serve","description":"(Beta) Serve functions locally\n\nHelpful for debugging functions.\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:serve"],"flags":{"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to serve"},"port":{"name":"port","type":"option","char":"p","description":"Specify a port for the functions server"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm":{"id":"lm","description":"Handle Netlify Large Media operations\nThe lm command will help you manage large media for a site\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify lm:info","netlify lm:install","netlify lm:setup"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:info":{"id":"lm:info","description":"Show large media requirements information.","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:install":{"id":"lm:install","description":"Configures your computer to use Netlify Large Media.\nIt installs the required credentials helper for Git,\nand configures your Git environment with the right credentials.","pluginName":"netlify-cli","pluginType":"core","aliases":["lm:init"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Force the credentials helper installation","allowNo":false}},"args":[]},"lm:setup":{"id":"lm:setup","description":"Configures your site to use Netlify Large Media.\nIt runs the install command if you have not installed the dependencies yet.","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"Skip the credentials helper installation check","allowNo":false},"force-install":{"name":"force-install","type":"boolean","char":"f","description":"Force the credentials helper installation","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:uninstall":{"id":"lm:uninstall","description":"Uninstalls Netlify git credentials helper and cleans up any related configuration changes made by the install command.","pluginName":"netlify-cli","pluginType":"core","hidden":true,"aliases":["lm:remove"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"open:admin":{"id":"open:admin","description":"Opens current site admin UI in Netlify","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open:admin"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"open":{"id":"open","description":"Open settings for the site linked to the current folder","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open --site","netlify open --admin","netlify open:admin","netlify open:site"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"},"site":{"name":"site","type":"boolean","description":"Open site","allowNo":false},"admin":{"name":"admin","type":"boolean","description":"Open Netlify site","allowNo":false}},"args":[]},"open:site":{"id":"open:site","description":"Opens current site url in browser","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open:site"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"sites:create":{"id":"sites:create","description":"Create an empty site (advanced)\n\nCreate a blank site that isn't associated with any git remote. Does not link to the current working directory.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name of site"},"account-slug":{"name":"account-slug","type":"option","char":"a","description":"account slug to create the site under"},"with-ci":{"name":"with-ci","type":"boolean","char":"c","description":"initialize CI hooks during site creation","allowNo":false},"manual":{"name":"manual","type":"boolean","char":"m","description":"Force manual CI setup. Used --with-ci flag","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"sites:delete":{"id":"sites:delete","description":"Delete a site\n\nThis command will permanently delete the site on Netlify. Use with caution.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify sites:delete 1234-3262-1211"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete without prompting (useful for CI)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"siteId","description":"Site ID to delete.","required":true}]},"sites":{"id":"sites","description":"Handle various site operations\nThe sites command will help you manage all your sites\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify sites:create --name my-new-site","netlify sites:list"],"flags":{},"args":[]},"sites:list":{"id":"sites:list","description":"List all sites you have access to","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"Output site data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"status:hooks":{"id":"status:hooks","description":"Print hook information of the linked site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"status":{"id":"status","description":"Print status information","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","description":"Output system info","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]}}}
1
+ {"version":"6.9.17","commands":{"api":{"id":"api","description":"Run any Netlify API method\n\nFor more information on available methods checkout https://open-api.netlify.com/ or run \"netlify api --list\"\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify api --list","netlify api getSite --data '{ \"site_id\": \"123456\"}'"],"flags":{"data":{"name":"data","type":"option","char":"d","description":"Data to use"},"list":{"name":"list","type":"boolean","description":"List out available API methods","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"apiMethod","description":"Open API method to run"}]},"deploy":{"id":"deploy","description":"Create a new deploy from the contents of a folder\n\nDeploys from the build settings found in the netlify.toml file, or settings from the API.\n\nThe following environment variables can be used to override configuration file lookups and prompts:\n\n- `NETLIFY_AUTH_TOKEN` - an access token to use when authenticating commands. Keep this value private.\n- `NETLIFY_SITE_ID` - override any linked site in the current working directory.\n\nLambda functions in the function folder can be in the following configurations for deployment:\n\n\nBuilt Go binaries:\n------------------\n\n```\nfunctions/\n└── nameOfGoFunction\n```\n\nBuild binaries of your Go language functions into the functions folder as part of your build process.\n\n\nSingle file Node.js functions:\n-----------------------------\n\nBuild dependency bundled Node.js lambda functions with tools like netlify-lambda, webpack or browserify into the function folder as part of your build process.\n\n```\nfunctions/\n└── nameOfBundledNodeJSFunction.js\n```\n\nUnbundled Node.js functions that have dependencies outside or inside of the functions folder:\n---------------------------------------------------------------------------------------------\n\nYou can ship unbundled Node.js functions with the CLI, utilizing top level project dependencies, or a nested package.json.\nIf you use nested dependencies, be sure to populate the nested node_modules as part of your build process before deploying using npm or yarn.\n\n```\nproject/\n├── functions\n│ ├── functionName/\n│ │ ├── functionName.js (Note the folder and the function name need to match)\n│ │ ├── package.json\n│ │ └── node_modules/\n│ └── unbundledFunction.js\n├── package.json\n├── netlify.toml\n└── node_modules/\n```\n\nAny mix of these configurations works as well.\n\n\nNode.js function entry points\n-----------------------------\n\nFunction entry points are determined by the file name and name of the folder they are in:\n\n```\nfunctions/\n├── aFolderlessFunctionEntrypoint.js\n└── functionName/\n ├── notTheEntryPoint.js\n └── functionName.js\n```\n\nSupport for package.json's main field, and intrinsic index.js entrypoints are coming soon.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify deploy","netlify deploy --prod","netlify deploy --prod --open","netlify deploy --prodIfUnlocked","netlify deploy --message \"A message with an $ENV_VAR\"","netlify deploy --auth $NETLIFY_AUTH_TOKEN","netlify deploy --trigger"],"flags":{"dir":{"name":"dir","type":"option","char":"d","description":"Specify a folder to deploy"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions folder to deploy"},"prod":{"name":"prod","type":"boolean","char":"p","description":"Deploy to production","allowNo":false},"prodIfUnlocked":{"name":"prodIfUnlocked","type":"boolean","description":"Deploy to production if unlocked, create a draft otherwise","allowNo":false},"alias":{"name":"alias","type":"option","description":"Specifies the alias for deployment, the string at the beginning of the deploy subdomain. Useful for creating predictable deployment URLs. Avoid setting an alias string to the same value as a deployed branch. `alias` doesn’t create a branch deploy and can’t be used in conjunction with the branch subdomain feature. Maximum 37 characters."},"branch":{"name":"branch","type":"option","char":"b","description":"Serves the same functionality as --alias. Deprecated and will be removed in future versions"},"open":{"name":"open","type":"boolean","char":"o","description":"Open site after deploy","allowNo":false},"message":{"name":"message","type":"option","char":"m","description":"A short message to include in the deploy log"},"auth":{"name":"auth","type":"option","char":"a","description":"Netlify auth token to deploy with"},"site":{"name":"site","type":"option","char":"s","description":"A site ID to deploy to"},"json":{"name":"json","type":"boolean","description":"Output deployment data as JSON","allowNo":false},"timeout":{"name":"timeout","type":"option","description":"Timeout to wait for deployment to finish"},"trigger":{"name":"trigger","type":"boolean","description":"Trigger a new build of your site on Netlify without uploading local files","allowNo":false},"build":{"name":"build","type":"boolean","description":"Run build command before deploying","allowNo":false},"skip-functions-cache":{"name":"skip-functions-cache","type":"boolean","description":"Ignore any functions created as part of a previous `build` or `deploy` commands, forcing them to be bundled again as part of the deployment","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"init":{"id":"init","description":"Configure continuous deployment for a new or existing site. To create a new site without continuous deployment, use `netlify sites:create`","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"manual":{"name":"manual","type":"boolean","char":"m","description":"Manually configure a git remote for CI","allowNo":false},"force":{"name":"force","type":"boolean","description":"Reinitialize CI hooks if the linked site is already configured to use CI","allowNo":false},"gitRemoteName":{"name":"gitRemoteName","type":"option","description":"Name of Git remote to use. e.g. \"origin\""},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"link":{"id":"link","description":"Link a local repo or project folder to an existing site on Netlify","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify link","netlify link --id 123-123-123-123","netlify link --name my-site-name"],"flags":{"id":{"name":"id","type":"option","description":"ID of site to link to"},"name":{"name":"name","type":"option","description":"Name of site to link to"},"gitRemoteName":{"name":"gitRemoteName","type":"option","description":"Name of Git remote to use. e.g. \"origin\""},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"login":{"id":"login","description":"Login to your Netlify account\n\nOpens a web browser to acquire an OAuth token.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"new":{"name":"new","type":"boolean","description":"Login to new Netlify account","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"logout":{"id":"logout","description":"Logout of your Netlify account","pluginName":"netlify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"switch":{"id":"switch","description":"Switch your active Netlify account","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"unlink":{"id":"unlink","description":"Unlink a local folder from a Netlify site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"watch":{"id":"watch","description":"Watch for site deploy to finish","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify watch","git push && netlify watch"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"addons:auth":{"id":"addons:auth","description":"Login to add-on provider","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:auth"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on slug","required":true}]},"addons:config":{"id":"addons:config","description":"Configure add-on settings","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:config"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons:create":{"id":"addons:create","description":"Add an add-on extension to your site\n...\nAdd-ons are a way to extend the functionality of your Netlify site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:create"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons:delete":{"id":"addons:delete","description":"Remove an add-on extension to your site\n...\nAdd-ons are a way to extend the functionality of your Netlify site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:delete"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete without prompting (useful for CI)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Add-on namespace","required":true}]},"addons":{"id":"addons","description":"(Beta) Manage Netlify Add-ons","pluginName":"netlify-cli","pluginType":"core","aliases":["addon"],"examples":["netlify addons:create addon-xyz","netlify addons:list","netlify addons:config addon-xyz","netlify addons:delete addon-xyz","netlify addons:auth addon-xyz"],"flags":{},"args":[]},"addons:list":{"id":"addons:list","description":"List currently installed add-ons for site","pluginName":"netlify-cli","pluginType":"core","aliases":["addon:list"],"flags":{"json":{"name":"json","type":"boolean","description":"Output add-on data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"build":{"id":"build","description":"(Beta) Build on your local machine","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify build"],"flags":{"dry":{"name":"dry","type":"boolean","description":"Dry run: show instructions without running them","allowNo":false},"context":{"name":"context","type":"option","description":"Build context"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev:exec":{"id":"dev:exec","description":"Exec command\nRuns a command within the netlify dev environment, e.g. with env variables from any installed addons\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev:exec npm run bootstrap"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev":{"id":"dev","description":"Local dev server\nThe dev command will run a local dev server with Netlify's proxy and redirect rules\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev","$ netlify dev -d public","$ netlify dev -c \"hugo server -w\" --targetPort 1313"],"flags":{"command":{"name":"command","type":"option","char":"c","description":"command to run"},"port":{"name":"port","type":"option","char":"p","description":"port of netlify dev"},"targetPort":{"name":"targetPort","type":"option","description":"port of target app server"},"framework":{"name":"framework","type":"option","description":"framework to use. Defaults to #auto which automatically detects a framework"},"staticServerPort":{"name":"staticServerPort","type":"option","description":"port of the static app server used when no framework is detected","hidden":true},"dir":{"name":"dir","type":"option","char":"d","description":"dir with static files"},"functions":{"name":"functions","type":"option","char":"f","description":"specify a functions folder to serve"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"live":{"name":"live","type":"boolean","char":"l","description":"start a public live session","allowNo":false},"edgeHandlers":{"name":"edgeHandlers","type":"boolean","char":"e","description":"activates the Edge Handlers runtime","hidden":true,"allowNo":false},"trafficMesh":{"name":"trafficMesh","type":"boolean","char":"t","description":"(DEPRECATED: use --edgeHandlers or -e instead) uses Traffic Mesh for proxying requests","hidden":true,"allowNo":false},"locationDb":{"name":"locationDb","type":"option","char":"g","description":"specify the path to a local GeoIP location database in MMDB format","hidden":true},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"dev:trace":{"id":"dev:trace","description":"Trace command\nSimulates Netlify's Edge routing logic to match specific requests.\nThis command is designed to mimic cURL's command line, so the flags are more familiar.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["$ netlify dev:trace http://localhost/routing-path","$ netlify dev:trace -w dist-directory http://localhost/routing-path","$ netlify dev:trace -X POST http://localhost/routing-path","$ netlify dev:trace -H \"Accept-Language es\" http://localhost/routing-path","$ netlify dev:trace --cookie nf_jwt=token http://localhost/routing-path"],"flags":{"request":{"name":"request","type":"option","char":"X","description":"Specifies a custom request method [default: GET]"},"cookie":{"name":"cookie","type":"option","char":"b","description":"Request cookie, this flag can be used multiple times. Example: \"nf_jwt=token\""},"header":{"name":"header","type":"option","char":"H","description":"Request header, this flag can be used multiple times. Example: \"Host: netlify.test\""},"watch":{"name":"watch","type":"option","char":"w","description":"Path to the publish directory"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false}},"args":[{"name":"url","description":"Sets the request URL","required":true}]},"env:get":{"id":"env:get","description":"Get resolved value of specified environment variable (includes netlify.toml)","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true}]},"env:import":{"id":"env:import","description":"Import and set environment variables from .env file","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"replaceExisting":{"name":"replaceExisting","type":"boolean","char":"r","description":"Replace all existing variables instead of merging them with the current ones","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"fileName","description":".env file to import","required":true}]},"env":{"id":"env","description":"(Beta) Control environment variables for the current site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify env:list","netlify env:get VAR_NAME","netlify env:set VAR_NAME value","netlify env:unset VAR_NAME","netlify env:import fileName"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"env:list":{"id":"env:list","description":"Lists resolved environment variables for site (includes netlify.toml)","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"env:set":{"id":"env:set","description":"Set value of environment variable","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true},{"name":"value","description":"Value to set to","required":false,"default":""}]},"env:unset":{"id":"env:unset","description":"Unset an environment variable which removes it from the UI","pluginName":"netlify-cli","pluginType":"core","aliases":["env:delete","env:remove"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"Environment variable name","required":true}]},"functions:build":{"id":"functions:build","description":"Build functions locally\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:build"],"flags":{"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to build to"},"src":{"name":"src","type":"option","char":"s","description":"Specify the source directory for the functions"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"functions:create":{"id":"functions:create","description":"Create a new function locally","pluginName":"netlify-cli","pluginType":"core","aliases":["function:create"],"examples":["netlify functions:create","netlify functions:create hello-world","netlify functions:create --name hello-world"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"function name"},"url":{"name":"url","type":"option","char":"u","description":"pull template from URL"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"name of your new function file inside your functions directory"}]},"functions":{"id":"functions","description":"Manage netlify functions\nThe `functions` command will help you manage the functions in this site\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function"],"examples":["netlify functions:create --name function-xyz","netlify functions:build --name function-abc --timeout 30s"],"flags":{},"args":[]},"functions:invoke":{"id":"functions:invoke","description":"Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions","pluginName":"netlify-cli","pluginType":"core","aliases":["function:trigger"],"examples":["$ netlify functions:invoke","$ netlify functions:invoke myfunction","$ netlify functions:invoke --name myfunction","$ netlify functions:invoke --name myfunction --identity","$ netlify functions:invoke --name myfunction --no-identity","$ netlify functions:invoke myfunction --payload '{\"foo\": 1}'","$ netlify functions:invoke myfunction --querystring \"foo=1","$ netlify functions:invoke myfunction --payload \"./pathTo.json\""],"flags":{"name":{"name":"name","type":"option","char":"n","description":"function name to invoke"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions folder to parse, overriding netlify.toml"},"querystring":{"name":"querystring","type":"option","char":"q","description":"Querystring to add to your function invocation"},"payload":{"name":"payload","type":"option","char":"p","description":"Supply POST payload in stringified json, or a path to a json file"},"identity":{"name":"identity","type":"boolean","description":"simulate Netlify Identity authentication JWT. pass --no-identity to affirm unauthenticated request","allowNo":true},"port":{"name":"port","type":"option","description":"Port where netlify dev is accessible. e.g. 8888"},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"name","description":"function name to invoke"}]},"functions:list":{"id":"functions:list","description":"List functions that exist locally\n\nHelpful for making sure that you have formatted your functions correctly\n\nNOT the same as listing the functions that have been deployed. For that info you need to go to your Netlify deploy log.\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:list"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name to print"},"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to list"},"json":{"name":"json","type":"boolean","description":"Output function data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"functions:serve":{"id":"functions:serve","description":"(Beta) Serve functions locally\n\nHelpful for debugging functions.\n","pluginName":"netlify-cli","pluginType":"core","aliases":["function:serve"],"flags":{"functions":{"name":"functions","type":"option","char":"f","description":"Specify a functions directory to serve"},"port":{"name":"port","type":"option","char":"p","description":"Specify a port for the functions server"},"offline":{"name":"offline","type":"boolean","char":"o","description":"disables any features that require network access","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm":{"id":"lm","description":"Handle Netlify Large Media operations\nThe lm command will help you manage large media for a site\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify lm:info","netlify lm:install","netlify lm:setup"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:info":{"id":"lm:info","description":"Show large media requirements information.","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:install":{"id":"lm:install","description":"Configures your computer to use Netlify Large Media.\nIt installs the required credentials helper for Git,\nand configures your Git environment with the right credentials.","pluginName":"netlify-cli","pluginType":"core","aliases":["lm:init"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Force the credentials helper installation","allowNo":false}},"args":[]},"lm:setup":{"id":"lm:setup","description":"Configures your site to use Netlify Large Media.\nIt runs the install command if you have not installed the dependencies yet.","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"skip-install":{"name":"skip-install","type":"boolean","char":"s","description":"Skip the credentials helper installation check","allowNo":false},"force-install":{"name":"force-install","type":"boolean","char":"f","description":"Force the credentials helper installation","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"lm:uninstall":{"id":"lm:uninstall","description":"Uninstalls Netlify git credentials helper and cleans up any related configuration changes made by the install command.","pluginName":"netlify-cli","pluginType":"core","hidden":true,"aliases":["lm:remove"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"open:admin":{"id":"open:admin","description":"Opens current site admin UI in Netlify","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open:admin"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"open":{"id":"open","description":"Open settings for the site linked to the current folder","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open --site","netlify open --admin","netlify open:admin","netlify open:site"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"},"site":{"name":"site","type":"boolean","description":"Open site","allowNo":false},"admin":{"name":"admin","type":"boolean","description":"Open Netlify site","allowNo":false}},"args":[]},"open:site":{"id":"open:site","description":"Opens current site url in browser","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify open:site"],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"sites:create":{"id":"sites:create","description":"Create an empty site (advanced)\n\nCreate a blank site that isn't associated with any git remote. Does not link to the current working directory.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name of site"},"account-slug":{"name":"account-slug","type":"option","char":"a","description":"account slug to create the site under"},"with-ci":{"name":"with-ci","type":"boolean","char":"c","description":"initialize CI hooks during site creation","allowNo":false},"manual":{"name":"manual","type":"boolean","char":"m","description":"Force manual CI setup. Used --with-ci flag","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"sites:delete":{"id":"sites:delete","description":"Delete a site\n\nThis command will permanently delete the site on Netlify. Use with caution.\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify sites:delete 1234-3262-1211"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete without prompting (useful for CI)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[{"name":"siteId","description":"Site ID to delete.","required":true}]},"sites":{"id":"sites","description":"Handle various site operations\nThe sites command will help you manage all your sites\n","pluginName":"netlify-cli","pluginType":"core","aliases":[],"examples":["netlify sites:create --name my-new-site","netlify sites:list"],"flags":{},"args":[]},"sites:list":{"id":"sites:list","description":"List all sites you have access to","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"Output site data as JSON","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"status:hooks":{"id":"status:hooks","description":"Print hook information of the linked site","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]},"status":{"id":"status","description":"Print status information","pluginName":"netlify-cli","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","description":"Output system info","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Print debugging information","allowNo":false},"httpProxy":{"name":"httpProxy","type":"option","description":"Proxy server address to route requests through."},"httpProxyCertificateFilename":{"name":"httpProxyCertificateFilename","type":"option","description":"Certificate file to use when connecting using a proxy server"}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "6.9.13",
4
+ "version": "6.9.17",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
@@ -77,14 +77,14 @@
77
77
  "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,scripts,site,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\""
78
78
  },
79
79
  "dependencies": {
80
- "@netlify/build": "^18.13.0",
80
+ "@netlify/build": "^18.13.1",
81
81
  "@netlify/config": "^15.6.3",
82
82
  "@netlify/framework-info": "^5.9.2",
83
83
  "@netlify/local-functions-proxy": "^1.1.1",
84
84
  "@netlify/plugin-edge-handlers": "^1.11.22",
85
- "@netlify/plugins-list": "^3.6.0",
85
+ "@netlify/plugins-list": "^3.6.1",
86
86
  "@netlify/routing-local-proxy": "^0.33.2",
87
- "@netlify/zip-it-and-ship-it": "4.22.0",
87
+ "@netlify/zip-it-and-ship-it": "4.23.0",
88
88
  "@oclif/command": "^1.6.1",
89
89
  "@oclif/config": "^1.15.1",
90
90
  "@oclif/errors": "^1.3.4",
@@ -99,7 +99,6 @@
99
99
  "ascii-table": "0.0.9",
100
100
  "backoff": "^2.5.0",
101
101
  "better-opn": "^2.1.1",
102
- "body-parser": "^1.19.0",
103
102
  "boxen": "^5.0.0",
104
103
  "chalk": "^4.0.0",
105
104
  "chokidar": "^3.0.2",
@@ -14,7 +14,6 @@
14
14
  "author": "Netlify",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "body-parser": "^1.19.0",
18
17
  "cookie-parser": "^1.4.5",
19
18
  "express": "^4.17.1",
20
19
  "jsonwebtoken": "^8.5.1",
@@ -1,6 +1,5 @@
1
1
  // details: https://markus.oberlehner.net/blog/implementing-an-authentication-flow-with-passport-and-netlify-functions/
2
2
 
3
- const bodyParser = require('body-parser')
4
3
  const cookieParser = require('cookie-parser')
5
4
  const express = require('express')
6
5
  const passport = require('passport')
@@ -13,8 +12,8 @@ applyPassportStrategies()
13
12
 
14
13
  const app = express()
15
14
 
16
- app.use(bodyParser.urlencoded({ extended: true }))
17
- app.use(bodyParser.json())
15
+ app.use(express.urlencoded({ extended: true }))
16
+ app.use(express.json())
18
17
  app.use(cookieParser())
19
18
  app.use(passport.initialize())
20
19
 
@@ -1,7 +1,6 @@
1
1
  /* Express App */
2
2
  const process = require('process')
3
3
 
4
- const bodyParser = require('body-parser')
5
4
  const compression = require('compression')
6
5
  const cors = require('cors')
7
6
  const express = require('express')
@@ -92,8 +91,8 @@ module.exports = function expressApp(functionName) {
92
91
 
93
92
  // Apply express middlewares
94
93
  router.use(cors())
95
- router.use(bodyParser.json())
96
- router.use(bodyParser.urlencoded({ extended: true }))
94
+ router.use(express.json())
95
+ router.use(express.urlencoded({ extended: true }))
97
96
 
98
97
  return app
99
98
  }
@@ -14,7 +14,6 @@
14
14
  "author": "Netlify",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "body-parser": "^1.19.0",
18
17
  "compression": "^1.7.4",
19
18
  "cors": "^2.8.5",
20
19
  "express": "^4.17.1",
@@ -1,4 +1,3 @@
1
- const bodyParser = require('body-parser')
2
1
  const jwtDecode = require('jwt-decode')
3
2
 
4
3
  const { log, error: errorExit } = require('../../utils/command-helpers')
@@ -118,12 +117,12 @@ const getFunctionsServer = async function ({ functionsRegistry, siteUrl, prefix
118
117
  app.set('query parser', 'simple')
119
118
 
120
119
  app.use(
121
- bodyParser.text({
120
+ express.text({
122
121
  limit: '6mb',
123
122
  type: ['text/*', 'application/json'],
124
123
  }),
125
124
  )
126
- app.use(bodyParser.raw({ limit: '6mb', type: '*/*' }))
125
+ app.use(express.raw({ limit: '6mb', type: '*/*' }))
127
126
  app.use(createFormSubmissionHandler({ functionsRegistry, siteUrl }))
128
127
  app.use(
129
128
  expressLogging(console, {
@@ -2,6 +2,8 @@ const { Buffer } = require('buffer')
2
2
 
3
3
  const { NETLIFYDEVERR } = require('../../utils/logo')
4
4
 
5
+ const { detectAwsSdkError } = require('./utils')
6
+
5
7
  const addHeaders = (headers, response) => {
6
8
  if (!headers) {
7
9
  return
@@ -36,6 +38,8 @@ const handleSynchronousFunction = function (err, result, response) {
36
38
  const formatLambdaLocalError = (err) => `${err.errorType}: ${err.errorMessage}\n ${err.stackTrace.join('\n ')}`
37
39
 
38
40
  const handleErr = function (err, response) {
41
+ detectAwsSdkError({ err })
42
+
39
43
  response.statusCode = 500
40
44
  const errorString = typeof err === 'string' ? err : formatLambdaLocalError(err)
41
45
  response.end(errorString)
@@ -1,5 +1,6 @@
1
1
  const chalk = require('chalk')
2
2
 
3
+ const { warn } = require('../../utils/command-helpers')
3
4
  const { getLogMessage } = require('../log')
4
5
 
5
6
  const BASE_64_MIME_REGEXP = /image|audio|video|application\/pdf|application\/zip|applicaton\/octet-stream/i
@@ -10,8 +11,8 @@ const DEFAULT_LAMBDA_OPTIONS = {
10
11
 
11
12
  const SECONDS_TO_MILLISECONDS = 1000
12
13
 
13
- const detectAwsSdkError = ({ error, warn }) => {
14
- const isAwsSdkError = error.errorMessage && error.errorMessage.includes("Cannot find module 'aws-sdk'")
14
+ const detectAwsSdkError = ({ error }) => {
15
+ const isAwsSdkError = error && error.errorMessage && error.errorMessage.includes("Cannot find module 'aws-sdk'")
15
16
 
16
17
  if (isAwsSdkError) {
17
18
  warn(getLogMessage('functions.missingAwsSdk'))
@@ -3,7 +3,7 @@ const { URL } = require('url')
3
3
  const { HttpsProxyAgent } = require('https-proxy-agent')
4
4
  const waitPort = require('wait-port')
5
5
 
6
- const { log } = require('../utils/command-helpers')
6
+ const { log, exit } = require('../utils/command-helpers')
7
7
  const { NETLIFYDEVERR, NETLIFYDEVWARN } = require('../utils/logo')
8
8
 
9
9
  const fs = require('./fs')
@@ -28,23 +28,21 @@ const DEFAULT_HTTPS_PORT = 443
28
28
  // 50 seconds
29
29
  const AGENT_PORT_TIMEOUT = 50
30
30
 
31
- const getAgent = async ({ httpProxy, certificateFile, exit }) => {
31
+ const tryGetAgent = async ({ httpProxy, certificateFile }) => {
32
32
  if (!httpProxy) {
33
- return
33
+ return {}
34
34
  }
35
35
 
36
36
  let proxyUrl
37
37
  try {
38
38
  proxyUrl = new URL(httpProxy)
39
- } catch (error) {
40
- log(NETLIFYDEVERR, `${httpProxy} is not a valid URL`)
41
- exit(1)
39
+ } catch {
40
+ return { error: `${httpProxy} is not a valid URL` }
42
41
  }
43
42
 
44
43
  const scheme = proxyUrl.protocol.slice(0, -1)
45
44
  if (!['http', 'https'].includes(scheme)) {
46
- log(NETLIFYDEVERR, `${httpProxy} must have a scheme of http or https`)
47
- exit(1)
45
+ return { error: `${httpProxy} must have a scheme of http or https` }
48
46
  }
49
47
 
50
48
  let open
@@ -57,22 +55,22 @@ const getAgent = async ({ httpProxy, certificateFile, exit }) => {
57
55
  })
58
56
  } catch (error) {
59
57
  // unknown error
60
- log(NETLIFYDEVERR, `${httpProxy} is not available.`, error.message)
61
- exit(1)
58
+ return { error: `${httpProxy} is not available.`, message: error.message }
62
59
  }
63
60
 
64
61
  if (!open) {
65
62
  // timeout error
66
- log(NETLIFYDEVERR, `Could not connect to '${httpProxy}'`)
67
- exit(1)
63
+ return { error: `Could not connect to '${httpProxy}'` }
68
64
  }
69
65
 
66
+ let response = {}
67
+
70
68
  let certificate
71
69
  if (certificateFile) {
72
70
  try {
73
71
  certificate = await fs.readFileAsync(certificateFile)
74
72
  } catch (error) {
75
- log(NETLIFYDEVWARN, `Could not read certificate file '${certificateFile}'.`, error.message)
73
+ response = { warning: `Could not read certificate file '${certificateFile}'.`, message: error.message }
76
74
  }
77
75
  }
78
76
 
@@ -85,7 +83,20 @@ const getAgent = async ({ httpProxy, certificateFile, exit }) => {
85
83
  }
86
84
 
87
85
  const agent = new HttpsProxyAgentWithCA(opts)
86
+ response = { ...response, agent }
87
+ return response
88
+ }
89
+
90
+ const getAgent = async ({ httpProxy, certificateFile }) => {
91
+ const { error, warning, agent, message } = await tryGetAgent({ httpProxy, certificateFile })
92
+ if (error) {
93
+ log(NETLIFYDEVERR, error, message || '')
94
+ exit(1)
95
+ }
96
+ if (warning) {
97
+ log(NETLIFYDEVWARN, warning, message || '')
98
+ }
88
99
  return agent
89
100
  }
90
101
 
91
- module.exports = { getAgent }
102
+ module.exports = { getAgent, tryGetAgent }
@@ -1,13 +1,13 @@
1
1
  const chalk = require('chalk')
2
2
 
3
- const { log, error } = require('../command-helpers')
3
+ const { log, warn, error, exit } = require('../command-helpers')
4
4
 
5
5
  const ADDON_VALIDATION = {
6
6
  EXISTS: 'EXISTS',
7
7
  NOT_EXISTS: 'NOT_EXISTS',
8
8
  }
9
9
 
10
- const validateExists = ({ addon, addonName, siteData, exit }) => {
10
+ const validateExists = ({ addon, addonName, siteData }) => {
11
11
  if (!addon || !addon.id) {
12
12
  log(`Add-on ${addonName} doesn't exist for ${siteData.name}`)
13
13
  log(`> Run \`netlify addons:create ${addonName}\` to create an instance for this site`)
@@ -15,7 +15,7 @@ const validateExists = ({ addon, addonName, siteData, exit }) => {
15
15
  }
16
16
  }
17
17
 
18
- const validateNotExists = ({ addon, addonName, siteData, exit }) => {
18
+ const validateNotExists = ({ addon, addonName, siteData }) => {
19
19
  if (addon && addon.id) {
20
20
  log(`The "${addonName} add-on" already exists for ${siteData.name}`)
21
21
  log()
@@ -30,14 +30,14 @@ const validateNotExists = ({ addon, addonName, siteData, exit }) => {
30
30
 
31
31
  const getCurrentAddon = ({ addons, addonName }) => addons.find((addon) => addon.service_slug === addonName)
32
32
 
33
- const validateCurrentAddon = ({ addon, validation, addonName, siteData, warn, exit }) => {
33
+ const validateCurrentAddon = ({ addon, validation, addonName, siteData }) => {
34
34
  switch (validation) {
35
35
  case ADDON_VALIDATION.EXISTS: {
36
- validateExists({ addon, addonName, siteData, exit })
36
+ validateExists({ addon, addonName, siteData })
37
37
  break
38
38
  }
39
39
  case ADDON_VALIDATION.NOT_EXISTS: {
40
- validateNotExists({ addon, addonName, siteData, exit })
40
+ validateNotExists({ addon, addonName, siteData })
41
41
  break
42
42
  }
43
43
  default: {
@@ -82,7 +82,7 @@ const getAddons = async ({ api, siteId }) => {
82
82
  }
83
83
 
84
84
  const prepareAddonCommand = async ({ context, addonName, validation }) => {
85
- const { netlify, warn, exit } = context
85
+ const { netlify } = context
86
86
  const { api, site } = netlify
87
87
  const siteId = site.id
88
88
  if (!siteId) {
@@ -100,7 +100,7 @@ const prepareAddonCommand = async ({ context, addonName, validation }) => {
100
100
  let addon
101
101
  if (addonName) {
102
102
  addon = getCurrentAddon({ addons, addonName })
103
- validateCurrentAddon({ addon, validation, addonName, siteData, warn, exit })
103
+ validateCurrentAddon({ addon, validation, addonName, siteData })
104
104
  }
105
105
 
106
106
  return { manifest, addons, addon, siteData }
@@ -9,7 +9,7 @@ const API = require('netlify')
9
9
 
10
10
  const { getAgent } = require('../lib/http-agent')
11
11
 
12
- const { pollForToken, log, getToken, getCwd, argv, normalizeConfig, chalk } = require('./command-helpers')
12
+ const { pollForToken, log, exit, error, getToken, getCwd, argv, normalizeConfig, chalk } = require('./command-helpers')
13
13
  const getGlobalConfig = require('./get-global-config')
14
14
  const openBrowser = require('./open-browser')
15
15
  const StateConfig = require('./state-config')
@@ -49,7 +49,6 @@ class BaseCommand extends TrackedCommand {
49
49
 
50
50
  const { flags } = this.parse(BaseCommand)
51
51
  const agent = await getAgent({
52
- exit: this.exit,
53
52
  httpProxy: flags.httpProxy,
54
53
  certificateFile: flags.httpProxyCertificateFilename,
55
54
  })
@@ -100,8 +99,8 @@ class BaseCommand extends TrackedCommand {
100
99
  scheme,
101
100
  offline,
102
101
  })
103
- } catch (error) {
104
- const isUserError = error.type === 'userError'
102
+ } catch (error_) {
103
+ const isUserError = error_.type === 'userError'
105
104
 
106
105
  // If we're failing due to an error thrown by us, it might be because the token we're using is invalid.
107
106
  // To account for that, we try to retrieve the config again, this time without a token, to avoid making
@@ -113,9 +112,9 @@ class BaseCommand extends TrackedCommand {
113
112
  return this.getConfig({ cwd, offline: true, state, token })
114
113
  }
115
114
 
116
- const message = isUserError ? error.message : error.stack
115
+ const message = isUserError ? error_.message : error_.stack
117
116
  console.error(message)
118
- this.exit(1)
117
+ exit(1)
119
118
  }
120
119
  }
121
120
 
@@ -197,7 +196,7 @@ class BaseCommand extends TrackedCommand {
197
196
  const accessToken = await pollForToken({
198
197
  api: this.netlify.api,
199
198
  ticket,
200
- exitWithError: this.error,
199
+ exitWithError: error,
201
200
  })
202
201
 
203
202
  const { id: userId, full_name: name, email } = await this.netlify.api.getCurrentUser()
@@ -4,11 +4,20 @@ const dotenv = require('dotenv')
4
4
 
5
5
  const { isFileAsync, readFileAsync } = require('../lib/fs')
6
6
 
7
- const { warn: warn_ } = require('./command-helpers')
7
+ const { warn } = require('./command-helpers')
8
8
 
9
- const loadDotEnvFiles = async function ({ projectDir, warnLog }) {
10
- // a stub utility is used in tests
11
- const warn = warnLog || warn_
9
+ const loadDotEnvFiles = async function ({ projectDir }) {
10
+ const response = await tryLoadDotEnvFiles({ projectDir })
11
+
12
+ const filesWithWarning = response.filter((el) => el.warning)
13
+ filesWithWarning.forEach((el) => {
14
+ warn(el.warning)
15
+ })
16
+
17
+ return response.filter((el) => el.file && el.env)
18
+ }
19
+
20
+ const tryLoadDotEnvFiles = async ({ projectDir }) => {
12
21
  const dotenvFiles = ['.env', '.env.development']
13
22
  const results = await Promise.all(
14
23
  dotenvFiles.map(async (file) => {
@@ -19,8 +28,9 @@ const loadDotEnvFiles = async function ({ projectDir, warnLog }) {
19
28
  return
20
29
  }
21
30
  } catch (error) {
22
- warn(`Failed reading env variables from file: ${filepath}: ${error.message}`)
23
- return
31
+ return {
32
+ warning: `Failed reading env variables from file: ${filepath}: ${error.message}`,
33
+ }
24
34
  }
25
35
  const content = await readFileAsync(filepath)
26
36
  const env = dotenv.parse(content)
@@ -31,4 +41,4 @@ const loadDotEnvFiles = async function ({ projectDir, warnLog }) {
31
41
  return results.filter(Boolean)
32
42
  }
33
43
 
34
- module.exports = { loadDotEnvFiles }
44
+ module.exports = { loadDotEnvFiles, tryLoadDotEnvFiles }
@@ -1,7 +1,7 @@
1
1
  const { Octokit } = require('@octokit/rest')
2
2
  const chalk = require('chalk')
3
3
 
4
- const { log } = require('../command-helpers')
4
+ const { log, error: failAndExit } = require('../command-helpers')
5
5
  const ghauth = require('../gh-auth')
6
6
 
7
7
  const { getBuildSettings, saveNetlifyToml, formatErrorMessage, createDeployKey, setupSite } = require('./utils')
@@ -35,9 +35,9 @@ const getGitHubClient = ({ token }) => {
35
35
  return octokit
36
36
  }
37
37
 
38
- const addDeployKey = async ({ api, octokit, repoOwner, repoName, failAndExit }) => {
38
+ const addDeployKey = async ({ api, octokit, repoOwner, repoName }) => {
39
39
  log('Adding deploy key to repository...')
40
- const key = await createDeployKey({ api, failAndExit })
40
+ const key = await createDeployKey({ api })
41
41
  try {
42
42
  await octokit.repos.createDeployKey({
43
43
  title: 'Netlify Deploy Key',
@@ -58,7 +58,7 @@ const addDeployKey = async ({ api, octokit, repoOwner, repoName, failAndExit })
58
58
  }
59
59
  }
60
60
 
61
- const getGitHubRepo = async ({ octokit, repoOwner, repoName, failAndExit }) => {
61
+ const getGitHubRepo = async ({ octokit, repoOwner, repoName }) => {
62
62
  try {
63
63
  const { data } = await octokit.repos.get({
64
64
  owner: repoOwner,
@@ -90,7 +90,7 @@ const hookExists = async ({ deployHook, octokit, repoOwner, repoName }) => {
90
90
  }
91
91
  }
92
92
 
93
- const addDeployHook = async ({ deployHook, octokit, repoOwner, repoName, failAndExit }) => {
93
+ const addDeployHook = async ({ deployHook, octokit, repoOwner, repoName }) => {
94
94
  const exists = await hookExists({ deployHook, octokit, repoOwner, repoName })
95
95
  if (!exists) {
96
96
  try {
@@ -148,7 +148,7 @@ const upsertHook = async ({ ntlHooks, event, api, siteId, token }) => {
148
148
  })
149
149
  }
150
150
 
151
- const addNotificationHooks = async ({ failAndExit, siteId, api, token }) => {
151
+ const addNotificationHooks = async ({ siteId, api, token }) => {
152
152
  log(`Creating Netlify GitHub Notification Hooks...`)
153
153
 
154
154
  let ntlHooks
@@ -173,7 +173,7 @@ const addNotificationHooks = async ({ failAndExit, siteId, api, token }) => {
173
173
  }
174
174
 
175
175
  module.exports = async function configGithub({ context, siteId, repoOwner, repoName }) {
176
- const { warn, error: failAndExit, netlify } = context
176
+ const { netlify } = context
177
177
  const {
178
178
  api,
179
179
  globalConfig,
@@ -190,14 +190,13 @@ module.exports = async function configGithub({ context, siteId, repoOwner, repoN
190
190
  siteRoot,
191
191
  config,
192
192
  env,
193
- warn,
194
193
  })
195
- await saveNetlifyToml({ repositoryRoot, config, configPath, baseDir, buildCmd, buildDir, functionsDir, warn })
194
+ await saveNetlifyToml({ repositoryRoot, config, configPath, baseDir, buildCmd, buildDir, functionsDir })
196
195
 
197
196
  const octokit = getGitHubClient({ token })
198
197
  const [deployKey, githubRepo] = await Promise.all([
199
- addDeployKey({ api, octokit, repoOwner, repoName, failAndExit }),
200
- getGitHubRepo({ octokit, repoOwner, repoName, failAndExit }),
198
+ addDeployKey({ api, octokit, repoOwner, repoName }),
199
+ getGitHubRepo({ octokit, repoOwner, repoName }),
201
200
  ])
202
201
 
203
202
  const repo = {
@@ -215,13 +214,12 @@ module.exports = async function configGithub({ context, siteId, repoOwner, repoN
215
214
 
216
215
  const updatedSite = await setupSite({
217
216
  api,
218
- failAndExit,
219
217
  siteId,
220
218
  repo,
221
219
  configPlugins: config.plugins,
222
220
  pluginsToInstall,
223
221
  })
224
- await addDeployHook({ deployHook: updatedSite.deploy_hook, octokit, repoOwner, repoName, failAndExit })
222
+ await addDeployHook({ deployHook: updatedSite.deploy_hook, octokit, repoOwner, repoName })
225
223
  log()
226
- await addNotificationHooks({ failAndExit, siteId, api, token })
224
+ await addNotificationHooks({ siteId, api, token })
227
225
  }
@@ -1,10 +1,10 @@
1
1
  const inquirer = require('inquirer')
2
2
 
3
- const { log } = require('../command-helpers')
3
+ const { log, exit } = require('../command-helpers')
4
4
 
5
5
  const { getBuildSettings, saveNetlifyToml, createDeployKey, setupSite } = require('./utils')
6
6
 
7
- const addDeployKey = async ({ exit, deployKey }) => {
7
+ const addDeployKey = async ({ deployKey }) => {
8
8
  log('\nGive this Netlify SSH public key access to your repository:\n')
9
9
  log(`\n${deployKey.public_key}\n\n`)
10
10
 
@@ -52,7 +52,7 @@ const addDeployHook = async ({ deployHook }) => {
52
52
  }
53
53
 
54
54
  module.exports = async function configManual({ context, siteId, repoData }) {
55
- const { warn, error: failAndExit, exit, netlify } = context
55
+ const { netlify } = context
56
56
  const {
57
57
  api,
58
58
  config,
@@ -66,12 +66,11 @@ module.exports = async function configManual({ context, siteId, repoData }) {
66
66
  siteRoot,
67
67
  config,
68
68
  env,
69
- warn,
70
69
  })
71
- await saveNetlifyToml({ repositoryRoot, config, configPath, baseDir, buildCmd, buildDir, functionsDir, warn })
70
+ await saveNetlifyToml({ repositoryRoot, config, configPath, baseDir, buildCmd, buildDir, functionsDir })
72
71
 
73
- const deployKey = await createDeployKey({ api, failAndExit })
74
- await addDeployKey({ exit, deployKey })
72
+ const deployKey = await createDeployKey({ api })
73
+ await addDeployKey({ deployKey })
75
74
 
76
75
  const repoPath = await getRepoPath({ repoData })
77
76
  const repo = {
@@ -88,7 +87,6 @@ module.exports = async function configManual({ context, siteId, repoData }) {
88
87
 
89
88
  const updatedSite = await setupSite({
90
89
  api,
91
- failAndExit,
92
90
  siteId,
93
91
  repo,
94
92
  configPlugins: config.plugins,
@@ -3,6 +3,7 @@ const locatePath = require('locate-path')
3
3
  const nodeVersionAlias = require('node-version-alias')
4
4
 
5
5
  const { readFileAsync } = require('../../lib/fs')
6
+ const { warn } = require('../command-helpers')
6
7
 
7
8
  const DEFAULT_NODE_VERSION = '12.18.0'
8
9
  const NVM_FLAG_PREFIX = '--'
@@ -11,7 +12,7 @@ const NVM_FLAG_PREFIX = '--'
11
12
  const normalizeConfiguredVersion = (version) =>
12
13
  version.startsWith(NVM_FLAG_PREFIX) ? version.slice(NVM_FLAG_PREFIX.length) : version
13
14
 
14
- const detectNodeVersion = async ({ baseDirectory, env, warn }) => {
15
+ const detectNodeVersion = async ({ baseDirectory, env }) => {
15
16
  try {
16
17
  const nodeVersionFile = await locatePath(['.nvmrc', '.node-version'], { cwd: baseDirectory })
17
18
  const configuredVersion =
@@ -9,6 +9,7 @@ const isEmpty = require('lodash/isEmpty')
9
9
 
10
10
  const { fileExistsAsync, writeFileAsync } = require('../../lib/fs')
11
11
  const { normalizeBackslash } = require('../../lib/path')
12
+ const { error: failAndExit, warn } = require('../command-helpers')
12
13
 
13
14
  const { getFrameworkInfo } = require('./frameworks')
14
15
  const { detectNodeVersion } = require('./node-version')
@@ -131,9 +132,9 @@ const getPromptInputs = async ({
131
132
  const getBaseDirectory = ({ repositoryRoot, siteRoot }) =>
132
133
  path.normalize(repositoryRoot) === path.normalize(siteRoot) ? process.cwd() : siteRoot
133
134
 
134
- const getBuildSettings = async ({ repositoryRoot, siteRoot, config, env, warn }) => {
135
+ const getBuildSettings = async ({ repositoryRoot, siteRoot, config, env }) => {
135
136
  const baseDirectory = getBaseDirectory({ repositoryRoot, siteRoot })
136
- const nodeVersion = await detectNodeVersion({ baseDirectory, env, warn })
137
+ const nodeVersion = await detectNodeVersion({ baseDirectory, env })
137
138
  const {
138
139
  frameworkName,
139
140
  frameworkBuildCommand,
@@ -200,16 +201,7 @@ const getNetlifyToml = ({
200
201
  ## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/
201
202
  `
202
203
 
203
- const saveNetlifyToml = async ({
204
- repositoryRoot,
205
- config,
206
- configPath,
207
- baseDir,
208
- buildCmd,
209
- buildDir,
210
- functionsDir,
211
- warn,
212
- }) => {
204
+ const saveNetlifyToml = async ({ repositoryRoot, config, configPath, baseDir, buildCmd, buildDir, functionsDir }) => {
213
205
  const tomlPathParts = [repositoryRoot, baseDir, 'netlify.toml'].filter(Boolean)
214
206
  const tomlPath = path.join(...tomlPathParts)
215
207
  const exists = await fileExistsAsync(tomlPath)
@@ -248,7 +240,7 @@ const formatErrorMessage = ({ message, error }) => {
248
240
 
249
241
  const formatTitle = (title) => chalk.cyan(title)
250
242
 
251
- const createDeployKey = async ({ api, failAndExit }) => {
243
+ const createDeployKey = async ({ api }) => {
252
244
  try {
253
245
  const deployKey = await api.createDeployKey()
254
246
  return deployKey
@@ -258,7 +250,7 @@ const createDeployKey = async ({ api, failAndExit }) => {
258
250
  }
259
251
  }
260
252
 
261
- const updateSite = async ({ siteId, api, failAndExit, options }) => {
253
+ const updateSite = async ({ siteId, api, options }) => {
262
254
  try {
263
255
  const updatedSite = await api.updateSite({ siteId, body: options })
264
256
  return updatedSite
@@ -268,11 +260,10 @@ const updateSite = async ({ siteId, api, failAndExit, options }) => {
268
260
  }
269
261
  }
270
262
 
271
- const setupSite = async ({ api, failAndExit, siteId, repo, configPlugins, pluginsToInstall }) => {
263
+ const setupSite = async ({ api, siteId, repo, configPlugins, pluginsToInstall }) => {
272
264
  const updatedSite = await updateSite({
273
265
  siteId,
274
266
  api,
275
- failAndExit,
276
267
  // merge existing plugins with new ones
277
268
  options: { repo, plugins: [...getUIPlugins(configPlugins), ...pluginsToInstall] },
278
269
  })