@revoengine/cli 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.
|
@@ -1060,6 +1060,7 @@ async function buildComponentPlan(context, scope = { enabled: false, base: '', c
|
|
|
1060
1060
|
...(scope.enabled ? { inScope } : {}),
|
|
1061
1061
|
};
|
|
1062
1062
|
});
|
|
1063
|
+
const scopedItems = scope.enabled ? items.filter((item) => item.inScope) : items;
|
|
1063
1064
|
return {
|
|
1064
1065
|
schemaVersion: 1,
|
|
1065
1066
|
generatedAt: new Date().toISOString(),
|
|
@@ -1071,7 +1072,7 @@ async function buildComponentPlan(context, scope = { enabled: false, base: '', c
|
|
|
1071
1072
|
componentIds: [...scope.componentIds].sort(),
|
|
1072
1073
|
},
|
|
1073
1074
|
} : {}),
|
|
1074
|
-
counts:
|
|
1075
|
+
counts: scopedItems.reduce((counts, item) => {
|
|
1075
1076
|
counts[item.status] += 1;
|
|
1076
1077
|
return counts;
|
|
1077
1078
|
}, {
|
|
@@ -1083,7 +1084,7 @@ async function buildComponentPlan(context, scope = { enabled: false, base: '', c
|
|
|
1083
1084
|
create: 0,
|
|
1084
1085
|
'missing-lock': 0,
|
|
1085
1086
|
}),
|
|
1086
|
-
items,
|
|
1087
|
+
items: scopedItems,
|
|
1087
1088
|
};
|
|
1088
1089
|
}
|
|
1089
1090
|
function printPlan(context, plan) {
|
|
@@ -60,7 +60,6 @@ export function normalizeComponentSource(component) {
|
|
|
60
60
|
desc: normalizeValue(source.desc),
|
|
61
61
|
active: source.active ?? true,
|
|
62
62
|
type: source.type || '',
|
|
63
|
-
compiler: source.compiler || '',
|
|
64
63
|
async: Boolean(source.async),
|
|
65
64
|
elements: [...(source.elements || [])]
|
|
66
65
|
.map((element) => ({
|
|
@@ -102,6 +101,16 @@ export function writeComponentLock(projectRoot, lock) {
|
|
|
102
101
|
}
|
|
103
102
|
export function upsertComponentLockEntry(projectRoot, entry) {
|
|
104
103
|
const lock = readComponentLock(projectRoot);
|
|
104
|
+
const existing = lock.components[entry.componentId];
|
|
105
|
+
if (existing
|
|
106
|
+
&& existing.componentName === entry.componentName
|
|
107
|
+
&& existing.category === entry.category
|
|
108
|
+
&& existing.path === entry.path
|
|
109
|
+
&& existing.remoteVersion === entry.remoteVersion
|
|
110
|
+
&& existing.remoteHash === entry.remoteHash
|
|
111
|
+
&& existing.sourceHash === entry.sourceHash) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
105
114
|
lock.components[entry.componentId] = entry;
|
|
106
115
|
writeComponentLock(projectRoot, lock);
|
|
107
116
|
}
|
package/dist/src/config.js
CHANGED
|
@@ -316,8 +316,13 @@ function readAuthValidationStateStore() {
|
|
|
316
316
|
if (!fs.existsSync(authStateFile)) {
|
|
317
317
|
return emptyAuthValidationStateStore();
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
try {
|
|
320
|
+
const raw = readJsonFile(authStateFile);
|
|
321
|
+
return parseAuthValidationStateStore(raw);
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
return emptyAuthValidationStateStore();
|
|
325
|
+
}
|
|
321
326
|
}
|
|
322
327
|
export function readAuthValidationState(key) {
|
|
323
328
|
const store = readAuthValidationStateStore();
|