cabloy 5.1.101 → 5.1.102
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/.cabloy-version +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/upgrade.ts +26 -10
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.102
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/scripts/upgrade.ts
CHANGED
|
@@ -47,6 +47,14 @@ const OVERWRITE_DIRS: string[] = [
|
|
|
47
47
|
'zova/scripts',
|
|
48
48
|
];
|
|
49
49
|
|
|
50
|
+
const OVERWRITE_DIRS_CABLOY_BASIC: string[] = [
|
|
51
|
+
'vona/src/suite/cabloy-basic',
|
|
52
|
+
'vona/src/suite/a-training',
|
|
53
|
+
'zova/src/suite/cabloy-basic',
|
|
54
|
+
'zova/src/suite/a-training',
|
|
55
|
+
'zova/src/suite/a-devui',
|
|
56
|
+
];
|
|
57
|
+
|
|
50
58
|
const MERGE_DIRS: string[] = [
|
|
51
59
|
// Claude project assets
|
|
52
60
|
'.claude/commands',
|
|
@@ -242,8 +250,12 @@ async function downloadAndExtract(tarballUrl: string): Promise<void> {
|
|
|
242
250
|
// --- Step 3: Selective overwrite ---
|
|
243
251
|
|
|
244
252
|
function selectiveOverwrite(dryRun?: boolean): void {
|
|
253
|
+
const overwriteDirs = existsSync(resolve(ROOT_DIR, '__CABLOY_BASIC__'))
|
|
254
|
+
? [...OVERWRITE_DIRS, ...OVERWRITE_DIRS_CABLOY_BASIC]
|
|
255
|
+
: OVERWRITE_DIRS;
|
|
256
|
+
|
|
245
257
|
// Overwrite directories
|
|
246
|
-
for (const dir of
|
|
258
|
+
for (const dir of overwriteDirs) {
|
|
247
259
|
const src = resolve(TEMP_DIR, dir);
|
|
248
260
|
const dest = resolve(ROOT_DIR, dir);
|
|
249
261
|
if (!existsSync(src)) continue;
|
|
@@ -316,13 +328,12 @@ function runInitTestData(dryRun: boolean): void {
|
|
|
316
328
|
// --- Step 6: Cleanup ---
|
|
317
329
|
|
|
318
330
|
function cleanup(dryRun?: boolean): void {
|
|
319
|
-
if (dryRun) {
|
|
320
|
-
log(' [dry-run] Remove temp dir: node_modules/.cabloy-upgrade/');
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
331
|
if (existsSync(TEMP_DIR)) {
|
|
324
332
|
rmSync(TEMP_DIR, { recursive: true, force: true });
|
|
325
333
|
}
|
|
334
|
+
if (dryRun) {
|
|
335
|
+
log(' [dry-run] Removed temp dir: node_modules/.cabloy-upgrade/');
|
|
336
|
+
}
|
|
326
337
|
}
|
|
327
338
|
|
|
328
339
|
// --- Main ---
|
|
@@ -350,15 +361,20 @@ async function main(): Promise<void> {
|
|
|
350
361
|
if (currentVersion) {
|
|
351
362
|
const comparison = compareVersions(currentVersion, latestPackageInfo.version);
|
|
352
363
|
if (comparison === 0) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
364
|
+
if (!dryRun) {
|
|
365
|
+
log(`Cabloy is already up to date (current: ${currentVersion}). Skipping upgrade.`);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
log(
|
|
369
|
+
`Cabloy is already up to date (current: ${currentVersion}). Continuing dry-run to show overwrite plan.\n`,
|
|
370
|
+
);
|
|
371
|
+
} else if (comparison > 0) {
|
|
357
372
|
throw new Error(
|
|
358
373
|
`Project Cabloy version ${currentVersion} is newer than npm latest ${latestPackageInfo.version}. Aborting upgrade.`,
|
|
359
374
|
);
|
|
375
|
+
} else {
|
|
376
|
+
log(`Upgrading Cabloy from ${currentVersion} to ${latestPackageInfo.version}...\n`);
|
|
360
377
|
}
|
|
361
|
-
log(`Upgrading Cabloy from ${currentVersion} to ${latestPackageInfo.version}...\n`);
|
|
362
378
|
} else {
|
|
363
379
|
log(`Upgrading Cabloy to ${latestPackageInfo.version}...\n`);
|
|
364
380
|
}
|