@wipcomputer/wip-ldm-os 0.4.24 → 0.4.25
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/SKILL.md +1 -1
- package/bin/ldm.js +13 -0
- package/package.json +1 -1
package/SKILL.md
CHANGED
package/bin/ldm.js
CHANGED
|
@@ -31,6 +31,17 @@ const LDM_EXTENSIONS = join(LDM_ROOT, 'extensions');
|
|
|
31
31
|
const VERSION_PATH = join(LDM_ROOT, 'version.json');
|
|
32
32
|
const REGISTRY_PATH = join(LDM_EXTENSIONS, 'registry.json');
|
|
33
33
|
|
|
34
|
+
// Install log (#101): append to ~/.ldm/logs/install.log
|
|
35
|
+
import { appendFileSync } from 'node:fs';
|
|
36
|
+
const LOG_DIR = join(LDM_ROOT, 'logs');
|
|
37
|
+
const LOG_PATH = join(LOG_DIR, 'install.log');
|
|
38
|
+
function installLog(msg) {
|
|
39
|
+
try {
|
|
40
|
+
mkdirSync(LOG_DIR, { recursive: true });
|
|
41
|
+
appendFileSync(LOG_PATH, `[${new Date().toISOString()}] ${msg}\n`);
|
|
42
|
+
} catch {}
|
|
43
|
+
}
|
|
44
|
+
|
|
34
45
|
// Read our own version from package.json
|
|
35
46
|
const pkgPath = join(__dirname, '..', 'package.json');
|
|
36
47
|
let PKG_VERSION = '0.2.0';
|
|
@@ -654,6 +665,7 @@ function autoDetectExtensions() {
|
|
|
654
665
|
|
|
655
666
|
async function cmdInstallCatalog() {
|
|
656
667
|
// No lock here. cmdInstall() already holds it when calling this.
|
|
668
|
+
installLog(`ldm install started (v${PKG_VERSION}, DRY_RUN=${DRY_RUN})`);
|
|
657
669
|
|
|
658
670
|
// Self-update: check if CLI itself is outdated. Update first, then re-exec.
|
|
659
671
|
// This breaks the chicken-and-egg: new features in ldm install are always
|
|
@@ -1089,6 +1101,7 @@ async function cmdInstallCatalog() {
|
|
|
1089
1101
|
|
|
1090
1102
|
console.log('');
|
|
1091
1103
|
console.log(` Updated ${updated}/${totalUpdates} extension(s).`);
|
|
1104
|
+
installLog(`ldm install complete: ${updated}/${totalUpdates} updated, ${healthFixes} health fix(es)`);
|
|
1092
1105
|
|
|
1093
1106
|
// Check if CLI itself is outdated (#29)
|
|
1094
1107
|
checkCliVersion();
|