neon 8.11.1 → 8.11.2

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 +8 -6
@@ -1,174 +1,52 @@
1
- import { FUNCTION_SLUG_PATTERN } from "../utils/function_slug.js";
2
1
  //#region src/functions/registry.ts
3
2
  const MAX_PATH_LENGTH = 255;
4
- const MAX_INDEX_ENTRIES = 500;
5
- const MAX_OPERATIONS = 40;
6
- const MAX_LOGO_URL_LENGTH = 2048;
7
3
  const MAX_FILE_BYTES = 262144;
8
4
  const MAX_TOTAL_BYTES = 2097152;
9
5
  const MAX_JSON_BYTES = 1048576;
10
- const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
11
- const isText = (value) => typeof value === "string" && value.trim() !== "";
12
- const matches = (value, pattern) => typeof value === "string" && pattern.test(value);
13
- const isOptionalString = (value) => value === void 0 || typeof value === "string";
14
- const TEMPLATE_ID = /^[a-z0-9][a-z0-9-]*$/;
15
- const OPERATION_ID = /^[a-z0-9][a-z0-9-]*$/;
16
- const OPERATION_SLUG = FUNCTION_SLUG_PATTERN;
17
- const ENV_NAME = /^[A-Z_][A-Z0-9_]*$/;
18
- const SINGLE_LINE = /^[^\r\n]*$/;
19
6
  const WINDOWS_ABSOLUTE = /^[A-Za-z]:/;
20
- const SOURCE_EXTENSION = /\.ts$/;
21
- const ROUTE_PATTERN = /^\/[A-Za-z0-9\-._~/]*$/;
22
- const EXACT_DEPENDENCY = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*@\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
23
- const TEMPLATE_LAYOUTS = ["router", "separate"];
24
- const REGISTRY_CONTRACT = {
25
- layouts: TEMPLATE_LAYOUTS,
26
- requiredTemplateFields: [
27
- "id",
28
- "title",
29
- "description",
30
- "layout"
31
- ],
32
- requiredOperationFields: [
33
- "id",
34
- "title",
35
- "description",
36
- "source",
37
- "recommended"
38
- ],
39
- templateId: TEMPLATE_ID,
40
- operationId: OPERATION_ID,
41
- operationSlug: OPERATION_SLUG,
42
- envName: ENV_NAME,
43
- envDescription: SINGLE_LINE,
44
- source: SOURCE_EXTENSION,
45
- route: ROUTE_PATTERN,
46
- dependency: EXACT_DEPENDENCY,
47
- maxOperations: MAX_OPERATIONS,
48
- maxIndexEntries: MAX_INDEX_ENTRIES,
49
- maxFileBytes: MAX_FILE_BYTES,
50
- maxJsonBytes: MAX_JSON_BYTES
51
- };
52
7
  const isContainedRelativePath = (value) => value !== "" && value.length <= MAX_PATH_LENGTH && !value.includes("\0") && !value.includes("\\") && !value.startsWith("/") && !WINDOWS_ABSOLUTE.test(value) && !value.split("/").some((part) => part === "" || part === "." || part === "..");
