percher 0.5.23 → 1.0.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/LICENSE +132 -0
- package/THIRD-PARTY-NOTICES.txt +1228 -0
- package/dist/bin/percher.js +55525 -63649
- package/dist/package.json +10 -8
- package/dist/src/cli-utils.d.ts.map +1 -1
- package/dist/src/cli-utils.js.map +1 -1
- package/dist/src/commands/account.js +5 -5
- package/dist/src/commands/account.js.map +1 -1
- package/dist/src/commands/admin.d.ts.map +1 -1
- package/dist/src/commands/admin.js +180 -15
- package/dist/src/commands/admin.js.map +1 -1
- package/dist/src/commands/analytics.js +1 -1
- package/dist/src/commands/apps.js +2 -2
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth.js +1 -1
- package/dist/src/commands/data.js +1 -1
- package/dist/src/commands/deploys.d.ts.map +1 -1
- package/dist/src/commands/deploys.js +24 -2
- package/dist/src/commands/deploys.js.map +1 -1
- package/dist/src/commands/env.js +3 -3
- package/dist/src/commands/export.js +1 -1
- package/dist/src/commands/github.js +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/migrate.js +1 -1
- package/dist/src/commands/sharing.js +1 -1
- package/dist/src/commands/status.js +1 -1
- package/dist/src/commands/token.js +1 -1
- package/dist/src/commands/transfers.js +1 -1
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +4 -3
- package/dist/src/context.js.map +1 -1
- package/dist/src/env-set-input.d.ts.map +1 -1
- package/dist/src/index.js +21 -21
- package/dist/src/version-check.d.ts +2 -0
- package/dist/src/version-check.d.ts.map +1 -1
- package/dist/src/version-check.js +23 -2
- package/dist/src/version-check.js.map +1 -1
- package/dist/templates/LICENSE +14 -0
- package/dist/templates/astro/Dockerfile +51 -35
- package/dist/templates/astro/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/bun/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/capsule/Dockerfile +30 -12
- package/dist/templates/capsule/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/django/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/django/percher.toml +1 -0
- package/dist/templates/dotnet/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/eleventy/Dockerfile +51 -35
- package/dist/templates/eleventy/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/elysia/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/express/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/express/package.json +2 -1
- package/dist/templates/fastify/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/fastify/package.json +2 -1
- package/dist/templates/flask/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/flask/percher.toml +1 -0
- package/dist/templates/flask/requirements.txt +1 -0
- package/dist/templates/go/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/hono/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/hono/index.ts +4 -2
- package/dist/templates/hono/package.json +3 -1
- package/dist/templates/htmx/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/htmx/package.json +1 -1
- package/dist/templates/hugo/Dockerfile +49 -33
- package/dist/templates/hugo/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/java/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/laravel/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/nextjs/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/node/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/nuxt/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/phoenix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/preact/Dockerfile +51 -35
- package/dist/templates/preact/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/python/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/rails/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/remix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/remix/app/routes/health.tsx +3 -1
- package/dist/templates/rust/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/solid/Dockerfile +51 -35
- package/dist/templates/solid/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/static/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/sveltekit/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/sveltekit/package.json +1 -1
- package/dist/templates/vite-react/Dockerfile +51 -35
- package/dist/templates/vite-react/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/dist/templates/vite-vue/Dockerfile +51 -35
- package/dist/templates/vite-vue/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/package.json +10 -8
- package/dist/context.d.ts +0 -3
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -31
- package/dist/context.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -385
- package/dist/index.js.map +0 -1
- package/dist/open.d.ts +0 -2
- package/dist/open.d.ts.map +0 -1
- package/dist/open.js +0 -16
- package/dist/open.js.map +0 -1
- package/dist/output.d.ts +0 -2
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -44
- package/dist/output.js.map +0 -1
- package/dist/prompt.d.ts +0 -4
- package/dist/prompt.d.ts.map +0 -1
- package/dist/prompt.js +0 -14
- package/dist/prompt.js.map +0 -1
package/dist/open.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
export async function openUrl(url) {
|
|
3
|
-
const platform = process.platform;
|
|
4
|
-
try {
|
|
5
|
-
if (platform === "darwin")
|
|
6
|
-
spawn("open", [url], { detached: true, stdio: "ignore" }).unref();
|
|
7
|
-
else if (platform === "win32")
|
|
8
|
-
spawn("cmd", ["/c", "start", "", url], { detached: true, stdio: "ignore" }).unref();
|
|
9
|
-
else
|
|
10
|
-
spawn("xdg-open", [url], { detached: true, stdio: "ignore" }).unref();
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
// Silently swallow — the caller should have printed the URL already.
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=open.js.map
|
package/dist/open.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open.js","sourceRoot":"","sources":["../src/open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAW;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,CAAC;QACH,IAAI,QAAQ,KAAK,QAAQ;YAAE,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;aACxF,IAAI,QAAQ,KAAK,OAAO;YAC3B,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;;YACjF,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC7E,CAAC;IAAC,MAAM,CAAC;QACP,qEAAqE;IACvE,CAAC;AACH,CAAC"}
|
package/dist/output.d.ts
DELETED
package/dist/output.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
package/dist/output.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { PercherApiError } from "@percher/client";
|
|
2
|
-
import { PercherCoreError } from "@percher/core";
|
|
3
|
-
import { PercherTomlError } from "@percher/toml";
|
|
4
|
-
import pc from "picocolors";
|
|
5
|
-
export async function renderError(stderr, error) {
|
|
6
|
-
const writer = stderr.getWriter();
|
|
7
|
-
const encoder = new TextEncoder();
|
|
8
|
-
const lines = [];
|
|
9
|
-
if (error instanceof PercherTomlError) {
|
|
10
|
-
lines.push(`${pc.red(`error (${error.code}):`)} ${error.message}`);
|
|
11
|
-
if (error.tomlLine !== undefined) {
|
|
12
|
-
lines.push(pc.dim(` at percher.toml line ${error.tomlLine}`));
|
|
13
|
-
}
|
|
14
|
-
for (const issue of error.issues ?? []) {
|
|
15
|
-
lines.push(`${pc.dim(" · ") + pc.yellow(issue.path.join("."))}: ${issue.message}`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
else if (error instanceof PercherApiError) {
|
|
19
|
-
lines.push(`${pc.red("error:")} ${error.message}`);
|
|
20
|
-
lines.push(pc.dim(` ${error.code} (HTTP ${error.status})`));
|
|
21
|
-
if (error.requestId)
|
|
22
|
-
lines.push(pc.dim(` request: ${error.requestId}`));
|
|
23
|
-
}
|
|
24
|
-
else if (error instanceof PercherCoreError) {
|
|
25
|
-
lines.push(`${pc.red(`error (${error.code}):`)} ${error.message}`);
|
|
26
|
-
if (error.hint)
|
|
27
|
-
lines.push(pc.dim(` ${error.hint}`));
|
|
28
|
-
}
|
|
29
|
-
else if (error instanceof Error) {
|
|
30
|
-
lines.push(`${pc.red("unexpected error:")} ${error.message}`);
|
|
31
|
-
if (error.stack)
|
|
32
|
-
lines.push(pc.dim(error.stack.split("\n").slice(1, 4).join("\n")));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
lines.push(`${pc.red("unexpected error:")} ${String(error)}`);
|
|
36
|
-
}
|
|
37
|
-
try {
|
|
38
|
-
await writer.write(encoder.encode(`${lines.join("\n")}\n`));
|
|
39
|
-
}
|
|
40
|
-
finally {
|
|
41
|
-
writer.releaseLock();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=output.js.map
|
package/dist/output.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAkC,EAClC,KAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,UAAU,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACnE,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,0BAA0B,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,KAAK,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YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/prompt.d.ts
DELETED
package/dist/prompt.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAGA,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAS9F"}
|
package/dist/prompt.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { stdin as input, stdout as output } from "node:process";
|
|
2
|
-
import { createInterface } from "node:readline/promises";
|
|
3
|
-
export async function prompt(question, options) {
|
|
4
|
-
const rl = createInterface({ input, output });
|
|
5
|
-
try {
|
|
6
|
-
const suffix = options?.default ? ` [${options.default}]` : "";
|
|
7
|
-
const answer = await rl.question(`${question}${suffix} `);
|
|
8
|
-
return answer.trim() || options?.default || "";
|
|
9
|
-
}
|
|
10
|
-
finally {
|
|
11
|
-
rl.close();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=prompt.js.map
|
package/dist/prompt.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAgB,EAAE,OAA8B;IAC3E,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC;IACjD,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|