neon 8.13.2 → 8.15.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/README.md +1 -1
- package/dist/_chunks/{api-GbEaBZJ5.js → api-1MKsfpY3.js} +2 -3
- package/dist/_chunks/{api_keys-CNnnugbQ.js → api_keys-6Xnxl7a8.js} +2 -3
- package/dist/_chunks/{ask-DVwy0eUL.js → ask-Xlek1Pxh.js} +2 -3
- package/dist/_chunks/{auth-CIUtXByB.js → auth-rup6nemJ.js} +44 -8
- package/dist/_chunks/{auth_selection-YX5_KZgD.js → auth_selection-CwGLN9Qz.js} +2 -3
- package/dist/_chunks/{bootstrap-wPZWa1sT.js → bootstrap-BDkvsAVJ.js} +2 -3
- package/dist/_chunks/{branches-BNa1xX1L.js → branches-Bp-5z1lM.js} +2 -3
- package/dist/_chunks/{bucket-BCdryTkD.js → bucket-D06bvDSa.js} +2 -3
- package/dist/_chunks/{checkout-CXIOydqZ.js → checkout-BpOcFaAi.js} +5 -6
- package/dist/_chunks/{claim-DqAvAvDm.js → claim-DlLZmcq0.js} +4 -5
- package/dist/_chunks/{cmd_pipeline-CEk93dGN.js → cmd_pipeline-BDE-TGto.js} +3 -6
- package/dist/_chunks/{config-BH_qRHiG.js → config-BjCm5cfr.js} +59 -8
- package/dist/_chunks/{connection_string-DB4awPzZ.js → connection_string-C9e7N4xk.js} +3 -4
- package/dist/_chunks/{credential_io-BS-0Pmwc.js → credential_io-DbeSh3Pl.js} +6 -9
- package/dist/_chunks/{credentials-BSjE9fRR.js → credentials-BMBNmW0t.js} +2 -3
- package/dist/_chunks/{data_api-Djxj5ZQD.js → data_api-CHDwvMTG.js} +2 -3
- package/dist/_chunks/{databases-Dok4wru7.js → databases-DC2h6IW2.js} +2 -3
- package/dist/_chunks/{deploy-D7B0Xfjg.js → deploy-DmEEhux0.js} +3 -4
- package/dist/_chunks/{dev-CSvxAecE.js → dev-DlUJFzRs.js} +7 -8
- package/dist/_chunks/{diff-DhxxbdQE.js → diff-dnxneH0u.js} +2 -3
- package/dist/_chunks/{docs-CrVybkTP.js → docs-CClmgj_Z.js} +2 -3
- package/dist/_chunks/{env-5HS5qQGd.js → env-BOt9AZ1j.js} +4 -5
- package/dist/_chunks/{env-BNm69Qh8.js → env-CIFMBEon.js} +3 -5
- package/dist/_chunks/{env-BpP3Dqpe.js → env-JgoSsmyt.js} +2 -3
- package/dist/_chunks/{feedback-CMayyTa8.js → feedback-mQmdTRFn.js} +2 -3
- package/dist/_chunks/{functions-Q0zuvtnk.js → functions-3ypiRwZK.js} +2 -3
- package/dist/_chunks/{git-H32TNt6M.js → git-j6xSVo3e.js} +4 -5
- package/dist/_chunks/{init-BkA6RilG.js → init-CcVJb492.js} +3 -4
- package/dist/_chunks/{inspect-g0wekylj.js → inspect-yFAb61qo.js} +2 -3
- package/dist/_chunks/{ip_allow-5lLFvIuE.js → ip_allow-DBdxNEUa.js} +2 -3
- package/dist/_chunks/{link-BgtkOBws.js → link-nAiuWKfg.js} +6 -7
- package/dist/_chunks/{logs-DWkpjzIH.js → logs-BB4uvblR.js} +2 -3
- package/dist/_chunks/{mcp-Bo-7TKc7.js → mcp-BznTRK3w.js} +2 -3
- package/dist/_chunks/{neon_auth-DpF83S24.js → neon_auth-Dw-ucM5Y.js} +102 -28
- package/dist/_chunks/{open-CX3BT3Tp.js → open-T2nI89Oh.js} +2 -3
- package/dist/_chunks/{operations-D4I-AxVs.js → operations-CzaR_uqx.js} +2 -3
- package/dist/_chunks/{orgs-xGfANwHQ.js → orgs-Dpbr-K0A.js} +2 -3
- package/dist/_chunks/{paths-DMq0Lt7a.js → paths-B55ZfOg1.js} +1 -2
- package/dist/_chunks/{plugins-Dj0H6lDA.js → plugins-CKOcBuuP.js} +2 -3
- package/dist/_chunks/{profile-yXOiKk9R.js → profile-BAlM625e.js} +9 -10
- package/dist/_chunks/{profiles-DIB1av2Q.js → profiles-DTazQtjK.js} +4 -6
- package/dist/_chunks/{projects-BwI2Uo0z.js → projects-a3X4OFEJ.js} +2 -3
- package/dist/_chunks/{psql-BM-doe8e.js → psql-Bce4X0NG.js} +3 -4
- package/dist/_chunks/{psql-BNljLda2.js → psql-DwGeP0IV.js} +2 -4
- package/dist/_chunks/{realtime-BRqIyGR-.js → realtime-BwtzYf5a.js} +2 -3
- package/dist/_chunks/{roles-C3M4q9DS.js → roles-Bd9r8_pX.js} +1 -2
- package/dist/_chunks/{roles-B4w3YT_7.js → roles-xRuu0462.js} +2 -3
- package/dist/_chunks/{rolldown-runtime-8H4AJuhK.js → rolldown-runtime-BJohB4LM.js} +1 -2
- package/dist/_chunks/{secure_file-BucZj4yQ.js → secure_file-Caskdohg.js} +1 -2
- package/dist/_chunks/{set_context-DbrwoImy.js → set_context-ompB6d2D.js} +2 -3
- package/dist/_chunks/{skills-BP6pIm7O.js → skills-DKgafm65.js} +2 -3
- package/dist/_chunks/{snapshots-RJBzW8GM.js → snapshots-DxNhjcco.js} +3 -4
- package/dist/_chunks/{status-DV8Z2kw3.js → status-BC4XXuuE.js} +3 -4
- package/dist/_chunks/{triggers-BrRo1z4b.js → triggers-BfvyeJUC.js} +2 -3
- package/dist/_chunks/{user-dlOGXbX9.js → user-D9mC430O.js} +2 -3
- package/dist/_chunks/{vpc_endpoints-CNb0YfMo.js → vpc_endpoints-C-Y4WK2M.js} +3 -4
- package/dist/_shared/auth_selection.js +1 -2
- package/dist/_shared/credentials.js +1 -2
- package/dist/_shared/paths.js +1 -2
- package/dist/_shared/profiles.js +1 -2
- package/dist/_shared/secure_file.js +1 -2
- package/dist/analytics.js +3 -4
- package/dist/anonymous_id.js +2 -3
- package/dist/api.js +3 -4
- package/dist/auth.js +1 -2
- package/dist/auth_context.js +1 -2
- package/dist/auth_recovery.js +3 -4
- package/dist/claimable/api.js +1 -2
- package/dist/claimable/state.js +2 -3
- package/dist/cli.js +1 -2
- package/dist/commands/api.js +1 -1
- package/dist/commands/api_keys.js +1 -1
- package/dist/commands/ask.js +1 -1
- package/dist/commands/ask_sse.js +1 -2
- package/dist/commands/auth.js +1 -1
- package/dist/commands/bootstrap.js +1 -1
- package/dist/commands/branches.js +1 -1
- package/dist/commands/bucket.js +1 -1
- package/dist/commands/checkout.js +1 -1
- package/dist/commands/claim.js +1 -1
- package/dist/commands/config.js +1 -1
- package/dist/commands/connection_string.js +1 -1
- package/dist/commands/credentials.js +1 -1
- package/dist/commands/data_api.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/deploy.js +1 -1
- package/dist/commands/deploy_help.js +1 -2
- package/dist/commands/dev.js +1 -1
- package/dist/commands/diff.js +1 -1
- package/dist/commands/docs.js +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/env_output.js +2 -3
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/functions.js +1 -1
- package/dist/commands/functions_new.js +2 -3
- package/dist/commands/git.js +1 -1
- package/dist/commands/index.js +46 -47
- package/dist/commands/init.js +1 -1
- package/dist/commands/inspect.js +1 -1
- package/dist/commands/ip_allow.js +1 -1
- package/dist/commands/link.js +1 -1
- package/dist/commands/link_output.js +1 -2
- package/dist/commands/logs.js +1 -1
- package/dist/commands/manifest.js +1 -2
- package/dist/commands/mcp.js +1 -1
- package/dist/commands/neon_auth.js +1 -1
- package/dist/commands/open.js +1 -1
- package/dist/commands/operations.js +1 -1
- package/dist/commands/orgs.js +1 -1
- package/dist/commands/plugins.js +1 -1
- package/dist/commands/profile.js +1 -1
- package/dist/commands/projects.js +1 -1
- package/dist/commands/psql.js +1 -1
- package/dist/commands/realtime.js +1 -1
- package/dist/commands/roles.js +1 -1
- package/dist/commands/schema_diff.js +1 -2
- package/dist/commands/set_context.js +1 -1
- package/dist/commands/skills.js +1 -1
- package/dist/commands/snapshots.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/subscribe.js +2 -3
- package/dist/commands/thinking_spinner.js +1 -2
- package/dist/commands/triggers.js +1 -1
- package/dist/commands/user.js +1 -1
- package/dist/commands/vpc_endpoints.js +1 -1
- package/dist/config.js +2 -3
- package/dist/config_edit.js +1 -2
- package/dist/config_format.js +10 -3
- package/dist/config_services.js +1 -2
- package/dist/config_source.js +1 -2
- package/dist/config_template.js +37 -11
- package/dist/context.js +1 -2
- package/dist/credential_io.js +1 -1
- package/dist/current_branch_fast_path.js +1 -2
- package/dist/custom_domains_api.js +1 -2
- package/dist/dev/env.js +1 -1
- package/dist/dev/functions.js +1 -2
- package/dist/dev/inputs.js +1 -2
- package/dist/dev/runtime.js +1 -2
- package/dist/dev/websocket.js +1 -2
- package/dist/env.js +1 -2
- package/dist/env_file.js +1 -2
- package/dist/env_services.js +2 -3
- package/dist/error_reporting.js +80 -160
- package/dist/errors.js +1 -2
- package/dist/functions/registry.js +1 -2
- package/dist/functions/scaffold.js +1 -2
- package/dist/functions/source.js +1 -2
- package/dist/functions_api.js +1 -2
- package/dist/help.js +1 -2
- package/dist/human_table.js +1 -2
- package/dist/index.js +3 -4
- package/dist/init/agents.js +1 -2
- package/dist/init/auth.js +27 -7
- package/dist/init/bootstrap.js +1 -2
- package/dist/init/build_config.js +1 -2
- package/dist/init/cancelled.js +1 -2
- package/dist/init/choices.js +2 -3
- package/dist/init/chrome.js +1 -2
- package/dist/init/copy.js +1 -2
- package/dist/init/detect.js +4 -5
- package/dist/init/detect_host.js +1 -2
- package/dist/init/funnel.js +1 -2
- package/dist/init/link.js +4 -5
- package/dist/init/mode.js +1 -2
- package/dist/init/plan.js +1 -2
- package/dist/init/run.js +30 -9
- package/dist/init/template_title.js +1 -2
- package/dist/init/tooling.js +4 -5
- package/dist/init/wizard.js +2 -3
- package/dist/keyring.js +1 -2
- package/dist/log.js +1 -2
- package/dist/mcp/agents.js +1 -2
- package/dist/mcp/install.js +1 -2
- package/dist/mcp/mint.js +2 -3
- package/dist/mcp/plan.js +1 -2
- package/dist/mcp/targets.js +1 -2
- package/dist/mcp/wizard.js +1 -2
- package/dist/neon_services.js +1 -2
- package/dist/node_version.js +1 -2
- package/dist/notices.js +1 -2
- package/dist/parameters.gen.js +1 -2
- package/dist/pkg.js +1 -2
- package/dist/plugins/plan.js +1 -2
- package/dist/plugins/run.js +1 -2
- package/dist/plugins/targets.js +1 -2
- package/dist/profile_keys.js +1 -2
- package/dist/project.js +1 -2
- package/dist/psql/cli.js +2 -3
- package/dist/psql/command/cmd_cond.js +1 -2
- package/dist/psql/command/cmd_connect.js +1 -2
- package/dist/psql/command/cmd_copy.js +2 -3
- package/dist/psql/command/cmd_describe.js +1 -2
- package/dist/psql/command/cmd_format.js +1 -2
- package/dist/psql/command/cmd_io.js +1 -1
- package/dist/psql/command/cmd_lo.js +1 -2
- package/dist/psql/command/cmd_meta.js +1 -2
- package/dist/psql/command/cmd_misc.js +1 -2
- package/dist/psql/command/cmd_pipeline.js +1 -1
- package/dist/psql/command/cmd_restrict.js +1 -2
- package/dist/psql/command/cmd_show.js +1 -2
- package/dist/psql/command/dispatch.js +2 -3
- package/dist/psql/command/inputQueue.js +1 -2
- package/dist/psql/command/shared.js +1 -2
- package/dist/psql/complete/filenames.js +1 -2
- package/dist/psql/complete/index.js +1 -2
- package/dist/psql/complete/matcher.js +1 -2
- package/dist/psql/complete/psqlVars.js +1 -2
- package/dist/psql/complete/queries.js +1 -2
- package/dist/psql/complete/rules.js +1 -2
- package/dist/psql/core/common.js +1 -1
- package/dist/psql/core/help.js +1 -2
- package/dist/psql/core/mainloop.js +2 -3
- package/dist/psql/core/prompt.js +1 -2
- package/dist/psql/core/settings.js +1 -2
- package/dist/psql/core/sqlHelp.js +1 -2
- package/dist/psql/core/startup.js +1 -1
- package/dist/psql/core/syncVars.js +1 -2
- package/dist/psql/core/variables.js +1 -2
- package/dist/psql/describe/formatters.js +1 -2
- package/dist/psql/describe/processNamePattern.js +1 -2
- package/dist/psql/describe/queries.js +1 -2
- package/dist/psql/describe/versionGate.js +1 -2
- package/dist/psql/index.js +1 -1
- package/dist/psql/io/history.js +1 -2
- package/dist/psql/io/input.js +1 -2
- package/dist/psql/io/lineEditor/buffer.js +1 -2
- package/dist/psql/io/lineEditor/complete.js +1 -2
- package/dist/psql/io/lineEditor/filename.js +1 -2
- package/dist/psql/io/lineEditor/index.js +1 -2
- package/dist/psql/io/lineEditor/keymap.js +1 -2
- package/dist/psql/io/lineEditor/vt100.js +1 -2
- package/dist/psql/io/pgpass.js +1 -2
- package/dist/psql/io/pgservice.js +1 -2
- package/dist/psql/io/psqlrc.js +2 -3
- package/dist/psql/print/aligned.js +1 -2
- package/dist/psql/print/asciidoc.js +1 -2
- package/dist/psql/print/crosstab.js +1 -2
- package/dist/psql/print/csv.js +1 -2
- package/dist/psql/print/html.js +1 -2
- package/dist/psql/print/json.js +1 -2
- package/dist/psql/print/latex.js +1 -2
- package/dist/psql/print/pager.js +1 -2
- package/dist/psql/print/troff.js +1 -2
- package/dist/psql/print/unaligned.js +1 -2
- package/dist/psql/print/units.js +1 -2
- package/dist/psql/scanner/slash.js +1 -2
- package/dist/psql/scanner/sql.js +1 -2
- package/dist/psql/scanner/stringutils.js +1 -2
- package/dist/psql/types/scanner.js +1 -2
- package/dist/psql/wire/connection.js +1 -2
- package/dist/psql/wire/copy.js +1 -2
- package/dist/psql/wire/notify.js +1 -2
- package/dist/psql/wire/pipeline.js +1 -2
- package/dist/psql/wire/protocol.js +1 -2
- package/dist/psql/wire/sasl.js +1 -2
- package/dist/psql/wire/tls.js +1 -2
- package/dist/refresh_lock.js +1 -2
- package/dist/retire_credential.js +2 -3
- package/dist/skills/catalog.js +1 -2
- package/dist/skills/check_worker.js +1 -2
- package/dist/skills/freshness.js +1 -2
- package/dist/skills/plan.js +1 -2
- package/dist/skills/run.js +1 -2
- package/dist/skills/targets.js +1 -2
- package/dist/skills/wizard.js +1 -2
- package/dist/sso_recovery.js +1 -2
- package/dist/storage_api.js +1 -2
- package/dist/test_utils/fixtures.js +1 -2
- package/dist/test_utils/neon_api_server.js +1 -2
- package/dist/test_utils/npm_env.js +1 -2
- package/dist/test_utils/oauth_server.js +1 -2
- package/dist/test_utils/project_dir.js +1 -2
- package/dist/test_utils/registry.js +1 -2
- package/dist/test_utils/rotating_oauth_server.js +1 -2
- package/dist/update_check_worker.js +1 -2
- package/dist/update_notifier.js +1 -2
- package/dist/utils/agent_flag.js +1 -2
- package/dist/utils/agent_picker.js +1 -2
- package/dist/utils/ai_gateway_notice.js +1 -2
- package/dist/utils/api_enums.js +3 -3
- package/dist/utils/auth.js +1 -2
- package/dist/utils/branch_name.js +1 -2
- package/dist/utils/branch_notice.js +1 -2
- package/dist/utils/branch_picker.js +1 -2
- package/dist/utils/cli_name.js +1 -2
- package/dist/utils/compute_units.js +1 -2
- package/dist/utils/config_diff.js +1 -2
- package/dist/utils/enrichers.js +1 -2
- package/dist/utils/esbuild.js +1 -2
- package/dist/utils/flags.js +1 -2
- package/dist/utils/formats.js +1 -2
- package/dist/utils/function_slug.js +1 -2
- package/dist/utils/git.js +1 -2
- package/dist/utils/git_diff.js +1 -2
- package/dist/utils/help_text.js +1 -2
- package/dist/utils/hooks.js +2 -3
- package/dist/utils/inspect_db.js +3 -4
- package/dist/utils/inspect_queries.js +1 -2
- package/dist/utils/json_file.js +1 -2
- package/dist/utils/middlewares.js +2 -3
- package/dist/utils/openapi.js +1 -2
- package/dist/utils/package_manager.js +1 -2
- package/dist/utils/point_in_time.js +1 -2
- package/dist/utils/psql.js +1 -2
- package/dist/utils/repeated_flags.js +1 -2
- package/dist/utils/service_picker.js +2 -3
- package/dist/utils/staging.js +1 -2
- package/dist/utils/string.js +1 -2
- package/dist/utils/ui.js +1 -2
- package/dist/utils/write_sync.js +1 -2
- package/dist/utils/zip.js +1 -2
- package/dist/vendor/postgres-meta/constants.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMeta.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaColumnPrivileges.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaColumns.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaConfig.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaExtensions.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaForeignTables.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaFunctions.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaIndexes.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaMaterializedViews.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaPolicies.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaPublications.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaRelationships.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaRoles.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaSchemas.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaTablePrivileges.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaTables.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaTriggers.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaTypes.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaVersion.js +1 -2
- package/dist/vendor/postgres-meta/lib/PostgresMetaViews.js +1 -2
- package/dist/vendor/postgres-meta/lib/constants.js +1 -2
- package/dist/vendor/postgres-meta/lib/db.js +1 -2
- package/dist/vendor/postgres-meta/lib/generators.js +1 -2
- package/dist/vendor/postgres-meta/lib/helpers.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/column_privileges.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/columns.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/config.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/extensions.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/foreign_tables.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/functions.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/indexes.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/materialized_views.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/policies.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/publications.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/roles.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/schemas.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/table.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/table_privileges.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/table_relationships.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/triggers.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/types.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/version.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/views.sql.js +1 -2
- package/dist/vendor/postgres-meta/lib/sql/views_key_dependencies.sql.js +1 -2
- package/dist/vendor/postgres-meta/templates/typescript.js +1 -2
- package/dist/writer.js +1 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -673,7 +673,7 @@ export default defineConfig({
|
|
|
673
673
|
|
|
674
674
|
### Getting a `neon.ts` (`config init`)
|
|
675
675
|
|
|
676
|
-
`neon config init` scaffolds the policy and installs `@neon/config` / `@neon/env`, so a project can go straight to `plan` / `apply`. It is
|
|
676
|
+
`neon config init` scaffolds the policy and installs `@neon/config` / `@neon/env`, so a project can go straight to `plan` / `apply`. It is local — no auth and no API calls — except `--services data-api`, which reads the linked branch's Data API with a credential already on hand (never a login) so the scaffold declares the right auth. In an interactive terminal it asks which services the policy should declare:
|
|
677
677
|
|
|
678
678
|
```
|
|
679
679
|
? Which Neon services should neon.ts declare? (space to toggle, enter to confirm) ›
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { codeFromBody, isNeonApiError } from "../api.js";
|
|
3
3
|
import { writer } from "../writer.js";
|
|
4
4
|
import { describeOperation, getEndpoints, loadSpec } from "../utils/openapi.js";
|
|
@@ -6,7 +6,7 @@ import { readFileSync } from "node:fs";
|
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
import YAML from "yaml";
|
|
9
|
-
|
|
9
|
+
// src/commands/api.ts
|
|
10
10
|
var api_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
buildBody: () => buildBody,
|
|
12
12
|
buildQuery: () => buildQuery,
|
|
@@ -384,5 +384,4 @@ const handler = async (args) => {
|
|
|
384
384
|
}
|
|
385
385
|
await runRequest(apiArgs);
|
|
386
386
|
};
|
|
387
|
-
//#endregion
|
|
388
387
|
export { colorizeJson as a, handler as c, parseTypedValue as d, setDeep as f, builder as i, parseHeaders as l, buildBody as n, command as o, buildQuery as r, describe as s, api_exports as t, parseKeyValue as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError } from "../api.js";
|
|
4
4
|
import { writer } from "../writer.js";
|
|
5
5
|
import { noPassthrough, single } from "../utils/flags.js";
|
|
6
|
-
|
|
6
|
+
// src/commands/api_keys.ts
|
|
7
7
|
var api_keys_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
aliases: () => aliases,
|
|
9
9
|
builder: () => builder,
|
|
@@ -277,5 +277,4 @@ const orgIdForProject = async (client, projectId, usage = "api-keys") => {
|
|
|
277
277
|
if (!orgId) throw new Error(usage === "mcp" ? `Project ${projectId} does not belong to an organization, so it cannot have a project-scoped API key. Pass --oauth to pin tools without minting, or omit --project-id to mint an account-wide key.` : `Project ${projectId} does not belong to an organization, so it cannot have a project-scoped API key. Omit --project-id to create an account key.`);
|
|
278
278
|
return orgId;
|
|
279
279
|
};
|
|
280
|
-
//#endregion
|
|
281
280
|
export { describe as a, command as i, api_keys_exports as n, handler as o, builder as r, orgIdForProject as s, aliases as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi } from "../env.js";
|
|
3
3
|
import { isNetworkError } from "../errors.js";
|
|
4
4
|
import { writer } from "../writer.js";
|
|
5
5
|
import { noPassthrough, single } from "../utils/flags.js";
|
|
6
6
|
import { isEventStreamContentType, readAskSse } from "../commands/ask_sse.js";
|
|
7
7
|
import { createThinkingSpinner } from "../commands/thinking_spinner.js";
|
|
8
|
-
|
|
8
|
+
// src/commands/ask.ts
|
|
9
9
|
var ask_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
DEFAULT_ASK_URL: () => DEFAULT_ASK_URL,
|
|
11
11
|
builder: () => builder,
|
|
@@ -151,5 +151,4 @@ async function askAssistant(opts) {
|
|
|
151
151
|
}
|
|
152
152
|
return askText(await readJsonBody(response));
|
|
153
153
|
}
|
|
154
|
-
//#endregion
|
|
155
154
|
export { describe as a, command as i, ask_exports as n, handler as o, builder as r, resolveAskUrl as s, DEFAULT_ASK_URL as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { a as OAUTH, i as API_KEY, l as interpretCredentials, s as credentialLabel, t as storeFor } from "./credential_io-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
|
+
import { a as OAUTH, i as API_KEY, l as interpretCredentials, s as credentialLabel, t as storeFor } from "./credential_io-DbeSh3Pl.js";
|
|
3
3
|
import { isCi } from "../env.js";
|
|
4
4
|
import { log } from "../log.js";
|
|
5
5
|
import { withExclusiveLock } from "../refresh_lock.js";
|
|
6
6
|
import { getApiClient, isNeonApiError } from "../api.js";
|
|
7
7
|
import { setAuthContext } from "../auth_context.js";
|
|
8
|
-
import { a as isOwnedCredentialPath } from "./paths-
|
|
8
|
+
import { a as isOwnedCredentialPath } from "./paths-B55ZfOg1.js";
|
|
9
9
|
import { currentContextFile, isAskCommand, isClaimCommand, isConfigAdd, isConfigInit, isCurrentBranchProbe, isDocsCommand, isFeedbackCommand, isFunctionsTemplateCommand, isGitLocalCommand, isInspectDbUrl, isMcpCommand, isMcpOauth, isPluginsCommand, isProfileCommand, isSkillsCommand, isUnfollowedGitHookSync, readContextFile } from "../context.js";
|
|
10
|
-
import { _ as upsertProfile, d as newProfileLocation, g as selectProfileName, h as resolveProfile, i as assertValidProfileName, l as locationForName, m as readProfiles, n as KEYRING_CREDENTIALS, p as profilesUsingPath, r as assertProfilesUsable, s as isKeyringPointer, t as DEFAULT_PROFILE, u as locationOf } from "./profiles-
|
|
10
|
+
import { _ as upsertProfile, d as newProfileLocation, g as selectProfileName, h as resolveProfile, i as assertValidProfileName, l as locationForName, m as readProfiles, n as KEYRING_CREDENTIALS, p as profilesUsingPath, r as assertProfilesUsable, s as isKeyringPointer, t as DEFAULT_PROFILE, u as locationOf } from "./profiles-DTazQtjK.js";
|
|
11
11
|
import { extendTokenSet } from "../utils/auth.js";
|
|
12
12
|
import { AuthRefreshError, auth, classifyRefreshFailure, refreshToken } from "../auth.js";
|
|
13
|
-
import { i as selectCredential, n as displacedProfileWarning, t as credentialInputs } from "./auth_selection-
|
|
13
|
+
import { i as selectCredential, n as displacedProfileWarning, t as credentialInputs } from "./auth_selection-CwGLN9Qz.js";
|
|
14
14
|
import { ClaimableClient, ClaimableServiceError } from "../claimable/api.js";
|
|
15
15
|
import { assertionHasExpired, claimableCredentialsExist, claimableCredentialsPath, readLinkedClaimableCredentials, shouldUseClaimableCredentials } from "../claimable/state.js";
|
|
16
16
|
import { readOutgoingCredential, retirePreviousCredential } from "../retire_credential.js";
|
|
@@ -19,7 +19,7 @@ import { helpEpilogue, helpWidth, wrapHelpText } from "../utils/help_text.js";
|
|
|
19
19
|
import { existsSync } from "node:fs";
|
|
20
20
|
import { join } from "node:path";
|
|
21
21
|
import { createHash } from "node:crypto";
|
|
22
|
-
|
|
22
|
+
// src/commands/auth.ts
|
|
23
23
|
var auth_exports = /* @__PURE__ */ __exportAll({
|
|
24
24
|
aliases: () => aliases,
|
|
25
25
|
authFlow: () => authFlow,
|
|
@@ -28,6 +28,7 @@ var auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
28
28
|
deleteCredentialsAt: () => deleteCredentialsAt,
|
|
29
29
|
describe: () => describe,
|
|
30
30
|
ensureAuth: () => ensureAuth,
|
|
31
|
+
existingApiClient: () => existingApiClient,
|
|
31
32
|
handler: () => handler,
|
|
32
33
|
isAccessTokenUsable: () => isAccessTokenUsable,
|
|
33
34
|
locationForAuth: () => locationForAuth,
|
|
@@ -288,6 +289,42 @@ const usableCredential = async (props, at) => {
|
|
|
288
289
|
return null;
|
|
289
290
|
}
|
|
290
291
|
};
|
|
292
|
+
/**
|
|
293
|
+
* The API client for a credential this invocation already holds — the `--api-key` flag or
|
|
294
|
+
* `NEON_API_KEY`, or the selected profile's stored key or OAuth session, refreshed when
|
|
295
|
+
* expired — along with the key it uses. Never starts a login, so a read that only enriches a
|
|
296
|
+
* local file cannot interrupt it. Null when there is no such credential.
|
|
297
|
+
*
|
|
298
|
+
* Selection follows {@link ensureAuth} exactly; only the fallback differs. `ensureAuth` may
|
|
299
|
+
* log in, and a caller that is only reading a branch to improve a scaffold must not.
|
|
300
|
+
*/
|
|
301
|
+
const existingApiClient = async (props) => {
|
|
302
|
+
const selection = selectCredential({
|
|
303
|
+
...credentialInputs(),
|
|
304
|
+
profileFlag: props.profile
|
|
305
|
+
});
|
|
306
|
+
if (selection.source !== "profile") return {
|
|
307
|
+
apiKey: selection.apiKey,
|
|
308
|
+
apiClient: getApiClient({
|
|
309
|
+
apiKey: selection.apiKey,
|
|
310
|
+
apiHost: props.apiHost
|
|
311
|
+
})
|
|
312
|
+
};
|
|
313
|
+
const usable = await usableCredential({
|
|
314
|
+
configDir: props.configDir,
|
|
315
|
+
apiHost: props.apiHost,
|
|
316
|
+
oauthHost: props.oauthHost ?? process.env.NEON_OAUTH_HOST ?? "https://oauth2.neon.tech",
|
|
317
|
+
clientId: props.clientId ?? "neonctl"
|
|
318
|
+
}, locationForAuth(props.configDir, selection.profile));
|
|
319
|
+
if (usable === null) return null;
|
|
320
|
+
return {
|
|
321
|
+
apiKey: usable.apiKey,
|
|
322
|
+
apiClient: getApiClient({
|
|
323
|
+
apiKey: usable.apiKey,
|
|
324
|
+
apiHost: props.apiHost
|
|
325
|
+
})
|
|
326
|
+
};
|
|
327
|
+
};
|
|
291
328
|
const ensureAuth = async (props) => {
|
|
292
329
|
if (props._.length === 0 || props.help) return;
|
|
293
330
|
if (isCurrentBranchProbe(props)) return;
|
|
@@ -491,5 +528,4 @@ const deleteCredentialsAt = (at, configDir) => {
|
|
|
491
528
|
}
|
|
492
529
|
};
|
|
493
530
|
const md5hash = (s) => createHash("md5").update(s).digest("hex");
|
|
494
|
-
|
|
495
|
-
export { command as a, ensureAuth as c, locationForAuth as d, refreshStoredCredentials as f, builder as i, handler as l, authFlow as n, deleteCredentialsAt as o, usableCredential as p, auth_exports as r, describe as s, aliases as t, isAccessTokenUsable as u };
|
|
531
|
+
export { command as a, ensureAuth as c, isAccessTokenUsable as d, locationForAuth as f, builder as i, existingApiClient as l, usableCredential as m, authFlow as n, deleteCredentialsAt as o, refreshStoredCredentials as p, auth_exports as r, describe as s, aliases as t, handler as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./profiles-
|
|
2
|
-
|
|
1
|
+
import "./profiles-DTazQtjK.js";
|
|
2
|
+
// ../../internals/cli-core/dist/auth_selection.js
|
|
3
3
|
/**
|
|
4
4
|
* # Which credential an invocation authenticates with
|
|
5
5
|
*
|
|
@@ -81,5 +81,4 @@ function nonEmpty(value) {
|
|
|
81
81
|
const trimmed = value.trim();
|
|
82
82
|
return trimmed === "" ? void 0 : trimmed;
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { selectCredential as i, displacedProfileWarning as n, recordCredentialInputs as r, credentialInputs as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi } from "../env.js";
|
|
3
3
|
import { log } from "../log.js";
|
|
4
4
|
import { recordCommandSuccessExtras, recordScaffoldedTemplate } from "../analytics.js";
|
|
@@ -17,7 +17,7 @@ import { runAgentTooling } from "../init/tooling.js";
|
|
|
17
17
|
import { existsSync } from "node:fs";
|
|
18
18
|
import { join, relative, resolve } from "node:path";
|
|
19
19
|
import prompts from "prompts";
|
|
20
|
-
|
|
20
|
+
// src/commands/bootstrap.ts
|
|
21
21
|
var bootstrap_exports = /* @__PURE__ */ __exportAll({
|
|
22
22
|
builder: () => builder,
|
|
23
23
|
command: () => command,
|
|
@@ -495,5 +495,4 @@ const onPromptState = (state) => {
|
|
|
495
495
|
process.exit(1);
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
|
-
//#endregion
|
|
499
498
|
export { handler as a, describe as i, builder as n, command as r, bootstrap_exports as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { retryOnLock } from "../api.js";
|
|
4
4
|
import { contextBranch, readContextFile } from "../context.js";
|
|
@@ -12,7 +12,7 @@ import { psql } from "../utils/psql.js";
|
|
|
12
12
|
import { parsePointInTime } from "../utils/point_in_time.js";
|
|
13
13
|
import { parseSchemaDiffParams, schemaDiff } from "../commands/schema_diff.js";
|
|
14
14
|
import chalk from "chalk";
|
|
15
|
-
|
|
15
|
+
// src/commands/branches.ts
|
|
16
16
|
var branches_exports = /* @__PURE__ */ __exportAll({
|
|
17
17
|
BRANCH_FIELDS: () => BRANCH_FIELDS,
|
|
18
18
|
aliases: () => aliases,
|
|
@@ -456,5 +456,4 @@ const setExpiration = async (props) => {
|
|
|
456
456
|
})
|
|
457
457
|
});
|
|
458
458
|
};
|
|
459
|
-
//#endregion
|
|
460
459
|
export { command as a, builder as i, aliases as n, describe as o, branches_exports as r, handler as s, BRANCH_FIELDS as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError, retryOnLock } from "../api.js";
|
|
4
4
|
import { createProjectBranchBucket, deleteProjectBranchBucket, deleteProjectBranchBucketObject, deleteProjectBranchBucketObjectsByPrefix, getProjectBranchBucketObject, listProjectBranchBucketObjects, listProjectBranchBuckets, presignUpload } from "../storage_api.js";
|
|
@@ -8,7 +8,7 @@ import { createReadStream, createWriteStream } from "node:fs";
|
|
|
8
8
|
import { basename } from "node:path";
|
|
9
9
|
import { stat, unlink } from "node:fs/promises";
|
|
10
10
|
import { pipeline } from "node:stream/promises";
|
|
11
|
-
|
|
11
|
+
// src/commands/bucket.ts
|
|
12
12
|
var bucket_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
aliases: () => aliases,
|
|
14
14
|
builder: () => builder,
|
|
@@ -405,5 +405,4 @@ const deleteObject = async (props) => {
|
|
|
405
405
|
}
|
|
406
406
|
log.info(`Object "${rest}" deleted from bucket "${bucket}" on branch ${branchId}`);
|
|
407
407
|
};
|
|
408
|
-
//#endregion
|
|
409
408
|
export { describe as a, splitBucketTarget as c, command as i, bucket_exports as n, handler as o, builder as r, resolveListDelimiter as s, aliases as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi } from "../env.js";
|
|
3
3
|
import { log } from "../log.js";
|
|
4
4
|
import { isNeonApiError } from "../api.js";
|
|
@@ -11,12 +11,12 @@ import { looksLikeBranchId } from "../utils/formats.js";
|
|
|
11
11
|
import { fillSingleProject, listAllProjectBranches } from "../utils/enrichers.js";
|
|
12
12
|
import { buildCheckoutEvent, readGitContext } from "../utils/git.js";
|
|
13
13
|
import { buildHookBranch, loadHookConfig, resolveHookEnv, runCheckoutAfterHook, runCheckoutBeforeHook, runCreateAfterHook, runCreateBeforeHook } from "../utils/hooks.js";
|
|
14
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
15
|
-
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-
|
|
16
|
-
import { i as handler$1 } from "./link-
|
|
14
|
+
import { n as autoPullEnvAfterPin } from "./env-BOt9AZ1j.js";
|
|
15
|
+
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-BjCm5cfr.js";
|
|
16
|
+
import { i as handler$1 } from "./link-nAiuWKfg.js";
|
|
17
17
|
import chalk from "chalk";
|
|
18
18
|
import prompts from "prompts";
|
|
19
|
-
|
|
19
|
+
// src/commands/checkout.ts
|
|
20
20
|
var checkout_exports = /* @__PURE__ */ __exportAll({
|
|
21
21
|
builder: () => builder,
|
|
22
22
|
command: () => command,
|
|
@@ -344,5 +344,4 @@ const tryAutoDetectProject = async (props) => {
|
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
|
-
//#endregion
|
|
348
347
|
export { formatCheckoutPolicyFailure as a, describe as i, checkout_exports as n, handler as o, command as r, builder as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi } from "../env.js";
|
|
3
3
|
import { log } from "../log.js";
|
|
4
4
|
import { getApiClient } from "../api.js";
|
|
5
5
|
import { applyContext, contextBranch, readContextFile } from "../context.js";
|
|
6
|
-
import { t as credentialInputs } from "./auth_selection-
|
|
6
|
+
import { t as credentialInputs } from "./auth_selection-CwGLN9Qz.js";
|
|
7
7
|
import { ClaimableClient, ClaimableServiceError } from "../claimable/api.js";
|
|
8
8
|
import { assertionHasExpired, listClaimableCredentials, readClaimableCredentials, readLinkedClaimableCredentials, removeClaimableCredentials, writeClaimableCredentials } from "../claimable/state.js";
|
|
9
9
|
import { NEON_SERVICES, deprecatedServiceMessage, parseServices, servicesFlagValue, servicesOption } from "../neon_services.js";
|
|
@@ -12,12 +12,12 @@ import { projectConfigPath } from "../project.js";
|
|
|
12
12
|
import { resolveEnvFilePath } from "../env_file.js";
|
|
13
13
|
import { writer } from "../writer.js";
|
|
14
14
|
import { noPassthrough } from "../utils/flags.js";
|
|
15
|
-
import { c as pull } from "./env-
|
|
15
|
+
import { c as pull } from "./env-BOt9AZ1j.js";
|
|
16
16
|
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
17
|
import open from "open";
|
|
18
18
|
import prompts from "prompts";
|
|
19
19
|
import { loadConfigFromFile } from "@neon/config-runtime";
|
|
20
|
-
|
|
20
|
+
// src/commands/claim.ts
|
|
21
21
|
var claim_exports = /* @__PURE__ */ __exportAll({
|
|
22
22
|
CLAIM_CREATE_FIELDS: () => CLAIM_CREATE_FIELDS,
|
|
23
23
|
CLAIM_LIST_FIELDS: () => CLAIM_LIST_FIELDS,
|
|
@@ -469,5 +469,4 @@ const finishClaimedContext = (props, projectId, contextMatches) => {
|
|
|
469
469
|
}
|
|
470
470
|
log.info("Dropped the local identity assertion. The next command needs `neon login` or `neon link`.");
|
|
471
471
|
};
|
|
472
|
-
//#endregion
|
|
473
472
|
export { claimCreateFields as a, command as c, handler as d, builder as i, create as l, CLAIM_LIST_FIELDS as n, claim_exports as o, aliases as r, claimableCapabilities as s, CLAIM_CREATE_FIELDS as t, describe as u };
|
|
@@ -15,7 +15,7 @@ import { closeSync, createWriteStream, fsyncSync, openSync, promises } from "nod
|
|
|
15
15
|
import * as path from "node:path";
|
|
16
16
|
import { platform } from "node:os";
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
18
|
-
|
|
18
|
+
// src/psql/core/common.ts
|
|
19
19
|
/**
|
|
20
20
|
* psql common — the unified send-query / process-result pipeline.
|
|
21
21
|
*
|
|
@@ -836,8 +836,7 @@ const __testing = {
|
|
|
836
836
|
SAVEPOINT_NAME,
|
|
837
837
|
CURSOR_NAME
|
|
838
838
|
};
|
|
839
|
-
|
|
840
|
-
//#region src/psql/command/cmd_io.ts
|
|
839
|
+
// src/psql/command/cmd_io.ts
|
|
841
840
|
/**
|
|
842
841
|
* psql I/O & control backslash commands.
|
|
843
842
|
*
|
|
@@ -2222,8 +2221,7 @@ const registerIoCommands = (registry) => {
|
|
|
2222
2221
|
registry.register(cmdGexec);
|
|
2223
2222
|
registry.register(cmdWatch);
|
|
2224
2223
|
};
|
|
2225
|
-
|
|
2226
|
-
//#region src/psql/command/cmd_pipeline.ts
|
|
2224
|
+
// src/psql/command/cmd_pipeline.ts
|
|
2227
2225
|
/**
|
|
2228
2226
|
* psql pipeline / extended-query backslash commands (WP-21).
|
|
2229
2227
|
*
|
|
@@ -2816,5 +2814,4 @@ const registerPipelineCommands = (registry) => {
|
|
|
2816
2814
|
registry.register(cmdSendPipeline);
|
|
2817
2815
|
registry.register(cmdGetResults);
|
|
2818
2816
|
};
|
|
2819
|
-
//#endregion
|
|
2820
2817
|
export { cmdPrint as A, psqlExec as B, cmdGdesc as C, cmdInclude as D, cmdGx as E, registerIoCommands as F, writeQueryError as G, renderResultSet as H, __testing as I, captureLastError as L, cmdWrite as M, formatWatchTimestamp as N, cmdIncludeRel as O, getQueryFout as P, executeAndPrint as R, cmdG as S, cmdGset as T, sendQuery as U, refreshErrorVars as V, stripLeadingCommentsAndWS as W, stagedNamedBindPresent as _, cmdFlush as a, WATCH_TEST_CONTROLLER as b, cmdParse as c, cmdSyncPipeline as d, consumeBindState as f, registerPipelineCommands as g, lookupPrepared as h, cmdEndPipeline as i, cmdWatch as j, cmdOut as k, cmdSendPipeline as l, getPipelineState as m, cmdBindNamed as n, cmdFlushRequest as o, dropPrepared as p, cmdClosePrepared as r, cmdGetResults as s, cmdBind as t, cmdStartPipeline as u, stashPrepared as v, cmdGexec as w, clearPipelineGateErrors as x, DEFAULT_WATCH_INTERVAL as y, pickOut$1 as z };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi, isInteractiveTerminal } from "../env.js";
|
|
3
3
|
import { log } from "../log.js";
|
|
4
4
|
import { getApiClient } from "../api.js";
|
|
5
|
+
import { r as defaultDir } from "./paths-B55ZfOg1.js";
|
|
6
|
+
import "../config.js";
|
|
5
7
|
import { contextBranch, ensureDirectoryGitignored, readContextFile } from "../context.js";
|
|
6
8
|
import { getCliName } from "../utils/cli_name.js";
|
|
9
|
+
import { l as existingApiClient } from "./auth-rup6nemJ.js";
|
|
7
10
|
import { NEON_SERVICES, NEON_SERVICE_LABELS, deprecatedServiceMessage, servicesFlagValue, servicesOption } from "../neon_services.js";
|
|
8
|
-
import { FUNCTION_FILENAME, FUNCTION_SLUG, FUNCTION_TEMPLATE, REQUIRED_PACKAGES, parseConfigInitServices, renderFunctionSource, renderNeonConfig, renderNeonConfigFromView } from "../config_template.js";
|
|
11
|
+
import { FUNCTION_FILENAME, FUNCTION_SLUG, FUNCTION_TEMPLATE, REQUIRED_PACKAGES, dataApiChoiceFromView, parseConfigInitServices, renderFunctionSource, renderNeonConfig, renderNeonConfigFromView } from "../config_template.js";
|
|
9
12
|
import { TYPESCRIPT_EXTENSION, asRelativeModulePath, editNeonConfig } from "../config_edit.js";
|
|
10
13
|
import { toNeonConfigView } from "../config_format.js";
|
|
11
14
|
import { declaredNeonServices } from "../config_services.js";
|
|
@@ -23,13 +26,13 @@ import { readGitContext } from "../utils/git.js";
|
|
|
23
26
|
import { resolveHookEnv, runDeployAfterHook, runDeployBeforeHook } from "../utils/hooks.js";
|
|
24
27
|
import { pickServicesInteractively } from "../utils/service_picker.js";
|
|
25
28
|
import { zipBundle } from "../utils/zip.js";
|
|
26
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
29
|
+
import { n as autoPullEnvAfterPin } from "./env-BOt9AZ1j.js";
|
|
27
30
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
28
31
|
import { dirname, join, relative, resolve } from "node:path";
|
|
29
32
|
import chalk from "chalk";
|
|
30
33
|
import { defineConfig, packagesToStage, previewGaWarningForConfig, resolveConfig } from "@neon/config";
|
|
31
34
|
import { PushAbortedError, PushConflictError, apply, assertZipWithinLimits, bundleAsIs, createBranch, describeNativeFinding, enforceLimits, findUndeclaredNativePackages, inspect, isPartialBranchCreateError, plan, resolveEsbuildEntry, traceNativePackages, zipFunctionBundle } from "@neon/config-runtime";
|
|
32
|
-
|
|
35
|
+
// src/commands/config.ts
|
|
33
36
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
34
37
|
ConfigInstallFailed: () => ConfigInstallFailed,
|
|
35
38
|
addCmd: () => addCmd,
|
|
@@ -208,6 +211,53 @@ const seedFromBranch = async (props) => {
|
|
|
208
211
|
branchName: live.branch.name
|
|
209
212
|
};
|
|
210
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* Which `dataApi` entry to scaffold for `data-api`. A linked branch whose Data API already
|
|
216
|
+
* verifies an external IdP gets the external form, so the policy does not go on to enable
|
|
217
|
+
* Neon Auth over it on the first `neon deploy`. The read goes through {@link liveConfigView},
|
|
218
|
+
* the same path as `--from-branch`, so both agree on what the branch has.
|
|
219
|
+
*
|
|
220
|
+
* Anything short of a clear answer — no project to read, no credentials, a failed read, no
|
|
221
|
+
* Data API on the branch — falls back to today's Neon Auth scaffold. The read must never make
|
|
222
|
+
* `init` fail: a user without the Data API loses nothing, and one with it is told how to fix
|
|
223
|
+
* the file by hand.
|
|
224
|
+
*/
|
|
225
|
+
const resolveInitDataApiChoice = async (props) => {
|
|
226
|
+
const { projectId } = props;
|
|
227
|
+
if (!projectId) return { kind: "neon" };
|
|
228
|
+
try {
|
|
229
|
+
const access = props.apiClient ? {
|
|
230
|
+
apiClient: props.apiClient,
|
|
231
|
+
apiKey: props.apiKey
|
|
232
|
+
} : await existingApiClient({
|
|
233
|
+
configDir: props.configDir ?? defaultDir,
|
|
234
|
+
apiHost: props.apiHost ?? "https://console.neon.tech/api/v2",
|
|
235
|
+
...props.profile !== void 0 ? { profile: props.profile } : {},
|
|
236
|
+
...props.oauthHost !== void 0 ? { oauthHost: props.oauthHost } : {},
|
|
237
|
+
...props.clientId !== void 0 ? { clientId: props.clientId } : {}
|
|
238
|
+
});
|
|
239
|
+
if (access === null) {
|
|
240
|
+
log.warning("Not signed in, so the Data API on the linked branch could not be read; declaring it with Neon Auth. If it verifies an external identity provider, set dataApi.authProvider to \"external\" in neon.ts before deploying.");
|
|
241
|
+
return { kind: "neon" };
|
|
242
|
+
}
|
|
243
|
+
const ref = await resolveBranchRef({
|
|
244
|
+
apiClient: access.apiClient,
|
|
245
|
+
projectId,
|
|
246
|
+
...props.branch !== void 0 ? { branch: props.branch } : {}
|
|
247
|
+
});
|
|
248
|
+
const { view } = await liveConfigView({
|
|
249
|
+
projectId,
|
|
250
|
+
branchId: ref.branchId,
|
|
251
|
+
...access.apiKey ? { apiKey: access.apiKey } : {},
|
|
252
|
+
...props.apiHost ? { apiHost: props.apiHost } : {},
|
|
253
|
+
...props.runtimeApi ? { runtimeApi: props.runtimeApi } : {}
|
|
254
|
+
});
|
|
255
|
+
return view.dataApi === void 0 ? { kind: "neon" } : dataApiChoiceFromView(view.dataApi);
|
|
256
|
+
} catch (error) {
|
|
257
|
+
log.warning("Couldn't read the Data API on the linked branch (%s); declaring it with Neon Auth. If it verifies an external identity provider, set dataApi.authProvider to \"external\" in neon.ts before deploying.", error instanceof Error ? error.message : String(error));
|
|
258
|
+
return { kind: "neon" };
|
|
259
|
+
}
|
|
260
|
+
};
|
|
211
261
|
/** The install command to print, prefixed with a `cd` when the project is not the cwd. */
|
|
212
262
|
const installCommandFrom = (dir, pm, missing, options) => {
|
|
213
263
|
const command = formatInstallCommand(pm, [...missing], options);
|
|
@@ -265,7 +315,8 @@ const initCmd = async (props) => {
|
|
|
265
315
|
}
|
|
266
316
|
} else {
|
|
267
317
|
const services = await resolveServices(props);
|
|
268
|
-
|
|
318
|
+
const dataApi = services.includes("data-api") ? await resolveInitDataApiChoice(props) : void 0;
|
|
319
|
+
writeFileSync(join(cwd, "neon.ts"), renderNeonConfig(services, dataApi ? { dataApi } : {}));
|
|
269
320
|
if (!props.silent) {
|
|
270
321
|
if (services.length === 0) log.info("Created neon.ts with a starter policy.");
|
|
271
322
|
else {
|
|
@@ -273,6 +324,7 @@ const initCmd = async (props) => {
|
|
|
273
324
|
log.info("Created neon.ts declaring %s.", declared.join(", "));
|
|
274
325
|
}
|
|
275
326
|
}
|
|
327
|
+
if (dataApi?.kind === "external") log.info("The branch's Data API verifies an external identity provider%s, so neon.ts declares it with authProvider \"external\" and does not enable Neon Auth.", dataApi.providerName ? ` (${dataApi.providerName})` : "");
|
|
276
328
|
if (services.includes("functions")) scaffoldFunction(cwd);
|
|
277
329
|
}
|
|
278
330
|
await ensureConfigPackages(cwd, props);
|
|
@@ -445,7 +497,7 @@ const builder = (argv) => argv.usage("$0 config <sub-command> [options]").option
|
|
|
445
497
|
}), (args) => applyCmd(args)).command("add", "Add a service, function, or bucket to neon.ts (creates it if missing)", (yargs) => yargs.command("auth", "Enable Neon Auth (auth: true)", addSharedOptions, (args) => addCmd(addProps(args, {
|
|
446
498
|
kind: "service",
|
|
447
499
|
service: "auth"
|
|
448
|
-
}))).command("data-api", "Enable the Data API (dataApi: true) and Neon Auth, which the default provider requires", addSharedOptions, (args) => addCmd(addProps(args, {
|
|
500
|
+
}))).command("data-api", "Enable the Data API (dataApi: true) and Neon Auth, which the default provider requires. For an external identity provider, set dataApi.authProvider to \"external\" instead", addSharedOptions, (args) => addCmd(addProps(args, {
|
|
449
501
|
kind: "service",
|
|
450
502
|
service: "data-api"
|
|
451
503
|
}))).command("ai-gateway", "Enable the AI Gateway (aiGateway: true)", addSharedOptions, (args) => addCmd(addProps(args, {
|
|
@@ -502,7 +554,7 @@ const builder = (argv) => argv.usage("$0 config <sub-command> [options]").option
|
|
|
502
554
|
also: "postgres alone writes the starter policy; every branch has Postgres. Omitted: pick interactively on a terminal, starter policy in CI or without a TTY."
|
|
503
555
|
}),
|
|
504
556
|
"from-branch": {
|
|
505
|
-
describe: "Seed neon.ts from a branch's live Neon state instead of asking. Uses the branch pinned in .neon, or --branch <name|id>, or the project's default branch.
|
|
557
|
+
describe: "Seed neon.ts from a branch's live Neon state instead of asking. Uses the branch pinned in .neon, or --branch <name|id>, or the project's default branch. Needs credentials and a project.",
|
|
506
558
|
type: "boolean",
|
|
507
559
|
conflicts: "services"
|
|
508
560
|
}
|
|
@@ -1109,5 +1161,4 @@ const createBranchFromPolicyOnCheckout = async (props) => {
|
|
|
1109
1161
|
throw err;
|
|
1110
1162
|
}
|
|
1111
1163
|
};
|
|
1112
|
-
//#endregion
|
|
1113
1164
|
export { missingDependencies as _, applyPolicyOnCreate as a, config_exports as c, ensureConfigPackages as d, envFlag as f, installCommandFrom as g, initCmd as h, applyFlags as i, createBranchFromPolicyOnCheckout as l, handler as m, addCmd as n, builder as o, envPullFlag as p, applyCmd as r, command as s, ConfigInstallFailed as t, describe as u, planCmd as v, status as y };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { n as defaultConnectionRole } from "./roles-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
|
+
import { n as defaultConnectionRole } from "./roles-Bd9r8_pX.js";
|
|
3
3
|
import { writer } from "../writer.js";
|
|
4
4
|
import { EndpointType } from "../utils/api_enums.js";
|
|
5
5
|
import { branchIdFromProps, fillSingleProject } from "../utils/enrichers.js";
|
|
6
6
|
import { psql } from "../utils/psql.js";
|
|
7
7
|
import { parsePITBranch } from "../utils/point_in_time.js";
|
|
8
|
-
|
|
8
|
+
// src/commands/connection_string.ts
|
|
9
9
|
var connection_string_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
SSL_MODES: () => SSL_MODES,
|
|
11
11
|
aliases: () => aliases,
|
|
@@ -150,5 +150,4 @@ const handler = async (props) => {
|
|
|
150
150
|
] });
|
|
151
151
|
else process.stdout.write(connectionString.toString() + "\n");
|
|
152
152
|
};
|
|
153
|
-
//#endregion
|
|
154
153
|
export { connection_string_exports as a, command as i, aliases as n, describe as o, builder as r, handler as s, SSL_MODES as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as writeSecretFile } from "./secure_file-
|
|
2
|
-
import { a as isOwnedCredentialPath } from "./paths-
|
|
3
|
-
import { f as profilesFilePath, v as CRED_STORAGE_FILE, y as CRED_STORAGE_KEYRING } from "./profiles-
|
|
1
|
+
import { t as writeSecretFile } from "./secure_file-Caskdohg.js";
|
|
2
|
+
import { a as isOwnedCredentialPath } from "./paths-B55ZfOg1.js";
|
|
3
|
+
import { f as profilesFilePath, v as CRED_STORAGE_FILE, y as CRED_STORAGE_KEYRING } from "./profiles-DTazQtjK.js";
|
|
4
4
|
import { tryLoadKeyring } from "../keyring.js";
|
|
5
5
|
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
6
6
|
import { dirname } from "node:path";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
|
-
|
|
8
|
+
// ../../internals/cli-core/dist/credentials.js
|
|
9
9
|
/**
|
|
10
10
|
* # Stored credentials — one file per account, two kinds
|
|
11
11
|
*
|
|
@@ -188,8 +188,7 @@ const isSameCredential = (existingKey, replacementKey) => {
|
|
|
188
188
|
const trimmed = existingKey.trim();
|
|
189
189
|
return trimmed !== "" && trimmed === replacementKey.trim();
|
|
190
190
|
};
|
|
191
|
-
|
|
192
|
-
//#region ../../internals/cli-core/dist/credential_store.js
|
|
191
|
+
// ../../internals/cli-core/dist/credential_store.js
|
|
193
192
|
const KEYRING_SERVICE = "com.neon.neon-cli";
|
|
194
193
|
/** Hashing the resolved profiles directory isolates config roots while keeping profile names visible. */
|
|
195
194
|
const keyringAccount = (configDir, profile) => `cli:${createHash("sha256").update(dirname(profilesFilePath(configDir))).digest("hex")}:${profile}`;
|
|
@@ -411,8 +410,6 @@ const createCredentialStore = (dir, options = {}) => {
|
|
|
411
410
|
assertKeyringWritable
|
|
412
411
|
};
|
|
413
412
|
};
|
|
414
|
-
|
|
415
|
-
//#region src/credential_io.ts
|
|
413
|
+
// src/credential_io.ts
|
|
416
414
|
const storeFor = (dir) => createCredentialStore(dir, { keyring: tryLoadKeyring() });
|
|
417
|
-
//#endregion
|
|
418
415
|
export { OAUTH as a, describeScope as c, scopeOf as d, API_KEY as i, interpretCredentials as l, KEYRING_SERVICE as n, apiKeyCredentials as o, keyringAccount as r, credentialLabel as s, storeFor as t, isSameCredential as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError, messageFromBody, retryOnLock } from "../api.js";
|
|
4
4
|
import { writer } from "../writer.js";
|
|
5
5
|
import { branchIdFromProps, fillSingleProject } from "../utils/enrichers.js";
|
|
6
|
-
|
|
6
|
+
// src/commands/credentials.ts
|
|
7
7
|
var credentials_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
aliases: () => aliases,
|
|
9
9
|
builder: () => builder,
|
|
@@ -142,5 +142,4 @@ const revoke = async (props) => {
|
|
|
142
142
|
await withCredentialNotFound(props.tokenId, branchId, () => retryOnLock(() => props.apiClient.revokeCredential(props.projectId, branchId, props.tokenId)));
|
|
143
143
|
log.info(`Credential ${props.tokenId} revoked`);
|
|
144
144
|
};
|
|
145
|
-
//#endregion
|
|
146
145
|
export { credentials_exports as a, list as c, rotate as d, create as i, reveal as l, builder as n, describe as o, command as r, handler as s, aliases as t, revoke as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError, retryOnLock } from "../api.js";
|
|
4
4
|
import { getCliName } from "../utils/cli_name.js";
|
|
5
5
|
import { writer } from "../writer.js";
|
|
6
6
|
import { branchIdFromProps, fillSingleProject, resolveSingleDatabase } from "../utils/enrichers.js";
|
|
7
|
-
|
|
7
|
+
// src/commands/data_api.ts
|
|
8
8
|
var data_api_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
builder: () => builder,
|
|
10
10
|
command: () => command,
|
|
@@ -259,5 +259,4 @@ const deleteDataApi = async (props) => {
|
|
|
259
259
|
}
|
|
260
260
|
log.info(`Data API deleted for ${database} on branch ${branchId}`);
|
|
261
261
|
};
|
|
262
|
-
//#endregion
|
|
263
262
|
export { handler as a, describe as i, command as n, data_api_exports as r, builder as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { retryOnLock } from "../api.js";
|
|
3
3
|
import { writer } from "../writer.js";
|
|
4
4
|
import { fillSingleProject, resolveBranchFromProps } from "../utils/enrichers.js";
|
|
5
|
-
|
|
5
|
+
// src/commands/databases.ts
|
|
6
6
|
var databases_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
DATABASE_FIELDS: () => DATABASE_FIELDS,
|
|
8
8
|
aliases: () => aliases,
|
|
@@ -80,5 +80,4 @@ const deleteDb = async (props) => {
|
|
|
80
80
|
humanTitle: `Database deleted from ${branch?.name ?? branchId}`
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
|
-
//#endregion
|
|
84
83
|
export { create as a, describe as c, command as i, handler as l, aliases as n, databases_exports as o, builder as r, deleteDb as s, DATABASE_FIELDS as t, list as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { fillSingleProject } from "../utils/enrichers.js";
|
|
3
|
-
import { f as envFlag, i as applyFlags, p as envPullFlag, r as applyCmd } from "./config-
|
|
3
|
+
import { f as envFlag, i as applyFlags, p as envPullFlag, r as applyCmd } from "./config-BjCm5cfr.js";
|
|
4
4
|
import { DEPLOY_COMMANDS_EPILOGUE } from "../commands/deploy_help.js";
|
|
5
|
-
|
|
5
|
+
// src/commands/deploy.ts
|
|
6
6
|
var deploy_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
builder: () => builder,
|
|
8
8
|
command: () => command,
|
|
@@ -29,5 +29,4 @@ const builder = (argv) => argv.usage("$0 deploy [options]").options({
|
|
|
29
29
|
...envPullFlag
|
|
30
30
|
}).middleware(fillSingleProject).epilogue(DEPLOY_COMMANDS_EPILOGUE).strict();
|
|
31
31
|
const handler = (props) => applyCmd(props);
|
|
32
|
-
//#endregion
|
|
33
32
|
export { handler as a, describe as i, command as n, deploy_exports as r, builder as t };
|