configorama 0.7.2 → 0.9.0
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 +193 -13
- package/cli.js +3 -1
- package/index.d.ts +36 -3
- package/package.json +1 -1
- package/src/index.js +15 -2
- package/src/main.js +129 -47
- package/src/resolvers/valueFromFile.js +7 -1
- package/src/resolvers/valueFromParam.js +91 -0
- package/src/resolvers/valueFromParam.test.js +207 -0
- package/src/utils/PromiseTracker.js +54 -0
- package/src/utils/variables/variableUtils.js +54 -1
- package/src/utils/variables/variableUtils.test.js +44 -0
- package/types/src/index.d.ts +4 -2
- package/types/src/index.d.ts.map +1 -1
- package/types/src/main.d.ts +18 -0
- package/types/src/main.d.ts.map +1 -1
- package/types/src/resolvers/valueFromFile.d.ts.map +1 -1
- package/types/src/resolvers/valueFromParam.d.ts +19 -0
- package/types/src/resolvers/valueFromParam.d.ts.map +1 -0
- package/types/src/utils/PromiseTracker.d.ts +4 -0
- package/types/src/utils/PromiseTracker.d.ts.map +1 -1
- package/types/src/utils/variables/variableUtils.d.ts +9 -0
- package/types/src/utils/variables/variableUtils.d.ts.map +1 -1
|
@@ -8,6 +8,8 @@ class PromiseTracker {
|
|
|
8
8
|
reset() {
|
|
9
9
|
this.promiseList = []
|
|
10
10
|
this.promiseMap = {}
|
|
11
|
+
// Track which variables depend on which (for cycle detection)
|
|
12
|
+
this.dependencyGraph = {}
|
|
11
13
|
this.startTime = Date.now()
|
|
12
14
|
this.cursor = 0
|
|
13
15
|
}
|
|
@@ -81,6 +83,58 @@ class PromiseTracker {
|
|
|
81
83
|
promise.waitList += ` ${specifier}`
|
|
82
84
|
return promise
|
|
83
85
|
}
|
|
86
|
+
// Add a dependency edge: "from" depends on "to"
|
|
87
|
+
addDependency(from, to) {
|
|
88
|
+
if (!this.dependencyGraph[from]) {
|
|
89
|
+
this.dependencyGraph[from] = new Set()
|
|
90
|
+
}
|
|
91
|
+
this.dependencyGraph[from].add(to)
|
|
92
|
+
}
|
|
93
|
+
// Check if adding dependency from → to would create a cycle
|
|
94
|
+
wouldCreateCycle(from, to) {
|
|
95
|
+
// Check if "to" can reach "from" (meaning from → to would close a cycle)
|
|
96
|
+
const visited = new Set()
|
|
97
|
+
const stack = [to]
|
|
98
|
+
while (stack.length > 0) {
|
|
99
|
+
const current = stack.pop()
|
|
100
|
+
if (current === from) {
|
|
101
|
+
return true
|
|
102
|
+
}
|
|
103
|
+
if (visited.has(current)) {
|
|
104
|
+
continue
|
|
105
|
+
}
|
|
106
|
+
visited.add(current)
|
|
107
|
+
const deps = this.dependencyGraph[current]
|
|
108
|
+
if (deps) {
|
|
109
|
+
for (const dep of deps) {
|
|
110
|
+
stack.push(dep)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return false
|
|
115
|
+
}
|
|
116
|
+
// Get the cycle path for error reporting
|
|
117
|
+
getCyclePath(from, to) {
|
|
118
|
+
const path = [from, to]
|
|
119
|
+
const visited = new Set([from, to])
|
|
120
|
+
let current = to
|
|
121
|
+
while (current !== from) {
|
|
122
|
+
const deps = this.dependencyGraph[current]
|
|
123
|
+
if (!deps) break
|
|
124
|
+
let found = false
|
|
125
|
+
for (const dep of deps) {
|
|
126
|
+
if (dep === from || !visited.has(dep)) {
|
|
127
|
+
path.push(dep)
|
|
128
|
+
visited.add(dep)
|
|
129
|
+
current = dep
|
|
130
|
+
found = true
|
|
131
|
+
break
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (!found) break
|
|
135
|
+
}
|
|
136
|
+
return path
|
|
137
|
+
}
|
|
84
138
|
getPending() {
|
|
85
139
|
return this.promiseList.filter(p => (p.state === 'pending'))
|
|
86
140
|
}
|
|
@@ -88,8 +88,61 @@ Remove or update the \${${variableString}} to fix
|
|
|
88
88
|
return isRealVariable
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Build default variable syntax regex with dynamic character class
|
|
93
|
+
* Excludes suffix characters from the allowed set to prevent parsing issues
|
|
94
|
+
* @param {string} [prefix='${'] - Variable prefix
|
|
95
|
+
* @param {string} [suffix='}'] - Variable suffix
|
|
96
|
+
* @param {string[]} [excludePatterns=['AWS', 'stageVariables']] - Patterns to exclude via negative lookahead
|
|
97
|
+
* @returns {string} Regex source string
|
|
98
|
+
*/
|
|
99
|
+
function buildVariableSyntax(prefix = '${', suffix = '}', excludePatterns = ['AWS', 'stageVariables']) {
|
|
100
|
+
// All allowed characters, stored as individual escaped entries for regex character class
|
|
101
|
+
// Each entry is how it appears in a regex character class
|
|
102
|
+
// NOTE: { and } are intentionally excluded - they break nested variable matching
|
|
103
|
+
// NOTE: $ is intentionally excluded - it's part of variable prefix and breaks nesting
|
|
104
|
+
const allChars = [
|
|
105
|
+
' ', '~', ':', 'a-z', 'A-Z', '0-9', '=', '+', '!', '@', '#', '%',
|
|
106
|
+
'\\^', '&', ';', '`', '\\*', '<', '>', '\\?', '\\.', '_', "'", '"', ',',
|
|
107
|
+
'\\|', '\\-', '\\/', '\\(', '\\)', '\\[', '\\]', '\\\\'
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
// Map of unescaped char to its escaped form in regex character class
|
|
111
|
+
const charEscapeMap = {
|
|
112
|
+
'^': '\\^', '*': '\\*', '?': '\\?', '.': '\\.', '|': '\\|',
|
|
113
|
+
'-': '\\-', '/': '\\/', '(': '\\(', ')': '\\)', '[': '\\[', ']': '\\]',
|
|
114
|
+
'\\': '\\\\'
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Get unique characters from suffix that need to be excluded
|
|
118
|
+
const suffixChars = [...new Set(suffix.split(''))]
|
|
119
|
+
|
|
120
|
+
// Filter out chars that appear in suffix
|
|
121
|
+
const allowedChars = allChars.filter(charEntry => {
|
|
122
|
+
for (const sc of suffixChars) {
|
|
123
|
+
const escaped = charEscapeMap[sc] || sc
|
|
124
|
+
if (charEntry === escaped || charEntry === sc) {
|
|
125
|
+
return false
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return true
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
// Escape prefix and suffix for regex
|
|
132
|
+
const escapedPrefix = prefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
133
|
+
const escapedSuffix = suffix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
134
|
+
|
|
135
|
+
// Build negative lookahead for excluded patterns
|
|
136
|
+
const lookahead = excludePatterns.length > 0
|
|
137
|
+
? `(?!${excludePatterns.join('|')})`
|
|
138
|
+
: ''
|
|
139
|
+
|
|
140
|
+
return `${escapedPrefix}(${lookahead}[${allowedChars.join('')}]+?)${escapedSuffix}`
|
|
141
|
+
}
|
|
142
|
+
|
|
91
143
|
module.exports = {
|
|
92
144
|
extractVariableWrapper,
|
|
93
145
|
getFallbackString,
|
|
94
|
-
verifyVariable
|
|
146
|
+
verifyVariable,
|
|
147
|
+
buildVariableSyntax
|
|
95
148
|
}
|
|
@@ -150,5 +150,49 @@ test('extractVariableWrapper - strips non-capturing group prefix', () => {
|
|
|
150
150
|
assert.equal(result.suffix, '}')
|
|
151
151
|
})
|
|
152
152
|
|
|
153
|
+
// Tests for buildVariableSyntax
|
|
154
|
+
const { buildVariableSyntax } = require('./variableUtils')
|
|
155
|
+
|
|
156
|
+
test('buildVariableSyntax - default ${} syntax excludes $ {', () => {
|
|
157
|
+
const syntax = buildVariableSyntax('${', '}')
|
|
158
|
+
const regex = new RegExp(syntax, 'g')
|
|
159
|
+
// $ and { in value cause no match (they're not in character class)
|
|
160
|
+
assert.not.ok("${env:FOO, 'test$value'}".match(regex))
|
|
161
|
+
assert.not.ok("${env:FOO, 'test{value'}".match(regex))
|
|
162
|
+
// } causes partial match (ends early at the } in value)
|
|
163
|
+
const partialMatch = "${env:FOO, 'test}value'}".match(regex)
|
|
164
|
+
assert.ok(partialMatch)
|
|
165
|
+
assert.is(partialMatch[0], "${env:FOO, 'test}")
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
test('buildVariableSyntax - supports backslash in values', () => {
|
|
169
|
+
const syntax = buildVariableSyntax('${', '}')
|
|
170
|
+
const regex = new RegExp(syntax, 'g')
|
|
171
|
+
const match = "${env:FOO, 'path\\to\\file'}".match(regex)
|
|
172
|
+
assert.is(match[0], "${env:FOO, 'path\\to\\file'}")
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
test('buildVariableSyntax - double brace ${{}} syntax excludes }', () => {
|
|
176
|
+
const syntax = buildVariableSyntax('${{', '}}')
|
|
177
|
+
const regex = new RegExp(syntax, 'g')
|
|
178
|
+
const match = "${{env:FOO, 'value'}}".match(regex)
|
|
179
|
+
assert.is(match[0], "${{env:FOO, 'value'}}")
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
test('buildVariableSyntax - angle bracket <> syntax excludes >', () => {
|
|
183
|
+
const syntax = buildVariableSyntax('<', '>')
|
|
184
|
+
const regex = new RegExp(syntax, 'g')
|
|
185
|
+
// > in value causes partial match
|
|
186
|
+
const match = "<env:FOO, 'a>b'>".match(regex)
|
|
187
|
+
assert.is(match[0], "<env:FOO, 'a>")
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
test('buildVariableSyntax - bracket [[]] syntax excludes ]', () => {
|
|
191
|
+
const syntax = buildVariableSyntax('[[', ']]')
|
|
192
|
+
const regex = new RegExp(syntax, 'g')
|
|
193
|
+
const match = "[[env:FOO, 'value']]".match(regex)
|
|
194
|
+
assert.is(match[0], "[[env:FOO, 'value']]")
|
|
195
|
+
})
|
|
196
|
+
|
|
153
197
|
// Run all tests
|
|
154
198
|
test.run()
|
package/types/src/index.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ declare namespace _exports {
|
|
|
3
3
|
}
|
|
4
4
|
declare function _exports<T = any>(configPathOrObject: string | any, settings?: ConfigoramaSettings): Promise<T | ConfigoramaResult<T>>;
|
|
5
5
|
declare namespace _exports {
|
|
6
|
-
export { Configorama };
|
|
7
6
|
export function sync<T = any>(configPathOrObject: string | any, settings?: ConfigoramaSettings): T;
|
|
8
7
|
export function analyze(configPathOrObject: string | object, settings?: object): Promise<any>;
|
|
9
8
|
export { parsers as format };
|
|
9
|
+
export { Configorama };
|
|
10
|
+
export { buildVariableSyntax };
|
|
10
11
|
}
|
|
11
12
|
export = _exports;
|
|
12
13
|
type ConfigoramaSettings = {
|
|
@@ -95,6 +96,7 @@ type ConfigoramaResult<T = any> = {
|
|
|
95
96
|
*/
|
|
96
97
|
resolutionHistory: any;
|
|
97
98
|
};
|
|
98
|
-
import Configorama = require("./main");
|
|
99
99
|
import parsers = require("./parsers");
|
|
100
|
+
import Configorama = require("./main");
|
|
101
|
+
import { buildVariableSyntax } from "./utils/variables/variableUtils";
|
|
100
102
|
//# sourceMappingURL=index.d.ts.map
|
package/types/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;
|
|
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"}
|
package/types/src/main.d.ts
CHANGED
|
@@ -27,6 +27,24 @@ declare class Configorama {
|
|
|
27
27
|
deep: any[];
|
|
28
28
|
leaves: any[];
|
|
29
29
|
callCount: number;
|
|
30
|
+
/**
|
|
31
|
+
* Check if unresolved variables of a given type should pass through
|
|
32
|
+
* @param {string} type - The resolver type (e.g., 'param', 'file', 'env')
|
|
33
|
+
* @returns {boolean}
|
|
34
|
+
*/
|
|
35
|
+
isUnresolvedAllowed(type: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Extract type prefix from a variable string
|
|
38
|
+
* @param {string} varString - Variable string like 'ssm:path/to/thing' or 'custom:value'
|
|
39
|
+
* @returns {string|null} The type prefix or null if not found
|
|
40
|
+
*/
|
|
41
|
+
extractTypePrefix(varString: string): string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Check if unknown variable types should pass through
|
|
44
|
+
* @param {string} varString - Variable string like 'ssm:path' or full '${ssm:path}'
|
|
45
|
+
* @returns {boolean}
|
|
46
|
+
*/
|
|
47
|
+
isUnknownTypeAllowed(varString: string): boolean;
|
|
30
48
|
/**
|
|
31
49
|
* Populate all variables in the service, conveniently remove and restore the service attributes
|
|
32
50
|
* that confuse the population methods.
|
package/types/src/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.js"],"names":[],"mappings":";AA0GA;IACE,0CAybC;IAjbC,cAcW;IAuBX,gBAAqB;IAErB,sBAAwB;IACxB,qBAAuB;IAGvB,uBAA4B;IAc5B,uBAAoC;IAIpC,kBAAqC;IACrC,kBAAqC;IAErC,yBAA+F;IAC/F,yBAAuD;IACvD,kCAAyE;IAKvE,YAA0B;IAE1B,oBAA6C;IAE7C,gBAAoD;IAOpD,uBAAkC;IAElC,uBAA8B;IAE9B,uBAAkC;IASpC,wBAAmC;IAGnC,mBA8GC;IAoED,4BAA8C;IAO9C,aA2EC;IAUD,oBAEC;IAGD,eAkDC;IAOD,YAAc;IACd,cAAgB;IAChB,kBAAkB;IAGpB;;;;OAIG;IACH,0BAHW,MAAM,GACJ,OAAO,CAQnB;IAED;;;;OAIG;IACH,6BAHW,MAAM,GACJ,MAAM,GAAC,IAAI,CAOvB;IAED;;;;OAIG;IACH,gCAHW,MAAM,GACJ,OAAO,CAoBnB;IAKD;;;;;OAKG;IACH,oBAFa,OAAO,CAAC,GAAG,CAAC,CAqsBxB;IAlsBC,aAA4B;IAc1B,2BAA4B;IAQ5B,uBAAgD;IA8qBpD;;;OAGG;IACH,2BAFa,MAAM,CA8alB;IAvBC;;;;;;;;;;;;;;;MAoBC;IAIH;;;;OAIG;IACH,uCAFa,OAAO,CAAC,GAAG,CAAC,CAIxB;IACD,+CAsBC;IAKD;;;;;;;;;;;;;;;;;;;OAmBG;IACH;;;;;;;;;;;OAWG;IACH,mFAHa;;;;cAZC,QAAQ;;;;eACR,IAAI,GAAC,MAAM,SAAO;OAWD,CA+D9B;IACD;;;OAGG;IACH;;;;;OAKG;IACH,oCAHa,OAAO,CAAC;;;;cAnFP,QAAQ;;;;eACR,IAAI,GAAC,MAAM,SAAO;OAkFgB,CAAC,EAAE,CA6BlD;IACD;;;;;OAKG;IACH,iDAFa,OAAO,CAAC,IAAI,CAAC,CAWzB;IAID;;;;;OAKG;IACH;;;;OAIG;IACH,2BAFa,eAAc;;;;;;;;;;OAAa,CAavC;IACD;;;;;OAKG;IACH,yBAHW;;;;;;;;;;OAAa,gCACX,cAAS,CAOrB;IACD;;;;;;OAMG;IACH,6DAFa,GAAC,CA+Kb;IAKD;;;;;;;OAOG;IACH,yDAHa,OAAO,CAAC,GAAG,CAAC,CAiCxB;IACD;;;;OAIG;IAOH;;;;;;OAMG;IACH,wFA2BC;IACD;;;;;;;;;;;OAWG;IACH,8BARG;QAAyB,KAAK,EAAtB,GAAG;QACoB,IAAI,GAA3B,MAAM,EAAE;QACa,cAAc,GAAnC,MAAM;QACc,iBAAiB;KAC7C,6CAEU;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,QAAQ;QAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,CAmY9J;IAID;;;;;;;;OAQG;IACH,qEAHa,OAAO,CAAC,GAAG,CAAC,CAoExB;IAKD;;;;;;;OAOG;IACH,0FAFa,OAAO,CAAC,GAAG,CAAC,CA6gBxB;IACD,+EA+BC;IACD,yDAeC;IACD,oEA6BC;IAKD,8CAQC;IACD,kDAyBC;IACD;;;;;;;;;;;;;OAaG;IACH,wEAoDC;IAKD,4BAOC;IACD,sCAoDC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAfG;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;CACd,kBAAQ,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAfG;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;CACd,kBAAQ,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAoTxB;AA9VD;;;;;GAKG;AACH,2CAJW,MAAM,YACN,MAAM,GACJ,GAAC,CAoBb;AAwUD;;;;;;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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const paramRefSyntax: RegExp;
|
|
2
|
+
/**
|
|
3
|
+
* Resolves parameter values following the Serverless Framework parameter resolution hierarchy:
|
|
4
|
+
* 1. CLI params (--param="key=value")
|
|
5
|
+
* 2. Stage-specific params (stages.<stage>.params)
|
|
6
|
+
* 3. Default params (stages.default.params)
|
|
7
|
+
*
|
|
8
|
+
* @param {string} variableString - The variable string (e.g., "param:domain")
|
|
9
|
+
* @param {Object} options - CLI options that may contain params
|
|
10
|
+
* @param {Object} config - The full config object for stage-specific params
|
|
11
|
+
* @returns {Promise<any>} The resolved parameter value
|
|
12
|
+
*/
|
|
13
|
+
declare function getValueFromParam(variableString: string, options?: any, config?: any): Promise<any>;
|
|
14
|
+
export declare let type: string;
|
|
15
|
+
export declare let source: string;
|
|
16
|
+
export declare let syntax: string;
|
|
17
|
+
export declare let description: string;
|
|
18
|
+
export { paramRefSyntax as match, getValueFromParam as resolver };
|
|
19
|
+
//# sourceMappingURL=valueFromParam.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueFromParam.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromParam.js"],"names":[],"mappings":"AACA,qCAAyC;AAEzC;;;;;;;;;;GAUG;AACH,mDALW,MAAM,gCAGJ,OAAO,CAAC,GAAG,CAAC,CAqExB"}
|
|
@@ -3,6 +3,7 @@ declare class PromiseTracker {
|
|
|
3
3
|
reset(): void;
|
|
4
4
|
promiseList: any[];
|
|
5
5
|
promiseMap: {};
|
|
6
|
+
dependencyGraph: {};
|
|
6
7
|
startTime: number;
|
|
7
8
|
cursor: number;
|
|
8
9
|
start(): void;
|
|
@@ -12,6 +13,9 @@ declare class PromiseTracker {
|
|
|
12
13
|
add(variable: any, promise: any, specifier: any, hasFilter: any, promiseKey: any): any;
|
|
13
14
|
contains(variable: any): boolean;
|
|
14
15
|
get(variable: any, specifier: any): any;
|
|
16
|
+
addDependency(from: any, to: any): void;
|
|
17
|
+
wouldCreateCycle(from: any, to: any): boolean;
|
|
18
|
+
getCyclePath(from: any, to: any): any[];
|
|
15
19
|
getPending(): any[];
|
|
16
20
|
getSettled(): any[];
|
|
17
21
|
getAll(): any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromiseTracker.d.ts","sourceRoot":"","sources":["../../../src/utils/PromiseTracker.js"],"names":[],"mappings":";AAGA;IAIE,
|
|
1
|
+
{"version":3,"file":"PromiseTracker.d.ts","sourceRoot":"","sources":["../../../src/utils/PromiseTracker.js"],"names":[],"mappings":";AAGA;IAIE,cAOC;IANC,mBAAqB;IACrB,eAAoB;IAEpB,oBAAyB;IACzB,kBAA2B;IAC3B,eAAe;IAEjB,cAGC;IADC,yBAAyD;IAE3D,eAqBC;IACD,aAGC;IACD,uFA+BC;IACD,iCAEC;IACD,wCAIC;IAED,wCAKC;IAED,8CAqBC;IAED,wCAoBC;IACD,oBAEC;IACD,oBAEC;IACD,gBAEC;CACF"}
|
|
@@ -18,4 +18,13 @@ export function getFallbackString(split: string[], nestedVar: string): string;
|
|
|
18
18
|
* Verify if variable string is valid
|
|
19
19
|
*/
|
|
20
20
|
export function verifyVariable(variableString: any, valueObject: any, variableTypes: any, config: any): any;
|
|
21
|
+
/**
|
|
22
|
+
* Build default variable syntax regex with dynamic character class
|
|
23
|
+
* Excludes suffix characters from the allowed set to prevent parsing issues
|
|
24
|
+
* @param {string} [prefix='${'] - Variable prefix
|
|
25
|
+
* @param {string} [suffix='}'] - Variable suffix
|
|
26
|
+
* @param {string[]} [excludePatterns=['AWS', 'stageVariables']] - Patterns to exclude via negative lookahead
|
|
27
|
+
* @returns {string} Regex source string
|
|
28
|
+
*/
|
|
29
|
+
export function buildVariableSyntax(prefix?: string, suffix?: string, excludePatterns?: string[]): string;
|
|
21
30
|
//# sourceMappingURL=variableUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variableUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/variables/variableUtils.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qDAHW,MAAM,GACJ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAqC9C;AAED;;;;;GAKG;AACH,yCAJW,MAAM,EAAE,aACR,MAAM,GACJ,MAAM,CAelB;AAED;;GAEG;AACH,4GAsBC"}
|
|
1
|
+
{"version":3,"file":"variableUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/variables/variableUtils.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qDAHW,MAAM,GACJ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAqC9C;AAED;;;;;GAKG;AACH,yCAJW,MAAM,EAAE,aACR,MAAM,GACJ,MAAM,CAelB;AAED;;GAEG;AACH,4GAsBC;AAED;;;;;;;GAOG;AACH,6CALW,MAAM,WACN,MAAM,oBACN,MAAM,EAAE,GACN,MAAM,CA4ClB"}
|