netlify-cli 12.2.7 → 12.2.8

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.
Files changed (112) hide show
  1. package/bin/run.mjs +2 -3
  2. package/npm-shrinkwrap.json +93 -90
  3. package/package.json +4 -4
  4. package/scripts/postinstall.mjs +2 -2
  5. package/src/commands/base-command.mjs +8 -12
  6. package/src/commands/build/build.mjs +2 -2
  7. package/src/commands/completion/completion.mjs +3 -3
  8. package/src/commands/deploy/deploy.mjs +4 -5
  9. package/src/commands/dev/{dev-exec.cjs → dev-exec.mjs} +5 -5
  10. package/src/commands/dev/{dev.cjs → dev.mjs} +32 -32
  11. package/src/commands/dev/index.mjs +1 -0
  12. package/src/commands/env/{env-clone.cjs → env-clone.mjs} +7 -16
  13. package/src/commands/env/{env-get.cjs → env-get.mjs} +5 -13
  14. package/src/commands/env/{env-import.cjs → env-import.mjs} +8 -15
  15. package/src/commands/env/{env-list.cjs → env-list.mjs} +13 -25
  16. package/src/commands/env/{env-set.cjs → env-set.mjs} +5 -5
  17. package/src/commands/env/{env-unset.cjs → env-unset.mjs} +4 -12
  18. package/src/commands/env/{env.cjs → env.mjs} +7 -9
  19. package/src/commands/env/index.mjs +1 -0
  20. package/src/commands/functions/functions-build.mjs +2 -1
  21. package/src/commands/functions/functions-create.mjs +2 -12
  22. package/src/commands/functions/functions-invoke.mjs +2 -1
  23. package/src/commands/functions/functions-list.mjs +2 -1
  24. package/src/commands/functions/functions-serve.mjs +3 -2
  25. package/src/commands/graph/{graph-config-write.cjs → graph-config-write.mjs} +8 -8
  26. package/src/commands/graph/{graph-edit.cjs → graph-edit.mjs} +9 -14
  27. package/src/commands/graph/{graph-handler.cjs → graph-handler.mjs} +6 -6
  28. package/src/commands/graph/{graph-init.cjs → graph-init.mjs} +12 -20
  29. package/src/commands/graph/{graph-library.cjs → graph-library.mjs} +8 -8
  30. package/src/commands/graph/{graph-operations.cjs → graph-operations.mjs} +7 -7
  31. package/src/commands/graph/{graph-pull.cjs → graph-pull.mjs} +8 -12
  32. package/src/commands/graph/{graph.cjs → graph.mjs} +8 -10
  33. package/src/commands/graph/index.mjs +1 -0
  34. package/src/commands/init/init.mjs +5 -2
  35. package/src/commands/link/index.mjs +1 -0
  36. package/src/commands/link/{link.cjs → link.mjs} +15 -13
  37. package/src/commands/lm/index.mjs +1 -0
  38. package/src/commands/lm/{lm-info.cjs → lm-info.mjs} +4 -6
  39. package/src/commands/lm/{lm-install.cjs → lm-install.mjs} +3 -5
  40. package/src/commands/lm/{lm-setup.cjs → lm-setup.mjs} +8 -8
  41. package/src/commands/lm/{lm-uninstall.cjs → lm-uninstall.mjs} +2 -4
  42. package/src/commands/lm/{lm.cjs → lm.mjs} +5 -7
  43. package/src/commands/logout/logout.mjs +2 -1
  44. package/src/commands/main.mjs +10 -12
  45. package/src/commands/recipes/common.mjs +36 -0
  46. package/src/commands/recipes/index.mjs +1 -0
  47. package/src/commands/recipes/{recipes-list.cjs → recipes-list.mjs} +3 -5
  48. package/src/commands/recipes/{recipes.cjs → recipes.mjs} +12 -10
  49. package/src/commands/sites/sites-create-template.mjs +3 -1
  50. package/src/commands/sites/sites-create.mjs +4 -2
  51. package/src/commands/sites/sites-list.mjs +1 -1
  52. package/src/commands/unlink/unlink.mjs +2 -1
  53. package/src/functions-templates/go/hello-world/go.mod +1 -1
  54. package/src/functions-templates/javascript/stripe-charge/package-lock.json +6 -6
  55. package/src/functions-templates/javascript/stripe-subscription/package-lock.json +6 -6
  56. package/src/functions-templates/javascript/token-hider/package-lock.json +6 -6
  57. package/src/functions-templates/rust/hello-world/Cargo.toml +1 -1
  58. package/src/functions-templates/typescript/hello-world/package-lock.json +6 -6
  59. package/src/lib/account.cjs +0 -3
  60. package/src/lib/{api.cjs → api.mjs} +3 -5
  61. package/src/lib/{build.cjs → build.mjs} +9 -9
  62. package/src/lib/completion/constants.mjs +4 -0
  63. package/src/lib/completion/{generate-autocompletion.cjs → generate-autocompletion.mjs} +6 -6
  64. package/src/lib/completion/{script.cjs → get-autocompletion.mjs} +1 -25
  65. package/src/lib/completion/index.mjs +1 -0
  66. package/src/lib/completion/script.mjs +35 -0
  67. package/src/lib/edge-functions/{editor-helper.cjs → editor-helper.mjs} +4 -6
  68. package/src/lib/edge-functions/index.cjs +1 -2
  69. package/src/lib/exec-fetcher.cjs +0 -2
  70. package/src/lib/functions/{form-submissions-handler.cjs → form-submissions-handler.mjs} +26 -28
  71. package/src/lib/functions/{scheduled.cjs → scheduled.mjs} +6 -8
  72. package/src/lib/functions/{server.cjs → server.mjs} +20 -29
  73. package/src/lib/geo-location.cjs +1 -1
  74. package/src/lib/{http-agent.cjs → http-agent.mjs} +7 -8
  75. package/src/lib/one-graph/{cli-client.cjs → cli-client.mjs} +46 -74
  76. package/src/lib/one-graph/{cli-netlify-graph.cjs → cli-netlify-graph.mjs} +35 -43
  77. package/src/recipes/vscode/{index.cjs → index.mjs} +7 -9
  78. package/src/recipes/vscode/{settings.cjs → settings.mjs} +10 -12
  79. package/src/utils/{create-stream-promise.cjs → create-stream-promise.mjs} +2 -2
  80. package/src/utils/{detect-server-settings.cjs → detect-server-settings.mjs} +14 -20
  81. package/src/utils/functions/constants.mjs +1 -0
  82. package/src/utils/functions/{functions.cjs → functions.mjs} +6 -8
  83. package/src/utils/functions/{get-functions.cjs → get-functions.mjs} +4 -25
  84. package/src/utils/functions/index.mjs +3 -0
  85. package/src/utils/get-package-json.mjs +16 -0
  86. package/src/utils/{get-repo-data.cjs → get-repo-data.mjs} +15 -12
  87. package/src/utils/{gitignore.cjs → gitignore.mjs} +6 -8
  88. package/src/utils/index.cjs +0 -20
  89. package/src/utils/{live-tunnel.cjs → live-tunnel.mjs} +8 -10
  90. package/src/utils/lm/{install.cjs → install.mjs} +26 -25
  91. package/src/utils/lm/{requirements.cjs → requirements.mjs} +6 -13
  92. package/src/utils/lm/{steps.cjs → steps.mjs} +6 -8
  93. package/src/utils/lm/{ui.cjs → ui.mjs} +5 -7
  94. package/src/utils/{proxy.cjs → proxy.mjs} +31 -34
  95. package/src/utils/{read-repo-url.cjs → read-repo-url.mjs} +6 -11
  96. package/src/utils/{state-config.cjs → state-config.mjs} +8 -10
  97. package/src/utils/telemetry/index.mjs +1 -0
  98. package/src/utils/telemetry/{request.cjs → request.mjs} +5 -3
  99. package/src/utils/telemetry/{telemetry.cjs → telemetry.mjs} +12 -14
  100. package/src/utils/telemetry/{validation.cjs → validation.mjs} +2 -2
  101. package/src/commands/dev/index.cjs +0 -5
  102. package/src/commands/env/index.cjs +0 -5
  103. package/src/commands/graph/index.cjs +0 -5
  104. package/src/commands/link/index.cjs +0 -6
  105. package/src/commands/lm/index.cjs +0 -5
  106. package/src/commands/recipes/common.cjs +0 -33
  107. package/src/commands/recipes/index.cjs +0 -8
  108. package/src/lib/completion/constants.cjs +0 -6
  109. package/src/lib/completion/index.cjs +0 -5
  110. package/src/utils/functions/constants.cjs +0 -5
  111. package/src/utils/functions/index.cjs +0 -12
  112. package/src/utils/telemetry/index.cjs +0 -5
