netlify 13.3.4 → 21.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +99 -157
- package/bin/run.js +66 -0
- package/dist/commands/api/api.d.ts +4 -0
- package/dist/commands/api/api.d.ts.map +1 -0
- package/dist/commands/api/api.js +42 -0
- package/dist/commands/api/api.js.map +1 -0
- package/dist/commands/api/index.d.ts +3 -0
- package/dist/commands/api/index.d.ts.map +1 -0
- package/dist/commands/api/index.js +14 -0
- package/dist/commands/api/index.js.map +1 -0
- package/dist/commands/base-command.d.ts +93 -0
- package/dist/commands/base-command.d.ts.map +1 -0
- package/dist/commands/base-command.js +623 -0
- package/dist/commands/base-command.js.map +1 -0
- package/dist/commands/blobs/blobs-delete.d.ts +5 -0
- package/dist/commands/blobs/blobs-delete.d.ts.map +1 -0
- package/dist/commands/blobs/blobs-delete.js +27 -0
- package/dist/commands/blobs/blobs-delete.js.map +1 -0
- package/dist/commands/blobs/blobs-get.d.ts +8 -0
- package/dist/commands/blobs/blobs-get.d.ts.map +1 -0
- package/dist/commands/blobs/blobs-get.js +32 -0
- package/dist/commands/blobs/blobs-get.js.map +1 -0
- package/dist/commands/blobs/blobs-list.d.ts +10 -0
- package/dist/commands/blobs/blobs-list.d.ts.map +1 -0
- package/dist/commands/blobs/blobs-list.js +39 -0
- package/dist/commands/blobs/blobs-list.js.map +1 -0
- package/dist/commands/blobs/blobs-set.d.ts +9 -0
- package/dist/commands/blobs/blobs-set.d.ts.map +1 -0
- package/dist/commands/blobs/blobs-set.js +48 -0
- package/dist/commands/blobs/blobs-set.js.map +1 -0
- package/dist/commands/blobs/blobs.d.ts +6 -0
- package/dist/commands/blobs/blobs.d.ts.map +1 -0
- package/dist/commands/blobs/blobs.js +82 -0
- package/dist/commands/blobs/blobs.js.map +1 -0
- package/dist/commands/build/build.d.ts +6 -0
- package/dist/commands/build/build.d.ts.map +1 -0
- package/dist/commands/build/build.js +39 -0
- package/dist/commands/build/build.js.map +1 -0
- package/dist/commands/build/index.d.ts +3 -0
- package/dist/commands/build/index.d.ts.map +1 -0
- package/dist/commands/build/index.js +25 -0
- package/dist/commands/build/index.js.map +1 -0
- package/dist/commands/clone/clone.d.ts +7 -0
- package/dist/commands/clone/clone.d.ts.map +1 -0
- package/dist/commands/clone/clone.js +64 -0
- package/dist/commands/clone/clone.js.map +1 -0
- package/dist/commands/clone/index.d.ts +3 -0
- package/dist/commands/clone/index.d.ts.map +1 -0
- package/dist/commands/clone/index.js +30 -0
- package/dist/commands/clone/index.js.map +1 -0
- package/dist/commands/clone/option_values.d.ts +6 -0
- package/dist/commands/clone/option_values.d.ts.map +1 -0
- package/dist/commands/clone/option_values.js +2 -0
- package/dist/commands/clone/option_values.js.map +1 -0
- package/dist/commands/completion/completion.d.ts +5 -0
- package/dist/commands/completion/completion.d.ts.map +1 -0
- package/dist/commands/completion/completion.js +67 -0
- package/dist/commands/completion/completion.js.map +1 -0
- package/dist/commands/completion/index.d.ts +3 -0
- package/dist/commands/completion/index.d.ts.map +1 -0
- package/dist/commands/completion/index.js +27 -0
- package/dist/commands/completion/index.js.map +1 -0
- package/dist/commands/deploy/deploy.d.ts +4 -0
- package/dist/commands/deploy/deploy.d.ts.map +1 -0
- package/dist/commands/deploy/deploy.js +687 -0
- package/dist/commands/deploy/deploy.js.map +1 -0
- package/dist/commands/deploy/index.d.ts +3 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/index.js +132 -0
- package/dist/commands/deploy/index.js.map +1 -0
- package/dist/commands/deploy/option_values.d.ts +19 -0
- package/dist/commands/deploy/option_values.d.ts.map +1 -0
- package/dist/commands/deploy/option_values.js +3 -0
- package/dist/commands/deploy/option_values.js.map +1 -0
- package/dist/commands/dev/dev.d.ts +4 -0
- package/dist/commands/dev/dev.d.ts.map +1 -0
- package/dist/commands/dev/dev.js +176 -0
- package/dist/commands/dev/dev.js.map +1 -0
- package/dist/commands/dev/index.d.ts +3 -0
- package/dist/commands/dev/index.d.ts.map +1 -0
- package/dist/commands/dev/index.js +75 -0
- package/dist/commands/dev/index.js.map +1 -0
- package/dist/commands/dev-exec/dev-exec.d.ts +4 -0
- package/dist/commands/dev-exec/dev-exec.d.ts.map +1 -0
- package/dist/commands/dev-exec/dev-exec.js +14 -0
- package/dist/commands/dev-exec/dev-exec.js.map +1 -0
- package/dist/commands/dev-exec/index.d.ts +3 -0
- package/dist/commands/dev-exec/index.d.ts.map +1 -0
- package/dist/commands/dev-exec/index.js +17 -0
- package/dist/commands/dev-exec/index.js.map +1 -0
- package/dist/commands/env/env-clone.d.ts +4 -0
- package/dist/commands/env/env-clone.d.ts.map +1 -0
- package/dist/commands/env/env-clone.js +81 -0
- package/dist/commands/env/env-clone.js.map +1 -0
- package/dist/commands/env/env-get.d.ts +4 -0
- package/dist/commands/env/env-get.d.ts.map +1 -0
- package/dist/commands/env/env-get.js +29 -0
- package/dist/commands/env/env-get.js.map +1 -0
- package/dist/commands/env/env-import.d.ts +4 -0
- package/dist/commands/env/env-import.d.ts.map +1 -0
- package/dist/commands/env/env-import.js +78 -0
- package/dist/commands/env/env-import.js.map +1 -0
- package/dist/commands/env/env-list.d.ts +4 -0
- package/dist/commands/env/env-list.d.ts.map +1 -0
- package/dist/commands/env/env-list.js +85 -0
- package/dist/commands/env/env-list.js.map +1 -0
- package/dist/commands/env/env-set.d.ts +4 -0
- package/dist/commands/env/env-set.d.ts.map +1 -0
- package/dist/commands/env/env-set.js +118 -0
- package/dist/commands/env/env-set.js.map +1 -0
- package/dist/commands/env/env-unset.d.ts +4 -0
- package/dist/commands/env/env-unset.d.ts.map +1 -0
- package/dist/commands/env/env-unset.js +76 -0
- package/dist/commands/env/env-unset.js.map +1 -0
- package/dist/commands/env/env.d.ts +3 -0
- package/dist/commands/env/env.d.ts.map +1 -0
- package/dist/commands/env/env.js +139 -0
- package/dist/commands/env/env.js.map +1 -0
- package/dist/commands/env/index.d.ts +2 -0
- package/dist/commands/env/index.d.ts.map +1 -0
- package/dist/commands/env/index.js +2 -0
- package/dist/commands/env/index.js.map +1 -0
- package/dist/commands/functions/functions-build.d.ts +4 -0
- package/dist/commands/functions/functions-build.d.ts.map +1 -0
- package/dist/commands/functions/functions-build.js +26 -0
- package/dist/commands/functions/functions-build.js.map +1 -0
- package/dist/commands/functions/functions-create.d.ts +4 -0
- package/dist/commands/functions/functions-create.d.ts.map +1 -0
- package/dist/commands/functions/functions-create.js +629 -0
- package/dist/commands/functions/functions-create.js.map +1 -0
- package/dist/commands/functions/functions-invoke.d.ts +4 -0
- package/dist/commands/functions/functions-invoke.d.ts.map +1 -0
- package/dist/commands/functions/functions-invoke.js +210 -0
- package/dist/commands/functions/functions-invoke.js.map +1 -0
- package/dist/commands/functions/functions-list.d.ts +4 -0
- package/dist/commands/functions/functions-list.d.ts.map +1 -0
- package/dist/commands/functions/functions-list.js +38 -0
- package/dist/commands/functions/functions-list.js.map +1 -0
- package/dist/commands/functions/functions-serve.d.ts +4 -0
- package/dist/commands/functions/functions-serve.d.ts.map +1 -0
- package/dist/commands/functions/functions-serve.js +53 -0
- package/dist/commands/functions/functions-serve.js.map +1 -0
- package/dist/commands/functions/functions.d.ts +3 -0
- package/dist/commands/functions/functions.d.ts.map +1 -0
- package/dist/commands/functions/functions.js +108 -0
- package/dist/commands/functions/functions.js.map +1 -0
- package/dist/commands/functions/index.d.ts +2 -0
- package/dist/commands/functions/index.d.ts.map +1 -0
- package/dist/commands/functions/index.js +2 -0
- package/dist/commands/functions/index.js.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +3 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init/index.d.ts +3 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +17 -0
- package/dist/commands/init/index.js.map +1 -0
- package/dist/commands/init/init.d.ts +5 -0
- package/dist/commands/init/init.d.ts.map +1 -0
- package/dist/commands/init/init.js +192 -0
- package/dist/commands/init/init.js.map +1 -0
- package/dist/commands/link/index.d.ts +3 -0
- package/dist/commands/link/index.d.ts.map +1 -0
- package/dist/commands/link/index.js +25 -0
- package/dist/commands/link/index.js.map +1 -0
- package/dist/commands/link/link.d.ts +5 -0
- package/dist/commands/link/link.d.ts.map +1 -0
- package/dist/commands/link/link.js +305 -0
- package/dist/commands/link/link.js.map +1 -0
- package/dist/commands/link/option_values.d.ts +8 -0
- package/dist/commands/link/option_values.d.ts.map +1 -0
- package/dist/commands/link/option_values.js +3 -0
- package/dist/commands/link/option_values.js.map +1 -0
- package/dist/commands/login/index.d.ts +3 -0
- package/dist/commands/login/index.d.ts.map +1 -0
- package/dist/commands/login/index.js +17 -0
- package/dist/commands/login/index.js.map +1 -0
- package/dist/commands/login/login.d.ts +4 -0
- package/dist/commands/login/login.d.ts.map +1 -0
- package/dist/commands/login/login.js +30 -0
- package/dist/commands/login/login.js.map +1 -0
- package/dist/commands/logout/index.d.ts +3 -0
- package/dist/commands/logout/index.d.ts.map +1 -0
- package/dist/commands/logout/index.js +8 -0
- package/dist/commands/logout/index.js.map +1 -0
- package/dist/commands/logout/logout.d.ts +4 -0
- package/dist/commands/logout/logout.d.ts.map +1 -0
- package/dist/commands/logout/logout.js +23 -0
- package/dist/commands/logout/logout.js.map +1 -0
- package/dist/commands/logs/build.d.ts +8 -0
- package/dist/commands/logs/build.d.ts.map +1 -0
- package/dist/commands/logs/build.js +72 -0
- package/dist/commands/logs/build.js.map +1 -0
- package/dist/commands/logs/functions.d.ts +4 -0
- package/dist/commands/logs/functions.d.ts.map +1 -0
- package/dist/commands/logs/functions.js +79 -0
- package/dist/commands/logs/functions.js.map +1 -0
- package/dist/commands/logs/index.d.ts +5 -0
- package/dist/commands/logs/index.d.ts.map +1 -0
- package/dist/commands/logs/index.js +40 -0
- package/dist/commands/logs/index.js.map +1 -0
- package/dist/commands/logs/log-levels.d.ts +11 -0
- package/dist/commands/logs/log-levels.d.ts.map +1 -0
- package/dist/commands/logs/log-levels.js +12 -0
- package/dist/commands/logs/log-levels.js.map +1 -0
- package/dist/commands/main.d.ts +36 -0
- package/dist/commands/main.d.ts.map +1 -0
- package/dist/commands/main.js +225 -0
- package/dist/commands/main.js.map +1 -0
- package/dist/commands/open/index.d.ts +3 -0
- package/dist/commands/open/index.d.ts.map +1 -0
- package/dist/commands/open/index.js +32 -0
- package/dist/commands/open/index.js.map +1 -0
- package/dist/commands/open/open-admin.d.ts +3 -0
- package/dist/commands/open/open-admin.d.ts.map +1 -0
- package/dist/commands/open/open-admin.js +11 -0
- package/dist/commands/open/open-admin.js.map +1 -0
- package/dist/commands/open/open-site.d.ts +4 -0
- package/dist/commands/open/open-site.d.ts.map +1 -0
- package/dist/commands/open/open-site.js +12 -0
- package/dist/commands/open/open-site.js.map +1 -0
- package/dist/commands/open/open.d.ts +4 -0
- package/dist/commands/open/open.d.ts.map +1 -0
- package/dist/commands/open/open.js +14 -0
- package/dist/commands/open/open.js.map +1 -0
- package/dist/commands/recipes/common.d.ts +3 -0
- package/dist/commands/recipes/common.d.ts.map +1 -0
- package/dist/commands/recipes/common.js +26 -0
- package/dist/commands/recipes/common.js.map +1 -0
- package/dist/commands/recipes/index.d.ts +3 -0
- package/dist/commands/recipes/index.d.ts.map +1 -0
- package/dist/commands/recipes/index.js +21 -0
- package/dist/commands/recipes/index.js.map +1 -0
- package/dist/commands/recipes/recipes-list.d.ts +5 -0
- package/dist/commands/recipes/recipes-list.d.ts.map +1 -0
- package/dist/commands/recipes/recipes-list.js +15 -0
- package/dist/commands/recipes/recipes-list.js.map +1 -0
- package/dist/commands/recipes/recipes.d.ts +12 -0
- package/dist/commands/recipes/recipes.d.ts.map +1 -0
- package/dist/commands/recipes/recipes.js +53 -0
- package/dist/commands/recipes/recipes.js.map +1 -0
- package/dist/commands/serve/index.d.ts +3 -0
- package/dist/commands/serve/index.d.ts.map +1 -0
- package/dist/commands/serve/index.js +32 -0
- package/dist/commands/serve/index.js.map +1 -0
- package/dist/commands/serve/serve.d.ts +4 -0
- package/dist/commands/serve/serve.d.ts.map +1 -0
- package/dist/commands/serve/serve.js +149 -0
- package/dist/commands/serve/serve.js.map +1 -0
- package/dist/commands/sites/index.d.ts +2 -0
- package/dist/commands/sites/index.d.ts.map +1 -0
- package/dist/commands/sites/index.js +2 -0
- package/dist/commands/sites/index.js.map +1 -0
- package/dist/commands/sites/sites-create-template.d.ts +5 -0
- package/dist/commands/sites/sites-create-template.d.ts.map +1 -0
- package/dist/commands/sites/sites-create-template.js +235 -0
- package/dist/commands/sites/sites-create-template.js.map +1 -0
- package/dist/commands/sites/sites-create.d.ts +8 -0
- package/dist/commands/sites/sites-create.d.ts.map +1 -0
- package/dist/commands/sites/sites-create.js +122 -0
- package/dist/commands/sites/sites-create.js.map +1 -0
- package/dist/commands/sites/sites-delete.d.ts +4 -0
- package/dist/commands/sites/sites-delete.d.ts.map +1 -0
- package/dist/commands/sites/sites-delete.js +74 -0
- package/dist/commands/sites/sites-delete.js.map +1 -0
- package/dist/commands/sites/sites-list.d.ts +4 -0
- package/dist/commands/sites/sites-list.d.ts.map +1 -0
- package/dist/commands/sites/sites-list.js +59 -0
- package/dist/commands/sites/sites-list.js.map +1 -0
- package/dist/commands/sites/sites.d.ts +5 -0
- package/dist/commands/sites/sites.d.ts.map +1 -0
- package/dist/commands/sites/sites.js +77 -0
- package/dist/commands/sites/sites.js.map +1 -0
- package/dist/commands/status/index.d.ts +3 -0
- package/dist/commands/status/index.d.ts.map +1 -0
- package/dist/commands/status/index.js +21 -0
- package/dist/commands/status/index.js.map +1 -0
- package/dist/commands/status/status-hooks.d.ts +4 -0
- package/dist/commands/status/status-hooks.d.ts.map +1 -0
- package/dist/commands/status/status-hooks.js +30 -0
- package/dist/commands/status/status-hooks.js.map +1 -0
- package/dist/commands/status/status.d.ts +4 -0
- package/dist/commands/status/status.d.ts.map +1 -0
- package/dist/commands/status/status.js +73 -0
- package/dist/commands/status/status.js.map +1 -0
- package/dist/commands/switch/index.d.ts +3 -0
- package/dist/commands/switch/index.d.ts.map +1 -0
- package/dist/commands/switch/index.js +8 -0
- package/dist/commands/switch/index.js.map +1 -0
- package/dist/commands/switch/switch.d.ts +4 -0
- package/dist/commands/switch/switch.d.ts.map +1 -0
- package/dist/commands/switch/switch.js +31 -0
- package/dist/commands/switch/switch.js.map +1 -0
- package/dist/commands/unlink/index.d.ts +3 -0
- package/dist/commands/unlink/index.d.ts.map +1 -0
- package/dist/commands/unlink/index.js +15 -0
- package/dist/commands/unlink/index.js.map +1 -0
- package/dist/commands/unlink/unlink.d.ts +4 -0
- package/dist/commands/unlink/unlink.d.ts.map +1 -0
- package/dist/commands/unlink/unlink.js +22 -0
- package/dist/commands/unlink/unlink.js.map +1 -0
- package/dist/commands/watch/index.d.ts +3 -0
- package/dist/commands/watch/index.d.ts.map +1 -0
- package/dist/commands/watch/index.js +9 -0
- package/dist/commands/watch/index.js.map +1 -0
- package/dist/commands/watch/watch.d.ts +3 -0
- package/dist/commands/watch/watch.d.ts.map +1 -0
- package/dist/commands/watch/watch.js +91 -0
- package/dist/commands/watch/watch.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/account.d.ts +3 -0
- package/dist/lib/account.d.ts.map +1 -0
- package/dist/lib/account.js +3 -0
- package/dist/lib/account.js.map +1 -0
- package/dist/lib/api.d.ts +14 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +27 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/blobs/blobs.d.ts +47 -0
- package/dist/lib/blobs/blobs.d.ts.map +1 -0
- package/dist/lib/blobs/blobs.js +82 -0
- package/dist/lib/blobs/blobs.js.map +1 -0
- package/dist/lib/build.d.ts +111 -0
- package/dist/lib/build.d.ts.map +1 -0
- package/dist/lib/build.js +75 -0
- package/dist/lib/build.js.map +1 -0
- package/dist/lib/completion/constants.d.ts +2 -0
- package/dist/lib/completion/constants.d.ts.map +1 -0
- package/dist/lib/completion/constants.js +3 -0
- package/dist/lib/completion/constants.js.map +1 -0
- package/dist/lib/completion/generate-autocompletion.d.ts +8 -0
- package/dist/lib/completion/generate-autocompletion.d.ts.map +1 -0
- package/dist/lib/completion/generate-autocompletion.js +42 -0
- package/dist/lib/completion/generate-autocompletion.js.map +1 -0
- package/dist/lib/completion/get-autocompletion.d.ts +13 -0
- package/dist/lib/completion/get-autocompletion.d.ts.map +1 -0
- package/dist/lib/completion/get-autocompletion.js +31 -0
- package/dist/lib/completion/get-autocompletion.js.map +1 -0
- package/dist/lib/completion/index.d.ts +2 -0
- package/dist/lib/completion/index.d.ts.map +1 -0
- package/dist/lib/completion/index.js +2 -0
- package/dist/lib/completion/index.js.map +1 -0
- package/dist/lib/completion/script.d.ts +3 -0
- package/dist/lib/completion/script.d.ts.map +1 -0
- package/dist/lib/completion/script.js +19 -0
- package/dist/lib/completion/script.js.map +1 -0
- package/dist/lib/edge-functions/bootstrap.d.ts +3 -0
- package/dist/lib/edge-functions/bootstrap.d.ts.map +1 -0
- package/dist/lib/edge-functions/bootstrap.js +20 -0
- package/dist/lib/edge-functions/bootstrap.js.map +1 -0
- package/dist/lib/edge-functions/consts.d.ts +11 -0
- package/dist/lib/edge-functions/consts.d.ts.map +1 -0
- package/dist/lib/edge-functions/consts.js +13 -0
- package/dist/lib/edge-functions/consts.js.map +1 -0
- package/dist/lib/edge-functions/deploy.d.ts +8 -0
- package/dist/lib/edge-functions/deploy.d.ts.map +1 -0
- package/dist/lib/edge-functions/deploy.js +34 -0
- package/dist/lib/edge-functions/deploy.js.map +1 -0
- package/dist/lib/edge-functions/editor-helper.d.ts +9 -0
- package/dist/lib/edge-functions/editor-helper.d.ts.map +1 -0
- package/dist/lib/edge-functions/editor-helper.js +31 -0
- package/dist/lib/edge-functions/editor-helper.js.map +1 -0
- package/dist/lib/edge-functions/headers.d.ts +35 -0
- package/dist/lib/edge-functions/headers.d.ts.map +1 -0
- package/dist/lib/edge-functions/headers.js +42 -0
- package/dist/lib/edge-functions/headers.js.map +1 -0
- package/dist/lib/edge-functions/proxy.d.ts +42 -0
- package/dist/lib/edge-functions/proxy.d.ts.map +1 -0
- package/dist/lib/edge-functions/proxy.js +151 -0
- package/dist/lib/edge-functions/proxy.js.map +1 -0
- package/dist/lib/edge-functions/registry.d.ts +103 -0
- package/dist/lib/edge-functions/registry.d.ts.map +1 -0
- package/dist/lib/edge-functions/registry.js +441 -0
- package/dist/lib/edge-functions/registry.js.map +1 -0
- package/dist/lib/exec-fetcher.d.ts +20 -0
- package/dist/lib/exec-fetcher.d.ts.map +1 -0
- package/dist/lib/exec-fetcher.js +104 -0
- package/dist/lib/exec-fetcher.js.map +1 -0
- package/dist/lib/fs.d.ts +10 -0
- package/dist/lib/fs.d.ts.map +1 -0
- package/dist/lib/fs.js +38 -0
- package/dist/lib/fs.js.map +1 -0
- package/dist/lib/functions/background.d.ts +5 -0
- package/dist/lib/functions/background.d.ts.map +1 -0
- package/dist/lib/functions/background.js +17 -0
- package/dist/lib/functions/background.js.map +1 -0
- package/dist/lib/functions/config.d.ts +23 -0
- package/dist/lib/functions/config.d.ts.map +1 -0
- package/dist/lib/functions/config.js +19 -0
- package/dist/lib/functions/config.js.map +1 -0
- package/dist/lib/functions/form-submissions-handler.d.ts +11 -0
- package/dist/lib/functions/form-submissions-handler.d.ts.map +1 -0
- package/dist/lib/functions/form-submissions-handler.js +154 -0
- package/dist/lib/functions/form-submissions-handler.js.map +1 -0
- package/dist/lib/functions/local-proxy.d.ts +9 -0
- package/dist/lib/functions/local-proxy.d.ts.map +1 -0
- package/dist/lib/functions/local-proxy.js +38 -0
- package/dist/lib/functions/local-proxy.js.map +1 -0
- package/dist/lib/functions/memoized-build.d.ts +11 -0
- package/dist/lib/functions/memoized-build.d.ts.map +1 -0
- package/dist/lib/functions/memoized-build.js +28 -0
- package/dist/lib/functions/memoized-build.js.map +1 -0
- package/dist/lib/functions/netlify-function.d.ts +91 -0
- package/dist/lib/functions/netlify-function.d.ts.map +1 -0
- package/dist/lib/functions/netlify-function.js +241 -0
- package/dist/lib/functions/netlify-function.js.map +1 -0
- package/dist/lib/functions/registry.d.ts +121 -0
- package/dist/lib/functions/registry.d.ts.map +1 -0
- package/dist/lib/functions/registry.js +437 -0
- package/dist/lib/functions/registry.js.map +1 -0
- package/dist/lib/functions/runtimes/go/index.d.ts +11 -0
- package/dist/lib/functions/runtimes/go/index.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/go/index.js +65 -0
- package/dist/lib/functions/runtimes/go/index.js.map +1 -0
- package/dist/lib/functions/runtimes/index.d.ts +55 -0
- package/dist/lib/functions/runtimes/index.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/index.js +10 -0
- package/dist/lib/functions/runtimes/index.js.map +1 -0
- package/dist/lib/functions/runtimes/js/builders/zisi.d.ts +35 -0
- package/dist/lib/functions/runtimes/js/builders/zisi.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/js/builders/zisi.js +139 -0
- package/dist/lib/functions/runtimes/js/builders/zisi.js.map +1 -0
- package/dist/lib/functions/runtimes/js/constants.d.ts +2 -0
- package/dist/lib/functions/runtimes/js/constants.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/js/constants.js +2 -0
- package/dist/lib/functions/runtimes/js/constants.js.map +1 -0
- package/dist/lib/functions/runtimes/js/index.d.ts +24 -0
- package/dist/lib/functions/runtimes/js/index.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/js/index.js +95 -0
- package/dist/lib/functions/runtimes/js/index.js.map +1 -0
- package/dist/lib/functions/runtimes/js/worker.d.ts +8 -0
- package/dist/lib/functions/runtimes/js/worker.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/js/worker.js +64 -0
- package/dist/lib/functions/runtimes/js/worker.js.map +1 -0
- package/dist/lib/functions/runtimes/rust/index.d.ts +11 -0
- package/dist/lib/functions/runtimes/rust/index.d.ts.map +1 -0
- package/dist/lib/functions/runtimes/rust/index.js +72 -0
- package/dist/lib/functions/runtimes/rust/index.js.map +1 -0
- package/dist/lib/functions/scheduled.d.ts +21 -0
- package/dist/lib/functions/scheduled.d.ts.map +1 -0
- package/dist/lib/functions/scheduled.js +77 -0
- package/dist/lib/functions/scheduled.js.map +1 -0
- package/dist/lib/functions/server.d.ts +38 -0
- package/dist/lib/functions/server.d.ts.map +1 -0
- package/dist/lib/functions/server.js +292 -0
- package/dist/lib/functions/server.js.map +1 -0
- package/dist/lib/functions/synchronous.d.ts +11 -0
- package/dist/lib/functions/synchronous.d.ts.map +1 -0
- package/dist/lib/functions/synchronous.js +132 -0
- package/dist/lib/functions/synchronous.js.map +1 -0
- package/dist/lib/functions/utils.d.ts +8 -0
- package/dist/lib/functions/utils.d.ts.map +1 -0
- package/dist/lib/functions/utils.js +42 -0
- package/dist/lib/functions/utils.js.map +1 -0
- package/dist/lib/geo-location.d.ts +31 -0
- package/dist/lib/geo-location.d.ts.map +1 -0
- package/dist/lib/geo-location.js +84 -0
- package/dist/lib/geo-location.js.map +1 -0
- package/dist/lib/http-agent.d.ts +22 -0
- package/dist/lib/http-agent.d.ts.map +1 -0
- package/dist/lib/http-agent.js +96 -0
- package/dist/lib/http-agent.js.map +1 -0
- package/dist/lib/images/proxy.d.ts +30 -0
- package/dist/lib/images/proxy.d.ts.map +1 -0
- package/dist/lib/images/proxy.js +117 -0
- package/dist/lib/images/proxy.js.map +1 -0
- package/dist/lib/log.d.ts +3 -0
- package/dist/lib/log.d.ts.map +1 -0
- package/dist/lib/log.js +16 -0
- package/dist/lib/log.js.map +1 -0
- package/dist/lib/path.d.ts +2 -0
- package/dist/lib/path.d.ts.map +1 -0
- package/dist/lib/path.js +2 -0
- package/dist/lib/path.js.map +1 -0
- package/dist/lib/render-error-template.d.ts +3 -0
- package/dist/lib/render-error-template.d.ts.map +1 -0
- package/dist/lib/render-error-template.js +21 -0
- package/dist/lib/render-error-template.js.map +1 -0
- package/dist/lib/settings.d.ts +14 -0
- package/dist/lib/settings.d.ts.map +1 -0
- package/dist/lib/settings.js +19 -0
- package/dist/lib/settings.js.map +1 -0
- package/dist/lib/spinner.d.ts +23 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +30 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/string.d.ts +2 -0
- package/dist/lib/string.d.ts.map +1 -0
- package/dist/lib/string.js +6 -0
- package/dist/lib/string.js.map +1 -0
- package/dist/recipes/ai-context/context.d.ts +59 -0
- package/dist/recipes/ai-context/context.d.ts.map +1 -0
- package/dist/recipes/ai-context/context.js +195 -0
- package/dist/recipes/ai-context/context.js.map +1 -0
- package/dist/recipes/ai-context/index.d.ts +4 -0
- package/dist/recipes/ai-context/index.d.ts.map +1 -0
- package/dist/recipes/ai-context/index.js +132 -0
- package/dist/recipes/ai-context/index.js.map +1 -0
- package/dist/recipes/blobs-migrate/index.d.ts +9 -0
- package/dist/recipes/blobs-migrate/index.d.ts.map +1 -0
- package/dist/recipes/blobs-migrate/index.js +78 -0
- package/dist/recipes/blobs-migrate/index.js.map +1 -0
- package/dist/recipes/vscode/index.d.ts +12 -0
- package/dist/recipes/vscode/index.d.ts.map +1 -0
- package/dist/recipes/vscode/index.js +93 -0
- package/dist/recipes/vscode/index.js.map +1 -0
- package/dist/recipes/vscode/settings.d.ts +18 -0
- package/dist/recipes/vscode/settings.d.ts.map +1 -0
- package/dist/recipes/vscode/settings.js +61 -0
- package/dist/recipes/vscode/settings.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/utils/addons/prepare.d.ts +13 -0
- package/dist/utils/addons/prepare.d.ts.map +1 -0
- package/dist/utils/addons/prepare.js +26 -0
- package/dist/utils/addons/prepare.js.map +1 -0
- package/dist/utils/build-info.d.ts +21 -0
- package/dist/utils/build-info.d.ts.map +1 -0
- package/dist/utils/build-info.js +122 -0
- package/dist/utils/build-info.js.map +1 -0
- package/dist/utils/cli-state.d.ts +13 -0
- package/dist/utils/cli-state.d.ts.map +1 -0
- package/dist/utils/cli-state.js +107 -0
- package/dist/utils/cli-state.js.map +1 -0
- package/dist/utils/command-helpers.d.ts +110 -0
- package/dist/utils/command-helpers.d.ts.map +1 -0
- package/dist/utils/command-helpers.js +250 -0
- package/dist/utils/command-helpers.js.map +1 -0
- package/dist/utils/copy-template-dir/copy-template-dir.d.ts +2 -0
- package/dist/utils/copy-template-dir/copy-template-dir.d.ts.map +1 -0
- package/dist/utils/copy-template-dir/copy-template-dir.js +66 -0
- package/dist/utils/copy-template-dir/copy-template-dir.js.map +1 -0
- package/dist/utils/create-deferred.d.ts +7 -0
- package/dist/utils/create-deferred.d.ts.map +1 -0
- package/dist/utils/create-deferred.js +11 -0
- package/dist/utils/create-deferred.js.map +1 -0
- package/dist/utils/create-stream-promise.d.ts +5 -0
- package/dist/utils/create-stream-promise.d.ts.map +1 -0
- package/dist/utils/create-stream-promise.js +46 -0
- package/dist/utils/create-stream-promise.js.map +1 -0
- package/dist/utils/deploy/constants.d.ts +10 -0
- package/dist/utils/deploy/constants.d.ts.map +1 -0
- package/dist/utils/deploy/constants.js +18 -0
- package/dist/utils/deploy/constants.js.map +1 -0
- package/dist/utils/deploy/deploy-site.d.ts +21 -0
- package/dist/utils/deploy/deploy-site.d.ts.map +1 -0
- package/dist/utils/deploy/deploy-site.js +156 -0
- package/dist/utils/deploy/deploy-site.js.map +1 -0
- package/dist/utils/deploy/hash-config.d.ts +10 -0
- package/dist/utils/deploy/hash-config.d.ts.map +1 -0
- package/dist/utils/deploy/hash-config.js +26 -0
- package/dist/utils/deploy/hash-config.js.map +1 -0
- package/dist/utils/deploy/hash-files.d.ts +15 -0
- package/dist/utils/deploy/hash-files.d.ts.map +1 -0
- package/dist/utils/deploy/hash-files.js +21 -0
- package/dist/utils/deploy/hash-files.js.map +1 -0
- package/dist/utils/deploy/hash-fns.d.ts +24 -0
- package/dist/utils/deploy/hash-fns.d.ts.map +1 -0
- package/dist/utils/deploy/hash-fns.js +141 -0
- package/dist/utils/deploy/hash-fns.js.map +1 -0
- package/dist/utils/deploy/hasher-segments.d.ts +15 -0
- package/dist/utils/deploy/hasher-segments.d.ts.map +1 -0
- package/dist/utils/deploy/hasher-segments.js +74 -0
- package/dist/utils/deploy/hasher-segments.js.map +1 -0
- package/dist/utils/deploy/status-cb.d.ts +7 -0
- package/dist/utils/deploy/status-cb.d.ts.map +1 -0
- package/dist/utils/deploy/status-cb.js +2 -0
- package/dist/utils/deploy/status-cb.js.map +1 -0
- package/dist/utils/deploy/upload-files.d.ts +7 -0
- package/dist/utils/deploy/upload-files.d.ts.map +1 -0
- package/dist/utils/deploy/upload-files.js +116 -0
- package/dist/utils/deploy/upload-files.js.map +1 -0
- package/dist/utils/deploy/util.d.ts +5 -0
- package/dist/utils/deploy/util.d.ts.map +1 -0
- package/dist/utils/deploy/util.js +93 -0
- package/dist/utils/deploy/util.js.map +1 -0
- package/dist/utils/detect-server-settings.d.ts +108 -0
- package/dist/utils/detect-server-settings.d.ts.map +1 -0
- package/dist/utils/detect-server-settings.js +252 -0
- package/dist/utils/detect-server-settings.js.map +1 -0
- package/dist/utils/dev-server-banner.d.ts +4 -0
- package/dist/utils/dev-server-banner.d.ts.map +1 -0
- package/dist/utils/dev-server-banner.js +15 -0
- package/dist/utils/dev-server-banner.js.map +1 -0
- package/dist/utils/dev.d.ts +72 -0
- package/dist/utils/dev.d.ts.map +1 -0
- package/dist/utils/dev.js +192 -0
- package/dist/utils/dev.js.map +1 -0
- package/dist/utils/dot-env.d.ts +26 -0
- package/dist/utils/dot-env.d.ts.map +1 -0
- package/dist/utils/dot-env.js +43 -0
- package/dist/utils/dot-env.js.map +1 -0
- package/dist/utils/env/index.d.ts +164 -0
- package/dist/utils/env/index.d.ts.map +1 -0
- package/dist/utils/env/index.js +254 -0
- package/dist/utils/env/index.js.map +1 -0
- package/dist/utils/execa.d.ts +4 -0
- package/dist/utils/execa.d.ts.map +1 -0
- package/dist/utils/execa.js +15 -0
- package/dist/utils/execa.js.map +1 -0
- package/dist/utils/feature-flags.d.ts +20 -0
- package/dist/utils/feature-flags.d.ts.map +1 -0
- package/dist/utils/feature-flags.js +21 -0
- package/dist/utils/feature-flags.js.map +1 -0
- package/dist/utils/framework-server.d.ts +13 -0
- package/dist/utils/framework-server.d.ts.map +1 -0
- package/dist/utils/framework-server.js +71 -0
- package/dist/utils/framework-server.js.map +1 -0
- package/dist/utils/frameworks-api.d.ts +20 -0
- package/dist/utils/frameworks-api.d.ts.map +1 -0
- package/dist/utils/frameworks-api.js +54 -0
- package/dist/utils/frameworks-api.js.map +1 -0
- package/dist/utils/functions/constants.d.ts +2 -0
- package/dist/utils/functions/constants.d.ts.map +1 -0
- package/dist/utils/functions/constants.js +2 -0
- package/dist/utils/functions/constants.js.map +1 -0
- package/dist/utils/functions/functions.d.ts +32 -0
- package/dist/utils/functions/functions.d.ts.map +1 -0
- package/dist/utils/functions/functions.js +39 -0
- package/dist/utils/functions/functions.js.map +1 -0
- package/dist/utils/functions/get-functions.d.ts +10 -0
- package/dist/utils/functions/get-functions.d.ts.map +1 -0
- package/dist/utils/functions/get-functions.js +35 -0
- package/dist/utils/functions/get-functions.js.map +1 -0
- package/dist/utils/functions/index.d.ts +4 -0
- package/dist/utils/functions/index.d.ts.map +1 -0
- package/dist/utils/functions/index.js +4 -0
- package/dist/utils/functions/index.js.map +1 -0
- package/dist/utils/get-cli-package-json.d.ts +4 -0
- package/dist/utils/get-cli-package-json.d.ts.map +1 -0
- package/dist/utils/get-cli-package-json.js +22 -0
- package/dist/utils/get-cli-package-json.js.map +1 -0
- package/dist/utils/get-global-config-store.d.ts +16 -0
- package/dist/utils/get-global-config-store.d.ts.map +1 -0
- package/dist/utils/get-global-config-store.js +87 -0
- package/dist/utils/get-global-config-store.js.map +1 -0
- package/dist/utils/get-repo-data.d.ts +17 -0
- package/dist/utils/get-repo-data.d.ts.map +1 -0
- package/dist/utils/get-repo-data.js +59 -0
- package/dist/utils/get-repo-data.js.map +1 -0
- package/dist/utils/get-site.d.ts +4 -0
- package/dist/utils/get-site.d.ts.map +1 -0
- package/dist/utils/get-site.js +21 -0
- package/dist/utils/get-site.js.map +1 -0
- package/dist/utils/gh-auth.d.ts +14 -0
- package/dist/utils/gh-auth.d.ts.map +1 -0
- package/dist/utils/gh-auth.js +92 -0
- package/dist/utils/gh-auth.js.map +1 -0
- package/dist/utils/gitignore.d.ts +2 -0
- package/dist/utils/gitignore.d.ts.map +1 -0
- package/dist/utils/gitignore.js +36 -0
- package/dist/utils/gitignore.js.map +1 -0
- package/dist/utils/headers.d.ts +15 -0
- package/dist/utils/headers.d.ts.map +1 -0
- package/dist/utils/headers.js +39 -0
- package/dist/utils/headers.js.map +1 -0
- package/dist/utils/hooks/requires-site-info.d.ts +7 -0
- package/dist/utils/hooks/requires-site-info.d.ts.map +1 -0
- package/dist/utils/hooks/requires-site-info.js +31 -0
- package/dist/utils/hooks/requires-site-info.js.map +1 -0
- package/dist/utils/init/config-github.d.ts +15 -0
- package/dist/utils/init/config-github.d.ts.map +1 -0
- package/dist/utils/init/config-github.js +214 -0
- package/dist/utils/init/config-github.js.map +1 -0
- package/dist/utils/init/config-manual.d.ts +8 -0
- package/dist/utils/init/config-manual.d.ts.map +1 -0
- package/dist/utils/init/config-manual.js +86 -0
- package/dist/utils/init/config-manual.js.map +1 -0
- package/dist/utils/init/config.d.ts +9 -0
- package/dist/utils/init/config.d.ts.map +1 -0
- package/dist/utils/init/config.js +29 -0
- package/dist/utils/init/config.js.map +1 -0
- package/dist/utils/init/plugins.d.ts +7 -0
- package/dist/utils/init/plugins.d.ts.map +1 -0
- package/dist/utils/init/plugins.js +4 -0
- package/dist/utils/init/plugins.js.map +1 -0
- package/dist/utils/init/utils.d.ts +154 -0
- package/dist/utils/init/utils.d.ts.map +1 -0
- package/dist/utils/init/utils.js +164 -0
- package/dist/utils/init/utils.js.map +1 -0
- package/dist/utils/live-tunnel.d.ts +9 -0
- package/dist/utils/live-tunnel.d.ts.map +1 -0
- package/dist/utils/live-tunnel.js +126 -0
- package/dist/utils/live-tunnel.js.map +1 -0
- package/dist/utils/multimap.d.ts +6 -0
- package/dist/utils/multimap.d.ts.map +1 -0
- package/dist/utils/multimap.js +10 -0
- package/dist/utils/multimap.js.map +1 -0
- package/dist/utils/nodejs-compile-cache.d.ts +24 -0
- package/dist/utils/nodejs-compile-cache.d.ts.map +1 -0
- package/dist/utils/nodejs-compile-cache.js +44 -0
- package/dist/utils/nodejs-compile-cache.js.map +1 -0
- package/dist/utils/normalize-repo-url.d.ts +11 -0
- package/dist/utils/normalize-repo-url.d.ts.map +1 -0
- package/dist/utils/normalize-repo-url.js +24 -0
- package/dist/utils/normalize-repo-url.js.map +1 -0
- package/dist/utils/open-browser.d.ts +7 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +33 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/parse-raw-flags.d.ts +3 -0
- package/dist/utils/parse-raw-flags.d.ts.map +1 -0
- package/dist/utils/parse-raw-flags.js +54 -0
- package/dist/utils/parse-raw-flags.js.map +1 -0
- package/dist/utils/prompts/blob-delete-prompts.d.ts +2 -0
- package/dist/utils/prompts/blob-delete-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/blob-delete-prompts.js +12 -0
- package/dist/utils/prompts/blob-delete-prompts.js.map +1 -0
- package/dist/utils/prompts/blob-set-prompt.d.ts +2 -0
- package/dist/utils/prompts/blob-set-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/blob-set-prompt.js +12 -0
- package/dist/utils/prompts/blob-set-prompt.js.map +1 -0
- package/dist/utils/prompts/confirm-prompt.d.ts +2 -0
- package/dist/utils/prompts/confirm-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/confirm-prompt.js +21 -0
- package/dist/utils/prompts/confirm-prompt.js.map +1 -0
- package/dist/utils/prompts/env-clone-prompt.d.ts +11 -0
- package/dist/utils/prompts/env-clone-prompt.d.ts.map +1 -0
- package/dist/utils/prompts/env-clone-prompt.js +28 -0
- package/dist/utils/prompts/env-clone-prompt.js.map +1 -0
- package/dist/utils/prompts/env-set-prompts.d.ts +2 -0
- package/dist/utils/prompts/env-set-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/env-set-prompts.js +12 -0
- package/dist/utils/prompts/env-set-prompts.js.map +1 -0
- package/dist/utils/prompts/env-unset-prompts.d.ts +8 -0
- package/dist/utils/prompts/env-unset-prompts.d.ts.map +1 -0
- package/dist/utils/prompts/env-unset-prompts.js +18 -0
- package/dist/utils/prompts/env-unset-prompts.js.map +1 -0
- package/dist/utils/prompts/prompt-messages.d.ts +25 -0
- package/dist/utils/prompts/prompt-messages.d.ts.map +1 -0
- package/dist/utils/prompts/prompt-messages.js +26 -0
- package/dist/utils/prompts/prompt-messages.js.map +1 -0
- package/dist/utils/proxy-server.d.ts +39 -0
- package/dist/utils/proxy-server.d.ts.map +1 -0
- package/dist/utils/proxy-server.js +50 -0
- package/dist/utils/proxy-server.js.map +1 -0
- package/dist/utils/proxy.d.ts +13 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/dist/utils/proxy.js +782 -0
- package/dist/utils/proxy.js.map +1 -0
- package/dist/utils/read-repo-url.d.ts +12 -0
- package/dist/utils/read-repo-url.d.ts.map +1 -0
- package/dist/utils/read-repo-url.js +53 -0
- package/dist/utils/read-repo-url.js.map +1 -0
- package/dist/utils/redirects.d.ts +6 -0
- package/dist/utils/redirects.d.ts.map +1 -0
- package/dist/utils/redirects.js +59 -0
- package/dist/utils/redirects.js.map +1 -0
- package/dist/utils/request-id.d.ts +2 -0
- package/dist/utils/request-id.d.ts.map +1 -0
- package/dist/utils/request-id.js +3 -0
- package/dist/utils/request-id.js.map +1 -0
- package/dist/utils/rules-proxy.d.ts +16 -0
- package/dist/utils/rules-proxy.d.ts.map +1 -0
- package/dist/utils/rules-proxy.js +87 -0
- package/dist/utils/rules-proxy.js.map +1 -0
- package/dist/utils/run-build.d.ts +33 -0
- package/dist/utils/run-build.d.ts.map +1 -0
- package/dist/utils/run-build.js +126 -0
- package/dist/utils/run-build.js.map +1 -0
- package/dist/utils/run-git.d.ts +2 -0
- package/dist/utils/run-git.d.ts.map +1 -0
- package/dist/utils/run-git.js +7 -0
- package/dist/utils/run-git.js.map +1 -0
- package/dist/utils/run-program.d.ts +3 -0
- package/dist/utils/run-program.d.ts.map +1 -0
- package/dist/utils/run-program.js +13 -0
- package/dist/utils/run-program.js.map +1 -0
- package/dist/utils/scripted-commands.d.ts +3 -0
- package/dist/utils/scripted-commands.d.ts.map +1 -0
- package/dist/utils/scripted-commands.js +18 -0
- package/dist/utils/scripted-commands.js.map +1 -0
- package/dist/utils/shell.d.ts +8 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +106 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sign-redirect.d.ts +7 -0
- package/dist/utils/sign-redirect.d.ts.map +1 -0
- package/dist/utils/sign-redirect.js +16 -0
- package/dist/utils/sign-redirect.js.map +1 -0
- package/dist/utils/sites/create-template.d.ts +14 -0
- package/dist/utils/sites/create-template.d.ts.map +1 -0
- package/dist/utils/sites/create-template.js +47 -0
- package/dist/utils/sites/create-template.js.map +1 -0
- package/dist/utils/sites/utils.d.ts +16 -0
- package/dist/utils/sites/utils.d.ts.map +1 -0
- package/dist/utils/sites/utils.js +63 -0
- package/dist/utils/sites/utils.js.map +1 -0
- package/dist/utils/static-server.d.ts +10 -0
- package/dist/utils/static-server.d.ts.map +1 -0
- package/dist/utils/static-server.js +36 -0
- package/dist/utils/static-server.js.map +1 -0
- package/dist/utils/telemetry/index.d.ts +3 -0
- package/dist/utils/telemetry/index.d.ts.map +1 -0
- package/dist/utils/telemetry/index.js +3 -0
- package/dist/utils/telemetry/index.js.map +1 -0
- package/dist/utils/telemetry/report-error.d.ts +10 -0
- package/dist/utils/telemetry/report-error.d.ts.map +1 -0
- package/dist/utils/telemetry/report-error.js +52 -0
- package/dist/utils/telemetry/report-error.js.map +1 -0
- package/dist/utils/telemetry/request.d.ts +2 -0
- package/dist/utils/telemetry/request.d.ts.map +1 -0
- package/dist/utils/telemetry/request.js +41 -0
- package/dist/utils/telemetry/request.js.map +1 -0
- package/dist/utils/telemetry/telemetry.d.ts +14 -0
- package/dist/utils/telemetry/telemetry.d.ts.map +1 -0
- package/dist/utils/telemetry/telemetry.js +94 -0
- package/dist/utils/telemetry/telemetry.js.map +1 -0
- package/dist/utils/telemetry/utils.d.ts +3 -0
- package/dist/utils/telemetry/utils.d.ts.map +1 -0
- package/dist/utils/telemetry/utils.js +7 -0
- package/dist/utils/telemetry/utils.js.map +1 -0
- package/dist/utils/telemetry/validation.d.ts +2 -0
- package/dist/utils/telemetry/validation.d.ts.map +1 -0
- package/dist/utils/telemetry/validation.js +63 -0
- package/dist/utils/telemetry/validation.js.map +1 -0
- package/dist/utils/temporary-file.d.ts +7 -0
- package/dist/utils/temporary-file.d.ts.map +1 -0
- package/dist/utils/temporary-file.js +16 -0
- package/dist/utils/temporary-file.js.map +1 -0
- package/dist/utils/types.d.ts +205 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/validation.d.ts +6 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +17 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/websockets/index.d.ts +3 -0
- package/dist/utils/websockets/index.d.ts.map +1 -0
- package/dist/utils/websockets/index.js +3 -0
- package/dist/utils/websockets/index.js.map +1 -0
- package/functions-templates/go/hello-world/.netlify-function-template.mjs +6 -0
- package/functions-templates/go/hello-world/go.mod +5 -0
- package/functions-templates/go/hello-world/go.sum +22 -0
- package/functions-templates/go/hello-world/main.go +24 -0
- package/functions-templates/javascript/hello/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/hello/{{name}}.js +4 -0
- package/functions-templates/javascript/hello-world/.netlify-function-template.mjs +6 -0
- package/functions-templates/javascript/hello-world/{{name}}.mjs +13 -0
- package/functions-templates/javascript/image-external/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/image-external/{{name}}.js +12 -0
- package/functions-templates/javascript/localized-content/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/localized-content/{{name}}.js +15 -0
- package/functions-templates/javascript/scheduled-function/.netlify-function-template.mjs +6 -0
- package/functions-templates/javascript/scheduled-function/package.json +20 -0
- package/functions-templates/javascript/scheduled-function/{{name}}.mjs +11 -0
- package/functions-templates/javascript/set-cookies/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/set-cookies/{{name}}.js +28 -0
- package/functions-templates/javascript/set-req-header/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/set-req-header/{{name}}.js +3 -0
- package/functions-templates/javascript/set-res-header/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/set-res-header/{{name}}.js +5 -0
- package/functions-templates/javascript/transform-response/.netlify-function-template.mjs +5 -0
- package/functions-templates/javascript/transform-response/{{name}}.js +12 -0
- package/functions-templates/rust/hello-world/.netlify-function-template.mjs +6 -0
- package/functions-templates/rust/hello-world/Cargo.lock +1149 -0
- package/functions-templates/rust/hello-world/Cargo.toml +14 -0
- package/functions-templates/rust/hello-world/src/main.rs +29 -0
- package/functions-templates/typescript/abtest/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/abtest/{{name}}.ts +31 -0
- package/functions-templates/typescript/geolocation/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/geolocation/{{name}}.ts +23 -0
- package/functions-templates/typescript/hello-world/.netlify-function-template.mjs +6 -0
- package/functions-templates/typescript/hello-world/package-lock.json +95 -0
- package/functions-templates/typescript/hello-world/package.json +21 -0
- package/functions-templates/typescript/hello-world/{{name}}.mts +14 -0
- package/functions-templates/typescript/json/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/json/{{name}}.ts +4 -0
- package/functions-templates/typescript/log/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/log/{{name}}.ts +9 -0
- package/functions-templates/typescript/scheduled-function/.netlify-function-template.mjs +6 -0
- package/functions-templates/typescript/scheduled-function/package.json +22 -0
- package/functions-templates/typescript/scheduled-function/{{name}}.mts +11 -0
- package/functions-templates/typescript/set-cookies/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/set-cookies/{{name}}.ts +29 -0
- package/functions-templates/typescript/set-req-header/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/set-req-header/{{name}}.ts +5 -0
- package/functions-templates/typescript/set-res-header/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/set-res-header/{{name}}.ts +7 -0
- package/functions-templates/typescript/transform-response/.netlify-function-template.mjs +5 -0
- package/functions-templates/typescript/transform-response/{{name}}.ts +13 -0
- package/npm-shrinkwrap.json +23183 -0
- package/package.json +147 -53
- package/scripts/bash.sh +15 -0
- package/scripts/fish.sh +8 -0
- package/scripts/netlifyPackage.js +68 -0
- package/scripts/path.ps1 +35 -0
- package/scripts/postinstall.js +82 -0
- package/scripts/prepublishOnly.js +29 -0
- package/scripts/zsh.sh +3 -0
- package/lib/index.d.ts +0 -54
- package/lib/index.js +0 -78
- package/lib/methods/body.d.ts +0 -1
- package/lib/methods/body.js +0 -25
- package/lib/methods/index.d.ts +0 -6
- package/lib/methods/index.js +0 -84
- package/lib/methods/params.d.ts +0 -1
- package/lib/methods/params.js +0 -14
- package/lib/methods/response.d.ts +0 -2
- package/lib/methods/response.js +0 -44
- package/lib/methods/retry.d.ts +0 -7
- package/lib/methods/retry.js +0 -40
- package/lib/methods/url.d.ts +0 -4
- package/lib/methods/url.js +0 -24
- package/lib/omit.d.ts +0 -1
- package/lib/omit.js +0 -7
- package/lib/open_api.d.ts +0 -1
- package/lib/open_api.js +0 -5
- package/lib/operations.d.ts +0 -1
- package/lib/operations.js +0 -19
- package/lib/types.d.ts +0 -129
- package/lib/types.js +0 -1
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
import { stat } from 'fs/promises';
|
|
2
|
+
import { basename, resolve } from 'path';
|
|
3
|
+
import { runCoreSteps } from '@netlify/build';
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import isEmpty from 'lodash/isEmpty.js';
|
|
6
|
+
import isObject from 'lodash/isObject.js';
|
|
7
|
+
import { parseAllHeaders } from '@netlify/headers-parser';
|
|
8
|
+
import { parseAllRedirects } from '@netlify/redirect-parser';
|
|
9
|
+
import prettyjson from 'prettyjson';
|
|
10
|
+
import { cancelDeploy } from '../../lib/api.js';
|
|
11
|
+
import { getRunBuildOptions, runBuild, } from '../../lib/build.js';
|
|
12
|
+
import { getBootstrapURL } from '../../lib/edge-functions/bootstrap.js';
|
|
13
|
+
import { featureFlags as edgeFunctionsFeatureFlags } from '../../lib/edge-functions/consts.js';
|
|
14
|
+
import { normalizeFunctionsConfig } from '../../lib/functions/config.js';
|
|
15
|
+
import { BACKGROUND_FUNCTIONS_WARNING } from '../../lib/log.js';
|
|
16
|
+
import { startSpinner, stopSpinner } from '../../lib/spinner.js';
|
|
17
|
+
import { detectFrameworkSettings, getDefaultConfig } from '../../utils/build-info.js';
|
|
18
|
+
import { NETLIFY_CYAN_HEX, NETLIFYDEVERR, NETLIFYDEVLOG, chalk, logAndThrowError, exit, getToken, log, logJson, warn, } from '../../utils/command-helpers.js';
|
|
19
|
+
import { DEFAULT_DEPLOY_TIMEOUT } from '../../utils/deploy/constants.js';
|
|
20
|
+
import { deploySite } from '../../utils/deploy/deploy-site.js';
|
|
21
|
+
import { getEnvelopeEnv } from '../../utils/env/index.js';
|
|
22
|
+
import { getFunctionsManifestPath, getInternalFunctionsDir } from '../../utils/functions/index.js';
|
|
23
|
+
import openBrowser from '../../utils/open-browser.js';
|
|
24
|
+
import { link } from '../link/link.js';
|
|
25
|
+
import { sitesCreate } from '../sites/sites-create.js';
|
|
26
|
+
import boxen from 'boxen';
|
|
27
|
+
import terminalLink from 'terminal-link';
|
|
28
|
+
const triggerDeploy = async ({ api, options, siteData, siteId, }) => {
|
|
29
|
+
try {
|
|
30
|
+
const siteBuild = await api.createSiteBuild({ siteId });
|
|
31
|
+
if (options.json) {
|
|
32
|
+
logJson({
|
|
33
|
+
site_id: siteId,
|
|
34
|
+
site_name: siteData.name,
|
|
35
|
+
deploy_id: `${siteBuild.deploy_id}`,
|
|
36
|
+
logs: `https://app.netlify.com/projects/${siteData.name}/deploys/${siteBuild.deploy_id}`,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
log(`${NETLIFYDEVLOG} A new deployment was triggered successfully. Visit https://app.netlify.com/projects/${siteData.name}/deploys/${siteBuild.deploy_id} to see the logs.`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (error_) {
|
|
44
|
+
if (error_.status === 404) {
|
|
45
|
+
return logAndThrowError('Project not found. Please rerun "netlify link" and make sure that your project has CI configured.');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return logAndThrowError(error_.message);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
/** Retrieves the folder containing the static files that need to be deployed */
|
|
53
|
+
const getDeployFolder = async ({ command, config, options, site, siteData, }) => {
|
|
54
|
+
let deployFolder;
|
|
55
|
+
// if the `--dir .` flag is provided we should resolve it to the working directory.
|
|
56
|
+
// - in regular sites this is the `process.cwd`
|
|
57
|
+
// - in mono repositories this will be the root of the jsWorkspace
|
|
58
|
+
if (options.dir) {
|
|
59
|
+
deployFolder = command.workspacePackage
|
|
60
|
+
? resolve(command.jsWorkspaceRoot || site.root, options.dir)
|
|
61
|
+
: resolve(command.workingDir, options.dir);
|
|
62
|
+
}
|
|
63
|
+
else if (config?.build?.publish) {
|
|
64
|
+
deployFolder = resolve(site.root, config.build.publish);
|
|
65
|
+
}
|
|
66
|
+
else if (siteData?.build_settings?.dir) {
|
|
67
|
+
deployFolder = resolve(site.root, siteData.build_settings.dir);
|
|
68
|
+
}
|
|
69
|
+
if (!deployFolder) {
|
|
70
|
+
log('Please provide a publish directory (e.g. "public" or "dist" or "."):');
|
|
71
|
+
const { promptPath } = await inquirer.prompt([
|
|
72
|
+
{
|
|
73
|
+
type: 'input',
|
|
74
|
+
name: 'promptPath',
|
|
75
|
+
message: 'Publish directory',
|
|
76
|
+
default: '.',
|
|
77
|
+
filter: (input) => resolve(command.workingDir, input),
|
|
78
|
+
},
|
|
79
|
+
]);
|
|
80
|
+
deployFolder = promptPath;
|
|
81
|
+
}
|
|
82
|
+
return deployFolder;
|
|
83
|
+
};
|
|
84
|
+
const validateDeployFolder = async (deployFolder) => {
|
|
85
|
+
let stats;
|
|
86
|
+
try {
|
|
87
|
+
stats = await stat(deployFolder);
|
|
88
|
+
}
|
|
89
|
+
catch (error_) {
|
|
90
|
+
if (error_ && typeof error_ === 'object' && 'code' in error_) {
|
|
91
|
+
if (error_.code === 'ENOENT') {
|
|
92
|
+
return logAndThrowError(`The deploy directory "${deployFolder}" has not been found. Did you forget to run 'netlify build'?`);
|
|
93
|
+
}
|
|
94
|
+
// Improve the message of permission errors
|
|
95
|
+
if (error_.code === 'EACCES') {
|
|
96
|
+
return logAndThrowError('Permission error when trying to access deploy folder');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
throw error_;
|
|
100
|
+
}
|
|
101
|
+
if (!stats.isDirectory()) {
|
|
102
|
+
return logAndThrowError('Deploy target must be a path to a directory');
|
|
103
|
+
}
|
|
104
|
+
return stats;
|
|
105
|
+
};
|
|
106
|
+
/** get the functions directory */
|
|
107
|
+
const getFunctionsFolder = ({ config, options, site, siteData, workingDir, }) => {
|
|
108
|
+
let functionsFolder;
|
|
109
|
+
// Support "functions" and "Functions"
|
|
110
|
+
const funcConfig = config.functionsDirectory;
|
|
111
|
+
if (options.functions) {
|
|
112
|
+
functionsFolder = resolve(workingDir, options.functions);
|
|
113
|
+
}
|
|
114
|
+
else if (funcConfig) {
|
|
115
|
+
functionsFolder = resolve(site.root, funcConfig);
|
|
116
|
+
}
|
|
117
|
+
else if (siteData?.build_settings?.functions_dir) {
|
|
118
|
+
functionsFolder = resolve(site.root, siteData.build_settings.functions_dir);
|
|
119
|
+
}
|
|
120
|
+
return functionsFolder;
|
|
121
|
+
};
|
|
122
|
+
const validateFunctionsFolder = async (functionsFolder) => {
|
|
123
|
+
let stats;
|
|
124
|
+
if (functionsFolder) {
|
|
125
|
+
// we used to hard error if functions folder is specified but doesn't exist
|
|
126
|
+
// but this was too strict for onboarding. we can just log a warning.
|
|
127
|
+
try {
|
|
128
|
+
stats = await stat(functionsFolder);
|
|
129
|
+
}
|
|
130
|
+
catch (error_) {
|
|
131
|
+
if (error_ && typeof error_ === 'object' && 'code' in error_) {
|
|
132
|
+
if (error_.code === 'ENOENT') {
|
|
133
|
+
log(`Functions folder "${functionsFolder}" specified but it doesn't exist! Will proceed without deploying functions`);
|
|
134
|
+
}
|
|
135
|
+
// Improve the message of permission errors
|
|
136
|
+
if (error_.code === 'EACCES') {
|
|
137
|
+
return logAndThrowError('Permission error when trying to access functions folder');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (stats && !stats.isDirectory()) {
|
|
143
|
+
return logAndThrowError('Functions folder must be a path to a directory');
|
|
144
|
+
}
|
|
145
|
+
return stats;
|
|
146
|
+
};
|
|
147
|
+
const validateFolders = async ({ deployFolder, functionsFolder, }) => {
|
|
148
|
+
const deployFolderStat = await validateDeployFolder(deployFolder);
|
|
149
|
+
const functionsFolderStat = await validateFunctionsFolder(functionsFolder);
|
|
150
|
+
return { deployFolderStat, functionsFolderStat };
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* @param {object} config
|
|
154
|
+
* @param {string} config.deployFolder
|
|
155
|
+
* @param {*} config.site
|
|
156
|
+
* @returns
|
|
157
|
+
*/
|
|
158
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'deployFolder' implicitly has an '... Remove this comment to see the full error message
|
|
159
|
+
const getDeployFilesFilter = ({ deployFolder, site }) => {
|
|
160
|
+
// site.root === deployFolder can happen when users run `netlify deploy --dir .`
|
|
161
|
+
// in that specific case we don't want to publish the repo node_modules
|
|
162
|
+
// when site.root !== deployFolder the behaviour matches our buildbot
|
|
163
|
+
const skipNodeModules = site.root === deployFolder;
|
|
164
|
+
return (filename) => {
|
|
165
|
+
if (filename == null) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
if (filename === deployFolder) {
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
const base = basename(filename);
|
|
172
|
+
const skipFile = (skipNodeModules && base === 'node_modules') ||
|
|
173
|
+
(base.startsWith('.') && base !== '.well-known') ||
|
|
174
|
+
base.startsWith('__MACOSX') ||
|
|
175
|
+
base.includes('/.') ||
|
|
176
|
+
// headers and redirects are bundled in the config
|
|
177
|
+
base === '_redirects' ||
|
|
178
|
+
base === '_headers';
|
|
179
|
+
return !skipFile;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
const SEC_TO_MILLISEC = 1e3;
|
|
183
|
+
// 100 bytes
|
|
184
|
+
const SYNC_FILE_LIMIT = 1e2;
|
|
185
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'api' implicitly has an 'any' type... Remove this comment to see the full error message
|
|
186
|
+
const prepareProductionDeploy = async ({ api, siteData }) => {
|
|
187
|
+
if (isObject(siteData.published_deploy) && siteData.published_deploy.locked) {
|
|
188
|
+
log(`\n${NETLIFYDEVERR} Deployments are "locked" for production context of this project\n`);
|
|
189
|
+
const { unlockChoice } = await inquirer.prompt([
|
|
190
|
+
{
|
|
191
|
+
type: 'confirm',
|
|
192
|
+
name: 'unlockChoice',
|
|
193
|
+
message: 'Would you like to "unlock" deployments for production context to proceed?',
|
|
194
|
+
default: false,
|
|
195
|
+
},
|
|
196
|
+
]);
|
|
197
|
+
if (!unlockChoice)
|
|
198
|
+
exit(0);
|
|
199
|
+
await api.unlockDeploy({ deploy_id: siteData.published_deploy.id });
|
|
200
|
+
log(`\n${NETLIFYDEVLOG} "Auto publishing" has been enabled for production context\n`);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
// @ts-expect-error TS(7006) FIXME: Parameter 'actual' implicitly has an 'any' type.
|
|
204
|
+
const hasErrorMessage = (actual, expected) => {
|
|
205
|
+
if (typeof actual === 'string') {
|
|
206
|
+
return actual.includes(expected);
|
|
207
|
+
}
|
|
208
|
+
return false;
|
|
209
|
+
};
|
|
210
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'error_' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
211
|
+
const reportDeployError = ({ error_, failAndExit }) => {
|
|
212
|
+
switch (true) {
|
|
213
|
+
case error_.name === 'JSONHTTPError': {
|
|
214
|
+
const message = error_?.json?.message ?? '';
|
|
215
|
+
if (hasErrorMessage(message, 'Background Functions not allowed by team plan')) {
|
|
216
|
+
return failAndExit(`\n${BACKGROUND_FUNCTIONS_WARNING}`);
|
|
217
|
+
}
|
|
218
|
+
warn(`JSONHTTPError: ${message} ${error_.status}`);
|
|
219
|
+
warn(`\n${JSON.stringify(error_, null, ' ')}\n`);
|
|
220
|
+
failAndExit(error_);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
case error_.name === 'TextHTTPError': {
|
|
224
|
+
warn(`TextHTTPError: ${error_.status}`);
|
|
225
|
+
warn(`\n${error_}\n`);
|
|
226
|
+
failAndExit(error_);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
case hasErrorMessage(error_.message, 'Invalid filename'): {
|
|
230
|
+
warn(error_.message);
|
|
231
|
+
failAndExit(error_);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
default: {
|
|
235
|
+
warn(`\n${JSON.stringify(error_, null, ' ')}\n`);
|
|
236
|
+
failAndExit(error_);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
const deployProgressCb = function () {
|
|
241
|
+
const spinnersByType = {};
|
|
242
|
+
return (event) => {
|
|
243
|
+
switch (event.phase) {
|
|
244
|
+
case 'start': {
|
|
245
|
+
spinnersByType[event.type] = startSpinner({
|
|
246
|
+
text: event.msg,
|
|
247
|
+
});
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
case 'progress': {
|
|
251
|
+
const spinner = spinnersByType[event.type];
|
|
252
|
+
if (spinner) {
|
|
253
|
+
spinner.update({ text: event.msg });
|
|
254
|
+
}
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
case 'error':
|
|
258
|
+
stopSpinner({ error: true, spinner: spinnersByType[event.type], text: event.msg });
|
|
259
|
+
delete spinnersByType[event.type];
|
|
260
|
+
return;
|
|
261
|
+
case 'stop':
|
|
262
|
+
default: {
|
|
263
|
+
spinnersByType[event.type].success(event.msg);
|
|
264
|
+
delete spinnersByType[event.type];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
const uploadDeployBlobs = async ({ cachedConfig, deployId, options, packagePath, silent, siteId, }) => {
|
|
270
|
+
const statusCb = silent ? () => { } : deployProgressCb();
|
|
271
|
+
statusCb({
|
|
272
|
+
type: 'blobs-uploading',
|
|
273
|
+
msg: 'Uploading blobs to deploy store...\n',
|
|
274
|
+
phase: 'start',
|
|
275
|
+
});
|
|
276
|
+
const [token] = await getToken();
|
|
277
|
+
const blobsToken = token || undefined;
|
|
278
|
+
const { success } = await runCoreSteps(['blobs_upload'], {
|
|
279
|
+
...options,
|
|
280
|
+
// We log our own progress so we don't want this as well. Plus, this logs much of the same
|
|
281
|
+
// information as the build that (likely) came before this as part of the deploy build.
|
|
282
|
+
quiet: options.debug ?? true,
|
|
283
|
+
// @ts-expect-error(serhalp) -- Untyped in `@netlify/build`
|
|
284
|
+
cachedConfig,
|
|
285
|
+
packagePath,
|
|
286
|
+
deployId,
|
|
287
|
+
siteId,
|
|
288
|
+
token: blobsToken,
|
|
289
|
+
});
|
|
290
|
+
if (!success) {
|
|
291
|
+
statusCb({
|
|
292
|
+
type: 'blobs-uploading',
|
|
293
|
+
msg: 'Deploy aborted due to error while uploading blobs to deploy store',
|
|
294
|
+
phase: 'error',
|
|
295
|
+
});
|
|
296
|
+
return logAndThrowError('Error while uploading blobs to deploy store');
|
|
297
|
+
}
|
|
298
|
+
statusCb({
|
|
299
|
+
type: 'blobs-uploading',
|
|
300
|
+
msg: 'Finished uploading blobs to deploy store',
|
|
301
|
+
phase: 'stop',
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
const runDeploy = async ({
|
|
305
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'alias' implicitly has an 'any' ty... Remove this comment to see the full error message
|
|
306
|
+
alias,
|
|
307
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'api' implicitly has an 'any' type... Remove this comment to see the full error message
|
|
308
|
+
api, command,
|
|
309
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'config' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
310
|
+
config,
|
|
311
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'deployFolder' implicitly has an '... Remove this comment to see the full error message
|
|
312
|
+
deployFolder,
|
|
313
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'deployTimeout' implicitly has an ... Remove this comment to see the full error message
|
|
314
|
+
deployTimeout,
|
|
315
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'deployToProduction' implicitly ha... Remove this comment to see the full error message
|
|
316
|
+
deployToProduction,
|
|
317
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'functionsConfig' implicitly has a... Remove this comment to see the full error message
|
|
318
|
+
functionsConfig, functionsFolder,
|
|
319
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'options' implicitly has an 'a... Remove this comment to see the full error message
|
|
320
|
+
options,
|
|
321
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'packagePath' implicitly has an 'a... Remove this comment to see the full error message
|
|
322
|
+
packagePath,
|
|
323
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'silent' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
324
|
+
silent,
|
|
325
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'site' implicitly has an 'any' typ... Remove this comment to see the full error message
|
|
326
|
+
site,
|
|
327
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'siteData' implicitly has an 'any'... Remove this comment to see the full error message
|
|
328
|
+
siteData,
|
|
329
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'siteId' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
330
|
+
siteId,
|
|
331
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'skipFunctionsCache' implicitly ha... Remove this comment to see the full error message
|
|
332
|
+
skipFunctionsCache,
|
|
333
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'title' implicitly has an 'any' ty... Remove this comment to see the full error message
|
|
334
|
+
title, }) => {
|
|
335
|
+
let results;
|
|
336
|
+
let deployId;
|
|
337
|
+
try {
|
|
338
|
+
if (deployToProduction) {
|
|
339
|
+
await prepareProductionDeploy({ siteData, api });
|
|
340
|
+
}
|
|
341
|
+
const draft = !deployToProduction && !alias;
|
|
342
|
+
results = await api.createSiteDeploy({ siteId, title, body: { draft, branch: alias } });
|
|
343
|
+
deployId = results.id;
|
|
344
|
+
const internalFunctionsFolder = await getInternalFunctionsDir({ base: site.root, packagePath, ensureExists: true });
|
|
345
|
+
await command.netlify.frameworksAPIPaths.functions.ensureExists();
|
|
346
|
+
// The order of the directories matter: zip-it-and-ship-it will prioritize
|
|
347
|
+
// functions from the rightmost directories. In this case, we want user
|
|
348
|
+
// functions to take precedence over internal functions.
|
|
349
|
+
const functionDirectories = [
|
|
350
|
+
internalFunctionsFolder,
|
|
351
|
+
command.netlify.frameworksAPIPaths.functions.path,
|
|
352
|
+
functionsFolder,
|
|
353
|
+
].filter((folder) => Boolean(folder));
|
|
354
|
+
const manifestPath = skipFunctionsCache ? null : await getFunctionsManifestPath({ base: site.root, packagePath });
|
|
355
|
+
const redirectsPath = `${deployFolder}/_redirects`;
|
|
356
|
+
const headersPath = `${deployFolder}/_headers`;
|
|
357
|
+
const { redirects } = await parseAllRedirects({
|
|
358
|
+
configRedirects: config.redirects,
|
|
359
|
+
redirectsFiles: [redirectsPath],
|
|
360
|
+
minimal: true,
|
|
361
|
+
});
|
|
362
|
+
config.redirects = redirects;
|
|
363
|
+
const { headers } = await parseAllHeaders({
|
|
364
|
+
configHeaders: config.headers,
|
|
365
|
+
headersFiles: [headersPath],
|
|
366
|
+
minimal: true,
|
|
367
|
+
});
|
|
368
|
+
config.headers = headers;
|
|
369
|
+
await uploadDeployBlobs({
|
|
370
|
+
deployId,
|
|
371
|
+
siteId,
|
|
372
|
+
silent,
|
|
373
|
+
options,
|
|
374
|
+
cachedConfig: command.netlify.cachedConfig,
|
|
375
|
+
packagePath: command.workspacePackage,
|
|
376
|
+
});
|
|
377
|
+
results = await deploySite(command, api, siteId, deployFolder, {
|
|
378
|
+
// @ts-expect-error FIXME
|
|
379
|
+
config,
|
|
380
|
+
fnDir: functionDirectories,
|
|
381
|
+
functionsConfig,
|
|
382
|
+
statusCb: silent ? () => { } : deployProgressCb(),
|
|
383
|
+
deployTimeout,
|
|
384
|
+
syncFileLimit: SYNC_FILE_LIMIT,
|
|
385
|
+
// pass an existing deployId to update
|
|
386
|
+
deployId,
|
|
387
|
+
filter: getDeployFilesFilter({ site, deployFolder }),
|
|
388
|
+
workingDir: command.workingDir,
|
|
389
|
+
manifestPath,
|
|
390
|
+
skipFunctionsCache,
|
|
391
|
+
siteRoot: site.root,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
catch (error_) {
|
|
395
|
+
if (deployId) {
|
|
396
|
+
await cancelDeploy({ api, deployId });
|
|
397
|
+
}
|
|
398
|
+
reportDeployError({ error_, failAndExit: logAndThrowError });
|
|
399
|
+
}
|
|
400
|
+
const siteUrl = results.deploy.ssl_url || results.deploy.url;
|
|
401
|
+
const deployUrl = results.deploy.deploy_ssl_url || results.deploy.deploy_url;
|
|
402
|
+
const logsUrl = `${results.deploy.admin_url}/deploys/${results.deploy.id}`;
|
|
403
|
+
let functionLogsUrl = `${results.deploy.admin_url}/logs/functions`;
|
|
404
|
+
let edgeFunctionLogsUrl = `${results.deploy.admin_url}/logs/edge-functions`;
|
|
405
|
+
if (!deployToProduction) {
|
|
406
|
+
functionLogsUrl += `?scope=deploy:${deployId}`;
|
|
407
|
+
edgeFunctionLogsUrl += `?scope=deployid:${deployId}`;
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
siteId: results.deploy.site_id,
|
|
411
|
+
siteName: results.deploy.name,
|
|
412
|
+
deployId: results.deployId,
|
|
413
|
+
siteUrl,
|
|
414
|
+
deployUrl,
|
|
415
|
+
logsUrl,
|
|
416
|
+
functionLogsUrl,
|
|
417
|
+
edgeFunctionLogsUrl,
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
const handleBuild = async ({ cachedConfig, currentDir, defaultConfig, deployHandler, options, packagePath, }) => {
|
|
421
|
+
if (!options.build) {
|
|
422
|
+
return {};
|
|
423
|
+
}
|
|
424
|
+
const [token] = await getToken();
|
|
425
|
+
const resolvedOptions = await getRunBuildOptions({
|
|
426
|
+
cachedConfig,
|
|
427
|
+
defaultConfig,
|
|
428
|
+
packagePath,
|
|
429
|
+
token,
|
|
430
|
+
options,
|
|
431
|
+
currentDir,
|
|
432
|
+
deployHandler,
|
|
433
|
+
});
|
|
434
|
+
const { configMutations, exitCode, newConfig } = await runBuild(resolvedOptions);
|
|
435
|
+
if (exitCode !== 0) {
|
|
436
|
+
exit(exitCode);
|
|
437
|
+
}
|
|
438
|
+
return { newConfig, configMutations };
|
|
439
|
+
};
|
|
440
|
+
const bundleEdgeFunctions = async (options, command) => {
|
|
441
|
+
const argv = process.argv.slice(2);
|
|
442
|
+
const statusCb = options.silent || argv.includes('--json') || argv.includes('--silent') ? () => { } : deployProgressCb();
|
|
443
|
+
statusCb({
|
|
444
|
+
type: 'edge-functions-bundling',
|
|
445
|
+
msg: 'Bundling edge functions...\n',
|
|
446
|
+
phase: 'start',
|
|
447
|
+
});
|
|
448
|
+
const { severityCode, success } = await runCoreSteps(['edge_functions_bundling'], {
|
|
449
|
+
...options,
|
|
450
|
+
packagePath: command.workspacePackage,
|
|
451
|
+
buffer: true,
|
|
452
|
+
featureFlags: edgeFunctionsFeatureFlags,
|
|
453
|
+
// We log our own progress so we don't want this as well. Plus, this logs much of the same
|
|
454
|
+
// information as the build that (likely) came before this as part of the deploy build.
|
|
455
|
+
quiet: options.debug ?? true,
|
|
456
|
+
// @ts-expect-error FIXME(serhalp): This is missing from the `runCoreSteps` type in @netlify/build
|
|
457
|
+
edgeFunctionsBootstrapURL: await getBootstrapURL(),
|
|
458
|
+
});
|
|
459
|
+
if (!success) {
|
|
460
|
+
statusCb({
|
|
461
|
+
type: 'edge-functions-bundling',
|
|
462
|
+
msg: 'Deploy aborted due to error while bundling edge functions',
|
|
463
|
+
phase: 'error',
|
|
464
|
+
});
|
|
465
|
+
exit(severityCode);
|
|
466
|
+
}
|
|
467
|
+
statusCb({
|
|
468
|
+
type: 'edge-functions-bundling',
|
|
469
|
+
msg: 'Finished bundling edge functions',
|
|
470
|
+
phase: 'stop',
|
|
471
|
+
});
|
|
472
|
+
};
|
|
473
|
+
const printResults = ({ deployToProduction, json, results, runBuildCommand, }) => {
|
|
474
|
+
const msgData = {
|
|
475
|
+
'Build logs': terminalLink(results.logsUrl, results.logsUrl, { fallback: false }),
|
|
476
|
+
'Function logs': terminalLink(results.functionLogsUrl, results.functionLogsUrl, { fallback: false }),
|
|
477
|
+
'Edge function Logs': terminalLink(results.edgeFunctionLogsUrl, results.edgeFunctionLogsUrl, { fallback: false }),
|
|
478
|
+
};
|
|
479
|
+
log('');
|
|
480
|
+
// Note: this is leakily mimicking the @netlify/build heading style
|
|
481
|
+
log(chalk.cyanBright.bold(`🚀 Deploy complete\n${'─'.repeat(64)}`));
|
|
482
|
+
// Json response for piping commands
|
|
483
|
+
if (json) {
|
|
484
|
+
const jsonData = {
|
|
485
|
+
site_id: results.siteId,
|
|
486
|
+
site_name: results.siteName,
|
|
487
|
+
deploy_id: results.deployId,
|
|
488
|
+
deploy_url: results.deployUrl,
|
|
489
|
+
logs: results.logsUrl,
|
|
490
|
+
function_logs: results.functionLogsUrl,
|
|
491
|
+
edge_function_logs: results.edgeFunctionLogsUrl,
|
|
492
|
+
};
|
|
493
|
+
if (deployToProduction) {
|
|
494
|
+
jsonData.url = results.siteUrl;
|
|
495
|
+
}
|
|
496
|
+
logJson(jsonData);
|
|
497
|
+
exit(0);
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
const message = deployToProduction
|
|
501
|
+
? `Deployed to production URL: ${terminalLink(results.siteUrl, results.siteUrl, { fallback: false })}\n
|
|
502
|
+
Unique deploy URL: ${terminalLink(results.deployUrl, results.deployUrl, { fallback: false })}`
|
|
503
|
+
: `Deployed draft to ${terminalLink(results.deployUrl, results.deployUrl, { fallback: false })}`;
|
|
504
|
+
log(boxen(message, {
|
|
505
|
+
padding: 1,
|
|
506
|
+
margin: 1,
|
|
507
|
+
textAlignment: 'center',
|
|
508
|
+
borderStyle: 'round',
|
|
509
|
+
borderColor: NETLIFY_CYAN_HEX,
|
|
510
|
+
// This is an intentional half-width space to work around a unicode padding math bug in boxen
|
|
511
|
+
// eslint-disable-next-line no-irregular-whitespace
|
|
512
|
+
title: `⬥ ${deployToProduction ? 'Production deploy' : 'Draft deploy'} is live ⬥ `,
|
|
513
|
+
titleAlignment: 'center',
|
|
514
|
+
}));
|
|
515
|
+
log(prettyjson.render(msgData));
|
|
516
|
+
if (!deployToProduction) {
|
|
517
|
+
log();
|
|
518
|
+
log('If everything looks good on your draft URL, deploy it to your main project URL with the --prod flag:');
|
|
519
|
+
log(chalk.cyanBright.bold(`netlify deploy${runBuildCommand ? '' : ' --no-build'} --prod`));
|
|
520
|
+
log();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
const prepAndRunDeploy = async ({ api, command, config, deployToProduction, options, site, siteData, siteId, workingDir, }) => {
|
|
525
|
+
const alias = options.alias || options.branch;
|
|
526
|
+
// if a context is passed besides dev, we need to pull env vars from that specific context
|
|
527
|
+
if (options.context && options.context !== 'dev') {
|
|
528
|
+
command.netlify.cachedConfig.env = await getEnvelopeEnv({
|
|
529
|
+
api,
|
|
530
|
+
context: options.context,
|
|
531
|
+
env: command.netlify.cachedConfig.env,
|
|
532
|
+
siteInfo: siteData,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
const deployFolder = await getDeployFolder({ command, options, config, site, siteData });
|
|
536
|
+
const functionsFolder = getFunctionsFolder({ workingDir, options, config, site, siteData });
|
|
537
|
+
const { configPath } = site;
|
|
538
|
+
const edgeFunctionsConfig = command.netlify.config.edge_functions;
|
|
539
|
+
// build flag wasn't used and edge functions exist
|
|
540
|
+
if (!options.build && edgeFunctionsConfig && edgeFunctionsConfig.length !== 0) {
|
|
541
|
+
await bundleEdgeFunctions(options, command);
|
|
542
|
+
}
|
|
543
|
+
log('');
|
|
544
|
+
// Note: this is leakily mimicking the @netlify/build heading style
|
|
545
|
+
log(chalk.cyanBright.bold(`Deploying to Netlify\n${'─'.repeat(64)}`));
|
|
546
|
+
log('');
|
|
547
|
+
log(prettyjson.render({
|
|
548
|
+
'Deploy path': deployFolder,
|
|
549
|
+
'Functions path': functionsFolder,
|
|
550
|
+
'Configuration path': configPath,
|
|
551
|
+
}));
|
|
552
|
+
log();
|
|
553
|
+
const { functionsFolderStat } = await validateFolders({
|
|
554
|
+
deployFolder,
|
|
555
|
+
functionsFolder,
|
|
556
|
+
});
|
|
557
|
+
const siteEnv = await getEnvelopeEnv({
|
|
558
|
+
api,
|
|
559
|
+
context: options.context,
|
|
560
|
+
env: command.netlify.cachedConfig.env,
|
|
561
|
+
raw: true,
|
|
562
|
+
scope: 'functions',
|
|
563
|
+
siteInfo: siteData,
|
|
564
|
+
});
|
|
565
|
+
const functionsConfig = normalizeFunctionsConfig({
|
|
566
|
+
functionsConfig: config.functions,
|
|
567
|
+
projectRoot: site.root,
|
|
568
|
+
siteEnv,
|
|
569
|
+
});
|
|
570
|
+
const results = await runDeploy({
|
|
571
|
+
// @ts-expect-error FIXME
|
|
572
|
+
alias,
|
|
573
|
+
api,
|
|
574
|
+
command,
|
|
575
|
+
config,
|
|
576
|
+
deployFolder,
|
|
577
|
+
deployTimeout: options.timeout ? options.timeout * SEC_TO_MILLISEC : DEFAULT_DEPLOY_TIMEOUT,
|
|
578
|
+
deployToProduction,
|
|
579
|
+
functionsConfig,
|
|
580
|
+
// pass undefined functionsFolder if doesn't exist
|
|
581
|
+
functionsFolder: functionsFolderStat && functionsFolder,
|
|
582
|
+
options,
|
|
583
|
+
packagePath: command.workspacePackage,
|
|
584
|
+
silent: options.json || options.silent,
|
|
585
|
+
site,
|
|
586
|
+
siteData,
|
|
587
|
+
siteId,
|
|
588
|
+
skipFunctionsCache: options.skipFunctionsCache,
|
|
589
|
+
title: options.message,
|
|
590
|
+
});
|
|
591
|
+
return results;
|
|
592
|
+
};
|
|
593
|
+
export const deploy = async (options, command) => {
|
|
594
|
+
const { workingDir } = command;
|
|
595
|
+
const { api, site, siteInfo } = command.netlify;
|
|
596
|
+
const alias = options.alias || options.branch;
|
|
597
|
+
command.setAnalyticsPayload({ open: options.open, prod: options.prod, json: options.json, alias: Boolean(alias) });
|
|
598
|
+
await command.authenticate(options.auth);
|
|
599
|
+
let initialSiteData;
|
|
600
|
+
let newSiteData;
|
|
601
|
+
const hasSiteData = (site.id || options.site) && !isEmpty(siteInfo);
|
|
602
|
+
if (hasSiteData) {
|
|
603
|
+
initialSiteData = siteInfo;
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
log("This folder isn't linked to a project yet");
|
|
607
|
+
const NEW_SITE = '+ Create & configure a new project';
|
|
608
|
+
const EXISTING_SITE = 'Link this directory to an existing project';
|
|
609
|
+
const initializeOpts = [EXISTING_SITE, NEW_SITE];
|
|
610
|
+
const { initChoice } = await inquirer.prompt([
|
|
611
|
+
{
|
|
612
|
+
type: 'list',
|
|
613
|
+
name: 'initChoice',
|
|
614
|
+
message: 'What would you like to do?',
|
|
615
|
+
choices: initializeOpts,
|
|
616
|
+
},
|
|
617
|
+
]);
|
|
618
|
+
// create site or search for one
|
|
619
|
+
switch (initChoice) {
|
|
620
|
+
case NEW_SITE:
|
|
621
|
+
newSiteData = await sitesCreate({}, command);
|
|
622
|
+
site.id = newSiteData.id;
|
|
623
|
+
break;
|
|
624
|
+
case EXISTING_SITE:
|
|
625
|
+
newSiteData = await link({}, command);
|
|
626
|
+
site.id = newSiteData.id;
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
// This is the best I could come up with to make TS happy with the complexities above.
|
|
631
|
+
const siteData = initialSiteData ?? newSiteData;
|
|
632
|
+
const siteId = siteData.id;
|
|
633
|
+
if (options.trigger) {
|
|
634
|
+
return triggerDeploy({ api, options, siteData, siteId });
|
|
635
|
+
}
|
|
636
|
+
const deployToProduction = options.prod || (options.prodIfUnlocked && !(siteData.published_deploy?.locked ?? false));
|
|
637
|
+
let results = {};
|
|
638
|
+
if (options.build) {
|
|
639
|
+
const settings = await detectFrameworkSettings(command, 'build');
|
|
640
|
+
await handleBuild({
|
|
641
|
+
packagePath: command.workspacePackage,
|
|
642
|
+
cachedConfig: command.netlify.cachedConfig,
|
|
643
|
+
defaultConfig: getDefaultConfig(settings),
|
|
644
|
+
currentDir: command.workingDir,
|
|
645
|
+
options,
|
|
646
|
+
deployHandler: async ({ netlifyConfig }) => {
|
|
647
|
+
results = await prepAndRunDeploy({
|
|
648
|
+
command,
|
|
649
|
+
options,
|
|
650
|
+
workingDir,
|
|
651
|
+
api,
|
|
652
|
+
site,
|
|
653
|
+
config: netlifyConfig,
|
|
654
|
+
siteData,
|
|
655
|
+
siteId,
|
|
656
|
+
deployToProduction,
|
|
657
|
+
});
|
|
658
|
+
return { newEnvChanges: { DEPLOY_ID: results.deployId, DEPLOY_URL: results.deployUrl } };
|
|
659
|
+
},
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
results = await prepAndRunDeploy({
|
|
664
|
+
command,
|
|
665
|
+
options,
|
|
666
|
+
workingDir,
|
|
667
|
+
api,
|
|
668
|
+
site,
|
|
669
|
+
config: command.netlify.config,
|
|
670
|
+
siteData,
|
|
671
|
+
siteId,
|
|
672
|
+
deployToProduction,
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
printResults({
|
|
676
|
+
runBuildCommand: options.build,
|
|
677
|
+
json: options.json,
|
|
678
|
+
results,
|
|
679
|
+
deployToProduction,
|
|
680
|
+
});
|
|
681
|
+
if (options.open) {
|
|
682
|
+
const urlToOpen = deployToProduction ? results.siteUrl : results.deployUrl;
|
|
683
|
+
await openBrowser({ url: urlToOpen });
|
|
684
|
+
exit();
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
//# sourceMappingURL=deploy.js.map
|