@usearazzo/validator 1.0.1-alpha.21 → 1.0.1-alpha.23

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,14 @@
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.23](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.22...v1.0.1-alpha.23) (2026-11-04)
7
+
8
+ **Note:** Version bump only for package @usearazzo/validator
9
+
10
+ ## [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)
11
+
12
+ **Note:** Version bump only for package @usearazzo/validator
13
+
6
14
  ## [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
15
 
8
16
  **Note:** Version bump only for package @usearazzo/validator
@@ -195812,6 +195812,11 @@ const Ast = function fnast() {
195812
195812
  let depth = 0;
195813
195813
  xml += '<?xml version="1.0" encoding="utf-8"?>\n';
195814
195814
  xml += `<root nodes="${records.length / 2}" characters="${chars.length}">\n`;
195815
+ xml += `<!--\n`;
195816
+ xml += ` Caveat: AST node phrases may not be faithfully represented.\n`;
195817
+ xml += ` Invalid XML characters are replaced with 0xFFFD.\n`;
195818
+ xml += ` Special characters &<>"\' are escaped with XML entities.\n`;
195819
+ xml += `-->\n`;
195815
195820
  xml += `<!-- input string -->\n`;
195816
195821
  xml += indent(depth + 2);
195817
195822
  xml += utils.charsToXmlString(chars);
@@ -196204,14 +196209,49 @@ const utilities = {
196204
196209
  }
196205
196210
  return String.fromCodePoint(...subChars);
196206
196211
  },
196207
- charsToXmlString: (chars, beg, len) =>
196208
- utilities
196209
- .charsToString(chars, beg, len)
196212
+ charsToXmlString: (chars, beg, len) => {
196213
+ function isInvalidXmlCodePoint(code) {
196214
+ return (
196215
+ !Number.isFinite(code) ||
196216
+ code < 0 ||
196217
+ code > 0x10ffff ||
196218
+ (code >= 0x0000 && code <= 0x0008) ||
196219
+ (code >= 0x000b && code <= 0x000c) ||
196220
+ (code >= 0x000e && code <= 0x001f) ||
196221
+ (code >= 0xd800 && code <= 0xdfff) ||
196222
+ (code >= 0xfffe && code <= 0xffff)
196223
+ );
196224
+ }
196225
+ let start = 0;
196226
+ let finish = chars.length;
196227
+
196228
+ if (typeof beg === 'number') {
196229
+ if (beg >= chars.length) {
196230
+ return '';
196231
+ }
196232
+ start = beg < 0 ? 0 : beg;
196233
+ }
196234
+ if (typeof len === 'number') {
196235
+ if (len <= 0) {
196236
+ return '';
196237
+ }
196238
+ finish = len > chars.length - start ? chars.length : start + len;
196239
+ }
196240
+
196241
+ const sanitized = chars.slice(start, finish).map((code) => (isInvalidXmlCodePoint(code) ? 0xfffd : code));
196242
+ const CHUNK = 0x8000;
196243
+ let out = '';
196244
+ for (let i = 0; i < sanitized.length; i += CHUNK) {
196245
+ out += String.fromCodePoint.apply(null, sanitized.slice(i, i + CHUNK));
196246
+ }
196247
+
196248
+ return out
196210
196249
  .replace(/&/g, '&amp;')
196211
196250
  .replace(/</g, '&lt;')
196212
196251
  .replace(/>/g, '&gt;')
196213
196252
  .replace(/'/g, '&apos;')
196214
- .replace(/"/g, '&quot;'),
196253
+ .replace(/"/g, '&quot;');
196254
+ },
196215
196255
  };
196216
196256
 
196217
196257
  const identifiers = {