package/bin/run.mjs CHANGED
@@ -1,15 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync } from 'fs'
3
2
  import { argv } from 'process'
4
- import { fileURLToPath } from 'url'
5
3
 
6
4
  import updateNotifier from 'update-notifier'
7
5
 
8
6
  import { createMainCommand } from '../src/commands/index.mjs'
7
+ import getPackageJson from '../src/utils/get-package-json.mjs'
9
8
 
10
9
  // 12 hours
11
10
  const UPDATE_CHECK_INTERVAL = 432e5
12
- const pkg = JSON.parse(readFileSync(fileURLToPath(new URL('../package.json', import.meta.url))), 'utf-8')
11
+ const pkg = await getPackageJson()
13
12
 
14
13
  try {
15
14
  updateNotifier({
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "12.2.7",
3
+ "version": "12.2.8",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "12.2.7",
9
+ "version": "12.2.8",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^28.4.2",
13
+ "@netlify/build": "^28.4.5",
14
14
  "@netlify/config": "^20.0.2",
15
- "@netlify/edge-bundler": "^4.4.2",
15
+ "@netlify/edge-bundler": "^5.0.0",
16
16
  "@netlify/framework-info": "^9.5.2",
17
17
  "@netlify/local-functions-proxy": "^1.1.1",
18
18
  "@netlify/zip-it-and-ship-it": "^8.1.0",
@@ -1214,19 +1214,19 @@
1214
1214
  "integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
1215
1215
  },
1216
1216
  "node_modules/@netlify/build": {
1217
- "version": "28.4.2",
1218
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-28.4.2.tgz",
1219
- "integrity": "sha512-dGR1yxuo1UmxMKgBPQUW7xGwCRa884LKnVnwLVp7WhTxQwb8uhu+stKQ7+15Su/Pw+Eqgt9b6lSTID6w0KRAcw==",
1217
+ "version": "28.4.5",
1218
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-28.4.5.tgz",
1219
+ "integrity": "sha512-5ciyNoF0SH+1DlDLUzgtLqPJJXh6QW1bDkq8H0S44uOy1VxJpbvFat3asa0BspoB61CYpqzyzmpfIQKw+voySA==",
1220
1220
  "dependencies": {
1221
1221
  "@bugsnag/js": "^7.0.0",
1222
1222
  "@netlify/cache-utils": "^5.0.2",
1223
1223
  "@netlify/config": "^20.0.2",
1224
- "@netlify/edge-bundler": "4.4.2",
1225
- "@netlify/functions-utils": "^5.0.4",
1224
+ "@netlify/edge-bundler": "5.0.0",
1225
+ "@netlify/functions-utils": "^5.0.5",
1226
1226
  "@netlify/git-utils": "^5.0.2",
1227
1227
  "@netlify/plugins-list": "^6.54.0",
1228
1228
  "@netlify/run-utils": "^5.0.2",
1229
- "@netlify/zip-it-and-ship-it": "^7.1.2",
1229
+ "@netlify/zip-it-and-ship-it": "^7.1.3",
1230
1230
  "@sindresorhus/slugify": "^2.0.0",
1231
1231
  "ansi-escapes": "^5.0.0",
1232
1232
  "chalk": "^5.0.0",
@@ -1291,9 +1291,9 @@
1291
1291
  }
1292
1292
  },
1293
1293
  "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it": {
1294
- "version": "7.1.2",
1295
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.2.tgz",
1296
- "integrity": "sha512-WGCt5KDk5Zr+A0fhPGEgAAW2aNiGyLcZohBq4nu/4BoFtHkk+8vCZOH1lMytZiIFu0eAq00j2q4kdzyLFV0Wuw==",
1294
+ "version": "7.1.3",
1295
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.3.tgz",
1296
+ "integrity": "sha512-7ToznythQL7b99ZxAiGyjagULNcZsSg2fByuUp3L35WrBASMmSrdq03zpYhRk3EIsuM65DjJayJ/amYu7Mjn3w==",
1297
1297
  "dependencies": {
1298
1298
  "@babel/parser": "7.16.8",
1299
1299
  "@netlify/binary-info": "^1.0.0",
@@ -1870,9 +1870,9 @@
1870
1870
  }
1871
1871
  },
1872
1872
  "node_modules/@netlify/build/node_modules/minimatch": {
1873
- "version": "5.1.0",
1874
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
1875
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
1873
+ "version": "5.1.1",
1874
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
1875
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
1876
1876
  "dependencies": {
1877
1877
  "brace-expansion": "^2.0.1"
1878
1878
  },
@@ -2671,9 +2671,9 @@
2671
2671
  }
2672
2672
  },
2673
2673
  "node_modules/@netlify/edge-bundler": {
2674
- "version": "4.4.2",
2675
- "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-4.4.2.tgz",
2676
- "integrity": "sha512-ixoK6wlfyjQKEZReSMWxEwAuZsIqmssHCSUqboZ0XQtWJCnXW/dFBOhbSBKM0dMMuUdx4EDOpDER12tKOv0Ujw==",
2674
+ "version": "5.0.0",
2675
+ "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-5.0.0.tgz",
2676
+ "integrity": "sha512-6kTOzuBhdYO5/puBU87hbl5b15DMCUHynVbJMRb2AAnxB0/ggWbQpOVogQSeLF7pOO+4r5TmRGS/U30xC2CA2A==",
2677
2677
  "dependencies": {
2678
2678
  "@import-maps/resolve": "^1.0.1",
2679
2679
  "ajv": "^8.11.2",
@@ -3793,11 +3793,11 @@
3793
3793
  }
3794
3794
  },
3795
3795
  "node_modules/@netlify/functions-utils": {
3796
- "version": "5.0.4",
3797
- "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.0.4.tgz",
3798
- "integrity": "sha512-FCxQIWGvB/PBLYfWDPUUoHEwbYpXcR7oBY0y7uXkbwCkMeb0iFq0ADFA140NwYLsFAZSa7PRL2U7HA6GPHsOGw==",
3796
+ "version": "5.0.5",
3797
+ "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.0.5.tgz",
3798
+ "integrity": "sha512-C9do87XSqBE3wP463o4617hBoZqj+T48aND8gUpgrMLIZRI0Ip7lKSKO8Qyx15Lqhg2a3istkeL4ux14LX/6lg==",
3799
3799
  "dependencies": {
3800
- "@netlify/zip-it-and-ship-it": "^7.1.2",
3800
+ "@netlify/zip-it-and-ship-it": "^7.1.3",
3801
3801
  "cpy": "^8.1.0",
3802
3802
  "path-exists": "^5.0.0"
3803
3803
  },
@@ -3817,9 +3817,9 @@
3817
3817
  }
3818
3818
  },
