@techninja/clearstack 0.3.25 → 0.3.27
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/README.md +1 -3
- package/docs/clearstack_logo.svg +5370 -0
- package/lib/platform-files.js +12 -4
- package/package.json +1 -1
- package/docs/clearstack_logo.png +0 -0
package/lib/platform-files.js
CHANGED
|
@@ -23,11 +23,13 @@ function copyDir(src, dest, label) {
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Copy entries from src → dest, skipping files that already exist.
|
|
26
|
+
* Directories in `skipDirs` are excluded entirely.
|
|
26
27
|
* @param {string} src
|
|
27
28
|
* @param {string} dest
|
|
28
29
|
* @param {string} label
|
|
30
|
+
* @param {Set<string>} [skipDirs]
|
|
29
31
|
*/
|
|
30
|
-
function copySkipExisting(src, dest, label) {
|
|
32
|
+
function copySkipExisting(src, dest, label, skipDirs) {
|
|
31
33
|
if (!existsSync(src)) return 0;
|
|
32
34
|
mkdirSync(dest, { recursive: true });
|
|
33
35
|
let count = 0;
|
|
@@ -35,7 +37,11 @@ function copySkipExisting(src, dest, label) {
|
|
|
35
37
|
const srcPath = join(src, entry.name);
|
|
36
38
|
const destPath = join(dest, entry.name);
|
|
37
39
|
if (entry.isDirectory()) {
|
|
38
|
-
|
|
40
|
+
if (skipDirs?.has(entry.name)) {
|
|
41
|
+
console.log(` ⏭ Skipped: ${label}/${entry.name}/ (resolved from package)`);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
count += copySkipExisting(srcPath, destPath, `${label}/${entry.name}`, skipDirs);
|
|
39
45
|
} else if (existsSync(destPath)) {
|
|
40
46
|
console.log(` ⏭ Skipped: ${label}/${entry.name} (exists)`);
|
|
41
47
|
} else {
|
|
@@ -99,8 +105,9 @@ export function initPlatform(platform, projectDir) {
|
|
|
99
105
|
copyMerge(resolve(pkgDir, manifest.templates), projectDir, 'templates');
|
|
100
106
|
vendorPlatform(platform, projectDir);
|
|
101
107
|
syncPlatformDocs(platform, projectDir);
|
|
108
|
+
const skipScriptDirs = new Set(['lib']);
|
|
102
109
|
if (manifest.scripts) {
|
|
103
|
-
copySkipExisting(resolve(pkgDir, manifest.scripts), resolve(projectDir, 'scripts'), 'scripts');
|
|
110
|
+
copySkipExisting(resolve(pkgDir, manifest.scripts), resolve(projectDir, 'scripts'), 'scripts', skipScriptDirs);
|
|
104
111
|
}
|
|
105
112
|
if (manifest.api) {
|
|
106
113
|
copySkipExisting(resolve(pkgDir, manifest.api), resolve(projectDir, 'api'), 'api');
|
|
@@ -113,8 +120,9 @@ export function updatePlatform(platform, projectDir) {
|
|
|
113
120
|
console.log(`\n📦 Platform: ${name} (${manifest.prefix})`);
|
|
114
121
|
vendorPlatform(platform, projectDir);
|
|
115
122
|
syncPlatformDocs(platform, projectDir);
|
|
123
|
+
const skipScriptDirs = new Set(['lib']);
|
|
116
124
|
if (manifest.scripts) {
|
|
117
|
-
copySkipExisting(resolve(pkgDir, manifest.scripts), resolve(projectDir, 'scripts'), 'scripts');
|
|
125
|
+
copySkipExisting(resolve(pkgDir, manifest.scripts), resolve(projectDir, 'scripts'), 'scripts', skipScriptDirs);
|
|
118
126
|
}
|
|
119
127
|
if (manifest.api) {
|
|
120
128
|
copySkipExisting(resolve(pkgDir, manifest.api), resolve(projectDir, 'api'), 'api');
|
package/package.json
CHANGED
package/docs/clearstack_logo.png
DELETED
|
Binary file
|