netlify-cli 12.0.7 → 12.0.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.
- package/bin/run.mjs +31 -0
- package/npm-shrinkwrap.json +598 -227
- package/package.json +15 -16
- package/scripts/{postinstall.js → postinstall.cjs} +3 -3
- package/src/commands/addons/{addons-auth.js → addons-auth.cjs} +2 -2
- package/src/commands/addons/{addons-config.js → addons-config.cjs} +7 -7
- package/src/commands/addons/{addons-create.js → addons-create.cjs} +5 -5
- package/src/commands/addons/{addons-delete.js → addons-delete.cjs} +2 -2
- package/src/commands/addons/{addons-list.js → addons-list.cjs} +2 -2
- package/src/commands/addons/{addons.js → addons.cjs} +5 -5
- package/src/commands/addons/index.cjs +5 -0
- package/src/commands/api/{api.js → api.cjs} +1 -1
- package/src/commands/api/index.cjs +5 -0
- package/src/commands/{base-command.js → base-command.cjs} +7 -2
- package/src/commands/build/{build.js → build.cjs} +9 -2
- package/src/commands/build/index.cjs +5 -0
- package/src/commands/completion/{completion.js → completion.cjs} +2 -2
- package/src/commands/completion/index.cjs +5 -0
- package/src/commands/deploy/{deploy.js → deploy.cjs} +8 -8
- package/src/commands/deploy/index.cjs +5 -0
- package/src/commands/dev/{dev-exec.js → dev-exec.cjs} +1 -1
- package/src/commands/dev/{dev.js → dev.cjs} +7 -7
- package/src/commands/dev/index.cjs +5 -0
- package/src/commands/env/{env-clone.js → env-clone.cjs} +1 -1
- package/src/commands/env/{env-get.js → env-get.cjs} +9 -1
- package/src/commands/env/{env-import.js → env-import.cjs} +7 -1
- package/src/commands/env/{env-list.js → env-list.cjs} +1 -1
- package/src/commands/env/{env-set.js → env-set.cjs} +1 -1
- package/src/commands/env/{env-unset.js → env-unset.cjs} +1 -1
- package/src/commands/env/{env.js → env.cjs} +6 -6
- package/src/commands/env/index.cjs +5 -0
- package/src/commands/functions/{functions-build.js → functions-build.cjs} +1 -1
- package/src/commands/functions/{functions-create.js → functions-create.cjs} +6 -7
- package/src/commands/functions/{functions-invoke.js → functions-invoke.cjs} +9 -1
- package/src/commands/functions/{functions-list.js → functions-list.cjs} +1 -1
- package/src/commands/functions/{functions-serve.js → functions-serve.cjs} +2 -2
- package/src/commands/functions/{functions.js → functions.cjs} +6 -6
- package/src/commands/functions/index.cjs +5 -0
- package/src/commands/graph/{graph-config-write.js → graph-config-write.cjs} +2 -2
- package/src/commands/graph/{graph-edit.js → graph-edit.cjs} +8 -4
- package/src/commands/graph/{graph-handler.js → graph-handler.cjs} +2 -2
- package/src/commands/graph/{graph-init.js → graph-init.cjs} +11 -3
- package/src/commands/graph/{graph-library.js → graph-library.cjs} +3 -3
- package/src/commands/graph/{graph-operations.js → graph-operations.cjs} +2 -2
- package/src/commands/graph/{graph-pull.js → graph-pull.cjs} +7 -3
- package/src/commands/graph/{graph.js → graph.cjs} +7 -7
- package/src/commands/graph/index.cjs +5 -0
- package/src/commands/index.cjs +7 -0
- package/src/commands/init/index.cjs +6 -0
- package/src/commands/init/{init.js → init.cjs} +4 -4
- package/src/commands/link/index.cjs +6 -0
- package/src/commands/link/{link.js → link.cjs} +2 -2
- package/src/commands/lm/index.cjs +5 -0
- package/src/commands/lm/{lm-info.js → lm-info.cjs} +1 -1
- package/src/commands/lm/{lm-install.js → lm-install.cjs} +2 -2
- package/src/commands/lm/{lm-setup.js → lm-setup.cjs} +4 -4
- package/src/commands/lm/{lm-uninstall.js → lm-uninstall.cjs} +1 -1
- package/src/commands/lm/{lm.js → lm.cjs} +4 -4
- package/src/commands/login/index.cjs +6 -0
- package/src/commands/login/{login.js → login.cjs} +1 -1
- package/src/commands/logout/index.cjs +5 -0
- package/src/commands/logout/{logout.js → logout.cjs} +1 -1
- package/src/commands/{main.js → main.cjs} +24 -24
- package/src/commands/open/index.cjs +5 -0
- package/src/commands/open/{open-admin.js → open-admin.cjs} +1 -1
- package/src/commands/open/{open-site.js → open-site.cjs} +1 -1
- package/src/commands/open/{open.js → open.cjs} +3 -3
- package/src/commands/recipes/{common.js → common.cjs} +2 -2
- package/src/commands/recipes/index.cjs +8 -0
- package/src/commands/recipes/{recipes-list.js → recipes-list.cjs} +1 -1
- package/src/commands/recipes/{recipes.js → recipes.cjs} +2 -2
- package/src/commands/sites/index.cjs +7 -0
- package/src/commands/sites/{sites-create-template.js → sites-create-template.cjs} +19 -10
- package/src/commands/sites/{sites-create.js → sites-create.cjs} +8 -39
- package/src/commands/sites/{sites-delete.js → sites-delete.cjs} +1 -1
- package/src/commands/sites/{sites-list.js → sites-list.cjs} +3 -3
- package/src/commands/sites/{sites.js → sites.cjs} +4 -4
- package/src/commands/status/index.cjs +5 -0
- package/src/commands/status/{status-hooks.js → status-hooks.cjs} +1 -1
- package/src/commands/status/{status.js → status.cjs} +2 -2
- package/src/commands/switch/index.cjs +5 -0
- package/src/commands/switch/{switch.js → switch.cjs} +2 -2
- package/src/commands/unlink/index.cjs +5 -0
- package/src/commands/unlink/{unlink.js → unlink.cjs} +1 -1
- package/src/commands/watch/index.cjs +5 -0
- package/src/commands/watch/{watch.js → watch.cjs} +3 -3
- package/src/functions-templates/go/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/apollo-graphql/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/apollo-graphql-rest/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/apollo-graphql-rest/{{name}}.js +1 -1
- package/src/functions-templates/javascript/auth-fetch/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/create-user/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/fauna-crud/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/fauna-crud/{{name}}.js +5 -5
- package/src/functions-templates/javascript/fauna-graphql/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/google-analytics/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/graphql-gateway/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/hasura-event-triggered/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/hasura-event-triggered/package.json +1 -1
- package/src/functions-templates/javascript/hello/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/identity-signup/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/image-external/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/localized-content/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/node-fetch/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/oauth-passport/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/oauth-passport/utils/auth.js +1 -1
- package/src/functions-templates/javascript/oauth-passport/{{name}}.js +2 -2
- package/src/functions-templates/javascript/protected-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/sanity-create/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/sanity-groq/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/send-email/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/send-email/{{name}}.js +1 -1
- package/src/functions-templates/javascript/serverless-ssr/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/serverless-ssr/serverless-http.js +1 -1
- package/src/functions-templates/javascript/serverless-ssr/{{name}}.js +1 -1
- package/src/functions-templates/javascript/set-cookie/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/set-cookies/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/set-req-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/set-res-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/slack-rate-limit/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/stripe-charge/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/stripe-charge/package-lock.json +14 -14
- package/src/functions-templates/javascript/stripe-subscription/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/stripe-subscription/package-lock.json +14 -14
- package/src/functions-templates/javascript/submission-created/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/token-hider/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/token-hider/package-lock.json +23 -11
- package/src/functions-templates/javascript/token-hider/package.json +1 -1
- package/src/functions-templates/javascript/transform-response/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/url-shortener/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/javascript/url-shortener/{{name}}.js +2 -2
- package/src/functions-templates/javascript/using-middleware/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/rust/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/rust/hello-world/Cargo.toml +1 -1
- package/src/functions-templates/typescript/abtest/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/geolocation/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/json/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/log/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/set-cookies/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/set-req-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/set-res-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/functions-templates/typescript/transform-response/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
- package/src/lib/{account.js → account.cjs} +0 -0
- package/src/lib/{api.js → api.cjs} +1 -1
- package/src/lib/{build.js → build.cjs} +0 -0
- package/src/lib/completion/{constants.js → constants.cjs} +1 -1
- package/src/lib/completion/{generate-autocompletion.js → generate-autocompletion.cjs} +2 -2
- package/src/lib/completion/{index.js → index.cjs} +1 -1
- package/src/lib/completion/{script.js → script.cjs} +1 -1
- package/src/lib/edge-functions/{consts.js → consts.cjs} +0 -0
- package/src/lib/edge-functions/{deploy.js → deploy.cjs} +2 -2
- package/src/lib/edge-functions/{editor-helper.js → editor-helper.cjs} +1 -1
- package/src/lib/edge-functions/{headers.js → headers.cjs} +0 -0
- package/src/lib/edge-functions/index.cjs +7 -0
- package/src/lib/edge-functions/{internal.js → internal.cjs} +3 -3
- package/src/lib/edge-functions/{proxy.js → proxy.cjs} +9 -9
- package/src/lib/edge-functions/{registry.js → registry.cjs} +1 -1
- package/src/lib/{exec-fetcher.js → exec-fetcher.cjs} +2 -2
- package/src/lib/{fs.js → fs.cjs} +0 -0
- package/src/lib/functions/{background.js → background.cjs} +2 -2
- package/src/lib/functions/{config.js → config.cjs} +0 -0
- package/src/lib/functions/{form-submissions-handler.js → form-submissions-handler.cjs} +3 -3
- package/src/lib/functions/{local-proxy.js → local-proxy.cjs} +1 -1
- package/src/lib/functions/{memoized-build.js → memoized-build.cjs} +0 -0
- package/src/lib/functions/{netlify-function.js → netlify-function.cjs} +1 -1
- package/src/lib/functions/{registry.js → registry.cjs} +4 -4
- package/src/lib/functions/runtimes/go/{index.js → index.cjs} +2 -2
- package/src/lib/functions/runtimes/{index.js → index.cjs} +3 -3
- package/src/lib/functions/runtimes/js/builders/{netlify-lambda.js → netlify-lambda.cjs} +3 -3
- package/src/lib/functions/runtimes/js/builders/{zisi.js → zisi.cjs} +4 -4
- package/src/lib/functions/runtimes/js/{index.js → index.cjs} +2 -2
- package/src/lib/functions/runtimes/rust/{index.js → index.cjs} +3 -3
- package/src/lib/functions/{scheduled.js → scheduled.cjs} +2 -2
- package/src/lib/functions/{server.js → server.cjs} +8 -8
- package/src/lib/functions/{synchronous.js → synchronous.cjs} +3 -3
- package/src/lib/functions/{utils.js → utils.cjs} +2 -2
- package/src/lib/{geo-location.js → geo-location.cjs} +0 -0
- package/src/lib/{http-agent.js → http-agent.cjs} +1 -1
- package/src/lib/{log.js → log.cjs} +1 -1
- package/src/lib/one-graph/{cli-client.js → cli-client.cjs} +2 -2
- package/src/lib/one-graph/{cli-netlify-graph.js → cli-netlify-graph.cjs} +1 -1
- package/src/lib/{path.js → path.cjs} +0 -0
- package/src/lib/{render-error-remplate.js → render-error-remplate.cjs} +0 -0
- package/src/lib/{settings.js → settings.cjs} +0 -0
- package/src/lib/{spinner.js → spinner.cjs} +0 -0
- package/src/lib/{string.js → string.cjs} +0 -0
- package/src/recipes/vscode/{index.js → index.cjs} +2 -2
- package/src/recipes/vscode/{settings.js → settings.cjs} +0 -0
- package/src/utils/addons/{compare.js → compare.cjs} +0 -0
- package/src/utils/addons/diffs/{index.js → index.cjs} +1 -1
- package/src/utils/addons/diffs/{options.js → options.cjs} +1 -1
- package/src/utils/addons/{prepare.js → prepare.cjs} +1 -1
- package/src/utils/addons/{prompts.js → prompts.cjs} +1 -1
- package/src/utils/addons/{render.js → render.cjs} +1 -1
- package/src/utils/addons/{validation.js → validation.cjs} +0 -0
- package/src/utils/{command-helpers.js → command-helpers.cjs} +3 -3
- package/src/utils/{create-stream-promise.js → create-stream-promise.cjs} +0 -0
- package/src/utils/{deferred.js → deferred.cjs} +0 -0
- package/src/utils/deploy/{constants.js → constants.cjs} +0 -0
- package/src/utils/deploy/{deploy-site.js → deploy-site.cjs} +8 -8
- package/src/utils/deploy/{hash-files.js → hash-files.cjs} +1 -1
- package/src/utils/deploy/{hash-fns.js → hash-fns.cjs} +1 -1
- package/src/utils/deploy/{hasher-segments.js → hasher-segments.cjs} +1 -1
- package/src/utils/deploy/index.cjs +4 -0
- package/src/utils/deploy/{upload-files.js → upload-files.cjs} +1 -1
- package/src/utils/deploy/{util.js → util.cjs} +1 -1
- package/src/utils/{detect-server-settings.js → detect-server-settings.cjs} +4 -4
- package/src/utils/{dev.js → dev.cjs} +3 -3
- package/src/utils/{dot-env.js → dot-env.cjs} +2 -2
- package/src/utils/env/{index.js → index.cjs} +1 -1
- package/src/utils/{execa.js → execa.cjs} +0 -0
- package/src/utils/functions/{constants.js → constants.cjs} +0 -0
- package/src/utils/functions/{functions.js → functions.cjs} +2 -2
- package/src/utils/functions/{get-functions.js → get-functions.cjs} +1 -1
- package/src/utils/functions/index.cjs +12 -0
- package/src/utils/{get-global-config.js → get-global-config.cjs} +1 -1
- package/src/utils/{get-repo-data.js → get-repo-data.cjs} +1 -1
- package/src/utils/{gh-auth.js → gh-auth.cjs} +3 -3
- package/src/utils/{gitignore.js → gitignore.cjs} +2 -2
- package/src/utils/{headers.js → headers.cjs} +1 -1
- package/src/utils/index.cjs +42 -0
- package/src/utils/init/{config-github.js → config-github.cjs} +3 -3
- package/src/utils/init/{config-manual.js → config-manual.cjs} +2 -2
- package/src/utils/init/{config.js → config.cjs} +3 -3
- package/src/utils/init/{frameworks.js → frameworks.cjs} +0 -0
- package/src/utils/init/{node-version.js → node-version.cjs} +1 -1
- package/src/utils/init/{plugins.js → plugins.cjs} +0 -0
- package/src/utils/init/{utils.js → utils.cjs} +6 -6
- package/src/utils/{live-tunnel.js → live-tunnel.cjs} +4 -4
- package/src/utils/lm/{install.js → install.cjs} +6 -6
- package/src/utils/lm/{requirements.js → requirements.cjs} +1 -1
- package/src/utils/lm/{steps.js → steps.cjs} +2 -2
- package/src/utils/lm/{ui.js → ui.cjs} +2 -2
- package/src/utils/{open-browser.js → open-browser.cjs} +1 -1
- package/src/utils/{parse-raw-flags.js → parse-raw-flags.cjs} +0 -0
- package/src/utils/{proxy.js → proxy.cjs} +8 -8
- package/src/utils/{read-repo-url.js → read-repo-url.cjs} +0 -0
- package/src/utils/{redirects.js → redirects.cjs} +1 -1
- package/src/utils/{rules-proxy.js → rules-proxy.cjs} +3 -3
- package/src/utils/sites/{utils.js → utils.cjs} +0 -0
- package/src/utils/{state-config.js → state-config.cjs} +1 -1
- package/src/utils/telemetry/index.cjs +5 -0
- package/src/utils/telemetry/{request.js → request.cjs} +0 -0
- package/src/utils/telemetry/{telemetry.js → telemetry.cjs} +4 -4
- package/src/utils/telemetry/{validation.js → validation.cjs} +1 -1
- package/bin/run +0 -34
- package/src/commands/addons/index.js +0 -5
- package/src/commands/api/index.js +0 -5
- package/src/commands/build/index.js +0 -5
- package/src/commands/completion/index.js +0 -5
- package/src/commands/deploy/index.js +0 -5
- package/src/commands/dev/index.js +0 -5
- package/src/commands/env/index.js +0 -5
- package/src/commands/functions/index.js +0 -5
- package/src/commands/graph/index.js +0 -5
- package/src/commands/index.js +0 -7
- package/src/commands/init/index.js +0 -6
- package/src/commands/link/index.js +0 -6
- package/src/commands/lm/index.js +0 -5
- package/src/commands/login/index.js +0 -6
- package/src/commands/logout/index.js +0 -5
- package/src/commands/open/index.js +0 -5
- package/src/commands/recipes/index.js +0 -8
- package/src/commands/sites/index.js +0 -7
- package/src/commands/status/index.js +0 -5
- package/src/commands/switch/index.js +0 -5
- package/src/commands/unlink/index.js +0 -5
- package/src/commands/watch/index.js +0 -5
- package/src/lib/edge-functions/index.js +0 -7
- package/src/utils/deploy/index.js +0 -4
- package/src/utils/functions/index.js +0 -12
- package/src/utils/index.js +0 -42
- package/src/utils/telemetry/index.js +0 -5
package/bin/run.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'fs'
|
|
3
|
+
import { argv } from 'process'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
5
|
+
|
|
6
|
+
import updateNotifier from 'update-notifier'
|
|
7
|
+
|
|
8
|
+
import { createMainCommand } from '../src/commands/index.cjs'
|
|
9
|
+
|
|
10
|
+
// 12 hours
|
|
11
|
+
const UPDATE_CHECK_INTERVAL = 432e5
|
|
12
|
+
const pkg = JSON.parse(readFileSync(fileURLToPath(new URL('../package.json', import.meta.url))), 'utf-8')
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
updateNotifier({
|
|
16
|
+
pkg,
|
|
17
|
+
updateCheckInterval: UPDATE_CHECK_INTERVAL,
|
|
18
|
+
}).notify()
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.log('Error checking for updates:')
|
|
21
|
+
console.log(error)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const program = createMainCommand()
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
await program.parseAsync(argv)
|
|
28
|
+
program.onEnd()
|
|
29
|
+
} catch (error) {
|
|
30
|
+
program.onEnd(error)
|
|
31
|
+
}
|