3819
3819
  "node_modules/@netlify/functions-utils/node_modules/@netlify/zip-it-and-ship-it": {
3820
- "version": "7.1.2",
3821
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.2.tgz",
3822
- "integrity": "sha512-WGCt5KDk5Zr+A0fhPGEgAAW2aNiGyLcZohBq4nu/4BoFtHkk+8vCZOH1lMytZiIFu0eAq00j2q4kdzyLFV0Wuw==",
3820
+ "version": "7.1.3",
3821
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.3.tgz",
3822
+ "integrity": "sha512-7ToznythQL7b99ZxAiGyjagULNcZsSg2fByuUp3L35WrBASMmSrdq03zpYhRk3EIsuM65DjJayJ/amYu7Mjn3w==",
3823
3823
  "dependencies": {
3824
3824
  "@babel/parser": "7.16.8",
3825
3825
  "@netlify/binary-info": "^1.0.0",
@@ -3913,9 +3913,9 @@
3913
3913
  }
3914
3914
  },
3915
3915
  "node_modules/@netlify/functions-utils/node_modules/minimatch": {
3916
- "version": "5.1.0",
3917
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
3918
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
3916
+ "version": "5.1.1",
3917
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
3918
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
3919
3919
  "dependencies": {
3920
3920
  "brace-expansion": "^2.0.1"
3921
3921
  },
@@ -7530,9 +7530,12 @@
7530
7530
  "dev": true
7531
7531
  },
