neon 8.11.1 → 8.11.3

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.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/dist/_chunks/api-GbEaBZJ5.js +388 -0
  3. package/dist/_chunks/api_keys-CNnnugbQ.js +281 -0
  4. package/dist/_chunks/ask-DVwy0eUL.js +155 -0
  5. package/dist/_chunks/auth-CIUtXByB.js +495 -0
  6. package/dist/_chunks/bootstrap-wPZWa1sT.js +499 -0
  7. package/dist/_chunks/branches-BNa1xX1L.js +460 -0
  8. package/dist/_chunks/bucket-BCdryTkD.js +409 -0
  9. package/dist/_chunks/checkout-CXIOydqZ.js +348 -0
  10. package/dist/_chunks/claim-DqAvAvDm.js +473 -0
  11. package/dist/_chunks/config-BH_qRHiG.js +1113 -0
  12. package/dist/_chunks/connection_string-DB4awPzZ.js +154 -0
  13. package/dist/_chunks/credentials-BSjE9fRR.js +146 -0
  14. package/dist/_chunks/data_api-Djxj5ZQD.js +263 -0
  15. package/dist/_chunks/databases-Dok4wru7.js +84 -0
  16. package/dist/_chunks/deploy-D7B0Xfjg.js +33 -0
  17. package/dist/_chunks/dev-CSvxAecE.js +945 -0
  18. package/dist/_chunks/diff-DhxxbdQE.js +178 -0
  19. package/dist/_chunks/docs-CrVybkTP.js +197 -0
  20. package/dist/_chunks/env-5HS5qQGd.js +284 -0
  21. package/dist/_chunks/feedback-CMayyTa8.js +88 -0
  22. package/dist/_chunks/functions-Q0zuvtnk.js +464 -0
  23. package/dist/_chunks/git-H32TNt6M.js +356 -0
  24. package/dist/_chunks/init-BkA6RilG.js +111 -0
  25. package/dist/_chunks/inspect-g0wekylj.js +90 -0
  26. package/dist/_chunks/ip_allow-5lLFvIuE.js +106 -0
  27. package/dist/_chunks/link-BgtkOBws.js +936 -0
  28. package/dist/_chunks/logs-DWkpjzIH.js +291 -0
  29. package/dist/_chunks/mcp-Bo-7TKc7.js +253 -0
  30. package/dist/_chunks/neon_auth-CBs1_3qu.js +822 -0
  31. package/dist/_chunks/open-CX3BT3Tp.js +33 -0
  32. package/dist/_chunks/operations-D4I-AxVs.js +37 -0
  33. package/dist/_chunks/orgs-xGfANwHQ.js +52 -0
  34. package/dist/_chunks/plugins-DqD7BDO1.js +169 -0
  35. package/dist/_chunks/profile-yXOiKk9R.js +672 -0
  36. package/dist/_chunks/projects-BwI2Uo0z.js +439 -0
  37. package/dist/_chunks/psql-BM-doe8e.js +64 -0
  38. package/dist/_chunks/realtime-BRqIyGR-.js +79 -0
  39. package/dist/_chunks/roles-B4w3YT_7.js +79 -0
  40. package/dist/_chunks/set_context-DbrwoImy.js +38 -0
  41. package/dist/_chunks/skills-DyiBXKS3.js +255 -0
  42. package/dist/_chunks/snapshots-RJBzW8GM.js +338 -0
  43. package/dist/_chunks/status-DV8Z2kw3.js +44 -0
  44. package/dist/_chunks/triggers-BrRo1z4b.js +302 -0
  45. package/dist/_chunks/user-dlOGXbX9.js +60 -0
  46. package/dist/_chunks/vpc_endpoints-CNb0YfMo.js +105 -0
  47. package/dist/auth_recovery.js +1 -1
  48. package/dist/commands/api.js +1 -388
  49. package/dist/commands/api_keys.js +1 -281
  50. package/dist/commands/ask.js +1 -155
  51. package/dist/commands/auth.js +1 -495
  52. package/dist/commands/bootstrap.js +1 -499
  53. package/dist/commands/branches.js +1 -460
  54. package/dist/commands/bucket.js +1 -409
  55. package/dist/commands/checkout.js +1 -348
  56. package/dist/commands/claim.js +1 -473
  57. package/dist/commands/config.js +1 -1113
  58. package/dist/commands/connection_string.js +1 -154
  59. package/dist/commands/credentials.js +1 -146
  60. package/dist/commands/data_api.js +1 -263
  61. package/dist/commands/databases.js +1 -84
  62. package/dist/commands/deploy.js +1 -33
  63. package/dist/commands/dev.js +1 -945
  64. package/dist/commands/diff.js +1 -178
  65. package/dist/commands/docs.js +1 -197
  66. package/dist/commands/env.js +1 -284
  67. package/dist/commands/feedback.js +1 -88
  68. package/dist/commands/functions.js +1 -464
  69. package/dist/commands/functions_new.js +1 -1
  70. package/dist/commands/git.js +1 -356
  71. package/dist/commands/index.js +45 -45
  72. package/dist/commands/init.js +1 -111
  73. package/dist/commands/inspect.js +1 -90
  74. package/dist/commands/ip_allow.js +1 -106
  75. package/dist/commands/link.js +1 -936
  76. package/dist/commands/logs.js +1 -291
  77. package/dist/commands/mcp.js +1 -253
  78. package/dist/commands/neon_auth.js +1 -822
  79. package/dist/commands/open.js +1 -33
  80. package/dist/commands/operations.js +1 -37
  81. package/dist/commands/orgs.js +1 -52
  82. package/dist/commands/plugins.js +1 -169
  83. package/dist/commands/profile.js +1 -672
  84. package/dist/commands/projects.js +1 -439
  85. package/dist/commands/psql.js +1 -64
  86. package/dist/commands/realtime.js +1 -79
  87. package/dist/commands/roles.js +1 -79
  88. package/dist/commands/set_context.js +1 -38
  89. package/dist/commands/skills.js +1 -255
  90. package/dist/commands/snapshots.js +1 -338
  91. package/dist/commands/status.js +1 -44
  92. package/dist/commands/subscribe.js +1 -1
  93. package/dist/commands/triggers.js +1 -302
  94. package/dist/commands/user.js +1 -60
  95. package/dist/commands/vpc_endpoints.js +1 -105
  96. package/dist/functions/registry.js +29 -151
  97. package/dist/functions/source.js +42 -2
  98. package/dist/index.js +1 -1
  99. package/dist/init/auth.js +3 -3
  100. package/dist/init/link.js +2 -2
  101. package/dist/init/run.js +3 -3
  102. package/dist/init/tooling.js +3 -3
  103. package/dist/mcp/mint.js +1 -1
  104. package/dist/test_utils/registry.js +1 -2
  105. package/package.json +9 -7
