claudecode-omc 5.5.0 → 5.5.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/bundled/manifest.json +1 -1
- package/package.json +1 -1
- package/src/cli/doctor.js +6 -1
- package/src/cli/setup.js +33 -2
package/bundled/manifest.json
CHANGED
package/package.json
CHANGED
package/src/cli/doctor.js
CHANGED
|
@@ -71,7 +71,12 @@ async function doctor() {
|
|
|
71
71
|
console.log('');
|
|
72
72
|
|
|
73
73
|
console.log('Installation:');
|
|
74
|
-
|
|
74
|
+
const typeNames = getArtifactTypeNames().filter(typeName => {
|
|
75
|
+
if (typeName !== 'claude-md') return true;
|
|
76
|
+
return !fs.existsSync(ARTIFACT_TYPES.guidelines.installTarget);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
for (const typeName of typeNames) {
|
|
75
80
|
const type = ARTIFACT_TYPES[typeName];
|
|
76
81
|
const target = type.installTarget;
|
|
77
82
|
if (fs.existsSync(target)) {
|
package/src/cli/setup.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const fsp = require('fs/promises');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
5
6
|
const { getProjectRoot, getSourceArtifactDir, getInstallTarget, getMergeConfigPath, getReportDir } = require('../config/paths');
|
|
6
7
|
const { readConfig } = require('../config/sources');
|
|
7
8
|
const { getArtifactTypeNames, ARTIFACT_TYPES } = require('../config/artifact-types');
|
|
@@ -16,6 +17,30 @@ const { loadFilesFromSource } = require('../merge/file-merger');
|
|
|
16
17
|
const { evaluateSkillQuality } = require('../utils/quality');
|
|
17
18
|
const { copyDirRecursive } = require('./source');
|
|
18
19
|
|
|
20
|
+
const OMC_VERSION_PATH = path.join(os.homedir(), '.claude', '.omc-version.json');
|
|
21
|
+
|
|
22
|
+
function getPackageVersion(root) {
|
|
23
|
+
try {
|
|
24
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
25
|
+
return pkg.version || '0.0.0';
|
|
26
|
+
} catch {
|
|
27
|
+
return '0.0.0';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function writeInstallMetadata(root) {
|
|
32
|
+
const now = new Date().toISOString();
|
|
33
|
+
const metadata = {
|
|
34
|
+
version: getPackageVersion(root),
|
|
35
|
+
installedAt: now,
|
|
36
|
+
installMethod: fs.existsSync(path.join(root, '.git')) ? 'local-dev' : 'npm',
|
|
37
|
+
lastCheckAt: now,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
await fsp.mkdir(path.dirname(OMC_VERSION_PATH), { recursive: true });
|
|
41
|
+
await fsp.writeFile(OMC_VERSION_PATH, JSON.stringify(metadata, null, 2) + '\n', 'utf8');
|
|
42
|
+
}
|
|
43
|
+
|
|
19
44
|
async function copyDirectory(src, dest, options = {}) {
|
|
20
45
|
if (!fs.existsSync(src)) return 0;
|
|
21
46
|
if (!options.dryRun) await fsp.mkdir(dest, { recursive: true });
|
|
@@ -237,7 +262,9 @@ async function setup(args, flags = {}) {
|
|
|
237
262
|
const root = getProjectRoot();
|
|
238
263
|
const config = readConfig();
|
|
239
264
|
const scope = flags.scope || 'user';
|
|
240
|
-
const typeFilter = flags.type
|
|
265
|
+
const typeFilter = flags.type
|
|
266
|
+
? [...new Set(flags.type.split(',').map(type => (type === 'claude-md' ? 'guidelines' : type)))]
|
|
267
|
+
: null;
|
|
241
268
|
|
|
242
269
|
console.log('claudecode-omc setup');
|
|
243
270
|
console.log('====================');
|
|
@@ -256,7 +283,7 @@ async function setup(args, flags = {}) {
|
|
|
256
283
|
const orderedSources = Object.entries(config.sources)
|
|
257
284
|
.sort(([, a], [, b]) => a.priority - b.priority);
|
|
258
285
|
|
|
259
|
-
const allTypes = getArtifactTypeNames();
|
|
286
|
+
const allTypes = getArtifactTypeNames().filter(type => type !== 'claude-md');
|
|
260
287
|
const typesToInstall = typeFilter || allTypes;
|
|
261
288
|
let step = 0;
|
|
262
289
|
const totalSteps = typesToInstall.length;
|
|
@@ -311,6 +338,10 @@ async function setup(args, flags = {}) {
|
|
|
311
338
|
}
|
|
312
339
|
}
|
|
313
340
|
|
|
341
|
+
if (!flags.dryRun && scope === 'user') {
|
|
342
|
+
await writeInstallMetadata(root);
|
|
343
|
+
}
|
|
344
|
+
|
|
314
345
|
console.log('\nDone.');
|
|
315
346
|
}
|
|
316
347
|
|