codify-plugin-lib 1.0.178 → 1.0.179

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 (43) hide show
  1. package/dist/entities/change-set.d.ts +24 -0
  2. package/dist/entities/change-set.js +152 -0
  3. package/dist/entities/errors.d.ts +4 -0
  4. package/dist/entities/errors.js +7 -0
  5. package/dist/entities/plan-types.d.ts +25 -0
  6. package/dist/entities/plan-types.js +1 -0
  7. package/dist/entities/plan.d.ts +15 -0
  8. package/dist/entities/plan.js +127 -0
  9. package/dist/entities/plugin.d.ts +16 -0
  10. package/dist/entities/plugin.js +80 -0
  11. package/dist/entities/resource-options.d.ts +31 -0
  12. package/dist/entities/resource-options.js +76 -0
  13. package/dist/entities/resource-types.d.ts +11 -0
  14. package/dist/entities/resource-types.js +1 -0
  15. package/dist/entities/resource.d.ts +42 -0
  16. package/dist/entities/resource.js +303 -0
  17. package/dist/entities/stateful-parameter.d.ts +29 -0
  18. package/dist/entities/stateful-parameter.js +46 -0
  19. package/dist/entities/transform-parameter.d.ts +4 -0
  20. package/dist/entities/transform-parameter.js +2 -0
  21. package/dist/plan/change-set.d.ts +8 -3
  22. package/dist/plan/change-set.js +10 -3
  23. package/dist/plan/plan.js +7 -4
  24. package/dist/plugin/plugin.d.ts +1 -1
  25. package/dist/plugin/plugin.js +8 -1
  26. package/dist/pty/vitest.config.d.ts +2 -0
  27. package/dist/pty/vitest.config.js +11 -0
  28. package/dist/resource/resource-settings.d.ts +6 -0
  29. package/dist/resource/stateful-parameter.d.ts +165 -0
  30. package/dist/resource/stateful-parameter.js +94 -0
  31. package/dist/utils/spawn-2.d.ts +5 -0
  32. package/dist/utils/spawn-2.js +7 -0
  33. package/dist/utils/spawn.d.ts +29 -0
  34. package/dist/utils/spawn.js +124 -0
  35. package/package.json +2 -2
  36. package/src/plan/change-set.test.ts +1 -1
  37. package/src/plan/change-set.ts +16 -3
  38. package/src/plan/plan.ts +7 -4
  39. package/src/plugin/plugin.ts +9 -1
  40. package/src/resource/resource-controller-stateful-mode.test.ts +15 -7
  41. package/src/resource/resource-controller.test.ts +4 -2
  42. package/src/resource/resource-settings.test.ts +2 -0
  43. package/src/resource/resource-settings.ts +8 -1
@@ -80,13 +80,15 @@ describe('Resource tests', () => {
80
80
  name: 'propA',
81
81
  previousValue: 'propABefore',
82
82
  newValue: 'propA',
83
- operation: 'modify'
83
+ operation: 'modify',
84
+ isSensitive: false,
84
85
  })
85
86
  expect(result.changeSet.parameterChanges[1]).to.deep.eq({
86
87
  name: 'propB',
87
88
  previousValue: 10,
88
89
  newValue: 10,
89
- operation: 'noop'
90
+ operation: 'noop',
91
+ isSensitive: false,
90
92
  })
91
93
  })
92
94
 
@@ -717,12 +717,14 @@ describe('Resource parameter tests', () => {
717
717
  operation: ParameterOperation.NOOP,
718
718
  previousValue: null,
719
719
  newValue: 'setting',
720
+ isSensitive: false,
720
721
  },
721
722
  {
722
723
  name: 'propB',
723
724
  operation: ParameterOperation.NOOP,
724
725
  previousValue: 64,
725
726
  newValue: 64,
727
+ isSensitive: false,
726
728
  }
727
729
  ])
728
730
  )
@@ -163,7 +163,7 @@ export interface ResourceSettings<T extends StringIndexedObject> {
163
163
  * @param input
164
164
  * @param context
165
165
  */
166
- refreshMapper?: (input: Partial<T>, context: RefreshContext<T>) => Partial<T>
166
+ refreshMapper?: (input: Partial<T>, context: RefreshContext<T>) => Partial<T>;
167
167
  }
168
168
  }
169
169
 
@@ -207,6 +207,13 @@ export interface DefaultParameterSetting {
207
207
  */
208
208
  type?: ParameterSettingType;
209
209
 
210
+ /**
211
+ * Mark the field as sensitive. Defaults to false. This has two side effects:
212
+ * 1. When displaying this field in the plan, it will be replaced with asterisks
213
+ * 2. When importing, resources with sensitive fields will be skipped unless the user explicitly allows it.
214
+ */
215
+ isSensitive?: boolean;
216
+
210
217
  /**
211
218
  * Default value for the parameter. If a value is not provided in the config, then this value will be used.
212
219
  */