@terraforge/core 0.0.16 → 0.0.17
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 +16 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1096,6 +1096,20 @@ const refresh = async (app, opt) => {
|
|
|
1096
1096
|
|
|
1097
1097
|
//#endregion
|
|
1098
1098
|
//#region src/workspace/procedure/status.ts
|
|
1099
|
+
/**
|
|
1100
|
+
* Extract static values from inputs, replacing Output/Future/Promise with a placeholder.
|
|
1101
|
+
* This allows comparing config without needing to resolve dependencies.
|
|
1102
|
+
*/
|
|
1103
|
+
const extractStaticInputs = (inputs) => {
|
|
1104
|
+
if (inputs instanceof Output || inputs instanceof Future || inputs instanceof Promise) return "__unresolved__";
|
|
1105
|
+
if (Array.isArray(inputs)) return inputs.map(extractStaticInputs);
|
|
1106
|
+
if (inputs !== null && typeof inputs === "object" && inputs.constructor === Object) {
|
|
1107
|
+
const result = {};
|
|
1108
|
+
for (const [key, value] of Object.entries(inputs)) result[key] = extractStaticInputs(value);
|
|
1109
|
+
return result;
|
|
1110
|
+
}
|
|
1111
|
+
return inputs;
|
|
1112
|
+
};
|
|
1099
1113
|
const status = async (app, opt) => {
|
|
1100
1114
|
const appState = await opt.backend.state.get(app.urn);
|
|
1101
1115
|
const resources = [];
|
|
@@ -1119,8 +1133,8 @@ const status = async (app, opt) => {
|
|
|
1119
1133
|
});
|
|
1120
1134
|
continue;
|
|
1121
1135
|
}
|
|
1122
|
-
const currentInput =
|
|
1123
|
-
const hasChanged = !compareState(nodeState.input, currentInput);
|
|
1136
|
+
const currentInput = extractStaticInputs(meta.input);
|
|
1137
|
+
const hasChanged = !compareState(extractStaticInputs(nodeState.input), currentInput);
|
|
1124
1138
|
resources.push({
|
|
1125
1139
|
...baseInfo,
|
|
1126
1140
|
status: hasChanged ? "changed" : "created"
|