7532
7532
  "node_modules/ci-info": {
7533
- "version": "3.5.0",
7534
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz",
7535
- "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw=="
7533
+ "version": "3.7.0",
7534
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz",
7535
+ "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==",
7536
+ "engines": {
7537
+ "node": ">=8"
7538
+ }
7536
7539
  },
7537
7540
  "node_modules/ci-parallel-vars": {
7538
7541
  "version": "1.0.1",
@@ -15892,6 +15895,18 @@
15892
15895
  "node": ">=0.10.0"
15893
15896
  }
15894
15897
  },
15898
+ "node_modules/marked": {
15899
+ "version": "4.2.2",
15900
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
15901
+ "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
15902
+ "dev": true,
15903
+ "bin": {
15904
+ "marked": "bin/marked.js"
15905
+ },
15906
+ "engines": {
15907
+ "node": ">= 12"
15908
+ }
15909
+ },
15895
15910
  "node_modules/matcher": {
15896
15911
  "version": "5.0.0",
15897
15912
  "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
@@ -22221,9 +22236,9 @@
22221
22236
  }
22222
22237
  },
22223
22238
  "node_modules/typescript": {
22224
- "version": "4.8.4",
22225
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
22226
- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
22239
+ "version": "4.9.3",
22240
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
22241
+ "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
22227
22242
  "bin": {
22228
22243
  "tsc": "bin/tsc",
22229
22244
  "tsserver": "bin/tsserver"
@@ -23120,9 +23135,9 @@
23120
23135
  }
23121
23136
  },
