neon 9.9.6 → 9.9.8
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-1MKsfpY3.js → api-Bus6PoKT.js} +23 -11
- package/dist/_chunks/{bootstrap-B73qVB39.js → bootstrap-yotTpFtF.js} +2 -1
- package/dist/_chunks/{checkout-CczPpuT9.js → checkout-C4kfW64r.js} +3 -3
- package/dist/_chunks/{claim-BoN9NPTy.js → claim-u1NrKodG.js} +1 -1
- package/dist/_chunks/{config-C8BQIoM2.js → config-DrlP49no.js} +1 -1
- package/dist/_chunks/{deploy-BdipMGJE.js → deploy-DnjB7HV_.js} +1 -1
- package/dist/_chunks/{dev-DVB7fGiG.js → dev-wpD1Az-t.js} +3 -3
- package/dist/_chunks/{functions-PHaU-kRb.js → functions-v9z7zjWD.js} +2 -1
- package/dist/_chunks/{git-BZY1WeAw.js → git-DWmx2prl.js} +2 -2
- package/dist/_chunks/{link-BVa6Nfji.js → link-D89GPFoO.js} +2 -2
- package/dist/_chunks/{neon_auth-mfyjde2x.js → neon_auth-DE6X6FFV.js} +3 -2
- package/dist/_chunks/{snapshots-DxNhjcco.js → snapshots-BolN3uBz.js} +2 -1
- package/dist/_chunks/{status-BBnw48qR.js → status-DXp_w9U2.js} +1 -1
- package/dist/commands/api.js +1 -1
- package/dist/commands/bootstrap.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/deploy.js +1 -1
- package/dist/commands/dev.js +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/functions.js +1 -1
- package/dist/commands/functions_new.js +6 -2
- package/dist/commands/git.js +1 -1
- package/dist/commands/index.js +14 -14
- package/dist/commands/link.js +1 -1
- package/dist/commands/neon_auth.js +1 -1
- package/dist/commands/snapshots.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/subscribe.js +1 -1
- package/dist/env_services.js +4 -18
- package/dist/errors.js +28 -1
- package/dist/functions/registry.js +5 -1
- package/dist/help.js +9 -1
- package/dist/init/auth.js +1 -1
- package/dist/init/deploy.js +1 -1
- package/dist/init/link.js +1 -1
- package/dist/init/plan.js +2 -1
- package/dist/init/run.js +3 -3
- package/dist/mcp/agents.js +2 -1
- package/dist/mcp/install.js +2 -1
- package/dist/mcp/plan.js +2 -1
- package/dist/neon_services.js +6 -4
- package/dist/plugins/plan.js +2 -1
- package/dist/skills/catalog.js +2 -1
- package/dist/skills/plan.js +2 -1
- package/dist/utils/openapi.js +11 -402
- package/package.json +6 -6
- package/dist/_chunks/{env-C3HQJO8Z.js → env-BIP63KZa.js} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { codeFromBody, isNeonApiError } from "../api.js";
|
|
3
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
3
4
|
import { writer } from "../writer.js";
|
|
4
|
-
import { describeOperation, getEndpoints, loadSpec } from "../utils/openapi.js";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import chalk from "chalk";
|
|
@@ -47,7 +47,7 @@ function parseTypedValue(raw) {
|
|
|
47
47
|
/** Split a `key=value` pair on the first `=`. */
|
|
48
48
|
function parseKeyValue(input) {
|
|
49
49
|
const eq = input.indexOf("=");
|
|
50
|
-
if (eq === -1) throw new Error(`Invalid "key=value" pair:
|
|
50
|
+
if (eq === -1) throw new Error(`Invalid "key=value" pair: ${REDACTED_INVALID_VALUE}.`);
|
|
51
51
|
return {
|
|
52
52
|
key: input.slice(0, eq),
|
|
53
53
|
value: input.slice(eq + 1)
|
|
@@ -96,13 +96,20 @@ function parseHeaders(pairs) {
|
|
|
96
96
|
const headers = {};
|
|
97
97
|
for (const pair of pairs) {
|
|
98
98
|
const idx = pair.indexOf(":");
|
|
99
|
-
if (idx === -1) throw new Error(`Invalid header
|
|
100
|
-
|
|
99
|
+
if (idx === -1) throw new Error(`Invalid header ${REDACTED_INVALID_VALUE}. Expected "key:value".`);
|
|
100
|
+
const name = pair.slice(0, idx).trim();
|
|
101
|
+
const value = pair.slice(idx + 1).trim();
|
|
102
|
+
try {
|
|
103
|
+
new Headers().append(name, value);
|
|
104
|
+
} catch {
|
|
105
|
+
throw new Error(`Invalid header ${REDACTED_INVALID_VALUE}. Header names must be HTTP tokens and values cannot contain line breaks.`);
|
|
106
|
+
}
|
|
107
|
+
headers[name] = value;
|
|
101
108
|
}
|
|
102
109
|
return headers;
|
|
103
110
|
}
|
|
104
111
|
function assertMethod(method) {
|
|
105
|
-
if (!HTTP_METHODS.includes(method)) throw new Error(`Unsupported method
|
|
112
|
+
if (!HTTP_METHODS.includes(method)) throw new Error(`Unsupported method ${REDACTED_INVALID_VALUE}.${didYouMean([method], HTTP_METHODS)} Use one of: ${HTTP_METHODS.join(", ")}.`);
|
|
106
113
|
}
|
|
107
114
|
const JSON_TOKEN = /("(?:\\.|[^"\\])*")(\s*:)?|\b(true|false)\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g;
|
|
108
115
|
/** Color the tokens of serialized JSON without changing a byte of the text itself. */
|
|
@@ -139,13 +146,16 @@ async function readData(data) {
|
|
|
139
146
|
}
|
|
140
147
|
}
|
|
141
148
|
const toStrings = (values) => (values ?? []).map(String);
|
|
149
|
+
const openapi = () => import("../utils/openapi.js");
|
|
142
150
|
async function listEndpoints(args) {
|
|
151
|
+
const { DEFAULT_SPEC_URL, getEndpoints, loadSpec } = await openapi();
|
|
152
|
+
const specUrl = args.specUrl ?? DEFAULT_SPEC_URL;
|
|
143
153
|
const spec = await loadSpec({
|
|
144
154
|
configDir: args.configDir,
|
|
145
|
-
specUrl
|
|
155
|
+
specUrl,
|
|
146
156
|
refresh: args.refresh
|
|
147
157
|
});
|
|
148
|
-
if (!spec) throw new Error(`Could not load the Neon OpenAPI spec from ${
|
|
158
|
+
if (!spec) throw new Error(`Could not load the Neon OpenAPI spec from ${specUrl}. Check your network connection or pass --spec-url.`);
|
|
149
159
|
const endpoints = getEndpoints(spec).map((endpoint) => ({
|
|
150
160
|
method: endpoint.method,
|
|
151
161
|
path: endpoint.path,
|
|
@@ -184,12 +194,14 @@ async function describeRoute(args) {
|
|
|
184
194
|
...toStrings(args.query),
|
|
185
195
|
...toStrings(args.header)
|
|
186
196
|
].length > 0 || args.data !== void 0 || args.include) throw new Error("--describe prints the field list; it does not send a request. Drop -F, -f, -d, -Q, -H, and -i.");
|
|
197
|
+
const { DEFAULT_SPEC_URL, describeOperation, loadSpec } = await openapi();
|
|
198
|
+
const specUrl = args.specUrl ?? DEFAULT_SPEC_URL;
|
|
187
199
|
const spec = await loadSpec({
|
|
188
200
|
configDir: args.configDir,
|
|
189
|
-
specUrl
|
|
201
|
+
specUrl,
|
|
190
202
|
refresh: args.refresh
|
|
191
203
|
});
|
|
192
|
-
if (!spec) throw new Error(`Could not load the Neon OpenAPI spec from ${
|
|
204
|
+
if (!spec) throw new Error(`Could not load the Neon OpenAPI spec from ${specUrl}. Check your network connection or pass --spec-url.`);
|
|
193
205
|
const method = String(args.method ?? "GET").toUpperCase();
|
|
194
206
|
assertMethod(method);
|
|
195
207
|
const description = describeOperation(spec, path, method);
|
|
@@ -366,9 +378,9 @@ const builder = (argv) => argv.usage("$0 api <path> [options]").positional("path
|
|
|
366
378
|
},
|
|
367
379
|
"spec-url": {
|
|
368
380
|
type: "string",
|
|
369
|
-
default: process.env.NEON_API_SPEC_URL
|
|
381
|
+
default: process.env.NEON_API_SPEC_URL,
|
|
370
382
|
hidden: true,
|
|
371
|
-
describe: "OpenAPI spec URL used by --list and --describe."
|
|
383
|
+
describe: "OpenAPI spec URL used by --list and --describe. Defaults to the released spec on neon.com."
|
|
372
384
|
}
|
|
373
385
|
}).example("$0 api /projects", "List your projects").example("$0 api /projects/{id}/branches -X POST -F branch.name=dev", "Create a branch").example("$0 api --list", "List every available API route").example("$0 api /projects --describe", "Show GET /projects query parameters").example("$0 api /projects -X POST --describe", "Show the create-project body fields");
|
|
374
386
|
const handler = async (args) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { isCi } from "../env.js";
|
|
3
3
|
import { log } from "../log.js";
|
|
4
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
4
5
|
import { recordCommandSuccessExtras, recordScaffoldedTemplate } from "../analytics.js";
|
|
5
6
|
import { getCliName } from "../utils/cli_name.js";
|
|
6
7
|
import { helpCsv, helpEpilogue } from "../utils/help_text.js";
|
|
@@ -137,7 +138,7 @@ const resolveTemplateList = async (props) => props.template && findTemplate(FALL
|
|
|
137
138
|
const resolveSelectedTemplate = async (props, interactive, templates) => {
|
|
138
139
|
if (props.template) {
|
|
139
140
|
const template = findTemplate(templates, props.template);
|
|
140
|
-
if (!template) throw new Error(`Unknown template
|
|
141
|
+
if (!template) throw new Error(`Unknown template ${REDACTED_INVALID_VALUE}.${didYouMean([props.template], templates.map((candidate) => candidate.id))} Available templates: ${templateIds(templates)}.`);
|
|
141
142
|
return template;
|
|
142
143
|
}
|
|
143
144
|
if (props.default) {
|
|
@@ -12,9 +12,9 @@ import { looksLikeBranchId } from "../utils/formats.js";
|
|
|
12
12
|
import { fillSingleProject, listAllProjectBranches } from "../utils/enrichers.js";
|
|
13
13
|
import { buildCheckoutEvent, readGitContext } from "../utils/git.js";
|
|
14
14
|
import { buildHookBranch, loadHookConfig, resolveHookEnv, runCheckoutAfterHook, runCheckoutBeforeHook, runCreateAfterHook, runCreateBeforeHook } from "../utils/hooks.js";
|
|
15
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
16
|
-
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-
|
|
17
|
-
import { i as handler$1 } from "./link-
|
|
15
|
+
import { n as autoPullEnvAfterPin } from "./env-BIP63KZa.js";
|
|
16
|
+
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-DrlP49no.js";
|
|
17
|
+
import { i as handler$1 } from "./link-D89GPFoO.js";
|
|
18
18
|
import chalk from "chalk";
|
|
19
19
|
import prompts from "prompts";
|
|
20
20
|
// src/commands/checkout.ts
|
|
@@ -12,7 +12,7 @@ import { projectConfigPath } from "../project.js";
|
|
|
12
12
|
import { resolveEnvFilePath } from "../env_file.js";
|
|
13
13
|
import { writer } from "../writer.js";
|
|
14
14
|
import { noPassthrough } from "../utils/flags.js";
|
|
15
|
-
import { c as pull } from "./env-
|
|
15
|
+
import { c as pull } from "./env-BIP63KZa.js";
|
|
16
16
|
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
17
|
import open from "open";
|
|
18
18
|
import prompts from "prompts";
|
|
@@ -26,7 +26,7 @@ import { readGitContext } from "../utils/git.js";
|
|
|
26
26
|
import { resolveHookEnv, runDeployAfterHook, runDeployBeforeHook } from "../utils/hooks.js";
|
|
27
27
|
import { pickServicesInteractively } from "../utils/service_picker.js";
|
|
28
28
|
import { zipBundle } from "../utils/zip.js";
|
|
29
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
29
|
+
import { n as autoPullEnvAfterPin } from "./env-BIP63KZa.js";
|
|
30
30
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
31
31
|
import { dirname, join, relative, resolve } from "node:path";
|
|
32
32
|
import chalk from "chalk";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { fillSingleProject } from "../utils/enrichers.js";
|
|
3
|
-
import { f as envFlag, i as applyFlags, p as envPullFlag, r as applyCmd } from "./config-
|
|
3
|
+
import { f as envFlag, i as applyFlags, p as envPullFlag, r as applyCmd } from "./config-DrlP49no.js";
|
|
4
4
|
import { DEPLOY_COMMANDS_EPILOGUE } from "../commands/deploy_help.js";
|
|
5
5
|
// src/commands/deploy.ts
|
|
6
6
|
var deploy_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -4,12 +4,12 @@ import { getCliName } from "../utils/cli_name.js";
|
|
|
4
4
|
import { isClaimableEnvTarget } from "../claimable/state.js";
|
|
5
5
|
import { defaultDevEnvFiles, readEnvFile, resolveEnvFilePath } from "../env_file.js";
|
|
6
6
|
import { t as NEON_DEV_FUNCTION_PORTS } from "./env-EJU-0InB.js";
|
|
7
|
-
import { branchIdResolve } from "../utils/enrichers.js";
|
|
8
|
-
import { bundleEntry } from "../utils/esbuild.js";
|
|
9
7
|
import { a as resolveDevEnv } from "./env-BWvi2_2f.js";
|
|
10
|
-
import { f as envFlag } from "./config-C8BQIoM2.js";
|
|
11
8
|
import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
12
9
|
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
10
|
+
import { branchIdResolve } from "../utils/enrichers.js";
|
|
11
|
+
import { bundleEntry } from "../utils/esbuild.js";
|
|
12
|
+
import { f as envFlag } from "./config-DrlP49no.js";
|
|
13
13
|
import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError, retryOnLock } from "../api.js";
|
|
4
|
+
import { REDACTED_INVALID_VALUE } from "../errors.js";
|
|
4
5
|
import { getCliName } from "../utils/cli_name.js";
|
|
5
6
|
import { deleteCustomDomain, listCustomDomains, registerCustomDomain } from "../custom_domains_api.js";
|
|
6
7
|
import { createDeployment, deleteFunction, getFunction, listFunctions } from "../functions_api.js";
|
|
@@ -219,7 +220,7 @@ const parseEnv = (entries) => {
|
|
|
219
220
|
const map = {};
|
|
220
221
|
for (const entry of entries) {
|
|
221
222
|
const eq = entry.indexOf("=");
|
|
222
|
-
if (eq <= 0) throw new Error(`Invalid --env value
|
|
223
|
+
if (eq <= 0) throw new Error(`Invalid --env value ${REDACTED_INVALID_VALUE}. Expected KEY=VALUE.`);
|
|
223
224
|
map[entry.slice(0, eq)] = entry.slice(eq + 1);
|
|
224
225
|
}
|
|
225
226
|
return JSON.stringify(map);
|
|
@@ -5,8 +5,8 @@ import { CONTEXT_FILE, contextBranch, gitBranchMap, gitBranchMapping, isUnfollow
|
|
|
5
5
|
import { writer } from "../writer.js";
|
|
6
6
|
import { neonSafeBranchName } from "../utils/branch_name.js";
|
|
7
7
|
import { currentGitBranch, gitPull, gitRepoRoot, hasUpstream, installPostCheckoutHook, isGitRepo, isManagedHook, localGitBranches, postCheckoutHookPath, readGitContext, removePostCheckoutHook } from "../utils/git.js";
|
|
8
|
-
import { o as quoteFlagValue } from "./link-
|
|
9
|
-
import { o as handler$1 } from "./checkout-
|
|
8
|
+
import { o as quoteFlagValue } from "./link-D89GPFoO.js";
|
|
9
|
+
import { o as handler$1 } from "./checkout-C4kfW64r.js";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
import chalk from "chalk";
|
|
@@ -13,8 +13,8 @@ import { writer } from "../writer.js";
|
|
|
13
13
|
import { createBranch, pickBranchInteractively } from "../utils/branch_picker.js";
|
|
14
14
|
import { looksLikeBranchId } from "../utils/formats.js";
|
|
15
15
|
import { listAllProjectBranches } from "../utils/enrichers.js";
|
|
16
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
17
|
-
import { h as initCmd } from "./config-
|
|
16
|
+
import { n as autoPullEnvAfterPin } from "./env-BIP63KZa.js";
|
|
17
|
+
import { h as initCmd } from "./config-DrlP49no.js";
|
|
18
18
|
import { formatLinkSummary } from "../commands/link_output.js";
|
|
19
19
|
import { r as REGIONS } from "./projects-a3X4OFEJ.js";
|
|
20
20
|
import prompts from "prompts";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { codeFromBody, isNeonApiError, retryOnLock } from "../api.js";
|
|
4
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
4
5
|
import { stripAnsi } from "../human_table.js";
|
|
5
6
|
import { writer } from "../writer.js";
|
|
6
7
|
import { noPassthrough, single } from "../utils/flags.js";
|
|
@@ -1356,8 +1357,8 @@ const pluginsGet = async (props) => {
|
|
|
1356
1357
|
}));
|
|
1357
1358
|
const plugin = data[props.pluginName];
|
|
1358
1359
|
if (plugin === void 0) {
|
|
1359
|
-
const available = Object.keys(data)
|
|
1360
|
-
throw new Error(`Unknown plugin
|
|
1360
|
+
const available = Object.keys(data);
|
|
1361
|
+
throw new Error(`Unknown plugin ${REDACTED_INVALID_VALUE}.${didYouMean([props.pluginName], available)} Available plugins: ${available.join(", ")}`);
|
|
1361
1362
|
}
|
|
1362
1363
|
if (props.output === "json" || props.output === "yaml") {
|
|
1363
1364
|
const fields = typeof plugin === "object" && !Array.isArray(plugin) ? Object.keys(plugin) : [];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
3
|
import { isNeonApiError, retryOnLock } from "../api.js";
|
|
4
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
4
5
|
import { writer } from "../writer.js";
|
|
5
6
|
import { looksLikeBranchId, looksLikeLSN, looksLikeSnapshotId, looksLikeTimestamp, toIso } from "../utils/formats.js";
|
|
6
7
|
import { branchIdResolve, fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
|
|
@@ -300,7 +301,7 @@ const parseScheduleJson = (raw) => {
|
|
|
300
301
|
const record = entry;
|
|
301
302
|
const frequency = record.frequency;
|
|
302
303
|
if (typeof frequency !== "string") throw new Error(`--schedule entry ${index} is missing a string "frequency".`);
|
|
303
|
-
if (!isSnapshotFrequency(frequency)) throw new Error(`--schedule entry ${index} has an unsupported "frequency":
|
|
304
|
+
if (!isSnapshotFrequency(frequency)) throw new Error(`--schedule entry ${index} has an unsupported "frequency": ${REDACTED_INVALID_VALUE}.${didYouMean([frequency], SNAPSHOT_FREQUENCIES)} Use one of: ${SNAPSHOT_FREQUENCIES.join(", ")}.`);
|
|
304
305
|
const item = { frequency };
|
|
305
306
|
for (const key of [
|
|
306
307
|
"hour",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { fillSingleProject } from "../utils/enrichers.js";
|
|
3
|
-
import { y as status } from "./config-
|
|
3
|
+
import { y as status } from "./config-DrlP49no.js";
|
|
4
4
|
// src/commands/status.ts
|
|
5
5
|
var status_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
builder: () => builder,
|
package/dist/commands/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as buildBody, r as buildQuery, i as builder, a as colorizeJson, o as command, s as describe, c as handler, l as parseHeaders, u as parseKeyValue, d as parseTypedValue, f as setDeep } from "../_chunks/api-
|
|
1
|
+
export { n as buildBody, r as buildQuery, i as builder, a as colorizeJson, o as command, s as describe, c as handler, l as parseHeaders, u as parseKeyValue, d as parseTypedValue, f as setDeep } from "../_chunks/api-Bus6PoKT.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as builder, r as command, i as describe, a as handler } from "../_chunks/bootstrap-
|
|
1
|
+
export { n as builder, r as command, i as describe, a as handler } from "../_chunks/bootstrap-yotTpFtF.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, r as command, i as describe, a as formatCheckoutPolicyFailure, o as handler } from "../_chunks/checkout-
|
|
1
|
+
export { t as builder, r as command, i as describe, a as formatCheckoutPolicyFailure, o as handler } from "../_chunks/checkout-C4kfW64r.js";
|
package/dist/commands/claim.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CLAIM_CREATE_FIELDS, n as CLAIM_LIST_FIELDS, r as aliases, i as builder, a as claimCreateFields, s as claimableCapabilities, c as command, l as create, u as describe, d as handler } from "../_chunks/claim-
|
|
1
|
+
export { t as CLAIM_CREATE_FIELDS, n as CLAIM_LIST_FIELDS, r as aliases, i as builder, a as claimCreateFields, s as claimableCapabilities, c as command, l as create, u as describe, d as handler } from "../_chunks/claim-u1NrKodG.js";
|
package/dist/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ConfigInstallFailed, n as addCmd, r as applyCmd, i as applyFlags, a as applyPolicyOnCreate, o as builder, s as command, l as createBranchFromPolicyOnCheckout, u as describe, d as ensureConfigPackages, f as envFlag, p as envPullFlag, m as handler, h as initCmd, g as installCommandFrom, _ as missingDependencies, v as planCmd, y as status } from "../_chunks/config-
|
|
1
|
+
export { t as ConfigInstallFailed, n as addCmd, r as applyCmd, i as applyFlags, a as applyPolicyOnCreate, o as builder, s as command, l as createBranchFromPolicyOnCheckout, u as describe, d as ensureConfigPackages, f as envFlag, p as envPullFlag, m as handler, h as initCmd, g as installCommandFrom, _ as missingDependencies, v as planCmd, y as status } from "../_chunks/config-DrlP49no.js";
|
package/dist/commands/deploy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as command, i as describe, a as handler } from "../_chunks/deploy-
|
|
1
|
+
export { t as builder, n as command, i as describe, a as handler } from "../_chunks/deploy-DnjB7HV_.js";
|
package/dist/commands/dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as captureShellEnv, r as command, i as describe, a as devBundleDir, o as devEnvContext, c as diffUnits, l as formatEnvFiles, u as formatEnvSummary, d as handler, f as loadDevEnvFiles, p as localFunctionPortsEnv, m as planFunctionsToUnits, h as reportDevCredential, g as sourceFunctionUrlOverlay } from "../_chunks/dev-
|
|
1
|
+
export { t as builder, n as captureShellEnv, r as command, i as describe, a as devBundleDir, o as devEnvContext, c as diffUnits, l as formatEnvFiles, u as formatEnvSummary, d as handler, f as loadDevEnvFiles, p as localFunctionPortsEnv, m as planFunctionsToUnits, h as reportDevCredential, g as sourceFunctionUrlOverlay } from "../_chunks/dev-wpD1Az-t.js";
|
package/dist/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ENV_PULL_SKIPPED_HINT, n as autoPullEnvAfterPin, r as builder, i as command, a as describe, s as handler, c as pull } from "../_chunks/env-
|
|
1
|
+
export { t as ENV_PULL_SKIPPED_HINT, n as autoPullEnvAfterPin, r as builder, i as command, a as describe, s as handler, c as pull } from "../_chunks/env-BIP63KZa.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as aliases, n as builder, r as command, i as deploymentPollDelay, a as describe, s as handler } from "../_chunks/functions-
|
|
1
|
+
export { t as aliases, n as builder, r as command, i as deploymentPollDelay, a as describe, s as handler } from "../_chunks/functions-v9z7zjWD.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isInteractiveTerminal } from "../env.js";
|
|
2
2
|
import { log } from "../log.js";
|
|
3
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
3
4
|
import { recordScaffoldedTemplate } from "../analytics.js";
|
|
4
5
|
import { getCliName } from "../utils/cli_name.js";
|
|
5
6
|
import { projectConfigPath, projectDir } from "../project.js";
|
|
@@ -9,7 +10,7 @@ import { writer } from "../writer.js";
|
|
|
9
10
|
import { formatInitDone, printInitDone } from "../init/chrome.js";
|
|
10
11
|
import { FUNCTION_SLUG_PATTERN, deriveFunctionSlug } from "../utils/function_slug.js";
|
|
11
12
|
import { displayPath } from "./env_output.js";
|
|
12
|
-
import { _ as missingDependencies, d as ensureConfigPackages, g as installCommandFrom } from "../_chunks/config-
|
|
13
|
+
import { _ as missingDependencies, d as ensureConfigPackages, g as installCommandFrom } from "../_chunks/config-DrlP49no.js";
|
|
13
14
|
import { recommendedOperations } from "../functions/registry.js";
|
|
14
15
|
import { collidingFiles, operationsFromFlags, planConfigRegistration, planEnvExample, planScaffold, writeScaffold } from "../functions/scaffold.js";
|
|
15
16
|
import { describeRegistrySources, openRegistry } from "../functions/source.js";
|
|
@@ -51,7 +52,10 @@ const writeTemplates = (props, entries) => writer(props).end(entries.map((entry)
|
|
|
51
52
|
const listTemplates = async (props) => {
|
|
52
53
|
writeTemplates(props, (await openRegistry()).entries);
|
|
53
54
|
};
|
|
54
|
-
const unknownTemplate = (id, registry) =>
|
|
55
|
+
const unknownTemplate = (id, registry) => {
|
|
56
|
+
const ids = registry.entries.map((entry) => entry.id);
|
|
57
|
+
return /* @__PURE__ */ new Error(`Unknown function template ${REDACTED_INVALID_VALUE} in ${describeRegistrySources(registry.sources)}.${didYouMean([id], ids)} Available templates: ${ids.join(", ")}.`);
|
|
58
|
+
};
|
|
55
59
|
const pickOperations = async (operations, provider) => {
|
|
56
60
|
const answer = await prompts({
|
|
57
61
|
type: "multiselect",
|
package/dist/commands/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as aliases, n as builder, r as cleanup, i as command, a as describe, s as handler, c as install, l as partitionBranchesToPrune, u as status, d as sync, f as uninstall } from "../_chunks/git-
|
|
1
|
+
export { t as aliases, n as builder, r as cleanup, i as command, a as describe, s as handler, c as install, l as partitionBranchesToPrune, u as status, d as sync, f as uninstall } from "../_chunks/git-DWmx2prl.js";
|
package/dist/commands/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { r as auth_exports } from "../_chunks/auth-CFa969Ck.js";
|
|
2
|
-
import { t as api_exports } from "../_chunks/api-
|
|
2
|
+
import { t as api_exports } from "../_chunks/api-Bus6PoKT.js";
|
|
3
3
|
import { n as api_keys_exports } from "../_chunks/api_keys-CTFHd5m_.js";
|
|
4
4
|
import { n as ask_exports } from "../_chunks/ask-Xlek1Pxh.js";
|
|
5
|
-
import { o as env_exports } from "../_chunks/env-
|
|
6
|
-
import { c as config_exports } from "../_chunks/config-
|
|
5
|
+
import { o as env_exports } from "../_chunks/env-BIP63KZa.js";
|
|
6
|
+
import { c as config_exports } from "../_chunks/config-DrlP49no.js";
|
|
7
7
|
import { u as projects_exports } from "../_chunks/projects-a3X4OFEJ.js";
|
|
8
|
-
import { a as link_exports } from "../_chunks/link-
|
|
8
|
+
import { a as link_exports } from "../_chunks/link-D89GPFoO.js";
|
|
9
9
|
import { o as mcp_exports } from "../_chunks/mcp-g8C-BZIb.js";
|
|
10
10
|
import { c as plugins_exports } from "../_chunks/plugins-CEylQlgK.js";
|
|
11
11
|
import { l as skills_exports } from "../_chunks/skills-Bv8oKKwE.js";
|
|
12
|
-
import { t as bootstrap_exports } from "../_chunks/bootstrap-
|
|
12
|
+
import { t as bootstrap_exports } from "../_chunks/bootstrap-yotTpFtF.js";
|
|
13
13
|
import { r as branches_exports } from "../_chunks/branches-Bp-5z1lM.js";
|
|
14
14
|
import { n as bucket_exports } from "../_chunks/bucket-D06bvDSa.js";
|
|
15
|
-
import { n as checkout_exports } from "../_chunks/checkout-
|
|
16
|
-
import { o as claim_exports } from "../_chunks/claim-
|
|
15
|
+
import { n as checkout_exports } from "../_chunks/checkout-C4kfW64r.js";
|
|
16
|
+
import { o as claim_exports } from "../_chunks/claim-u1NrKodG.js";
|
|
17
17
|
import { o as connection_string_exports } from "../_chunks/connection_string-6WhV4WFx.js";
|
|
18
18
|
import { a as credentials_exports } from "../_chunks/credentials-KV1jlK-n.js";
|
|
19
19
|
import { r as data_api_exports } from "../_chunks/data_api-BpSGbdZf.js";
|
|
20
20
|
import { s as databases_exports } from "../_chunks/databases-B-qY303S.js";
|
|
21
|
-
import { r as deploy_exports } from "../_chunks/deploy-
|
|
22
|
-
import { s as dev_exports } from "../_chunks/dev-
|
|
21
|
+
import { r as deploy_exports } from "../_chunks/deploy-DnjB7HV_.js";
|
|
22
|
+
import { s as dev_exports } from "../_chunks/dev-wpD1Az-t.js";
|
|
23
23
|
import { i as diff_exports } from "../_chunks/diff-dnxneH0u.js";
|
|
24
24
|
import { c as docs_exports } from "../_chunks/docs-DjYRHjGY.js";
|
|
25
25
|
import { o as feedback_exports } from "../_chunks/feedback-mQmdTRFn.js";
|
|
26
|
-
import { o as functions_exports } from "../_chunks/functions-
|
|
27
|
-
import { o as git_exports } from "../_chunks/git-
|
|
26
|
+
import { o as functions_exports } from "../_chunks/functions-v9z7zjWD.js";
|
|
27
|
+
import { o as git_exports } from "../_chunks/git-DWmx2prl.js";
|
|
28
28
|
import { o as incidents_exports } from "../_chunks/incidents-BSFkUu1P.js";
|
|
29
29
|
import { a as init_exports } from "../_chunks/init-BSwLzxjX.js";
|
|
30
30
|
import { o as inspect_exports } from "../_chunks/inspect-yFAb61qo.js";
|
|
31
31
|
import { a as ip_allow_exports } from "../_chunks/ip_allow-DBdxNEUa.js";
|
|
32
32
|
import { l as logs_exports } from "../_chunks/logs-CcVpwdDs.js";
|
|
33
|
-
import { a as neon_auth_exports } from "../_chunks/neon_auth-
|
|
33
|
+
import { a as neon_auth_exports } from "../_chunks/neon_auth-DE6X6FFV.js";
|
|
34
34
|
import { a as open_exports } from "../_chunks/open-T2nI89Oh.js";
|
|
35
35
|
import { c as operations_exports } from "../_chunks/operations-D7qGkKo3.js";
|
|
36
36
|
import { o as orgs_exports } from "../_chunks/orgs-BrvAWM8Z.js";
|
|
@@ -40,8 +40,8 @@ import { o as postgres_exports } from "../_chunks/postgres-BbEt_7c9.js";
|
|
|
40
40
|
import { o as profile_exports } from "../_chunks/profile-DWyfpl03.js";
|
|
41
41
|
import { s as realtime_exports } from "../_chunks/realtime-cV7-c2-O.js";
|
|
42
42
|
import { a as set_context_exports } from "../_chunks/set_context-ompB6d2D.js";
|
|
43
|
-
import { s as snapshots_exports } from "../_chunks/snapshots-
|
|
44
|
-
import { a as status_exports } from "../_chunks/status-
|
|
43
|
+
import { s as snapshots_exports } from "../_chunks/snapshots-BolN3uBz.js";
|
|
44
|
+
import { a as status_exports } from "../_chunks/status-DXp_w9U2.js";
|
|
45
45
|
import { d as triggers_exports } from "../_chunks/triggers-m3IBjiph.js";
|
|
46
46
|
import { s as user_exports } from "../_chunks/user-iNYSe0KI.js";
|
|
47
47
|
import { i as vpc_endpoints_exports } from "../_chunks/vpc_endpoints-C-Y4WK2M.js";
|
package/dist/commands/link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as command, r as describe, i as handler, o as quoteFlagValue, s as runLink, c as shouldOfferConfigInit } from "../_chunks/link-
|
|
1
|
+
export { t as builder, n as command, r as describe, i as handler, o as quoteFlagValue, s as runLink, c as shouldOfferConfigInit } from "../_chunks/link-D89GPFoO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as command, r as describe, i as handler } from "../_chunks/neon_auth-
|
|
1
|
+
export { t as builder, n as command, r as describe, i as handler } from "../_chunks/neon_auth-DE6X6FFV.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as SNAPSHOT_FIELDS, n as aliases, r as builder, i as command, a as describe, o as handler } from "../_chunks/snapshots-
|
|
1
|
+
export { t as SNAPSHOT_FIELDS, n as aliases, r as builder, i as command, a as describe, o as handler } from "../_chunks/snapshots-BolN3uBz.js";
|
package/dist/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as command, r as describe, i as handler } from "../_chunks/status-
|
|
1
|
+
export { t as builder, n as command, r as describe, i as handler } from "../_chunks/status-DXp_w9U2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writer } from "../writer.js";
|
|
2
|
-
import { branchIdFromProps } from "../utils/enrichers.js";
|
|
3
2
|
import { o as resolveNeonEnvVars } from "../_chunks/env-BWvi2_2f.js";
|
|
3
|
+
import { branchIdFromProps } from "../utils/enrichers.js";
|
|
4
4
|
import YAML from "yaml";
|
|
5
5
|
// src/commands/subscribe.ts
|
|
6
6
|
const builder = (argv) => argv.usage("$0 realtime subscribe \"<query>\" [options]").positional("query", {
|
package/dist/env_services.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "./errors.js";
|
|
1
2
|
import { NEON_SERVICES } from "./neon_services.js";
|
|
2
3
|
import { n as NEON_ENV_VAR_KEYS } from "./_chunks/env-EJU-0InB.js";
|
|
3
4
|
// src/env_services.ts
|
|
@@ -101,8 +102,7 @@ const parseEnvPullKeys = (raw, flag) => {
|
|
|
101
102
|
const unknown = names.filter((name) => !ENV_PULL_KEYS.some((key) => key === name));
|
|
102
103
|
if (unknown.length > 0) {
|
|
103
104
|
const displayNames = unknown.map(redactUnknownEnvValue);
|
|
104
|
-
const
|
|
105
|
-
const suggestion = suggestions.length > 0 ? ` Did you mean ${suggestions.join(" or ")}?` : "";
|
|
105
|
+
const suggestion = didYouMean(unknown.filter((name) => !name.includes("=")), ENV_PULL_KEYS);
|
|
106
106
|
throw new Error(`Unknown env variable${unknown.length === 1 ? "" : "s"} ${displayNames.join(", ")}.${suggestion} ${supported}`);
|
|
107
107
|
}
|
|
108
108
|
return ENV_PULL_KEYS.filter((key) => names.includes(key));
|
|
@@ -112,23 +112,9 @@ const redactUnknownEnvValue = (value) => {
|
|
|
112
112
|
const separator = value.indexOf("=");
|
|
113
113
|
if (separator !== -1) {
|
|
114
114
|
const key = value.slice(0, separator);
|
|
115
|
-
return isKnownEnvPullKey(key) ? `${key}=<redacted>` :
|
|
115
|
+
return isKnownEnvPullKey(key) ? `${key}=<redacted>` : REDACTED_INVALID_VALUE;
|
|
116
116
|
}
|
|
117
|
-
return
|
|
118
|
-
};
|
|
119
|
-
const suggestEnvPullKey = (value) => {
|
|
120
|
-
if (value.includes("=")) return null;
|
|
121
|
-
const closest = ENV_PULL_KEYS.map((key) => [key, editDistance(value, key)]).sort((a, b) => a[1] - b[1])[0];
|
|
122
|
-
return closest && closest[1] <= 2 ? closest[0] : null;
|
|
123
|
-
};
|
|
124
|
-
const editDistance = (left, right) => {
|
|
125
|
-
let previous = Array.from({ length: right.length + 1 }, (_, index) => index);
|
|
126
|
-
for (let leftIndex = 1; leftIndex <= left.length; leftIndex += 1) {
|
|
127
|
-
const current = [leftIndex];
|
|
128
|
-
for (let rightIndex = 1; rightIndex <= right.length; rightIndex += 1) current[rightIndex] = Math.min((previous[rightIndex] ?? 0) + 1, (current[rightIndex - 1] ?? 0) + 1, (previous[rightIndex - 1] ?? 0) + (left[leftIndex - 1] === right[rightIndex - 1] ? 0 : 1));
|
|
129
|
-
previous = current;
|
|
130
|
-
}
|
|
131
|
-
return previous[right.length] ?? right.length;
|
|
117
|
+
return REDACTED_INVALID_VALUE;
|
|
132
118
|
};
|
|
133
119
|
/** Narrow yargs' array option value without accepting any other runtime shape. */
|
|
134
120
|
const envPullFlagValue = (value) => Array.isArray(value) ? value.map(String) : void 0;
|
package/dist/errors.js
CHANGED
|
@@ -96,4 +96,31 @@ const isNetworkError = (err) => {
|
|
|
96
96
|
}
|
|
97
97
|
return false;
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Stands in for a flag value the CLI rejected. Error messages are sent as `CLI Error`
|
|
101
|
+
* telemetry, and a value typed into the wrong flag is sometimes a pasted secret, so an error
|
|
102
|
+
* names only values it can vouch for (a valid choice, a key it knows) and replaces the rest.
|
|
103
|
+
*/
|
|
104
|
+
const REDACTED_INVALID_VALUE = "<redacted invalid value>";
|
|
105
|
+
/**
|
|
106
|
+
* ` Did you mean x?` for rejected values within two edits of a valid choice, else `""`. The
|
|
107
|
+
* error cannot show what was typed, so a near miss is named by the choice it was close to.
|
|
108
|
+
*/
|
|
109
|
+
const didYouMean = (rejected, choices) => {
|
|
110
|
+
const suggestions = [...new Set(rejected.map((value) => closestChoice(value, choices)).filter((choice) => choice !== void 0))];
|
|
111
|
+
return suggestions.length > 0 ? ` Did you mean ${suggestions.join(" or ")}?` : "";
|
|
112
|
+
};
|
|
113
|
+
const closestChoice = (value, choices) => {
|
|
114
|
+
const closest = choices.map((choice) => [choice, editDistance(value, choice)]).sort((a, b) => a[1] - b[1])[0];
|
|
115
|
+
return closest && closest[1] <= 2 ? closest[0] : void 0;
|
|
116
|
+
};
|
|
117
|
+
const editDistance = (left, right) => {
|
|
118
|
+
let previous = Array.from({ length: right.length + 1 }, (_, index) => index);
|
|
119
|
+
for (let leftIndex = 1; leftIndex <= left.length; leftIndex += 1) {
|
|
120
|
+
const current = [leftIndex];
|
|
121
|
+
for (let rightIndex = 1; rightIndex <= right.length; rightIndex += 1) current[rightIndex] = Math.min((previous[rightIndex] ?? 0) + 1, (current[rightIndex - 1] ?? 0) + 1, (previous[rightIndex - 1] ?? 0) + (left[leftIndex - 1] === right[rightIndex - 1] ? 0 : 1));
|
|
122
|
+
previous = current;
|
|
123
|
+
}
|
|
124
|
+
return previous[right.length] ?? right.length;
|
|
125
|
+
};
|
|
126
|
+
export { DetailedError, NETWORK_ERROR_MESSAGE, ProjectNotLinkedError, REDACTED_INVALID_VALUE, didYouMean, isNetworkError, isUnexpectedError, matchErrorCode };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
1
2
|
// src/functions/registry.ts
|
|
2
3
|
const MAX_PATH_LENGTH = 255;
|
|
3
4
|
const MAX_FILE_BYTES = 262144;
|
|
@@ -25,7 +26,10 @@ function assertValid(validate, data, label) {
|
|
|
25
26
|
const recommendedOperations = (operations) => operations.filter((operation) => operation.recommended);
|
|
26
27
|
const resolveOperationById = (operations, id) => {
|
|
27
28
|
const operation = operations.find((candidate) => candidate.id === id);
|
|
28
|
-
if (!operation)
|
|
29
|
+
if (!operation) {
|
|
30
|
+
const ids = operations.map((candidate) => candidate.id);
|
|
31
|
+
throw new Error(`Unknown operation ${REDACTED_INVALID_VALUE}.${didYouMean([id], ids)} Available operations: ${ids.join(", ")}.`);
|
|
32
|
+
}
|
|
29
33
|
return operation;
|
|
30
34
|
};
|
|
31
35
|
const parseRegistryIndex = (text, validate) => {
|
package/dist/help.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REDACTED_INVALID_VALUE } from "./errors.js";
|
|
1
2
|
import { globalOptionsTrailer, helpWidth, wrapHelpText } from "./utils/help_text.js";
|
|
2
3
|
import { consumeBlockIfMatches, consumeNextMatching, drawPointer, splitColumns } from "./utils/ui.js";
|
|
3
4
|
import chalk from "chalk";
|
|
@@ -269,8 +270,15 @@ const failOnUsageError = (msg, err, usage) => {
|
|
|
269
270
|
if (typeof usage !== "object" || usage === null || !("help" in usage) || typeof usage.help !== "function") throw new Error("yargs no longer passes its usage instance to .fail(); update failOnUsageError for the installed yargs");
|
|
270
271
|
const help = usage.help();
|
|
271
272
|
if (typeof help !== "string") throw new Error("yargs usage.help() did not return a string");
|
|
272
|
-
throw new UsageError(msg ?? "Invalid usage", help);
|
|
273
|
+
throw new UsageError(redactRejectedChoices(msg ?? "Invalid usage"), help);
|
|
273
274
|
};
|
|
275
|
+
/**
|
|
276
|
+
* yargs answers a value outside `choices` with `Argument: <key>, Given: <values>, Choices:
|
|
277
|
+
* <choices>`, one line per flag, in English because `index.ts` pins `.locale("en")`. Each
|
|
278
|
+
* given value is JSON-quoted, which leaves U+2028/U+2029 unescaped, hence `[^\n]` over `.`;
|
|
279
|
+
* the match runs to the last `, Choices: ` so a value containing that text is still covered.
|
|
280
|
+
*/
|
|
281
|
+
const redactRejectedChoices = (msg) => msg.replace(/^(\s*Argument: [^,\n]+, Given: )[^\n]*(, Choices: )/gm, `$1${REDACTED_INVALID_VALUE}$2`);
|
|
274
282
|
function assertYargsInternals(argv) {
|
|
275
283
|
if (!("getInternalMethods" in argv) || typeof argv.getInternalMethods !== "function") throw new Error("yargs no longer exposes getInternalMethods(); update isBareParentCommand for the installed yargs");
|
|
276
284
|
}
|
package/dist/init/auth.js
CHANGED
|
@@ -4,7 +4,7 @@ import "../config.js";
|
|
|
4
4
|
import "../auth.js";
|
|
5
5
|
import { c as ensureAuth, l as existingApiClient } from "../_chunks/auth-CFa969Ck.js";
|
|
6
6
|
import { recoverFrom401 } from "../auth_recovery.js";
|
|
7
|
-
import { c as pull } from "../_chunks/env-
|
|
7
|
+
import { c as pull } from "../_chunks/env-BIP63KZa.js";
|
|
8
8
|
import { c as setupNeonMcp } from "../_chunks/mcp-g8C-BZIb.js";
|
|
9
9
|
// src/init/auth.ts
|
|
10
10
|
const isUnauthorized = (error) => isNeonApiError(error) && error.status === 401;
|
package/dist/init/deploy.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as ensureAuth } from "../_chunks/auth-CFa969Ck.js";
|
|
|
4
4
|
import { recoverFrom401 } from "../auth_recovery.js";
|
|
5
5
|
import { loadProjectConfig } from "../project.js";
|
|
6
6
|
import { loadEnvFileIntoProcess } from "../env_file.js";
|
|
7
|
-
import { r as applyCmd } from "../_chunks/config-
|
|
7
|
+
import { r as applyCmd } from "../_chunks/config-DrlP49no.js";
|
|
8
8
|
import { authContext } from "./auth.js";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { missingFunctionEnv } from "@neon/config";
|
package/dist/init/link.js
CHANGED
|
@@ -4,7 +4,7 @@ import "../config.js";
|
|
|
4
4
|
import "../auth.js";
|
|
5
5
|
import { c as ensureAuth } from "../_chunks/auth-CFa969Ck.js";
|
|
6
6
|
import { recoverFrom401 } from "../auth_recovery.js";
|
|
7
|
-
import { s as runLink } from "../_chunks/link-
|
|
7
|
+
import { s as runLink } from "../_chunks/link-D89GPFoO.js";
|
|
8
8
|
// 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/plan.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REDACTED_INVALID_VALUE, didYouMean } from "../errors.js";
|
|
1
2
|
import { getCliName } from "../utils/cli_name.js";
|
|
2
3
|
import { tryResolveAddMcpAgentId, uniqueAgentIds } from "../mcp/agents.js";
|
|
3
4
|
import { supportsSkills } from "./agents.js";
|
|
@@ -293,7 +294,7 @@ const resolveNamedAgents = (raw) => {
|
|
|
293
294
|
for (const item of raw) {
|
|
294
295
|
if (item === "*") throw new Error("--agent * is not accepted. Pass --agent <name> for each coding agent, or omit --agent to detect or pick.");
|
|
295
296
|
const id = tryResolveAddMcpAgentId(item);
|
|
296
|
-
if (!id) throw new Error(`Unknown agent:
|
|
297
|
+
if (!id) throw new Error(`Unknown agent: ${REDACTED_INVALID_VALUE}.${didYouMean([item], available)} Supported agents: ${available.join(", ")}`);
|
|
297
298
|
resolved.push(id);
|
|
298
299
|
}
|
|
299
300
|
return uniqueAgentIds(resolved);
|
package/dist/init/run.js
CHANGED
|
@@ -15,8 +15,8 @@ import { getAgentDisplayName } from "../mcp/agents.js";
|
|
|
15
15
|
import { missingPluginsCommands, pluginsCommandProblemText, pluginsInstallableAgents, unusablePluginsCommands } from "../plugins/targets.js";
|
|
16
16
|
import { AGENTS_NOT_INSTALLED, 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, toolingFailedNext, unattendedUnauthedNext } from "./copy.js";
|
|
17
17
|
import { agentsRowValue, configRowValue, formatInitDone, headingForKind, printInitBanner, printInitDone, printInitProgress, projectRowValue, shouldPrintInitBanner } from "./chrome.js";
|
|
18
|
-
import { h as initCmd, t as ConfigInstallFailed } from "../_chunks/config-
|
|
19
|
-
import { o as quoteFlagValue, s as runLink } from "../_chunks/link-
|
|
18
|
+
import { h as initCmd, t as ConfigInstallFailed } from "../_chunks/config-DrlP49no.js";
|
|
19
|
+
import { o as quoteFlagValue, s as runLink } from "../_chunks/link-D89GPFoO.js";
|
|
20
20
|
import { runAuthenticatedLink } from "./link.js";
|
|
21
21
|
import { mcpInstallableAgents } from "../mcp/targets.js";
|
|
22
22
|
import { skillsInstallableAgents } from "../skills/targets.js";
|
|
@@ -26,7 +26,7 @@ import { pullInitEnv, resolveInitConfigApi } from "./auth.js";
|
|
|
26
26
|
import { InitCancelled, raceSigint, restoreCursor } from "./cancelled.js";
|
|
27
27
|
import { pickAgentSetupInteractively, pickInitAgentsInteractively, pickInitConfigInteractively, pickInitMcpAuthInteractively, pickInitMcpConfigLocationInteractively, pickInitModeInteractively, pickInitPackageManagerInteractively, pickInitProjectSetupInteractively, pickInitServicesInteractively, pickInitSkillsInteractively } from "./wizard.js";
|
|
28
28
|
import { runToolingSteps, toolingStepCommandText } from "./tooling.js";
|
|
29
|
-
import { l as create } from "../_chunks/claim-
|
|
29
|
+
import { l as create } from "../_chunks/claim-u1NrKodG.js";
|
|
30
30
|
import { INIT_CONFIG_SERVICES_CONFLICT, configPlanFromResolution, initEnvPullAfterConfig, resolveInitConfigChoice } from "./choices.js";
|
|
31
31
|
import { detectInitEnvironment } from "./detect.js";
|
|
32
32
|
import { createInitFunnel, emitInitStart, finishInitFunnel, initStartProperties, recordInitError, recordInitExit } from "./funnel.js";
|