@@ -1,106 +1 @@
1
- import { t as __exportAll } from "../_chunks/rolldown-runtime-8H4AJuhK.js";
2
- import { log } from "../log.js";
3
- import { getCliName } from "../utils/cli_name.js";
4
- import { projectUpdateRequest } from "../parameters.gen.js";
5
- import { writer } from "../writer.js";
6
- import { fillSingleProject } from "../utils/enrichers.js";
7
- //#region src/commands/ip_allow.ts
8
- var ip_allow_exports = /* @__PURE__ */ __exportAll({
9
- builder: () => builder,
10
- command: () => command,
11
- describe: () => describe,
12
- handler: () => handler
13
- });
14
- const IP_ALLOW_FIELDS = [
15
- "id",
16
- "name",
17
- "IP_addresses",
18
- "protected_branches_only"
19
- ];
20
- const command = "ip-allow";
21
- const describe = "Manage IP Allow";
22
- const builder = (argv) => {
23
- return argv.usage("$0 ip-allow <sub-command> [options]").options({ "project-id": {
24
- describe: "Project ID",
25
- type: "string"
26
- } }).middleware(fillSingleProject).command("list", "List the IP allowlist", (yargs) => yargs, async (args) => {
27
- await list(args);
28
- }).command("add [ips...]", "Add IP addresses to the IP allowlist", (yargs) => yargs.usage("$0 ip-allow add [ips...]").positional("ips", {
29
- describe: "The list of IP addresses to add",
30
- type: "string",
31
- default: [],
32
- array: true
33
- }).options({ "protected-only": {
34
- describe: projectUpdateRequest["project.settings.allowed_ips.protected_branches_only"].description,
35
- type: "boolean"
36
- } }), async (args) => {
37
- await add(args);
38
- }).command("remove [ips...]", "Remove IP addresses from the IP allowlist", (yargs) => yargs.usage("$0 ip-allow remove [ips...]").positional("ips", {
39
- describe: "The list of IP addresses to remove",
40
- type: "string",
41
- default: [],
42
- array: true
43
- }), async (args) => {
44
- await remove(args);
45
- }).command("reset [ips...]", "Reset the IP allowlist", (yargs) => yargs.usage("$0 ip-allow reset [ips...]").positional("ips", {
46
- describe: "The list of IP addresses to reset",
47
- type: "string",
48
- default: [],
49
- array: true
50
- }), async (args) => {
51
- await reset(args);
52
- });
53
- };
54
- const handler = (args) => {
55
- return args;
56
- };
57
- const list = async (props) => {
58
- const { data } = await props.apiClient.getProject(props.projectId);
59
- writer(props).end(parse(data.project), { fields: IP_ALLOW_FIELDS });
60
- };
61
- const add = async (props) => {
62
- if (props.ips.length <= 0) throw new Error(`Enter individual IP addresses, define ranges with a dash, or use CIDR notation for more flexibility.
63
- Example: ${getCliName()} ip-allow add 192.168.1.1, 192.168.1.20-192.168.1.50, 192.168.1.0/24 --project-id <id>`);
64
- const project = {};
65
- const { data } = await props.apiClient.getProject(props.projectId);
66
- const existingAllowedIps = data.project.settings?.allowed_ips;
67
- project.settings = { allowed_ips: {
68
- ips: [...new Set(props.ips.concat(existingAllowedIps?.ips ?? []))],
69
- protected_branches_only: props.protectedOnly ?? existingAllowedIps?.protected_branches_only ?? false
70
- } };
71
- const { data: response } = await props.apiClient.updateProject(props.projectId, { project });
72
- writer(props).end(parse(response.project), { fields: IP_ALLOW_FIELDS });
73
- };
74
- const remove = async (props) => {
75
- if (props.ips.length <= 0) throw new Error(`Remove individual IP addresses and ranges. Example: ${getCliName()} ip-allow remove 192.168.1.1 --project-id <id>`);
76
- const project = {};
77
- const { data } = await props.apiClient.getProject(props.projectId);
78
- const existingAllowedIps = data.project.settings?.allowed_ips;
79
- project.settings = { allowed_ips: {
80
- ips: existingAllowedIps?.ips?.filter((ip) => !props.ips.includes(ip)) ?? [],
81
- protected_branches_only: existingAllowedIps?.protected_branches_only ?? false
82
- } };
83
- const { data: response } = await props.apiClient.updateProject(props.projectId, { project });
84
- writer(props).end(parse(response.project), { fields: IP_ALLOW_FIELDS });
85
- };
86
- const reset = async (props) => {
87
- const project = {};
88
- project.settings = { allowed_ips: {
89
- ips: props.ips,
90
- protected_branches_only: false
91
- } };
92
- const { data } = await props.apiClient.updateProject(props.projectId, { project });
93
- writer(props).end(parse(data.project), { fields: IP_ALLOW_FIELDS });
94
- if (props.ips.length <= 0) log.info(`The IP allowlist has been reset. All databases on project "${data.project.name}" are now exposed to the internet`);
95
- };
96
- const parse = (project) => {
97
- const ips = project.settings?.allowed_ips?.ips ?? [];
98
- return {
99
- id: project.id,
100
- name: project.name,
101
- IP_addresses: ips,
102
- protected_branches_only: project.settings?.allowed_ips?.protected_branches_only ?? false
103
- };
104
- };
105
- //#endregion
106
- export { builder, command, describe, handler, ip_allow_exports as t };
1
+ export { t as builder, n as command, r as describe, i as handler } from "../_chunks/ip_allow-5lLFvIuE.js";