@terraforge/core 0.0.26 → 0.0.28
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/index.mjs +14 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1114,7 +1114,7 @@ const hydrate = async (app, opt) => {
|
|
|
1114
1114
|
const refresh = async (app, opt) => {
|
|
1115
1115
|
const appState = await opt.backend.state.get(app.urn);
|
|
1116
1116
|
const queue = createConcurrencyQueue(opt.concurrency ?? 10);
|
|
1117
|
-
let filteredStacks =
|
|
1117
|
+
let filteredStacks = Object.values(appState?.stacks ?? {});
|
|
1118
1118
|
if (opt.filters && opt.filters.length > 0) filteredStacks = Object.entries(appState?.stacks ?? {}).filter(([stackName]) => {
|
|
1119
1119
|
return opt.filters.includes(stackName);
|
|
1120
1120
|
}).map(([_, state]) => state);
|
|
@@ -1133,9 +1133,6 @@ const refresh = async (app, opt) => {
|
|
|
1133
1133
|
type: nodeState.type,
|
|
1134
1134
|
state: nodeState.output
|
|
1135
1135
|
});
|
|
1136
|
-
console.log(urn);
|
|
1137
|
-
console.log(nodeState.output);
|
|
1138
|
-
console.log(result?.state);
|
|
1139
1136
|
if (!result) return {
|
|
1140
1137
|
urn,
|
|
1141
1138
|
operation: "delete",
|
|
@@ -1143,14 +1140,19 @@ const refresh = async (app, opt) => {
|
|
|
1143
1140
|
delete stackState.nodes[urn];
|
|
1144
1141
|
}
|
|
1145
1142
|
};
|
|
1146
|
-
else if (!compareState(result.state, nodeState.output))
|
|
1147
|
-
urn
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1143
|
+
else if (!compareState(result.state, nodeState.output)) {
|
|
1144
|
+
console.log(urn);
|
|
1145
|
+
console.log(nodeState.output);
|
|
1146
|
+
console.log(result?.state);
|
|
1147
|
+
return {
|
|
1148
|
+
urn,
|
|
1149
|
+
operation: "update",
|
|
1150
|
+
commit() {
|
|
1151
|
+
nodeState.input = result.state;
|
|
1152
|
+
nodeState.output = result.state;
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1154
1156
|
});
|
|
1155
1157
|
}));
|
|
1156
1158
|
}))).flat().filter((op) => !!op);
|