neon 8.16.1 → 8.17.0

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 CHANGED
@@ -99,6 +99,9 @@ neon claim create --service auth --service data-api
99
99
 
100
100
  # Create the project in another region (default: aws-us-east-2)
101
101
  neon claim create --region-id aws-eu-central-1
102
+
103
+ # Name the project (default: a generated name). The project keeps the name when claimed
104
+ neon claim create --project-name my-app
102
105
  ```
103
106
 
104
107
  When the current directory has a `neon.ts`, `claim create` also requests every service
@@ -907,7 +910,7 @@ $ neon init -y --agent cursor --project-id <project-id> \
907
910
  --mcp-auth oauth --mcp-config-location project --mcp-project-scoped
908
911
  ```
909
912
 
910
- Without a TTY, pass `-y` or enough flags to answer every question. `-y` alone is Recommended. `-y` with `--skill`, MCP flags, `--no-agent-setup`, or `--claimable` is Custom: those flags, Recommended defaults for the rest. `--skill` selects skills (not the plugin). MCP flags select skills and MCP. `--agent` skips agent selection and, without `-y`, selects Custom. `--no-link` skips project linking without asking. `--no-config` skips `neon.ts`. `--services` implies creating `neon.ts`. `--org-id`, `--project-id`, `--project-name`, `--region-id`, and `--branch` select linking. With `--claimable`, `--region-id` picks the claimable project's region.
913
+ Without a TTY, pass `-y` or enough flags to answer every question. `-y` alone is Recommended. `-y` with `--skill`, MCP flags, `--no-agent-setup`, or `--claimable` is Custom: those flags, Recommended defaults for the rest. `--skill` selects skills (not the plugin). MCP flags select skills and MCP. `--agent` skips agent selection and, without `-y`, selects Custom. `--no-link` skips project linking without asking. `--no-config` skips `neon.ts`. `--services` implies creating `neon.ts`. `--org-id`, `--project-id`, `--project-name`, `--region-id`, and `--branch` select linking. With `--claimable`, `--region-id` picks the claimable project's region and `--project-name` names it.
911
914
 
912
915
  `--project-id`, `--org-id`, `--project-name`, `--region-id`, and `--branch` are forwarded to `link`. They select linking. A linked directory is not relinked unless you pass one of those flags.
913
916
 
@@ -114,6 +114,9 @@ const builder = (argv) => argv.usage("$0 claim <sub-command> [options]").option(
114
114
  })).option("region-id", {
115
115
  describe: "Region ID for the new project (e.g. aws-eu-central-1). Defaults to aws-us-east-2",
116
116
  type: "string"
117
+ }).option("project-name", {
118
+ describe: "Name for the new project. The project keeps it when claimed",
119
+ type: "string"
117
120
  }).option("file", {
118
121
  describe: "Target dotenv file. Defaults to an existing .env, otherwise .env.local",
119
122
  type: "string"
@@ -211,6 +214,7 @@ const create = async (props) => {
211
214
  capabilities: claimableCapabilities(props.services ?? []),
212
215
  source: "neon_cli",
213
216
  ...props.regionId !== void 0 ? { regionId: props.regionId } : {},
217
+ ...props.projectName !== void 0 ? { projectName: props.projectName } : {},
214
218
  ...props.dataApi ? { dataApi: props.dataApi } : {}
215
219
  });
216
220
  const stored = {
@@ -61,7 +61,7 @@ const builder = (yargs) => yargs.usage("$0 init [options]").option("context-file
61
61
  describe: "Forwarded to link: existing project ID to link to",
62
62
  type: "string"
63
63
  }).option("project-name", {
64
- describe: "Forwarded to link: name for a new project",
64
+ describe: "Name for a new project, forwarded to link or to the claimable project",
65
65
  type: "string"
66
66
  }).option("region-id", {
67
67
  describe: "Region for a new project, forwarded to link or to the claimable project",
@@ -182,6 +182,7 @@ var ClaimableClient = class {
182
182
  capabilities: input.capabilities,
183
183
  source: input.source,
184
184
  ...input.regionId !== void 0 ? { region_id: input.regionId } : {},
185
+ ...input.projectName !== void 0 ? { project_name: input.projectName } : {},
185
186
  ...input.dataApi !== void 0 ? { data_api: input.dataApi } : {}
186
187
  }
187
188
  }));
@@ -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-m5sIJdm5.js";
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-DhV0f_5o.js";
@@ -13,7 +13,7 @@ import { t as bootstrap_exports } from "../_chunks/bootstrap-vAtWRZXa.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
15
  import { n as checkout_exports } from "../_chunks/checkout-CNBIS3gA.js";
16
- import { o as claim_exports } from "../_chunks/claim-m5sIJdm5.js";
16
+ import { o as claim_exports } from "../_chunks/claim-DhV0f_5o.js";
17
17
  import { a as connection_string_exports } from "../_chunks/connection_string-C9e7N4xk.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";
@@ -25,7 +25,7 @@ import { c as docs_exports } from "../_chunks/docs-BpLiSTmm.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
27
  import { o as git_exports } from "../_chunks/git-DRUZBCmZ.js";
28
- import { a as init_exports } from "../_chunks/init-CcVJb492.js";
28
+ import { a as init_exports } from "../_chunks/init-D2fClHtC.js";
29
29
  import { o as inspect_exports } from "../_chunks/inspect-yFAb61qo.js";
