netlify-cli 15.10.0 → 16.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/bin/run.mjs +6 -5
  2. package/npm-shrinkwrap.json +628 -42
  3. package/package.json +4 -5
  4. package/src/commands/base-command.mjs +295 -118
  5. package/src/commands/build/build.mjs +9 -1
  6. package/src/commands/deploy/deploy.mjs +42 -18
  7. package/src/commands/dev/dev.mjs +22 -17
  8. package/src/commands/functions/functions-create.mjs +118 -89
  9. package/src/commands/functions/functions-invoke.mjs +10 -7
  10. package/src/commands/functions/functions-list.mjs +3 -3
  11. package/src/commands/functions/functions-serve.mjs +1 -0
  12. package/src/commands/init/init.mjs +1 -1
  13. package/src/commands/link/link.mjs +5 -5
  14. package/src/commands/serve/serve.mjs +10 -6
  15. package/src/commands/sites/sites-create-template.mjs +1 -1
  16. package/src/commands/sites/sites-create.mjs +1 -1
  17. package/src/functions-templates/javascript/google-analytics/package.json +1 -1
  18. package/src/functions-templates/typescript/scheduled-function/package.json +1 -1
  19. package/src/lib/edge-functions/deploy.mjs +11 -4
  20. package/src/lib/edge-functions/internal.mjs +5 -3
  21. package/src/lib/edge-functions/proxy.mjs +29 -5
  22. package/src/lib/functions/netlify-function.mjs +26 -1
  23. package/src/lib/functions/registry.mjs +14 -26
  24. package/src/lib/functions/runtimes/js/builders/zisi.mjs +20 -3
  25. package/src/lib/functions/runtimes/js/worker.mjs +1 -1
  26. package/src/lib/functions/server.mjs +3 -2
  27. package/src/lib/spinner.mjs +1 -1
  28. package/src/recipes/vscode/index.mjs +24 -6
  29. package/src/utils/build-info.mjs +100 -0
  30. package/src/utils/command-helpers.mjs +16 -7
  31. package/src/utils/deploy/deploy-site.mjs +4 -4
  32. package/src/utils/deploy/hash-fns.mjs +2 -2
  33. package/src/utils/detect-server-settings.mjs +133 -245
  34. package/src/utils/framework-server.mjs +6 -5
  35. package/src/utils/functions/functions.mjs +8 -5
  36. package/src/utils/get-repo-data.mjs +5 -6
  37. package/src/utils/init/config-github.mjs +2 -2
  38. package/src/utils/init/config-manual.mjs +24 -7
  39. package/src/utils/init/utils.mjs +68 -68
  40. package/src/utils/proxy-server.mjs +7 -4
  41. package/src/utils/proxy.mjs +4 -3
  42. package/src/utils/read-repo-url.mjs +4 -0
  43. package/src/utils/run-build.mjs +58 -32
  44. package/src/utils/shell.mjs +24 -7
  45. package/src/utils/state-config.mjs +5 -1
  46. package/src/utils/static-server.mjs +4 -0
  47. package/src/utils/init/frameworks.mjs +0 -23
package/bin/run.mjs CHANGED
@@ -4,6 +4,7 @@ import { argv } from 'process'
4
4
  import updateNotifier from 'update-notifier'
5
5
 
6
6
  import { createMainCommand } from '../src/commands/index.mjs'
7
+ import { error } from '../src/utils/command-helpers.mjs'
7
8
  import getPackageJson from '../src/utils/get-package-json.mjs'
8
9
 
9
10
  // 12 hours
@@ -15,9 +16,9 @@ try {
15
16
  pkg,
16
17
  updateCheckInterval: UPDATE_CHECK_INTERVAL,
17
18
  }).notify()
18
- } catch (error) {
19
- console.log('Error checking for updates:')
20
- console.log(error)
19
+ } catch (error_) {
20
+ error('Error checking for updates:')
21
+ error(error_)
21
22
  }
22
23
 
23
24
  const program = createMainCommand()
@@ -25,6 +26,6 @@ const program = createMainCommand()
25
26
  try {
26
27
  await program.parseAsync(argv)
27
28
  program.onEnd()
28
- } catch (error) {
29
- program.onEnd(error)
29
+ } catch (error_) {
30
+ program.onEnd(error_)
30
31
  }