@openrewrite/rewrite 8.100.0 → 8.100.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.
Files changed (140) hide show
  1. package/dist/java/rpc.d.ts.map +1 -1
  2. package/dist/java/rpc.js +6 -1
  3. package/dist/java/rpc.js.map +1 -1
  4. package/dist/javascript/add-import.d.ts.map +1 -1
  5. package/dist/javascript/add-import.js +3 -0
  6. package/dist/javascript/add-import.js.map +1 -1
  7. package/dist/javascript/binding.d.ts.map +1 -1
  8. package/dist/javascript/binding.js +8 -1
  9. package/dist/javascript/binding.js.map +1 -1
  10. package/dist/javascript/comparator.js +2 -1
  11. package/dist/javascript/comparator.js.map +1 -1
  12. package/dist/javascript/format/format.d.ts.map +1 -1
  13. package/dist/javascript/format/format.js +3 -2
  14. package/dist/javascript/format/format.js.map +1 -1
  15. package/dist/javascript/format/minimum-viable-spacing-visitor.js +3 -3
  16. package/dist/javascript/format/minimum-viable-spacing-visitor.js.map +1 -1
  17. package/dist/javascript/parser.d.ts.map +1 -1
  18. package/dist/javascript/parser.js +11 -17
  19. package/dist/javascript/parser.js.map +1 -1
  20. package/dist/javascript/print.d.ts +4 -0
  21. package/dist/javascript/print.d.ts.map +1 -1
  22. package/dist/javascript/print.js +82 -20
  23. package/dist/javascript/print.js.map +1 -1
  24. package/dist/javascript/rpc.js +2 -0
  25. package/dist/javascript/rpc.js.map +1 -1
  26. package/dist/javascript/scope.d.ts.map +1 -1
  27. package/dist/javascript/scope.js +4 -1
  28. package/dist/javascript/scope.js.map +1 -1
  29. package/dist/javascript/templating/comparator.d.ts +9 -0
  30. package/dist/javascript/templating/comparator.d.ts.map +1 -1
  31. package/dist/javascript/templating/comparator.js +21 -0
  32. package/dist/javascript/templating/comparator.js.map +1 -1
  33. package/dist/javascript/templating/debug.d.ts.map +1 -1
  34. package/dist/javascript/templating/debug.js +2 -0
  35. package/dist/javascript/templating/debug.js.map +1 -1
  36. package/dist/javascript/templating/precedence.d.ts.map +1 -1
  37. package/dist/javascript/templating/precedence.js +36 -39
  38. package/dist/javascript/templating/precedence.js.map +1 -1
  39. package/dist/javascript/templating/types.d.ts +4 -4
  40. package/dist/javascript/tree-debug.d.ts.map +1 -1
  41. package/dist/javascript/tree-debug.js +6 -3
  42. package/dist/javascript/tree-debug.js.map +1 -1
  43. package/dist/javascript/tree.d.ts +4 -1
  44. package/dist/javascript/tree.d.ts.map +1 -1
  45. package/dist/javascript/tree.js +2 -0
  46. package/dist/javascript/tree.js.map +1 -1
  47. package/dist/javascript/type-mapping.d.ts +1 -0
  48. package/dist/javascript/type-mapping.d.ts.map +1 -1
  49. package/dist/javascript/type-mapping.js +12 -1
  50. package/dist/javascript/type-mapping.js.map +1 -1
  51. package/dist/json/edit.d.ts +150 -0
  52. package/dist/json/edit.d.ts.map +1 -0
  53. package/dist/json/edit.js +667 -0
  54. package/dist/json/edit.js.map +1 -0
  55. package/dist/json/index.d.ts +1 -0
  56. package/dist/json/index.d.ts.map +1 -1
  57. package/dist/json/index.js +1 -0
  58. package/dist/json/index.js.map +1 -1
  59. package/dist/parser.d.ts +1 -1
  60. package/dist/parser.d.ts.map +1 -1
  61. package/dist/print.d.ts +16 -0
  62. package/dist/print.d.ts.map +1 -1
  63. package/dist/print.js +33 -0
  64. package/dist/print.js.map +1 -1
  65. package/dist/rewrite-javascript-version.txt +1 -1
  66. package/dist/rpc/request/get-languages.d.ts.map +1 -1
  67. package/dist/rpc/request/get-languages.js +1 -0
  68. package/dist/rpc/request/get-languages.js.map +1 -1
  69. package/dist/rpc/request/parse.d.ts.map +1 -1
  70. package/dist/rpc/request/parse.js +4 -0
  71. package/dist/rpc/request/parse.js.map +1 -1
  72. package/dist/rpc/server.d.ts +1 -0
  73. package/dist/rpc/server.d.ts.map +1 -1
  74. package/dist/rpc/server.js +1 -0
  75. package/dist/rpc/server.js.map +1 -1
  76. package/dist/xml/assertions.d.ts +4 -0
  77. package/dist/xml/assertions.d.ts.map +1 -0
  78. package/dist/xml/assertions.js +31 -0
  79. package/dist/xml/assertions.js.map +1 -0
  80. package/dist/xml/index.d.ts +8 -0
  81. package/dist/xml/index.d.ts.map +1 -0
  82. package/dist/xml/index.js +39 -0
  83. package/dist/xml/index.js.map +1 -0
  84. package/dist/xml/namespaces.d.ts +36 -0
  85. package/dist/xml/namespaces.d.ts.map +1 -0
  86. package/dist/xml/namespaces.js +98 -0
  87. package/dist/xml/namespaces.js.map +1 -0
  88. package/dist/xml/parser.d.ts +15 -0
  89. package/dist/xml/parser.d.ts.map +1 -0
  90. package/dist/xml/parser.js +677 -0
  91. package/dist/xml/parser.js.map +1 -0
  92. package/dist/xml/print.d.ts +2 -0
  93. package/dist/xml/print.d.ts.map +1 -0
  94. package/dist/xml/print.js +209 -0
  95. package/dist/xml/print.js.map +1 -0
  96. package/dist/xml/rpc.d.ts +2 -0
  97. package/dist/xml/rpc.d.ts.map +1 -0
  98. package/dist/xml/rpc.js +313 -0
  99. package/dist/xml/rpc.js.map +1 -0
  100. package/dist/xml/tree.d.ts +244 -0
  101. package/dist/xml/tree.d.ts.map +1 -0
  102. package/dist/xml/tree.js +265 -0
  103. package/dist/xml/tree.js.map +1 -0
  104. package/dist/xml/visitor.d.ts +35 -0
  105. package/dist/xml/visitor.d.ts.map +1 -0
  106. package/dist/xml/visitor.js +203 -0
  107. package/dist/xml/visitor.js.map +1 -0
  108. package/package.json +5 -1
  109. package/src/java/rpc.ts +6 -1
  110. package/src/javascript/add-import.ts +3 -0
  111. package/src/javascript/binding.ts +10 -1
  112. package/src/javascript/comparator.ts +2 -1
  113. package/src/javascript/format/format.ts +3 -2
  114. package/src/javascript/format/minimum-viable-spacing-visitor.ts +3 -3
  115. package/src/javascript/parser.ts +12 -17
  116. package/src/javascript/print.ts +85 -23
  117. package/src/javascript/rpc.ts +2 -0
  118. package/src/javascript/scope.ts +4 -1
  119. package/src/javascript/templating/comparator.ts +23 -0
  120. package/src/javascript/templating/debug.ts +1 -0
  121. package/src/javascript/templating/precedence.ts +17 -20
  122. package/src/javascript/templating/types.ts +4 -4
  123. package/src/javascript/tree-debug.ts +7 -3
  124. package/src/javascript/tree.ts +4 -1
  125. package/src/javascript/type-mapping.ts +15 -1
  126. package/src/json/edit.ts +750 -0
  127. package/src/json/index.ts +1 -0
  128. package/src/parser.ts +1 -1
  129. package/src/print.ts +42 -0
  130. package/src/rpc/request/get-languages.ts +1 -0
  131. package/src/rpc/request/parse.ts +3 -0
  132. package/src/rpc/server.ts +1 -0
  133. package/src/xml/assertions.ts +28 -0
  134. package/src/xml/index.ts +23 -0
  135. package/src/xml/namespaces.ts +109 -0
  136. package/src/xml/parser.ts +692 -0
  137. package/src/xml/print.ts +225 -0
  138. package/src/xml/rpc.ts +370 -0
  139. package/src/xml/tree.ts +455 -0
  140. package/src/xml/visitor.ts +227 -0