30
30
  import { a as ip_allow_exports } from "../_chunks/ip_allow-DBdxNEUa.js";
31
31
  import { l as logs_exports } from "../_chunks/logs-BB4uvblR.js";
@@ -1 +1 @@
1
- export { t as builder, n as command, r as describe, i as handler } from "../_chunks/init-CcVJb492.js";
1
+ export { t as builder, n as command, r as describe, i as handler } from "../_chunks/init-D2fClHtC.js";
package/dist/init/copy.js CHANGED
@@ -36,7 +36,7 @@ const MCP_AUTH_API_KEY_TITLE = "Use a Neon API key";
36
36
  const MCP_AUTH_API_KEY_DESCRIPTION = "Reuse an existing MCP key or create a key after CLI authentication.";
37
37
  const CLAIMABLE_MCP_API_KEY = "Claimable project setup cannot create an account API key for MCP. Use --mcp-auth oauth.";
38
38
  const CLAIMABLE_NO_LINK = "--claimable cannot be combined with --no-link.";
39
- const CLAIMABLE_ACCOUNT_FLAGS = "--claimable cannot be combined with --org-id, --project-id, --project-name, or --branch.";
39
+ const CLAIMABLE_ACCOUNT_FLAGS = "--claimable cannot be combined with --org-id, --project-id, or --branch.";
40
40
  const CLAIMABLE_ALREADY_LINKED = "--claimable cannot run in a directory that is already linked. Omit --claimable, or unlink first.";
41
41
  const PROJECT_SETUP_MESSAGE = "How would you like to get a Neon project?";
42
42
  const PROJECT_SETUP_LINK_TITLE = "Sign in to Neon";
package/dist/init/run.js CHANGED
@@ -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-m5sIJdm5.js";
28
+ import { l as create } from "../_chunks/claim-DhV0f_5o.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";
@@ -165,7 +165,8 @@ const defaultCreateClaimable = async (input) => {
165
165
  envPull: false,
166
166
  cwd: input.cwd,
167
167
  ...input.profile !== void 0 ? { profile: input.profile } : {},
168
- ...input.regionId !== void 0 ? { regionId: input.regionId } : {}
168
+ ...input.regionId !== void 0 ? { regionId: input.regionId } : {},
169
+ ...input.projectName !== void 0 ? { projectName: input.projectName } : {}
169
170
  });
170
171
  };
171
172
  const runInit = async (props) => {
@@ -207,8 +208,8 @@ const runInit = async (props) => {
207
208
  ...props.regionId ? { regionId: props.regionId } : {},
208
209
  ...props.branch ? { branch: props.branch } : {}
209
210
  };
210
- const hasAccountLinkInputs = props.orgId !== void 0 || props.projectId !== void 0 || props.projectName !== void 0 || props.branch !== void 0;
211
- const hasExplicitLinkInputs = hasAccountLinkInputs || props.regionId !== void 0;
211
+ const hasAccountLinkInputs = props.orgId !== void 0 || props.projectId !== void 0 || props.branch !== void 0;
212
+ const hasExplicitLinkInputs = hasAccountLinkInputs || props.projectName !== void 0 || props.regionId !== void 0;
212
213
  const funnel = createInitFunnel();
213
214
  let outcome = "error";
214
215
  let printed = false;
@@ -481,7 +482,8 @@ const runInit = async (props) => {
481
482
  output: props.output,
482
483
  apiKey: props.apiKey,
483
484
  ...props.profile !== void 0 ? { profile: props.profile } : {},
484
- ...props.regionId !== void 0 ? { regionId: props.regionId } : {}
485
+ ...props.regionId !== void 0 ? { regionId: props.regionId } : {},
486
+ ...props.projectName !== void 0 ? { projectName: props.projectName } : {}
485
487
  });
486
488
  funnel.link = "claimable";
487
489
  claimExpiresAt = readLinkedClaimableCredentials(configDir, readContextFile(contextFile))?.expiresAt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neon",
3
- "version": "8.16.1",
3
+ "version": "8.17.0",
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-runtime": "1.11.0",
76
+ "@neon/config": "1.10.0",
77
77
  "@neon/realtime": "0.1.2",
78
78
  "@neon/sdk": "7.7.0",
79
- "@neon/config": "1.10.0"
79
+ "@neon/config-runtime": "1.11.0"
80
80
  },
81
81
  "optionalDependencies": {
82
82
  "@napi-rs/keyring": "1.3.0",
@@ -112,11 +112,11 @@
112
112
  "tsx": "4.22.3",
113
113
  "typescript": "^5.9.0",
114
114
  "vitest": "^3.0.9",
115
- "@neon-internals/env-core": "0.0.38",
116
115
  "@neon-internals/cli-core": "0.0.0",
116
+ "@neon-internals/env-core": "0.0.38",
117
+ "@neon/e2e-harness": "0.0.0",
117
118
  "@neon/env": "1.6.8",
118
- "@neon/functions": "0.11.0",
119
- "@neon/e2e-harness": "0.0.0"
119
+ "@neon/functions": "0.11.0"
120
120
  },
121
121
  "publishConfig": {
122
122
  "access": "public",