@rebasepro/cli 0.11.1-canary.gfd39654 → 0.12.1-canary.gdfba2a1

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 (39) hide show
  1. package/bin/rebase.js +21 -0
  2. package/dist/bundle.d.ts +24 -7
  3. package/dist/commands/eject.d.ts +1 -0
  4. package/dist/commands/init.d.ts +19 -15
  5. package/dist/fold-static.d.ts +41 -15
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.es.js +899 -250
  8. package/dist/index.es.js.map +1 -1
  9. package/dist/manifest.d.ts +27 -8
  10. package/package.json +11 -11
  11. package/runtime/dev-server.mjs +0 -1
  12. package/templates/{template/backend → eject}/Dockerfile +16 -4
  13. package/templates/{template → eject}/backend/src/env.ts +0 -1
  14. package/templates/{template → eject}/backend/src/index.ts +41 -27
  15. package/templates/eject/docker-compose.custom.yml +71 -0
  16. package/templates/overlays/baas/backend/package.json +1 -4
  17. package/templates/overlays/baas/backend/tsconfig.json +8 -2
  18. package/templates/overlays/baas/config/index.ts +15 -0
  19. package/templates/overlays/baas/config/package.json +28 -0
  20. package/templates/overlays/baas/package.json +2 -1
  21. package/templates/overlays/baas/pnpm-workspace.yaml +1 -0
  22. package/templates/overlays/baas/rebase.json +2 -6
  23. package/templates/template/.env.example +15 -0
  24. package/templates/template/README.md +56 -22
  25. package/templates/template/ai-instructions.md +1 -0
  26. package/templates/template/backend/functions/hello.ts +45 -14
  27. package/templates/template/backend/package.json +1 -4
  28. package/templates/template/backend/tsconfig.json +23 -2
  29. package/templates/template/config/tsconfig.json +16 -1
  30. package/templates/template/docker-compose.yml +62 -38
  31. package/templates/template/frontend/package.json +2 -1
  32. package/templates/template/frontend/src/App.tsx +2 -1
  33. package/templates/template/frontend/src/main.tsx +8 -1
  34. package/templates/template/frontend/vite.config.ts +5 -0
  35. package/templates/template/rebase.json +5 -8
  36. package/templates/overlays/baas/backend/src/index.ts +0 -216
  37. package/templates/template/frontend/Dockerfile +0 -52
  38. package/templates/template/frontend/nginx.conf +0 -40
  39. /package/templates/overlays/baas/{backend/src → config}/storage.ts +0 -0
@@ -1,52 +0,0 @@
1
- # ─── Multi-stage production Dockerfile for the Rebase frontend ────────
2
- # Builds the Vite app, then serves via nginx for proper caching/compression.
3
- #
4
- # Build context: the project root (where pnpm-workspace.yaml lives)
5
- # Usage:
6
- # docker build -t my-app-frontend -f frontend/Dockerfile .
7
-
8
- # ── Stage 1: Install + Build ─────────────────────────────────────────
9
- FROM node:24-alpine AS builder
10
-
11
- ENV PNPM_HOME="/pnpm"
12
- ENV PATH="$PNPM_HOME:$PATH"
13
- RUN corepack enable
14
-
15
- RUN apk add --no-cache python3 make g++
16
-
17
- WORKDIR /app
18
-
19
- # Copy workspace root files
20
- COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
21
-
22
- # Copy workspace packages
23
- COPY frontend ./frontend
24
- COPY config ./config
25
-
26
- # Install dependencies (skip scripts to avoid @ariga/atlas binary download,
27
- # which is a backend-only dependency that may fail on certain platforms)
28
- RUN pnpm install --frozen-lockfile --ignore-scripts
29
- RUN pnpm rebuild esbuild
30
-
31
- # Build config first, then frontend
32
- RUN pnpm --filter "*-config" run build
33
- RUN pnpm --filter "*-frontend" run build
34
-
35
- # ── Stage 2: Serve with nginx ────────────────────────────────────────
36
- FROM nginx:1.27-alpine AS runtime
37
-
38
- # Remove default nginx page
39
- RUN rm -rf /usr/share/nginx/html/*
40
-
41
- # Copy built assets
42
- COPY --from=builder /app/frontend/dist /usr/share/nginx/html
43
-
44
- # Custom nginx config for SPA routing + compression
45
- COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
46
-
47
- EXPOSE 80
48
-
49
- HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
50
- CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
51
-
52
- CMD ["nginx", "-g", "daemon off;"]
@@ -1,40 +0,0 @@
1
- server {
2
- listen 80;
3
- server_name _;
4
-
5
- root /usr/share/nginx/html;
6
- index index.html;
7
-
8
- # Gzip compression
9
- gzip on;
10
- gzip_vary on;
11
- gzip_proxied any;
12
- gzip_comp_level 6;
13
- gzip_min_length 256;
14
- gzip_types
15
- text/plain
16
- text/css
17
- text/javascript
18
- application/javascript
19
- application/json
20
- application/xml
21
- image/svg+xml
22
- font/woff2;
23
-
24
- # Cache static assets aggressively (hashed filenames from Vite)
25
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
26
- expires 1y;
27
- add_header Cache-Control "public, immutable";
28
- try_files $uri =404;
29
- }
30
-
31
- # SPA fallback: serve index.html for all non-file routes
32
- location / {
33
- try_files $uri $uri/ /index.html;
34
- }
35
-
36
- # Security headers
37
- add_header X-Frame-Options "SAMEORIGIN" always;
38
- add_header X-Content-Type-Options "nosniff" always;
39
- add_header Referrer-Policy "strict-origin-when-cross-origin" always;
40
- }