@wipcomputer/wip-ldm-os 0.4.7 → 0.4.9
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 +13 -2
- package/bin/ldm.js +19 -5
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
interface: [cli, skill]
|
|
6
6
|
metadata:
|
|
7
7
|
display-name: "LDM OS"
|
|
8
|
-
version: "0.4.
|
|
8
|
+
version: "0.4.9"
|
|
9
9
|
homepage: "https://github.com/wipcomputer/wip-ldm-os"
|
|
10
10
|
author: "Parker Todd Brooks"
|
|
11
11
|
category: infrastructure
|
|
@@ -162,7 +162,18 @@ ldm status 2>&1
|
|
|
162
162
|
|
|
163
163
|
**Use the output of `ldm status` as your summary.** Do not say "up to date" if `ldm status` shows updates available. Do not make your own summary without running `ldm status` first.
|
|
164
164
|
|
|
165
|
-
When the user wants to update
|
|
165
|
+
When the user asks for a dry run or wants to update, run `ldm install --dry-run` and display the results as a **table**:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
| Extension | Current | Available | Package |
|
|
169
|
+
|-----------|---------|-----------|---------|
|
|
170
|
+
| wip-branch-guard | v1.9.30 | v1.9.36 | @wipcomputer/wip-branch-guard |
|
|
171
|
+
| memory-crystal | v0.7.24 | v0.7.26 | @wipcomputer/memory-crystal |
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Always show a table.** Never collapse updates into a paragraph or bullet list. Every update gets its own row. Show ALL updates, not a summary.
|
|
175
|
+
|
|
176
|
+
When the user says "install":
|
|
166
177
|
```bash
|
|
167
178
|
ldm install # update all registered extensions
|
|
168
179
|
ldm doctor # verify everything works
|
package/bin/ldm.js
CHANGED
|
@@ -73,7 +73,9 @@ function acquireInstallLock() {
|
|
|
73
73
|
console.log(` Wait for it to finish, or remove ~/.ldm/state/.ldm-install.lock`);
|
|
74
74
|
return false;
|
|
75
75
|
} catch {
|
|
76
|
-
// PID is dead, stale lock.
|
|
76
|
+
// PID is dead, stale lock. Auto-clean.
|
|
77
|
+
try { unlinkSync(LOCK_PATH); } catch {}
|
|
78
|
+
console.log(` Cleaned stale install lock (PID ${lock.pid} is dead).`);
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
mkdirSync(dirname(LOCK_PATH), { recursive: true });
|
|
@@ -684,12 +686,24 @@ async function cmdInstallCatalog() {
|
|
|
684
686
|
|
|
685
687
|
if (DRY_RUN) {
|
|
686
688
|
if (npmUpdates.length > 0) {
|
|
687
|
-
|
|
689
|
+
// Table output
|
|
690
|
+
const nameW = Math.max(10, ...npmUpdates.map(e => e.name.length));
|
|
691
|
+
const curW = Math.max(7, ...npmUpdates.map(e => e.currentVersion.length + 1));
|
|
692
|
+
const latW = Math.max(9, ...npmUpdates.map(e => e.latestVersion.length + 1));
|
|
693
|
+
const pkgW = Math.max(7, ...npmUpdates.map(e => e.catalogNpm.length));
|
|
694
|
+
|
|
695
|
+
const pad = (s, w) => s + ' '.repeat(Math.max(0, w - s.length));
|
|
696
|
+
const hr = ` ${'─'.repeat(nameW + curW + latW + pkgW + 13)}`;
|
|
697
|
+
|
|
698
|
+
console.log('');
|
|
699
|
+
console.log(` ${npmUpdates.length} update(s) available:`);
|
|
700
|
+
console.log('');
|
|
701
|
+
console.log(` ${pad('Extension', nameW)} │ ${pad('Current', curW)} │ ${pad('Available', latW)} │ ${pad('Package', pkgW)}`);
|
|
702
|
+
console.log(hr);
|
|
688
703
|
for (const e of npmUpdates) {
|
|
689
|
-
console.log(`
|
|
704
|
+
console.log(` ${pad(e.name, nameW)} │ ${pad('v' + e.currentVersion, curW)} │ ${pad('v' + e.latestVersion, latW)} │ ${pad(e.catalogNpm, pkgW)}`);
|
|
690
705
|
}
|
|
691
|
-
|
|
692
|
-
if (totalUpdates > 0) {
|
|
706
|
+
console.log('');
|
|
693
707
|
console.log(' No data (crystal.db, agent files) would be touched.');
|
|
694
708
|
console.log(' Old versions would be moved to ~/.ldm/_trash/ (never deleted).');
|
|
695
709
|
} else {
|