neon 4.7.0 → 4.9.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.
Files changed (58) hide show
  1. package/README.md +49 -59
  2. package/dist/_chunks/{auth_selection-ktL6uoEe.js → auth_selection-pitMFzDe.js} +1 -1
  3. package/dist/_chunks/{credential_io-B1JxWELN.js → credential_io-YeAxg9Xn.js} +2 -2
  4. package/dist/_chunks/{paths-g3DRqJiD.js → paths-DMq0Lt7a.js} +1 -1
  5. package/dist/_chunks/{profiles-D95AeZ5v.js → profiles-CvnFEQyd.js} +1 -1
  6. package/dist/analytics.js +2 -2
  7. package/dist/auth_context.js +1 -1
  8. package/dist/commands/auth.js +12 -9
  9. package/dist/commands/bootstrap.js +72 -43
  10. package/dist/commands/branches.js +29 -14
  11. package/dist/commands/claim.js +1 -1
  12. package/dist/commands/init.js +80 -79
  13. package/dist/commands/link.js +78 -63
  14. package/dist/commands/mcp.js +1 -1
  15. package/dist/commands/plugins.js +4 -4
  16. package/dist/commands/profile.js +4 -4
  17. package/dist/commands/projects.js +17 -6
  18. package/dist/commands/skills.js +1 -1
  19. package/dist/config.js +1 -1
  20. package/dist/credential_io.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/init/child.js +36 -0
  23. package/dist/init/plan.js +47 -0
  24. package/dist/init/tooling.js +43 -0
  25. package/dist/init/wizard.js +42 -0
  26. package/dist/mcp/targets.js +1 -1
  27. package/dist/plugins/plan.js +1 -1
  28. package/dist/plugins/targets.js +5 -1
  29. package/dist/retire_credential.js +1 -1
  30. package/dist/utils/middlewares.js +1 -1
  31. package/dist/utils/package_manager.js +10 -5
  32. package/package.json +15 -16
  33. package/dist/init/auth.js +0 -53
  34. package/dist/init/build_config.js +0 -4
  35. package/dist/init/detect_agent.js +0 -63
  36. package/dist/init/editors.js +0 -19
  37. package/dist/init/enrich_output.js +0 -61
  38. package/dist/init/extension.js +0 -154
  39. package/dist/init/inspect.js +0 -249
  40. package/dist/init/interactive.js +0 -529
  41. package/dist/init/neonctl.js +0 -139
  42. package/dist/init/orchestrate.js +0 -189
  43. package/dist/init/phases/auth.js +0 -195
  44. package/dist/init/phases/cleanup.js +0 -27
  45. package/dist/init/phases/db.js +0 -257
  46. package/dist/init/phases/getting_started.js +0 -218
  47. package/dist/init/phases/mcp.js +0 -219
  48. package/dist/init/phases/migrations.js +0 -250
  49. package/dist/init/phases/neon_auth.js +0 -116
  50. package/dist/init/phases/setup.js +0 -582
  51. package/dist/init/phases/skills.js +0 -86
  52. package/dist/init/phases/status.js +0 -82
  53. package/dist/init/profile_cli.js +0 -56
  54. package/dist/init/resolve_context.js +0 -105
  55. package/dist/init/route_command.js +0 -93
  56. package/dist/init/skills.js +0 -206
  57. package/dist/init/types.js +0 -1
  58. package/dist/init/vsix.js +0 -89
