@cdk8s/awscdk-resolver 0.0.609 → 0.0.610

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 (145) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
  4. package/node_modules/@aws-sdk/core/package.json +2 -2
  5. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  6. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  7. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  8. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  9. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  10. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  11. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  12. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  13. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  14. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  15. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  16. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  17. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  18. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  19. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  20. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +1 -1
  21. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +233 -43
  22. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +1 -1
  23. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +233 -43
  24. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.d.ts +1 -1
  25. package/node_modules/@aws-sdk/xml-builder/dist-types/xml-parser.d.ts +2 -1
  26. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  27. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +518 -371
  28. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1 -1
  29. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +326 -269
  30. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +192 -103
  31. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js +4 -2
  32. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +1 -1
  33. package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-decode.d.ts +4 -0
  34. package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-encode.d.ts +8 -4
  35. package/node_modules/@smithy/core/package.json +1 -1
  36. package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
  37. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  38. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  39. package/node_modules/@smithy/signature-v4/package.json +2 -2
  40. package/package.json +6 -6
  41. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +0 -333
  42. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +0 -332
  43. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-external/nodable_entities.d.ts +0 -66
  44. package/node_modules/@aws-sdk/xml-builder/dist-types/xml-external/nodable_entities.d.ts +0 -65
  45. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +0 -827
  46. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/LICENSE +0 -21
  47. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +0 -202
  48. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +0 -2
  49. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
  50. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
  51. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +0 -770
  52. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
  53. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
  54. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
  55. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
  56. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
  57. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
  58. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +0 -93
  59. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/cli.js +0 -97
  60. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/man.js +0 -17
  61. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/read.js +0 -43
  62. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +0 -739
  63. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +0 -14
  64. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/ignoreAttributes.js +0 -18
  65. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +0 -61
  66. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +0 -16
  67. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
  68. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +0 -61
  69. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +0 -69
  70. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +0 -103
  71. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -100
  72. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +0 -154
  73. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +0 -94
  74. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  75. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPath.js +0 -81
  76. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +0 -13
  77. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +0 -83
  78. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +0 -235
  79. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +0 -210
  80. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +0 -111
  81. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +0 -116
  82. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +0 -121
  83. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
  84. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +0 -22
  85. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +0 -19
  86. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +0 -38
  87. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +0 -13
  88. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +0 -14
  89. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +0 -6
  90. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +0 -425
  91. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +0 -6
  92. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +0 -407
  93. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +0 -163
  94. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +0 -840
  95. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +0 -71
  96. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +0 -177
  97. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +0 -40
  98. package/node_modules/@nodable/entities/README.md +0 -41
  99. package/node_modules/@nodable/entities/package.json +0 -57
  100. package/node_modules/@nodable/entities/src/EntityDecoder.js +0 -644
  101. package/node_modules/@nodable/entities/src/EntityEncoder.js +0 -194
  102. package/node_modules/@nodable/entities/src/entities.js +0 -1159
  103. package/node_modules/@nodable/entities/src/entityTries.js +0 -49
  104. package/node_modules/@nodable/entities/src/index.d.ts +0 -341
  105. package/node_modules/@nodable/entities/src/index.js +0 -29
  106. package/node_modules/anynum/LICENSE +0 -21
  107. package/node_modules/anynum/README.md +0 -142
  108. package/node_modules/anynum/anynum.js +0 -135
  109. package/node_modules/anynum/digitTable.js +0 -116
  110. package/node_modules/anynum/package.json +0 -42
  111. package/node_modules/fast-xml-builder/CHANGELOG.md +0 -40
  112. package/node_modules/fast-xml-builder/LICENSE +0 -21
  113. package/node_modules/fast-xml-builder/README.md +0 -74
  114. package/node_modules/fast-xml-builder/lib/fxb.cjs +0 -1
  115. package/node_modules/fast-xml-builder/lib/fxb.d.cts +0 -270
  116. package/node_modules/fast-xml-builder/lib/fxb.min.js +0 -2
  117. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +0 -1
  118. package/node_modules/fast-xml-builder/package.json +0 -81
  119. package/node_modules/fast-xml-builder/src/fxb.d.ts +0 -270
  120. package/node_modules/fast-xml-builder/src/fxb.js +0 -599
  121. package/node_modules/fast-xml-builder/src/ignoreAttributes.js +0 -18
  122. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +0 -359
  123. package/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
  124. package/node_modules/fast-xml-builder/src/util.js +0 -16
  125. package/node_modules/path-expression-matcher/LICENSE +0 -21
  126. package/node_modules/path-expression-matcher/README.md +0 -947
  127. package/node_modules/path-expression-matcher/lib/pem.cjs +0 -1
  128. package/node_modules/path-expression-matcher/lib/pem.d.cts +0 -715
  129. package/node_modules/path-expression-matcher/lib/pem.min.js +0 -2
  130. package/node_modules/path-expression-matcher/lib/pem.min.js.map +0 -1
  131. package/node_modules/path-expression-matcher/package.json +0 -79
  132. package/node_modules/path-expression-matcher/src/Expression.js +0 -232
  133. package/node_modules/path-expression-matcher/src/ExpressionSet.js +0 -225
  134. package/node_modules/path-expression-matcher/src/Matcher.js +0 -660
  135. package/node_modules/path-expression-matcher/src/index.d.ts +0 -589
  136. package/node_modules/path-expression-matcher/src/index.js +0 -29
  137. package/node_modules/strnum/CHANGELOG.md +0 -51
  138. package/node_modules/strnum/LICENSE +0 -21
  139. package/node_modules/strnum/README.md +0 -113
  140. package/node_modules/strnum/package.json +0 -36
  141. package/node_modules/strnum/strnum.js +0 -171
  142. package/node_modules/xml-naming/README.md +0 -189
  143. package/node_modules/xml-naming/package.json +0 -54
  144. package/node_modules/xml-naming/src/index.d.ts +0 -74
  145. package/node_modules/xml-naming/src/index.js +0 -270