23122
23137
  "node_modules/verdaccio": {
23123
- "version": "5.17.0",
23124
- "resolved": "https://registry.npmjs.org/verdaccio/-/verdaccio-5.17.0.tgz",
23125
- "integrity": "sha512-is5ivFhZ8RUmafkIXWvOh/lDzu9Ooa9njP/sgfOVBKDgajOYEzn58YO6aOgmhw6WrYhGsBs8ocaEht48yjcTwA==",
23138
+ "version": "5.18.0",
23139
+ "resolved": "https://registry.npmjs.org/verdaccio/-/verdaccio-5.18.0.tgz",
23140
+ "integrity": "sha512-z6akeVQS08iXXz0yqi6gMMOoSI2SHocQI+NMMtaVo2MFJaYvhoPSLf66MyXIS3vyCIOu108R6Ncknt0oTIUk1A==",
23126
23141
  "dev": true,
23127
23142
  "dependencies": {
23128
23143
  "@verdaccio/commons-api": "10.2.0",
@@ -23286,18 +23301,6 @@
23286
23301
  "node": ">=12"
23287
23302
  }
23288
23303
  },
23289
- "node_modules/verdaccio/node_modules/marked": {
23290
- "version": "4.2.2",
23291
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
23292
- "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
23293
- "dev": true,
23294
- "bin": {
23295
- "marked": "bin/marked.js"
23296
- },
23297
- "engines": {
23298
- "node": ">= 12"
23299
- }
23300
- },
23301
23304
  "node_modules/verdaccio/node_modules/mime": {
23302
23305
  "version": "3.0.0",
23303
23306
  "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
@@ -24578,19 +24581,19 @@
24578
24581
  "integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
24579
24582
  },
