@percher/core 0.2.1 → 0.2.3

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 (84) hide show
  1. package/dist/commands/billing.d.ts +43 -0
  2. package/dist/commands/billing.d.ts.map +1 -0
  3. package/dist/commands/billing.js +65 -0
  4. package/dist/commands/billing.js.map +1 -0
  5. package/dist/commands/data.d.ts +2 -0
  6. package/dist/commands/data.d.ts.map +1 -1
  7. package/dist/commands/data.js +1 -0
  8. package/dist/commands/data.js.map +1 -1
  9. package/dist/commands/delete.d.ts +15 -0
  10. package/dist/commands/delete.d.ts.map +1 -0
  11. package/dist/commands/delete.js +26 -0
  12. package/dist/commands/delete.js.map +1 -0
  13. package/dist/commands/deploys.d.ts +45 -0
  14. package/dist/commands/deploys.d.ts.map +1 -0
  15. package/dist/commands/deploys.js +73 -0
  16. package/dist/commands/deploys.js.map +1 -0
  17. package/dist/commands/diagnose.d.ts +75 -0
  18. package/dist/commands/diagnose.d.ts.map +1 -0
  19. package/dist/commands/diagnose.js +102 -0
  20. package/dist/commands/diagnose.js.map +1 -0
  21. package/dist/commands/doctor.d.ts.map +1 -1
  22. package/dist/commands/doctor.js +58 -13
  23. package/dist/commands/doctor.js.map +1 -1
  24. package/dist/commands/export.d.ts +39 -0
  25. package/dist/commands/export.d.ts.map +1 -0
  26. package/dist/commands/export.js +107 -0
  27. package/dist/commands/export.js.map +1 -0
  28. package/dist/commands/import-project.d.ts +21 -0
  29. package/dist/commands/import-project.d.ts.map +1 -0
  30. package/dist/commands/import-project.js +134 -0
  31. package/dist/commands/import-project.js.map +1 -0
  32. package/dist/commands/insights.d.ts +44 -0
  33. package/dist/commands/insights.d.ts.map +1 -0
  34. package/dist/commands/insights.js +54 -0
  35. package/dist/commands/insights.js.map +1 -0
  36. package/dist/commands/mcp.d.ts +29 -0
  37. package/dist/commands/mcp.d.ts.map +1 -0
  38. package/dist/commands/mcp.js +35 -0
  39. package/dist/commands/mcp.js.map +1 -0
  40. package/dist/commands/publish.d.ts +35 -1
  41. package/dist/commands/publish.d.ts.map +1 -1
  42. package/dist/commands/publish.js +163 -9
  43. package/dist/commands/publish.js.map +1 -1
  44. package/dist/commands/push.d.ts.map +1 -1
  45. package/dist/commands/push.js +8 -4
  46. package/dist/commands/push.js.map +1 -1
  47. package/dist/commands/rename.d.ts +21 -0
  48. package/dist/commands/rename.d.ts.map +1 -0
  49. package/dist/commands/rename.js +18 -0
  50. package/dist/commands/rename.js.map +1 -0
  51. package/dist/commands/reset-superuser.d.ts +16 -0
  52. package/dist/commands/reset-superuser.d.ts.map +1 -0
  53. package/dist/commands/reset-superuser.js +17 -0
  54. package/dist/commands/reset-superuser.js.map +1 -0
  55. package/dist/detect.d.ts.map +1 -1
  56. package/dist/detect.js.map +1 -1
  57. package/dist/error-classifier.d.ts +16 -0
  58. package/dist/error-classifier.d.ts.map +1 -1
  59. package/dist/error-classifier.js +135 -3
  60. package/dist/error-classifier.js.map +1 -1
  61. package/dist/errors.d.ts +1 -1
  62. package/dist/errors.d.ts.map +1 -1
  63. package/dist/errors.js.map +1 -1
  64. package/dist/index.d.ts +14 -3
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +14 -3
  67. package/dist/index.js.map +1 -1
  68. package/dist/integrations.d.ts +24 -0
  69. package/dist/integrations.d.ts.map +1 -0
  70. package/dist/integrations.js +106 -0
  71. package/dist/integrations.js.map +1 -0
  72. package/dist/plans.d.ts +36 -0
  73. package/dist/plans.d.ts.map +1 -1
  74. package/dist/plans.js +76 -1
  75. package/dist/plans.js.map +1 -1
  76. package/dist/qr.d.ts +5 -0
  77. package/dist/qr.d.ts.map +1 -0
  78. package/dist/qr.js +10 -0
  79. package/dist/qr.js.map +1 -0
  80. package/dist/templates.d.ts +24 -0
  81. package/dist/templates.d.ts.map +1 -1
  82. package/dist/templates.js +331 -0
  83. package/dist/templates.js.map +1 -1
  84. package/package.json +3 -3