53
- const isSafeSourcePath = (value) => isContainedRelativePath(value) && SOURCE_EXTENSION.test(value);
54
- const isDisplayLogoUrl = (value) => {
55
- if (value.length > MAX_LOGO_URL_LENGTH || !URL.canParse(value)) return false;
56
- return new URL(value).protocol === "https:";
57
- };
58
- const stringList = (value) => {
59
- if (!Array.isArray(value) || !value.every((item) => typeof item === "string")) return;
60
- return value;
61
- };
62
- const parseEnvironment = (value) => {
63
- if (!Array.isArray(value)) return void 0;
64
- const result = [];
65
- for (const item of value) {
66
- if (!isRecord(item) || typeof item.name !== "string" || typeof item.description !== "string" || !ENV_NAME.test(item.name) || !SINGLE_LINE.test(item.description)) return;
67
- result.push({
68
- name: item.name,
69
- description: item.description
70
- });
71
- }
72
- return result;
73
- };
74
- const parseTemplateOperations = (value, layout) => {
75
- if (!Array.isArray(value) || value.length === 0) return void 0;
76
- if (value.length > MAX_OPERATIONS) return void 0;
77
- const operations = [];
78
- const ids = /* @__PURE__ */ new Set();
79
- const routes = /* @__PURE__ */ new Set();
80
- const slugs = /* @__PURE__ */ new Set();
81
- const sources = /* @__PURE__ */ new Set();
82
- let recommended = 0;
83
- for (const item of value) {
84
- if (!isRecord(item) || !matches(item.id, OPERATION_ID) || ids.has(item.id) || !isText(item.title) || !isText(item.description) || typeof item.source !== "string" || !isSafeSourcePath(item.source) || sources.has(item.source) || !isOptionalString(item.route) || typeof item.recommended !== "boolean") return;
85
- const operation = {
86
- id: item.id,
87
- title: item.title,
88
- description: item.description,
89
- source: item.source,
90
- recommended: item.recommended
91
- };
92
- if (layout === "separate") {
93
- if (typeof item.slug !== "string" || !OPERATION_SLUG.test(item.slug) || slugs.has(item.slug)) return;
94
- slugs.add(item.slug);
95
- operation.slug = item.slug;
96
- } else {
97
- const route = item.route === void 0 ? `/${item.id}` : item.route;
98
- if (!ROUTE_PATTERN.test(route) || routes.has(route)) return;
99
- routes.add(route);
100
- operation.route = route;
101
- }
102
- if (item.recommended) recommended++;
103
- ids.add(item.id);
104
- sources.add(item.source);
105
- operations.push(operation);
106
- }
107
- if (recommended < 1) return void 0;
108
- return operations;
109
- };
8
+ function assertValid(validate, data, label) {
9
+ if (!validate.check(data)) throw new Error(`${label}: ${validate.errorsText()}`);
10
+ }
110
11
  const recommendedOperations = (operations) => operations.filter((operation) => operation.recommended);
111
12
  const resolveOperationById = (operations, id) => {
112
13
  const operation = operations.find((candidate) => candidate.id === id);
113
14
  if (!operation) throw new Error(`Unknown operation "${id}". Available operations: ${operations.map((candidate) => candidate.id).join(", ")}.`);
114
15
  return operation;
115
16
  };
