@terraforge/terraform 0.0.25 → 0.0.26

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 +2 -17
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -426,16 +426,6 @@ const formatOutputState = (schema, state, path = []) => {
426
426
 
427
427
  //#endregion
428
428
  //#region src/provider.ts
429
- const areStatesEqual = (left, right) => {
430
- const replacer = (_, value) => {
431
- if (value !== null && value instanceof Object && !Array.isArray(value)) return Object.keys(value).sort().reduce((sorted, key) => {
432
- sorted[key] = value[key];
433
- return sorted;
434
- }, {});
435
- return value;
436
- };
437
- return JSON.stringify(left, replacer) === JSON.stringify(right, replacer);
438
- };
439
429
  var TerraformProvider = class {
440
430
  configured;
441
431
  plugin;
@@ -529,14 +519,9 @@ var TerraformProvider = class {
529
519
  const schema = getResourceSchema(plugin.schema().resources, type);
530
520
  const refreshedState = await plugin.readResource(type, priorOutputState);
531
521
  if (!refreshedState) return { kind: "deleted" };
532
- const mergedState = {
533
- ...refreshedState,
534
- ...priorInputState
535
- };
536
- const { requiresReplace, plannedState } = await plugin.planResourceChange(type, refreshedState, mergedState, priorInputState);
537
- const normalizedPlannedState = normalizeStateForComparison(schema, plannedState, priorInputState);
522
+ const normalizedPriorInputState = normalizeStateForComparison(schema, priorInputState, priorInputState);
538
523
  const normalizedRefreshedState = normalizeStateForComparison(schema, refreshedState, priorInputState);
539
- if (requiresReplace.length === 0 && areStatesEqual(normalizedPlannedState, normalizedRefreshedState)) return {
524
+ if (JSON.stringify(normalizedPriorInputState) === JSON.stringify(normalizedRefreshedState)) return {
540
525
  kind: "unchanged",
541
526
  state: refreshedState
542
527
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraforge/terraform",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",