@chrisdudek/yg 2.10.0 → 2.11.0
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/bin.js +3 -1
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -3955,6 +3955,7 @@ async function detectDrift(graph, filterNodePath) {
|
|
|
3955
3955
|
const entries = [];
|
|
3956
3956
|
for (const [nodePath, node] of graph.nodes) {
|
|
3957
3957
|
if (filterNodePath && nodePath !== filterNodePath && !nodePath.startsWith(filterNodePath + "/")) continue;
|
|
3958
|
+
if (node.meta.blackbox) continue;
|
|
3958
3959
|
const mapping = node.meta.mapping;
|
|
3959
3960
|
if (!mapping) continue;
|
|
3960
3961
|
const mappingPaths = normalizeMappingPaths(mapping);
|
|
@@ -4053,6 +4054,7 @@ async function syncDriftState(graph, nodePath) {
|
|
|
4053
4054
|
const node = graph.nodes.get(nodePath);
|
|
4054
4055
|
if (!node) throw new Error(`Node not found: ${nodePath}`);
|
|
4055
4056
|
if (!node.meta.mapping) throw new Error(`Node has no mapping: ${nodePath}`);
|
|
4057
|
+
if (node.meta.blackbox) throw new Error(`Cannot sync blackbox node: ${nodePath}`);
|
|
4056
4058
|
const trackedFiles = collectTrackedFiles(node, graph);
|
|
4057
4059
|
const excludePrefixes = getChildMappingExclusions(graph, nodePath);
|
|
4058
4060
|
const existingEntry = await readNodeDriftState(graph.rootPath, nodePath);
|
|
@@ -4238,7 +4240,7 @@ function registerDriftSyncCommand(program2) {
|
|
|
4238
4240
|
const graph = await loadGraph(process.cwd());
|
|
4239
4241
|
let nodesToSync;
|
|
4240
4242
|
if (options.all) {
|
|
4241
|
-
nodesToSync = [...graph.nodes.entries()].filter(([, n]) => normalizeMappingPaths(n.meta.mapping).length > 0).map(([p]) => p).sort();
|
|
4243
|
+
nodesToSync = [...graph.nodes.entries()].filter(([, n]) => !n.meta.blackbox && normalizeMappingPaths(n.meta.mapping).length > 0).map(([p]) => p).sort();
|
|
4242
4244
|
} else {
|
|
4243
4245
|
const nodePath = options.node.trim().replace(/^\.\//, "").replace(/\/+$/, "");
|
|
4244
4246
|
if (!graph.nodes.has(nodePath)) {
|