dev-cockpit 0.2.5 → 0.2.6
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/dist/commands/mount.d.ts.map +1 -1
- package/dist/index.js +14 -5
- package/dist/index.js.map +2 -2
- package/dist/mount/symlinks.d.ts +15 -2
- package/dist/mount/symlinks.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../src/commands/mount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAwBvD,MAAM,WAAW,mBAAmB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,WAAW,CAC1B,YAAY,EAAE,SAAS,KAAK,EAAE,EAC9B,cAAc,EAAE,SAAS,KAAK,EAAE,GAC9B,KAAK,EAAE,CAKT;AA0GD,wBAAsB,YAAY,CAAC,IAAI,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../src/commands/mount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAwBvD,MAAM,WAAW,mBAAmB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,WAAW,CAC1B,YAAY,EAAE,SAAS,KAAK,EAAE,EAC9B,cAAc,EAAE,SAAS,KAAK,EAAE,GAC9B,KAAK,EAAE,CAKT;AA0GD,wBAAsB,YAAY,CAAC,IAAI,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2EhF;AAED,wBAAsB,kBAAkB,CAAC,IAAI,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkEtF;AAED,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCrF"}
|
package/dist/index.js
CHANGED
|
@@ -92380,10 +92380,11 @@ function resolveOverlayPath(opts) {
|
|
|
92380
92380
|
import fs14 from "node:fs";
|
|
92381
92381
|
import path19 from "node:path";
|
|
92382
92382
|
function applyManagedSymlinks(workspaceRoot, mounts, strategy) {
|
|
92383
|
-
const report = { created: [], skipped: [] };
|
|
92383
|
+
const report = { created: [], replaced: [], skipped: [] };
|
|
92384
92384
|
for (const m of mounts) {
|
|
92385
92385
|
const linkPath = strategy.linkPath(m, workspaceRoot);
|
|
92386
92386
|
if (!linkPath) continue;
|
|
92387
|
+
let preExistingRealDir = false;
|
|
92387
92388
|
try {
|
|
92388
92389
|
const lstat3 = fs14.lstatSync(linkPath);
|
|
92389
92390
|
if (lstat3.isSymbolicLink()) {
|
|
@@ -92394,8 +92395,8 @@ function applyManagedSymlinks(workspaceRoot, mounts, strategy) {
|
|
|
92394
92395
|
}
|
|
92395
92396
|
fs14.unlinkSync(linkPath);
|
|
92396
92397
|
} else if (lstat3.isDirectory()) {
|
|
92397
|
-
|
|
92398
|
-
|
|
92398
|
+
preExistingRealDir = true;
|
|
92399
|
+
fs14.rmSync(linkPath, { recursive: true, force: true });
|
|
92399
92400
|
} else {
|
|
92400
92401
|
fs14.unlinkSync(linkPath);
|
|
92401
92402
|
}
|
|
@@ -92403,7 +92404,8 @@ function applyManagedSymlinks(workspaceRoot, mounts, strategy) {
|
|
|
92403
92404
|
}
|
|
92404
92405
|
fs14.mkdirSync(path19.dirname(linkPath), { recursive: true });
|
|
92405
92406
|
fs14.symlinkSync(m.hostPath, linkPath);
|
|
92406
|
-
report.
|
|
92407
|
+
if (preExistingRealDir) report.replaced.push(linkPath);
|
|
92408
|
+
else report.created.push(linkPath);
|
|
92407
92409
|
}
|
|
92408
92410
|
return report;
|
|
92409
92411
|
}
|
|
@@ -92606,7 +92608,14 @@ async function mountCommand(opts = {}) {
|
|
|
92606
92608
|
const report = applyManagedSymlinks(workspaceRoot, selected, profile.mountSymlinks);
|
|
92607
92609
|
for (const p of report.created) process.stdout.write(`dev-cockpit mount: symlink \u2192 ${p}
|
|
92608
92610
|
`);
|
|
92609
|
-
for (const p of report.
|
|
92611
|
+
for (const p of report.replaced) {
|
|
92612
|
+
process.stdout.write(
|
|
92613
|
+
`dev-cockpit mount: replaced real dir with symlink \u2192 ${p}
|
|
92614
|
+
(previous contents discarded; run \`mount clear\` to restore via composer/npm install)
|
|
92615
|
+
`
|
|
92616
|
+
);
|
|
92617
|
+
}
|
|
92618
|
+
for (const p of report.skipped) process.stdout.write(`dev-cockpit mount: skipped (could not replace) \u2192 ${p}
|
|
92610
92619
|
`);
|
|
92611
92620
|
}
|
|
92612
92621
|
if (profile?.onMountApply) {
|