@@ -1,10 +1,50 @@
1
+ function extractEnvVarsFromLog(combined) {
2
+ const envVarPattern = /process\.env\.(\w+)\s*(?:is\s+)?(?:undefined|not set)|(?:missing|undefined).*?(\b[A-Z][A-Z0-9_]{2,}\b)/gi;
3
+ const vars = new Set();
4
+ for (const match of combined.matchAll(envVarPattern)) {
5
+ const name = match[1] ?? match[2];
6
+ if (name)
7
+ vars.add(name);
8
+ }
9
+ return [...vars];
10
+ }
11
+ function extractModuleFromLog(combined) {
12
+ const match = combined.match(/Cannot find module ['"]([^'"]+)['"]/i) ??
13
+ combined.match(/ERR_MODULE_NOT_FOUND.*?['"]([^'"]+)['"]/i);
14
+ return match?.[1];
15
+ }
1
16
  const patterns = [
17
+ {
18
+ // Pre-build / infra-side failures: the build never actually started, so
19
+ // the build log is empty and the user is left with "deployment failed,
20
+ // see the log below" pointing at nothing. Match the symptoms reported
21
+ // in the field — nixpacks unable to fetch from cache.nixos.org, the
22
+ // worker daemon being unreachable, raw fetch failures from RemoteDeployer.
23
+ // Order matters: this MUST come before the runtime ECONNREFUSED match
24
+ // below, which talks about *the deployed app* failing to dial out.
25
+ pattern: /Unable to connect.*?(access the url|cache\.nixos)|Could not resolve host|getaddrinfo ENOTFOUND|Worker \/[\w-]+(\/[\w-]+)? failed \(50\d\)|Failed to fetch.*?worker|deployer\/(run|build) failed/i,
26
+ result: {
27
+ title: "Build infrastructure unavailable",
28
+ explanation: "The Percher build server couldn't reach an upstream service it needs (Nix cache, worker daemon, or registry). This is a platform-side problem, not your app code.",
29
+ suggestion: "Wait 30–60 seconds and run percher publish again. If it still fails, check status.percher.app or contact support — your code is fine, the build never started.",
30
+ errorClass: "infra_unavailable",
31
+ phase: "infra",
32
+ cause: "upstream_unreachable",
33
+ relevantFiles: [],
34
+ missingEnvVars: [],
35
+ },
36
+ },
2
37
  {
3
38
  pattern: /start command could not be found|no start command/i,
4
39
  result: {
5
40
  title: "Missing start command",
6
41
  explanation: "Nixpacks could not find a start command for your app.",
7
42
  suggestion: 'Add a "start" script to your package.json: "start": "node index.js" (or bun/tsx). Then publish again.',
43
+ errorClass: "config_invalid",
44
+ phase: "build",
45
+ cause: "missing_start_command",
46
+ relevantFiles: ["package.json"],
47
+ missingEnvVars: [],
8
48
  },
9
49
  },
10
50
  {
@@ -12,7 +52,12 @@ const patterns = [
12
52
  result: {
13
53
  title: "Health check failed",
14
54
  explanation: "Your app started but did not respond to the health check endpoint in time.",
15
- suggestion: "Make sure your app listens on process.env.PORT and returns HTTP 200 on /. Then publish again.",
55
+ suggestion: "Make sure your app listens on process.env.PORT and returns HTTP 200 on the health path. Then publish again.",
56
+ errorClass: "health_check_timeout",
57
+ phase: "health_check",
58
+ cause: "timeout",
59
+ relevantFiles: ["percher.toml"],
60
+ missingEnvVars: [],
16
61
  },
17
62
  },
18
63
  {
@@ -21,6 +66,11 @@ const patterns = [
21
66
  title: "Port already in use",
22
67
  explanation: "The port your app is trying to use is already taken.",
23
68
  suggestion: "Use process.env.PORT instead of hardcoding a port number. Percher sets this automatically.",
69
+ errorClass: "port_mismatch",
70
+ phase: "start",
71
+ cause: "port_in_use",
72
+ relevantFiles: ["percher.toml", "package.json"],
73
+ missingEnvVars: [],
24
74
  },
25
75
  },
26
76
  {
@@ -29,6 +79,11 @@ const patterns = [
29
79
  title: "Missing module",
30
80
  explanation: "A required module or file could not be found.",
31
81
  suggestion: "Check that all dependencies are in package.json (not just devDependencies) and that import paths are correct. Note: Linux is case-sensitive!",
82
+ errorClass: "missing_dependency",
83
+ phase: "start",
84
+ cause: "module_not_found",
85
+ relevantFiles: ["package.json"],
86
+ missingEnvVars: [],
32
87
  },
33
88
  },
34
89
  {
@@ -37,6 +92,11 @@ const patterns = [
37
92
  title: "Out of memory",
38
93
  explanation: "Your app ran out of memory and was killed by the system.",
39
94
  suggestion: "Reduce your app's memory usage or upgrade to a plan with more RAM.",
95
+ errorClass: "oom_killed",
96
+ phase: "start",
97
+ cause: "out_of_memory",
98
+ relevantFiles: [],
99
+ missingEnvVars: [],
40
100
  },
41
101
  },
42
102
  {
@@ -45,6 +105,11 @@ const patterns = [
45
105
  title: "PocketBase error",
46
106
  explanation: "PocketBase could not start or connect properly.",
47
107
  suggestion: 'Verify that data.mode = "pocketbase" is set in percher.toml. Check that no port conflicts exist.',
108
+ errorClass: "runtime_crash",
109
+ phase: "start",
110
+ cause: "pocketbase_failure",
111
+ relevantFiles: ["percher.toml"],
112
+ missingEnvVars: [],
48
113
  },
49
114
  },
50
115
  {
@@ -53,7 +118,13 @@ const patterns = [
53
118
  title: "Missing environment variable",
54
119
  explanation: "A required environment variable is not set.",
55
120
  suggestion: "Set the missing variable with percher_env_set (MCP) or: bunx percher env set VARIABLE_NAME=value",
121
+ errorClass: "missing_env",
122
+ phase: "start",
123
+ cause: "env_not_set",
124
+ relevantFiles: [".env", "percher.toml"],
125
+ missingEnvVars: [],
56
126
  },
127
+ extractEnvVars: extractEnvVarsFromLog,
57
128
  },
58
129
  {
59
130
  pattern: /ECONNREFUSED|connection refused/i,
@@ -61,6 +132,11 @@ const patterns = [
61
132
  title: "Connection refused",
62
133
  explanation: "Your app tried to connect to a service that is not available.",
63
134
  suggestion: "Check that database URLs and API endpoints are correct. Use the environment variables Percher provides (POCKETBASE_URL, etc.).",
135
+ errorClass: "runtime_crash",
136
+ phase: "start",
137
+ cause: "connection_refused",
138
+ relevantFiles: [],
139
+ missingEnvVars: [],
64
140
  },
65
141
  },
66
142
  {
@@ -69,6 +145,11 @@ const patterns = [
69
145
  title: "Syntax error",
70
146
  explanation: "Your code has a syntax error that prevents it from running.",
71
147
  suggestion: "Fix the syntax error shown in the build log below, then publish again.",
148
+ errorClass: "build_failed",
149
+ phase: "build",
150
+ cause: "syntax_error",
151
+ relevantFiles: [],
152
+ missingEnvVars: [],
72
153
  },
73
154
  },
74
155
  {
@@ -77,6 +158,11 @@ const patterns = [
77
158
  title: "Dependency resolution failed",
78
159
  explanation: "One or more npm packages could not be resolved.",
79
160
  suggestion: "Check your package.json for typos in package names or version constraints. Run 'bun install' locally to verify.",
161
+ errorClass: "build_failed",
162
+ phase: "build",
163
+ cause: "dependency_resolution",
164
+ relevantFiles: ["package.json"],
165
+ missingEnvVars: [],
80
166
  },
81
167
  },
82
168
  {
@@ -85,6 +171,11 @@ const patterns = [
85
171
  title: "Build failed",
86
172
  explanation: "The build process failed. Check the build logs for details.",
87
173
  suggestion: "Run your build command locally (e.g., 'bun run build') to reproduce the error, then fix and publish again.",
174
+ errorClass: "build_failed",
175
+ phase: "build",
176
+ cause: "build_command_failed",
177
+ relevantFiles: ["package.json"],
178
+ missingEnvVars: [],
88
179
  },
89
180
  },
90
181
  {
@@ -93,18 +184,59 @@ const patterns = [
93
184
  title: "TypeScript error",
94
185
  explanation: "TypeScript compilation failed due to type errors.",
95
186
  suggestion: "Fix the TypeScript errors shown in the build log below. Run 'npx tsc --noEmit' locally to see all errors.",
187
+ errorClass: "build_failed",
188
+ phase: "build",
189
+ cause: "typescript_error",
190
+ relevantFiles: ["tsconfig.json"],
191
+ missingEnvVars: [],
192
+ },
193
+ },
194
+ {
195
+ pattern: /permission denied|EACCES/i,
196
+ result: {
197
+ title: "Permission denied",
198
+ explanation: "The app does not have permission to access a file or resource.",
199
+ suggestion: "Check file permissions. If using a Dockerfile, make sure the app runs as a non-root user with the correct permissions.",
200
+ errorClass: "permission_denied",
201
+ phase: "start",
202
+ cause: "file_permission",
203
+ relevantFiles: ["Dockerfile"],
204
+ missingEnvVars: [],
96
205
  },
97
206
  },
98
207
  ];
99
208
  /**
100
209
  * Classify a deploy error message into a user-friendly explanation.
101
210
  * Returns null if no known pattern matches.
211
+ *
212
+ * The result is structured for both human display and machine consumption:
213
+ * - `title`, `explanation`, `suggestion` for humans
214
+ * - `errorClass`, `phase`, `cause`, `relevantFiles`, `missingEnvVars` for agents
102
215
  */
103
216
  export function classifyError(errorMessage, buildLog) {
104
217
  const combined = `${errorMessage}\n${buildLog ?? ""}`;
105
- for (const { pattern, result } of patterns) {
218
+ for (const { pattern, result, extractEnvVars, extractModule } of patterns) {
106
219
  if (pattern.test(combined)) {
107
- return result;
220
+ const classified = { ...result };
221
+ // Enrich with extracted data from logs
222
+ if (extractEnvVars) {
223
+ classified.missingEnvVars = extractEnvVars(combined);
224
+ }
225
+ if (extractModule) {
226
+ const mod = extractModule(combined);
227
+ if (mod) {
228
+ classified.suggestion = `Add '${mod}' to package.json dependencies, then publish again.`;
229
+ }
230
+ }
231
+ // For missing module errors, try to extract the module name
232
+ if (classified.cause === "module_not_found") {
233
+ const mod = extractModuleFromLog(combined);
234
+ if (mod) {
235
+ classified.explanation = `Module '${mod}' not found during startup.`;
236
+ classified.suggestion = `Add '${mod}' to package.json dependencies, then publish again.`;
237
+ }
238
+ }
239
+ return classified;
108
240
  }
109
241
  }
110
242
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"error-classifier.js","sourceRoot":"","sources":["../src/error-classifier.ts"],"names":[],"mappings":"AAWA,MAAM,QAAQ,GAAmB;IAC/B;QACE,OAAO,EAAE,oDAAoD;QAC7D,MAAM,EAAE;YACN,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,uDAAuD;YACpE,UAAU,EACR,uGAAuG;SAC1G;KACF;IACD;QACE,OAAO,EAAE,yCAAyC;QAClD,MAAM,EAAE;YACN,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,4EAA4E;YACzF,UAAU,EACR,+FAA+F;SAClG;KACF;IACD;QACE,OAAO,EAAE,oCAAoC;QAC7C,MAAM,EAAE;YACN,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,sDAAsD;YACnE,UAAU,EACR,4FAA4F;SAC/F;KACF;IACD;QACE,OAAO,EAAE,0CAA0C;QACnD,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,+CAA+C;YAC5D,UAAU,EACR,8IAA8I;SACjJ;KACF;IACD;QACE,OAAO,EAAE,yCAAyC;QAClD,MAAM,EAAE;YACN,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,0DAA0D;YACvE,UAAU,EAAE,oE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tD,KAAK,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,IAAI,QAAQ,EAAE,CAAC;QAC1E,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,MAAM,UAAU,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;YACjC,uCAAuC;YACvC,IAAI,cAAc,EAAE,CAAC;gBACnB,UAAU,CAAC,cAAc,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC;YACD,IAAI,aAAa,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;gBACpC,IAAI,GAAG,EAAE,CAAC;oBACR,UAAU,CAAC,UAAU,GAAG,QAAQ,GAAG,qDAAqD,CAAC;gBAC3F,CAAC;YACH,CAAC;YACD,4DAA4D;YAC5D,IAAI,UAAU,CAAC,KAAK,KAAK,kBAAkB,EAAE,CAAC;gBAC5C,MAAM,GAAG,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;gBAC3C,IAAI,GAAG,EAAE,CAAC;oBACR,UAAU,CAAC,WAAW,GAAG,WAAW,GAAG,6BAA6B,CAAC;oBACrE,UAAU,CAAC,UAAU,GAAG,QAAQ,GAAG,qDAAqD,CAAC;gBAC3F,CAAC;YACH,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type PercherCoreErrorCode = "init.exists" | "push.no-config-generated" | "push.cancelled" | "push.placeholder-env" | "push.too-large" | "push.suspicious" | "push.deploy-failed" | "push.deploy-timeout" | "logs.no-app" | "env.no-app" | "open.no-app" | "login.expired" | "login.rejected" | "doctor.no-app" | "doctor.api-unreachable" | "dev.no-app" | "data.no-app" | "create.invalid-template" | "create.dir-not-empty" | "create.failed";
1
+ export type PercherCoreErrorCode = "init.exists" | "push.no-config-generated" | "push.cancelled" | "push.placeholder-env" | "push.too-large" | "push.suspicious" | "push.deploy-failed" | "push.deploy-timeout" | "logs.no-app" | "env.no-app" | "open.no-app" | "login.expired" | "login.rejected" | "doctor.no-app" | "doctor.api-unreachable" | "dev.no-app" | "data.no-app" | "create.invalid-template" | "create.dir-not-empty" | "create.failed" | "delete.confirmation-required" | "diagnose.no-app" | "insights.no-app" | "billing.checkout-failed" | "billing.portal-failed" | "deploys.no-app" | "deploys.no-id" | "deploys.no-failed";
2
2
  export interface PercherCoreErrorOptions {
3
3
  code: PercherCoreErrorCode;
4
4
  hint?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GACb,0BAA0B,GAC1B,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,YAAY,GACZ,aAAa,GACb,yBAAyB,GACzB,sBAAsB,GACtB,eAAe,CAAC;AAEpB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;CAM9D"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GACb,0BAA0B,GAC1B,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,wBAAwB,GACxB,YAAY,GACZ,aAAa,GACb,yBAAyB,GACzB,sBAAsB,GACtB,eAAe,GACf,8BAA8B,GAC9B,iBAAiB,GACjB,iBAAiB,GACjB,yBAAyB,GACzB,uBAAuB,GACvB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,CAAC;AAExB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;CAM9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AA4BA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAChC,IAAI,CAAuB;IAC3B,IAAI,CAAU;IAEvB,YAAY,OAAe,EAAE,OAAgC;QAC3D,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;CACF"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAoCA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAChC,IAAI,CAAuB;IAC3B,IAAI,CAAU;IAEvB,YAAY,OAAe,EAAE,OAAgC;QAC3D,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -11,18 +11,29 @@ export { open, openInputSchema, type OpenInput } from "./commands/open";
11
11
  export { logs, logsInputSchema, type LogsInput } from "./commands/logs";
12
12
  export { push, pushInputSchema, type PushInput, type PushResult } from "./commands/push";
13
13
  export { publish, publishInputSchema, type PublishInput, type PublishResult, type PublishTiming, type PublishError, } from "./commands/publish";
14
- export { classifyError, type ClassifiedError } from "./error-classifier";
14
+ export { classifyError, type ClassifiedError, type ErrorClass, type DeployPhase, } from "./error-classifier";
15
+ export { resetSuperuser, resetSuperuserInputSchema, type ResetSuperuserInput, type ResetSuperuserResult, } from "./commands/reset-superuser";
16
+ export { rename, renameInputSchema, type RenameInput, type RenameResult, } from "./commands/rename";
15
17
  export { versions, versionsInputSchema, type VersionsInput, type AppVersion, } from "./commands/versions";
16
18
  export { rollback, rollbackInputSchema, type RollbackInput, } from "./commands/rollback";
19
+ export { deploysList, deploysListInputSchema, type DeploysListInput, deploysInspect, deploysInspectInputSchema, type DeploysInspectInput, type DeploysInspectResult, } from "./commands/deploys";
20
+ export { mcp, mcpInputSchema, type McpInput, type McpConfigResult, } from "./commands/mcp";
17
21
  export { doctor, doctorInputSchema, type DoctorInput, type DoctorResult, type DoctorCheck, } from "./commands/doctor";
18
22
  export { dev, devInputSchema, type DevInput, type DevCallbacks } from "./commands/dev";
19
23
  export { data, dataInputSchema, type DataInput, type DataResult } from "./commands/data";
24
+ export { diagnose, diagnoseInputSchema, type DiagnoseInput, type DiagnoseResult, } from "./commands/diagnose";
25
+ export { insights, insightsInputSchema, type InsightsInput, type InsightsResult, type InsightSuggestion, } from "./commands/insights";
26
+ export { billingUpgrade, billingUpgradeInputSchema, billingPortal, billingPortalInputSchema, type BillingUpgradeInput, type BillingUpgradeResult, type BillingPortalInput, type BillingPortalResult, } from "./commands/billing";
20
27
  export { create, createInputSchema, type CreateInput, type CreateResult, } from "./commands/create";
21
28
  export { domainAdd, domainVerify, domainList, domainRemove, domainAddInputSchema, domainVerifyInputSchema, domainListInputSchema, domainRemoveInputSchema, type DomainAddInput, type DomainVerifyInput, type DomainListInput, type DomainRemoveInput, } from "./commands/domains";
22
29
  export { resume, resumeInputSchema, type ResumeInput, } from "./commands/resume";
30
+ export { deleteApp, deleteInputSchema, type DeleteInput, } from "./commands/delete";
31
+ export { importProject, importInputSchema, type ImportInput, type ImportResult, } from "./commands/import-project";
23
32
  export { generate, generateInputSchema, type GenerateInput, type GenerateResult, } from "./commands/generate";
24
33
  export { createWatcher, type WatcherOptions, type Watcher } from "./watcher";
25
34
  export { isBlockedName, BLOCKED_APP_NAMES } from "./validation/blocked-names";
26
- export { listTemplates, scaffoldTemplate, type ScaffoldInput, type ScaffoldResult, } from "./templates";
27
- export { PLAN_CATALOG, PLAN_IDS, getPlanLimits, getPlanInfo, type PlanId, type PlanLimits, type PlanInfo, } from "./plans";
35
+ export { qrToTerminal, qrToDataUri } from "./qr";
36
+ export { listTemplates, listTemplateMetadata, getTemplateMetadata, scaffoldTemplate, TEMPLATE_CATALOG, type ScaffoldInput, type ScaffoldResult, type TemplateCategory, type TemplateDataMode, type TemplateMetadata, type TemplateRuntime, } from "./templates";
37
+ export { INTEGRATIONS, getIntegration, listIntegrationsByCategory, type IntegrationGuide, } from "./integrations";
38
+ export { PLAN_CATALOG, PLAN_IDS, getPlanLimits, getEffectivePlanLimits, getPlanInfo, type PlanId, type PlanLimits, type PlanInfo, } from "./plans";
28
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1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jD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,0BAA0B,EAC1B,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,QAAQ,GACd,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -10,18 +10,29 @@ export { open, openInputSchema } from "./commands/open";
10
10
  export { logs, logsInputSchema } from "./commands/logs";
11
11
  export { push, pushInputSchema } from "./commands/push";
12
12
  export { publish, publishInputSchema, } from "./commands/publish";
13
- export { classifyError } from "./error-classifier";
13
+ export { classifyError, } from "./error-classifier";
14
+ export { resetSuperuser, resetSuperuserInputSchema, } from "./commands/reset-superuser";
15
+ export { rename, renameInputSchema, } from "./commands/rename";
14
16
  export { versions, versionsInputSchema, } from "./commands/versions";
15
17
  export { rollback, rollbackInputSchema, } from "./commands/rollback";
18
+ export { deploysList, deploysListInputSchema, deploysInspect, deploysInspectInputSchema, } from "./commands/deploys";
19
+ export { mcp, mcpInputSchema, } from "./commands/mcp";
16
20
  export { doctor, doctorInputSchema, } from "./commands/doctor";
17
21
  export { dev, devInputSchema } from "./commands/dev";
18
22
  export { data, dataInputSchema } from "./commands/data";
23
+ export { diagnose, diagnoseInputSchema, } from "./commands/diagnose";
24
+ export { insights, insightsInputSchema, } from "./commands/insights";
25
+ export { billingUpgrade, billingUpgradeInputSchema, billingPortal, billingPortalInputSchema, } from "./commands/billing";
19
26
  export { create, createInputSchema, } from "./commands/create";
20
27
  export { domainAdd, domainVerify, domainList, domainRemove, domainAddInputSchema, domainVerifyInputSchema, domainListInputSchema, domainRemoveInputSchema, } from "./commands/domains";
21
28
  export { resume, resumeInputSchema, } from "./commands/resume";
29
+ export { deleteApp, deleteInputSchema, } from "./commands/delete";
30
+ export { importProject, importInputSchema, } from "./commands/import-project";
22
31
  export { generate, generateInputSchema, } from "./commands/generate";
23
32
  export { createWatcher } from "./watcher";
24
33
  export { isBlockedName, BLOCKED_APP_NAMES } from "./validation/blocked-names";
25
- export { listTemplates, scaffoldTemplate, } from "./templates";
26
- export { PLAN_CATALOG, PLAN_IDS, getPlanLimits, getPlanInfo, } from "./plans";
34
+ export { qrToTerminal, qrToDataUri } from "./qr";
35
+ export { listTemplates, listTemplateMetadata, getTemplateMetadata, scaffoldTemplate, TEMPLATE_CATALOG, } from "./templates";
36
+ export { INTEGRATIONS, getIntegration, listIntegrationsByCategory, } from "./integrations";
37
+ export { PLAN_CATALOG, PLAN_IDS, getPlanLimits, getEffectivePlanLimits, getPlanInfo, } from "./plans";
27
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,GAGjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAA0B,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,aAAa,EAA2C,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAe,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAmB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,eAAe,EAAmC,MAAM,iBAAiB,CAAC;AACzF,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,g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,EACL,YAAY,EACZ,cAAc,EACd,0BAA0B,GAE3B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,WAAW,GAIZ,MAAM,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * First-party integration guides (Phase 7.2).
3
+ *
4
+ * This is content, not code execution. We list the env vars each service
5
+ * needs so the dashboard can render setup hints next to env var editor.
6
+ * No marketplace, no plugins — just guides.
7
+ */
8
+ export interface IntegrationGuide {
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ category: "payments" | "email" | "ai" | "database" | "auth";
13
+ envVars: Array<{
14
+ key: string;
15
+ description: string;
16
+ secret: boolean;
17
+ }>;
18
+ setupUrl: string;
19
+ docsUrl?: string;
20
+ }
21
+ export declare const INTEGRATIONS: IntegrationGuide[];
22
+ export declare function getIntegration(id: string): IntegrationGuide | null;
23
+ export declare function listIntegrationsByCategory(category: IntegrationGuide["category"]): IntegrationGuide[];
24
+ //# sourceMappingURL=integrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../src/integrations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC;IAC5D,OAAO,EAAE,KAAK,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,gBAAgB,EA2F1C,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAElE;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,GACrC,gBAAgB,EAAE,CAEpB"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * First-party integration guides (Phase 7.2).
3
+ *
4
+ * This is content, not code execution. We list the env vars each service
5
+ * needs so the dashboard can render setup hints next to env var editor.
6
+ * No marketplace, no plugins — just guides.
7
+ */
8
+ export const INTEGRATIONS = [
9
+ {
10
+ id: "stripe",
11
+ name: "Stripe",
12
+ description: "Payments, subscriptions, and billing.",
13
+ category: "payments",
14
+ envVars: [
15
+ {
16
+ key: "STRIPE_SECRET_KEY",
17
+ description: "Server-side secret key from Stripe dashboard.",
18
+ secret: true,
19
+ },
20
+ {
21
+ key: "STRIPE_WEBHOOK_SECRET",
22
+ description: "Webhook signing secret for verifying events.",
23
+ secret: true,
24
+ },
25
+ ],
26
+ setupUrl: "https://dashboard.stripe.com/apikeys",
27
+ docsUrl: "https://stripe.com/docs/keys",
28
+ },
29
+ {
30
+ id: "resend",
31
+ name: "Resend",
32
+ description: "Transactional email via Resend.",
33
+ category: "email",
34
+ envVars: [
35
+ {
36
+ key: "RESEND_API_KEY",
37
+ description: "API key from the Resend dashboard.",
38
+ secret: true,
39
+ },
40
+ ],
41
+ setupUrl: "https://resend.com/api-keys",
42
+ docsUrl: "https://resend.com/docs",
43
+ },
44
+ {
45
+ id: "openai",
46
+ name: "OpenAI",
47
+ description: "OpenAI APIs for models, embeddings, and image generation.",
48
+ category: "ai",
49
+ envVars: [
50
+ {
51
+ key: "OPENAI_API_KEY",
52
+ description: "API key from platform.openai.com.",
53
+ secret: true,
54
+ },
55
+ ],
56
+ setupUrl: "https://platform.openai.com/api-keys",
57
+ docsUrl: "https://platform.openai.com/docs",
58
+ },
59
+ {
60
+ id: "anthropic",
61
+ name: "Anthropic",
62
+ description: "Claude models for chat, analysis, and tool use.",
63
+ category: "ai",
64
+ envVars: [
65
+ {
66
+ key: "ANTHROPIC_API_KEY",
67
+ description: "API key from console.anthropic.com.",
68
+ secret: true,
69
+ },
70
+ ],
71
+ setupUrl: "https://console.anthropic.com/settings/keys",
72
+ docsUrl: "https://docs.anthropic.com",
73
+ },
74
+ {
75
+ id: "supabase",
76
+ name: "Supabase",
77
+ description: "Postgres database, auth, and storage (BYO).",
78
+ category: "database",
79
+ envVars: [
80
+ {
81
+ key: "DATABASE_URL",
82
+ description: "Postgres connection string from Supabase project settings.",
83
+ secret: true,
84
+ },
85
+ {
86
+ key: "SUPABASE_URL",
87
+ description: "Public project URL (if using the Supabase client).",
88
+ secret: false,
89
+ },
90
+ {
91
+ key: "SUPABASE_ANON_KEY",
92
+ description: "Public anon key for client-side use.",
93
+ secret: false,
94
+ },
95
+ ],
96
+ setupUrl: "https://supabase.com/dashboard",
97
+ docsUrl: "https://supabase.com/docs",
98
+ },
99
+ ];
100
+ export function getIntegration(id) {
101
+ return INTEGRATIONS.find((i) => i.id === id) ?? null;
102
+ }
103
+ export function listIntegrationsByCategory(category) {
104
+ return INTEGRATIONS.filter((i) => i.category === category);
105
+ }
106
+ //# sourceMappingURL=integrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.js","sourceRoot":"","sources":["../src/integrations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uCAAuC;QACpD,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,mBAAmB;gBACxB,WAAW,EAAE,+CAA+C;gBAC5D,MAAM,EAAE,IAAI;aACb;YACD;gBACE,GAAG,EAAE,uBAAuB;gBAC5B,WAAW,EAAE,8CAA8C;gBAC3D,MAAM,EAAE,IAAI;aACb;SACF;QACD,QAAQ,EAAE,sCA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AE,KAAK;aACd;SACF;QACD,QAAQ,EAAE,gCAAgC;QAC1C,OAAO,EAAE,2BAA2B;KACrC;CACF,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,QAAsC;IAEtC,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC7D,CAAC"}
package/dist/plans.d.ts CHANGED
@@ -12,6 +12,24 @@ export interface PlanLimits {
12
12
  autoSleep: boolean;
13
13
  inactivityWarningDays: number;
14
14
  inactivityGraceDays: number;
15
+ /** Number of recent deploys to keep with full rollback capability */
16
+ deployRetention: number;
17
+ /** Days to keep runtime logs */
18
+ logRetentionDays: number;
19
+ /** Days to keep build logs */
20
+ buildLogRetentionDays: number;
21
+ /** Max user-defined cron jobs (Phase 5.3) */
22
+ cronJobs: number;
23
+ /** Object storage quota in MB (Phase 5.1 — prep, not yet enforced) */
24
+ storageMb: number;
25
+ /** Max parallel container instances per app (Phase 6.1) */
26
+ instances: number;
27
+ /** SLA uptime target (Phase 8.3). null = no SLA for this tier. */
28
+ slaUptime: string | null;
29
+ /** Support response target (Phase 8.3). null = community support only. */
30
+ supportResponseTime: string | null;
31
+ /** Per-app KV store size cap in MB (Phase 5.4) */
32
+ kvStorageMb: number;
15
33
  }
16
34
  export interface PlanInfo {
17
35
  label: string;
@@ -24,4 +42,22 @@ export declare const PLAN_IDS: PlanId[];
24
42
  export declare function getPlanLimits(plan: string): PlanLimits;
25
43
  /** Look up full plan info, defaulting to free for unknown plan ids */
26
44
  export declare function getPlanInfo(plan: string): PlanInfo;
45
+ /**
46
+ * Plan limits with admin-role bypass applied.
47
+ *
48
+ * Admin users (those whose email is in `PERCHER_ADMIN_EMAILS`) get
49
+ * pro-tier resource ceilings — memory, CPU, instances, storage —
50
+ * plus `Number.POSITIVE_INFINITY` for every cap that would otherwise
51
+ * cause platform-driven friction when they're operating the
52
+ * platform: app count, deploy rate, preview slots, custom domains,
53
+ * cron jobs, KV size, retention windows. Auto-sleep is forced off
54
+ * and inactivity windows are essentially infinite so admin apps
55
+ * never get hibernated or suspended underneath them.
56
+ *
57
+ * Pure function, no side effects — callers compute `isAdmin` from
58
+ * the user record (typically `isAdminEmail(user.email)`) and pass
59
+ * it in. Non-admin behavior is byte-identical to the previous
60
+ * `getPlanLimits` path.
61
+ */
62
+ export declare function getEffectivePlanLimits(plan: string, isAdmin?: boolean): PlanLimits;
27
63
  //# sourceMappingURL=plans.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,GAAG,WAAW,CAAC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MA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