@terraforge/terraform 0.0.14 → 0.0.15

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 +24 -8
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -2103,12 +2103,16 @@ const createPlugin5 = async ({ server, client }) => {
2103
2103
  async planResourceChange(type, priorState, proposedState) {
2104
2104
  const schema$1 = getResourceSchema(resources, type);
2105
2105
  const preparedPriorState = formatInputState(schema$1, priorState);
2106
- const preparedProposedState = formatInputState(schema$1, proposedState);
2106
+ const preparedProposedState = formatInputState(schema$1, {
2107
+ ...priorState,
2108
+ ...proposedState
2109
+ });
2110
+ const configState = formatInputState(schema$1, proposedState);
2107
2111
  const plan = await client.call("PlanResourceChange", {
2108
2112
  typeName: type,
2109
2113
  priorState: encodeDynamicValue(preparedPriorState),
2110
2114
  proposedNewState: encodeDynamicValue(preparedProposedState),
2111
- config: encodeDynamicValue(preparedProposedState)
2115
+ config: encodeDynamicValue(configState)
2112
2116
  });
2113
2117
  const plannedState = decodeDynamicValue(plan.plannedState);
2114
2118
  return {
@@ -2119,12 +2123,16 @@ const createPlugin5 = async ({ server, client }) => {
2119
2123
  async applyResourceChange(type, priorState, proposedState) {
2120
2124
  const schema$1 = getResourceSchema(resources, type);
2121
2125
  const preparedPriorState = formatInputState(schema$1, priorState);
2122
- const preparedProposedState = formatInputState(schema$1, proposedState);
2126
+ const preparedProposedState = formatInputState(schema$1, {
2127
+ ...priorState,
2128
+ ...proposedState
2129
+ });
2130
+ const configState = formatInputState(schema$1, proposedState);
2123
2131
  return formatOutputState(schema$1, decodeDynamicValue((await client.call("ApplyResourceChange", {
2124
2132
  typeName: type,
2125
2133
  priorState: encodeDynamicValue(preparedPriorState),
2126
2134
  plannedState: encodeDynamicValue(preparedProposedState),
2127
- config: encodeDynamicValue(preparedProposedState)
2135
+ config: encodeDynamicValue(configState)
2128
2136
  })).newState));
2129
2137
  }
2130
2138
  };
@@ -2177,12 +2185,16 @@ const createPlugin6 = async ({ server, client }) => {
2177
2185
  async planResourceChange(type, priorState, proposedState) {
2178
2186
  const schema$1 = getResourceSchema(resources, type);
2179
2187
  const preparedPriorState = formatInputState(schema$1, priorState);
2180
- const preparedProposedState = formatInputState(schema$1, proposedState);
2188
+ const preparedProposedState = formatInputState(schema$1, {
2189
+ ...priorState,
2190
+ ...proposedState
2191
+ });
2192
+ const configState = formatInputState(schema$1, proposedState);
2181
2193
  const plan = await client.call("PlanResourceChange", {
2182
2194
  typeName: type,
2183
2195
  priorState: encodeDynamicValue(preparedPriorState),
2184
2196
  proposedNewState: encodeDynamicValue(preparedProposedState),
2185
- config: encodeDynamicValue(preparedProposedState)
2197
+ config: encodeDynamicValue(configState)
2186
2198
  });
2187
2199
  const plannedState = decodeDynamicValue(plan.plannedState);
2188
2200
  return {
@@ -2193,12 +2205,16 @@ const createPlugin6 = async ({ server, client }) => {
2193
2205
  async applyResourceChange(type, priorState, proposedState) {
2194
2206
  const schema$1 = getResourceSchema(resources, type);
2195
2207
  const preparedPriorState = formatInputState(schema$1, priorState);
2196
- const preparedProposedState = formatInputState(schema$1, proposedState);
2208
+ const preparedProposedState = formatInputState(schema$1, {
2209
+ ...priorState,
2210
+ ...proposedState
2211
+ });
2212
+ const configState = formatInputState(schema$1, proposedState);
2197
2213
  return formatOutputState(schema$1, decodeDynamicValue((await client.call("ApplyResourceChange", {
2198
2214
  typeName: type,
2199
2215
  priorState: encodeDynamicValue(preparedPriorState),
2200
2216
  plannedState: encodeDynamicValue(preparedProposedState),
2201
- config: encodeDynamicValue(preparedProposedState)
2217
+ config: encodeDynamicValue(configState)
2202
2218
  })).newState));
2203
2219
  }
2204
2220
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraforge/terraform",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "test": "bun test"
27
27
  },
28
28
  "peerDependencies": {
29
- "@terraforge/core": "0.0.11"
29
+ "@terraforge/core": "0.0.19"
30
30
  },
31
31
  "dependencies": {
32
32
  "@grpc/grpc-js": "1.12.6",