configorama 0.10.0 → 0.10.2

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
@@ -356,9 +356,9 @@ Resolution is a **fixed-point loop**: each pass resolves what it can, then `popu
356
356
 
357
357
  ### Performance
358
358
 
359
- Configorama is fast and stays out of the way at runtime — a typical 21KB serverless-style config resolves in **~3ms** on warm Node 22.
359
+ A typical 21KB serverless-style config resolves in **~3ms** on warm Node 22.
360
360
 
361
- - Honest before/after benchmarks against the published `0.9.17` baseline: [`PERF.md`](./PERF.md)
361
+ - Before/after benchmarks against the published `0.9.17` baseline: [`PERF.md`](./PERF.md)
362
362
  - Reproducible bench harness: [`scripts/bench.js`](./scripts/bench.js)
363
363
  - Run against your own configs:
364
364
  ```bash
@@ -366,7 +366,7 @@ Configorama is fast and stays out of the way at runtime — a typical 21KB serve
366
366
  node scripts/bench.js /path/to/another/configorama # A/B
367
367
  ```
368
368
 
369
- If your config is slow, please open an issue with the config (or a redacted reproduction) we can profile and tighten the hot path.
369
+ If your config is slow, please open an issue with the config (or a redacted reproduction). We're happy to profile and tighten the hot path.
370
370
 
371
371
  ---
372
372
 
@@ -1363,7 +1363,7 @@ inRange: ${between(${value}, 50, 100)} # true
1363
1363
 
1364
1364
  ## Bundled Plugins
1365
1365
 
1366
- Plugins ship in the repo under `plugins/` and are opt-in install their peer dependencies, then wire them into `variableSources`. Plugins are *not* required dependencies of `configorama` itself, so consumers who don't need them aren't paying for them.
1366
+ Plugins ship in the repo under `plugins/` and are opt-in: install their peer dependencies, then wire them into `variableSources`. Plugins are *not* required dependencies of `configorama` itself, so consumers who don't need them aren't paying for them.
1367
1367
 
1368
1368
  ### CloudFormation
1369
1369
 
@@ -1393,7 +1393,7 @@ const config = await configorama('config.yml', {
1393
1393
  })
1394
1394
  ```
1395
1395
 
1396
- Full docs: [`plugins/cloudformation/README.md`](./plugins/cloudformation/README.md) covers the env-var-prefix alias convention, refcounted credential mutex for parallel-safe deploys, and the `skipResolution` mode for CI metadata extraction.
1396
+ Full docs: [`plugins/cloudformation/README.md`](./plugins/cloudformation/README.md). Covers the env-var-prefix alias convention, the refcounted credential mutex for parallel-safe deploys, and the `skipResolution` mode for CI metadata extraction.
1397
1397
 
1398
1398
  Peer dependency (install separately):
1399
1399
 
@@ -1590,7 +1590,7 @@ const { format } = require('configorama')
1590
1590
  // Parse YAML
1591
1591
  const yamlObj = format.yaml.parse('key: value')
1592
1592
 
1593
- // Parse JSON (handles JSON5/JSONC too comments, trailing commas)
1593
+ // Parse JSON (handles JSON5/JSONC too: comments, trailing commas)
1594
1594
  const jsonObj = format.json.parse('{ key: "value", }')
1595
1595
 
1596
1596
  // Parse TOML
