permachine 0.9.0 → 0.9.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/dist/cli.js +17 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6306,22 +6306,17 @@ async function scanForMergeOperations(machineName, cwd = process.cwd()) {
|
|
|
6306
6306
|
if (hasFilters(basename)) {
|
|
6307
6307
|
const result = matchFilters(basename, context);
|
|
6308
6308
|
shouldProcess = result.matches;
|
|
6309
|
-
const operation = createMergeOperation(file, machineName, cwd);
|
|
6310
|
-
if (operation && operation.basePath) {
|
|
6311
|
-
baseFilesWithMachineFiles.add(operation.basePath);
|
|
6312
|
-
}
|
|
6313
6309
|
} else if (isLegacyFilename(basename, machineName)) {
|
|
6314
6310
|
shouldProcess = true;
|
|
6315
|
-
const operation = createMergeOperation(file, machineName, cwd);
|
|
6316
|
-
if (operation && operation.basePath) {
|
|
6317
|
-
baseFilesWithMachineFiles.add(operation.basePath);
|
|
6318
|
-
}
|
|
6319
6311
|
}
|
|
6320
6312
|
if (shouldProcess) {
|
|
6321
6313
|
const operation = createMergeOperation(file, machineName, cwd);
|
|
6322
6314
|
if (operation) {
|
|
6323
6315
|
operations.push(operation);
|
|
6324
6316
|
processedOutputs.add(operation.outputPath);
|
|
6317
|
+
if (operation.basePath) {
|
|
6318
|
+
baseFilesWithMachineFiles.add(operation.basePath);
|
|
6319
|
+
}
|
|
6325
6320
|
}
|
|
6326
6321
|
}
|
|
6327
6322
|
}
|
|
@@ -8900,6 +8895,20 @@ async function startWatcher(machineName, options = {}) {
|
|
|
8900
8895
|
logger.info("4. Run: permachine watch");
|
|
8901
8896
|
return () => {};
|
|
8902
8897
|
}
|
|
8898
|
+
if (mergeOperations.length > 0) {
|
|
8899
|
+
const mergeResults = await performAllMerges(mergeOperations);
|
|
8900
|
+
const changedFiles = mergeResults.filter((r) => r.changed).length;
|
|
8901
|
+
if (changedFiles > 0 && !logger.isSilent()) {
|
|
8902
|
+
console.log(`[${formatTime()}] Initial merge: ${changedFiles} file(s) updated`);
|
|
8903
|
+
}
|
|
8904
|
+
}
|
|
8905
|
+
if (directoryOperations.length > 0) {
|
|
8906
|
+
const dirResults = await performAllDirectoryCopies(directoryOperations);
|
|
8907
|
+
const changedDirs = dirResults.filter((r) => r.changed).length;
|
|
8908
|
+
if (changedDirs > 0 && !logger.isSilent()) {
|
|
8909
|
+
console.log(`[${formatTime()}] Initial copy: ${changedDirs} directory(ies) updated`);
|
|
8910
|
+
}
|
|
8911
|
+
}
|
|
8903
8912
|
const state = {
|
|
8904
8913
|
operations: mergeOperations,
|
|
8905
8914
|
directoryOperations,
|