ppcos 1.0.7 → 1.0.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.
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
readHubManifest,
|
|
14
14
|
writeHubManifest,
|
|
15
15
|
hubManifestExists,
|
|
16
|
-
createManifest
|
|
16
|
+
createManifest,
|
|
17
|
+
getManagedType
|
|
17
18
|
} from '../utils/manifest.js';
|
|
18
19
|
import { calculateChecksum } from '../utils/checksum.js';
|
|
19
20
|
import { getAllFiles, copyFileWithDirs, ensureDir } from '../utils/fs-helpers.js';
|
|
@@ -70,7 +71,7 @@ export default async function updateHub(basePath, options = {}) {
|
|
|
70
71
|
const destPath = join(hubDir, relativePath);
|
|
71
72
|
await copyFileWithDirs(srcPath, destPath);
|
|
72
73
|
const checksum = await calculateChecksum(destPath);
|
|
73
|
-
managedFiles[relativePath] = { checksum, version: packageVersion, managedType:
|
|
74
|
+
managedFiles[relativePath] = { checksum, version: packageVersion, managedType: getManagedType(relativePath) };
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
// Create data directories
|
|
@@ -138,6 +139,10 @@ export default async function updateHub(basePath, options = {}) {
|
|
|
138
139
|
const filesToSkip = [];
|
|
139
140
|
|
|
140
141
|
for (const file of skillFiles) {
|
|
142
|
+
if (getManagedType(file) === 'config') {
|
|
143
|
+
// Config files are init-only — skip on update if already present
|
|
144
|
+
if (manifest.managedFiles[file]) continue;
|
|
145
|
+
}
|
|
141
146
|
if (mods.modified.includes(file) && resolution === 'skip') {
|
|
142
147
|
filesToSkip.push(file);
|
|
143
148
|
} else {
|
|
@@ -164,7 +169,7 @@ export default async function updateHub(basePath, options = {}) {
|
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
updatedFiles[relativePath] = { checksum: srcChecksum, version: packageVersion, managedType:
|
|
172
|
+
updatedFiles[relativePath] = { checksum: srcChecksum, version: packageVersion, managedType: getManagedType(relativePath) };
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
// Detect and remove orphaned hub files
|
package/lib/utils/fs-helpers.js
CHANGED
|
@@ -10,7 +10,7 @@ import { constants } from 'node:fs';
|
|
|
10
10
|
// Directories to skip during template file enumeration.
|
|
11
11
|
// tmp/ dirs hold generated runtime data (analysis output, caches)
|
|
12
12
|
// that must never be distributed to clients.
|
|
13
|
-
const EXCLUDED_DIR_NAMES = new Set(['tmp']);
|
|
13
|
+
const EXCLUDED_DIR_NAMES = new Set(['tmp', 'node_modules']);
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Check if a file exists (async)
|
package/lib/utils/manifest.js
CHANGED
|
@@ -17,7 +17,8 @@ const CONFIG_ONLY_FILES = new Set([
|
|
|
17
17
|
'config/ads-context.config.json',
|
|
18
18
|
'.claude/settings.local.json',
|
|
19
19
|
'config/.env',
|
|
20
|
-
'context/business.md'
|
|
20
|
+
'context/business.md',
|
|
21
|
+
'.claude/skills/report-generator/reference/html-base-template.md'
|
|
21
22
|
]);
|
|
22
23
|
|
|
23
24
|
/**
|