24580
24583
  "@netlify/build": {
24581
- "version": "28.4.2",
24582
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-28.4.2.tgz",
24583
- "integrity": "sha512-dGR1yxuo1UmxMKgBPQUW7xGwCRa884LKnVnwLVp7WhTxQwb8uhu+stKQ7+15Su/Pw+Eqgt9b6lSTID6w0KRAcw==",
24584
+ "version": "28.4.5",
24585
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-28.4.5.tgz",
24586
+ "integrity": "sha512-5ciyNoF0SH+1DlDLUzgtLqPJJXh6QW1bDkq8H0S44uOy1VxJpbvFat3asa0BspoB61CYpqzyzmpfIQKw+voySA==",
24584
24587
  "requires": {
24585
24588
  "@bugsnag/js": "^7.0.0",
24586
24589
  "@netlify/cache-utils": "^5.0.2",
24587
24590
  "@netlify/config": "^20.0.2",
24588
- "@netlify/edge-bundler": "4.4.2",
24589
- "@netlify/functions-utils": "^5.0.4",
24591
+ "@netlify/edge-bundler": "5.0.0",
24592
+ "@netlify/functions-utils": "^5.0.5",
24590
24593
  "@netlify/git-utils": "^5.0.2",
24591
24594
  "@netlify/plugins-list": "^6.54.0",
24592
24595
  "@netlify/run-utils": "^5.0.2",
24593
- "@netlify/zip-it-and-ship-it": "^7.1.2",
24596
+ "@netlify/zip-it-and-ship-it": "^7.1.3",
24594
24597
  "@sindresorhus/slugify": "^2.0.0",
24595
24598
  "ansi-escapes": "^5.0.0",
24596
24599
  "chalk": "^5.0.0",
@@ -24643,9 +24646,9 @@
24643
24646
  "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw=="
24644
24647
  },
24645
24648
  "@netlify/zip-it-and-ship-it": {
24646
- "version": "7.1.2",
24647
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.2.tgz",
24648
- "integrity": "sha512-WGCt5KDk5Zr+A0fhPGEgAAW2aNiGyLcZohBq4nu/4BoFtHkk+8vCZOH1lMytZiIFu0eAq00j2q4kdzyLFV0Wuw==",
24649
+ "version": "7.1.3",
24650
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.3.tgz",
24651
+ "integrity": "sha512-7ToznythQL7b99ZxAiGyjagULNcZsSg2fByuUp3L35WrBASMmSrdq03zpYhRk3EIsuM65DjJayJ/amYu7Mjn3w==",
24649
24652
  "requires": {
24650
24653
  "@babel/parser": "7.16.8",
24651
24654
  "@netlify/binary-info": "^1.0.0",
@@ -25017,9 +25020,9 @@
25017
25020
  "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
25018
25021
  },
25019
25022
  "minimatch": {
25020
- "version": "5.1.0",
25021
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
25022
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
25023
+ "version": "5.1.1",
25024
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
25025
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
25023
25026
  "requires": {
25024
25027
  "brace-expansion": "^2.0.1"
25025
25028
  }
@@ -25498,9 +25501,9 @@
25498
25501
  }
25499
25502
  },
25500
25503
  "@netlify/edge-bundler": {
25501
- "version": "4.4.2",
25502
- "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-4.4.2.tgz",
25503
- "integrity": "sha512-ixoK6wlfyjQKEZReSMWxEwAuZsIqmssHCSUqboZ0XQtWJCnXW/dFBOhbSBKM0dMMuUdx4EDOpDER12tKOv0Ujw==",
25504
+ "version": "5.0.0",
25505
+ "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-5.0.0.tgz",
25506
+ "integrity": "sha512-6kTOzuBhdYO5/puBU87hbl5b15DMCUHynVbJMRb2AAnxB0/ggWbQpOVogQSeLF7pOO+4r5TmRGS/U30xC2CA2A==",
25504
25507
  "requires": {
25505
25508
  "@import-maps/resolve": "^1.0.1",
25506
25509
  "ajv": "^8.11.2",
@@ -26138,11 +26141,11 @@
26138
26141
  }
26139
26142
  },
26140
26143
  "@netlify/functions-utils": {
26141
- "version": "5.0.4",
26142
- "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.0.4.tgz",
26143
- "integrity": "sha512-FCxQIWGvB/PBLYfWDPUUoHEwbYpXcR7oBY0y7uXkbwCkMeb0iFq0ADFA140NwYLsFAZSa7PRL2U7HA6GPHsOGw==",
26144
+ "version": "5.0.5",
26145
+ "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.0.5.tgz",
26146
+ "integrity": "sha512-C9do87XSqBE3wP463o4617hBoZqj+T48aND8gUpgrMLIZRI0Ip7lKSKO8Qyx15Lqhg2a3istkeL4ux14LX/6lg==",
26144
26147
  "requires": {
26145
- "@netlify/zip-it-and-ship-it": "^7.1.2",
26148
+ "@netlify/zip-it-and-ship-it": "^7.1.3",
26146
26149
  "cpy": "^8.1.0",
26147
26150
  "path-exists": "^5.0.0"
26148
26151
  },
@@ -26153,9 +26156,9 @@
26153
26156
  "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw=="
26154
26157
  },
26155
26158
  "@netlify/zip-it-and-ship-it": {
26156
- "version": "7.1.2",
26157
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.2.tgz",
26158
- "integrity": "sha512-WGCt5KDk5Zr+A0fhPGEgAAW2aNiGyLcZohBq4nu/4BoFtHkk+8vCZOH1lMytZiIFu0eAq00j2q4kdzyLFV0Wuw==",
26159
+ "version": "7.1.3",
26160
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-7.1.3.tgz",
26161
+ "integrity": "sha512-7ToznythQL7b99ZxAiGyjagULNcZsSg2fByuUp3L35WrBASMmSrdq03zpYhRk3EIsuM65DjJayJ/amYu7Mjn3w==",
26159
26162
  "requires": {
26160
26163
  "@babel/parser": "7.16.8",
26161
26164
  "@netlify/binary-info": "^1.0.0",
@@ -26230,9 +26233,9 @@
26230
26233
  }
26231
26234
  },
26232
26235
  "minimatch": {
26233
- "version": "5.1.0",
26234
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
26235
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
26236
+ "version": "5.1.1",
26237
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
26238
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
26236
26239
  "requires": {
26237
26240
  "brace-expansion": "^2.0.1"
26238
26241
  }
@@ -28856,9 +28859,9 @@
28856
28859
  "dev": true
28857
28860
  },
28858
28861
  "ci-info": {
28859
- "version": "3.5.0",
28860
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz",
28861
- "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw=="
28862
+ "version": "3.7.0",
28863
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz",
28864
+ "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog=="
28862
28865
  },
28863
28866
  "ci-parallel-vars": {
28864
28867
  "version": "1.0.1",
@@ -35193,6 +35196,12 @@
35193
35196
  "object-visit": "^1.0.0"
35194
35197
  }
35195
35198
  },
35199
+ "marked": {
35200
+ "version": "4.2.2",
35201
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
35202
+ "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
35203
+ "dev": true
35204
+ },
35196
35205
  "matcher": {
35197
35206
  "version": "5.0.0",
35198
35207
  "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
@@ -40043,9 +40052,9 @@
40043
40052
  }
40044
40053
  },
40045
40054
  "typescript": {
40046
- "version": "4.8.4",
40047
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
40048
- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ=="
40055
+ "version": "4.9.3",
40056
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
40057
+ "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA=="
40049
40058
  },
40050
40059
  "uglify-js": {
40051
40060
  "version": "3.15.0",
@@ -40663,9 +40672,9 @@
40663
40672
  "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
40664
40673
  },
