@percher/core 1.0.1 → 1.0.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 (62) hide show
  1. package/dist/commands/doctor.js +1 -1
  2. package/dist/commands/doctor.js.map +1 -1
  3. package/dist/commands/forgejo.js +2 -2
  4. package/dist/commands/forgejo.js.map +1 -1
  5. package/dist/commands/logs.d.ts.map +1 -1
  6. package/dist/commands/logs.js +7 -2
  7. package/dist/commands/logs.js.map +1 -1
  8. package/dist/commands/publish-failure.d.ts +1 -1
  9. package/dist/commands/publish-failure.d.ts.map +1 -1
  10. package/dist/commands/publish-failure.js +3 -0
  11. package/dist/commands/publish-failure.js.map +1 -1
  12. package/dist/commands/publish.d.ts +3 -0
  13. package/dist/commands/publish.d.ts.map +1 -1
  14. package/dist/commands/publish.js +11 -4
  15. package/dist/commands/publish.js.map +1 -1
  16. package/dist/commands/redeploy.js +1 -1
  17. package/dist/commands/redeploy.js.map +1 -1
  18. package/dist/commands/reproduce.js +1 -1
  19. package/dist/commands/reproduce.js.map +1 -1
  20. package/dist/commands/sleep.d.ts +18 -0
  21. package/dist/commands/sleep.d.ts.map +1 -0
  22. package/dist/commands/sleep.js +23 -0
  23. package/dist/commands/sleep.js.map +1 -0
  24. package/dist/error-classifier.d.ts +1 -1
  25. package/dist/error-classifier.d.ts.map +1 -1
  26. package/dist/error-classifier.js +38 -0
  27. package/dist/error-classifier.js.map +1 -1
  28. package/dist/index.d.ts +2 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +2 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/plans.d.ts +2 -0
  33. package/dist/plans.d.ts.map +1 -1
  34. package/dist/plans.js +13 -1
  35. package/dist/plans.js.map +1 -1
  36. package/dist/poll-deployment.js +1 -1
  37. package/dist/poll-deployment.js.map +1 -1
  38. package/dist/recovery.d.ts +55 -3
  39. package/dist/recovery.d.ts.map +1 -1
  40. package/dist/recovery.js +91 -19
  41. package/dist/recovery.js.map +1 -1
  42. package/dist/structured-error-codes.d.ts +1 -1
  43. package/dist/structured-error-codes.d.ts.map +1 -1
  44. package/dist/structured-error-codes.js +10 -0
  45. package/dist/structured-error-codes.js.map +1 -1
  46. package/dist/templates/ai-files/claude-md.d.ts.map +1 -1
  47. package/dist/templates/ai-files/claude-md.js +17 -1
  48. package/dist/templates/ai-files/claude-md.js.map +1 -1
  49. package/dist/templates/ai-files/cursor-percher-mdc.d.ts.map +1 -1
  50. package/dist/templates/ai-files/cursor-percher-mdc.js +16 -3
  51. package/dist/templates/ai-files/cursor-percher-mdc.js.map +1 -1
  52. package/dist/templates.js +3 -3
  53. package/dist/templates.js.map +1 -1
  54. package/package.json +4 -4
  55. package/templates/dotnet/Dockerfile +5 -3
  56. package/templates/dotnet/app.csproj +1 -1
  57. package/templates/go/Dockerfile +16 -6
  58. package/templates/java/Dockerfile +2 -0
  59. package/templates/laravel/Dockerfile +2 -0
  60. package/templates/phoenix/Dockerfile +2 -0
  61. package/templates/rails/Dockerfile +2 -0
  62. package/templates/rust/Dockerfile +8 -4
@@ -1,6 +1,6 @@
1
1
  <Project Sdk="Microsoft.NET.Sdk.Web">
2
2
  <PropertyGroup>
3
- <TargetFramework>net8.0</TargetFramework>
3
+ <TargetFramework>net10.0</TargetFramework>
4
4
  <Nullable>enable</Nullable>
5
5
  <ImplicitUsings>enable</ImplicitUsings>
6
6
  <AssemblyName>app</AssemblyName>
@@ -1,11 +1,21 @@
1
- FROM golang:1.23-alpine AS build
1
+ FROM golang:1.26-alpine3.24 AS build
2
2
  WORKDIR /src
3
3
  COPY go.mod ./
4
4
  COPY main.go ./
5
- RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /app .
5
+ RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /out/app .
6
6
 
