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/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 };
|
|
@@ -3,7 +3,7 @@ import { filterByList, filterByValue } from "./helpers.js";
|
|
|
3
3
|
import { COLUMNS_SQL } from "./sql/columns.sql.js";
|
|
4
4
|
import PostgresMetaTables from "./PostgresMetaTables.js";
|
|
5
5
|
import { ident, literal } from "pg-format";
|
|
6
|
-
|
|
6
|
+
// src/vendor/postgres-meta/lib/PostgresMetaColumns.ts
|
|
7
7
|
var PostgresMetaColumns = class {
|
|
8
8
|
constructor(query) {
|
|
9
9
|
this.query = query;
|
|
@@ -231,5 +231,4 @@ COMMIT;`;
|
|
|
231
231
|
const typeIdent = (type) => {
|
|
232
232
|
return type.endsWith("[]") ? `${ident(type.slice(0, -2))}[]` : type.includes(".") ? type : ident(type);
|
|
233
233
|
};
|
|
234
|
-
//#endregion
|
|
235
234
|
export { PostgresMetaColumns as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CONFIG_SQL } from "./sql/config.sql.js";
|
|
2
|
-
|
|
2
|
+
// src/vendor/postgres-meta/lib/PostgresMetaConfig.ts
|
|
3
3
|
var PostgresMetaConfig = class {
|
|
4
4
|
constructor(query) {
|
|
5
5
|
this.query = query;
|
|
@@ -12,5 +12,4 @@ var PostgresMetaConfig = class {
|
|
|
12
12
|
return await this.query(sql);
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { PostgresMetaConfig as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterByValue } from "./helpers.js";
|
|
2
2
|
import { EXTENSIONS_SQL } from "./sql/extensions.sql.js";
|
|
3
3
|
import { ident, literal } from "pg-format";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaExtensions.ts
|
|
5
5
|
var PostgresMetaExtensions = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -75,5 +75,4 @@ CREATE EXTENSION ${ident(name)}
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
//#endregion
|
|
79
78
|
export { PostgresMetaExtensions as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { coalesceRowsToArray, filterByList, filterByValue } from "./helpers.js";
|
|
2
2
|
import { COLUMNS_SQL } from "./sql/columns.sql.js";
|
|
3
3
|
import { FOREIGN_TABLES_SQL } from "./sql/foreign_tables.sql.js";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaForeignTables.ts
|
|
5
5
|
var PostgresMetaForeignTables = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -77,5 +77,4 @@ select
|
|
|
77
77
|
*
|
|
78
78
|
${includeColumns ? `, ${coalesceRowsToArray("columns", "columns.table_id = foreign_tables.id")}` : ""}
|
|
79
79
|
from foreign_tables`;
|
|
80
|
-
//#endregion
|
|
81
80
|
export { PostgresMetaForeignTables as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { FUNCTIONS_SQL } from "./sql/functions.sql.js";
|
|
4
4
|
import { ident, literal } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaFunctions.ts
|
|
6
6
|
var PostgresMetaFunctions = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -169,5 +169,4 @@ var PostgresMetaFunctions = class {
|
|
|
169
169
|
`;
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
//#endregion
|
|
173
172
|
export { PostgresMetaFunctions as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { INDEXES_SQL } from "./sql/indexes.sql.js";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaIndexes.ts
|
|
5
5
|
var PostgresMetaIndexes = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -38,5 +38,4 @@ var PostgresMetaIndexes = class {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { PostgresMetaIndexes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { coalesceRowsToArray, filterByList, filterByValue } from "./helpers.js";
|
|
2
2
|
import { COLUMNS_SQL } from "./sql/columns.sql.js";
|
|
3
3
|
import { MATERIALIZED_VIEWS_SQL } from "./sql/materialized_views.sql.js";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaMaterializedViews.ts
|
|
5
5
|
var PostgresMetaMaterializedViews = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -80,5 +80,4 @@ select
|
|
|
80
80
|
*
|
|
81
81
|
${includeColumns ? `, ${coalesceRowsToArray("columns", "columns.table_id = materialized_views.id")}` : ""}
|
|
82
82
|
from materialized_views`;
|
|
83
|
-
//#endregion
|
|
84
83
|
export { PostgresMetaMaterializedViews as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { POLICIES_SQL } from "./sql/policies.sql.js";
|
|
4
4
|
import { ident } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaPolicies.ts
|
|
6
6
|
var PostgresMetaPolicies = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -116,5 +116,4 @@ CREATE POLICY ${ident(name)} ON ${ident(schema)}.${ident(table)}
|
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
//#endregion
|
|
120
119
|
export { PostgresMetaPolicies as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterByValue } from "./helpers.js";
|
|
2
2
|
import { PUBLICATIONS_SQL } from "./sql/publications.sql.js";
|
|
3
3
|
import { ident, literal } from "pg-format";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaPublications.ts
|
|
5
5
|
var PostgresMetaPublications = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -189,5 +189,4 @@ with publications as (${PUBLICATIONS_SQL({})}) select * from publications where
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
//#endregion
|
|
193
192
|
export { PostgresMetaPublications as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList } from "./helpers.js";
|
|
3
3
|
import { TABLE_RELATIONSHIPS_SQL } from "./sql/table_relationships.sql.js";
|
|
4
4
|
import { VIEWS_KEY_DEPENDENCIES_SQL } from "./sql/views_key_dependencies.sql.js";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaRelationships.ts
|
|
6
6
|
var PostgresMetaRelationships = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -83,5 +83,4 @@ var PostgresMetaRelationships = class {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
//#endregion
|
|
87
86
|
export { PostgresMetaRelationships as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterByValue } from "./helpers.js";
|
|
2
2
|
import { ROLES_SQL } from "./sql/roles.sql.js";
|
|
3
3
|
import { ident, literal } from "pg-format";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaRoles.ts
|
|
5
5
|
function changeRoleConfig2Object(config) {
|
|
6
6
|
if (!config) return null;
|
|
7
7
|
return config.reduce((acc, cur) => {
|
|
@@ -199,5 +199,4 @@ COMMIT;`;
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
//#endregion
|
|
203
202
|
export { changeRoleConfig2Object, PostgresMetaRoles as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { SCHEMAS_SQL } from "./sql/schemas.sql.js";
|
|
4
4
|
import { ident } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaSchemas.ts
|
|
6
6
|
var PostgresMetaSchemas = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -101,5 +101,4 @@ var PostgresMetaSchemas = class {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
//#endregion
|
|
105
104
|
export { PostgresMetaSchemas as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { TABLE_PRIVILEGES_SQL } from "./sql/table_privileges.sql.js";
|
|
4
4
|
import { ident } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaTablePrivileges.ts
|
|
6
6
|
var PostgresMetaTablePrivileges = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -87,5 +87,4 @@ end $$;
|
|
|
87
87
|
return await this.query(sql);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { PostgresMetaTablePrivileges as default };
|
|
@@ -3,7 +3,7 @@ import { coalesceRowsToArray, filterByList, filterByValue } from "./helpers.js";
|
|
|
3
3
|
import { TABLES_SQL } from "./sql/table.sql.js";
|
|
4
4
|
import { COLUMNS_SQL } from "./sql/columns.sql.js";
|
|
5
5
|
import { ident, literal } from "pg-format";
|
|
6
|
-
|
|
6
|
+
// src/vendor/postgres-meta/lib/PostgresMetaTables.ts
|
|
7
7
|
var PostgresMetaTables = class {
|
|
8
8
|
constructor(query) {
|
|
9
9
|
this.query = query;
|
|
@@ -179,5 +179,4 @@ select
|
|
|
179
179
|
*
|
|
180
180
|
${includeColumns ? `, ${coalesceRowsToArray("columns", "columns.table_id = tables.id")}` : ""}
|
|
181
181
|
from tables`;
|
|
182
|
-
//#endregion
|
|
183
182
|
export { PostgresMetaTables as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { TRIGGERS_SQL } from "./sql/triggers.sql.js";
|
|
4
4
|
import { ident, literal } from "pg-format";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaTriggers.ts
|
|
6
6
|
var PostgresMetaTriggers = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -152,5 +152,4 @@ var PostgresMetaTriggers = class {
|
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
//#endregion
|
|
156
155
|
export { PostgresMetaTriggers as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
2
2
|
import { filterByList } from "./helpers.js";
|
|
3
3
|
import { TYPES_SQL } from "./sql/types.sql.js";
|
|
4
|
-
|
|
4
|
+
// src/vendor/postgres-meta/lib/PostgresMetaTypes.ts
|
|
5
5
|
var PostgresMetaTypes = class {
|
|
6
6
|
constructor(query) {
|
|
7
7
|
this.query = query;
|
|
@@ -18,5 +18,4 @@ var PostgresMetaTypes = class {
|
|
|
18
18
|
return await this.query(sql);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { PostgresMetaTypes as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VERSION_SQL } from "./sql/version.sql.js";
|
|
2
|
-
|
|
2
|
+
// src/vendor/postgres-meta/lib/PostgresMetaVersion.ts
|
|
3
3
|
var PostgresMetaVersion = class {
|
|
4
4
|
constructor(query) {
|
|
5
5
|
this.query = query;
|
|
@@ -16,5 +16,4 @@ var PostgresMetaVersion = class {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { PostgresMetaVersion as default };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_SYSTEM_SCHEMAS } from "./constants.js";
|
|
|
2
2
|
import { coalesceRowsToArray, filterByList, filterByValue } from "./helpers.js";
|
|
3
3
|
import { COLUMNS_SQL } from "./sql/columns.sql.js";
|
|
4
4
|
import { VIEWS_SQL } from "./sql/views.sql.js";
|
|
5
|
-
|
|
5
|
+
// src/vendor/postgres-meta/lib/PostgresMetaViews.ts
|
|
6
6
|
var PostgresMetaViews = class {
|
|
7
7
|
constructor(query) {
|
|
8
8
|
this.query = query;
|
|
@@ -79,5 +79,4 @@ select
|
|
|
79
79
|
*
|
|
80
80
|
${includeColumns ? `, ${coalesceRowsToArray("columns", "columns.table_id = views.id")}` : ""}
|
|
81
81
|
from views`;
|
|
82
|
-
//#endregion
|
|
83
82
|
export { PostgresMetaViews as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pg from "pg";
|
|
2
2
|
import { parse } from "postgres-array";
|
|
3
|
-
|
|
3
|
+
// src/vendor/postgres-meta/lib/db.ts
|
|
4
4
|
pg.types.setTypeParser(pg.types.builtins.INT8, (x) => {
|
|
5
5
|
const asNumber = Number(x);
|
|
6
6
|
if (Number.isSafeInteger(asNumber)) return asNumber;
|
|
@@ -143,5 +143,4 @@ const init = (config) => {
|
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
//#endregion
|
|
147
146
|
export { init };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/generators.ts
|
|
2
2
|
async function getGeneratorMetadata(pgMeta, filters = {
|
|
3
3
|
includedSchemas: [],
|
|
4
4
|
excludedSchemas: []
|
|
@@ -102,5 +102,4 @@ async function getGeneratorMetadata(pgMeta, filters = {
|
|
|
102
102
|
error: null
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { getGeneratorMetadata };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { literal } from "pg-format";
|
|
2
|
-
|
|
2
|
+
// src/vendor/postgres-meta/lib/helpers.ts
|
|
3
3
|
const coalesceRowsToArray = (source, filter) => {
|
|
4
4
|
return `
|
|
5
5
|
COALESCE(
|
|
@@ -22,5 +22,4 @@ const filterByValue = (ids) => {
|
|
|
22
22
|
if (ids?.length) return `IN (${ids.map(literal).join(",")})`;
|
|
23
23
|
return "";
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { coalesceRowsToArray, filterByList, filterByValue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/column_privileges.sql.ts
|
|
2
2
|
const COLUMN_PRIVILEGES_SQL = (props) => `
|
|
3
3
|
-- Lists each column's privileges in the form of:
|
|
4
4
|
--
|
|
@@ -150,5 +150,4 @@ group by column_id,
|
|
|
150
150
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
151
151
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
152
152
|
`;
|
|
153
|
-
//#endregion
|
|
154
153
|
export { COLUMN_PRIVILEGES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/columns.sql.ts
|
|
2
2
|
const COLUMNS_SQL = (props) => `
|
|
3
3
|
-- Adapted from information_schema.columns
|
|
4
4
|
|
|
@@ -119,5 +119,4 @@ WHERE
|
|
|
119
119
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
120
120
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
121
121
|
`;
|
|
122
|
-
//#endregion
|
|
123
122
|
export { COLUMNS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/config.sql.ts
|
|
2
2
|
const CONFIG_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
name,
|
|
@@ -28,5 +28,4 @@ ORDER BY
|
|
|
28
28
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
29
29
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
30
30
|
`;
|
|
31
|
-
//#endregion
|
|
32
31
|
export { CONFIG_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/extensions.sql.ts
|
|
2
2
|
const EXTENSIONS_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
e.name,
|
|
@@ -16,5 +16,4 @@ WHERE
|
|
|
16
16
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
17
17
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
18
18
|
`;
|
|
19
|
-
//#endregion
|
|
20
19
|
export { EXTENSIONS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/foreign_tables.sql.ts
|
|
2
2
|
const FOREIGN_TABLES_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
c.oid :: int8 AS id,
|
|
@@ -16,5 +16,4 @@ WHERE
|
|
|
16
16
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
17
17
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
18
18
|
`;
|
|
19
|
-
//#endregion
|
|
20
19
|
export { FOREIGN_TABLES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/functions.sql.ts
|
|
2
2
|
const FUNCTIONS_SQL = (props) => `
|
|
3
3
|
-- CTE with sane arg_modes, arg_names, and arg_types.
|
|
4
4
|
-- All three are always of the same length.
|
|
@@ -137,5 +137,4 @@ from
|
|
|
137
137
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
138
138
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
139
139
|
`;
|
|
140
|
-
//#endregion
|
|
141
140
|
export { FUNCTIONS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/indexes.sql.ts
|
|
2
2
|
const INDEXES_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
idx.indexrelid::int8 AS id,
|
|
@@ -47,5 +47,4 @@ SELECT
|
|
|
47
47
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
48
48
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
49
49
|
`;
|
|
50
|
-
//#endregion
|
|
51
50
|
export { INDEXES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/materialized_views.sql.ts
|
|
2
2
|
const MATERIALIZED_VIEWS_SQL = (props) => `
|
|
3
3
|
select
|
|
4
4
|
c.oid::int8 as id,
|
|
@@ -17,5 +17,4 @@ where
|
|
|
17
17
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
18
18
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
19
19
|
`;
|
|
20
|
-
//#endregion
|
|
21
20
|
export { MATERIALIZED_VIEWS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/policies.sql.ts
|
|
2
2
|
const POLICIES_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
pol.oid :: int8 AS id,
|
|
@@ -49,5 +49,4 @@ WHERE
|
|
|
49
49
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
50
50
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
51
51
|
`;
|
|
52
|
-
//#endregion
|
|
53
52
|
export { POLICIES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/publications.sql.ts
|
|
2
2
|
const PUBLICATIONS_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
p.oid :: int8 AS id,
|
|
@@ -42,5 +42,4 @@ WHERE
|
|
|
42
42
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
43
43
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
44
44
|
`;
|
|
45
|
-
//#endregion
|
|
46
45
|
export { PUBLICATIONS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/roles.sql.ts
|
|
2
2
|
const ROLES_SQL = (props) => `
|
|
3
3
|
-- TODO: Consider using pg_authid vs. pg_roles for unencrypted password field
|
|
4
4
|
SELECT
|
|
@@ -36,5 +36,4 @@ WHERE
|
|
|
36
36
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
37
37
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
38
38
|
`;
|
|
39
|
-
//#endregion
|
|
40
39
|
export { ROLES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/schemas.sql.ts
|
|
2
2
|
const SCHEMAS_SQL = (props) => `
|
|
3
3
|
-- Adapted from information_schema.schemata
|
|
4
4
|
select
|
|
@@ -22,5 +22,4 @@ where
|
|
|
22
22
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
23
23
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
24
24
|
`;
|
|
25
|
-
//#endregion
|
|
26
25
|
export { SCHEMAS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/table.sql.ts
|
|
2
2
|
const TABLES_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
c.oid :: int8 AS id,
|
|
@@ -105,5 +105,4 @@ group by
|
|
|
105
105
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
106
106
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
107
107
|
`;
|
|
108
|
-
//#endregion
|
|
109
108
|
export { TABLES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/table_privileges.sql.ts
|
|
2
2
|
const TABLE_PRIVILEGES_SQL = (props) => `
|
|
3
3
|
-- Despite the name \`table_privileges\`, this includes other kinds of relations:
|
|
4
4
|
-- views, matviews, etc. "Relation privileges" just doesn't roll off the tongue.
|
|
@@ -81,5 +81,4 @@ group by
|
|
|
81
81
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
82
82
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
83
83
|
`;
|
|
84
|
-
//#endregion
|
|
85
84
|
export { TABLE_PRIVILEGES_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/table_relationships.sql.ts
|
|
2
2
|
const TABLE_RELATIONSHIPS_SQL = (props) => `
|
|
3
3
|
-- Adapted from
|
|
4
4
|
-- https://github.com/PostgREST/postgrest/blob/f9f0f79fa914ac00c11fbf7f4c558e14821e67e2/src/PostgREST/SchemaCache.hs#L722
|
|
@@ -48,5 +48,4 @@ WHERE traint.contype = 'f'
|
|
|
48
48
|
AND traint.conparentid = 0
|
|
49
49
|
${props.schemaFilter ? `and ns1.nspname ${props.schemaFilter}` : ""}
|
|
50
50
|
`;
|
|
51
|
-
//#endregion
|
|
52
51
|
export { TABLE_RELATIONSHIPS_SQL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vendor/postgres-meta/lib/sql/triggers.sql.ts
|
|
2
2
|
const TRIGGERS_SQL = (props) => `
|
|
3
3
|
SELECT
|
|
4
4
|
pg_t.oid AS id,
|
|
@@ -60,5 +60,4 @@ GROUP BY
|
|
|
60
60
|
${props.limit ? `limit ${props.limit}` : ""}
|
|
61
61
|
${props.offset ? `offset ${props.offset}` : ""}
|
|
62
62
|
`;
|
|
63
|
-
//#endregion
|
|
64
63
|
export { TRIGGERS_SQL };
|