@ereo/cli 0.2.1 → 0.2.2
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/dist/commands/dev.d.ts.map +1 -1
- package/dist/index.js +56 -2
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,GAAG,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,GAAG,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyQjE"}
|
package/dist/index.js
CHANGED
|
@@ -1543,9 +1543,8 @@ async function dev(options = {}) {
|
|
|
1543
1543
|
}, 200);
|
|
1544
1544
|
});
|
|
1545
1545
|
}
|
|
1546
|
-
router.on("reload",
|
|
1546
|
+
router.on("reload", () => {
|
|
1547
1547
|
console.log("\x1B[33m\u27F3\x1B[0m Routes reloaded");
|
|
1548
|
-
await router.loadAllModules();
|
|
1549
1548
|
hmr.reload();
|
|
1550
1549
|
});
|
|
1551
1550
|
router.on("change", (route) => {
|
|
@@ -1866,6 +1865,8 @@ function generateTemplateFiles(template, typescript, projectName, version) {
|
|
|
1866
1865
|
files["app/globals.css"] = generateGlobalCSS();
|
|
1867
1866
|
}
|
|
1868
1867
|
files[".gitignore"] = generateGitignore();
|
|
1868
|
+
files["Dockerfile"] = generateDockerfile();
|
|
1869
|
+
files[".dockerignore"] = generateDockerignore();
|
|
1869
1870
|
return files;
|
|
1870
1871
|
}
|
|
1871
1872
|
function generateEreoConfig(template) {
|
|
@@ -2794,6 +2795,59 @@ export async function action({ request, context }${typescript ? ": ActionArgs" :
|
|
|
2794
2795
|
}
|
|
2795
2796
|
`.trim();
|
|
2796
2797
|
}
|
|
2798
|
+
function generateDockerfile() {
|
|
2799
|
+
return `# ---- Build Stage ----
|
|
2800
|
+
FROM oven/bun:1 AS build
|
|
2801
|
+
|
|
2802
|
+
WORKDIR /app
|
|
2803
|
+
|
|
2804
|
+
# Install dependencies first (cached layer)
|
|
2805
|
+
COPY package.json bun.lock* ./
|
|
2806
|
+
RUN bun install --frozen-lockfile
|
|
2807
|
+
|
|
2808
|
+
# Copy source files
|
|
2809
|
+
COPY app/ ./app/
|
|
2810
|
+
COPY public/ ./public/
|
|
2811
|
+
COPY ereo.config.ts tsconfig.json ./
|
|
2812
|
+
|
|
2813
|
+
# Build for production
|
|
2814
|
+
RUN bun run build
|
|
2815
|
+
|
|
2816
|
+
# ---- Production Stage ----
|
|
2817
|
+
FROM oven/bun:1-slim
|
|
2818
|
+
|
|
2819
|
+
WORKDIR /app
|
|
2820
|
+
|
|
2821
|
+
# Copy package manifests and install production deps only
|
|
2822
|
+
COPY package.json bun.lock* ./
|
|
2823
|
+
RUN bun install --frozen-lockfile --production
|
|
2824
|
+
|
|
2825
|
+
# Copy source (needed by ereo start for route discovery)
|
|
2826
|
+
COPY app/ ./app/
|
|
2827
|
+
COPY ereo.config.ts ./
|
|
2828
|
+
|
|
2829
|
+
# Copy build output from build stage
|
|
2830
|
+
COPY --from=build /app/.ereo ./.ereo
|
|
2831
|
+
|
|
2832
|
+
# Expose port
|
|
2833
|
+
EXPOSE 3000
|
|
2834
|
+
|
|
2835
|
+
# Run production server
|
|
2836
|
+
CMD ["bun", "run", "start"]
|
|
2837
|
+
`.trim();
|
|
2838
|
+
}
|
|
2839
|
+
function generateDockerignore() {
|
|
2840
|
+
return `node_modules
|
|
2841
|
+
.ereo
|
|
2842
|
+
.env
|
|
2843
|
+
.env.local
|
|
2844
|
+
.env.*.local
|
|
2845
|
+
*.log
|
|
2846
|
+
.DS_Store
|
|
2847
|
+
.git
|
|
2848
|
+
.gitignore
|
|
2849
|
+
`.trim();
|
|
2850
|
+
}
|
|
2797
2851
|
|
|
2798
2852
|
// src/commands/deploy.ts
|
|
2799
2853
|
init_config();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ereo/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Ereo Team",
|
|
6
6
|
"homepage": "https://ereojs.github.io/ereoJS",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ereo/bundler": "^0.2.
|
|
39
|
-
"@ereo/core": "^0.2.
|
|
40
|
-
"@ereo/router": "^0.2.
|
|
41
|
-
"@ereo/server": "^0.2.
|
|
42
|
-
"@ereo/trace": "^0.2.
|
|
38
|
+
"@ereo/bundler": "^0.2.2",
|
|
39
|
+
"@ereo/core": "^0.2.2",
|
|
40
|
+
"@ereo/router": "^0.2.2",
|
|
41
|
+
"@ereo/server": "^0.2.2",
|
|
42
|
+
"@ereo/trace": "^0.2.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/bun": "^1.1.0",
|