@@ -1605,7 +1605,7 @@ const hclObj = await format.hcl.parse('variable "example" { default = "value" }'
1605
1605
 
1606
1606
  **Available parsers:** `format.json`, `format.yaml`, `format.toml`, `format.ini`, `format.hcl`, `format.markdown`.
1607
1607
 
1608
- Each has at minimum a `parse(content)` method; `dump(obj)` / `stringify(obj)` and cross-format converters (e.g. `format.yaml.toJson`, `format.toml.toYaml`) are available where the underlying format supports them. `format.markdown` is a frontmatter parser see [Markdown Files](#markdown-files) below.
1608
+ Each has at minimum a `parse(content)` method; `dump(obj)` / `stringify(obj)` and cross-format converters (e.g. `format.yaml.toJson`, `format.toml.toYaml`) are available where the underlying format supports them. `format.markdown` is a frontmatter parser; see [Markdown Files](#markdown-files) below.
1609
1609
 
1610
1610
  **Real use cases for `format`:**
1611
1611
 
@@ -1644,7 +1644,7 @@ Resolves to:
1644
1644
  }
1645
1645
  ```
1646
1646
 
1647
- The body is detached during variable resolution (so `${…}` inside the body text is left alone) and re-attached afterward only frontmatter keys get variable expansion.
1647
+ The body is detached during variable resolution (so `${…}` inside the body text is left alone) and re-attached afterward; only frontmatter keys get variable expansion.
1648
1648
 
1649
1649
  ---
1650
1650
 
@@ -1821,7 +1821,7 @@ const config = await configorama(configFile, {
1821
1821
  - Serverless Framework integration (let the framework resolve SSM and other refs it owns)
1822
1822
  - Gradual migration (allow unknown types during transition period)
1823
1823
 
1824
- > CloudFormation refs (`${cf:…}`, `${cf(region):…}`, `${cf(account:region):…}`) are now resolved natively by the bundled [`plugins/cloudformation/`](./plugins/cloudformation/README.md) plugin no external resolver required.
1824
+ > CloudFormation refs (`${cf:…}`, `${cf(region):…}`, `${cf(account:region):…}`) are now resolved natively by the bundled [`plugins/cloudformation/`](./plugins/cloudformation/README.md) plugin; no external resolver required.
1825
1825
 
1826
1826
  ---
1827
1827
 
@@ -1900,7 +1900,7 @@ const config = await configorama(configFile, {
1900
1900
  | `mergeKeys` | `string[]` | `[]` | Keys to merge in arrays of objects |
1901
1901
  | `filePathOverrides` | `Record<string, string>` | `{}` | Map of file paths to override (for testing/mocking) |
1902
1902
 
1903
- > The config file itself can also set `useDotenv: true` (or `useDotEnv: true`) at the top level to trigger dotenv loading useful if you want the behavior intrinsic to the config rather than the JS caller.
1903
+ > The config file itself can also set `useDotenv: true` (or `useDotEnv: true`) at the top level to trigger dotenv loading. Useful when you want the behavior intrinsic to the config rather than the JS caller.
1904
1904
 
1905
1905
  **Legacy options (deprecated):**
1906
1906
 
@@ -2051,7 +2051,7 @@ const config = await configorama('config.yml', {
2051
2051
  })
2052
2052
  ```
2053
2053
 
2054
- > **See also:** the bundled [`plugins/cloudformation/`](./plugins/cloudformation/README.md) plugin is a production-grade example of a `source: 'remote'` resolver it handles multi-region, multi-account credential swapping, and per-instance client/output caching.
2054
+ > **See also:** the bundled [`plugins/cloudformation/`](./plugins/cloudformation/README.md) plugin is a working example of a `source: 'remote'` resolver. It handles multi-region and multi-account credential swapping, plus per-instance client and output caching.
2055
2055
 
2056
2056
  ```yaml
2057
2057
  # config.yml
@@ -2216,7 +2216,7 @@ configorama config.yml --allow-unknown
2216
2216
  **Allow undefined values in the final output:**
2217
2217
 
2218
2218
  ```bash
2219
- # Don't error on values that resolved to undefined emit them as nulls
2219
+ # Don't error on values that resolved to undefined; emit them as nulls
2220
2220
  # (useful for downstream tooling that does its own validation)
2221
2221
  configorama config.yml --allow-undefined
2222
2222
  ```
@@ -2863,7 +2863,7 @@ const fullyResolved = await externalResolver(partiallyResolved)
2863
2863
 
2864
2864
  **Use case:** Serverless Framework + Serverless Dashboard workflow.
2865
2865
 
2866
- > For CloudFormation refs specifically, the bundled [CF plugin](./plugins/cloudformation/README.md) resolves them natively in Stage 1 you don't need a second pass.
2866
+ > For CloudFormation refs specifically, the bundled [CF plugin](./plugins/cloudformation/README.md) resolves them natively in Stage 1, so you don't need a second pass.
2867
2867
 
2868
2868
  ---
2869
2869
 
@@ -3000,11 +3000,11 @@ timeout: ${selectByEnv(30, 5, ${environment})}
3000
3000
 
3001
3001
  ## Comparison vs Serverless Framework Variables
3002
3002
 
3003
- Configorama was forked from the Serverless Framework variable system and extended. Here's what's different:
3003
+ Configorama was forked from the Serverless Framework variable system and extended. The differences:
3004
3004
 
3005
3005
  | Capability | Serverless | Configorama |
3006
3006
  |---|---|---|
3007
- | Framework-agnostic use outside Serverless | ❌ Serverless-only | ✅ Any tool, any framework |
3007
+ | Framework-agnostic; use outside Serverless | ❌ Serverless-only | ✅ Any tool, any framework |
3008
3008
  | Pluggable variable sources | ❌ Hardcoded | ✅ Custom resolvers, custom syntax |
3009
3009
  | `self:` prefix optional in self-refs | ❌ Required | ✅ `${foo.bar}` works without `self:` |
3010
3010
  | Numbers as defaults | ❌ Coerced to string | ✅ `${env:TIMEOUT, 30}` stays numeric |
@@ -3067,7 +3067,7 @@ MIT © [David Wells](https://davidwells.io)
3067
3067
 
3068
3068
  ## Contributing
3069
3069
 
3070
- Bug reports and reproductions are very welcome please open an [issue](https://github.com/DavidWells/configorama/issues) with a minimal failing config. PRs are reviewed case-by-case; small targeted fixes with a test case are most likely to land quickly.
3070
+ Bug reports and reproductions are very welcome. Please open an [issue](https://github.com/DavidWells/configorama/issues) with a minimal failing config. PRs are reviewed case-by-case; small targeted fixes with a test case are most likely to land quickly.
3071
3071
 
3072
3072
  ## Support
3073
3073
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "configorama",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Variable support for configuration files",
5
5
  "main": "src/index.js",
6
6
  "types": "index.d.ts",
package/src/main.js CHANGED
@@ -1102,6 +1102,11 @@ class Configorama {
1102
1102
  // #######################
1103
1103
  // ## PROPERTY HANDLING ##
1104
1104
  // #######################
1105
+ isCloudFormationSubPath(pathValue) {
1106
+ if (!pathValue || !pathValue.length) return false
1107
+ return pathValue[pathValue.length - 1] === 'Fn::Sub'
1108
+ }
1109
+
1105
1110
  /**
1106
1111
  * The declaration of a terminal property. This declaration includes the path and value of the
1107
1112
  * property.
@@ -1259,6 +1264,11 @@ class Configorama {
1259
1264
  }
1260
1265
  return false
1261
1266
  })
1267
+ /* Leave CloudFormation Fn::Sub bodies verbatim. ${...} inside a !Sub is a
1268
+ CloudFormation reference, not a configorama variable. */
1269
+ variables = variables.filter((property) => {
1270
+ return !this.isCloudFormationSubPath(property.path)
1271
+ })
1262
1272
  /*
1263
1273
  console.log(`variables at call count ${this.callCount}`, variables)
1264
1274
  /** */
@@ -1545,6 +1555,9 @@ class Configorama {
1545
1555
  console.log(valueObject)
1546
1556
  }
1547
1557
  const property = valueObject.value
1558
+ if (this.isCloudFormationSubPath(valueObject.path)) {
1559
+ return Promise.resolve(property)
1560
+ }
1548
1561
  const matches = this.getMatches(property)
1549
1562
  /*
1550
1563
  console.log('populateValue matches', matches)
@@ -57,14 +57,6 @@ type ConfigoramaSettings = {
57
57
  * - return both config and metadata about variables found
58
58
  */
59
59
  returnMetadata?: boolean;
60
- /**
61
- * - suppress env-stage-loader logs when useDotenv/useDotEnv is enabled
62
- */
63
- dotEnvSilent?: boolean;
64
- /**
65
- * - enable env-stage-loader debug logs when useDotenv/useDotEnv is enabled
66
- */
67
- dotEnvDebug?: boolean;
68
60
  /**
69
61
  * - keys to merge in arrays of objects
70
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;AAyCiB,0BALH,CAAC,4BACJ,MAAM,MAAO,aACb,mBAAmB,GACjB,OAAO,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAiD7C;;IASqB,qBALR,CAAC,4BACJ,MAAM,MAAO,aACb,mBAAmB,GACjB,CAAC,CAgBb;IAQwB,4CAJb,MAAM,GAAC,MAAM,aACd,MAAM,gBAUhB;;;;;;;;;;;;;;;;aAtHa,MAAM;;;;gBACN,MAAM;;;;;;;;;;;;;;;;;;;;uBAIN,OAAO;;;;2BACP,OAAO;;;;kBACP,cAAe;;;;qBACf,OAAO;;;;mBACP,OAAO;;;;kBACP,OAAO;;;;gBACP,MAAM,EAAE;;;;;;;;uBAKR,CAAC;;;;oBAED,MAAM;;;;;;;;;;YAEN,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;AAuCiB,0BALH,CAAC,4BACJ,MAAM,MAAO,aACb,mBAAmB,GACjB,OAAO,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAiD7C;;IASqB,qBALR,CAAC,4BACJ,MAAM,MAAO,aACb,mBAAmB,GACjB,CAAC,CAgBb;IAQwB,4CAJb,MAAM,GAAC,MAAM,aACd,MAAM,gBAUhB;;;;;;;;;;;;;;;;aApHa,MAAM;;;;gBACN,MAAM;;;;;;;;;;;;;;;;;;;;uBAIN,OAAO;;;;2BACP,OAAO;;;;kBACP,cAAe;;;;qBACf,OAAO;;;;gBACP,MAAM,EAAE;;;;;;;;uBAKR,CAAC;;;;oBAED,MAAM;;;;;;;;;;YAEN,CAAC"}
@@ -4,15 +4,10 @@ declare class Configorama {
4
4
  settings: any;
5
5
  filterCache: {};
6
6
  _originalValueCache: Map<any, any>;
7
- _resolvedPaths: Set<any>;
8
- _fileContentCache: Map<any, any>;
9
- _needsRawClone: boolean;
10
7
  foundVariables: any[];
11
8
  fileRefsFound: any[];
12
9
  resolutionTracking: {};
13
- _trackCalls: boolean;
14
10
  variableSyntax: RegExp;
15
- variableSyntaxTest: RegExp;
16
11
  varPrefix: string;
17
12
  varSuffix: string;
18
13
  varPrefixPattern: RegExp;
@@ -69,7 +64,22 @@ declare class Configorama {
69
64
  * @returns {object} Metadata object containing variables, fileRefs, and summary
70
65
  */
71
66
  collectVariableMetadata(): object;
72
- _cachedMetadata: any;
67
+ _cachedMetadata: {
68
+ variables: {};
69
+ uniqueVariables: {};
70
+ fileDependencies: {
71
+ globPatterns: any[];
72
+ dynamicPaths: any[];
73
+ resolvedPaths: any[];
74
+ byConfigPath: any[];
75
+ references: any[];
76
+ };
77
+ summary: {
78
+ totalVariables: number;
79
+ requiredVariables: number;
80
+ variablesWithDefaults: number;
81
+ };
82
+ };
73
83
  /**
74
84
  * Populate the variables in the given object.
75
85
  * @param objectToPopulate The object to populate variables within.
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.js"],"names":[],"mappings":";AAyIA;IACE,0CAufC;IA/eC,cAkBW;IAuBX,gBAAqB;IAErB,mCAAoC;IAGpC,yBAA+B;IAG/B,iCAAkC;IAMlC,wBAIC;IAED,sBAAwB;IACxB,qBAAuB;IAGvB,uBAA4B;IAE5B,qBAAmD;IAsBnD,uBAAoC;IAIpC,2BAAkG;IAIlG,kBAAqC;IACrC,kBAAqC;IAErC,yBAA+F;IAC/F,yBAAuD;IACvD,kCAAyE;IAMrE,uBAAgD;IAMlD,YAAuB;IAEvB,oBAA0C;IAE1C,gBAAoD;IAOpD,uBAAkC;IAElC,uBAA8B;IAE9B,uBAAkC;IASpC,wBAAmC;IAGnC,mBAqHC;IAwED,4BAA8C;IAG9C,iCAAkC;IAalC,aA2EC;IAUD,oBAEC;IAGD,eAiDC;IAOD,YAAc;IACd,cAAgB;IAChB,kBAAkB;IAGpB;;;;OAIG;IACH,0BAHW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,CAAC,CAoExB;IAKD;;;;;;;OAOG;IACH,0FAFa,OAAO,CAAC,GAAG,CAAC,CAiiBxB;IACD,+EA+BC;IACD,yDAiBC;IACD,oEA6BC;IAKD,8CAQC;IACD,kDAyBC;IACD;;;;;;;;;;;;;OAaG;IACH,wEAoDC;IAKD,4BAOC;IACD,sCAqEC;CACF"}
@@ -14,7 +14,6 @@
14
14
  * @param {RegExp} ctx.textRefSyntax - Regex for text() syntax
15
15
  * @param {string} ctx.varPrefix - Variable prefix (e.g., '${')
16
16
  * @param {string} ctx.varSuffix - Variable suffix (e.g., '}')
17
- * @param {Map<string, string>} [ctx.fileContentCache] - Optional per-instance read cache keyed by absolute file path
18
17
  * @param {string} variableString - The variable string to resolve
19
18
  * @param {object} options - Resolution options
20
19
  * @returns {Promise<any>}
@@ -33,7 +32,6 @@ export function getValueFromFile(ctx: {
33
32
  textRefSyntax: RegExp;
34
33
  varPrefix: string;
35
34
  varSuffix: string;
36
- fileContentCache?: Map<string, string>;
37
35
  }, variableString: string, options: object): Promise<any>;
38
36
  /**
39
37
  * Parse file contents based on file extension
@@ -1 +1 @@
1
- {"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"AA8FA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sCAlBG;IAAoB,UAAU,EAAtB,MAAM;IACK,aAAa;IACZ,cAAc,EAA1B,MAAM;IACM,mBAAmB,EAA/B,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,IAAI,EAAhB,MAAM;IACM,cAAc,EAA1B,MAAM;IACM,MAAM,EAAlB,MAAM;IACQ,cAAc;IAChB,aAAa,EAAzB,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,SAAS,EAArB,MAAM;IACM,SAAS,EAArB,MAAM;IACoB,gBAAgB,GAA1C,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,kBAAQ,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CA+VxB;AA5YD;;;;;GAKG;AACH,2CAJW,MAAM,YACN,MAAM,GACJ,GAAC,CAoBb;AAsXD;;;;;;GAMG;AACH,qDAJW,MAAM,qBACN,MAAM,GACJ;IAAE,aAAa,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAkBhE;AAED;;;;;;GAMG;AACH,sDALW,MAAM,qBACN,MAAM,yBACN,OAAO,GACL,MAAM,EAAE,CAcpB"}
1
+ {"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"AA8FA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,sCAjBG;IAAoB,UAAU,EAAtB,MAAM;IACK,aAAa;IACZ,cAAc,EAA1B,MAAM;IACM,mBAAmB,EAA/B,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,IAAI,EAAhB,MAAM;IACM,cAAc,EAA1B,MAAM;IACM,MAAM,EAAlB,MAAM;IACQ,cAAc;IAChB,aAAa,EAAzB,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,SAAS,EAArB,MAAM;IACM,SAAS,EAArB,MAAM;CACd,kBAAQ,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAwVxB;AApYD;;;;;GAKG;AACH,2CAJW,MAAM,YACN,MAAM,GACJ,GAAC,CAoBb;AA8WD;;;;;;GAMG;AACH,qDAJW,MAAM,qBACN,MAAM,GACJ;IAAE,aAAa,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAkBhE;AAED;;;;;;GAMG;AACH,sDALW,MAAM,qBACN,MAAM,yBACN,OAAO,GACL,MAAM,EAAE,CAcpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"valueFromGit.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromGit.js"],"names":[],"mappings":"AA4XiB;;;;;;;;EAUhB"}
1
+ {"version":3,"file":"valueFromGit.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromGit.js"],"names":[],"mappings":"AA2XiB;;;;;;;;EAUhB"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=valueFromSelf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueFromSelf.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromSelf.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;cA4Dc,MAAM;;;;cACN,MAAM;;;;eACN,MAAM;;;;kBACN,cAAe;;;;;;eAyIf,MAAM;;;;kBACN,cAAe;;AA/I7B;;;;;;GAMG;AAEH;;;;GAIG;AACH,iFAHW,YAAY,OAgItB;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,oCAJW,MAAM,SACN,gBAAgB,OAW1B"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;cAgBc,MAAM;;;;cACN,MAAM;;;;eACN,MAAM;;;;kBACN,cAAe;;;;;;eAmIf,MAAM;;;;kBACN,cAAe;;AAzI7B;;;;;;GAMG;AAEH;;;;GAIG;AACH,iFAHW,YAAY,OA0HtB;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,oCAJW,MAAM,SACN,gBAAgB,OAW1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"preProcess.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/preProcess.js"],"names":[],"mappings":";AASA;;;;;;;;GAQG;AACH,+DANW,MAAM,mCAGd;IAA0B,eAAe,GAAjC,OAAO;CACf,OA4XF"}
1
+ {"version":3,"file":"preProcess.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/preProcess.js"],"names":[],"mappings":";AASA;;;;;;;;GAQG;AACH,+DANW,MAAM,mCAGd;IAA0B,eAAe,GAAjC,OAAO;CACf,OAgYF"}
@@ -9,13 +9,4 @@
9
9
  * @returns {number} Line number (1-indexed) or 0 if not found
10
10
  */
11
11
  export function findLineForKey(keyToFind: string, lines: string[], fileType: string): number;
12
- /**
13
- * Walk a dot-separated config path through raw file lines to find the exact line.
14
- * YAML uses indentation-based nesting, JSON uses brace-based nesting.
15
- * @param {string} configPath - Dot-separated path (e.g. 'resources.Parameters.Description')
16
- * @param {string[]} lines - Array of file lines
17
- * @param {string} fileType - File extension (e.g., '.yml', '.json')
18
- * @returns {number} Line number (1-indexed) or 0 if not found
19
- */
20
- export function findLineByPath(configPath: string, lines: string[], fileType: string): number;
21
12
  //# sourceMappingURL=findLineForKey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findLineForKey.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/findLineForKey.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,0CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,CAiClB;AAED;;;;;;;GAOG;AACH,2CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,CAYlB"}
1
+ {"version":3,"file":"findLineForKey.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/findLineForKey.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,0CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,CAiClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"replaceAll.d.ts","sourceRoot":"","sources":["../../../../src/utils/strings/replaceAll.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wCALW,MAAM,YACN,MAAM,UACN,MAAM,GACJ,MAAM,CAelB"}
1
+ {"version":3,"file":"replaceAll.d.ts","sourceRoot":"","sources":["../../../../src/utils/strings/replaceAll.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wCALW,MAAM,YACN,MAAM,UACN,MAAM,GACJ,MAAM,CAelB"}
@@ -1,62 +0,0 @@
1
- /**
2
- * Display "No Variables Found" message
3
- * @param {string} configFilePath
4
- * @param {RegExp} variableSyntax
5
- * @param {Object} variableTypes
6
- */
7
- export function displayNoVariablesFound(configFilePath: string, variableSyntax: RegExp, variableTypes: any): void;
8
- /**
9
- * Display variable details in stacked box format
10
- * @param {Object} params
11
- * @param {string[]} params.varKeys
12
- * @param {Object} params.variableData
13
- * @param {Object} params.uniqueVariables
14
- * @param {RegExp} params.varPrefixPattern
15
- * @param {RegExp} params.varSuffixPattern
16
- * @param {string[]} params.lines
17
- * @param {string} params.fileType
18
- * @param {string} params.configFilePath
19
- */
20
- export function displayVariableDetails({ varKeys, variableData, uniqueVariables, varPrefixPattern, varSuffixPattern, lines, fileType, configFilePath }: {
21
- varKeys: string[];
22
- variableData: any;
23
- uniqueVariables: any;
24
- varPrefixPattern: RegExp;
25
- varSuffixPattern: RegExp;
26
- lines: string[];
27
- fileType: string;
28
- configFilePath: string;
29
- }): void;
30
- /**
31
- * Display unique variables in stacked box format
32
- * @param {Object} params
33
- * @param {string[]} params.uniqueVarKeys
34
- * @param {Object} params.uniqueVariables
35
- * @param {string[]} params.lines
36
- * @param {string} params.fileType
37
- * @param {string} params.configFilePath
38
- */
39
- export function displayUniqueVariables({ uniqueVarKeys, uniqueVariables, lines, fileType, configFilePath }: {
40
- uniqueVarKeys: string[];
41
- uniqueVariables: any;
42
- lines: string[];
43
- fileType: string;
44
- configFilePath: string;
45
- }): void;
46
- /**
47
- * Display configurable variables grouped by source type
48
- * @param {Object} params
49
- * @param {string[]} params.uniqueVarKeys
50
- * @param {Object} params.uniqueVariables
51
- * @param {string[]} params.lines
52
- * @param {string} params.fileType
53
- * @param {string} params.configFilePath
54
- */
55
- export function displayConfigurableVariables({ uniqueVarKeys, uniqueVariables, lines, fileType, configFilePath }: {
56
- uniqueVarKeys: string[];
57
- uniqueVariables: any;
58
- lines: string[];
59
- fileType: string;
60
- configFilePath: string;
61
- }): void;
62
- //# sourceMappingURL=display.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/display.js"],"names":[],"mappings":"AAcA;;;;;GAKG;AACH,wDAJW,MAAM,kBACN,MAAM,4BAwBhB;AAED;;;;;;;;;;;GAWG;AACH,wJATG;IAAyB,OAAO,EAAxB,MAAM,EAAE;IACO,YAAY;IACZ,eAAe;IACf,gBAAgB,EAA/B,MAAM;IACS,gBAAgB,EAA/B,MAAM;IACW,KAAK,EAAtB,MAAM,EAAE;IACO,QAAQ,EAAvB,MAAM;IACS,cAAc,EAA7B,MAAM;CAChB,QAyJA;AAED;;;;;;;;GAQG;AACH,4GANG;IAAyB,aAAa,EAA9B,MAAM,EAAE;IACO,eAAe;IACb,KAAK,EAAtB,MAAM,EAAE;IACO,QAAQ,EAAvB,MAAM;IACS,cAAc,EAA7B,MAAM;CAChB,QAiHA;AAED;;;;;;;;GAQG;AACH,kHANG;IAAyB,aAAa,EAA9B,MAAM,EAAE;IACO,eAAe;IACb,KAAK,EAAtB,MAAM,EAAE;IACO,QAAQ,EAAvB,MAAM;IACS,cAAc,EAA7B,MAAM;CAChB,QAyIA"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Collect metadata about all variables found in the configuration
3
- * @param {Object} params
4
- * @param {RegExp} params.variableSyntax
5
- * @param {Object} params.variablesKnownTypes
6
- * @param {Object} params.variableTypes
7
- * @param {RegExp|null} params.filterMatch
8
- * @param {string} params.configFilePath
9
- * @param {Object} params.displayConfig - rawOriginalConfig || originalConfig, used for traversal
10
- * @param {Object} params.originalConfig - this.originalConfig, used for dotProp.get checks
11
- * @param {string} params.varSuffix
12
- * @param {RegExp} params.varSuffixWithSpacePattern
13
- * @returns {Object} Metadata object containing variables, fileDependencies, and summary
14
- */
15
- export function collectVariableMetadata({ variableSyntax, variablesKnownTypes, variableTypes, filterMatch, configFilePath, displayConfig, originalConfig, varSuffix, varSuffixWithSpacePattern, }: {
16
- variableSyntax: RegExp;
17
- variablesKnownTypes: any;
18
- variableTypes: any;
19
- filterMatch: RegExp | null;
20
- configFilePath: string;
21
- displayConfig: any;
22
- originalConfig: any;
23
- varSuffix: string;
24
- varSuffixWithSpacePattern: RegExp;
25
- }): any;
26
- //# sourceMappingURL=metadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;GAaG;AACH,mMAXG;IAAuB,cAAc,EAA7B,MAAM;IACS,mBAAmB;IACnB,aAAa;IACR,WAAW,EAA/B,MAAM,GAAC,IAAI;IACI,cAAc,EAA7B,MAAM;IACS,aAAa;IACb,cAAc;IACd,SAAS,EAAxB,MAAM;IACS,yBAAyB,EAAxC,MAAM;CACd,OAyaF"}
@@ -1,10 +0,0 @@
1
- export = BoundedMap;
2
- declare class BoundedMap {
3
- constructor(maxSize?: number);
4
- _map: Map<any, any>;
5
- _maxSize: number;
6
- get(key: any): any;
7
- has(key: any): boolean;
8
- set(key: any, value: any): this;
9
- }
10
- //# sourceMappingURL=BoundedMap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoundedMap.d.ts","sourceRoot":"","sources":["../../../src/utils/BoundedMap.js"],"names":[],"mappings":";AAGA;IACE,8BAGC;IAFC,oBAAqB;IACrB,iBAAuB;IAEzB,mBAEC;IACD,uBAEC;IACD,gCAOC;CACF"}