neon 9.6.3 → 9.7.1
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/{checkout-Bt1oulMk.js → checkout-C5RXRmRy.js} +2 -2
- package/dist/_chunks/{config-CElR9VVr.js → config-ClvDw0Xs.js} +5 -0
- package/dist/_chunks/{deploy-31cJHgFM.js → deploy-D1T3_cYZ.js} +1 -1
- package/dist/_chunks/{dev-BSNBoD9L.js → dev-hNDBX-5l.js} +1 -1
- package/dist/_chunks/{git-DJ4s5YDM.js → git-DbJwG1SU.js} +2 -2
- package/dist/_chunks/{link-MmP8EpPR.js → link-CHscI_10.js} +1 -1
- package/dist/_chunks/{realtime-BwtzYf5a.js → realtime-cV7-c2-O.js} +33 -11
- package/dist/_chunks/{status-DQbHTo8I.js → status-DdagkQp2.js} +1 -1
- package/dist/commands/checkout.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/functions_new.js +1 -1
- package/dist/commands/git.js +1 -1
- package/dist/commands/index.js +8 -8
- package/dist/commands/link.js +1 -1
- package/dist/commands/realtime.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/config_format.js +7 -1
- package/dist/config_template.js +19 -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 +2 -2
- package/dist/skills/plan.js +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1007,7 +1007,7 @@ $ neon skills status --global
|
|
|
1007
1007
|
|
|
1008
1008
|
On a TTY the command asks which agents and which skills, then installs. Detected agents start selected from project-folder markers such as `.cursor`. Default skills start selected. `neon-postgres-agent-platforms` is offered and starts unselected.
|
|
1009
1009
|
|
|
1010
|
-
`-y` skips those questions and installs the default skills into detected agents: project-folder markers such as `.cursor`, else the agent driving the CLI. `--agent` / `-a` names coding agents and skips the agent picker. `--skill` / `-s` names specific skills and skips the skill picker; it does not select agents. `--global -y` uses installed apps, else the host CLI agent. Without a TTY, pass `-y
|
|
1010
|
+
`-y` skips those questions and installs the default skills into detected agents: project-folder markers such as `.cursor`, else the agent driving the CLI. `--agent` / `-a` names coding agents and skips the agent picker. `--skill` / `-s` names specific skills and skips the skill picker; it does not select agents. `--global -y` uses installed apps, else the host CLI agent. Without a TTY, pass `-y` or `--skill <name>`; both install into detected agents unless `--agent <name>` names them. If no agent is detected, it exits: pass `--agent <name>`, run from a supported agent, or run in a terminal without `-y` to pick.
|
|
1011
1011
|
|
|
1012
1012
|
`--skill` names by source repo: `neondatabase/agent-skills` (`neon`, `neon-ai-gateway`, `neon-auth`, `neon-functions`, `neon-object-storage`, `neon-postgres`, `neon-realtime`); `neondatabase/neon-for-agent-platforms` (`neon-postgres-agent-platforms`).
|
|
1013
1013
|
|
|
@@ -12,8 +12,8 @@ import { fillSingleProject, listAllProjectBranches } from "../utils/enrichers.js
|
|
|
12
12
|
import { buildCheckoutEvent, readGitContext } from "../utils/git.js";
|
|
13
13
|
import { buildHookBranch, loadHookConfig, resolveHookEnv, runCheckoutAfterHook, runCheckoutBeforeHook, runCreateAfterHook, runCreateBeforeHook } from "../utils/hooks.js";
|
|
14
14
|
import { n as autoPullEnvAfterPin } from "./env-DxcO3oJk.js";
|
|
15
|
-
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-
|
|
16
|
-
import { i as handler$1 } from "./link-
|
|
15
|
+
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-ClvDw0Xs.js";
|
|
16
|
+
import { i as handler$1 } from "./link-CHscI_10.js";
|
|
17
17
|
import chalk from "chalk";
|
|
18
18
|
import prompts from "prompts";
|
|
19
19
|
// src/commands/checkout.ts
|
|
@@ -658,6 +658,8 @@ const STATUS_FIELDS = [
|
|
|
658
658
|
"expires_at",
|
|
659
659
|
"auth",
|
|
660
660
|
"data_api",
|
|
661
|
+
"realtime",
|
|
662
|
+
"realtime_origins",
|
|
661
663
|
"compute",
|
|
662
664
|
"scale_to_zero",
|
|
663
665
|
"ttl"
|
|
@@ -674,6 +676,7 @@ const formatComputeUnits = (settings) => {
|
|
|
674
676
|
const writeStatusTables = (props, live, view) => {
|
|
675
677
|
const compute = view.branch?.postgres?.computeSettings;
|
|
676
678
|
const suspend = compute?.suspendTimeout;
|
|
679
|
+
const realtime = view.preview?.realtime;
|
|
677
680
|
const out = writer(props);
|
|
678
681
|
out.write({
|
|
679
682
|
project: `${live.project.name} (${live.project.id})`,
|
|
@@ -687,6 +690,8 @@ const writeStatusTables = (props, live, view) => {
|
|
|
687
690
|
expires_at: live.branch.expiresAt,
|
|
688
691
|
auth: view.auth ? "enabled" : void 0,
|
|
689
692
|
data_api: view.dataApi ? "enabled" : void 0,
|
|
693
|
+
realtime: realtime ? "enabled" : void 0,
|
|
694
|
+
realtime_origins: realtime === void 0 ? void 0 : realtime === true ? "any" : realtime.allowedOrigins.join(", "),
|
|
690
695
|
compute: formatComputeUnits(compute),
|
|
691
696
|
scale_to_zero: suspend === void 0 ? void 0 : suspend === false ? "off" : String(suspend),
|
|
692
697
|
ttl: view.branch?.ttl
|
|
@@ -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-ClvDw0Xs.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({
|
|
@@ -7,7 +7,7 @@ import { t as NEON_DEV_FUNCTION_PORTS } from "./env-EJU-0InB.js";
|
|
|
7
7
|
import { branchIdResolve } from "../utils/enrichers.js";
|
|
8
8
|
import { bundleEntry } from "../utils/esbuild.js";
|
|
9
9
|
import { a as resolveDevEnv } from "./env-CFBmcKyo.js";
|
|
10
|
-
import { f as envFlag } from "./config-
|
|
10
|
+
import { f as envFlag } from "./config-ClvDw0Xs.js";
|
|
11
11
|
import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
12
12
|
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
13
13
|
import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -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-CHscI_10.js";
|
|
9
|
+
import { o as handler$1 } from "./checkout-C5RXRmRy.js";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
import chalk from "chalk";
|
|
@@ -14,7 +14,7 @@ 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
16
|
import { n as autoPullEnvAfterPin } from "./env-DxcO3oJk.js";
|
|
17
|
-
import { h as initCmd } from "./config-
|
|
17
|
+
import { h as initCmd } from "./config-ClvDw0Xs.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";
|
|
@@ -15,15 +15,30 @@ var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
15
|
handler: () => handler,
|
|
16
16
|
rotateSecret: () => rotateSecret
|
|
17
17
|
});
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
/**
|
|
18
|
+
const POLL_INTERVAL_MS = Number(process.env.NEON_REALTIME_POLL_INTERVAL_MS) || 1e3;
|
|
19
|
+
const POLL_TIMEOUT_MS = Number(process.env.NEON_REALTIME_POLL_TIMEOUT_MS) || 6e4;
|
|
20
|
+
/** Enable Realtime or update its allowed origins, waiting until the branch applies it. */
|
|
21
21
|
const enable = async (props) => {
|
|
22
22
|
const realtime = props.allowedOrigins === void 0 ? true : { allowedOrigins: props.allowedOrigins };
|
|
23
23
|
defineConfig({ preview: { realtime } });
|
|
24
24
|
const branchId = await branchIdFromProps(props);
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const [{ fromSdkError, getNeonClient }, { NeonWaitTimeoutError }] = await Promise.all([import("../neon_client.js"), import("@neon/sdk")]);
|
|
26
|
+
await getNeonClient(props).realtime.enable({
|
|
27
|
+
projectId: props.projectId,
|
|
28
|
+
branchId,
|
|
29
|
+
...props.allowedOrigins === void 0 ? {} : { allowed_origins: [...props.allowedOrigins] }
|
|
30
|
+
}, {
|
|
31
|
+
waitForReadiness: props.wait,
|
|
32
|
+
wait: {
|
|
33
|
+
pollIntervalMs: POLL_INTERVAL_MS,
|
|
34
|
+
timeoutMs: POLL_TIMEOUT_MS
|
|
35
|
+
}
|
|
36
|
+
}).catch((error) => {
|
|
37
|
+
if (error instanceof NeonWaitTimeoutError) throw new Error(`Timed out waiting for Realtime on branch ${branchId}. The change was requested and may still be in progress; run the command again to keep waiting.`);
|
|
38
|
+
throw fromSdkError(error, props.apiHost);
|
|
39
|
+
});
|
|
40
|
+
if (props.wait) log.info("Realtime is enabled on branch %s.", branchId);
|
|
41
|
+
else log.info("Realtime enable requested for branch %s.", branchId);
|
|
27
42
|
};
|
|
28
43
|
/** Request Realtime deprovisioning for a branch. */
|
|
29
44
|
const disable = async (props) => {
|
|
@@ -37,7 +52,7 @@ const rotateSecret = async (props) => {
|
|
|
37
52
|
await retryOnLock(() => props.apiClient.rotateProjectBranchRealtimeSecret(props.projectId, branchId));
|
|
38
53
|
log.info("Realtime secret rotation requested for branch %s.", branchId);
|
|
39
54
|
if (!props.wait) return;
|
|
40
|
-
const deadline = Date.now() +
|
|
55
|
+
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
41
56
|
do {
|
|
42
57
|
const { data } = await props.apiClient.getProjectBranchRealtime(props.projectId, branchId);
|
|
43
58
|
if (!data.pending) {
|
|
@@ -47,7 +62,7 @@ const rotateSecret = async (props) => {
|
|
|
47
62
|
}
|
|
48
63
|
const remainingMs = deadline - Date.now();
|
|
49
64
|
if (remainingMs <= 0) break;
|
|
50
|
-
await new Promise((resolve) => setTimeout(resolve, Math.min(
|
|
65
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(POLL_INTERVAL_MS, remainingMs)));
|
|
51
66
|
} while (Date.now() < deadline);
|
|
52
67
|
throw new Error(`Timed out waiting for Realtime secret rotation on branch ${branchId}. It may still be in progress.`);
|
|
53
68
|
};
|
|
@@ -62,10 +77,17 @@ const builder = (argv) => argv.usage("$0 realtime <sub-command> [options]").opti
|
|
|
62
77
|
describe: "Branch ID or name",
|
|
63
78
|
type: "string"
|
|
64
79
|
}
|
|
65
|
-
}).middleware(fillSingleProject).command("enable", "Enable Realtime on a branch", (yargs) => yargs.strict().
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
}).middleware(fillSingleProject).command("enable", "Enable Realtime on a branch", (yargs) => yargs.strict().options({
|
|
81
|
+
"allowed-origin": {
|
|
82
|
+
describe: "Allowed browser origin (repeatable). \"*\" allows every origin",
|
|
83
|
+
type: "array",
|
|
84
|
+
string: true
|
|
85
|
+
},
|
|
86
|
+
wait: {
|
|
87
|
+
describe: "Wait until Realtime is enabled on the branch",
|
|
88
|
+
type: "boolean",
|
|
89
|
+
default: true
|
|
90
|
+
}
|
|
69
91
|
}), (args) => enable({
|
|
70
92
|
...args,
|
|
71
93
|
...args.allowedOrigin !== void 0 ? { allowedOrigins: args.allowedOrigin } : {}
|
|
@@ -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-ClvDw0Xs.js";
|
|
4
4
|
// src/commands/status.ts
|
|
5
5
|
var status_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
builder: () => builder,
|
|
@@ -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-C5RXRmRy.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-ClvDw0Xs.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-D1T3_cYZ.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-hNDBX-5l.js";
|
|
@@ -9,7 +9,7 @@ import { writer } from "../writer.js";
|
|
|
9
9
|
import { formatInitDone, printInitDone } from "../init/chrome.js";
|
|
10
10
|
import { FUNCTION_SLUG_PATTERN, deriveFunctionSlug } from "../utils/function_slug.js";
|
|
11
11
|
import { displayPath } from "./env_output.js";
|
|
12
|
-
import { _ as missingDependencies, d as ensureConfigPackages, g as installCommandFrom } from "../_chunks/config-
|
|
12
|
+
import { _ as missingDependencies, d as ensureConfigPackages, g as installCommandFrom } from "../_chunks/config-ClvDw0Xs.js";
|
|
13
13
|
import { recommendedOperations } from "../functions/registry.js";
|
|
14
14
|
import { collidingFiles, operationsFromFlags, planConfigRegistration, planEnvExample, planScaffold, writeScaffold } from "../functions/scaffold.js";
|
|
15
15
|
import { describeRegistrySources, openRegistry } from "../functions/source.js";
|
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-DbJwG1SU.js";
|
package/dist/commands/index.js
CHANGED
|
@@ -3,28 +3,28 @@ import { t as api_exports } from "../_chunks/api-1MKsfpY3.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
5
|
import { o as env_exports } from "../_chunks/env-DxcO3oJk.js";
|
|
6
|
-
import { c as config_exports } from "../_chunks/config-
|
|
6
|
+
import { c as config_exports } from "../_chunks/config-ClvDw0Xs.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-CHscI_10.js";
|
|
9
9
|
import { o as mcp_exports } from "../_chunks/mcp-SvqWzHnT.js";
|
|
10
10
|
import { c as plugins_exports } from "../_chunks/plugins-BwUZQ6Ic.js";
|
|
11
11
|
import { l as skills_exports } from "../_chunks/skills-Bv8oKKwE.js";
|
|
12
12
|
import { t as bootstrap_exports } from "../_chunks/bootstrap-B73qVB39.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-
|
|
15
|
+
import { n as checkout_exports } from "../_chunks/checkout-C5RXRmRy.js";
|
|
16
16
|
import { o as claim_exports } from "../_chunks/claim-Dv5wARrN.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-BMBNmW0t.js";
|
|
19
19
|
import { r as data_api_exports } from "../_chunks/data_api-CHDwvMTG.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-D1T3_cYZ.js";
|
|
22
|
+
import { s as dev_exports } from "../_chunks/dev-hNDBX-5l.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
26
|
import { o as functions_exports } from "../_chunks/functions-PHaU-kRb.js";
|
|
27
|
-
import { o as git_exports } from "../_chunks/git-
|
|
27
|
+
import { o as git_exports } from "../_chunks/git-DbJwG1SU.js";
|
|
28
28
|
import { o as incidents_exports } from "../_chunks/incidents-D6rDn1g2.js";
|
|
29
29
|
import { a as init_exports } from "../_chunks/init-D2fClHtC.js";
|
|
30
30
|
import { o as inspect_exports } from "../_chunks/inspect-yFAb61qo.js";
|
|
@@ -38,10 +38,10 @@ import { o as psql_exports } from "../_chunks/psql-BcxiPR4W.js";
|
|
|
38
38
|
import { f as roles_exports } from "../_chunks/roles-BELJqjTy.js";
|
|
39
39
|
import { o as postgres_exports } from "../_chunks/postgres-BhR1vUFM.js";
|
|
40
40
|
import { o as profile_exports } from "../_chunks/profile-Bf5qqUN1.js";
|
|
41
|
-
import { s as realtime_exports } from "../_chunks/realtime-
|
|
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
43
|
import { s as snapshots_exports } from "../_chunks/snapshots-DxNhjcco.js";
|
|
44
|
-
import { a as status_exports } from "../_chunks/status-
|
|
44
|
+
import { a as status_exports } from "../_chunks/status-DdagkQp2.js";
|
|
45
45
|
import { d as triggers_exports } from "../_chunks/triggers-m3IBjiph.js";
|
|
46
46
|
import { s as user_exports } from "../_chunks/user-D9mC430O.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-CHscI_10.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as builder, n as command, r as describe, i as disable, a as enable, o as handler, c as rotateSecret } from "../_chunks/realtime-
|
|
1
|
+
export { t as builder, n as command, r as describe, i as disable, a as enable, o as handler, c as rotateSecret } from "../_chunks/realtime-cV7-c2-O.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-DdagkQp2.js";
|
package/dist/config_format.js
CHANGED
|
@@ -30,7 +30,13 @@ const toNeonConfigView = (resolved, preview) => {
|
|
|
30
30
|
if (resolved.authEnabled) view.auth = true;
|
|
31
31
|
if (resolved.dataApiEnabled) view.dataApi = toDataApiView(resolved.dataApi);
|
|
32
32
|
const previewView = toPreviewView(preview);
|
|
33
|
-
if (
|
|
33
|
+
if (resolved.realtimePolicy === "enabled") {
|
|
34
|
+
const allowedOrigins = resolved.realtime?.allowedOrigins;
|
|
35
|
+
view.preview = {
|
|
36
|
+
realtime: allowedOrigins?.length ? { allowedOrigins: [...allowedOrigins] } : true,
|
|
37
|
+
...previewView
|
|
38
|
+
};
|
|
39
|
+
} else if (previewView) view.preview = previewView;
|
|
34
40
|
const branch = {};
|
|
35
41
|
if (resolved.parent !== void 0) branch.parent = resolved.parent;
|
|
36
42
|
if (resolved.ttlSeconds !== void 0) branch.ttl = formatDurationSeconds(resolved.ttlSeconds);
|
package/dist/config_template.js
CHANGED
|
@@ -155,6 +155,20 @@ const renderSeededBranch = (view) => {
|
|
|
155
155
|
...at(1, "}),")
|
|
156
156
|
].join("\n")}\n`;
|
|
157
157
|
};
|
|
158
|
+
/** The `preview.realtime` entry for a policy seeded from live state, or "" when it is off. */
|
|
159
|
+
const renderSeededRealtime = (view) => {
|
|
160
|
+
const realtime = view.preview?.realtime;
|
|
161
|
+
if (realtime === void 0) return "";
|
|
162
|
+
if (realtime === true) return block(1, "preview", at(2, "realtime: true,")).join("\n");
|
|
163
|
+
const origins = realtime.allowedOrigins.map(renderScalar);
|
|
164
|
+
const [oneLine] = at(3, `allowedOrigins: [${origins.join(", ")}],`);
|
|
165
|
+
const allowedOrigins = oneLine.length <= 80 ? [oneLine] : [
|
|
166
|
+
...at(3, "allowedOrigins: ["),
|
|
167
|
+
...at(4, ...origins.map((origin) => `${origin},`)),
|
|
168
|
+
...at(3, "],")
|
|
169
|
+
];
|
|
170
|
+
return block(1, "preview", block(2, "realtime", allowedOrigins)).join("\n");
|
|
171
|
+
};
|
|
158
172
|
/** GA service keys for a policy seeded from live state. */
|
|
159
173
|
const renderSeededGaServices = (view, branchName) => {
|
|
160
174
|
const lines = [];
|
|
@@ -181,7 +195,11 @@ const renderSeededGaServices = (view, branchName) => {
|
|
|
181
195
|
* than an empty `defineConfig({})`: seeding found nothing, and the caller says so.
|
|
182
196
|
*/
|
|
183
197
|
const renderNeonConfigFromView = (view, branchName) => {
|
|
184
|
-
const services = [
|
|
198
|
+
const services = [
|
|
199
|
+
renderSeededRealtime(view),
|
|
200
|
+
view.auth ? " auth: true," : "",
|
|
201
|
+
view.dataApi ? renderDataApiEntry(dataApiChoiceFromView(view.dataApi)).trimEnd() : ""
|
|
202
|
+
].filter((line) => line !== "");
|
|
185
203
|
const gaServices = renderSeededGaServices(view, branchName);
|
|
186
204
|
const branch = renderSeededBranch(view);
|
|
187
205
|
if (services.length === 0 && gaServices === "" && branch === "") return {
|
package/dist/init/deploy.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as ensureAuth } from "../_chunks/auth-B1AqRN6z.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-ClvDw0Xs.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-B1AqRN6z.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-CHscI_10.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
|
@@ -85,7 +85,8 @@ const noDetectedAgentsMessage = (input) => {
|
|
|
85
85
|
const lead = input.scope === "project" ? "No coding agents detected in this project." : "No coding agents detected.";
|
|
86
86
|
const name = input.nameAgent === true;
|
|
87
87
|
let hint;
|
|
88
|
-
if (input.fix === "
|
|
88
|
+
if (input.fix === "run-in-terminal") hint = "Pass --agent <name>, run this command from a supported agent, or run it in a terminal to pick one.";
|
|
89
|
+
else if (input.fix === "pass-yes") {
|
|
89
90
|
const detected = input.scope === "project" ? "Pass -y to use project folders, else the host CLI agent" : input.scope === "global" ? "Pass -y to use installed apps, else the host CLI agent" : "Pass -y to use project folders, else the host CLI agent, else installed apps";
|
|
90
91
|
hint = name ? `${detected}, --agent <name> to name them, or run from a terminal to pick one.` : `${detected}, or run from a terminal to pick one.`;
|
|
91
92
|
} else hint = name ? "Pass --agent <name>, run this command from a supported agent, or omit -y in a terminal to pick one." : "Run this command from a supported agent, or omit -y in a terminal to pick one.";
|
package/dist/init/run.js
CHANGED
|
@@ -14,8 +14,8 @@ import { getAgentDisplayName } from "../mcp/agents.js";
|
|
|
14
14
|
import { missingPluginsCommands, pluginsCommandProblemText, pluginsInstallableAgents, unusablePluginsCommands } from "../plugins/targets.js";
|
|
15
15
|
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";
|
|
16
16
|
import { agentsRowValue, configRowValue, formatInitDone, headingForKind, printInitBanner, printInitDone, printInitProgress, projectRowValue, shouldPrintInitBanner } from "./chrome.js";
|
|
17
|
-
import { h as initCmd, t as ConfigInstallFailed } from "../_chunks/config-
|
|
18
|
-
import { o as quoteFlagValue, s as runLink } from "../_chunks/link-
|
|
17
|
+
import { h as initCmd, t as ConfigInstallFailed } from "../_chunks/config-ClvDw0Xs.js";
|
|
18
|
+
import { o as quoteFlagValue, s as runLink } from "../_chunks/link-CHscI_10.js";
|
|
19
19
|
import { runAuthenticatedLink } from "./link.js";
|
|
20
20
|
import { mcpInstallableAgents } from "../mcp/targets.js";
|
|
21
21
|
import { skillsInstallableAgents } from "../skills/targets.js";
|
package/dist/skills/plan.js
CHANGED
|
@@ -32,7 +32,7 @@ async function resolveSkillsPlan(options) {
|
|
|
32
32
|
cwd: options.cwd,
|
|
33
33
|
...options.detectInstalledAgents ? { detectInstalledAgents: options.detectInstalledAgents } : {}
|
|
34
34
|
});
|
|
35
|
-
const detected =
|
|
35
|
+
const detected = !prompt && options.agents.length === 0 ? await collectYesAgents({
|
|
36
36
|
detected: () => scoped,
|
|
37
37
|
detectAgent: options.detectAgent ?? detectAgent,
|
|
38
38
|
acceptHost: (id) => availableSet.has(id)
|
|
@@ -45,7 +45,7 @@ async function resolveSkillsPlan(options) {
|
|
|
45
45
|
nonInteractiveMessage: noDetectedAgentsMessage({
|
|
46
46
|
scope,
|
|
47
47
|
supported: available,
|
|
48
|
-
fix: options.yes ? "run-without-yes" : "
|
|
48
|
+
fix: options.yes ? "run-without-yes" : "run-in-terminal",
|
|
49
49
|
nameAgent: true
|
|
50
50
|
}),
|
|
51
51
|
resolveSpecified: (raw) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"yaml": "^2.9.0",
|
|
74
74
|
"yargs": "17.7.2",
|
|
75
75
|
"yoctocolors": "^2.1.2",
|
|
76
|
-
"@neon/config": "1.14.
|
|
76
|
+
"@neon/config": "1.14.4",
|
|
77
|
+
"@neon/config-runtime": "1.12.7",
|
|
77
78
|
"@neon/realtime": "0.2.1",
|
|
78
|
-
"@neon/
|
|
79
|
-
"@neon/sdk": "7.14.1"
|
|
79
|
+
"@neon/sdk": "7.14.2"
|
|
80
80
|
},
|
|
81
81
|
"optionalDependencies": {
|
|
82
82
|
"@napi-rs/keyring": "1.3.0",
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
"typescript": "^5.9.0",
|
|
114
114
|
"vitest": "^3.0.9",
|
|
115
115
|
"@neon-internals/cli-core": "0.0.0",
|
|
116
|
-
"@neon-internals/env-core": "0.0.
|
|
116
|
+
"@neon-internals/env-core": "0.0.55",
|
|
117
|
+
"@neon/env": "2.1.7",
|
|
117
118
|
"@neon/e2e-harness": "0.0.0",
|
|
118
|
-
"@neon/env": "2.1.6",
|
|
119
119
|
"@neon/functions": "0.11.0"
|
|
120
120
|
},
|
|
121
121
|
"publishConfig": {
|