@@ -1,81 +0,0 @@
1
- {
2
- "name": "fast-xml-builder",
3
- "version": "1.2.0",
4
- "description": "Build XML from JSON without C/C++ based libraries",
5
- "main": "./lib/fxb.cjs",
6
- "type": "module",
7
- "sideEffects": false,
8
- "module": "./src/fxb.js",
9
- "types": "./src/fxb.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": {
13
- "types": "./src/fxb.d.ts",
14
- "default": "./src/fxb.js"
15
- },
16
- "require": {
17
- "types": "./lib/fxb.d.cts",
18
- "default": "./lib/fxb.cjs"
19
- }
20
- }
21
- },
22
- "scripts": {
23
- "test": "c8 --reporter=lcov --reporter=text jasmine spec/*spec.js",
24
- "test-types": "tsc --noEmit spec/typings/typings-test.ts",
25
- "unit": "jasmine",
26
- "lint": "eslint src/**/*.js spec/**/*.js benchmark/**/*.js",
27
- "bundle": "webpack --config webpack.cjs.config.js",
28
- "prettier": "prettier --write src/**/*.js",
29
- "checkReadiness": "publish-please --dry-run",
30
- "publish-please": "publish-please",
31
- "prepublishOnly": "publish-please guard"
32
- },
33
- "files": [
34
- "lib",
35
- "src",
36
- "CHANGELOG.md"
37
- ],
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/NaturalIntelligence/fast-xml-builder.git"
41
- },
42
- "keywords": [
43
- "xml",
44
- "json",
45
- "fast",
46
- "builder",
47
- "parser",
48
- "js2xml",
49
- "json2xml"
50
- ],
51
- "author": "Amit Gupta (https://solothought.com)",
52
- "license": "MIT",
53
- "devDependencies": {
54
- "@babel/core": "^7.13.10",
55
- "@babel/plugin-transform-runtime": "^7.13.10",
56
- "@babel/preset-env": "^7.13.10",
57
- "@babel/register": "^7.13.8",
58
- "@types/node": "20",
59
- "babel-loader": "^8.2.2",
60
- "c8": "^10.1.3",
61
- "eslint": "^8.3.0",
62
- "fast-xml-parser": "^5.3.9",
63
- "he": "^1.2.0",
64
- "jasmine": "^5.6.0",
65
- "prettier": "^3.5.1",
66
- "publish-please": "^5.5.2",
67
- "typescript": "5",
68
- "webpack": "^5.64.4",
69
- "webpack-cli": "^4.9.1"
70
- },
71
- "funding": [
72
- {
73
- "type": "github",
74
- "url": "https://github.com/sponsors/NaturalIntelligence"
75
- }
76
- ],
77
- "dependencies": {
78
- "path-expression-matcher": "^1.5.0",
79
- "xml-naming": "^0.1.0"
80
- }
81
- }
@@ -1,270 +0,0 @@
1
- // import { Expression, Matcher } from 'path-expression-matcher';
2
-
3
- //type Matcher = unknown;
4
- type Expression = unknown;
5
-
6
- /**
7
- * A lightweight, live read-only view of a Matcher instance.
8
- *
9
- * Returned by `Matcher.readOnly()`. The same instance is reused across every
10
- * callback invocation — no allocation overhead per call. Reads directly from
11
- * the parent Matcher's internal state so it always reflects the current parser
12
- * position with no copying or freezing.
13
- */
14
- export class MatcherView {
15
- readonly separator: string;
16
-
17
- /** Check if current path matches an Expression. */
18
- matches(expression: Expression): boolean;
19
-
20
- /** Get current tag name, or `undefined` if path is empty. */
21
- getCurrentTag(): string | undefined;
22
-
23
- /** Get current namespace, or `undefined` if not present. */
24
- getCurrentNamespace(): string | undefined;
25
-
26
- /** Get attribute value of the current node. */
27
- getAttrValue(attrName: string): any;
28
-
29
- /** Check if the current node has a given attribute. */
30
- hasAttr(attrName: string): boolean;
31
-
32
- /** Sibling position of the current node (child index in parent). */
33
- getPosition(): number;
34
-
35
- /** Occurrence counter of the current tag name at this level. */
36
- getCounter(): number;
37
-
38
- /** Number of nodes in the current path. */
39
- getDepth(): number;
40
-
41
- /** Current path as a string (e.g. `"root.users.user"`). */
42
- toString(separator?: string, includeNamespace?: boolean): string;
43
-
44
- /** Current path as an array of tag names. */
45
- toArray(): string[];
46
- }
47
-
48
- export type XmlBuilderOptions = {
49
- /**
50
- * Give a prefix to the attribute name in the resulting JS object
51
- *
52
- * Defaults to '@_'
53
- */
54
- attributeNamePrefix?: string;
55
-
56
- /**
57
- * A name to group all attributes of a tag under, or `false` to disable
58
- *
59
- * Defaults to `false`
60
- */
61
- attributesGroupName?: false | string;
62
-
63
- /**
64
- * The name of the next node in the resulting JS
65
- *
66
- * Defaults to `#text`
67
- */
68
- textNodeName?: string;
69
-
70
- /**
71
- * Whether to ignore attributes when building
72
- *
73
- * When `true` - ignores all the attributes
74
- *
75
- * When `false` - builds all the attributes
76
- *
77
- * When `Array<string | RegExp>` - filters out attributes that match provided patterns
78
- *
79
- * When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
80
- *
81
- * Defaults to `true`
82
- */
83
- ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
84
-
85
- /**
86
- * Give a property name to set CDATA values to instead of merging to tag's text value
87
- *
88
- * Defaults to `false`
89
- */
90
- cdataPropName?: false | string;
91
-
92
- /**
93
- * If set, parse comments and set as this property
94
- *
95
- * Defaults to `false`
96
- */
97
- commentPropName?: false | string;
98
-
99
- /**
100
- * Whether to make output pretty instead of single line
101
- *
102
- * Defaults to `false`
103
- */
104
- format?: boolean;
105
-
106
-
107
- /**
108
- * If `format` is set to `true`, sets the indent string
109
- *
110
- * Defaults to ` `
111
- */
112
- indentBy?: string;
113
-
114
- /**
115
- * Give a name to a top-level array
116
- *
117
- * Defaults to `undefined`
118
- */
119
- arrayNodeName?: string;
120
-
121
- /**
122
- * Create empty tags for tags with no text value
123
- *
124
- * Defaults to `false`
125
- */
126
- suppressEmptyNode?: boolean;
127
-
128
- /**
129
- * Suppress an unpaired tag
130
- *
131
- * Defaults to `true`
132
- */
133
- suppressUnpairedNode?: boolean;
134
-
135
- /**
136
- * Don't put a value for boolean attributes
137
- *
138
- * Defaults to `true`
139
- */
140
- suppressBooleanAttributes?: boolean;
141
-
142
- /**
143
- * Preserve the order of tags in resulting JS object
144
- *
145
- * Defaults to `false`
146
- */
147
- preserveOrder?: boolean;
148
-
149
- /**
150
- * List of tags without closing tags
151
- *
152
- * Defaults to `[]`
153
- */
154
- unpairedTags?: string[];
155
-
156
- /**
157
- * Nodes to stop parsing at
158
- *
159
- * Accepts string patterns or Expression objects from path-expression-matcher
160
- *
161
- * String patterns starting with "*." are automatically converted to ".." for backward compatibility
162
- *
163
- * Defaults to `[]`
164
- */
165
- stopNodes?: (string | Expression)[];
166
-
167
- /**
168
- * Control how tag value should be parsed. Called only if tag value is not empty
169
- *
170
- * @returns {undefined|null} `undefined` or `null` to set original value.
171
- * @returns {unknown}
172
- *
173
- * 1. Different value or value with different data type to set new value.
174
- * 2. Same value to set parsed value if `parseTagValue: true`.
175
- *
176
- * Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
177
- */
178
- tagValueProcessor?: (name: string, value: unknown) => unknown;
179
-
180
- /**
181
- * Control how attribute value should be parsed
182
- *
183
- * @param attrName
184
- * @param attrValue
185
- * @param jPath
186
- * @returns {undefined|null} `undefined` or `null` to set original value
187
- * @returns {unknown}
188
- *
189
- * Defaults to `(attrName, val, jPath) => val`
190
- */
191
- attributeValueProcessor?: (name: string, value: unknown) => unknown;
192
-
193
- /**
194
- * Whether to process default and DOCTYPE entities
195
- *
196
- * Defaults to `true`
197
- */
198
- processEntities?: boolean;
199
-
200
-
201
- oneListGroup?: boolean;
202
-
203
- /**
204
- * Maximum number of nested tags
205
- *
206
- * Defaults to `100`
207
- */
208
- maxNestedTags?: number;
209
-
210
- /**
211
- * Validate or sanitize tag and attribute names before they are written to XML output.
212
- *
213
- * The context object provides:
214
- * - `isAttribute` — `true` when the name being resolved is an attribute name,
215
- * `false` when it is a tag name.
216
- * - `matcher` — the current path matcher (readonly). Can be used to inspect the
217
- * current element path, e.g. via `.toString()` or `.getDepth()`.
218
- *
219
- * Return the (possibly transformed) name to use in the output.
220
- * Throw an error inside the function to reject an invalid name entirely.
221
- *
222
- * When set to `false` (default) all names are written as-is, preserving
223
- * backward-compatible behaviour.
224
- *
225
- * @example
226
- * // Auto-fix invalid names using xml-naming
227
- * import { sanitize } from 'xml-naming';
228
- * { sanitizeName: (name) => sanitize(name, 'qName') }
229
- *
230
- * @example
231
- * // Reject invalid names
232
- * import { qName } from 'xml-naming';
233
- * { sanitizeName: (name) => { if (!qName(name)) throw new Error(`Invalid XML name: "${name}"`); return name; } }
234
- *
235
- * Defaults to `false`
236
- */
237
- sanitizeName?: false | ((name: string, context: SanitizeNameContext) => string);
238
- };
239
-
240
- /**
241
- * Context object passed as the second argument to {@link XmlBuilderOptions.sanitizeName}.
242
- */
243
- export type SanitizeNameContext = {
244
- /**
245
- * `true` when the name being resolved is an XML attribute name;
246
- * `false` when it is an XML element (tag) name.
247
- */
248
- isAttribute: boolean;
249
-
250
- /**
251
- * The current path matcher at the point where the name is being resolved.
252
- * Readonly from the callback's perspective — do not call mutating methods.
253
- * Use `.toString()` to get the current jPath string, `.getDepth()` for nesting depth.
254
- */
255
- matcher: MatcherView;
256
- };
257
-
258
- export interface XMLBuilder {
259
- build(jObj: any): string;
260
- }
261
-
262
- export interface XMLBuilderConstructor {
263
- new(options?: XmlBuilderOptions): XMLBuilder;
264
- (options?: XmlBuilderOptions): XMLBuilder;
265
- }
266
-
267
- declare const Builder: XMLBuilderConstructor;
268
-
269
- export { Builder };
270
- export default Builder;