7
- FROM gcr.io/distroless/static-debian12:nonroot
8
- COPY --from=build /app /app
7
+ FROM alpine:3.24
8
+ # Alpine rather than distroless: Percher's container health check runs through
9
+ # /bin/sh (wget), which a distroless image does not have.
10
+ # tini as PID 1 forwards SIGTERM to the app so stop/redeploy shuts down cleanly.
11
+ RUN apk add --no-cache ca-certificates tini \
12
+ && addgroup -S app && adduser -S app -G app
13
+ # The binary lives outside /app on purpose: Percher mounts the app's
14
+ # persistent data volume at /app/data, which cannot exist if /app is a file.
15
+ COPY --from=build --chown=app:app /out/app /usr/local/bin/app
16
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
17
+ RUN mkdir -p /app/data && chown app:app /app/data
18
+ USER app
9
19
  EXPOSE 8080
10
- USER nonroot
11
- ENTRYPOINT ["/app"]
20
+ ENTRYPOINT ["/sbin/tini", "--"]
21
+ CMD ["/usr/local/bin/app"]
@@ -10,6 +10,8 @@ FROM eclipse-temurin:21-jre-alpine
10
10
  RUN addgroup -S app && adduser -S app -G app
11
11
  WORKDIR /app
12
12
  COPY --from=build --chown=app:app /build/ ./
13
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
14
+ RUN mkdir -p /app/data && chown app:app /app/data
13
15
  USER app
14
16
  EXPOSE 8080
15
17
  ENTRYPOINT ["java", "Main"]
@@ -13,6 +13,8 @@ COPY --from=vendor --chown=app:app /app/vendor ./vendor
13
13
  COPY --chown=app:app . .
14
14
  RUN composer dump-autoload --no-dev --optimize 2>/dev/null || true \
15
15
  && chown -R app:app /app
16
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
17
+ RUN mkdir -p /app/data && chown app:app /app/data
16
18
  USER app
17
19
  EXPOSE 8000
18
20
  ENTRYPOINT ["/sbin/tini", "--"]
@@ -4,6 +4,8 @@ RUN apk add --no-cache build-base \
4
4
  && addgroup -S app && adduser -S app -G app \
5
5
  && mkdir -p /home/app/.mix \
6
6
  && chown -R app:app /home/app /app
7
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
8
+ RUN mkdir -p /app/data && chown app:app /app/data
7
9
  USER app
8
10
  RUN mix local.hex --force && mix local.rebar --force
9
11
  COPY --chown=app:app mix.exs ./
@@ -6,6 +6,8 @@ COPY --chown=app:app Gemfile ./
6
6
  RUN bundle install --jobs 4 --retry 3
7
7
  COPY --chown=app:app . .
8
8
  RUN chown -R app:app /app /usr/local/bundle
9
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
10
+ RUN mkdir -p /app/data && chown app:app /app/data
9
11
  USER app
10
12
  EXPOSE 3000
11
13
  CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0", "-p", "3000"]
@@ -1,18 +1,22 @@
1
- FROM rust:1.82-alpine AS build
1
+ FROM rust:1-alpine3.24 AS build
2
2
  RUN apk add --no-cache musl-dev
3
3
  WORKDIR /src
4
4
  COPY Cargo.toml Cargo.lock* ./
5
5
  COPY src ./src
6
6
  RUN cargo build --release --bin app
7
7
 
8
- FROM alpine:3.20
8
+ FROM alpine:3.24
9
9
  # tini as PID 1 forwards SIGTERM to the app; without it the bare binary as PID 1
10
10
  # ignores SIGTERM (Linux PID-1 special case) and the container is SIGKILLed on
11
11
  # every stop/redeploy instead of shutting down cleanly.
12
12
  RUN apk add --no-cache ca-certificates tini \
13
13
  && addgroup -S app && adduser -S app -G app
14
- COPY --from=build --chown=app:app /src/target/release/app /app
14
+ # The binary lives outside /app on purpose: Percher mounts the app's
15
+ # persistent data volume at /app/data, which cannot exist if /app is a file.
16
+ COPY --from=build --chown=app:app /src/target/release/app /usr/local/bin/app
17
+ # A fresh data volume takes this directory's ownership, so the app user can write it.
18
+ RUN mkdir -p /app/data && chown app:app /app/data
15
19
  USER app
16
20
  EXPOSE 8080
17
21
  ENTRYPOINT ["/sbin/tini", "--"]
18
- CMD ["/app"]
22
+ CMD ["/usr/local/bin/app"]