@percher/core 0.4.29 → 1.0.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/LICENSE +132 -0
- package/dist/appstore-artifacts.d.ts +8 -0
- package/dist/appstore-artifacts.d.ts.map +1 -1
- package/dist/appstore-artifacts.js +11 -15
- package/dist/appstore-artifacts.js.map +1 -1
- package/dist/commands/account.d.ts +1 -1
- package/dist/commands/account.js +3 -3
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/admin-legacy-audit.d.ts +40 -0
- package/dist/commands/admin-legacy-audit.d.ts.map +1 -0
- package/dist/commands/admin-legacy-audit.js +57 -0
- package/dist/commands/admin-legacy-audit.js.map +1 -0
- package/dist/commands/admin-legacy-inventory.d.ts +27 -0
- package/dist/commands/admin-legacy-inventory.d.ts.map +1 -0
- package/dist/commands/admin-legacy-inventory.js +37 -0
- package/dist/commands/admin-legacy-inventory.js.map +1 -0
- package/dist/commands/admin-migrate-networks.d.ts +15 -0
- package/dist/commands/admin-migrate-networks.d.ts.map +1 -0
- package/dist/commands/admin-migrate-networks.js +15 -0
- package/dist/commands/admin-migrate-networks.js.map +1 -0
- package/dist/commands/appstore-kit.d.ts +1 -1
- package/dist/commands/appstore-kit.js +1 -1
- package/dist/commands/data-export.d.ts.map +1 -1
- package/dist/commands/data-export.js +5 -4
- package/dist/commands/data-export.js.map +1 -1
- package/dist/commands/doctor.d.ts +19 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +58 -9
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/mcp.d.ts +4 -4
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +28 -8
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/migrate-supabase-map.d.ts +1 -1
- package/dist/commands/migrate-supabase-schema.d.ts +4 -1
- package/dist/commands/migrate-supabase-schema.d.ts.map +1 -1
- package/dist/commands/migrate-supabase-schema.js +4 -1
- package/dist/commands/migrate-supabase-schema.js.map +1 -1
- package/dist/commands/migrate-supabase-sdk.d.ts +1 -1
- package/dist/commands/migrate-supabase.d.ts +1 -1
- package/dist/commands/migrate-supabase.js +1 -1
- package/dist/commands/publish-api-error.d.ts +12 -2
- package/dist/commands/publish-api-error.d.ts.map +1 -1
- package/dist/commands/publish-api-error.js +128 -5
- package/dist/commands/publish-api-error.js.map +1 -1
- package/dist/commands/publish-failure.d.ts.map +1 -1
- package/dist/commands/publish-failure.js +47 -32
- package/dist/commands/publish-failure.js.map +1 -1
- package/dist/commands/publish-inline.d.ts.map +1 -1
- package/dist/commands/publish-inline.js +3 -3
- package/dist/commands/publish-inline.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +53 -12
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +15 -2
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/rollback.d.ts +2 -1
- package/dist/commands/rollback.d.ts.map +1 -1
- package/dist/commands/rollback.js +74 -4
- package/dist/commands/rollback.js.map +1 -1
- package/dist/commands/versions.d.ts +12 -0
- package/dist/commands/versions.d.ts.map +1 -1
- package/dist/commands/versions.js.map +1 -1
- package/dist/commands/wait-deploy.d.ts +1 -1
- package/dist/error-classifier.d.ts +1 -1
- package/dist/error-classifier.d.ts.map +1 -1
- package/dist/error-classifier.js +66 -0
- package/dist/error-classifier.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/event-renderer.d.ts.map +1 -1
- package/dist/event-renderer.js +12 -2
- package/dist/event-renderer.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/plans.d.ts +23 -1
- package/dist/plans.d.ts.map +1 -1
- package/dist/plans.js +26 -1
- package/dist/plans.js.map +1 -1
- package/dist/publish-retry.d.ts.map +1 -1
- package/dist/publish-retry.js +26 -1
- package/dist/publish-retry.js.map +1 -1
- package/dist/recovery.d.ts +25 -2
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +59 -4
- package/dist/recovery.js.map +1 -1
- package/dist/static-docker.d.ts +8 -13
- package/dist/static-docker.d.ts.map +1 -1
- package/dist/static-docker.js +38 -27
- package/dist/static-docker.js.map +1 -1
- package/dist/stream-utils.d.ts +9 -14
- package/dist/stream-utils.d.ts.map +1 -1
- package/dist/stream-utils.js +164 -0
- package/dist/stream-utils.js.map +1 -1
- package/dist/structured-error-codes.d.ts +1 -1
- package/dist/structured-error-codes.d.ts.map +1 -1
- package/dist/structured-error-codes.js +123 -0
- package/dist/structured-error-codes.js.map +1 -1
- package/dist/templates/ai-files/claude-md.d.ts.map +1 -1
- package/dist/templates/ai-files/claude-md.js +18 -1
- package/dist/templates/ai-files/claude-md.js.map +1 -1
- package/dist/templates/ai-files/cursor-percher-mdc.d.ts.map +1 -1
- package/dist/templates/ai-files/cursor-percher-mdc.js +18 -1
- package/dist/templates/ai-files/cursor-percher-mdc.js.map +1 -1
- package/package.json +8 -7
- package/templates/LICENSE +14 -0
- package/templates/astro/Caddyfile +6 -0
- package/templates/astro/Dockerfile +51 -0
- package/templates/astro/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/astro/astro.config.mjs +3 -0
- package/templates/astro/package.json +14 -0
- package/templates/astro/percher.toml +11 -0
- package/templates/astro/src/pages/index.astro +15 -0
- package/templates/bun/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/bun/index.ts +23 -0
- package/templates/bun/package.json +8 -0
- package/templates/bun/percher.toml +10 -0
- package/templates/capsule/Caddyfile +7 -0
- package/templates/capsule/Dockerfile +57 -0
- package/templates/capsule/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/capsule/index.html +12 -0
- package/templates/capsule/package.json +20 -0
- package/templates/capsule/pb/schema.json +18 -0
- package/templates/capsule/percher.toml +13 -0
- package/templates/capsule/src/App.tsx +65 -0
- package/templates/capsule/src/components/Auth.tsx +75 -0
- package/templates/capsule/src/components/SignInWithGoogle.tsx +27 -0
- package/templates/capsule/src/lib/ai-client.ts +193 -0
- package/templates/capsule/src/lib/ai.ts +15 -0
- package/templates/capsule/src/lib/db.ts +14 -0
- package/templates/capsule/src/lib/realtime.ts +16 -0
- package/templates/capsule/src/main.tsx +5 -0
- package/templates/capsule/tsconfig.json +15 -0
- package/templates/capsule/vite.config.ts +6 -0
- package/templates/django/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/django/Procfile +1 -0
- package/templates/django/app/__init__.py +0 -0
- package/templates/django/app/settings.py +44 -0
- package/templates/django/app/urls.py +21 -0
- package/templates/django/app/wsgi.py +5 -0
- package/templates/django/manage.py +19 -0
- package/templates/django/percher.toml +12 -0
- package/templates/django/requirements.txt +2 -0
- package/templates/dotnet/Dockerfile +18 -0
- package/templates/dotnet/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/dotnet/Program.cs +23 -0
- package/templates/dotnet/app.csproj +9 -0
- package/templates/dotnet/percher.toml +11 -0
- package/templates/eleventy/.eleventy.js +12 -0
- package/templates/eleventy/Caddyfile +6 -0
- package/templates/eleventy/Dockerfile +51 -0
- package/templates/eleventy/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/eleventy/package.json +12 -0
- package/templates/eleventy/percher.toml +11 -0
- package/templates/eleventy/src/_includes/base.njk +12 -0
- package/templates/eleventy/src/assets/style.css +12 -0
- package/templates/eleventy/src/index.md +10 -0
- package/templates/elysia/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/elysia/index.ts +8 -0
- package/templates/elysia/package.json +12 -0
- package/templates/elysia/percher.toml +11 -0
- package/templates/express/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/express/index.ts +16 -0
- package/templates/express/package.json +12 -0
- package/templates/express/percher.toml +11 -0
- package/templates/fastify/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/fastify/index.ts +13 -0
- package/templates/fastify/package.json +12 -0
- package/templates/fastify/percher.toml +11 -0
- package/templates/flask/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/flask/main.py +23 -0
- package/templates/flask/percher.toml +12 -0
- package/templates/flask/requirements.txt +2 -0
- package/templates/go/Dockerfile +11 -0
- package/templates/go/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/go/go.mod +3 -0
- package/templates/go/main.go +53 -0
- package/templates/go/percher.toml +11 -0
- package/templates/hono/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/hono/index.ts +14 -0
- package/templates/hono/package.json +13 -0
- package/templates/hono/percher.toml +11 -0
- package/templates/htmx/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/htmx/index.ts +32 -0
- package/templates/htmx/package.json +15 -0
- package/templates/htmx/percher.toml +11 -0
- package/templates/hugo/Caddyfile +6 -0
- package/templates/hugo/Dockerfile +49 -0
- package/templates/hugo/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/hugo/content/_index.md +7 -0
- package/templates/hugo/hugo.toml +11 -0
- package/templates/hugo/layouts/index.html +22 -0
- package/templates/hugo/percher.toml +11 -0
- package/templates/java/Dockerfile +15 -0
- package/templates/java/Main.java +77 -0
- package/templates/java/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/java/percher.toml +11 -0
- package/templates/laravel/Dockerfile +19 -0
- package/templates/laravel/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/laravel/composer.json +15 -0
- package/templates/laravel/percher.toml +11 -0
- package/templates/laravel/public/index.php +37 -0
- package/templates/nextjs/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/nextjs/app/api/health/route.ts +3 -0
- package/templates/nextjs/app/layout.tsx +11 -0
- package/templates/nextjs/app/page.tsx +10 -0
- package/templates/nextjs/next.config.mjs +8 -0
- package/templates/nextjs/package.json +21 -0
- package/templates/nextjs/percher.toml +15 -0
- package/templates/node/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/node/index.js +26 -0
- package/templates/node/package.json +8 -0
- package/templates/node/percher.toml +10 -0
- package/templates/nuxt/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/nuxt/app.vue +6 -0
- package/templates/nuxt/nuxt.config.ts +4 -0
- package/templates/nuxt/package.json +15 -0
- package/templates/nuxt/percher.toml +15 -0
- package/templates/nuxt/server/api/health.ts +1 -0
- package/templates/phoenix/Dockerfile +15 -0
- package/templates/phoenix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/phoenix/lib/application.ex +15 -0
- package/templates/phoenix/lib/router.ex +39 -0
- package/templates/phoenix/mix.exs +30 -0
- package/templates/phoenix/percher.toml +11 -0
- package/templates/preact/Caddyfile +7 -0
- package/templates/preact/Dockerfile +51 -0
- package/templates/preact/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/preact/index.html +12 -0
- package/templates/preact/package.json +19 -0
- package/templates/preact/percher.toml +11 -0
- package/templates/preact/src/main.tsx +13 -0
- package/templates/preact/vite.config.ts +6 -0
- package/templates/python/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/python/main.py +13 -0
- package/templates/python/nixpacks.toml +8 -0
- package/templates/python/percher.toml +12 -0
- package/templates/python/requirements.txt +2 -0
- package/templates/rails/Dockerfile +11 -0
- package/templates/rails/Gemfile +12 -0
- package/templates/rails/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/rails/config.ru +32 -0
- package/templates/rails/percher.toml +11 -0
- package/templates/remix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/remix/app/root.tsx +19 -0
- package/templates/remix/app/routes/_index.tsx +10 -0
- package/templates/remix/app/routes/health.tsx +5 -0
- package/templates/remix/package.json +30 -0
- package/templates/remix/percher.toml +15 -0
- package/templates/remix/vite.config.ts +7 -0
- package/templates/rust/Cargo.toml +19 -0
- package/templates/rust/Dockerfile +18 -0
- package/templates/rust/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/rust/percher.toml +11 -0
- package/templates/rust/src/main.rs +45 -0
- package/templates/solid/Caddyfile +7 -0
- package/templates/solid/Dockerfile +51 -0
- package/templates/solid/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/solid/index.html +12 -0
- package/templates/solid/package.json +19 -0
- package/templates/solid/percher.toml +11 -0
- package/templates/solid/src/main.tsx +13 -0
- package/templates/solid/vite.config.ts +6 -0
- package/templates/static/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/static/index.html +15 -0
- package/templates/static/percher.toml +6 -0
- package/templates/static/style.css +32 -0
- package/templates/sveltekit/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/sveltekit/package.json +19 -0
- package/templates/sveltekit/percher.toml +15 -0
- package/templates/sveltekit/src/app.html +12 -0
- package/templates/sveltekit/src/routes/+page.svelte +2 -0
- package/templates/sveltekit/src/routes/health/+server.ts +5 -0
- package/templates/sveltekit/svelte.config.js +8 -0
- package/templates/sveltekit/vite.config.js +6 -0
- package/templates/vite-react/Caddyfile +7 -0
- package/templates/vite-react/Dockerfile +51 -0
- package/templates/vite-react/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/vite-react/index.html +12 -0
- package/templates/vite-react/package.json +22 -0
- package/templates/vite-react/percher.toml +11 -0
- package/templates/vite-react/src/main.tsx +20 -0
- package/templates/vite-react/vite.config.ts +6 -0
- package/templates/vite-vue/Caddyfile +7 -0
- package/templates/vite-vue/Dockerfile +51 -0
- package/templates/vite-vue/PERCHER-TEMPLATE-LICENSE.txt +14 -0
- package/templates/vite-vue/index.html +12 -0
- package/templates/vite-vue/package.json +19 -0
- package/templates/vite-vue/percher.toml +11 -0
- package/templates/vite-vue/src/main.ts +12 -0
- package/templates/vite-vue/vite.config.ts +6 -0
package/dist/stream-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-utils.js","sourceRoot":"","sources":["../src/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"stream-utils.js","sourceRoot":"","sources":["../src/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAA6B,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,GAAa,EAAE,QAAgB;IAC3E,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAEtE,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACjD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAE1D,MAAM,UAAU,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC/C,kEAAkE;IAClE,gEAAgE;IAChE,yEAAyE;IACzE,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CACnC,GAAG,CAAC,IAAyD,CAC9D,CAA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AI,IAAI,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAEzE,MAAM,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAEzC,MAAM,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACtC,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -20,7 +20,7 @@ import type { ClassifiedError } from "./error-classifier.js";
|
|
|
20
20
|
* both files. Forward-compat: an unknown code returns null, the
|
|
21
21
|
* CLI falls back to the regex classifier, no breakage.
|
|
22
22
|
*/
|
|
23
|
-
export type DeployErrorCode = "WORKER_UNAVAILABLE" | "WORKER_UNAVAILABLE_PERSISTENT" | "BUILD_TIMEOUT" | "BUILD_FAILED" | "WORKER_ERROR" | "DEPLOY_STALLED";
|
|
23
|
+
export type DeployErrorCode = "WORKER_UNAVAILABLE" | "WORKER_UNAVAILABLE_PERSISTENT" | "BUILD_TIMEOUT" | "BUILD_FAILED" | "WORKER_ERROR" | "WORKER_ENDPOINT_MISSING" | "DEPLOY_STALLED" | "PLATFORM_DISK_LOW" | "PLATFORM_DISK_UNKNOWN" | "PLATFORM_MEMORY_LOW" | "PLAN_POOL_EXCEEDED" | "PLACEMENT_UNDETERMINED" | "PB_BRIDGE_UNAVAILABLE" | "PB_OPERATION_BUSY" | "PB_ROTATION_UNVERIFIED" | "CANARY_FAILED";
|
|
24
24
|
/**
|
|
25
25
|
* Map a canonical Phase 4 error code to a {@link ClassifiedError}.
|
|
26
26
|
* Returns null for NULL / unknown codes so the caller can fall back
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-error-codes.d.ts","sourceRoot":"","sources":["../src/structured-error-codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,+BAA+B,GAC/B,eAAe,GACf,cAAc,GACd,cAAc,GACd,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"structured-error-codes.d.ts","sourceRoot":"","sources":["../src/structured-error-codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,+BAA+B,GAC/B,eAAe,GACf,cAAc,GACd,cAAc,GACd,yBAAyB,GACzB,gBAAgB,GAChB,mBAAmB,GACnB,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,eAAe,CAAC;AAmOpB;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GACjB,eAAe,GAAG,IAAI,CAcxB"}
|
|
@@ -1,4 +1,117 @@
|
|
|
1
1
|
const MAPPINGS = {
|
|
2
|
+
PLATFORM_DISK_LOW: {
|
|
3
|
+
errorClass: "platform_at_capacity",
|
|
4
|
+
phase: "infra",
|
|
5
|
+
cause: "disk_headroom_exhausted",
|
|
6
|
+
title: "Platform storage is too low",
|
|
7
|
+
explanation: () => "Percher paused new deploys: the platform is nearly out of disk. Not your app — nothing to change. Deployed apps keep running; only new deploys are paused.",
|
|
8
|
+
suggestion: "The operator is alerted automatically. Run `percher publish` again in ~15 min; this failure does not count against your app. Still failing after an hour: https://percher.app/status",
|
|
9
|
+
},
|
|
10
|
+
PLATFORM_DISK_UNKNOWN: {
|
|
11
|
+
errorClass: "platform_at_capacity",
|
|
12
|
+
phase: "infra",
|
|
13
|
+
cause: "disk_state_unreadable",
|
|
14
|
+
title: "Platform storage state is unknown",
|
|
15
|
+
// Deliberately weaker than PLATFORM_DISK_LOW above, and it must stay that
|
|
16
|
+
// way: when the platform cannot read its own disk it does not know what
|
|
17
|
+
// else is affected, so it must not promise that running apps are serving
|
|
18
|
+
// normally, and it must not claim the operator was alerted — the
|
|
19
|
+
// measurement that alert would come from is the thing that failed.
|
|
20
|
+
explanation: () => "Percher paused new deploys: it can't read how much disk is left, and won't assume there's room. Not your app. Deployed apps have not been stopped by this.",
|
|
21
|
+
suggestion: "Run `percher publish` again in ~5 min; this failure does not count against your app. Still failing after 15 min: https://percher.app/status",
|
|
22
|
+
},
|
|
23
|
+
PLAN_POOL_EXCEEDED: {
|
|
24
|
+
errorClass: "plan_pool_exceeded",
|
|
25
|
+
phase: "start",
|
|
26
|
+
cause: "plan_pool_exceeded",
|
|
27
|
+
title: "Plan resource pool is full",
|
|
28
|
+
// The gate's own message carries the numbers (what was requested, what is
|
|
29
|
+
// left, what is already committed) and is Percher-authored.
|
|
30
|
+
explanation: (raw) => raw
|
|
31
|
+
? `${trimMessage(raw)} The platform is fine — the account is at its plan's limit.`
|
|
32
|
+
: "This deploy would commit more RAM, vCPU or disk than your plan's pool allows across all your apps. The platform is fine — the account is at its limit.",
|
|
33
|
+
suggestion: "Reduce `[resources]` in this app's percher.toml, delete an app you no longer need, or upgrade at https://percher.app/account/billing. Retrying unchanged will fail the same way.",
|
|
34
|
+
},
|
|
35
|
+
PLACEMENT_UNDETERMINED: {
|
|
36
|
+
errorClass: "infra_unavailable",
|
|
37
|
+
phase: "infra",
|
|
38
|
+
cause: "placement_undetermined",
|
|
39
|
+
title: "Percher could not place your app's container",
|
|
40
|
+
// Percher-authored throughout: the refusal names the app id and a reason
|
|
41
|
+
// drawn from a closed set, never a value the tenant supplies.
|
|
42
|
+
explanation: (raw) => raw
|
|
43
|
+
? `${trimMessage(raw)} This is a platform-side read of Percher's own container placement, not anything in your app.`
|
|
44
|
+
: "Percher could not read which internal network this app's current containers are on, and refused to guess rather than risk splitting the app from its database across two networks.",
|
|
45
|
+
suggestion: "Nothing to change in your app. Retry in a minute; if it persists, the platform is having trouble reaching its container daemon and Percher's operators are alerted.",
|
|
46
|
+
},
|
|
47
|
+
PLATFORM_MEMORY_LOW: {
|
|
48
|
+
errorClass: "platform_at_capacity",
|
|
49
|
+
phase: "infra",
|
|
50
|
+
cause: "box_admission_rejected",
|
|
51
|
+
title: "Platform is at capacity",
|
|
52
|
+
// The box-admission refusal reason (how much was requested, what bound it)
|
|
53
|
+
// is Percher-authored and carries the only numbers worth showing, so it
|
|
54
|
+
// rides along rather than being replaced by a template.
|
|
55
|
+
explanation: (raw) => raw
|
|
56
|
+
? `Percher couldn't fit this deploy on the box right now: ${trimMessage(raw)} Not your app — nothing to change. Deployed apps keep running.`
|
|
57
|
+
: "Percher couldn't fit this deploy on the box right now — the admission gate refused to start the container. Not your app — nothing to change. Deployed apps keep running.",
|
|
58
|
+
suggestion: "Run `percher publish` again in a few minutes; capacity frees up as other deploys finish, and this failure does not count against your app. Still failing after an hour: https://percher.app/status",
|
|
59
|
+
},
|
|
60
|
+
PB_BRIDGE_UNAVAILABLE: {
|
|
61
|
+
errorClass: "infra_unavailable",
|
|
62
|
+
phase: "infra",
|
|
63
|
+
cause: "pb_bridge_unreachable",
|
|
64
|
+
title: "PocketBase is unreachable from the platform",
|
|
65
|
+
explanation: (raw) => raw
|
|
66
|
+
? `Percher could not reach your app's database through its internal bridge: ${trimMessage(raw)}. This is a platform-side issue — your data and your code are both fine.`
|
|
67
|
+
: "Percher could not reach your app's database through its internal bridge. This is a platform-side issue — your data and your code are both fine.",
|
|
68
|
+
suggestion: "Wait a minute and run `percher publish` again; this failure does not count against your app. Your data was not touched — the platform could not read it, which is not the same as it being missing. Still failing after 15 min: https://percher.app/status",
|
|
69
|
+
},
|
|
70
|
+
PB_ROTATION_UNVERIFIED: {
|
|
71
|
+
errorClass: "infra_unavailable",
|
|
72
|
+
phase: "infra",
|
|
73
|
+
cause: "pb_rotation_unverified",
|
|
74
|
+
title: "PocketBase admin password was rotated but not confirmed",
|
|
75
|
+
// Deliberately NOT the PB_BRIDGE_UNAVAILABLE wording: that one promises
|
|
76
|
+
// "your data was not touched", which is false here — the admin credential
|
|
77
|
+
// WAS changed; only the confirmation failed.
|
|
78
|
+
explanation: (raw) => raw
|
|
79
|
+
? `${trimMessage(raw)} The rotation itself ran, so the previously stored admin password may now be stale. Your app data was not modified — only the admin credential changed.`
|
|
80
|
+
: "Percher rotated your app's PocketBase admin password, then could not confirm the rotation. The previously stored admin password may now be stale. Your app data was not modified — only the admin credential changed.",
|
|
81
|
+
suggestion: "Run the superuser reset again (`percher data reset-superuser` or the dashboard's reset button) — the rotation is idempotent, and a successful re-run stores a fresh working credential. This failure does not count against your app.",
|
|
82
|
+
},
|
|
83
|
+
PB_OPERATION_BUSY: {
|
|
84
|
+
errorClass: "pb_operation_busy",
|
|
85
|
+
phase: "start",
|
|
86
|
+
cause: "pb_backup_restore_busy",
|
|
87
|
+
title: "PocketBase is finishing another data operation",
|
|
88
|
+
explanation: (raw) => raw
|
|
89
|
+
? `${trimMessage(raw)} The operation is scoped to this app and must finish before Percher can create the deploy checkpoint.`
|
|
90
|
+
: "PocketBase is already creating a backup or restoring data for this app, so Percher could not create the deploy checkpoint yet.",
|
|
91
|
+
suggestion: "Wait for the current backup, export or restore to finish, then publish again. If no operation is visible after a few minutes, contact support before retrying repeatedly.",
|
|
92
|
+
},
|
|
93
|
+
CANARY_FAILED: {
|
|
94
|
+
// `runtime_crash`, not `health_check_timeout`: the container already
|
|
95
|
+
// PASSED its health check — that is what let the swap happen — and the app
|
|
96
|
+
// then failed on its own public URL. `runtime_crash` routes to
|
|
97
|
+
// `run_doctor`, which is the right next step because doctor has
|
|
98
|
+
// independent evidence: it probes the container and the public route
|
|
99
|
+
// itself instead of taking this classification's word for it.
|
|
100
|
+
errorClass: "runtime_crash",
|
|
101
|
+
// `start`, not `infra`: the phase names where the deploy got to, and it
|
|
102
|
+
// got all the way to serving. An `infra` phase here would put an
|
|
103
|
+
// app-attributable failure in the bucket the platform's own failures use.
|
|
104
|
+
phase: "start",
|
|
105
|
+
cause: "canary_failed",
|
|
106
|
+
title: "Your app went live, then failed its post-deploy check",
|
|
107
|
+
// The raw message carries the probe's own status and error text, which is
|
|
108
|
+
// third-party output — it rides in the explanation, which is diagnostic,
|
|
109
|
+
// and never in a recovery prompt.
|
|
110
|
+
explanation: (raw) => raw
|
|
111
|
+
? `${trimMessage(raw)} The container started and passed its health check, so this is something that only shows up once the app is serving real requests.`
|
|
112
|
+
: "Percher swapped your new version in, then its own public URL did not answer correctly. The container started and passed its health check, so this is something that only shows up once the app is serving real requests.",
|
|
113
|
+
suggestion: "Run `percher doctor` — it re-probes the container and the public route and will say which half is failing. The container log from the moment it was rolled back is in the build log below. Retrying unchanged will usually fail the same way.",
|
|
114
|
+
},
|
|
2
115
|
WORKER_UNAVAILABLE: {
|
|
3
116
|
errorClass: "infra_unavailable",
|
|
4
117
|
phase: "infra",
|
|
@@ -45,6 +158,16 @@ const MAPPINGS = {
|
|
|
45
158
|
: "The build worker hit an internal error. This is a Percher bug, not your code.",
|
|
46
159
|
suggestion: "Retry once — transient platform errors usually clear within a minute. If it repeats, please report it: include the deploy ID and we'll investigate. Your account is not at fault.",
|
|
47
160
|
},
|
|
161
|
+
WORKER_ENDPOINT_MISSING: {
|
|
162
|
+
errorClass: "infra_unavailable",
|
|
163
|
+
phase: "infra",
|
|
164
|
+
cause: "worker_endpoint_missing",
|
|
165
|
+
title: "Platform worker is mid-upgrade",
|
|
166
|
+
explanation: (raw) => raw
|
|
167
|
+
? `${trimMessage(raw)} The platform's worker process predates an endpoint this request needs — a rolling-deploy skew, not your code.`
|
|
168
|
+
: "The platform's worker process predates an endpoint this request needs — a rolling-deploy skew, not your code.",
|
|
169
|
+
suggestion: "Retry in a few minutes; the operator finishes the platform deploy worker-first. This failure does not count against your app.",
|
|
170
|
+
},
|
|
48
171
|
DEPLOY_STALLED: {
|
|
49
172
|
errorClass: "infra_unavailable",
|
|
50
173
|
phase: "infra",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-error-codes.js","sourceRoot":"","sources":["../src/structured-error-codes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"structured-error-codes.js","sourceRoot":"","sources":["../src/structured-error-codes.ts"],"names":[],"mappings":"AAwDA,MAAM,QAAQ,GAAyC;IACrD,iBAAiB,EAAE;QACjB,UAAU,EAAE,sBAAsB;QAClC,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,yBAAyB;QAChC,KAAK,EAAE,6BAA6B;QACpC,WAAW,EAAE,GAAG,EAAE,CAChB,4JAA4J;QAC9J,UAAU,EACR,sLAAsL;KACzL;IACD,qBAAqB,EAAE;QACrB,UAAU,EAAE,sBAAsB;QAClC,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,uBAAuB;QAC9B,KAAK,EAAE,mCAAmC;QAC1C,0EAA0E;QAC1E,wEAAwE;QACxE,yEAAyE;QACzE,iEAAiE;QACjE,mEAAmE;QACnE,WAAW,EAAE,GAAG,EAAE,CAChB,4JAA4J;QAC9J,UAAU,EACR,6IAA6I;KAChJ;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,oBAAoB;QAChC,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,oBAAoB;QAC3B,KAAK,EAAE,4BAA4B;QACnC,0EAA0E;QAC1E,4DAA4D;QAC5D,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CACnB,GAAG;YACD,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,6DAA6D;YAClF,CAAC,CAAC,wJAAwJ;QAC9J,UAAU,EACR,kLAAkL;KACrL;IACD,sBAAsB,EAAE;QACtB,UAAU,EAAE,mBAAmB;QAC/B,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,wBAAwB;QAC/B,KAA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uL;KAC1L;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAA+B,EAC/B,UAAkB;IAElB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAuB,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC;QAC5C,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,aAAa,EAAE,EAAE;QACjB,cAAc,EAAE,EAAE;KACnB,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,4DAA4D;IAC5D,4DAA4D;IAC5D,6DAA6D;IAC7D,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,OAAO,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../../src/templates/ai-files/claude-md.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;IACpB,EAAE,EAAE,WAAW;IACf,IAAI;IACJ,OAAO;IACP,OAAO;
|
|
1
|
+
{"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../../src/templates/ai-files/claude-md.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;IACpB,EAAE,EAAE,WAAW;IACf,IAAI;IACJ,OAAO;IACP,OAAO;CAyFR,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const CLAUDE_MD = {
|
|
2
2
|
id: "claude-md",
|
|
3
3
|
path: "CLAUDE.md",
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.1.0",
|
|
5
5
|
content: `# CLAUDE.md — Percher publishing instructions
|
|
6
6
|
|
|
7
7
|
This project is hosted on **Percher** (https://percher.app). Apps run
|
|
@@ -73,6 +73,23 @@ fix the root cause, and retry.
|
|
|
73
73
|
|
|
74
74
|
This file is managed by \`bunx percher ai-files\`. Run
|
|
75
75
|
\`bunx percher ai-files update\` to pull updates.
|
|
76
|
+
|
|
77
|
+
<!--
|
|
78
|
+
BSD Zero Clause License (0BSD)
|
|
79
|
+
|
|
80
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
81
|
+
|
|
82
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
83
|
+
purpose with or without fee is hereby granted.
|
|
84
|
+
|
|
85
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
86
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
87
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
88
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
89
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
90
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
91
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
92
|
+
-->
|
|
76
93
|
`,
|
|
77
94
|
};
|
|
78
95
|
//# sourceMappingURL=claude-md.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/templates/ai-files/claude-md.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,WAAoB;IACxB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/templates/ai-files/claude-md.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,WAAoB;IACxB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFV;CACA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor-percher-mdc.d.ts","sourceRoot":"","sources":["../../../src/templates/ai-files/cursor-percher-mdc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;IAC7B,EAAE,EAAE,oBAAoB;IACxB,IAAI;IACJ,OAAO;IACP,OAAO;
|
|
1
|
+
{"version":3,"file":"cursor-percher-mdc.d.ts","sourceRoot":"","sources":["../../../src/templates/ai-files/cursor-percher-mdc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;IAC7B,EAAE,EAAE,oBAAoB;IACxB,IAAI;IACJ,OAAO;IACP,OAAO;CA6HR,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const CURSOR_PERCHER_MDC = {
|
|
2
2
|
id: "cursor-percher-mdc",
|
|
3
3
|
path: ".cursor/rules/percher.mdc",
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.2.0",
|
|
5
5
|
content: `---
|
|
6
6
|
description: How to publish this project to Percher
|
|
7
7
|
globs: ["percher.toml", "**/*.{ts,tsx,js,jsx,py}"]
|
|
@@ -109,6 +109,23 @@ if (process.env.HTTPS_PROXY) {
|
|
|
109
109
|
|
|
110
110
|
This file is managed by \`bunx percher ai-files\`. Run
|
|
111
111
|
\`bunx percher ai-files update\` to pull updates.
|
|
112
|
+
|
|
113
|
+
<!--
|
|
114
|
+
BSD Zero Clause License (0BSD)
|
|
115
|
+
|
|
116
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
117
|
+
|
|
118
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
119
|
+
purpose with or without fee is hereby granted.
|
|
120
|
+
|
|
121
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
122
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
123
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
124
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
125
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
126
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
127
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
128
|
+
-->
|
|
112
129
|
`,
|
|
113
130
|
};
|
|
114
131
|
//# sourceMappingURL=cursor-percher-mdc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor-percher-mdc.js","sourceRoot":"","sources":["../../../src/templates/ai-files/cursor-percher-mdc.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,oBAA6B;IACjC,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"cursor-percher-mdc.js","sourceRoot":"","sources":["../../../src/templates/ai-files/cursor-percher-mdc.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,oBAA6B;IACjC,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HV;CACA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percher/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Core logic and CLI commands for the Percher hosting platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
|
-
"dist"
|
|
36
|
+
"dist",
|
|
37
|
+
"templates"
|
|
37
38
|
],
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",
|
|
@@ -41,15 +42,15 @@
|
|
|
41
42
|
"typecheck": "tsc --noEmit"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@percher/client": "^0.
|
|
45
|
-
"@percher/shared": "^0.
|
|
46
|
-
"@percher/toml": "^0.
|
|
45
|
+
"@percher/client": "^1.0.1",
|
|
46
|
+
"@percher/shared": "^1.0.0",
|
|
47
|
+
"@percher/toml": "^1.0.0",
|
|
47
48
|
"@types/jscodeshift": "17.3.0",
|
|
48
49
|
"cross-spawn": "^7.0.6",
|
|
49
50
|
"ignore": "^7.0.5",
|
|
50
51
|
"jscodeshift": "17.4.0",
|
|
51
52
|
"qrcode": "^1.5.4",
|
|
52
|
-
"tar-stream": "
|
|
53
|
+
"tar-stream": "3.1.9",
|
|
53
54
|
"zod": "^4.3.6"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"bun-types": "^1.1.0",
|
|
60
61
|
"tsc-alias": "^1.8.17"
|
|
61
62
|
},
|
|
62
|
-
"license": "MIT",
|
|
63
|
+
"license": "FSL-1.1-MIT",
|
|
63
64
|
"author": "Mattias Malmborg",
|
|
64
65
|
"repository": {
|
|
65
66
|
"type": "git",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
BSD Zero Clause License (0BSD)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Multi-stage build: a Bun stage compiles the static bundle, then a
|
|
2
|
+
# minimal Caddy image serves it. This project uses runtime = "docker"
|
|
3
|
+
# (not "static") because Percher's static runtime serves pre-built
|
|
4
|
+
# files only — it does not run a build command. Generated by Percher;
|
|
5
|
+
# safe to edit and own.
|
|
6
|
+
|
|
7
|
+
# --- Build stage: install deps and build the static bundle -----------
|
|
8
|
+
FROM oven/bun:1-alpine AS build
|
|
9
|
+
WORKDIR /app
|
|
10
|
+
COPY . .
|
|
11
|
+
RUN bun install && bun run build
|
|
12
|
+
|
|
13
|
+
# --- Serve stage: minimal Caddy image --------------------------------
|
|
14
|
+
# Build pinned Caddy source with refreshed security modules. The scratch
|
|
15
|
+
# runtime carries no shell, package manager, or file capabilities and listens
|
|
16
|
+
# on the unprivileged port :8080.
|
|
17
|
+
FROM golang:1.26.7-alpine3.23@sha256:b17af760035fc2f338eed92d448a6c67f2d45438844fc6c60678fa5f99e44b57 AS caddy-source
|
|
18
|
+
ADD --checksum=sha256:78e660d838e45c0b8c89338b325946238f153641aa9925df9ef2ad5e8eced31b \
|
|
19
|
+
https://github.com/caddyserver/caddy/commit/b2693fb63a30e6d7be0972c3645e9a2c0a500e93.patch /tmp/caddy-cel-go.patch
|
|
20
|
+
RUN go mod download github.com/caddyserver/caddy/v2@v2.11.4 \
|
|
21
|
+
&& cp -R /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.4 /src \
|
|
22
|
+
&& chmod -R u+w /src
|
|
23
|
+
WORKDIR /src
|
|
24
|
+
RUN apk add --no-cache patch \
|
|
25
|
+
&& patch -p1 < /tmp/caddy-cel-go.patch \
|
|
26
|
+
&& go get github.com/go-chi/chi/v5@v5.3.0 github.com/google/cel-go@v0.29.2 \
|
|
27
|
+
github.com/klauspost/compress@v1.18.7 go.opentelemetry.io/otel@v1.44.0 \
|
|
28
|
+
golang.org/x/crypto@v0.55.0 golang.org/x/net@v0.58.0 \
|
|
29
|
+
golang.org/x/text@v0.41.0 google.golang.org/grpc@v1.83.2 \
|
|
30
|
+
&& go mod tidy \
|
|
31
|
+
&& CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/caddy ./cmd/caddy \
|
|
32
|
+
&& printf '%s\n' \
|
|
33
|
+
'package main' \
|
|
34
|
+
'import ("net/http"; "os"; "time")' \
|
|
35
|
+
'func main(){ if len(os.Args)!=2 { os.Exit(2) }; c:=http.Client{Timeout:2500*time.Millisecond,Transport:&http.Transport{Proxy:nil},CheckRedirect:func(_ *http.Request,_ []*http.Request) error{return http.ErrUseLastResponse}}; r,e:=c.Get(os.Args[1]); if e!=nil { os.Exit(1) }; defer r.Body.Close(); if r.StatusCode!=http.StatusOK { os.Exit(1) } }' \
|
|
36
|
+
> /tmp/percher-healthcheck.go \
|
|
37
|
+
&& CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/percher-healthcheck /tmp/percher-healthcheck.go
|
|
38
|
+
FROM scratch
|
|
39
|
+
COPY --from=caddy-source /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
40
|
+
COPY --from=caddy-source /out/caddy /usr/bin/caddy
|
|
41
|
+
COPY --from=caddy-source /out/percher-healthcheck /usr/bin/percher-healthcheck
|
|
42
|
+
COPY Caddyfile /etc/caddy/Caddyfile
|
|
43
|
+
COPY --from=build /app/dist /srv
|
|
44
|
+
LABEL dev.percher.health-client="static-http-v1"
|
|
45
|
+
# HOME points at the writable tmpfs so non-root Caddy can persist its
|
|
46
|
+
# XDG state (storage-clean lock, config autosave) under Percher's
|
|
47
|
+
# read-only root filesystem.
|
|
48
|
+
ENV HOME=/tmp
|
|
49
|
+
USER 10001:10001
|
|
50
|
+
EXPOSE 8080
|
|
51
|
+
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
BSD Zero Clause License (0BSD)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
const title = "__APP_NAME__";
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<html lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<meta name="viewport" content="width=device-width" />
|
|
9
|
+
<title>{title}</title>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<h1>Hello from {title}!</h1>
|
|
13
|
+
<p>Built with Astro on Percher.</p>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
BSD Zero Clause License (0BSD)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const port = Number(process.env.PORT ?? 3000);
|
|
2
|
+
|
|
3
|
+
Bun.serve({
|
|
4
|
+
port,
|
|
5
|
+
hostname: "0.0.0.0",
|
|
6
|
+
fetch(req) {
|
|
7
|
+
const url = new URL(req.url);
|
|
8
|
+
|
|
9
|
+
if (url.pathname === "/health") {
|
|
10
|
+
return Response.json({ status: "ok" });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (url.pathname === "/") {
|
|
14
|
+
return new Response("Hello from __APP_NAME__!", {
|
|
15
|
+
headers: { "Content-Type": "text/plain" },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return new Response("Not found", { status: 404 });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
console.log(`[__APP_NAME__] listening on http://0.0.0.0:${port}`);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Capsule build: a Bun stage compiles the static Preact bundle, then a minimal
|
|
2
|
+
# Caddy image serves it. runtime = "docker" (not "static") because the static
|
|
3
|
+
# runtime serves pre-built files only — it does not run a build command.
|
|
4
|
+
# Generated by Percher; safe to edit and own.
|
|
5
|
+
|
|
6
|
+
# --- Build stage: install deps and build the static bundle -----------
|
|
7
|
+
FROM oven/bun:1-alpine AS build
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
COPY . .
|
|
10
|
+
# Percher injects VITE_POCKETBASE_URL (the app's own pb-<app>.<suffix> origin)
|
|
11
|
+
# as a build-arg. A runtime=docker build only sees it if the Dockerfile DECLARES
|
|
12
|
+
# the ARG before the build — without this, db.ts compiles against `undefined`.
|
|
13
|
+
ARG VITE_POCKETBASE_URL
|
|
14
|
+
ENV VITE_POCKETBASE_URL=$VITE_POCKETBASE_URL
|
|
15
|
+
# Managed inference endpoint (Slice 3) — also a public URL, baked in the same way.
|
|
16
|
+
ARG VITE_PERCHER_AI_URL
|
|
17
|
+
ENV VITE_PERCHER_AI_URL=$VITE_PERCHER_AI_URL
|
|
18
|
+
RUN bun install && bun run build
|
|
19
|
+
|
|
20
|
+
# --- Serve stage: minimal Caddy image --------------------------------
|
|
21
|
+
# Build pinned Caddy source with refreshed security modules. The scratch
|
|
22
|
+
# runtime carries no shell, package manager, or file capabilities and listens
|
|
23
|
+
# on the unprivileged port :8080.
|
|
24
|
+
FROM golang:1.26.7-alpine3.23@sha256:b17af760035fc2f338eed92d448a6c67f2d45438844fc6c60678fa5f99e44b57 AS caddy-source
|
|
25
|
+
ADD --checksum=sha256:78e660d838e45c0b8c89338b325946238f153641aa9925df9ef2ad5e8eced31b \
|
|
26
|
+
https://github.com/caddyserver/caddy/commit/b2693fb63a30e6d7be0972c3645e9a2c0a500e93.patch /tmp/caddy-cel-go.patch
|
|
27
|
+
RUN go mod download github.com/caddyserver/caddy/v2@v2.11.4 \
|
|
28
|
+
&& cp -R /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.4 /src \
|
|
29
|
+
&& chmod -R u+w /src
|
|
30
|
+
WORKDIR /src
|
|
31
|
+
RUN apk add --no-cache patch \
|
|
32
|
+
&& patch -p1 < /tmp/caddy-cel-go.patch \
|
|
33
|
+
&& go get github.com/go-chi/chi/v5@v5.3.0 github.com/google/cel-go@v0.29.2 \
|
|
34
|
+
github.com/klauspost/compress@v1.18.7 go.opentelemetry.io/otel@v1.44.0 \
|
|
35
|
+
golang.org/x/crypto@v0.55.0 golang.org/x/net@v0.58.0 \
|
|
36
|
+
golang.org/x/text@v0.41.0 google.golang.org/grpc@v1.83.2 \
|
|
37
|
+
&& go mod tidy \
|
|
38
|
+
&& CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/caddy ./cmd/caddy \
|
|
39
|
+
&& printf '%s\n' \
|
|
40
|
+
'package main' \
|
|
41
|
+
'import ("net/http"; "os"; "time")' \
|
|
42
|
+
'func main(){ if len(os.Args)!=2 { os.Exit(2) }; c:=http.Client{Timeout:2500*time.Millisecond,Transport:&http.Transport{Proxy:nil},CheckRedirect:func(_ *http.Request,_ []*http.Request) error{return http.ErrUseLastResponse}}; r,e:=c.Get(os.Args[1]); if e!=nil { os.Exit(1) }; defer r.Body.Close(); if r.StatusCode!=http.StatusOK { os.Exit(1) } }' \
|
|
43
|
+
> /tmp/percher-healthcheck.go \
|
|
44
|
+
&& CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/percher-healthcheck /tmp/percher-healthcheck.go
|
|
45
|
+
FROM scratch
|
|
46
|
+
COPY --from=caddy-source /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
47
|
+
COPY --from=caddy-source /out/caddy /usr/bin/caddy
|
|
48
|
+
COPY --from=caddy-source /out/percher-healthcheck /usr/bin/percher-healthcheck
|
|
49
|
+
COPY Caddyfile /etc/caddy/Caddyfile
|
|
50
|
+
COPY --from=build /app/dist /srv
|
|
51
|
+
LABEL dev.percher.health-client="static-http-v1"
|
|
52
|
+
# HOME points at the writable tmpfs so non-root Caddy can persist its XDG state
|
|
53
|
+
# under Percher's read-only root filesystem.
|
|
54
|
+
ENV HOME=/tmp
|
|
55
|
+
USER 10001:10001
|
|
56
|
+
EXPOSE 8080
|
|
57
|
+
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
BSD Zero Clause License (0BSD)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mattias Malmborg
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>__APP_NAME__</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|