@grexx/grexxlinter 0.2.1429 → 0.2.1960
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/cli.js +117 -21
- package/lsp.js +116 -20
- package/package.json +1 -1
- package/schemas/casetype.schema.json +37 -0
package/cli.js
CHANGED
|
@@ -10434,15 +10434,16 @@ var require_data = __commonJS({
|
|
|
10434
10434
|
}
|
|
10435
10435
|
});
|
|
10436
10436
|
|
|
10437
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
10437
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/utils.js
|
|
10438
10438
|
var require_utils = __commonJS({
|
|
10439
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
10439
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
10440
10440
|
"use strict";
|
|
10441
10441
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
10442
10442
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
10443
10443
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
10444
10444
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
10445
10445
|
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
10446
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);
|
|
10446
10447
|
function stringArrayToHexStripped(input) {
|
|
10447
10448
|
let acc = "";
|
|
10448
10449
|
let code = 0;
|
|
@@ -10585,7 +10586,7 @@ var require_utils = __commonJS({
|
|
|
10585
10586
|
continue;
|
|
10586
10587
|
}
|
|
10587
10588
|
} else if (input[0] === "/") {
|
|
10588
|
-
if (input[1] === "."
|
|
10589
|
+
if (input[1] === ".") {
|
|
10589
10590
|
output.push("/");
|
|
10590
10591
|
break;
|
|
10591
10592
|
}
|
|
@@ -10667,10 +10668,30 @@ var require_utils = __commonJS({
|
|
|
10667
10668
|
}
|
|
10668
10669
|
return output;
|
|
10669
10670
|
}
|
|
10671
|
+
var BYTE_HEX = new Array(256);
|
|
10672
|
+
{
|
|
10673
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
10674
|
+
for (let i = 0; i < 256; i++) {
|
|
10675
|
+
BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
10676
|
+
}
|
|
10677
|
+
}
|
|
10678
|
+
function isEscapeSafe(cp) {
|
|
10679
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
10680
|
+
}
|
|
10681
|
+
function percentEncodeNonAscii(cp) {
|
|
10682
|
+
if (cp < 2048) {
|
|
10683
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
10684
|
+
}
|
|
10685
|
+
if (cp < 65536) {
|
|
10686
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
10687
|
+
}
|
|
10688
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
10689
|
+
}
|
|
10670
10690
|
function normalizePathEncoding(input) {
|
|
10671
10691
|
let output = "";
|
|
10672
10692
|
for (let i = 0; i < input.length; i++) {
|
|
10673
|
-
|
|
10693
|
+
const ch = input[i];
|
|
10694
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
10674
10695
|
const hex = input.slice(i + 1, i + 3);
|
|
10675
10696
|
if (isHexPair(hex)) {
|
|
10676
10697
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -10684,10 +10705,66 @@ var require_utils = __commonJS({
|
|
|
10684
10705
|
continue;
|
|
10685
10706
|
}
|
|
10686
10707
|
}
|
|
10687
|
-
if (isPathCharacter(
|
|
10688
|
-
output +=
|
|
10708
|
+
if (isPathCharacter(ch)) {
|
|
10709
|
+
output += ch;
|
|
10689
10710
|
} else {
|
|
10690
|
-
|
|
10711
|
+
const code = input.charCodeAt(i);
|
|
10712
|
+
if (code < 128) {
|
|
10713
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
10714
|
+
} else if (code < 55296 || code > 57343) {
|
|
10715
|
+
output += percentEncodeNonAscii(code);
|
|
10716
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
10717
|
+
const low = input.charCodeAt(i + 1);
|
|
10718
|
+
if (low >= 56320 && low <= 57343) {
|
|
10719
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
10720
|
+
i++;
|
|
10721
|
+
} else {
|
|
10722
|
+
output += percentEncodeNonAscii(65533);
|
|
10723
|
+
}
|
|
10724
|
+
} else {
|
|
10725
|
+
output += percentEncodeNonAscii(65533);
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
}
|
|
10729
|
+
return output;
|
|
10730
|
+
}
|
|
10731
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
10732
|
+
let output = "";
|
|
10733
|
+
for (let i = 0; i < input.length; i++) {
|
|
10734
|
+
const ch = input[i];
|
|
10735
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
10736
|
+
const hex = input.slice(i + 1, i + 3);
|
|
10737
|
+
if (isHexPair(hex)) {
|
|
10738
|
+
const normalizedHex = hex.toUpperCase();
|
|
10739
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
10740
|
+
if (isUnreserved(decoded)) {
|
|
10741
|
+
output += decoded;
|
|
10742
|
+
} else {
|
|
10743
|
+
output += "%" + normalizedHex;
|
|
10744
|
+
}
|
|
10745
|
+
i += 2;
|
|
10746
|
+
continue;
|
|
10747
|
+
}
|
|
10748
|
+
}
|
|
10749
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
10750
|
+
output += ch;
|
|
10751
|
+
} else {
|
|
10752
|
+
const code = input.charCodeAt(i);
|
|
10753
|
+
if (code < 128) {
|
|
10754
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
10755
|
+
} else if (code < 55296 || code > 57343) {
|
|
10756
|
+
output += percentEncodeNonAscii(code);
|
|
10757
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
10758
|
+
const low = input.charCodeAt(i + 1);
|
|
10759
|
+
if (low >= 56320 && low <= 57343) {
|
|
10760
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
10761
|
+
i++;
|
|
10762
|
+
} else {
|
|
10763
|
+
output += percentEncodeNonAscii(65533);
|
|
10764
|
+
}
|
|
10765
|
+
} else {
|
|
10766
|
+
output += percentEncodeNonAscii(65533);
|
|
10767
|
+
}
|
|
10691
10768
|
}
|
|
10692
10769
|
}
|
|
10693
10770
|
return output;
|
|
@@ -10695,7 +10772,8 @@ var require_utils = __commonJS({
|
|
|
10695
10772
|
function escapePreservingEscapes(input) {
|
|
10696
10773
|
let output = "";
|
|
10697
10774
|
for (let i = 0; i < input.length; i++) {
|
|
10698
|
-
|
|
10775
|
+
const ch = input[i];
|
|
10776
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
10699
10777
|
const hex = input.slice(i + 1, i + 3);
|
|
10700
10778
|
if (isHexPair(hex)) {
|
|
10701
10779
|
output += "%" + hex.toUpperCase();
|
|
@@ -10703,7 +10781,22 @@ var require_utils = __commonJS({
|
|
|
10703
10781
|
continue;
|
|
10704
10782
|
}
|
|
10705
10783
|
}
|
|
10706
|
-
|
|
10784
|
+
const code = input.charCodeAt(i);
|
|
10785
|
+
if (code < 128) {
|
|
10786
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
10787
|
+
} else if (code < 55296 || code > 57343) {
|
|
10788
|
+
output += percentEncodeNonAscii(code);
|
|
10789
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
10790
|
+
const low = input.charCodeAt(i + 1);
|
|
10791
|
+
if (low >= 56320 && low <= 57343) {
|
|
10792
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
10793
|
+
i++;
|
|
10794
|
+
} else {
|
|
10795
|
+
output += percentEncodeNonAscii(65533);
|
|
10796
|
+
}
|
|
10797
|
+
} else {
|
|
10798
|
+
output += percentEncodeNonAscii(65533);
|
|
10799
|
+
}
|
|
10707
10800
|
}
|
|
10708
10801
|
return output;
|
|
10709
10802
|
}
|
|
@@ -10737,6 +10830,7 @@ var require_utils = __commonJS({
|
|
|
10737
10830
|
reescapeHostDelimiters,
|
|
10738
10831
|
normalizePercentEncoding,
|
|
10739
10832
|
normalizePathEncoding,
|
|
10833
|
+
normalizeQueryFragmentEncoding,
|
|
10740
10834
|
escapePreservingEscapes,
|
|
10741
10835
|
removeDotSegments,
|
|
10742
10836
|
isIPv4,
|
|
@@ -10747,9 +10841,9 @@ var require_utils = __commonJS({
|
|
|
10747
10841
|
}
|
|
10748
10842
|
});
|
|
10749
10843
|
|
|
10750
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
10844
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/schemes.js
|
|
10751
10845
|
var require_schemes = __commonJS({
|
|
10752
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
10846
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
10753
10847
|
"use strict";
|
|
10754
10848
|
var { isUUID } = require_utils();
|
|
10755
10849
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -10957,11 +11051,11 @@ var require_schemes = __commonJS({
|
|
|
10957
11051
|
}
|
|
10958
11052
|
});
|
|
10959
11053
|
|
|
10960
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
11054
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/index.js
|
|
10961
11055
|
var require_fast_uri = __commonJS({
|
|
10962
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
11056
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/index.js"(exports, module) {
|
|
10963
11057
|
"use strict";
|
|
10964
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
11058
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, normalizeQueryFragmentEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
10965
11059
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
10966
11060
|
function normalize(uri, options) {
|
|
10967
11061
|
if (typeof uri === "string") {
|
|
@@ -11157,7 +11251,7 @@ var require_fast_uri = __commonJS({
|
|
|
11157
11251
|
}
|
|
11158
11252
|
const matches = uri.match(URI_PARSE);
|
|
11159
11253
|
if (matches) {
|
|
11160
|
-
parsed.scheme = matches[1];
|
|
11254
|
+
parsed.scheme = matches[1] === void 0 ? void 0 : matches[1].toLowerCase();
|
|
11161
11255
|
parsed.userinfo = matches[3];
|
|
11162
11256
|
parsed.host = matches[4];
|
|
11163
11257
|
parsed.port = parseInt(matches[5], 10);
|
|
@@ -11216,12 +11310,11 @@ var require_fast_uri = __commonJS({
|
|
|
11216
11310
|
if (parsed.path) {
|
|
11217
11311
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
11218
11312
|
}
|
|
11313
|
+
if (parsed.query) {
|
|
11314
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
11315
|
+
}
|
|
11219
11316
|
if (parsed.fragment) {
|
|
11220
|
-
|
|
11221
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
11222
|
-
} catch {
|
|
11223
|
-
parsed.error = parsed.error || "URI malformed";
|
|
11224
|
-
}
|
|
11317
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
11225
11318
|
}
|
|
11226
11319
|
}
|
|
11227
11320
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -14634,6 +14727,9 @@ var DEFAULT_RULE_SEVERITY = {
|
|
|
14634
14727
|
"invalid-reference": "error",
|
|
14635
14728
|
"unknown-casetype": "warning",
|
|
14636
14729
|
"parse-error": "error",
|
|
14730
|
+
// A warning, not an error: a red test is a statement about the SCRIPT, and the
|
|
14731
|
+
// write gate must not make a casetype unsaveable because its code is mid-fix.
|
|
14732
|
+
"scripted-test-failed": "warning",
|
|
14637
14733
|
schema: "error"
|
|
14638
14734
|
};
|
|
14639
14735
|
var DEFAULT_LINTER_SETTINGS = {
|
|
@@ -15152,7 +15248,7 @@ function toJSOrError(doc) {
|
|
|
15152
15248
|
// src/cli.ts
|
|
15153
15249
|
var PARALLEL_THRESHOLD = 200;
|
|
15154
15250
|
var MAX_WORKERS = 8;
|
|
15155
|
-
var VERSION = "0.2.
|
|
15251
|
+
var VERSION = "0.2.1960";
|
|
15156
15252
|
function isNewer(latest, current) {
|
|
15157
15253
|
const a = latest.split(".").map(Number);
|
|
15158
15254
|
const b = current.split(".").map(Number);
|
package/lsp.js
CHANGED
|
@@ -19284,15 +19284,16 @@ var require_data = __commonJS({
|
|
|
19284
19284
|
}
|
|
19285
19285
|
});
|
|
19286
19286
|
|
|
19287
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
19287
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/utils.js
|
|
19288
19288
|
var require_utils = __commonJS({
|
|
19289
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
19289
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
19290
19290
|
"use strict";
|
|
19291
19291
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
19292
19292
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
19293
19293
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
19294
19294
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
19295
19295
|
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
19296
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);
|
|
19296
19297
|
function stringArrayToHexStripped(input) {
|
|
19297
19298
|
let acc = "";
|
|
19298
19299
|
let code = 0;
|
|
@@ -19435,7 +19436,7 @@ var require_utils = __commonJS({
|
|
|
19435
19436
|
continue;
|
|
19436
19437
|
}
|
|
19437
19438
|
} else if (input[0] === "/") {
|
|
19438
|
-
if (input[1] === "."
|
|
19439
|
+
if (input[1] === ".") {
|
|
19439
19440
|
output.push("/");
|
|
19440
19441
|
break;
|
|
19441
19442
|
}
|
|
@@ -19517,10 +19518,30 @@ var require_utils = __commonJS({
|
|
|
19517
19518
|
}
|
|
19518
19519
|
return output;
|
|
19519
19520
|
}
|
|
19521
|
+
var BYTE_HEX = new Array(256);
|
|
19522
|
+
{
|
|
19523
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
19524
|
+
for (let i = 0; i < 256; i++) {
|
|
19525
|
+
BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
19526
|
+
}
|
|
19527
|
+
}
|
|
19528
|
+
function isEscapeSafe(cp) {
|
|
19529
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
19530
|
+
}
|
|
19531
|
+
function percentEncodeNonAscii(cp) {
|
|
19532
|
+
if (cp < 2048) {
|
|
19533
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
19534
|
+
}
|
|
19535
|
+
if (cp < 65536) {
|
|
19536
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
19537
|
+
}
|
|
19538
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
19539
|
+
}
|
|
19520
19540
|
function normalizePathEncoding(input) {
|
|
19521
19541
|
let output = "";
|
|
19522
19542
|
for (let i = 0; i < input.length; i++) {
|
|
19523
|
-
|
|
19543
|
+
const ch = input[i];
|
|
19544
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
19524
19545
|
const hex = input.slice(i + 1, i + 3);
|
|
19525
19546
|
if (isHexPair(hex)) {
|
|
19526
19547
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -19534,10 +19555,66 @@ var require_utils = __commonJS({
|
|
|
19534
19555
|
continue;
|
|
19535
19556
|
}
|
|
19536
19557
|
}
|
|
19537
|
-
if (isPathCharacter(
|
|
19538
|
-
output +=
|
|
19558
|
+
if (isPathCharacter(ch)) {
|
|
19559
|
+
output += ch;
|
|
19539
19560
|
} else {
|
|
19540
|
-
|
|
19561
|
+
const code = input.charCodeAt(i);
|
|
19562
|
+
if (code < 128) {
|
|
19563
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
19564
|
+
} else if (code < 55296 || code > 57343) {
|
|
19565
|
+
output += percentEncodeNonAscii(code);
|
|
19566
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
19567
|
+
const low = input.charCodeAt(i + 1);
|
|
19568
|
+
if (low >= 56320 && low <= 57343) {
|
|
19569
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
19570
|
+
i++;
|
|
19571
|
+
} else {
|
|
19572
|
+
output += percentEncodeNonAscii(65533);
|
|
19573
|
+
}
|
|
19574
|
+
} else {
|
|
19575
|
+
output += percentEncodeNonAscii(65533);
|
|
19576
|
+
}
|
|
19577
|
+
}
|
|
19578
|
+
}
|
|
19579
|
+
return output;
|
|
19580
|
+
}
|
|
19581
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
19582
|
+
let output = "";
|
|
19583
|
+
for (let i = 0; i < input.length; i++) {
|
|
19584
|
+
const ch = input[i];
|
|
19585
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
19586
|
+
const hex = input.slice(i + 1, i + 3);
|
|
19587
|
+
if (isHexPair(hex)) {
|
|
19588
|
+
const normalizedHex = hex.toUpperCase();
|
|
19589
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
19590
|
+
if (isUnreserved(decoded)) {
|
|
19591
|
+
output += decoded;
|
|
19592
|
+
} else {
|
|
19593
|
+
output += "%" + normalizedHex;
|
|
19594
|
+
}
|
|
19595
|
+
i += 2;
|
|
19596
|
+
continue;
|
|
19597
|
+
}
|
|
19598
|
+
}
|
|
19599
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
19600
|
+
output += ch;
|
|
19601
|
+
} else {
|
|
19602
|
+
const code = input.charCodeAt(i);
|
|
19603
|
+
if (code < 128) {
|
|
19604
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
19605
|
+
} else if (code < 55296 || code > 57343) {
|
|
19606
|
+
output += percentEncodeNonAscii(code);
|
|
19607
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
19608
|
+
const low = input.charCodeAt(i + 1);
|
|
19609
|
+
if (low >= 56320 && low <= 57343) {
|
|
19610
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
19611
|
+
i++;
|
|
19612
|
+
} else {
|
|
19613
|
+
output += percentEncodeNonAscii(65533);
|
|
19614
|
+
}
|
|
19615
|
+
} else {
|
|
19616
|
+
output += percentEncodeNonAscii(65533);
|
|
19617
|
+
}
|
|
19541
19618
|
}
|
|
19542
19619
|
}
|
|
19543
19620
|
return output;
|
|
@@ -19545,7 +19622,8 @@ var require_utils = __commonJS({
|
|
|
19545
19622
|
function escapePreservingEscapes(input) {
|
|
19546
19623
|
let output = "";
|
|
19547
19624
|
for (let i = 0; i < input.length; i++) {
|
|
19548
|
-
|
|
19625
|
+
const ch = input[i];
|
|
19626
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
19549
19627
|
const hex = input.slice(i + 1, i + 3);
|
|
19550
19628
|
if (isHexPair(hex)) {
|
|
19551
19629
|
output += "%" + hex.toUpperCase();
|
|
@@ -19553,7 +19631,22 @@ var require_utils = __commonJS({
|
|
|
19553
19631
|
continue;
|
|
19554
19632
|
}
|
|
19555
19633
|
}
|
|
19556
|
-
|
|
19634
|
+
const code = input.charCodeAt(i);
|
|
19635
|
+
if (code < 128) {
|
|
19636
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
19637
|
+
} else if (code < 55296 || code > 57343) {
|
|
19638
|
+
output += percentEncodeNonAscii(code);
|
|
19639
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
19640
|
+
const low = input.charCodeAt(i + 1);
|
|
19641
|
+
if (low >= 56320 && low <= 57343) {
|
|
19642
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
19643
|
+
i++;
|
|
19644
|
+
} else {
|
|
19645
|
+
output += percentEncodeNonAscii(65533);
|
|
19646
|
+
}
|
|
19647
|
+
} else {
|
|
19648
|
+
output += percentEncodeNonAscii(65533);
|
|
19649
|
+
}
|
|
19557
19650
|
}
|
|
19558
19651
|
return output;
|
|
19559
19652
|
}
|
|
@@ -19587,6 +19680,7 @@ var require_utils = __commonJS({
|
|
|
19587
19680
|
reescapeHostDelimiters,
|
|
19588
19681
|
normalizePercentEncoding,
|
|
19589
19682
|
normalizePathEncoding,
|
|
19683
|
+
normalizeQueryFragmentEncoding,
|
|
19590
19684
|
escapePreservingEscapes,
|
|
19591
19685
|
removeDotSegments,
|
|
19592
19686
|
isIPv4,
|
|
@@ -19597,9 +19691,9 @@ var require_utils = __commonJS({
|
|
|
19597
19691
|
}
|
|
19598
19692
|
});
|
|
19599
19693
|
|
|
19600
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
19694
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/schemes.js
|
|
19601
19695
|
var require_schemes = __commonJS({
|
|
19602
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
19696
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
19603
19697
|
"use strict";
|
|
19604
19698
|
var { isUUID } = require_utils();
|
|
19605
19699
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -19807,11 +19901,11 @@ var require_schemes = __commonJS({
|
|
|
19807
19901
|
}
|
|
19808
19902
|
});
|
|
19809
19903
|
|
|
19810
|
-
// ../../node_modules/.pnpm/fast-uri@
|
|
19904
|
+
// ../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/index.js
|
|
19811
19905
|
var require_fast_uri = __commonJS({
|
|
19812
|
-
"../../node_modules/.pnpm/fast-uri@
|
|
19906
|
+
"../../node_modules/.pnpm/fast-uri@4.1.2/node_modules/fast-uri/index.js"(exports, module) {
|
|
19813
19907
|
"use strict";
|
|
19814
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
19908
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, normalizeQueryFragmentEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
19815
19909
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
19816
19910
|
function normalize(uri, options) {
|
|
19817
19911
|
if (typeof uri === "string") {
|
|
@@ -20007,7 +20101,7 @@ var require_fast_uri = __commonJS({
|
|
|
20007
20101
|
}
|
|
20008
20102
|
const matches = uri.match(URI_PARSE);
|
|
20009
20103
|
if (matches) {
|
|
20010
|
-
parsed.scheme = matches[1];
|
|
20104
|
+
parsed.scheme = matches[1] === void 0 ? void 0 : matches[1].toLowerCase();
|
|
20011
20105
|
parsed.userinfo = matches[3];
|
|
20012
20106
|
parsed.host = matches[4];
|
|
20013
20107
|
parsed.port = parseInt(matches[5], 10);
|
|
@@ -20066,12 +20160,11 @@ var require_fast_uri = __commonJS({
|
|
|
20066
20160
|
if (parsed.path) {
|
|
20067
20161
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
20068
20162
|
}
|
|
20163
|
+
if (parsed.query) {
|
|
20164
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
20165
|
+
}
|
|
20069
20166
|
if (parsed.fragment) {
|
|
20070
|
-
|
|
20071
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
20072
|
-
} catch {
|
|
20073
|
-
parsed.error = parsed.error || "URI malformed";
|
|
20074
|
-
}
|
|
20167
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
20075
20168
|
}
|
|
20076
20169
|
}
|
|
20077
20170
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -23703,6 +23796,9 @@ var DEFAULT_RULE_SEVERITY = {
|
|
|
23703
23796
|
"invalid-reference": "error",
|
|
23704
23797
|
"unknown-casetype": "warning",
|
|
23705
23798
|
"parse-error": "error",
|
|
23799
|
+
// A warning, not an error: a red test is a statement about the SCRIPT, and the
|
|
23800
|
+
// write gate must not make a casetype unsaveable because its code is mid-fix.
|
|
23801
|
+
"scripted-test-failed": "warning",
|
|
23706
23802
|
schema: "error"
|
|
23707
23803
|
};
|
|
23708
23804
|
var DEFAULT_LINTER_SETTINGS = {
|
package/package.json
CHANGED
|
@@ -182,6 +182,43 @@
|
|
|
182
182
|
},
|
|
183
183
|
"uniqueItems": true,
|
|
184
184
|
"description": "Studio-only organisational labels, as plain strings. Assignable to a casetype, to the files inside a casetype (activity, view, form, attribute), and to platform-level assets. Root level only: the studio reads labels off the file root, never off a nested object. The platform-level registry (labelRegistry.yaml) supplies each label's colour and canonical casing but is not authoritative — a label may appear here without a registry entry."
|
|
185
|
+
},
|
|
186
|
+
"scriptedTests": {
|
|
187
|
+
"$comment": "Saved test runs of a `type: scripted` casetype (the scripted systemservice). L2 declares scriptedCode/scriptedDependencies/scriptedImportNames but not this list, so casetype.schema.json's `additionalProperties: false` reports every stored entry as an additional-field. The key set is the one the studio writes: `input` is the params dict handed to `run(params)`, `expectedResult` what the author asserts, `lastOutput` what the last run returned, `logs` that run's process-log lines. Payload dicts stay open — their keys are the casetype's own external references.",
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"properties": {
|
|
193
|
+
"_type": {
|
|
194
|
+
"const": "scriptedTest"
|
|
195
|
+
},
|
|
196
|
+
"_uid": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"name": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"input": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": true
|
|
205
|
+
},
|
|
206
|
+
"expectedResult": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"additionalProperties": true
|
|
209
|
+
},
|
|
210
|
+
"lastOutput": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": true
|
|
213
|
+
},
|
|
214
|
+
"logs": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
185
222
|
}
|
|
186
223
|
},
|
|
187
224
|
"required": [
|