@ezetgalaxy/titan 25.11.9 → 25.12.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/index.js +13 -8
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -200,7 +200,8 @@ function startProd() {
|
|
|
200
200
|
// TITAN UPDATE — Upgrade titan/ runtime
|
|
201
201
|
// ------------------------------------------
|
|
202
202
|
function updateTitan() {
|
|
203
|
-
const
|
|
203
|
+
const projectRoot = process.cwd();
|
|
204
|
+
const projectTitan = path.join(projectRoot, "titan");
|
|
204
205
|
const cliTitan = path.join(__dirname, "templates", "titan");
|
|
205
206
|
|
|
206
207
|
if (!fs.existsSync(projectTitan)) {
|
|
@@ -211,26 +212,30 @@ function updateTitan() {
|
|
|
211
212
|
|
|
212
213
|
console.log(cyan("Titan: Updating runtime files..."));
|
|
213
214
|
|
|
214
|
-
|
|
215
|
-
const backupDir = path.join(process.cwd(), `titan_backup_${Date.now()}`);
|
|
215
|
+
const backupDir = path.join(projectRoot, `titan_backup_${Date.now()}`);
|
|
216
216
|
fs.renameSync(projectTitan, backupDir);
|
|
217
|
-
|
|
218
217
|
console.log(green(`✔ Backup created → ${backupDir}`));
|
|
219
218
|
|
|
220
219
|
copyDir(cliTitan, projectTitan);
|
|
221
220
|
|
|
221
|
+
const projectTemplateRoot = path.join(__dirname, "templates");
|
|
222
|
+
|
|
222
223
|
[".gitignore", ".dockerignore", "Dockerfile"].forEach((file) => {
|
|
223
|
-
const src = path.join(
|
|
224
|
-
const dest = path.join(
|
|
225
|
-
if (fs.existsSync(src)) fs.copyFileSync(src, dest);
|
|
226
|
-
});
|
|
224
|
+
const src = path.join(projectTemplateRoot, file);
|
|
225
|
+
const dest = path.join(projectRoot, file);
|
|
227
226
|
|
|
227
|
+
if (fs.existsSync(src)) {
|
|
228
|
+
fs.copyFileSync(src, dest);
|
|
229
|
+
console.log(green(`✔ Updated ${file}`));
|
|
230
|
+
}
|
|
231
|
+
});
|
|
228
232
|
|
|
229
233
|
console.log(green("✔ Titan runtime updated successfully!"));
|
|
230
234
|
console.log(cyan("Your project now has the latest Titan features."));
|
|
231
235
|
}
|
|
232
236
|
|
|
233
237
|
|
|
238
|
+
|
|
234
239
|
// ROUTER
|
|
235
240
|
switch (cmd) {
|
|
236
241
|
case "init":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezetgalaxy/titan",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.12.0",
|
|
4
4
|
"description": "JavaScript backend framework that compiles your JS into a Rust + Axum server.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "ezetgalaxy",
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"chokidar": "^5.0.0",
|
|
50
50
|
"esbuild": "^0.27.1"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|