116
- const parseTemplateItem = (text, expectedId) => {
17
+ const parseRegistryIndex = (text, validate) => {
117
18
  const data = JSON.parse(text);
118
- if (!isRecord(data)) throw new Error("Invalid template.json: expected a JSON object.");
119
- if (!matches(data.id, TEMPLATE_ID) || expectedId !== void 0 && data.id !== expectedId) throw new Error("Invalid template.json: bad or mismatched id.");
120
- if (!isText(data.title) || !isText(data.description)) throw new Error(`Invalid template.json for "${data.id}": missing title or description.`);
121
- if (!isOptionalString(data.provider)) throw new Error(`Invalid template.json for "${data.id}": provider must be a string.`);
122
- if (typeof data.layout !== "string" || !TEMPLATE_LAYOUTS.includes(data.layout)) throw new Error(`Invalid template.json for "${data.id}": layout must be one of ${TEMPLATE_LAYOUTS.join(", ")}.`);
123
- const layout = data.layout;
124
- const dependencies = stringList(data.dependencies ?? []);
125
- if (dependencies === void 0 || !dependencies.every((dependency) => EXACT_DEPENDENCY.test(dependency))) throw new Error(`Invalid template.json for "${data.id}": dependencies must be exact name@version pins.`);
126
- const environment = parseEnvironment(data.environment ?? []);
127
- if (environment === void 0) throw new Error(`Invalid template.json for "${data.id}": environment names must be UPPER_SNAKE with a one-line description.`);
128
- let operations;
129
- if (data.operations !== void 0) {
130
- operations = parseTemplateOperations(data.operations, layout);
131
- if (operations === void 0) throw new Error(`Invalid template.json for "${data.id}": malformed operations.`);
132
- }
19
+ assertValid(validate, data, "Invalid function registry");
20
+ const seen = /* @__PURE__ */ new Set();
21
+ return data.templates.map((item, index) => {
22
+ const at = `templates[${index}] ("${item.id}")`;
23
+ if (seen.has(item.id)) throw new Error(`Invalid function registry: ${at} repeats an id.`);
24
+ if (!isContainedRelativePath(item.path)) throw new Error(`Invalid function registry: ${at} has a missing or unsafe path.`);
25
+ seen.add(item.id);
26
+ return item;
27
+ });
28
+ };
29
+ const parseTemplateItem = (text, validate, expectedId) => {
30
+ const data = JSON.parse(text);
31
+ assertValid(validate, data, "Invalid template.json");
32
+ if (expectedId !== void 0 && data.id !== expectedId) throw new Error("Invalid template.json: bad or mismatched id.");
33
+ const operations = data.operations?.map((operation) => {
34
+ if (!isContainedRelativePath(operation.source)) throw new Error(`Invalid template.json for "${data.id}": malformed operations.`);
35
+ return data.layout === "separate" ? operation : {
36
+ ...operation,
37
+ route: operation.route ?? `/${operation.id}`
38
+ };
39
+ });
133
40
  return {
134
41
  id: data.id,
135
42
  ...data.provider ? { provider: data.provider } : {},
136
43
  title: data.title,
137
44
  description: data.description,
138
- layout,
139
- dependencies,
140
- environment,
45
+ layout: data.layout,
46
+ dependencies: data.dependencies ?? [],
47
+ environment: data.environment ?? [],
141
48
  ...operations ? { operations } : {}
142
49
  };
143
50
  };
144
- const parseRegistryIndex = (text) => {
145
- const data = JSON.parse(text);
146
- const items = isRecord(data) ? data.templates : void 0;
147
- if (!Array.isArray(items)) throw new Error("Invalid function registry: missing \"templates\" array.");
148
- if (items.length > MAX_INDEX_ENTRIES) throw new Error(`Invalid function registry: ${items.length} templates, more than the ${MAX_INDEX_ENTRIES} the CLI reads.`);
149
- const entries = [];
150
- const seen = /* @__PURE__ */ new Set();
151
- for (const [index, item] of items.entries()) {
152
- const at = `templates[${index}]${isRecord(item) && typeof item.id === "string" ? ` ("${item.id}")` : ""}`;
153
- const invalid = (reason) => /* @__PURE__ */ new Error(`Invalid function registry: ${at} ${reason}.`);
154
- if (!isRecord(item)) throw invalid("is not an object");
155
- if (!matches(item.id, TEMPLATE_ID)) throw invalid("has a bad id");
156
- if (seen.has(item.id)) throw invalid("repeats an id");
157
- if (!isText(item.title) || !isText(item.description)) throw invalid("is missing a title or description");
158
- if (!isOptionalString(item.provider)) throw invalid("has a provider that is not a string");
159
- if (typeof item.path !== "string" || !isContainedRelativePath(item.path)) throw invalid("has a missing or unsafe path");
160
- if (item.logo !== void 0 && (typeof item.logo !== "string" || !isDisplayLogoUrl(item.logo))) throw invalid("has a logo that is not an https:// URL");
161
- seen.add(item.id);
162
- entries.push({
163
- id: item.id,
164
- ...item.provider ? { provider: item.provider } : {},
165
- title: item.title,
166
- description: item.description,
167
- path: item.path,
168
- ...item.logo ? { logo: item.logo } : {}
169
- });
170
- }
171
- return entries;
172
- };
173
51
  //#endregion
174
- export { MAX_FILE_BYTES, MAX_JSON_BYTES, MAX_TOTAL_BYTES, REGISTRY_CONTRACT, TEMPLATE_LAYOUTS, isContainedRelativePath, parseEnvironment, parseRegistryIndex, parseTemplateItem, parseTemplateOperations, recommendedOperations, resolveOperationById };
52
+ export { MAX_FILE_BYTES, MAX_JSON_BYTES, MAX_TOTAL_BYTES, isContainedRelativePath, parseRegistryIndex, parseTemplateItem, recommendedOperations, resolveOperationById };
@@ -78,6 +78,45 @@ const urlReader = (index) => {
78
78
  };
79
79
  const templateSourcePaths = (template) => template.operations?.map((operation) => operation.source) ?? ["functions/index.ts"];
80
80
  const INDEX_FILE = "registry.json";
81
+ const REGISTRY_SCHEMA_FILE = "schemas/registry.schema.json";
82
+ const TEMPLATE_SCHEMA_FILE = "schemas/template.schema.json";
83
+ let publishedSchemas;
84
+ const compileSchemas = async (registrySchema, templateSchema) => {
85
+ const [{ default: Ajv2020 }, { default: addFormats }] = await Promise.all([import("ajv/dist/2020.js"), import("ajv-formats")]);
86
+ const ajv = new Ajv2020({
87
+ allErrors: true,
88
+ strict: false
89
+ });
90
+ addFormats(ajv);
91
+ const wrap = (schema) => {
92
+ const check = ajv.compile(schema);
93
+ return {
94
+ check: (data) => check(data),
95
+ errorsText: () => ajv.errorsText(check.errors)
96
+ };
97
+ };
98
+ return {
99
+ registry: wrap(registrySchema),
100
+ template: wrap(templateSchema)
101
+ };
102
+ };
103
+ const readPublishedSchemas = async (index) => {
104
+ const read = urlReader(new URL(index));
105
+ const registrySchema = JSON.parse(await read(REGISTRY_SCHEMA_FILE, MAX_JSON_BYTES));
106
+ const templateSchema = JSON.parse(await read(TEMPLATE_SCHEMA_FILE, MAX_JSON_BYTES));
107
+ if (typeof registrySchema !== "object" || registrySchema === null || typeof templateSchema !== "object" || templateSchema === null) throw new RegistryError("Published Function Registry schemas were not JSON objects.");
108
+ return compileSchemas(registrySchema, templateSchema);
109
+ };
110
+ const loadPublishedSchemas = () => {
111
+ publishedSchemas ??= readPublishedSchemas(DEFAULT_REGISTRY_URL).catch(async (error) => {
112
+ if (!(error instanceof RegistryError)) throw error;
113
+ return readPublishedSchemas(GITHUB_REGISTRY_URL);
114
+ }).catch((error) => {
115
+ publishedSchemas = void 0;
116
+ throw error;
117
+ });
118
+ return publishedSchemas;
119
+ };
81
120
  const openRegistry = async (source, { primary = DEFAULT_REGISTRY_URL, fallback = GITHUB_REGISTRY_URL, env = process.env } = {}) => {
82
121
  if (source) return openRegistryAt(source);
83
122
  const resolved = resolveRegistrySource(env, process.cwd(), primary);
@@ -106,6 +145,7 @@ const openRegistryAt = async (source, files = source) => {
106
145
  const read = readerFor(source);
107
146
  const readFile = files === source ? read : withStaleIndexHint(readerFor(files), source, files);
108
147
  const indexPath = source.kind === "dir" ? INDEX_FILE : posix.basename(source.url.pathname);
148
+ const schemas = await loadPublishedSchemas();
109
149
  const parse = (path, text, fn) => {
110
150
  try {
111
151
  return fn(text);
@@ -113,10 +153,10 @@ const openRegistryAt = async (source, files = source) => {
113
153
  throw new RegistryError(`Invalid registry file ${path}: ${error instanceof Error ? error.message : String(error)}`);
114
154
  }
115
155
  };
116
- const entries = parse(indexPath, await read(indexPath, MAX_JSON_BYTES), parseRegistryIndex);
156
+ const entries = parse(indexPath, await read(indexPath, MAX_JSON_BYTES), (text) => parseRegistryIndex(text, schemas.registry));
117
157
  const load = async (entry) => {
118
158
  if (!entry.path || !isContainedRelativePath(entry.path)) throw new RegistryError(`Template "${entry.id}" has no valid path.`);
119
- const template = parse(entry.path, await readFile(entry.path, MAX_JSON_BYTES), (text) => parseTemplateItem(text, entry.id));
159
+ const template = parse(entry.path, await readFile(entry.path, MAX_JSON_BYTES), (text) => parseTemplateItem(text, schemas.template, entry.id));
120
160
  const dir = posix.dirname(entry.path);
121
161
  const sources = /* @__PURE__ */ new Map();
122
162
  let total = 0;
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { NETWORK_ERROR_MESSAGE, isNetworkError, matchErrorCode } from "./errors.
9
9
  import { analyticsMiddleware, closeAnalytics, initAnalyticsClientMiddleware, sendError, takeCommandSuccessExtras, trackCommandSuccess } from "./analytics.js";
10
10
  import { AuthRefreshError, defaultClientID } from "./auth.js";
11
11
  import { getCliName } from "./utils/cli_name.js";
12
- import { ensureAuth } from "./commands/auth.js";
12
+ import { c as ensureAuth } from "./_chunks/auth-CIUtXByB.js";
13
13
  import { recoverFrom401 } from "./auth_recovery.js";
14
14
  import { UsageError, failOnUsageError, isBareParentCommand, showHelp, showUsageErrorHelp } from "./help.js";
15
15
  import { lazyCommands, preloadCommand } from "./commands/manifest.js";
package/dist/init/auth.js CHANGED
@@ -2,10 +2,10 @@ import { isNeonApiError } from "../api.js";
2
2
  import { r as defaultDir } from "../_chunks/paths-DMq0Lt7a.js";
3
3
  import "../config.js";
4
4
  import "../auth.js";
5
- import { ensureAuth } from "../commands/auth.js";
5
+ import { c as ensureAuth } from "../_chunks/auth-CIUtXByB.js";
6
6
  import { recoverFrom401 } from "../auth_recovery.js";
7
- import { pull } from "../commands/env.js";
8
- import { setupNeonMcp } from "../commands/mcp.js";
7
+ import { c as pull } from "../_chunks/env-5HS5qQGd.js";
8
+ import { c as setupNeonMcp } from "../_chunks/mcp-Bo-7TKc7.js";
9
9
  //#region src/init/auth.ts
10
10
  const isUnauthorized = (error) => isNeonApiError(error) && error.status === 401;
11
11
  const authenticationFailed = () => /* @__PURE__ */ new Error("Authentication failed.");
package/dist/init/link.js CHANGED
@@ -2,9 +2,9 @@ import { isNeonApiError } from "../api.js";
2
2
  import { r as defaultDir } from "../_chunks/paths-DMq0Lt7a.js";
3
3
  import "../config.js";
4
4
  import "../auth.js";
5
- import { ensureAuth } from "../commands/auth.js";
5
+ import { c as ensureAuth } from "../_chunks/auth-CIUtXByB.js";
6
6
  import { recoverFrom401 } from "../auth_recovery.js";
7
- import { runLink } from "../commands/link.js";
7
+ import { s as runLink } from "../_chunks/link-BgtkOBws.js";
8
8
  //#region src/init/link.ts
9
9
  const isUnauthorized = (error) => isNeonApiError(error) && error.status === 401;
10
10
  const authenticationFailed = () => /* @__PURE__ */ new Error("Authentication failed.");
package/dist/init/run.js CHANGED
@@ -17,15 +17,15 @@ import { FALLBACK_SKILLS_AGENTS, assertNamedAgentTooling, funnelAgentSetup, plan
17
17
  import { inferPackageManager, resolvePackageManager } from "../utils/package_manager.js";
18
18
  import { CANCELLED_BODY, CLAIMABLE_ACCOUNT_FLAGS, CLAIMABLE_ALREADY_LINKED, CLAIMABLE_MCP_API_KEY, CLAIMABLE_NO_LINK, MCP_API_KEY_NEEDS_AUTH, MCP_SCOPED_NEEDS_PROJECT, NON_TTY_LINK_NEEDS_AUTH, NO_AGENTS_FALLBACK_STATUS, PROGRESS, PROJECT_PINNED_OFFLINE, claimableNext, claimableThenServicesNext, configInitNext, envPullFailedNext, existingConfigNext, installFailedNext, mcpAfterLinkNext, mcpConfigLocationSkipped, mcpConfigLocationUnavailable, mcpKeyFailedNext, namedAgentsUnavailable, newConfigNext, offlinePinNext, skippedLinkNext, unattendedUnauthedNext } from "./copy.js";
19
19
  import { agentsRowValue, configRowValue, formatInitDone, headingForKind, printInitBanner, printInitDone, printInitProgress, projectRowValue, shouldPrintInitBanner } from "./chrome.js";
20
- import { ConfigInstallFailed, initCmd } from "../commands/config.js";
21
- import { quoteFlagValue, runLink } from "../commands/link.js";
20
+ import { h as initCmd, t as ConfigInstallFailed } from "../_chunks/config-BH_qRHiG.js";
21
+ import { o as quoteFlagValue, s as runLink } from "../_chunks/link-BgtkOBws.js";
22
22
  import { runAuthenticatedLink } from "./link.js";
23
23
  import { CannotMintApiKeyError } from "../mcp/mint.js";
24
24
  import { pullInitEnv } from "./auth.js";
25
25
  import { InitCancelled, raceSigint, restoreCursor } from "./cancelled.js";
26
26
  import { pickAgentSetupInteractively, pickInitAgentsInteractively, pickInitConfigInteractively, pickInitMcpAuthInteractively, pickInitMcpConfigLocationInteractively, pickInitModeInteractively, pickInitPackageManagerInteractively, pickInitProjectSetupInteractively, pickInitServicesInteractively, pickInitSkillsInteractively } from "./wizard.js";
27
27
  import { runToolingSteps } from "./tooling.js";
28
- import { create } from "../commands/claim.js";
28
+ import { l as create } from "../_chunks/claim-DqAvAvDm.js";
29
29
  import { INIT_CONFIG_SERVICES_CONFLICT, configPlanFromResolution, initEnvPullAfterConfig, resolveInitConfigChoice } from "./choices.js";
30
30
  import { detectInitEnvironment } from "./detect.js";
31
31
  import { createInitFunnel, emitInitStart, finishInitFunnel, initStartProperties } from "./funnel.js";
@@ -5,9 +5,9 @@ import { MCP_OAUTH_FALLBACK, PROGRESS } from "./copy.js";
5
5
  import { CannotMintApiKeyError } from "../mcp/mint.js";
6
6
  import { detectAgent } from "./detect_host.js";
7
7
  import { AgentSelectionSkipped, canPickAgentsInteractively } from "../utils/agent_picker.js";
8
- import { mcpInstallError, reportMcpInstall } from "../commands/mcp.js";
9
- import { installPlugins, pluginsInstallError, reportPluginsInstall } from "../commands/plugins.js";
10
- import { installSkills, reportSkillsInstall, skillsInstallError } from "../commands/skills.js";
8
+ import { a as mcpInstallError, s as reportMcpInstall } from "../_chunks/mcp-Bo-7TKc7.js";
9
+ import { l as reportPluginsInstall, o as installPlugins, s as pluginsInstallError } from "../_chunks/plugins-DqD7BDO1.js";
10
+ import { c as skillsInstallError, o as installSkills, s as reportSkillsInstall } from "../_chunks/skills-DyiBXKS3.js";
11
11
  import { runAuthenticatedMcp } from "./auth.js";
12
12
  import { raceSigint } from "./cancelled.js";
13
13
  import { pickAgentSetupInteractively } from "./wizard.js";
package/dist/mcp/mint.js CHANGED
@@ -2,7 +2,7 @@ import { log } from "../log.js";
2
2
  import { isNeonApiError } from "../api.js";
3
3
  import { getCliName } from "../utils/cli_name.js";
4
4
  import { mintedKeyName } from "../profile_keys.js";
5
- import { orgIdForProject } from "../commands/api_keys.js";
5
+ import { s as orgIdForProject } from "../_chunks/api_keys-CNnnugbQ.js";
6
6
  //#region src/mcp/mint.ts
7
7
  var CannotMintApiKeyError = class extends Error {
8
8
  constructor() {
@@ -1,6 +1,5 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  //#region src/test_utils/registry.ts
3
- const REGISTRY_SCHEMAS_DIR = fileURLToPath(new URL("../functions/schemas", import.meta.url));
4
3
  const FIXTURE_REGISTRY_DIR = fileURLToPath(new URL("../../tests/function-registry", import.meta.url));
5
4
  //#endregion
6
- export { FIXTURE_REGISTRY_DIR, REGISTRY_SCHEMAS_DIR };
5
+ export { FIXTURE_REGISTRY_DIR };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neon",
3
- "version": "8.11.1",
3
+ "version": "8.11.2",
4
4
  "description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
5
5
  "keywords": [
6
6
  "neon",
@@ -47,6 +47,8 @@
47
47
  "@hono/node-server": "2.0.4",
48
48
  "@segment/analytics-node": "1.3.0",
49
49
  "add-mcp": "2.0.0",
50
+ "ajv": "^8.20.0",
51
+ "ajv-formats": "^3.0.1",
50
52
  "chalk": "5.3.0",
51
53
  "chokidar": "5.0.0",
52
54
  "cliui": "8.0.1",
@@ -71,9 +73,9 @@
71
73
  "yargs": "17.7.2",
72
74
  "yoctocolors": "^2.1.2",
73
75
  "@neon/config-runtime": "1.10.2",
76
+ "@neon/config": "1.9.3",
74
77
  "@neon/realtime": "0.1.2",
75
- "@neon/sdk": "7.4.0",
76
- "@neon/config": "1.9.3"
78
+ "@neon/sdk": "7.4.0"
77
79
  },
78
80
  "optionalDependencies": {
79
81
  "@napi-rs/keyring": "1.3.0",
@@ -109,11 +111,11 @@
109
111
  "tsx": "4.22.3",
110
112
  "typescript": "^5.9.0",
111
113
  "vitest": "^3.0.9",
112
- "@neon-internals/cli-core": "0.0.0",
113
114
  "@neon-internals/env-core": "0.0.34",
114
- "@neon/e2e-harness": "0.0.0",
115
+ "@neon-internals/cli-core": "0.0.0",
116
+ "@neon/env": "1.6.4",
115
117
  "@neon/functions": "0.11.0",
116
- "@neon/env": "1.6.4"
118
+ "@neon/e2e-harness": "0.0.0"
117
119
  },
118
120
  "publishConfig": {
119
121
  "access": "public",