40665
40674
  "verdaccio": {
40666
- "version": "5.17.0",
40667
- "resolved": "https://registry.npmjs.org/verdaccio/-/verdaccio-5.17.0.tgz",
40668
- "integrity": "sha512-is5ivFhZ8RUmafkIXWvOh/lDzu9Ooa9njP/sgfOVBKDgajOYEzn58YO6aOgmhw6WrYhGsBs8ocaEht48yjcTwA==",
40675
+ "version": "5.18.0",
40676
+ "resolved": "https://registry.npmjs.org/verdaccio/-/verdaccio-5.18.0.tgz",
40677
+ "integrity": "sha512-z6akeVQS08iXXz0yqi6gMMOoSI2SHocQI+NMMtaVo2MFJaYvhoPSLf66MyXIS3vyCIOu108R6Ncknt0oTIUk1A==",
40669
40678
  "dev": true,
40670
40679
  "requires": {
40671
40680
  "@verdaccio/commons-api": "10.2.0",
@@ -40745,12 +40754,6 @@
40745
40754
  "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==",
40746
40755
  "dev": true
40747
40756
  },
40748
- "marked": {
40749
- "version": "4.2.2",
40750
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
40751
- "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
40752
- "dev": true
40753
- },
40754
40757
  "mime": {
40755
40758
  "version": "3.0.0",
40756
40759
  "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "12.2.7",
4
+ "version": "12.2.8",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "contributors": [
@@ -228,9 +228,9 @@
228
228
  "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!**/*/package-lock.json\" \"!.github/**/*.md\""
229
229
  },
230
230
  "dependencies": {
231
- "@netlify/build": "^28.4.2",
231
+ "@netlify/build": "^28.4.5",
232
232
  "@netlify/config": "^20.0.2",
233
- "@netlify/edge-bundler": "^4.4.2",
233
+ "@netlify/edge-bundler": "^5.0.0",
234
234
  "@netlify/framework-info": "^9.5.2",
235
235
  "@netlify/local-functions-proxy": "^1.1.1",
236
236
  "@netlify/zip-it-and-ship-it": "^8.1.0",
@@ -364,7 +364,7 @@
364
364
  "ava": {
365
365
  "files": [
366
366
  "tools/**/*.test.mjs",
367
- "tests/**/*.test.cjs"
367
+ "tests/**/*.test.+(c|m)js"
368
368
  ],
369
369
  "cache": true,
370
370
  "concurrency": 5,
@@ -28,11 +28,11 @@ const postInstall = async () => {
28
28
  if (!process.argv[1].includes('.yarn')) {
29
29
  const { createMainCommand } = await import('../src/commands/index.mjs')
30
30
  // TODO: use destructuring again once the imported file is esm
31
- const completion = await import('../src/lib/completion/index.cjs')
31
+ const { generateAutocompletion } = await import('../src/lib/completion/index.mjs')
32
32
 
33
33
  // create or update the autocompletion definition
34
34
  const program = createMainCommand()
35
- completion.createAutocompletion(program)
35
+ generateAutocompletion(program)
36
36
  }
37
37
 
38
38
  console.log('')
@@ -8,29 +8,25 @@ import debug from 'debug'
8
8
  import merge from 'lodash/merge.js'
9
9
  import { NetlifyAPI } from 'netlify'
10
10
 
11
- import { getAgent } from '../lib/http-agent.cjs'
12
- // TODO: use named imports again once the imported file is esm
13
- import utils from '../utils/index.cjs'
14
-
15
- const {
11
+ import { getAgent } from '../lib/http-agent.mjs'
12
+ import {
16
13
  NETLIFY_CYAN,
17
- StateConfig,
18
14
  USER_AGENT,
19
15
  chalk,
20
16
  error,
21
17
  exit,
22
- getGlobalConfig,
23
18
  getToken,
24
- identify,
25
19
  log,
26
20
  normalizeConfig,
27
- openBrowser,
28
21
  padLeft,
29
22
  pollForToken,
30
23
  sortOptions,
31
- track,
32
24
  warn,
33
- } = utils
25
+ } from '../utils/command-helpers.cjs'
26
+ import getGlobalConfig from '../utils/get-global-config.cjs'
27
+ import { openBrowser } from '../utils/open-browser.cjs'
28
+ import StateConfig from '../utils/state-config.mjs'
29
+ import { identify, track } from '../utils/telemetry/index.mjs'
34
30
 
35
31
  // Netlify CLI client id. Lives in bot@netlify.com
36
32
  // TODO: setup client for multiple environments
@@ -77,7 +73,7 @@ const getDuration = function (startTime) {
77
73
  * @property {*} config
78
74
  * @property {*} cachedConfig
79
75
  * @property {*} globalConfig
80
- * @property {StateConfig} state,
76
+ * @property {import('../../utils/state-config.mjs').default} state,
81
77
  */
82
78
 
83
79
  /** Base command class that provides tracking and config initialization */
@@ -1,13 +1,13 @@
1
1
  // @ts-check
2
2
  import process from 'process'
3
3
 
4
- import { getBuildOptions, runBuild } from '../../lib/build.cjs'
4
+ import { getBuildOptions, runBuild } from '../../lib/build.mjs'
5
5
  import utils from '../../utils/index.cjs'
6
6
 
7
7
  const { error, exit, generateNetlifyGraphJWT, getEnvelopeEnv, getToken, normalizeContext } = utils
8
8
 
9
9
  /**
10
- * @param {import('../../lib/build.cjs').BuildConfig} options
10
+ * @param {import('../../lib/build.mjs').BuildConfig} options
11
11
  */
12
12
  const checkOptions = ({ cachedConfig: { siteInfo = {} }, token }) => {
13
13
  if (!siteInfo.id) {
@@ -3,9 +3,9 @@ import { fileURLToPath } from 'url'
3
3
 
4
4
  import { install, uninstall } from 'tabtab'
5
5
 
6
- import { createAutocompletion } from '../../lib/completion/index.cjs'
6
+ import { generateAutocompletion } from '../../lib/completion/index.mjs'
7
7
 
8
- const completer = join(dirname(fileURLToPath(import.meta.url)), '../../lib/completion/script.cjs')
8
+ const completer = join(dirname(fileURLToPath(import.meta.url)), '../../lib/completion/script.mjs')
9
9
 
10
10
  /**
11
11
  * The completion:generate command
@@ -15,7 +15,7 @@ const completer = join(dirname(fileURLToPath(import.meta.url)), '../../lib/compl
15
15
  const completionGenerate = async (options, command) => {
16
16
  const { parent } = command
17
17
 
18
- createAutocompletion(parent)
18
+ generateAutocompletion(parent)
19
19
 
20
20
  await install({
21
21
  name: parent.name(),
@@ -10,13 +10,14 @@ import inquirer from 'inquirer'
10
10
  import isObject from 'lodash/isObject.js'
11
11
  import prettyjson from 'prettyjson'
12
12
 
13
- import { cancelDeploy } from '../../lib/api.cjs'
14
- import { getBuildOptions, runBuild } from '../../lib/build.cjs'
13
+ import { cancelDeploy } from '../../lib/api.mjs'
14
+ import { getBuildOptions, runBuild } from '../../lib/build.mjs'
15
15
  import { normalizeFunctionsConfig } from '../../lib/functions/config.cjs'
16
16
  import { getLogMessage } from '../../lib/log.cjs'
17
17
  import { startSpinner, stopSpinner } from '../../lib/spinner.cjs'
18
+ import { getFunctionsManifestPath, getInternalFunctionsDir } from '../../utils/functions/index.mjs'
18
19
  import utils from '../../utils/index.cjs'
19
- import { link } from '../link/index.cjs'
20
+ import { link } from '../link/index.mjs'
20
21
  import { sitesCreate } from '../sites/index.mjs'
21
22
 
22
23
  const {
@@ -27,8 +28,6 @@ const {
27
28
  deploySite,
28
29
  error,
29
30
  exit,
30
- getFunctionsManifestPath,
31
- getInternalFunctionsDir,
32
31
  getToken,
33
32
  log,
34
33
  logJson,
@@ -1,6 +1,8 @@
1
- const execa = require('execa')
1
+ import execa from 'execa'
2
2
 
3
- const { getEnvelopeEnv, injectEnvVariables, normalizeContext } = require('../../utils/index.cjs')
3
+ import utils from '../../utils/index.cjs'
4
+
5
+ const { getEnvelopeEnv, injectEnvVariables, normalizeContext } = utils
4
6
 
5
7
  /**
6
8
  * The dev:exec command
@@ -27,7 +29,7 @@ const devExec = async (cmd, options, command) => {
27
29
  * @param {import('../base-command.mjs').default} program
28
30
  * @returns
29
31
  */
30
- const createDevExecCommand = (program) =>
32
+ export const createDevExecCommand = (program) =>
31
33
  program
32
34
  .command('dev:exec')
33
35
  .argument('<...cmd>', `the command that should be executed`)
@@ -43,5 +45,3 @@ const createDevExecCommand = (program) =>
43
45
  .allowExcessArguments(true)
44
46
  .addExamples(['netlify dev:exec npm run bootstrap'])
45
47
  .action(devExec)
46
-
47
- module.exports = { createDevExecCommand }