@terraforge/terraform 0.0.18 → 0.0.19

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -3
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2044,7 +2044,7 @@ const formatInputState = (schema, state, includeSchemaFields = true, path = [])
2044
2044
  throw new Error(`Unknown schema type: ${schema.type}`);
2045
2045
  };
2046
2046
  const formatOutputState = (schema, state, path = []) => {
2047
- if (state === null) return null;
2047
+ if (state === null || state === void 0) return null;
2048
2048
  if (schema.type === "array") {
2049
2049
  if (Array.isArray(state)) return state.map((item, i) => formatOutputState(schema.item, item, [...path, i]));
2050
2050
  throw new IncorrectType(schema.type, path);
@@ -2137,7 +2137,7 @@ const createPlugin5 = async ({ server, client }) => {
2137
2137
  proposedNewState: encodeDynamicValue(preparedProposedState),
2138
2138
  config: encodeDynamicValue(preparedConfigState)
2139
2139
  });
2140
- const plannedState = decodeDynamicValue(plan.plannedState);
2140
+ const plannedState = formatOutputState(schema$1, decodeDynamicValue(plan.plannedState));
2141
2141
  return {
2142
2142
  requiresReplace: filterRequiresReplace(formatAttributePath(plan.requiresReplace), preparedPriorState, preparedProposedState),
2143
2143
  plannedState
@@ -2213,7 +2213,7 @@ const createPlugin6 = async ({ server, client }) => {
2213
2213
  proposedNewState: encodeDynamicValue(preparedProposedState),
2214
2214
  config: encodeDynamicValue(configState)
2215
2215
  });
2216
- const plannedState = decodeDynamicValue(plan.plannedState);
2216
+ const plannedState = formatOutputState(schema$1, decodeDynamicValue(plan.plannedState));
2217
2217
  return {
2218
2218
  requiresReplace: filterRequiresReplace(formatAttributePath(plan.requiresReplace), preparedPriorState, preparedProposedState),
2219
2219
  plannedState
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraforge/terraform",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",