@@ -0,0 +1,244 @@
1
+ import { SourceFile, Tree } from "../tree";
2
+ /**
3
+ * An XML LST element, mirroring `org.openrewrite.xml.tree.Xml`. Every element keeps the
4
+ * whitespace before it in `prefix`, so that a document prints back exactly as it was parsed.
5
+ */
6
+ export interface Xml extends Tree {
7
+ readonly prefix: string;
8
+ }
9
+ export declare namespace Xml {
10
+ const Kind: {
11
+ readonly Document: "org.openrewrite.xml.tree.Xml$Document";
12
+ readonly Prolog: "org.openrewrite.xml.tree.Xml$Prolog";
13
+ readonly XmlDecl: "org.openrewrite.xml.tree.Xml$XmlDecl";
14
+ readonly ProcessingInstruction: "org.openrewrite.xml.tree.Xml$ProcessingInstruction";
15
+ readonly Tag: "org.openrewrite.xml.tree.Xml$Tag";
16
+ readonly TagClosing: "org.openrewrite.xml.tree.Xml$Tag$Closing";
17
+ readonly Attribute: "org.openrewrite.xml.tree.Xml$Attribute";
18
+ readonly AttributeValue: "org.openrewrite.xml.tree.Xml$Attribute$Value";
19
+ readonly CharData: "org.openrewrite.xml.tree.Xml$CharData";
20
+ readonly Comment: "org.openrewrite.xml.tree.Xml$Comment";
21
+ readonly DocTypeDecl: "org.openrewrite.xml.tree.Xml$DocTypeDecl";
22
+ readonly DocTypeDeclExternalSubsets: "org.openrewrite.xml.tree.Xml$DocTypeDecl$ExternalSubsets";
23
+ readonly Element: "org.openrewrite.xml.tree.Xml$Element";
24
+ readonly Ident: "org.openrewrite.xml.tree.Xml$Ident";
25
+ readonly JspDirective: "org.openrewrite.xml.tree.Xml$JspDirective";
26
+ readonly JspScriptlet: "org.openrewrite.xml.tree.Xml$JspScriptlet";
27
+ readonly JspExpression: "org.openrewrite.xml.tree.Xml$JspExpression";
28
+ readonly JspDeclaration: "org.openrewrite.xml.tree.Xml$JspDeclaration";
29
+ readonly JspComment: "org.openrewrite.xml.tree.Xml$JspComment";
30
+ };
31
+ const MarkersKind: {
32
+ /**
33
+ * An HTML void element such as `<br>`, which prints with a bare `>` and has neither content nor a closing tag.
34
+ */
35
+ readonly HtmlVoidElement: "org.openrewrite.xml.marker.HtmlVoidElement";
36
+ };
37
+ /**
38
+ * What may appear between a tag's start and end, mirroring `org.openrewrite.xml.tree.Content`.
39
+ */
40
+ type Content = Tag | CharData | Comment | ProcessingInstruction | JspDirective | JspScriptlet | JspExpression | JspDeclaration | JspComment;
41
+ /**
42
+ * What may appear in the prolog, mirroring `org.openrewrite.xml.tree.Misc`.
43
+ */
44
+ type Misc = Comment | DocTypeDecl | ProcessingInstruction | XmlDecl | JspDeclaration | JspComment;
45
+ interface Document extends SourceFile, Xml {
46
+ readonly kind: typeof Kind.Document;
47
+ readonly prolog: Prolog;
48
+ /**
49
+ * Absent from a document without a root element, such as an empty file or one holding only a prolog,
50
+ * which the Java parser accepts as well.
51
+ */
52
+ readonly root?: Tag;
53
+ readonly eof: string;
54
+ }
55
+ interface Prolog extends Xml {
56
+ readonly kind: typeof Kind.Prolog;
57
+ readonly xmlDecl?: XmlDecl;
58
+ readonly misc: Misc[];
59
+ readonly jspDirectives: JspDirective[];
60
+ }
61
+ interface XmlDecl extends Xml {
62
+ readonly kind: typeof Kind.XmlDecl;
63
+ readonly name: string;
64
+ readonly attributes: Attribute[];
65
+ /**
66
+ * The space before `?>`.
67
+ */
68
+ readonly beforeTagDelimiterPrefix: string;
69
+ }
70
+ interface ProcessingInstruction extends Xml {
71
+ readonly kind: typeof Kind.ProcessingInstruction;
72
+ readonly name: string;
73
+ /**
74
+ * The instruction's data, absent from `<?target?>`.
75
+ */
76
+ readonly processingInstructions?: CharData;
77
+ /**
78
+ * The space before `?>`.
79
+ */
80
+ readonly beforeTagDelimiterPrefix: string;
81
+ }
82
+ interface Tag extends Xml {
83
+ readonly kind: typeof Kind.Tag;
84
+ readonly name: string;
85
+ readonly attributes: Attribute[];
86
+ /**
87
+ * Absent from a self-closing tag such as `<a/>`, and empty for `<a></a>`.
88
+ */
89
+ readonly content?: Content[];
90
+ /**
91
+ * Absent from a self-closing tag.
92
+ */
93
+ readonly closing?: TagClosing;
94
+ /**
95
+ * The space before `>` or `/>`.
96
+ */
97
+ readonly beforeTagDelimiterPrefix: string;
98
+ }
99
+ interface TagClosing extends Xml {
100
+ readonly kind: typeof Kind.TagClosing;
101
+ readonly name: string;
102
+ /**
103
+ * The space before `>`.
104
+ */
105
+ readonly beforeTagDelimiterPrefix: string;
106
+ }
107
+ interface Attribute extends Xml {
108
+ readonly kind: typeof Kind.Attribute;
109
+ readonly key: Ident;
110
+ readonly beforeEquals: string;
111
+ readonly value: AttributeValue;
112
+ }
113
+ type Quote = "Double" | "Single";
114
+ interface AttributeValue extends Xml {
115
+ readonly kind: typeof Kind.AttributeValue;
116
+ readonly quote: Quote;
117
+ /**
118
+ * The text between the quotes, with any entity references left as written.
119
+ */
120
+ readonly value: string;
121
+ }
122
+ interface CharData extends Xml {
123
+ readonly kind: typeof Kind.CharData;
124
+ readonly cdata: boolean;
125
+ readonly text: string;
126
+ readonly afterText: string;
127
+ }
128
+ interface Comment extends Xml {
129
+ readonly kind: typeof Kind.Comment;
130
+ readonly text: string;
131
+ }
132
+ interface DocTypeDecl extends Xml {
133
+ readonly kind: typeof Kind.DocTypeDecl;
134
+ readonly name: Ident;
135
+ /**
136
+ * The `DOCTYPE` keyword as written, which may be in any case.
137
+ */
138
+ readonly documentDeclaration: string;
139
+ readonly externalId?: Ident;
140
+ readonly internalSubset: Ident[];
141
+ readonly externalSubsets?: DocTypeDeclExternalSubsets;
142
+ /**
143
+ * The space before `>`.
144
+ */
145
+ readonly beforeTagDelimiterPrefix: string;
146
+ }
147
+ interface DocTypeDeclExternalSubsets extends Xml {
148
+ readonly kind: typeof Kind.DocTypeDeclExternalSubsets;
149
+ readonly elements: Element[];
150
+ }
151
+ interface Element extends Xml {
152
+ readonly kind: typeof Kind.Element;
153
+ readonly subset: Ident[];
154
+ /**
155
+ * The space before `]` on the last element of a subset.
156
+ */
157
+ readonly beforeTagDelimiterPrefix: string;
158
+ }
159
+ interface Ident extends Xml {
160
+ readonly kind: typeof Kind.Ident;
161
+ readonly name: string;
162
+ }
163
+ interface JspDirective extends Xml {
164
+ readonly kind: typeof Kind.JspDirective;
165
+ readonly beforeTypePrefix: string;
166
+ readonly type: string;
167
+ readonly attributes: Attribute[];
168
+ /**
169
+ * The space before `%>`.
170
+ */
171
+ readonly beforeDirectiveEndPrefix: string;
172
+ }
173
+ interface JspScriptlet extends Xml {
174
+ readonly kind: typeof Kind.JspScriptlet;
175
+ readonly content: string;
176
+ }
177
+ interface JspExpression extends Xml {
178
+ readonly kind: typeof Kind.JspExpression;
179
+ readonly content: string;
180
+ }
181
+ interface JspDeclaration extends Xml {
182
+ readonly kind: typeof Kind.JspDeclaration;
183
+ readonly content: string;
184
+ }
185
+ interface JspComment extends Xml {
186
+ readonly kind: typeof Kind.JspComment;
187
+ readonly content: string;
188
+ }
189
+ }
190
+ export declare function isXml(tree: any): tree is Xml;
191
+ export declare function isDocument(xml: Xml): xml is Xml.Document;
192
+ export declare function isTag(xml: Xml): xml is Xml.Tag;
193
+ export declare function isAttribute(xml: Xml): xml is Xml.Attribute;
194
+ export declare function isCharData(xml: Xml): xml is Xml.CharData;
195
+ export declare function isComment(xml: Xml): xml is Xml.Comment;
196
+ /**
197
+ * The child tags of a tag, optionally only those with the given name.
198
+ */
199
+ export declare function getChildren(tag: Xml.Tag, name?: string): Xml.Tag[];
200
+ export declare function getChild(tag: Xml.Tag, name: string): Xml.Tag | undefined;
201
+ /**
202
+ * The character data of a tag whose content is only character data, as `Xml.Tag.getValue()` returns it.
203
+ */
204
+ export declare function getValue(tag: Xml.Tag): string | undefined;
205
+ export declare function getChildValue(tag: Xml.Tag, name: string): string | undefined;
206
+ export declare function getAttribute(tag: Xml.Tag, key: string): Xml.Attribute | undefined;
207
+ /**
208
+ * The value of an attribute as written between its quotes, with entity references left as they are.
209
+ */
210
+ export declare function getAttributeValue(tag: Xml.Tag, key: string): string | undefined;
211
+ /**
212
+ * The tag renamed, together with its closing tag, like `Xml.Tag.withName(String)`.
213
+ */
214
+ export declare function withName(tag: Xml.Tag, name: string): Xml.Tag;
215
+ /**
216
+ * The tag with the value of an existing attribute replaced, or the tag itself when it has no such attribute.
217
+ * The value is plain text, escaped here for the quotes the attribute already uses.
218
+ */
219
+ export declare function withAttributeValue(tag: Xml.Tag, key: string, value: string): Xml.Tag;
220
+ /**
221
+ * The tag with an attribute added after its last one, or with the value replaced when it has the attribute
222
+ * already. The value is plain text and gets escaped. The new attribute takes the whitespace before the last
223
+ * attribute, so that it lines up with attributes written one per line, or a single space on a tag without any.
224
+ */
225
+ export declare function addAttribute(tag: Xml.Tag, key: string, value: string, quote?: Xml.Quote): Xml.Tag;
226
+ export declare function removeAttribute(tag: Xml.Tag, key: string): Xml.Tag;
227
+ /**
228
+ * The tag with its content replaced by the given text, like `Xml.Tag.withValue(String)`. The text is
229
+ * written as is, so a `<` or `&` in it has to be escaped first, for example with {@link escapeXml}.
230
+ */
231
+ export declare function withValue(tag: Xml.Tag, value: string): Xml.Tag;
232
+ /**
233
+ * Escapes plain text for XML. Without a `quote`, it is escaped for character data, where `&`, `<` and `>`
234
+ * become entity references. Given the quotes of an attribute value, `&`, `<` and that quote character are
235
+ * escaped, and a `>` is left as it is, as in a UI5 expression binding such as `{= ${a} > 1 }`.
236
+ */
237
+ export declare function escapeXml(text: string, quote?: Xml.Quote): string;
238
+ /**
239
+ * Decodes the predefined entities and character references in XML text, the reverse of {@link escapeXml}.
240
+ * Use it on {@link getAttributeValue}, which returns a value as written, before passing it to
241
+ * {@link withAttributeValue} or {@link addAttribute}, which take plain text.
242
+ */
243
+ export declare function unescapeXml(text: string): string;
244
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/xml/tree.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,SAAS,CAAC;AAGzC;;;GAGG;AACH,MAAM,WAAW,GAAI,SAAQ,IAAI;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAC1B;AAED,yBAAiB,GAAG,CAAC;IACV,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;KAoBP,CAAC;IAEJ,MAAM,WAAW;QACpB;;WAEG;;KAEG,CAAC;IAEX;;OAEG;IACH,KAAY,OAAO,GAAG,GAAG,GAAG,QAAQ,GAAG,OAAO,GAAG,qBAAqB,GAClE,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,CAAC;IAE9E;;OAEG;IACH,KAAY,IAAI,GAAG,OAAO,GAAG,WAAW,GAAG,qBAAqB,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC;IAEzG,UAAiB,QAAS,SAAQ,UAAU,EAAE,GAAG;QAC7C,QAAQ,CAAC,IAAI,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAA;QACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB;;;WAGG;QACH,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,CAAA;QACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KACvB;IAED,UAAiB,MAAO,SAAQ,G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3
+ exports.Xml = void 0;
4
+ exports.isXml = isXml;
5
+ exports.isDocument = isDocument;
6
+ exports.isTag = isTag;
7
+ exports.isAttribute = isAttribute;
8
+ exports.isCharData = isCharData;
9
+ exports.isComment = isComment;
10
+ exports.getChildren = getChildren;
11
+ exports.getChild = getChild;
12
+ exports.getValue = getValue;
13
+ exports.getChildValue = getChildValue;
14
+ exports.getAttribute = getAttribute;
15
+ exports.getAttributeValue = getAttributeValue;
16
+ exports.withName = withName;
17
+ exports.withAttributeValue = withAttributeValue;
18
+ exports.addAttribute = addAttribute;
19
+ exports.removeAttribute = removeAttribute;
20
+ exports.withValue = withValue;
21
+ exports.escapeXml = escapeXml;
22
+ exports.unescapeXml = unescapeXml;
23
+ /*
24
+ * Copyright 2026 the original author or authors.
25
+ * <p>
26
+ * Licensed under the Moderne Source Available License (the "License");
27
+ * you may not use this file except in compliance with the License.
28
+ * You may obtain a copy of the License at
29
+ * <p>
30
+ * https://docs.moderne.io/licensing/moderne-source-available-license
31
+ * <p>
32
+ * Unless required by applicable law or agreed to in writing, software
33
+ * distributed under the License is distributed on an "AS IS" BASIS,
34
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
+ * See the License for the specific language governing permissions and
36
+ * limitations under the License.
37
+ */
38
+ const markers_1 = require("../markers");
39
+ const uuid_1 = require("../uuid");
40
+ var Xml;
41
+ (function (Xml) {
42
+ Xml.Kind = {
43
+ Document: "org.openrewrite.xml.tree.Xml$Document",
44
+ Prolog: "org.openrewrite.xml.tree.Xml$Prolog",
45
+ XmlDecl: "org.openrewrite.xml.tree.Xml$XmlDecl",
46
+ ProcessingInstruction: "org.openrewrite.xml.tree.Xml$ProcessingInstruction",
47
+ Tag: "org.openrewrite.xml.tree.Xml$Tag",
48
+ TagClosing: "org.openrewrite.xml.tree.Xml$Tag$Closing",
49
+ Attribute: "org.openrewrite.xml.tree.Xml$Attribute",
50
+ AttributeValue: "org.openrewrite.xml.tree.Xml$Attribute$Value",
51
+ CharData: "org.openrewrite.xml.tree.Xml$CharData",
52
+ Comment: "org.openrewrite.xml.tree.Xml$Comment",
53
+ DocTypeDecl: "org.openrewrite.xml.tree.Xml$DocTypeDecl",
54
+ DocTypeDeclExternalSubsets: "org.openrewrite.xml.tree.Xml$DocTypeDecl$ExternalSubsets",
55
+ Element: "org.openrewrite.xml.tree.Xml$Element",
56
+ Ident: "org.openrewrite.xml.tree.Xml$Ident",
57
+ JspDirective: "org.openrewrite.xml.tree.Xml$JspDirective",
58
+ JspScriptlet: "org.openrewrite.xml.tree.Xml$JspScriptlet",
59
+ JspExpression: "org.openrewrite.xml.tree.Xml$JspExpression",
60
+ JspDeclaration: "org.openrewrite.xml.tree.Xml$JspDeclaration",
61
+ JspComment: "org.openrewrite.xml.tree.Xml$JspComment",
62
+ };
63
+ Xml.MarkersKind = {
64
+ /**
65
+ * An HTML void element such as `<br>`, which prints with a bare `>` and has neither content nor a closing tag.
66
+ */
67
+ HtmlVoidElement: "org.openrewrite.xml.marker.HtmlVoidElement",
68
+ };
69
+ })(Xml || (exports.Xml = Xml = {}));
70
+ const xmlKindValues = new Set(Object.values(Xml.Kind));
71
+ function isXml(tree) {
72
+ return xmlKindValues.has(tree === null || tree === void 0 ? void 0 : tree["kind"]);
73
+ }
74
+ function isDocument(xml) {
75
+ return xml.kind === Xml.Kind.Document;
76
+ }
77
+ function isTag(xml) {
78
+ return xml.kind === Xml.Kind.Tag;
79
+ }
80
+ function isAttribute(xml) {
81
+ return xml.kind === Xml.Kind.Attribute;
82
+ }
83
+ function isCharData(xml) {
84
+ return xml.kind === Xml.Kind.CharData;
85
+ }
86
+ function isComment(xml) {
87
+ return xml.kind === Xml.Kind.Comment;
88
+ }
89
+ /**
90
+ * The child tags of a tag, optionally only those with the given name.
91
+ */
92
+ function getChildren(tag, name) {
93
+ var _a;
94
+ return ((_a = tag.content) !== null && _a !== void 0 ? _a : []).filter((c) => isTag(c) && (name === undefined || c.name === name));
95
+ }
96
+ function getChild(tag, name) {
97
+ var _a;
98
+ return (_a = tag.content) === null || _a === void 0 ? void 0 : _a.find((c) => isTag(c) && c.name === name);
99
+ }
100
+ /**
101
+ * The character data of a tag whose content is only character data, as `Xml.Tag.getValue()` returns it.
102
+ */
103
+ function getValue(tag) {
104
+ if (!tag.content) {
105
+ return undefined;
106
+ }
107
+ if (tag.content.length === 1 && isCharData(tag.content[0])) {
108
+ return tag.content[0].text;
109
+ }
110
+ if (tag.content.every(isCharData)) {
111
+ return tag.content.map(c => unescapeXml(c.text)).join("");
112
+ }
113
+ return undefined;
114
+ }
115
+ function getChildValue(tag, name) {
116
+ const child = getChild(tag, name);
117
+ return child && getValue(child);
118
+ }
119
+ function getAttribute(tag, key) {
120
+ return tag.attributes.find(a => a.key.name === key);
121
+ }
122
+ /**
123
+ * The value of an attribute as written between its quotes, with entity references left as they are.
124
+ */
125
+ function getAttributeValue(tag, key) {
126
+ var _a;
127
+ return (_a = getAttribute(tag, key)) === null || _a === void 0 ? void 0 : _a.value.value;
128
+ }
129
+ /**
130
+ * The tag renamed, together with its closing tag, like `Xml.Tag.withName(String)`.
131
+ */
132
+ function withName(tag, name) {
133
+ if (name !== name.trim()) {
134
+ throw new Error("Tag name must not contain leading or trailing whitespace");
135
+ }
136
+ if (tag.name === name) {
137
+ return tag;
138
+ }
139
+ return Object.assign(Object.assign({}, tag), { name, closing: tag.closing && Object.assign(Object.assign({}, tag.closing), { name }) });
140
+ }
141
+ /**
142
+ * The tag with the value of an existing attribute replaced, or the tag itself when it has no such attribute.
143
+ * The value is plain text, escaped here for the quotes the attribute already uses.
144
+ */
145
+ function withAttributeValue(tag, key, value) {
146
+ const index = tag.attributes.findIndex(a => a.key.name === key);
147
+ if (index === -1) {
148
+ return tag;
149
+ }
150
+ const attribute = tag.attributes[index];
151
+ const escaped = escapeXml(value, attribute.value.quote);
152
+ if (attribute.value.value === escaped) {
153
+ return tag;
154
+ }
155
+ const attributes = [...tag.attributes];
156
+ attributes[index] = Object.assign(Object.assign({}, attribute), { value: Object.assign(Object.assign({}, attribute.value), { value: escaped }) });
157
+ return Object.assign(Object.assign({}, tag), { attributes });
158
+ }
159
+ /**
160
+ * The tag with an attribute added after its last one, or with the value replaced when it has the attribute
161
+ * already. The value is plain text and gets escaped. The new attribute takes the whitespace before the last
162
+ * attribute, so that it lines up with attributes written one per line, or a single space on a tag without any.
163
+ */
164
+ function addAttribute(tag, key, value, quote = "Double") {
165
+ var _a;
166
+ if (tag.attributes.some(a => a.key.name === key)) {
167
+ return withAttributeValue(tag, key, value);
168
+ }
169
+ const last = tag.attributes[tag.attributes.length - 1];
170
+ const attribute = {
171
+ kind: Xml.Kind.Attribute,
172
+ id: (0, uuid_1.randomId)(),
173
+ prefix: (_a = last === null || last === void 0 ? void 0 : last.prefix) !== null && _a !== void 0 ? _a : " ",
174
+ markers: markers_1.emptyMarkers,
175
+ key: { kind: Xml.Kind.Ident, id: (0, uuid_1.randomId)(), prefix: "", markers: markers_1.emptyMarkers, name: key },
176
+ beforeEquals: "",
177
+ value: {
178
+ kind: Xml.Kind.AttributeValue,
179
+ id: (0, uuid_1.randomId)(),
180
+ prefix: "",
181
+ markers: markers_1.emptyMarkers,
182
+ quote,
183
+ value: escapeXml(value, quote)
184
+ }
185
+ };
186
+ return Object.assign(Object.assign({}, tag), { attributes: [...tag.attributes, attribute] });
187
+ }
188
+ function removeAttribute(tag, key) {
189
+ const attributes = tag.attributes.filter(a => a.key.name !== key);
190
+ return attributes.length === tag.attributes.length ? tag : Object.assign(Object.assign({}, tag), { attributes });
191
+ }
192
+ /**
193
+ * The tag with its content replaced by the given text, like `Xml.Tag.withValue(String)`. The text is
194
+ * written as is, so a `<` or `&` in it has to be escaped first, for example with {@link escapeXml}.
195
+ */
196
+ function withValue(tag, value) {
197
+ var _a;
198
+ const content = tag.content;
199
+ if ((content === null || content === void 0 ? void 0 : content.length) === 1 && isCharData(content[0]) && content[0].text === value) {
200
+ return tag;
201
+ }
202
+ const charData = content && content.length > 0 && isCharData(content[0]) ? Object.assign(Object.assign({}, content[0]), { text: value }) :
203
+ {
204
+ kind: Xml.Kind.CharData,
205
+ id: (0, uuid_1.randomId)(),
206
+ prefix: "",
207
+ markers: markers_1.emptyMarkers,
208
+ cdata: false,
209
+ text: value,
210
+ afterText: ""
211
+ };
212
+ return Object.assign(Object.assign({}, tag), { markers: tag.markers.markers.some(m => m.kind === Xml.MarkersKind.HtmlVoidElement) ? Object.assign(Object.assign({}, tag.markers), { markers: tag.markers.markers.filter(m => m.kind !== Xml.MarkersKind.HtmlVoidElement) }) : tag.markers, content: [charData], closing: (_a = tag.closing) !== null && _a !== void 0 ? _a : {
213
+ kind: Xml.Kind.TagClosing,
214
+ id: (0, uuid_1.randomId)(),
215
+ prefix: "",
216
+ markers: markers_1.emptyMarkers,
217
+ name: tag.name,
218
+ beforeTagDelimiterPrefix: ""
219
+ } });
220
+ }
221
+ const XML_ENTITIES = {
222
+ amp: "&",
223
+ lt: "<",
224
+ gt: ">",
225
+ quot: "\"",
226
+ apos: "'"
227
+ };
228
+ /**
229
+ * Escapes plain text for XML. Without a `quote`, it is escaped for character data, where `&`, `<` and `>`
230
+ * become entity references. Given the quotes of an attribute value, `&`, `<` and that quote character are
231
+ * escaped, and a `>` is left as it is, as in a UI5 expression binding such as `{= ${a} > 1 }`.
232
+ */
233
+ function escapeXml(text, quote) {
234
+ const pattern = quote === "Double" ? /[&<"]/g : quote === "Single" ? /[&<']/g : /[&<>]/g;
235
+ return text.replace(pattern, c => {
236
+ switch (c) {
237
+ case "&":
238
+ return "&amp;";
239
+ case "<":
240
+ return "&lt;";
241
+ case ">":
242
+ return "&gt;";
243
+ case "\"":
244
+ return "&quot;";
245
+ default:
246
+ return "&apos;";
247
+ }
248
+ });
249
+ }
250
+ /**
251
+ * Decodes the predefined entities and character references in XML text, the reverse of {@link escapeXml}.
252
+ * Use it on {@link getAttributeValue}, which returns a value as written, before passing it to
253
+ * {@link withAttributeValue} or {@link addAttribute}, which take plain text.
254
+ */
255
+ function unescapeXml(text) {
256
+ return text.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[A-Za-z]+);/g, (entity, ref) => {
257
+ var _a;
258
+ if (ref.startsWith("#")) {
259
+ const codePoint = ref.startsWith("#x") ? parseInt(ref.substring(2), 16) : parseInt(ref.substring(1), 10);
260
+ return codePoint <= 0x10FFFF ? String.fromCodePoint(codePoint) : entity;
261
+ }
262
+ return (_a = XML_ENTITIES[ref]) !== null && _a !== void 0 ? _a : entity;
263
+ });
264
+ }
265
+ //# sourceMappingURL=tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/xml/tree.ts"],"names":[],"mappings":";;;AA2OA,sBAEC;AAED,gCAEC;AAED,sBAEC;AAED,kCAEC;AAED,gCAEC;AAED,8BAEC;AAKD,kCAEC;AAED,4BAEC;AAKD,4BAWC;AAED,sCAGC;AAED,oCAEC;AAKD,8CAEC;AAKD,4BAYC;AAMD,gDAaC;AAOD,oCAsBC;AAED,0CAGC;AAMD,8BAgCC;AAeD,8BAgBC;AAOD,kCAQC;AAtcD;;;;;;;;;;;;;;GAcG;AACH,wCAAiD;AAEjD,kCAAiC;AAUjC,IAAiB,GAAG,CA4MnB;AA5MD,WAAiB,GAAG;IACH,QAAI,GAAG;QAChB,QAAQ,EAAE,uCAAuC;QACjD,MAAM,EAAE,qCAAqC;QAC7C,OAAO,EAAE,sCAAsC;QAC/C,qBAAqB,EAAE,oDAAoD;QAC3E,GAAG,EAAE,kCAAkC;QACvC,UAAU,EAAE,0CAA0C;QACtD,SAAS,EAAE,wCAAwC;QACnD,cAAc,EAAE,8CAA8C;QAC9D,QAAQ,EAAE,uCAAuC;QACjD,OAAO,EAAE,sCAAsC;QAC/C,WAAW,EAAE,0CAA0C;QACvD,0BAA0B,EAAE,0DAA0D;QACtF,OAAO,EAAE,sCAAsC;QAC/C,KAAK,EAAE,oCAAoC;QAC3C,YAAY,EAAE,2CAA2C;QACzD,YAAY,EAAE,2CAA2C;QACzD,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gBACL,OAAO,QAAQ,CAAC;YACpB;gBACI,OAAO,QAAQ,CAAC;QACxB,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,uCAAuC,EAAE,CAAC,MAAM,EAAE,GAAW,EAAE,EAAE;;QACjF,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACzG,OAAO,SAAS,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5E,CAAC;QACD,OAAO,MAAA,YAAY,CAAC,GAAG,CAAC,mCAAI,MAAM,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { TreeVisitor, ValidRecipeReturnType } from "../visitor";
2
+ import { SourceFile } from "../tree";
3
+ import { Xml } from "./tree";
4
+ import { Draft } from "mutative";
5
+ /**
6
+ * Visits an XML LST, mirroring `org.openrewrite.xml.XmlVisitor`.
7
+ */
8
+ export declare class XmlVisitor<P> extends TreeVisitor<Xml, P> {
9
+ isAcceptable(sourceFile: SourceFile): Promise<boolean>;
10
+ protected visitDocument(document: Xml.Document, p: P): Promise<Xml | undefined>;
11
+ protected visitProlog(prolog: Xml.Prolog, p: P): Promise<Xml | undefined>;
12
+ protected visitXmlDecl(xmlDecl: Xml.XmlDecl, p: P): Promise<Xml | undefined>;
13
+ protected visitProcessingInstruction(pi: Xml.ProcessingInstruction, p: P): Promise<Xml | undefined>;
14
+ protected visitTag(tag: Xml.Tag, p: P): Promise<Xml | undefined>;
15
+ protected visitTagClosing(closing: Xml.TagClosing, p: P): Promise<Xml | undefined>;
16
+ protected visitAttribute(attribute: Xml.Attribute, p: P): Promise<Xml | undefined>;
17
+ protected visitAttributeValue(value: Xml.AttributeValue, p: P): Promise<Xml | undefined>;
18
+ protected visitCharData(charData: Xml.CharData, p: P): Promise<Xml | undefined>;
19
+ protected visitComment(comment: Xml.Comment, p: P): Promise<Xml | undefined>;
20
+ protected visitDocTypeDecl(docTypeDecl: Xml.DocTypeDecl, p: P): Promise<Xml | undefined>;
21
+ protected visitDocTypeDeclExternalSubsets(externalSubsets: Xml.DocTypeDeclExternalSubsets, p: P): Promise<Xml | undefined>;
22
+ protected visitElement(element: Xml.Element, p: P): Promise<Xml | undefined>;
23
+ protected visitIdent(ident: Xml.Ident, p: P): Promise<Xml | undefined>;
24
+ protected visitJspDirective(jspDirective: Xml.JspDirective, p: P): Promise<Xml | undefined>;
25
+ protected visitJspScriptlet(jspScriptlet: Xml.JspScriptlet, p: P): Promise<Xml | undefined>;
26
+ protected visitJspExpression(jspExpression: Xml.JspExpression, p: P): Promise<Xml | undefined>;
27
+ protected visitJspDeclaration(jspDeclaration: Xml.JspDeclaration, p: P): Promise<Xml | undefined>;
28
+ protected visitJspComment(jspComment: Xml.JspComment, p: P): Promise<Xml | undefined>;
29
+ /**
30
+ * Edits an element as a draft, with its markers visited first.
31
+ */
32
+ protected produceXml<X extends Xml>(before: Xml | undefined, p: P, recipe?: (draft: Draft<X>) => ValidRecipeReturnType<Draft<X>> | PromiseLike<ValidRecipeReturnType<Draft<X>>>): Promise<X | undefined>;
33
+ protected accept(t: Xml, p: P): Promise<Xml | undefined>;
34
+ }
35
+ //# sourceMappingURL=visitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../src/xml/visitor.ts"],"names":[],"mappings":"AAgBA,OAAO,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