@@ -1,116 +0,0 @@
1
- import { neonctlCmd } from "../neonctl.js";
2
- import { SKILL_REFERENCE_URLS, ensureSkillsUpToDate } from "../skills.js";
3
- //#region src/init/phases/neon_auth.ts
4
- async function handleNeonAuthPhase(options) {
5
- if (options.projectId && !/^[\w.:-]+$/.test(options.projectId)) throw new Error(`Invalid project ID: "${options.projectId}". Expected alphanumeric, hyphens, underscores, dots, or colons.`);
6
- if (options.agent) await ensureSkillsUpToDate(options.agent);
7
- if (options.info) return {
8
- phase: "neon_auth",
9
- status: "info",
10
- nextAction: {
11
- type: "ask_user",
12
- question: "Neon Auth provides drop-in user authentication that integrates with your Neon database. It handles user sign-up, sign-in, and session management. Would you like to set it up?",
13
- options: [{
14
- value: "yes",
15
- label: "Yes, set up Neon Auth"
16
- }, {
17
- value: "no",
18
- label: "No, skip for now"
19
- }],
20
- context: `Full documentation: ${SKILL_REFERENCE_URLS.neonAuth}`,
21
- responseMapping: {
22
- yes: { args: [
23
- "neon-auth",
24
- "--json",
25
- ...options.agent ? ["--agent", options.agent] : [],
26
- "--setup",
27
- ...options.projectId ? ["--project-id", options.projectId] : []
28
- ] },
29
- no: { args: [
30
- "finalize",
31
- "--json",
32
- ...options.agent ? ["--agent", options.agent] : []
33
- ] }
34
- }
35
- }
36
- };
37
- if (options.setup) return {
38
- phase: "neon_auth",
39
- status: "in_progress",
40
- nextAction: {
41
- type: "agent_action",
42
- prerequisite: SKILL_REFERENCE_URLS.neonAuth,
43
- steps: [
44
- {
45
- id: "provision",
46
- description: `Enable Neon Auth on the project using the Neon CLI. Run: \`${neonctlCmd()} neon-auth enable --project-id <project-id> --output json\`. You can check current status with: \`${neonctlCmd()} neon-auth status --project-id <project-id> --output json\`.` + (options.projectId ? ` Project ID: ${options.projectId}.` : " Determine the project ID from the .neon file in the project root, or from the DATABASE_URL in .env, or ask the user.")
47
- },
48
- {
49
- id: "install_packages",
50
- description: "Install required packages per the skill reference. The exact packages depend on the framework (Next.js, React, etc.)."
51
- },
52
- {
53
- id: "create_components",
54
- description: "Create auth components per the skill reference. Follow the exact patterns and imports specified."
55
- },
56
- {
57
- id: "pull_env",
58
- description: `Run \`${neonctlCmd()} env pull\` to populate the NEON_AUTH_BASE_URL, NEON_AUTH_JWKS_URL, and other Neon Auth environment variables. This reads the .neon context file and writes the auth URLs to the project's env file.`,
59
- command: `${neonctlCmd()} env pull`
60
- }
61
- ],
62
- onComplete: {
63
- type: "run_neon_init",
64
- args: [
65
- "finalize",
66
- "--json",
67
- ...options.agent ? ["--agent", options.agent] : []
68
- ]
69
- }
70
- }
71
- };
72
- return {
73
- phase: "neon_auth",
74
- status: "optional",
75
- nextAction: {
76
- type: "ask_user",
77
- question: "Would you like to set up Neon Auth for user authentication in your app?",
78
- options: [
79
- {
80
- value: "yes",
81
- label: "Yes, set up Neon Auth"
82
- },
83
- {
84
- value: "no",
85
- label: "No, skip for now"
86
- },
87
- {
88
- value: "info",
89
- label: "Tell me more about Neon Auth"
90
- }
91
- ],
92
- context: "Neon Auth provides drop-in user authentication that integrates with your Neon database.",
93
- responseMapping: {
94
- yes: { args: [
95
- "neon-auth",
96
- "--json",
97
- ...options.agent ? ["--agent", options.agent] : [],
98
- "--setup"
99
- ] },
100
- no: { args: [
101
- "finalize",
102
- "--json",
103
- ...options.agent ? ["--agent", options.agent] : []
104
- ] },
105
- info: { args: [
106
- "neon-auth",
107
- "--json",
108
- ...options.agent ? ["--agent", options.agent] : [],
109
- "--info"
110
- ] }
111
- }
112
- }
113
- };
114
- }
115
- //#endregion
116
- export { handleNeonAuthPhase };