neon 9.9.0 → 9.9.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/dist/_chunks/{checkout-9zUY4N8W.js → checkout-F7PRl-Nf.js} +3 -3
- package/dist/_chunks/{claim-D7fATGLw.js → claim-DHuMf7GY.js} +1 -1
- package/dist/_chunks/{computes-OKFUNFee.js → computes-Cgc9-J33.js} +4 -15
- package/dist/_chunks/{config-CUWOp44_.js → config-Dyvrv889.js} +1 -1
- package/dist/_chunks/{deploy-BUkXtacE.js → deploy-fzFvEdZN.js} +1 -1
- package/dist/_chunks/{dev-Dp6LuAe2.js → dev-ZgBcYqnZ.js} +3 -3
- package/dist/_chunks/{git-BISnX9MB.js → git-Ov1-tWen.js} +2 -2
- package/dist/_chunks/{link-CfbTC-or.js → link-JQXbQuxd.js} +2 -2
- package/dist/_chunks/{postgres-BhR1vUFM.js → postgres-BbEt_7c9.js} +1 -1
- package/dist/_chunks/{status-BM42rYe1.js → status-CJMDKch2.js} +1 -1
- package/dist/commands/checkout.js +1 -1
- package/dist/commands/claim.js +1 -1
- package/dist/commands/computes.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_new.js +1 -1
- package/dist/commands/git.js +1 -1
- package/dist/commands/index.js +10 -10
- package/dist/commands/link.js +1 -1
- package/dist/commands/postgres.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/subscribe.js +1 -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/run.js +3 -3
- package/dist/utils/inspect_db.js +1 -1
- package/dist/utils/inspect_queries.js +43 -17
- package/package.json +7 -7
- package/dist/_chunks/{env-DxcO3oJk.js → env-Bko0oXq9.js} +1 -1
|
@@ -11,9 +11,9 @@ import { looksLikeBranchId } from "../utils/formats.js";
|
|
|
11
11
|
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
|
-
import { n as autoPullEnvAfterPin } from "./env-
|
|
15
|
-
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-
|
|
16
|
-
import { i as handler$1 } from "./link-
|
|
14
|
+
import { n as autoPullEnvAfterPin } from "./env-Bko0oXq9.js";
|
|
15
|
+
import { a as applyPolicyOnCreate, f as envFlag, l as createBranchFromPolicyOnCheckout } from "./config-Dyvrv889.js";
|
|
16
|
+
import { i as handler$1 } from "./link-JQXbQuxd.js";
|
|
17
17
|
import chalk from "chalk";
|
|
18
18
|
import prompts from "prompts";
|
|
19
19
|
// 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-Bko0oXq9.js";
|
|
16
16
|
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
17
|
import open from "open";
|
|
18
18
|
import prompts from "prompts";
|
|
@@ -152,26 +152,15 @@ const updateRequest = (props) => {
|
|
|
152
152
|
if (Object.keys(endpoint).length === 0) throw new Error("Nothing to update. Pass --cu, --suspend-timeout, --name, or --disabled.");
|
|
153
153
|
return endpoint;
|
|
154
154
|
};
|
|
155
|
-
/**
|
|
156
|
-
* Mutations return the compute as it was when the request was accepted, so after waiting
|
|
157
|
-
* the compute is read again to show the state the change produced.
|
|
158
|
-
*/
|
|
159
155
|
const mutate = async (props, action, run) => {
|
|
160
156
|
const { neon, fail } = await sdk(props);
|
|
161
|
-
const
|
|
157
|
+
const compute = await run(neon, {
|
|
162
158
|
projectId: props.projectId,
|
|
163
159
|
endpointId: props.id
|
|
164
|
-
}
|
|
165
|
-
try {
|
|
166
|
-
const accepted = await run(neon, params, { waitForReadiness: props.wait });
|
|
167
|
-
if (!props.wait) {
|
|
168
|
-
writeCompute(props, accepted, `Compute ${props.id}: ${action.verb} accepted, not yet applied`);
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
writeCompute(props, await neon.postgres.endpoints.get(params), `Compute ${props.id} ${action.done}`);
|
|
172
|
-
} catch (error) {
|
|
160
|
+
}, { waitForReadiness: props.wait }).catch((error) => {
|
|
173
161
|
throw fail(error);
|
|
174
|
-
}
|
|
162
|
+
});
|
|
163
|
+
writeCompute(props, compute, props.wait ? `Compute ${props.id} ${action.done}` : `Compute ${props.id}: ${action.verb} accepted, not yet applied`);
|
|
175
164
|
};
|
|
176
165
|
const update = (props) => {
|
|
177
166
|
const endpoint = updateRequest(props);
|
|
@@ -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-Bko0oXq9.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-Dyvrv889.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 { isClaimableEnvTarget } from "../claimable/state.js";
|
|
|
4
4
|
import { getCliName } from "../utils/cli_name.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-CFBmcKyo.js";
|
|
10
|
-
import { f as envFlag } from "./config-CUWOp44_.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-Dyvrv889.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";
|
|
@@ -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-JQXbQuxd.js";
|
|
9
|
+
import { o as handler$1 } from "./checkout-F7PRl-Nf.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-Bko0oXq9.js";
|
|
17
|
+
import { h as initCmd } from "./config-Dyvrv889.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,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
|
-
import { a as computes_exports } from "./computes-
|
|
2
|
+
import { a as computes_exports } from "./computes-Cgc9-J33.js";
|
|
3
3
|
import { o as connection_string_exports } from "./connection_string-6WhV4WFx.js";
|
|
4
4
|
import { s as databases_exports } from "./databases-B-qY303S.js";
|
|
5
5
|
import { o as psql_exports } from "./psql-BcxiPR4W.js";
|
|
@@ -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-Dyvrv889.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-F7PRl-Nf.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-DHuMf7GY.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as aliases, n as builder, r as builderFor, i as command, o as deleteCompute, s as describe, c as get, l as handler, u as list, d as restart, f as start, p as suspend, m as update } from "../_chunks/computes-
|
|
1
|
+
export { t as aliases, n as builder, r as builderFor, i as command, o as deleteCompute, s as describe, c as get, l as handler, u as list, d as restart, f as start, p as suspend, m as update } from "../_chunks/computes-Cgc9-J33.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-Dyvrv889.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-fzFvEdZN.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-ZgBcYqnZ.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-Bko0oXq9.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-Dyvrv889.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-Ov1-tWen.js";
|
package/dist/commands/index.js
CHANGED
|
@@ -2,29 +2,29 @@ import { r as auth_exports } from "../_chunks/auth-CEb642X3.js";
|
|
|
2
2
|
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
|
-
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-Bko0oXq9.js";
|
|
6
|
+
import { c as config_exports } from "../_chunks/config-Dyvrv889.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-JQXbQuxd.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-
|
|
16
|
-
import { o as claim_exports } from "../_chunks/claim-
|
|
15
|
+
import { n as checkout_exports } from "../_chunks/checkout-F7PRl-Nf.js";
|
|
16
|
+
import { o as claim_exports } from "../_chunks/claim-DHuMf7GY.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-fzFvEdZN.js";
|
|
22
|
+
import { s as dev_exports } from "../_chunks/dev-ZgBcYqnZ.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-Ov1-tWen.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";
|
|
@@ -36,12 +36,12 @@ import { c as operations_exports } from "../_chunks/operations-D7qGkKo3.js";
|
|
|
36
36
|
import { o as orgs_exports } from "../_chunks/orgs-BrvAWM8Z.js";
|
|
37
37
|
import { o as psql_exports } from "../_chunks/psql-BcxiPR4W.js";
|
|
38
38
|
import { f as roles_exports } from "../_chunks/roles-BELJqjTy.js";
|
|
39
|
-
import { o as postgres_exports } from "../_chunks/postgres-
|
|
39
|
+
import { o as postgres_exports } from "../_chunks/postgres-BbEt_7c9.js";
|
|
40
40
|
import { o as profile_exports } from "../_chunks/profile-BVkmMwHO.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
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-CJMDKch2.js";
|
|
45
45
|
import { d as triggers_exports } from "../_chunks/triggers-m3IBjiph.js";
|
|
46
46
|
import { s as user_exports } from "../_chunks/user-C1pTJS9O.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-JQXbQuxd.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as aliases, n as builder, r as command, i as describe, a as handler } from "../_chunks/postgres-
|
|
1
|
+
export { t as aliases, n as builder, r as command, i as describe, a as handler } from "../_chunks/postgres-BbEt_7c9.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-CJMDKch2.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-CFBmcKyo.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/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-CEb642X3.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-Bko0oXq9.js";
|
|
8
8
|
import { c as setupNeonMcp } from "../_chunks/mcp-SvqWzHnT.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-CEb642X3.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-Dyvrv889.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-CEb642X3.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-JQXbQuxd.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/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-Dyvrv889.js";
|
|
18
|
+
import { o as quoteFlagValue, s as runLink } from "../_chunks/link-JQXbQuxd.js";
|
|
19
19
|
import { runAuthenticatedLink } from "./link.js";
|
|
20
20
|
import { mcpInstallableAgents } from "../mcp/targets.js";
|
|
21
21
|
import { skillsInstallableAgents } from "../skills/targets.js";
|
|
@@ -25,7 +25,7 @@ import { pullInitEnv, resolveInitConfigApi } 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, toolingStepCommandText } from "./tooling.js";
|
|
28
|
-
import { l as create } from "../_chunks/claim-
|
|
28
|
+
import { l as create } from "../_chunks/claim-DHuMf7GY.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, recordInitError, recordInitExit } from "./funnel.js";
|
package/dist/utils/inspect_db.js
CHANGED
|
@@ -215,7 +215,7 @@ const runInspectQuery = async (connectionUri, sql, options = {}) => {
|
|
|
215
215
|
try {
|
|
216
216
|
const ext = options.requiresExtension;
|
|
217
217
|
if (ext) {
|
|
218
|
-
if ((await connection.query(`SELECT 1 FROM pg_extension WHERE extname = '${ext}';`)).rows.length === 0) throw new Error(`This query needs the "${ext}" extension, which is not installed. Enable it with: CREATE EXTENSION ${ext};`);
|
|
218
|
+
if ((await connection.query(`SELECT /* neon inspect */ 1 FROM pg_extension WHERE extname = '${ext}';`)).rows.length === 0) throw new Error(`This query needs the "${ext}" extension, which is not installed. Enable it with: CREATE EXTENSION ${ext};`);
|
|
219
219
|
}
|
|
220
220
|
const result = await connection.query(sql);
|
|
221
221
|
return rowsFrom(result);
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
// src/utils/inspect_queries.ts
|
|
2
|
+
/**
|
|
3
|
+
* Drops `pg_stat_statements` rows (alias `s`) that the user's workload did not
|
|
4
|
+
* run: Neon's compute manager runs its setup as `cloud_admin`; Neon's proxy
|
|
5
|
+
* resets each pooled session it serves HTTP queries on with the listed
|
|
6
|
+
* statements, as the user's role; and every diagnostic here carries the
|
|
7
|
+
* `neon inspect` comment. The comment has to follow the statement's first
|
|
8
|
+
* keyword: Postgres drops a leading comment from the text it stores.
|
|
9
|
+
* `@neon/tools` keeps an identical copy for `database.inspect`.
|
|
10
|
+
*
|
|
11
|
+
* The role is matched by name because `--db-url` runs this against any
|
|
12
|
+
* Postgres, where an app may well log in as a superuser. `query` is NULL when
|
|
13
|
+
* Postgres cannot read its stored text, hence `COALESCE`.
|
|
14
|
+
*/
|
|
15
|
+
const WORKLOAD_STATEMENTS_FILTER = `
|
|
16
|
+
NOT EXISTS (
|
|
17
|
+
SELECT 1 FROM pg_roles r
|
|
18
|
+
WHERE r.oid = s.userid AND r.rolname = 'cloud_admin'
|
|
19
|
+
)
|
|
20
|
+
AND COALESCE(s.query, '') NOT IN (
|
|
21
|
+
'CLOSE ALL', 'SET SESSION AUTHORIZATION DEFAULT', 'RESET ALL',
|
|
22
|
+
'DEALLOCATE ALL', 'UNLISTEN *', 'SELECT pg_advisory_unlock_all()',
|
|
23
|
+
'DISCARD TEMP', 'DISCARD SEQUENCES'
|
|
24
|
+
)
|
|
25
|
+
AND COALESCE(s.query, '') NOT LIKE '%/* neon inspect */%'`;
|
|
2
26
|
const INSPECT_QUERIES = {
|
|
3
27
|
"table-sizes": {
|
|
4
28
|
describe: "Size of each table (including TOAST), largest first (pg_table_size)",
|
|
@@ -10,7 +34,7 @@ const INSPECT_QUERIES = {
|
|
|
10
34
|
],
|
|
11
35
|
emptyMessage: "No user tables found.",
|
|
12
36
|
sql: `
|
|
13
|
-
SELECT
|
|
37
|
+
SELECT /* neon inspect */
|
|
14
38
|
n.nspname AS schema,
|
|
15
39
|
c.relname AS name,
|
|
16
40
|
pg_size_pretty(pg_table_size(c.oid)) AS size
|
|
@@ -32,7 +56,7 @@ const INSPECT_QUERIES = {
|
|
|
32
56
|
],
|
|
33
57
|
emptyMessage: "No indexes found.",
|
|
34
58
|
sql: `
|
|
35
|
-
SELECT
|
|
59
|
+
SELECT /* neon inspect */
|
|
36
60
|
n.nspname AS schema,
|
|
37
61
|
c.relname AS name,
|
|
38
62
|
pg_size_pretty(pg_relation_size(c.oid)) AS size
|
|
@@ -55,7 +79,7 @@ const INSPECT_QUERIES = {
|
|
|
55
79
|
],
|
|
56
80
|
emptyMessage: "No unused indexes detected.",
|
|
57
81
|
sql: `
|
|
58
|
-
SELECT
|
|
82
|
+
SELECT /* neon inspect */
|
|
59
83
|
s.schemaname || '.' || s.relname AS "table",
|
|
60
84
|
s.indexrelname AS index,
|
|
61
85
|
pg_size_pretty(pg_relation_size(s.indexrelid)) AS index_size,
|
|
@@ -78,7 +102,7 @@ const INSPECT_QUERIES = {
|
|
|
78
102
|
],
|
|
79
103
|
emptyMessage: "No user tables found.",
|
|
80
104
|
sql: `
|
|
81
|
-
SELECT
|
|
105
|
+
SELECT /* neon inspect */
|
|
82
106
|
schemaname AS schema,
|
|
83
107
|
relname AS name,
|
|
84
108
|
seq_scan AS count
|
|
@@ -98,7 +122,7 @@ const INSPECT_QUERIES = {
|
|
|
98
122
|
emptyMessage: "No long-running queries in this database.",
|
|
99
123
|
emptyMessageAll: "No long-running queries in any database.",
|
|
100
124
|
sql: `
|
|
101
|
-
SELECT
|
|
125
|
+
SELECT /* neon inspect */
|
|
102
126
|
pid,
|
|
103
127
|
(now() - query_start)::text AS duration,
|
|
104
128
|
state,
|
|
@@ -124,7 +148,7 @@ const INSPECT_QUERIES = {
|
|
|
124
148
|
],
|
|
125
149
|
emptyMessage: "No active queries running longer than 30 seconds.",
|
|
126
150
|
sql: `
|
|
127
|
-
WITH activity AS MATERIALIZED (
|
|
151
|
+
WITH /* neon inspect */ activity AS MATERIALIZED (
|
|
128
152
|
SELECT *
|
|
129
153
|
FROM pg_stat_activity
|
|
130
154
|
WHERE state = 'active'
|
|
@@ -180,7 +204,7 @@ const INSPECT_QUERIES = {
|
|
|
180
204
|
emptyMessage: "No locks held in this database.",
|
|
181
205
|
emptyMessageAll: "No locks held in any database.",
|
|
182
206
|
sql: `
|
|
183
|
-
SELECT
|
|
207
|
+
SELECT /* neon inspect */
|
|
184
208
|
a.pid,
|
|
185
209
|
c.relname,
|
|
186
210
|
l.mode,
|
|
@@ -198,7 +222,7 @@ const INSPECT_QUERIES = {
|
|
|
198
222
|
`
|
|
199
223
|
},
|
|
200
224
|
outliers: {
|
|
201
|
-
describe: "Queries taking the most cumulative execution time (needs pg_stat_statements)",
|
|
225
|
+
describe: "Queries taking the most cumulative execution time, leaving out Neon's own setup and session-reset statements and inspect's own queries (needs pg_stat_statements)",
|
|
202
226
|
scope: "database",
|
|
203
227
|
fields: [
|
|
204
228
|
"total_exec_time",
|
|
@@ -209,7 +233,7 @@ const INSPECT_QUERIES = {
|
|
|
209
233
|
emptyMessage: "No statements recorded yet.",
|
|
210
234
|
requiresExtension: "pg_stat_statements",
|
|
211
235
|
sql: `
|
|
212
|
-
SELECT
|
|
236
|
+
SELECT /* neon inspect */
|
|
213
237
|
(interval '1 millisecond' * total_exec_time)::text AS total_exec_time,
|
|
214
238
|
to_char(
|
|
215
239
|
(total_exec_time / nullif(sum(total_exec_time) OVER (), 0)) * 100,
|
|
@@ -220,12 +244,13 @@ const INSPECT_QUERIES = {
|
|
|
220
244
|
FROM pg_stat_statements s
|
|
221
245
|
JOIN pg_database d ON d.oid = s.dbid
|
|
222
246
|
WHERE d.datname = current_database()
|
|
247
|
+
AND ${WORKLOAD_STATEMENTS_FILTER}
|
|
223
248
|
ORDER BY total_exec_time DESC
|
|
224
249
|
LIMIT 25;
|
|
225
250
|
`
|
|
226
251
|
},
|
|
227
252
|
calls: {
|
|
228
|
-
describe: "Most frequently called queries (needs pg_stat_statements)",
|
|
253
|
+
describe: "Most frequently called queries, leaving out Neon's own setup and session-reset statements and inspect's own queries (needs pg_stat_statements)",
|
|
229
254
|
scope: "database",
|
|
230
255
|
fields: [
|
|
231
256
|
"ncalls",
|
|
@@ -236,7 +261,7 @@ const INSPECT_QUERIES = {
|
|
|
236
261
|
emptyMessage: "No statements recorded yet.",
|
|
237
262
|
requiresExtension: "pg_stat_statements",
|
|
238
263
|
sql: `
|
|
239
|
-
SELECT
|
|
264
|
+
SELECT /* neon inspect */
|
|
240
265
|
calls AS ncalls,
|
|
241
266
|
(interval '1 millisecond' * total_exec_time)::text AS total_exec_time,
|
|
242
267
|
to_char(
|
|
@@ -247,6 +272,7 @@ const INSPECT_QUERIES = {
|
|
|
247
272
|
FROM pg_stat_statements s
|
|
248
273
|
JOIN pg_database d ON d.oid = s.dbid
|
|
249
274
|
WHERE d.datname = current_database()
|
|
275
|
+
AND ${WORKLOAD_STATEMENTS_FILTER}
|
|
250
276
|
ORDER BY calls DESC
|
|
251
277
|
LIMIT 25;
|
|
252
278
|
`
|
|
@@ -258,7 +284,7 @@ const INSPECT_QUERIES = {
|
|
|
258
284
|
emptyMessage: "No LFC stats available.",
|
|
259
285
|
requiresExtension: "neon",
|
|
260
286
|
sql: `
|
|
261
|
-
WITH lfc AS (
|
|
287
|
+
WITH /* neon inspect */ lfc AS (
|
|
262
288
|
SELECT lfc_key AS k, lfc_value AS v
|
|
263
289
|
FROM neon_get_lfc_stats() t(lfc_key text, lfc_value bigint)
|
|
264
290
|
)
|
|
@@ -285,7 +311,7 @@ const INSPECT_QUERIES = {
|
|
|
285
311
|
emptyMessage: "No working-set estimate available.",
|
|
286
312
|
requiresExtension: "neon",
|
|
287
313
|
sql: `
|
|
288
|
-
SELECT
|
|
314
|
+
SELECT /* neon inspect */
|
|
289
315
|
w.window,
|
|
290
316
|
pg_size_pretty(w.working_set_bytes) AS working_set,
|
|
291
317
|
pg_size_pretty(pg_size_bytes(current_setting('neon.file_cache_size_limit'))) AS lfc_size,
|
|
@@ -319,7 +345,7 @@ const INSPECT_QUERIES = {
|
|
|
319
345
|
],
|
|
320
346
|
emptyMessage: "No user tables found.",
|
|
321
347
|
sql: `
|
|
322
|
-
SELECT
|
|
348
|
+
SELECT /* neon inspect */
|
|
323
349
|
n.nspname AS schema,
|
|
324
350
|
c.relname AS "table",
|
|
325
351
|
to_char(psut.last_vacuum, 'YYYY-MM-DD HH24:MI') AS last_vacuum,
|
|
@@ -352,7 +378,7 @@ const INSPECT_QUERIES = {
|
|
|
352
378
|
],
|
|
353
379
|
emptyMessage: "No bloat estimate available.",
|
|
354
380
|
sql: `
|
|
355
|
-
WITH constants AS (
|
|
381
|
+
WITH /* neon inspect */ constants AS (
|
|
356
382
|
SELECT current_setting('block_size')::numeric AS bs, 23 AS hdr, 8 AS ma
|
|
357
383
|
),
|
|
358
384
|
bloat_info AS (
|
|
@@ -417,7 +443,7 @@ const INSPECT_QUERIES = {
|
|
|
417
443
|
],
|
|
418
444
|
emptyMessage: "No replication slots found.",
|
|
419
445
|
sql: `
|
|
420
|
-
SELECT
|
|
446
|
+
SELECT /* neon inspect */
|
|
421
447
|
s.slot_name,
|
|
422
448
|
s.slot_type,
|
|
423
449
|
CASE
|
|
@@ -460,7 +486,7 @@ const INSPECT_QUERIES = {
|
|
|
460
486
|
emptyMessage: "No subscriptions found on this database.",
|
|
461
487
|
emptyMessageAll: "No subscriptions found on any database.",
|
|
462
488
|
sql: `
|
|
463
|
-
SELECT
|
|
489
|
+
SELECT /* neon inspect */
|
|
464
490
|
sub.subname AS subscription,
|
|
465
491
|
sr.srrelid::regclass::text AS table_name,
|
|
466
492
|
CASE sr.srsubstate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "9.9.
|
|
3
|
+
"version": "9.9.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/
|
|
77
|
-
"@neon/
|
|
78
|
-
"@neon/
|
|
79
|
-
"@neon/
|
|
76
|
+
"@neon/config-runtime": "1.12.9",
|
|
77
|
+
"@neon/sdk": "7.15.0",
|
|
78
|
+
"@neon/realtime": "0.2.1",
|
|
79
|
+
"@neon/config": "1.14.6"
|
|
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.57",
|
|
117
117
|
"@neon/e2e-harness": "0.0.0",
|
|
118
|
-
"@neon/env": "2.1.
|
|
118
|
+
"@neon/env": "2.1.9",
|
|
119
119
|
"@neon/functions": "0.11.0"
|
|
120
120
|
},
|
|
121
121
|
"publishConfig": {
|
|
@@ -7,8 +7,8 @@ import { deprecatedServiceMessage, parseServices, servicesFlagValue, servicesOpt
|
|
|
7
7
|
import { mergeEnvFile, readEnvFile, resolveEnvFilePath } from "../env_file.js";
|
|
8
8
|
import { n as NEON_ENV_VAR_KEYS } from "./env-EJU-0InB.js";
|
|
9
9
|
import { ENV_PULL_KEY_HELP, ENV_PULL_SERVICES, envKeysForSelection, envPullFlagValue, isLegacyFunctionBaseUrlKey, ownedEnvServiceKeys, parseEnvPullKeys } from "../env_services.js";
|
|
10
|
-
import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
|
|
11
10
|
import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "./env-CFBmcKyo.js";
|
|
11
|
+
import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
|
|
12
12
|
import { warnAiGateway } from "../utils/ai_gateway_notice.js";
|
|
13
13
|
import { formatPulledEnv, pulledBranch } from "../commands/env_output.js";
|
|
14
14
|
import { existsSync } from "node:fs";
|