@geraldmaron/construct 1.0.8 → 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.
package/package.json
CHANGED
|
@@ -138,8 +138,9 @@ if (validationErrors.length > 0) {
|
|
|
138
138
|
|
|
139
139
|
const DRY_RUN = process.argv.includes("--dry-run");
|
|
140
140
|
const COMPRESS_PERSONAS = process.argv.includes("--compress-personas");
|
|
141
|
-
const
|
|
142
|
-
const
|
|
141
|
+
const projectDir = process.argv.includes("--project") ? process.cwd() : null;
|
|
142
|
+
const lockPath = path.join(projectDir || root, ".cx", "sync.lock");
|
|
143
|
+
const stagingDir = path.join(projectDir || root, ".cx", "sync-staging");
|
|
143
144
|
|
|
144
145
|
/** Acquire an exclusive lockfile. Aborts if already held by a live process. */
|
|
145
146
|
function acquireLock() {
|
|
@@ -192,7 +193,7 @@ function writeFile(file, content) {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
// Two-phase: write to staging, commit later.
|
|
195
|
-
const rel = path.relative(root, file);
|
|
196
|
+
const rel = path.relative(projectDir || root, file);
|
|
196
197
|
const stagingPath = path.join(stagingDir, rel);
|
|
197
198
|
mkdirp(path.dirname(stagingPath));
|
|
198
199
|
fs.writeFileSync(stagingPath, stamped);
|
|
@@ -1175,7 +1176,6 @@ function syncSkills() {
|
|
|
1175
1176
|
|
|
1176
1177
|
// --- Main ---
|
|
1177
1178
|
|
|
1178
|
-
const projectDir = process.argv.includes("--project") ? process.cwd() : null;
|
|
1179
1179
|
const entries = buildEntries();
|
|
1180
1180
|
|
|
1181
1181
|
if (COMPRESS_PERSONAS) {
|