helm-env-delta 1.9.0 → 1.9.1

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/README.md CHANGED
@@ -371,6 +371,7 @@ exclude: # Optional: Exclude patterns
371
371
  - '**/test*.yaml'
372
372
 
373
373
  prune: false # Optional: Delete dest files not in source
374
+ confirmationDelay: 3000 # Optional: Delay in ms before sync (default: 3000, 0 to disable)
374
375
  ```
375
376
 
376
377
  ---
@@ -697,8 +698,10 @@ stopRules: # Add production safety rules
697
698
 
698
699
  **Merging:**
699
700
 
700
- - Arrays: Concatenated (child adds to parent)
701
- - Objects: Deep merged (child overrides parent)
701
+ - Primitives (`source`, `destination`, `prune`, `confirmationDelay`): Child overrides parent
702
+ - Arrays (`include`, `exclude`): Concatenated (parent + child)
703
+ - Per-file Records (`skipPath`, `transforms`, `stopRules`, `fixedValues`): Keys merged, arrays concatenated
704
+ - `outputFormat`: Shallow merged (child fields override parent)
702
705
  - Max depth: 5 levels
703
706
 
704
707
  ---
@@ -104,6 +104,7 @@ declare const baseConfigSchema: z.ZodObject<{
104
104
  include: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
105
  exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
106
106
  prune: z.ZodOptional<z.ZodBoolean>;
107
+ confirmationDelay: z.ZodOptional<z.ZodNumber>;
107
108
  skipPath: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
108
109
  outputFormat: z.ZodOptional<z.ZodObject<{
109
110
  indent: z.ZodOptional<z.ZodNumber>;
@@ -223,6 +224,7 @@ declare const finalConfigSchema: z.ZodObject<{
223
224
  include: z.ZodDefault<z.ZodArray<z.ZodString>>;
224
225
  exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
225
226
  prune: z.ZodDefault<z.ZodBoolean>;
227
+ confirmationDelay: z.ZodDefault<z.ZodNumber>;
226
228
  outputFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
227
229
  indent: z.ZodDefault<z.ZodNumber>;
228
230
  keySeparator: z.ZodDefault<z.ZodBoolean>;
@@ -116,6 +116,7 @@ const baseConfigSchema = zod_1.z.object({
116
116
  include: zod_1.z.array(zod_1.z.string().min(1)).optional(),
117
117
  exclude: zod_1.z.array(zod_1.z.string().min(1)).optional(),
118
118
  prune: zod_1.z.boolean().optional(),
119
+ confirmationDelay: zod_1.z.number().int().min(0).optional(),
119
120
  skipPath: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())).optional(),
120
121
  outputFormat: zod_1.z
121
122
  .object({
@@ -137,6 +138,7 @@ const finalConfigSchema = baseConfigSchema
137
138
  include: zod_1.z.array(zod_1.z.string().min(1)).default(['**/*']),
138
139
  exclude: zod_1.z.array(zod_1.z.string().min(1)).default([]),
139
140
  prune: zod_1.z.boolean().default(false),
141
+ confirmationDelay: zod_1.z.number().int().min(0).default(3000),
140
142
  outputFormat: zod_1.z
141
143
  .object({
142
144
  indent: zod_1.z.number().int().min(1).max(10).default(2),
@@ -84,6 +84,10 @@ const mergeConfigs = (parent, child) => {
84
84
  merged.prune = child.prune;
85
85
  else if (parent.prune !== undefined)
86
86
  merged.prune = parent.prune;
87
+ if (child.confirmationDelay !== undefined)
88
+ merged.confirmationDelay = child.confirmationDelay;
89
+ else if (parent.confirmationDelay !== undefined)
90
+ merged.confirmationDelay = parent.confirmationDelay;
87
91
  const parentInclude = parent.include ?? [];
88
92
  const childInclude = child.include ?? [];
89
93
  if (parentInclude.length > 0 || childInclude.length > 0)
@@ -100,6 +104,7 @@ const mergeConfigs = (parent, child) => {
100
104
  merged.skipPath = mergePerFileRecords(parent.skipPath, child.skipPath);
101
105
  merged.transforms = mergeTransformRecords(parent.transforms, child.transforms);
102
106
  merged.stopRules = mergePerFileRecords(parent.stopRules, child.stopRules);
107
+ merged.fixedValues = mergePerFileRecords(parent.fixedValues, child.fixedValues);
103
108
  return merged;
104
109
  };
105
110
  exports.mergeConfigs = mergeConfigs;
@@ -1,4 +1,3 @@
1
- export declare const SYNC_CONFIRMATION_DELAY_MS = 2000;
2
1
  export declare const YAML_LINE_WIDTH_UNLIMITED = 0;
3
2
  export declare const YAML_DEFAULT_INDENT = 2;
4
3
  export declare const MAX_CONFIG_EXTENDS_DEPTH = 5;
package/dist/constants.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SEMVER_STRICT_PATTERN = exports.MAX_CONFIG_EXTENDS_DEPTH = exports.YAML_DEFAULT_INDENT = exports.YAML_LINE_WIDTH_UNLIMITED = exports.SYNC_CONFIRMATION_DELAY_MS = void 0;
4
- exports.SYNC_CONFIRMATION_DELAY_MS = 2000;
3
+ exports.SEMVER_STRICT_PATTERN = exports.MAX_CONFIG_EXTENDS_DEPTH = exports.YAML_DEFAULT_INDENT = exports.YAML_LINE_WIDTH_UNLIMITED = void 0;
5
4
  exports.YAML_LINE_WIDTH_UNLIMITED = 0;
6
5
  exports.YAML_DEFAULT_INDENT = 2;
7
6
  exports.MAX_CONFIG_EXTENDS_DEPTH = 5;
package/dist/index.js CHANGED
@@ -49,7 +49,6 @@ const configMerger_1 = require("./configMerger");
49
49
  const configWarnings_1 = require("./configWarnings");
50
50
  const consoleDiffReporter_1 = require("./consoleDiffReporter");
51
51
  const consoleFormatter_1 = require("./consoleFormatter");
52
- const constants_1 = require("./constants");
53
52
  const fileDiff_1 = require("./fileDiff");
54
53
  const fileLoader_1 = require("./fileLoader");
55
54
  const fileUpdater_1 = require("./fileUpdater");
@@ -277,7 +276,8 @@ const main = async () => {
277
276
  if (diffResult.deletedFiles.length > 0 && config.prune)
278
277
  console.warn(chalk_1.default.red('⚠️ Warning: Prune is enabled. Files will be permanently deleted!'));
279
278
  console.log(chalk_1.default.dim('\nPress Ctrl+C to cancel, or use --dry-run to preview changes first.\n'));
280
- await new Promise((resolve) => setTimeout(resolve, constants_1.SYNC_CONFIRMATION_DELAY_MS));
279
+ if (config.confirmationDelay > 0)
280
+ await new Promise((resolve) => setTimeout(resolve, config.confirmationDelay));
281
281
  }
282
282
  const formattedFiles = await (0, fileUpdater_1.updateFiles)(diffResult, sourceFiles, destinationFiles, config, command.dryRun, command.skipFormat, logger);
283
283
  if (command.diffHtml && !command.quiet)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helm-env-delta",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "HelmEnvDelta – environment-aware YAML delta and sync for GitOps",
5
5
  "author": "BCsabaEngine",
6
6
  "license": "ISC",