@jjrawlins/cdk-diff-pr-github-action 1.9.8 → 1.9.9
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/.jsii +3 -3
- package/cdkdiffprgithubaction/jsii/jsii.go +2 -2
- package/cdkdiffprgithubaction/version +1 -1
- package/lib/CdkDiffIamTemplate.js +2 -2
- package/lib/CdkDiffIamTemplateStackSet.js +2 -2
- package/lib/CdkDiffStackWorkflow.js +1 -1
- package/lib/CdkDriftDetectionWorkflow.js +1 -1
- package/lib/CdkDriftIamTemplate.js +2 -2
- package/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +2 -2
- package/node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js +2 -2
- package/node_modules/@aws/lambda-invoke-store/dist-types/invoke-store.d.ts +1 -1
- package/node_modules/@aws/lambda-invoke-store/package.json +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-login/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +75 -19
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js +15 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js +14 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +53 -7
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/{getTypeScriptPackageJsonPaths.d.ts → getNodeModulesParentDirs.d.ts} +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedDevTypeScriptVersion.d.ts +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getNodeModulesParentDirs.d.ts +1 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedDevTypeScriptVersion.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -1
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +1 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +11 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +41 -4
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +30 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/endpoints.d.ts +7 -0
- package/node_modules/@smithy/core/endpoints.js +6 -0
- package/node_modules/@smithy/core/package.json +16 -7
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +17 -1
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +9 -0
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +8 -1
- package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +9 -12
- package/node_modules/@smithy/middleware-retry/dist-es/configurations.js +9 -12
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +3 -2
- package/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +3 -2
- package/node_modules/@smithy/middleware-serde/package.json +4 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +4 -1
- package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +4 -1
- package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/http.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +1 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/fast-xml-builder/CHANGELOG.md +13 -0
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +7 -8
- package/node_modules/fast-xml-builder/package.json +2 -2
- package/node_modules/fast-xml-builder/src/fxb.d.ts +11 -3
- package/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
- package/node_modules/path-expression-matcher/lib/pem.d.cts +335 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
- package/node_modules/path-expression-matcher/package.json +32 -6
- package/node_modules/path-expression-matcher/src/index.d.ts +366 -0
- package/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +0 -17
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +0 -3
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript definitions for path-expression-matcher
|
|
3
|
+
*
|
|
4
|
+
* Provides efficient path tracking and pattern matching for XML/JSON parsers.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Options for creating an Expression
|
|
9
|
+
*/
|
|
10
|
+
export interface ExpressionOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Path separator character
|
|
13
|
+
* @default '.'
|
|
14
|
+
*/
|
|
15
|
+
separator?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Parsed segment from an expression pattern
|
|
20
|
+
*/
|
|
21
|
+
export interface Segment {
|
|
22
|
+
/**
|
|
23
|
+
* Type of segment
|
|
24
|
+
*/
|
|
25
|
+
type: 'tag' | 'deep-wildcard';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Tag name (e.g., "user", "*" for wildcard)
|
|
29
|
+
* Only present when type is 'tag'
|
|
30
|
+
*/
|
|
31
|
+
tag?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Namespace prefix (e.g., "ns" in "ns::user")
|
|
35
|
+
* Only present when namespace is specified
|
|
36
|
+
*/
|
|
37
|
+
namespace?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Attribute name to match (e.g., "id" in "user[id]")
|
|
41
|
+
* Only present when attribute condition exists
|
|
42
|
+
*/
|
|
43
|
+
attrName?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Attribute value to match (e.g., "123" in "user[id=123]")
|
|
47
|
+
* Only present when attribute value is specified
|
|
48
|
+
*/
|
|
49
|
+
attrValue?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Position selector type
|
|
53
|
+
* Only present when position selector exists
|
|
54
|
+
*/
|
|
55
|
+
position?: 'first' | 'last' | 'odd' | 'even' | 'nth';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Numeric value for nth() selector
|
|
59
|
+
* Only present when position is 'nth'
|
|
60
|
+
*/
|
|
61
|
+
positionValue?: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Expression - Parses and stores a tag pattern expression
|
|
66
|
+
*
|
|
67
|
+
* Patterns are parsed once and stored in an optimized structure for fast matching.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const expr = new Expression("root.users.user");
|
|
72
|
+
* const expr2 = new Expression("..user[id]:first");
|
|
73
|
+
* const expr3 = new Expression("root/users/user", { separator: '/' });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* Pattern Syntax:
|
|
77
|
+
* - `root.users.user` - Match exact path
|
|
78
|
+
* - `..user` - Match "user" at any depth (deep wildcard)
|
|
79
|
+
* - `user[id]` - Match user tag with "id" attribute
|
|
80
|
+
* - `user[id=123]` - Match user tag where id="123"
|
|
81
|
+
* - `user:first` - Match first occurrence of user tag
|
|
82
|
+
* - `ns::user` - Match user tag with namespace "ns"
|
|
83
|
+
* - `ns::user[id]:first` - Combine namespace, attribute, and position
|
|
84
|
+
*/
|
|
85
|
+
export class Expression {
|
|
86
|
+
/**
|
|
87
|
+
* Original pattern string
|
|
88
|
+
*/
|
|
89
|
+
readonly pattern: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Path separator character
|
|
93
|
+
*/
|
|
94
|
+
readonly separator: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Parsed segments
|
|
98
|
+
*/
|
|
99
|
+
readonly segments: Segment[];
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Create a new Expression
|
|
103
|
+
* @param pattern - Pattern string (e.g., "root.users.user", "..user[id]")
|
|
104
|
+
* @param options - Configuration options
|
|
105
|
+
*/
|
|
106
|
+
constructor(pattern: string, options?: ExpressionOptions);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Get the number of segments
|
|
110
|
+
*/
|
|
111
|
+
get length(): number;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Check if expression contains deep wildcard (..)
|
|
115
|
+
*/
|
|
116
|
+
hasDeepWildcard(): boolean;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Check if expression has attribute conditions
|
|
120
|
+
*/
|
|
121
|
+
hasAttributeCondition(): boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Check if expression has position selectors
|
|
125
|
+
*/
|
|
126
|
+
hasPositionSelector(): boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Get string representation
|
|
130
|
+
*/
|
|
131
|
+
toString(): string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Options for creating a Matcher
|
|
136
|
+
*/
|
|
137
|
+
export interface MatcherOptions {
|
|
138
|
+
/**
|
|
139
|
+
* Default path separator
|
|
140
|
+
* @default '.'
|
|
141
|
+
*/
|
|
142
|
+
separator?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Internal node structure in the path stack
|
|
147
|
+
*/
|
|
148
|
+
export interface PathNode {
|
|
149
|
+
/**
|
|
150
|
+
* Tag name
|
|
151
|
+
*/
|
|
152
|
+
tag: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Namespace (if present)
|
|
156
|
+
*/
|
|
157
|
+
namespace?: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Position in sibling list (child index in parent)
|
|
161
|
+
*/
|
|
162
|
+
position: number;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Counter (occurrence count of this tag name)
|
|
166
|
+
*/
|
|
167
|
+
counter: number;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Attribute key-value pairs
|
|
171
|
+
* Only present for the current (last) node in path
|
|
172
|
+
*/
|
|
173
|
+
values?: Record<string, any>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Snapshot of matcher state
|
|
178
|
+
*/
|
|
179
|
+
export interface MatcherSnapshot {
|
|
180
|
+
/**
|
|
181
|
+
* Copy of the path stack
|
|
182
|
+
*/
|
|
183
|
+
path: PathNode[];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Copy of sibling tracking maps
|
|
187
|
+
*/
|
|
188
|
+
siblingStacks: Map<string, number>[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Matcher - Tracks current path in XML/JSON tree and matches against Expressions
|
|
193
|
+
*
|
|
194
|
+
* The matcher maintains a stack of nodes representing the current path from root to
|
|
195
|
+
* current tag. It only stores attribute values for the current (top) node to minimize
|
|
196
|
+
* memory usage.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* const matcher = new Matcher();
|
|
201
|
+
* matcher.push("root", {});
|
|
202
|
+
* matcher.push("users", {});
|
|
203
|
+
* matcher.push("user", { id: "123", type: "admin" });
|
|
204
|
+
*
|
|
205
|
+
* const expr = new Expression("root.users.user");
|
|
206
|
+
* matcher.matches(expr); // true
|
|
207
|
+
*
|
|
208
|
+
* matcher.pop();
|
|
209
|
+
* matcher.matches(expr); // false
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
export class Matcher {
|
|
213
|
+
/**
|
|
214
|
+
* Default path separator
|
|
215
|
+
*/
|
|
216
|
+
readonly separator: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Current path stack
|
|
220
|
+
*/
|
|
221
|
+
readonly path: PathNode[];
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Create a new Matcher
|
|
225
|
+
* @param options - Configuration options
|
|
226
|
+
*/
|
|
227
|
+
constructor(options?: MatcherOptions);
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Push a new tag onto the path
|
|
231
|
+
* @param tagName - Name of the tag
|
|
232
|
+
* @param attrValues - Attribute key-value pairs for current node (optional)
|
|
233
|
+
* @param namespace - Namespace for the tag (optional)
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```typescript
|
|
237
|
+
* matcher.push("user", { id: "123", type: "admin" });
|
|
238
|
+
* matcher.push("user", { id: "456" }, "ns");
|
|
239
|
+
* matcher.push("container", null);
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
push(tagName: string, attrValues?: Record<string, any> | null, namespace?: string | null): void;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Pop the last tag from the path
|
|
246
|
+
* @returns The popped node or undefined if path is empty
|
|
247
|
+
*/
|
|
248
|
+
pop(): PathNode | undefined;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Update current node's attribute values
|
|
252
|
+
* Useful when attributes are parsed after push
|
|
253
|
+
* @param attrValues - Attribute values
|
|
254
|
+
*/
|
|
255
|
+
updateCurrent(attrValues: Record<string, any>): void;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Get current tag name
|
|
259
|
+
* @returns Current tag name or undefined if path is empty
|
|
260
|
+
*/
|
|
261
|
+
getCurrentTag(): string | undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Get current namespace
|
|
265
|
+
* @returns Current namespace or undefined if not present or path is empty
|
|
266
|
+
*/
|
|
267
|
+
getCurrentNamespace(): string | undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Get current node's attribute value
|
|
271
|
+
* @param attrName - Attribute name
|
|
272
|
+
* @returns Attribute value or undefined
|
|
273
|
+
*/
|
|
274
|
+
getAttrValue(attrName: string): any;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Check if current node has an attribute
|
|
278
|
+
* @param attrName - Attribute name
|
|
279
|
+
*/
|
|
280
|
+
hasAttr(attrName: string): boolean;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Get current node's sibling position (child index in parent)
|
|
284
|
+
* @returns Position index or -1 if path is empty
|
|
285
|
+
*/
|
|
286
|
+
getPosition(): number;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Get current node's repeat counter (occurrence count of this tag name)
|
|
290
|
+
* @returns Counter value or -1 if path is empty
|
|
291
|
+
*/
|
|
292
|
+
getCounter(): number;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Get current node's sibling index (alias for getPosition for backward compatibility)
|
|
296
|
+
* @returns Index or -1 if path is empty
|
|
297
|
+
* @deprecated Use getPosition() or getCounter() instead
|
|
298
|
+
*/
|
|
299
|
+
getIndex(): number;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Get current path depth
|
|
303
|
+
* @returns Number of nodes in the path
|
|
304
|
+
*/
|
|
305
|
+
getDepth(): number;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Get path as string
|
|
309
|
+
* @param separator - Optional separator (uses default if not provided)
|
|
310
|
+
* @param includeNamespace - Whether to include namespace in output
|
|
311
|
+
* @returns Path string (e.g., "root.users.user" or "ns:root.ns:users.user")
|
|
312
|
+
*/
|
|
313
|
+
toString(separator?: string, includeNamespace?: boolean): string;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Get path as array of tag names
|
|
317
|
+
* @returns Array of tag names
|
|
318
|
+
*/
|
|
319
|
+
toArray(): string[];
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Reset the path to empty
|
|
323
|
+
*/
|
|
324
|
+
reset(): void;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Match current path against an Expression
|
|
328
|
+
* @param expression - The expression to match against
|
|
329
|
+
* @returns True if current path matches the expression
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* const expr = new Expression("root.users.user[id]");
|
|
334
|
+
* const matcher = new Matcher();
|
|
335
|
+
*
|
|
336
|
+
* matcher.push("root");
|
|
337
|
+
* matcher.push("users");
|
|
338
|
+
* matcher.push("user", { id: "123" });
|
|
339
|
+
*
|
|
340
|
+
* matcher.matches(expr); // true
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
matches(expression: Expression): boolean;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Create a snapshot of current state
|
|
347
|
+
* @returns State snapshot that can be restored later
|
|
348
|
+
*/
|
|
349
|
+
snapshot(): MatcherSnapshot;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Restore state from snapshot
|
|
353
|
+
* @param snapshot - State snapshot from previous snapshot() call
|
|
354
|
+
*/
|
|
355
|
+
restore(snapshot: MatcherSnapshot): void;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Default export containing both Expression and Matcher
|
|
360
|
+
*/
|
|
361
|
+
declare const _default: {
|
|
362
|
+
Expression: typeof Expression;
|
|
363
|
+
Matcher: typeof Matcher;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"constructs": ">=10.0.5 <11.0.0"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
72
|
+
"@aws-sdk/client-cloudformation": "^3.1008.0",
|
|
73
73
|
"@types/crypto-js": "^4.2.2",
|
|
74
74
|
"@types/js-yaml": "^4.0.9",
|
|
75
75
|
"crypto-js": "^4.2.0",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"publishConfig": {
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
|
-
"version": "1.9.
|
|
113
|
+
"version": "1.9.9",
|
|
114
114
|
"jest": {
|
|
115
115
|
"coverageProvider": "v8",
|
|
116
116
|
"testMatch": [
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { join, normalize, sep } from "node:path";
|
|
2
|
-
const typescriptPackageJsonPath = join("node_modules", "typescript", "package.json");
|
|
3
|
-
export const getTypeScriptPackageJsonPaths = (dirname) => {
|
|
4
|
-
const cwdPath = join(process.cwd(), typescriptPackageJsonPath);
|
|
5
|
-
if (!dirname) {
|
|
6
|
-
return [cwdPath];
|
|
7
|
-
}
|
|
8
|
-
const normalizedPath = normalize(dirname);
|
|
9
|
-
const parts = normalizedPath.split(sep);
|
|
10
|
-
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
11
|
-
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep) : dirname;
|
|
12
|
-
const parentDirPath = join(parentDir, typescriptPackageJsonPath);
|
|
13
|
-
if (cwdPath === parentDirPath) {
|
|
14
|
-
return [cwdPath];
|
|
15
|
-
}
|
|
16
|
-
return [parentDirPath, cwdPath];
|
|
17
|
-
};
|