neon 8.13.2 → 8.14.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/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-DPSDYYtG.js} +6 -7
- 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-C6VMMgY6.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-7SIE_C5O.js} +3 -4
- 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-DmKZcAnR.js} +3 -4
- package/dist/_chunks/{dev-CSvxAecE.js → dev-Dv0HKcFF.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-Dxw9w9dK.js} +4 -5
- package/dist/_chunks/{init-BkA6RilG.js → init-BOOGv-mD.js} +2 -3
- 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-CcwTXRny.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-H0d7gFrX.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-DS_yUXFo.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 +1 -2
- 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 +1 -2
- package/dist/config_services.js +1 -2
- package/dist/config_source.js +1 -2
- package/dist/config_template.js +1 -2
- 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 +5 -6
- 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 +5 -6
- package/dist/init/template_title.js +1 -2
- package/dist/init/tooling.js +4 -5
- package/dist/init/wizard.js +1 -2
- 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 +1 -2
- 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 +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
|
-
|
|
4
|
+
// src/test_utils/npm_env.ts
|
|
5
5
|
const isNpmEnvKey = (key) => {
|
|
6
6
|
const lower = key.toLowerCase();
|
|
7
7
|
return lower.startsWith("npm_config_") || lower === "node_auth_token" || lower === "npm_token";
|
|
@@ -22,5 +22,4 @@ const npmEnvForIsolatedHome = () => {
|
|
|
22
22
|
}
|
|
23
23
|
return env;
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { npmEnvForIsolatedHome };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
2
|
import { OAuth2Server } from "oauth2-mock-server";
|
|
3
|
-
|
|
3
|
+
// src/test_utils/oauth_server.ts
|
|
4
4
|
const startOauthServer = async () => {
|
|
5
5
|
const server = new OAuth2Server();
|
|
6
6
|
await server.issuer.keys.generate("RS256");
|
|
@@ -8,5 +8,4 @@ const startOauthServer = async () => {
|
|
|
8
8
|
log.debug("Started OAuth server on port %d", server.address().port);
|
|
9
9
|
return server;
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { startOauthServer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
|
-
|
|
4
|
+
// src/test_utils/project_dir.ts
|
|
5
5
|
/** The lockfile each package manager is recognised by. */
|
|
6
6
|
const LOCKFILE = {
|
|
7
7
|
npm: "package-lock.json",
|
|
@@ -29,5 +29,4 @@ const makeProjectDir = (pm) => {
|
|
|
29
29
|
})
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { makeProjectDir };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { createServer } from "node:http";
|
|
3
|
-
|
|
3
|
+
// src/test_utils/rotating_oauth_server.ts
|
|
4
4
|
const startRotatingOauthServer = async (options = {}) => {
|
|
5
5
|
const lifetime = options.accessTokenLifetimeSeconds ?? 3600;
|
|
6
6
|
const liveRefreshTokens = /* @__PURE__ */ new Set();
|
|
@@ -90,5 +90,4 @@ const readBody = (req, next) => {
|
|
|
90
90
|
const closeServer = (server) => new Promise((resolve, reject) => {
|
|
91
91
|
server.close((err) => err ? reject(err) : resolve());
|
|
92
92
|
});
|
|
93
|
-
//#endregion
|
|
94
93
|
export { startRotatingOauthServer };
|
|
@@ -2,7 +2,7 @@ import { recordLatestVersion } from "./update_notifier.js";
|
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { execFile } from "node:child_process";
|
|
5
|
-
|
|
5
|
+
// src/update_check_worker.ts
|
|
6
6
|
const execFileAsync = promisify(execFile);
|
|
7
7
|
const LOOKUP_TIMEOUT_MS = 5e3;
|
|
8
8
|
const npmViewInvocation = (platform) => ({
|
|
@@ -43,5 +43,4 @@ const run = async () => {
|
|
|
43
43
|
};
|
|
44
44
|
const entry = process.argv[1];
|
|
45
45
|
if (entry !== void 0 && import.meta.url === pathToFileURL(entry).href) run();
|
|
46
|
-
//#endregion
|
|
47
46
|
export { npmViewInvocation };
|
package/dist/update_notifier.js
CHANGED
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import which from "which";
|
|
11
11
|
import semver from "semver";
|
|
12
|
-
|
|
12
|
+
// src/update_notifier.ts
|
|
13
13
|
const DAY_MS = 864e5;
|
|
14
14
|
const CHECK_INTERVAL_MS = DAY_MS;
|
|
15
15
|
const UPDATE_NOTICE_INTERVAL_MS = 3 * DAY_MS;
|
|
@@ -217,5 +217,4 @@ const recordLatestVersion = (cachePath, source, latestVersion) => {
|
|
|
217
217
|
latestVersion
|
|
218
218
|
});
|
|
219
219
|
};
|
|
220
|
-
//#endregion
|
|
221
220
|
export { cacheForUpdateSource, findCliInstalls, formatDuplicateInstallNotice, formatUpdateNotice, notifyIfUpdateAvailable, parseUpdateCheckCache, recordLatestVersion, shouldRefreshUpdateCheck, shouldRunSkillsNotifier, shouldRunUpdateNotifier, spawnUpdateWorkerProcess, writeUpdateCheckCache };
|
package/dist/utils/agent_flag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/agent_flag.ts
|
|
2
2
|
const coerceAgentFlag = (value) => {
|
|
3
3
|
if (value === void 0) return [];
|
|
4
4
|
const list = Array.isArray(value) ? value : [value];
|
|
@@ -9,5 +9,4 @@ const coerceAgentFlag = (value) => {
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
const agentArgv = (agents) => agents.flatMap((id) => ["--agent", id]);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { agentArgv, coerceAgentFlag };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isInteractiveTerminal } from "../env.js";
|
|
2
2
|
import { getAgentDisplayName, resolveAddMcpAgentId, uniqueAgentIds } from "../mcp/agents.js";
|
|
3
3
|
import prompts from "prompts";
|
|
4
|
-
|
|
4
|
+
// src/utils/agent_picker.ts
|
|
5
5
|
var AgentSelectionSkipped = class extends Error {};
|
|
6
6
|
const canPickAgentsInteractively = () => isInteractiveTerminal();
|
|
7
7
|
const restoreCursorOnAbort = (exit) => (state) => {
|
|
@@ -92,5 +92,4 @@ const agentIdInChoices = (value, choices) => {
|
|
|
92
92
|
if (typeof value !== "string") return;
|
|
93
93
|
for (const choice of choices) if (choice.id === value) return choice.id;
|
|
94
94
|
};
|
|
95
|
-
//#endregion
|
|
96
95
|
export { AgentSelectionSkipped, agentChoicesFrom, canPickAgentsInteractively, pickAgentsInteractively, resolveAgentSelection, skippableAgentPicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
|
-
|
|
2
|
+
// src/utils/ai_gateway_notice.ts
|
|
3
3
|
/**
|
|
4
4
|
* Friendly guidance shown when a branch enables the AI Gateway (`aiGateway`).
|
|
5
5
|
*
|
|
@@ -146,5 +146,4 @@ const warnAiGateway = async (params) => {
|
|
|
146
146
|
if (notice) log.warning(notice.message);
|
|
147
147
|
} catch {}
|
|
148
148
|
};
|
|
149
|
-
//#endregion
|
|
150
149
|
export { aiGatewayModelsUrl, aiGatewayUpgradeUrl, assertAiGatewayProvisionable, buildAiGatewayNotice, extractEnabledModelIds, fetchGatewayModelIds, freePlanBlockMessage, hasFlagshipModels, isFreePlan, warnAiGateway };
|
package/dist/utils/api_enums.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/api_enums.ts
|
|
2
2
|
const EndpointType = {
|
|
3
3
|
ReadOnly: "read_only",
|
|
4
4
|
ReadWrite: "read_write"
|
|
@@ -7,7 +7,8 @@ const NeonAuthOauthProviderId = {
|
|
|
7
7
|
Google: "google",
|
|
8
8
|
Github: "github",
|
|
9
9
|
Microsoft: "microsoft",
|
|
10
|
-
Vercel: "vercel"
|
|
10
|
+
Vercel: "vercel",
|
|
11
|
+
Apple: "apple"
|
|
11
12
|
};
|
|
12
13
|
const NeonAuthOauthProviderType = {
|
|
13
14
|
Standard: "standard",
|
|
@@ -22,5 +23,4 @@ const NeonAuthEmailVerificationMethod = {
|
|
|
22
23
|
Link: "link",
|
|
23
24
|
Otp: "otp"
|
|
24
25
|
};
|
|
25
|
-
//#endregion
|
|
26
26
|
export { EndpointType, NeonAuthEmailVerificationMethod, NeonAuthOauthProviderId, NeonAuthOauthProviderType, NeonAuthSupportedAuthProvider };
|
package/dist/utils/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/auth.ts
|
|
2
2
|
const extendTokenSet = (tokenSet) => {
|
|
3
3
|
const exp = /* @__PURE__ */ new Date();
|
|
4
4
|
exp.setSeconds(exp.getSeconds() + (tokenSet.expires_in ?? 0));
|
|
@@ -7,5 +7,4 @@ const extendTokenSet = (tokenSet) => {
|
|
|
7
7
|
expires_at: exp.getTime()
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { extendTokenSet };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/branch_name.ts
|
|
2
2
|
const MAX_LENGTH = 256;
|
|
3
3
|
const FALLBACK_NAME = "branch";
|
|
4
4
|
/** Reduce one path segment to `[a-z0-9-]`, collapsing other runs to `-` and trimming `-`. */
|
|
@@ -25,5 +25,4 @@ const neonSafeBranchName = (gitBranch) => {
|
|
|
25
25
|
}
|
|
26
26
|
return name;
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { neonSafeBranchName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
|
|
3
|
+
// src/utils/branch_notice.ts
|
|
4
4
|
/**
|
|
5
5
|
* Print a one-line "this command is targeting <branch>" notice to **stderr** so
|
|
6
6
|
* the user can sanity-check they're acting on the branch they think they are —
|
|
@@ -19,5 +19,4 @@ const announceTargetBranch = (props, branch, verb) => {
|
|
|
19
19
|
const suffix = branch.usedDefault ? chalk.dim(" · project default") : "";
|
|
20
20
|
log.info("%s %s %s %s%s", chalk.dim("→"), verb, chalk.cyan.bold(branch.branchName), chalk.dim(`(${branch.branchId})`), suffix);
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { announceTargetBranch };
|
|
@@ -3,7 +3,7 @@ import { log } from "../log.js";
|
|
|
3
3
|
import { retryOnLock } from "../api.js";
|
|
4
4
|
import { EndpointType } from "./api_enums.js";
|
|
5
5
|
import prompts from "prompts";
|
|
6
|
-
|
|
6
|
+
// src/utils/branch_picker.ts
|
|
7
7
|
/** Sentinel `value` for the "create a new branch" choice (no branch id can collide). */
|
|
8
8
|
const CREATE_BRANCH_CHOICE = Symbol("create-branch");
|
|
9
9
|
/**
|
|
@@ -93,5 +93,4 @@ const createBranch = async (apiClient, projectId, name, branches) => {
|
|
|
93
93
|
log.info("Created branch %s (%s).", data.branch.name, data.branch.id);
|
|
94
94
|
return data.branch.id;
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { createBranch, pickBranchInteractively, promptNewBranchName };
|
package/dist/utils/cli_name.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { basename } from "node:path";
|
|
2
|
-
|
|
2
|
+
// src/utils/cli_name.ts
|
|
3
3
|
/** Command hints must use the invoked binary so users can run them verbatim. */
|
|
4
4
|
const getCliName = () => basename(process.argv[1] ?? "") === "neonctl" ? "neonctl" : "neon";
|
|
5
|
-
//#endregion
|
|
6
5
|
export { getCliName };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/compute_units.ts
|
|
2
2
|
const getComputeUnits = (autoscaling) => {
|
|
3
3
|
const fixedSizeAutoscaling = Number(autoscaling);
|
|
4
4
|
if (!isNaN(fixedSizeAutoscaling)) return {
|
|
@@ -17,5 +17,4 @@ const getComputeUnits = (autoscaling) => {
|
|
|
17
17
|
autoscaling_limit_max_cu: maxAutoscaling
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { getComputeUnits };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
|
|
2
|
+
// src/utils/config_diff.ts
|
|
3
3
|
const UNSET = "(unset)";
|
|
4
4
|
/**
|
|
5
5
|
* Shared palette for the config diff, matching `neon diff`'s `git diff` styling
|
|
@@ -163,5 +163,4 @@ const renderCustomDomainFollowup = (result, opts) => {
|
|
|
163
163
|
}
|
|
164
164
|
return lines.join("\n");
|
|
165
165
|
};
|
|
166
|
-
//#endregion
|
|
167
166
|
export { renderAppliedChanges, renderBranchSettingConflicts, renderCustomDomainFollowup };
|
package/dist/utils/enrichers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNeonApiError, messageFromBody } from "../api.js";
|
|
2
2
|
import { isConfigAdd, isConfigInit, isCurrentBranchProbe, isFunctionsTemplateCommand } from "../context.js";
|
|
3
3
|
import { looksLikeBranchId } from "./formats.js";
|
|
4
|
-
|
|
4
|
+
// src/utils/enrichers.ts
|
|
5
5
|
const BRANCHES_LIST_LIMIT = 100;
|
|
6
6
|
/**
|
|
7
7
|
* Branch list pages cap at 100. A name stored in `.neon` can live on a later
|
|
@@ -163,5 +163,4 @@ const fillSingleOrg = async (props) => {
|
|
|
163
163
|
orgId: data.organizations[0].id
|
|
164
164
|
};
|
|
165
165
|
};
|
|
166
|
-
//#endregion
|
|
167
166
|
export { branchIdFromProps, branchIdResolve, fillSingleOrg, fillSingleProject, listAllProjectBranches, listAllProjectBranchesWithAnnotations, resolveBranchFromProps, resolveBranchRef, resolveSingleDatabase };
|
package/dist/utils/esbuild.js
CHANGED
|
@@ -4,7 +4,7 @@ import { basename, join } from "node:path";
|
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import which from "which";
|
|
7
|
-
|
|
7
|
+
// src/utils/esbuild.ts
|
|
8
8
|
const notFoundMessage = () => {
|
|
9
9
|
const install = globalInstallCommand(resolveInvokingPackageManager(), "esbuild");
|
|
10
10
|
const how = install ? `install esbuild and ensure it is on your PATH (e.g. \`${install.command} ${install.args.join(" ")}\`), or ` : "put an esbuild binary on your PATH, or ";
|
|
@@ -147,5 +147,4 @@ const bundleEntry = async (source, options = {}) => {
|
|
|
147
147
|
throw err;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
//#endregion
|
|
151
150
|
export { bundleEntry };
|
package/dist/utils/flags.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/flags.ts
|
|
2
2
|
/**
|
|
3
3
|
* Strict readers for flags whose value decides how much a credential can reach.
|
|
4
4
|
*
|
|
@@ -36,5 +36,4 @@ const noPassthrough = (command) => (argv) => {
|
|
|
36
36
|
if (Array.isArray(rest) && rest.length > 0) throw new Error(`${command} takes no arguments after \`--\`, and options placed there are ignored rather than applied. Remove the \`--\`.`);
|
|
37
37
|
return true;
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { noPassthrough, single };
|
package/dist/utils/formats.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/formats.ts
|
|
2
2
|
const HAIKU_REGEX = /^[a-z0-9]+-[a-z0-9]+-[a-z0-9]+$/;
|
|
3
3
|
const looksLikeBranchId = (branch) => branch.startsWith("br-") && HAIKU_REGEX.test(branch.substring(3));
|
|
4
4
|
const looksLikeSnapshotId = (snapshot) => snapshot.startsWith("snap-") && HAIKU_REGEX.test(snapshot.substring(5));
|
|
@@ -14,5 +14,4 @@ const looksLikeTimestamp = (timestamp) => {
|
|
|
14
14
|
if (isNaN(Date.parse(timestamp))) return false;
|
|
15
15
|
return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?([+-]\d{2}:\d{2}|Z)$/.test(timestamp);
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { looksLikeBranchId, looksLikeLSN, looksLikeSnapshotId, looksLikeTimestamp, toIso };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/function_slug.ts
|
|
2
2
|
/** The rule the platform enforces on function slugs, so a bad one fails before any write. */
|
|
3
3
|
const FUNCTION_SLUG_PATTERN = /^[a-z0-9]{1,20}$/;
|
|
4
4
|
const FUNCTION_SLUG_HELP = "Use 1-20 lowercase letters and digits (no hyphens or other characters).";
|
|
5
5
|
const deriveFunctionSlug = (value) => value.toLowerCase().replace(/[^a-z0-9]/g, "").slice(0, 20);
|
|
6
|
-
//#endregion
|
|
7
6
|
export { FUNCTION_SLUG_HELP, FUNCTION_SLUG_PATTERN, deriveFunctionSlug };
|
package/dist/utils/git.js
CHANGED
|
@@ -3,7 +3,7 @@ import { neonSafeBranchName } from "./branch_name.js";
|
|
|
3
3
|
import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, resolve } from "node:path";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
|
-
|
|
6
|
+
// src/utils/git.ts
|
|
7
7
|
/**
|
|
8
8
|
* Env var the installed `post-checkout` hook sets before invoking `neon git sync`, so the
|
|
9
9
|
* CLI can tell a hook-triggered run from a manual `neon checkout` / `deploy`. Read by
|
|
@@ -216,5 +216,4 @@ const removePostCheckoutHook = (repoRoot) => {
|
|
|
216
216
|
log.debug("Removed managed post-checkout hook at %s", hookPath);
|
|
217
217
|
return "removed";
|
|
218
218
|
};
|
|
219
|
-
//#endregion
|
|
220
219
|
export { GIT_HOOK_ENV_FLAG, buildCheckoutEvent, currentGitBranch, gitPull, gitRepoRoot, hasUpstream, installPostCheckoutHook, isGitRepo, isManagedHook, localGitBranches, postCheckoutHookPath, readGitContext, removePostCheckoutHook };
|
package/dist/utils/git_diff.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { structuredPatch } from "diff";
|
|
3
|
-
|
|
3
|
+
// src/utils/git_diff.ts
|
|
4
4
|
/**
|
|
5
5
|
* Color palette for the rendered diff. When `color` is false every entry is the
|
|
6
6
|
* identity function, so the exact same layout is emitted without ANSI codes
|
|
@@ -75,5 +75,4 @@ const renderSchemaDiffReport = (diffs, opts) => {
|
|
|
75
75
|
changedDatabases: changed.map((r) => r.database)
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
-
//#endregion
|
|
79
78
|
export { renderDatabaseSchemaDiff, renderSchemaDiffReport };
|
package/dist/utils/help_text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseColumns } from "../human_table.js";
|
|
2
|
-
|
|
2
|
+
// src/utils/help_text.ts
|
|
3
3
|
const HELP_WRAP = 78;
|
|
4
4
|
const WRAP_INDENT = " ";
|
|
5
5
|
const helpWidth = () => {
|
|
@@ -53,5 +53,4 @@ const globalOptionsTrailer = (usage) => {
|
|
|
53
53
|
const cli = usage.trim().split(/\s+/)[0];
|
|
54
54
|
return `Global options: see ${cli === "" ? "neon" : cli} --help`;
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { HELP_WRAP, globalOptionsTrailer, helpCsv, helpEpilogue, helpWidth, wrapHelpText };
|
package/dist/utils/hooks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
2
|
import { loadProjectConfig } from "../project.js";
|
|
3
|
-
import { s as fetchEnvKeys } from "../_chunks/env-
|
|
3
|
+
import { s as fetchEnvKeys } from "../_chunks/env-JgoSsmyt.js";
|
|
4
4
|
import { runHook } from "@neon/config-runtime";
|
|
5
|
-
|
|
5
|
+
// src/utils/hooks.ts
|
|
6
6
|
/**
|
|
7
7
|
* Load the nearest `neon.ts` for hook discovery, or `undefined` when there is none — or when
|
|
8
8
|
* it fails to load. Deliberately best-effort: `checkout` on an *existing* branch must keep
|
|
@@ -230,5 +230,4 @@ const buildHookBranch = async (args) => {
|
|
|
230
230
|
...branch.expires_at ? { expiresAt: branch.expires_at } : {}
|
|
231
231
|
};
|
|
232
232
|
};
|
|
233
|
-
//#endregion
|
|
234
233
|
export { buildHookBranch, loadHookConfig, resolveHookEnv, runCheckoutAfterHook, runCheckoutBeforeHook, runCreateAfterHook, runCreateBeforeHook, runDeployAfterHook, runDeployBeforeHook, shapeHookEnv };
|
package/dist/utils/inspect_db.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as defaultConnectionRole } from "../_chunks/roles-
|
|
1
|
+
import { n as defaultConnectionRole } from "../_chunks/roles-Bd9r8_pX.js";
|
|
2
2
|
import { EndpointType } from "./api_enums.js";
|
|
3
3
|
import { branchIdFromProps } from "./enrichers.js";
|
|
4
4
|
import { parsePITBranch } from "./point_in_time.js";
|
|
5
5
|
import { PgConnection } from "../psql/wire/connection.js";
|
|
6
|
-
import { o as parseConnectionUri } from "../_chunks/psql-
|
|
7
|
-
|
|
6
|
+
import { o as parseConnectionUri } from "../_chunks/psql-DwGeP0IV.js";
|
|
7
|
+
// src/utils/inspect_db.ts
|
|
8
8
|
const SSL_MODES = [
|
|
9
9
|
"require",
|
|
10
10
|
"verify-ca",
|
|
@@ -223,5 +223,4 @@ const runInspectQuery = async (connectionUri, sql, options = {}) => {
|
|
|
223
223
|
await connection.close();
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
//#endregion
|
|
227
226
|
export { SSL_MODES, connectionUriForDatabase, formatInspectQueryError, resolveConnectionUri, resolveInspectTargets, runInspectQuery, selectInspectTargets };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/inspect_queries.ts
|
|
2
2
|
const INSPECT_QUERIES = {
|
|
3
3
|
"table-sizes": {
|
|
4
4
|
describe: "Size of each table (including TOAST), largest first (pg_table_size)",
|
|
@@ -478,5 +478,4 @@ const INSPECT_QUERIES = {
|
|
|
478
478
|
`
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
-
//#endregion
|
|
482
481
|
export { INSPECT_QUERIES };
|
package/dist/utils/json_file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
2
|
import { renameSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
|
|
3
|
+
// src/utils/json_file.ts
|
|
4
4
|
/** Renames a temporary file into place so a concurrent reader never sees a partial write. */
|
|
5
5
|
const writeJsonFile = (path, value, description) => {
|
|
6
6
|
const temporaryPath = `${path}.${process.pid}.tmp`;
|
|
@@ -16,5 +16,4 @@ const writeJsonFile = (path, value, description) => {
|
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { writeJsonFile };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as recordCredentialInputs } from "../_chunks/auth_selection-
|
|
2
|
-
|
|
1
|
+
import { r as recordCredentialInputs } from "../_chunks/auth_selection-CwGLN9Qz.js";
|
|
2
|
+
// src/utils/middlewares.ts
|
|
3
3
|
/**
|
|
4
4
|
* Forwarding Yargs's default would turn ambient configuration into an explicit child override.
|
|
5
5
|
*/
|
|
@@ -48,5 +48,4 @@ const fillInArgs = (args, currentArgs = args, acc = []) => {
|
|
|
48
48
|
else if (acc.length > 0) args[acc.join(".") + "." + k] = v;
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { fillInArgs, resolveApiKeyFromEnv };
|
package/dist/utils/openapi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { log } from "../log.js";
|
|
2
2
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
-
|
|
4
|
+
// src/utils/openapi.ts
|
|
5
5
|
/** Public URL of the released Neon OpenAPI v2 spec. */
|
|
6
6
|
const DEFAULT_SPEC_URL = "https://neon.com/api_spec/release/v2.json";
|
|
7
7
|
const CACHE_FILE = "openapi-spec.json";
|
|
@@ -456,5 +456,4 @@ function describeOperation(spec, path, method) {
|
|
|
456
456
|
fields
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
//#endregion
|
|
460
459
|
export { DEFAULT_SPEC_URL, describeOperation, getEndpoints, loadSpec };
|
|
@@ -3,7 +3,7 @@ import { existsSync, realpathSync } from "node:fs";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import which from "which";
|
|
6
|
-
|
|
6
|
+
// src/utils/package_manager.ts
|
|
7
7
|
/**
|
|
8
8
|
* Package manager detection and install helpers for the Neon CLI.
|
|
9
9
|
*
|
|
@@ -344,5 +344,4 @@ const runCommand = (cmd, args, cwd, env) => new Promise((resolvePromise) => {
|
|
|
344
344
|
resolvePromise(code === 0);
|
|
345
345
|
});
|
|
346
346
|
});
|
|
347
|
-
//#endregion
|
|
348
347
|
export { DO_NOT_SUBSTITUTE_HINT, MISSING_BINARY_HINT, commandEnv, detectCliInstallMethod, detectInvokingPackageManager, detectProjectPackageManager, formatExecCommand, formatInstallCommand, globalInstallCommand, inferPackageManager, installArgs, installedPackageManagers, recommendedCliUpgradeCommand, resolveInvokingPackageManager, resolvePackageManager, runCommand };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { looksLikeLSN, looksLikeTimestamp } from "./formats.js";
|
|
2
2
|
import { branchIdResolve } from "./enrichers.js";
|
|
3
|
-
|
|
3
|
+
// src/utils/point_in_time.ts
|
|
4
4
|
var PointInTimeParseError = class extends Error {
|
|
5
5
|
constructor(message) {
|
|
6
6
|
super(message);
|
|
@@ -48,5 +48,4 @@ const parsePointInTime = async ({ pointInTime, targetBranchId, projectId, api, b
|
|
|
48
48
|
branchId
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { PointInTimeParseError, parsePITBranch, parsePointInTime };
|
package/dist/utils/psql.js
CHANGED
|
@@ -2,7 +2,7 @@ import { log } from "../log.js";
|
|
|
2
2
|
import { closeAnalytics, trackEvent } from "../analytics.js";
|
|
3
3
|
import which from "which";
|
|
4
4
|
import { spawn } from "child_process";
|
|
5
|
-
|
|
5
|
+
// src/utils/psql.ts
|
|
6
6
|
const FALLBACK_ENV = "NEONCTL_PSQL_FALLBACK";
|
|
7
7
|
/** Cap on the analytics flush, counted from when psql launches. */
|
|
8
8
|
const ANALYTICS_FLUSH_TIMEOUT_MS = 3e3;
|
|
@@ -100,5 +100,4 @@ const psql = async (connection_uri, args = [], opts = {}) => {
|
|
|
100
100
|
await flushed;
|
|
101
101
|
process.exit(code);
|
|
102
102
|
};
|
|
103
|
-
//#endregion
|
|
104
103
|
export { connectionSummary, psql };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/repeated_flags.ts
|
|
2
2
|
const isStringArray = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
3
3
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
4
|
/** The options yargs has declared for the command it is running. Not in `@types/yargs`. */
|
|
@@ -39,5 +39,4 @@ const collapseRepeatedFlags = (argv, options) => {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { collapseRepeatedFlags, declaredOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONFIG_INIT_SERVICES } from "../config_template.js";
|
|
2
2
|
import prompts from "prompts";
|
|
3
|
-
|
|
3
|
+
// src/utils/service_picker.ts
|
|
4
4
|
/**
|
|
5
5
|
* Re-select Postgres after each render. `prompts` lets space unselect a selected
|
|
6
6
|
* row even when `disabled` is set, and `disabled` also strikethroughs the title.
|
|
@@ -88,5 +88,4 @@ const pickServicesInteractively = async () => {
|
|
|
88
88
|
if (!Array.isArray(services)) throw new Error("Aborted: no services selected.");
|
|
89
89
|
return CONFIG_INIT_SERVICES.filter((service) => services.includes(service));
|
|
90
90
|
};
|
|
91
|
-
//#endregion
|
|
92
91
|
export { POSTGRES_SERVICE_CHOICE, keepPostgresSelected, pickServicesInteractively };
|
package/dist/utils/staging.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Parser, hideBin } from "yargs/helpers";
|
|
2
|
-
|
|
2
|
+
// src/utils/staging.ts
|
|
3
3
|
/**
|
|
4
4
|
* Staging-only features ship in a release before their API reaches production. The CLI
|
|
5
5
|
* exposes them only when the API host it sends requests to (`--api-host`, else
|
|
@@ -32,5 +32,4 @@ var StagingOnlyError = class extends Error {
|
|
|
32
32
|
this.name = "StagingOnlyError";
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { STAGING_API_HOST, StagingOnlyError, isStagingApiHost, stagingFeaturesEnabled, stagingFeaturesEnabledForArgv };
|
package/dist/utils/string.js
CHANGED
package/dist/utils/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/ui.ts
|
|
2
2
|
const consumeNextMatching = (lines, matcher) => {
|
|
3
3
|
while (lines.length > 0) {
|
|
4
4
|
const line = lines.shift().trim();
|
|
@@ -38,5 +38,4 @@ const drawPointer = (width) => {
|
|
|
38
38
|
result.push(">");
|
|
39
39
|
return result.join("");
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { consumeBlockIfMatches, consumeNextMatching, drawPointer, splitColumns };
|
package/dist/utils/write_sync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writeSync } from "node:fs";
|
|
2
|
-
|
|
2
|
+
// src/utils/write_sync.ts
|
|
3
3
|
/**
|
|
4
4
|
* Write `text` to a file descriptor and do not return until all of it is out.
|
|
5
5
|
*
|
|
@@ -26,5 +26,4 @@ function writeAllSync(fd, text) {
|
|
|
26
26
|
/** File descriptors, named so call sites read as the stream they mean. */
|
|
27
27
|
const STDOUT_FD = 1;
|
|
28
28
|
const STDERR_FD = 2;
|
|
29
|
-
//#endregion
|
|
30
29
|
export { STDERR_FD, STDOUT_FD, writeAllSync };
|
package/dist/utils/zip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/constants.ts
|
|
2
2
|
const GENERATE_TYPES_DEFAULT_SCHEMA = process.env.PG_META_GENERATE_TYPES_DEFAULT_SCHEMA || "public";
|
|
3
3
|
const VALID_UNNAMED_FUNCTION_ARG_TYPES = /* @__PURE__ */ new Set([
|
|
4
4
|
114,
|
|
@@ -10,5 +10,4 @@ const VALID_FUNCTION_ARGS_MODE = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"inout",
|
|
11
11
|
"variadic"
|
|
12
12
|
]);
|
|
13
|
-
//#endregion
|
|
14
13
|
export { GENERATE_TYPES_DEFAULT_SCHEMA, VALID_FUNCTION_ARGS_MODE, VALID_UNNAMED_FUNCTION_ARG_TYPES };
|
|
@@ -18,7 +18,7 @@ import PostgresMetaTypes from "./PostgresMetaTypes.js";
|
|
|
18
18
|
import PostgresMetaVersion from "./PostgresMetaVersion.js";
|
|
19
19
|
import PostgresMetaViews from "./PostgresMetaViews.js";
|
|
20
20
|
import { init } from "./db.js";
|
|
21
|
-
|
|
21
|
+
// src/vendor/postgres-meta/lib/PostgresMeta.ts
|
|
22
22
|
var PostgresMeta = class {
|
|
23
23
|
constructor(config) {
|
|
24
24
|
const { query, end } = init(config);
|
|
@@ -45,5 +45,4 @@ var PostgresMeta = class {
|
|
|
45
45
|
this.views = new PostgresMetaViews(this.query);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { PostgresMeta as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { COLUMN_PRIVILEGES_SQL } from "./sql/column_privileges.sql.js";
|
|
4
4
|
import { ident, literal } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaColumnPrivileges.ts
|
|
6
6
|
var PostgresMetaColumnPrivileges = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -81,5 +81,4 @@ end $$;
|
|
|
81
81
|
return await this.query(sql);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { PostgresMetaColumnPrivileges as default };
|