@usearazzo/resolver 1.0.1-alpha.21 → 1.0.1-alpha.22
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.1-alpha.22](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.21...v1.0.1-alpha.22) (2026-11-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @usearazzo/resolver
|
|
9
|
+
|
|
6
10
|
## [1.0.1-alpha.21](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.20...v1.0.1-alpha.21) (2026-11-03)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @usearazzo/resolver
|
|
@@ -63450,6 +63450,11 @@ const Ast = function fnast() {
|
|
|
63450
63450
|
let depth = 0;
|
|
63451
63451
|
xml += '<?xml version="1.0" encoding="utf-8"?>\n';
|
|
63452
63452
|
xml += `<root nodes="${records.length / 2}" characters="${chars.length}">\n`;
|
|
63453
|
+
xml += `<!--\n`;
|
|
63454
|
+
xml += ` Caveat: AST node phrases may not be faithfully represented.\n`;
|
|
63455
|
+
xml += ` Invalid XML characters are replaced with 0xFFFD.\n`;
|
|
63456
|
+
xml += ` Special characters &<>"\' are escaped with XML entities.\n`;
|
|
63457
|
+
xml += `-->\n`;
|
|
63453
63458
|
xml += `<!-- input string -->\n`;
|
|
63454
63459
|
xml += indent(depth + 2);
|
|
63455
63460
|
xml += utils.charsToXmlString(chars);
|
|
@@ -63842,14 +63847,49 @@ const utilities = {
|
|
|
63842
63847
|
}
|
|
63843
63848
|
return String.fromCodePoint(...subChars);
|
|
63844
63849
|
},
|
|
63845
|
-
charsToXmlString: (chars, beg, len) =>
|
|
63846
|
-
|
|
63847
|
-
|
|
63850
|
+
charsToXmlString: (chars, beg, len) => {
|
|
63851
|
+
function isInvalidXmlCodePoint(code) {
|
|
63852
|
+
return (
|
|
63853
|
+
!Number.isFinite(code) ||
|
|
63854
|
+
code < 0 ||
|
|
63855
|
+
code > 0x10ffff ||
|
|
63856
|
+
(code >= 0x0000 && code <= 0x0008) ||
|
|
63857
|
+
(code >= 0x000b && code <= 0x000c) ||
|
|
63858
|
+
(code >= 0x000e && code <= 0x001f) ||
|
|
63859
|
+
(code >= 0xd800 && code <= 0xdfff) ||
|
|
63860
|
+
(code >= 0xfffe && code <= 0xffff)
|
|
63861
|
+
);
|
|
63862
|
+
}
|
|
63863
|
+
let start = 0;
|
|
63864
|
+
let finish = chars.length;
|
|
63865
|
+
|
|
63866
|
+
if (typeof beg === 'number') {
|
|
63867
|
+
if (beg >= chars.length) {
|
|
63868
|
+
return '';
|
|
63869
|
+
}
|
|
63870
|
+
start = beg < 0 ? 0 : beg;
|
|
63871
|
+
}
|
|
63872
|
+
if (typeof len === 'number') {
|
|
63873
|
+
if (len <= 0) {
|
|
63874
|
+
return '';
|
|
63875
|
+
}
|
|
63876
|
+
finish = len > chars.length - start ? chars.length : start + len;
|
|
63877
|
+
}
|
|
63878
|
+
|
|
63879
|
+
const sanitized = chars.slice(start, finish).map((code) => (isInvalidXmlCodePoint(code) ? 0xfffd : code));
|
|
63880
|
+
const CHUNK = 0x8000;
|
|
63881
|
+
let out = '';
|
|
63882
|
+
for (let i = 0; i < sanitized.length; i += CHUNK) {
|
|
63883
|
+
out += String.fromCodePoint.apply(null, sanitized.slice(i, i + CHUNK));
|
|
63884
|
+
}
|
|
63885
|
+
|
|
63886
|
+
return out
|
|
63848
63887
|
.replace(/&/g, '&')
|
|
63849
63888
|
.replace(/</g, '<')
|
|
63850
63889
|
.replace(/>/g, '>')
|
|
63851
63890
|
.replace(/'/g, ''')
|
|
63852
|
-
.replace(/"/g, '"')
|
|
63891
|
+
.replace(/"/g, '"');
|
|
63892
|
+
},
|
|
63853
63893
|
};
|
|
63854
63894
|
|
|
63855
63895
|
const identifiers = {
|