@socketsecurity/lib 5.7.0 → 5.8.0
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 +29 -2
- package/README.md +190 -18
- package/dist/archives.d.ts +58 -0
- package/dist/archives.js +313 -0
- package/dist/arrays.js +2 -3
- package/dist/cache-with-ttl.js +21 -6
- package/dist/constants/node.js +2 -1
- package/dist/cover/formatters.js +5 -3
- package/dist/dlx/package.js +1 -1
- package/dist/external/@npmcli/package-json.js +352 -824
- package/dist/external/adm-zip.js +2695 -0
- package/dist/external/debug.js +183 -7
- package/dist/external/external-pack.js +19 -1409
- package/dist/external/libnpmexec.js +2 -2
- package/dist/external/npm-pack.js +18777 -19997
- package/dist/external/pico-pack.js +29 -5
- package/dist/external/spdx-pack.js +41 -263
- package/dist/external/tar-fs.js +3053 -0
- package/dist/git.js +22 -4
- package/dist/github.js +7 -8
- package/dist/globs.js +20 -1
- package/dist/http-request.js +1 -1
- package/dist/memoization.js +22 -13
- package/dist/package-extensions.js +4 -2
- package/dist/packages/normalize.js +3 -0
- package/dist/process-lock.js +4 -2
- package/dist/releases/github.d.ts +40 -0
- package/dist/releases/github.js +122 -22
- package/dist/spawn.js +1 -1
- package/dist/spinner.js +1 -1
- package/dist/stdio/progress.js +2 -2
- package/package.json +38 -15
|
@@ -4403,9 +4403,9 @@ var require_reusify = __commonJS({
|
|
|
4403
4403
|
}
|
|
4404
4404
|
});
|
|
4405
4405
|
|
|
4406
|
-
// node_modules/.pnpm/fastq@1.
|
|
4406
|
+
// node_modules/.pnpm/fastq@1.20.1/node_modules/fastq/queue.js
|
|
4407
4407
|
var require_queue = __commonJS({
|
|
4408
|
-
"node_modules/.pnpm/fastq@1.
|
|
4408
|
+
"node_modules/.pnpm/fastq@1.20.1/node_modules/fastq/queue.js"(exports2, module2) {
|
|
4409
4409
|
"use strict";
|
|
4410
4410
|
var reusify = require_reusify();
|
|
4411
4411
|
function fastqueue(context, worker, _concurrency) {
|
|
@@ -4451,7 +4451,8 @@ var require_queue = __commonJS({
|
|
|
4451
4451
|
empty: noop2,
|
|
4452
4452
|
kill,
|
|
4453
4453
|
killAndDrain,
|
|
4454
|
-
error
|
|
4454
|
+
error,
|
|
4455
|
+
abort
|
|
4455
4456
|
};
|
|
4456
4457
|
return self;
|
|
4457
4458
|
function running() {
|
|
@@ -4581,6 +4582,29 @@ var require_queue = __commonJS({
|
|
|
4581
4582
|
self.drain = noop2;
|
|
4582
4583
|
}
|
|
4583
4584
|
__name(killAndDrain, "killAndDrain");
|
|
4585
|
+
function abort() {
|
|
4586
|
+
var current = queueHead;
|
|
4587
|
+
queueHead = null;
|
|
4588
|
+
queueTail = null;
|
|
4589
|
+
while (current) {
|
|
4590
|
+
var next = current.next;
|
|
4591
|
+
var callback = current.callback;
|
|
4592
|
+
var errorHandler2 = current.errorHandler;
|
|
4593
|
+
var val = current.value;
|
|
4594
|
+
var context2 = current.context;
|
|
4595
|
+
current.value = null;
|
|
4596
|
+
current.callback = noop2;
|
|
4597
|
+
current.errorHandler = null;
|
|
4598
|
+
if (errorHandler2) {
|
|
4599
|
+
errorHandler2(new Error("abort"), val);
|
|
4600
|
+
}
|
|
4601
|
+
callback.call(context2, new Error("abort"));
|
|
4602
|
+
current.release(current);
|
|
4603
|
+
current = next;
|
|
4604
|
+
}
|
|
4605
|
+
self.drain = noop2;
|
|
4606
|
+
}
|
|
4607
|
+
__name(abort, "abort");
|
|
4584
4608
|
function error(handler) {
|
|
4585
4609
|
errorHandler = handler;
|
|
4586
4610
|
}
|
|
@@ -6828,7 +6852,7 @@ var init_is_path_inside = __esm({
|
|
|
6828
6852
|
}
|
|
6829
6853
|
});
|
|
6830
6854
|
|
|
6831
|
-
// node_modules/.pnpm/p-map@7.0.
|
|
6855
|
+
// node_modules/.pnpm/p-map@7.0.4/node_modules/p-map/index.js
|
|
6832
6856
|
async function pMap(iterable, mapper, {
|
|
6833
6857
|
concurrency = Number.POSITIVE_INFINITY,
|
|
6834
6858
|
stopOnError = true,
|
|
@@ -6951,7 +6975,7 @@ async function pMap(iterable, mapper, {
|
|
|
6951
6975
|
}
|
|
6952
6976
|
var pMapSkip;
|
|
6953
6977
|
var init_p_map = __esm({
|
|
6954
|
-
"node_modules/.pnpm/p-map@7.0.
|
|
6978
|
+
"node_modules/.pnpm/p-map@7.0.4/node_modules/p-map/index.js"() {
|
|
6955
6979
|
__name(pMap, "pMap");
|
|
6956
6980
|
pMapSkip = Symbol("skip");
|
|
6957
6981
|
}
|
|
@@ -11,9 +11,9 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
11
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/spdx-license-ids@3.0.
|
|
14
|
+
// node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/index.json
|
|
15
15
|
var require_spdx_license_ids = __commonJS({
|
|
16
|
-
"node_modules/.pnpm/spdx-license-ids@3.0.
|
|
16
|
+
"node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/index.json"(exports2, module2) {
|
|
17
17
|
module2.exports = [
|
|
18
18
|
"0BSD",
|
|
19
19
|
"3D-Slicer-1.0",
|
|
@@ -28,6 +28,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
28
28
|
"AGPL-1.0-or-later",
|
|
29
29
|
"AGPL-3.0-only",
|
|
30
30
|
"AGPL-3.0-or-later",
|
|
31
|
+
"ALGLIB-Documentation",
|
|
31
32
|
"AMD-newlib",
|
|
32
33
|
"AMDPLPA",
|
|
33
34
|
"AML",
|
|
@@ -49,6 +50,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
49
50
|
"Adobe-Display-PostScript",
|
|
50
51
|
"Adobe-Glyph",
|
|
51
52
|
"Adobe-Utopia",
|
|
53
|
+
"Advanced-Cryptics-Dictionary",
|
|
52
54
|
"Afmparse",
|
|
53
55
|
"Aladdin",
|
|
54
56
|
"Apache-1.0",
|
|
@@ -62,6 +64,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
62
64
|
"Artistic-2.0",
|
|
63
65
|
"Artistic-dist",
|
|
64
66
|
"Aspell-RU",
|
|
67
|
+
"BOLA-1.1",
|
|
65
68
|
"BSD-1-Clause",
|
|
66
69
|
"BSD-2-Clause",
|
|
67
70
|
"BSD-2-Clause-Darwin",
|
|
@@ -81,6 +84,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
81
84
|
"BSD-3-Clause-No-Nuclear-Warranty",
|
|
82
85
|
"BSD-3-Clause-Open-MPI",
|
|
83
86
|
"BSD-3-Clause-Sun",
|
|
87
|
+
"BSD-3-Clause-Tso",
|
|
84
88
|
"BSD-3-Clause-acpica",
|
|
85
89
|
"BSD-3-Clause-flex",
|
|
86
90
|
"BSD-4-Clause",
|
|
@@ -91,6 +95,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
91
95
|
"BSD-Advertising-Acknowledgement",
|
|
92
96
|
"BSD-Attribution-HPND-disclaimer",
|
|
93
97
|
"BSD-Inferno-Nettverk",
|
|
98
|
+
"BSD-Mark-Modifications",
|
|
94
99
|
"BSD-Protection",
|
|
95
100
|
"BSD-Source-Code",
|
|
96
101
|
"BSD-Source-beginning-file",
|
|
@@ -112,9 +117,11 @@ var require_spdx_license_ids = __commonJS({
|
|
|
112
117
|
"Borceux",
|
|
113
118
|
"Brian-Gladman-2-Clause",
|
|
114
119
|
"Brian-Gladman-3-Clause",
|
|
120
|
+
"Buddy",
|
|
115
121
|
"C-UDA-1.0",
|
|
116
122
|
"CAL-1.0",
|
|
117
123
|
"CAL-1.0-Combined-Work-Exception",
|
|
124
|
+
"CAPEC-tou",
|
|
118
125
|
"CATOSL-1.1",
|
|
119
126
|
"CC-BY-1.0",
|
|
120
127
|
"CC-BY-2.0",
|
|
@@ -232,6 +239,9 @@ var require_spdx_license_ids = __commonJS({
|
|
|
232
239
|
"EPICS",
|
|
233
240
|
"EPL-1.0",
|
|
234
241
|
"EPL-2.0",
|
|
242
|
+
"ESA-PL-permissive-2.4",
|
|
243
|
+
"ESA-PL-strong-copyleft-2.4",
|
|
244
|
+
"ESA-PL-weak-copyleft-2.4",
|
|
235
245
|
"EUDatagrid",
|
|
236
246
|
"EUPL-1.0",
|
|
237
247
|
"EUPL-1.1",
|
|
@@ -305,6 +315,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
305
315
|
"HPND-Markus-Kuhn",
|
|
306
316
|
"HPND-Netrek",
|
|
307
317
|
"HPND-Pbmplus",
|
|
318
|
+
"HPND-SMC",
|
|
308
319
|
"HPND-UC",
|
|
309
320
|
"HPND-UC-export-US",
|
|
310
321
|
"HPND-doc",
|
|
@@ -319,6 +330,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
319
330
|
"HPND-sell-variant",
|
|
320
331
|
"HPND-sell-variant-MIT-disclaimer",
|
|
321
332
|
"HPND-sell-variant-MIT-disclaimer-rev",
|
|
333
|
+
"HPND-sell-variant-critical-systems",
|
|
322
334
|
"HTMLTIDY",
|
|
323
335
|
"HaskellReport",
|
|
324
336
|
"Hippocratic-2.1",
|
|
@@ -331,6 +343,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
331
343
|
"IPL-1.0",
|
|
332
344
|
"ISC",
|
|
333
345
|
"ISC-Veillard",
|
|
346
|
+
"ISO-permission",
|
|
334
347
|
"ImageMagick",
|
|
335
348
|
"Imlib2",
|
|
336
349
|
"Info-ZIP",
|
|
@@ -388,6 +401,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
388
401
|
"MIT-Festival",
|
|
389
402
|
"MIT-Khronos-old",
|
|
390
403
|
"MIT-Modern-Variant",
|
|
404
|
+
"MIT-STK",
|
|
391
405
|
"MIT-Wu",
|
|
392
406
|
"MIT-advertising",
|
|
393
407
|
"MIT-enna",
|
|
@@ -396,6 +410,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
396
410
|
"MIT-testregex",
|
|
397
411
|
"MITNFA",
|
|
398
412
|
"MMIXware",
|
|
413
|
+
"MMPL-1.0.1",
|
|
399
414
|
"MPEG-SSG",
|
|
400
415
|
"MPL-1.0",
|
|
401
416
|
"MPL-1.1",
|
|
@@ -427,6 +442,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
427
442
|
"NGPL",
|
|
428
443
|
"NICTA-1.0",
|
|
429
444
|
"NIST-PD",
|
|
445
|
+
"NIST-PD-TNT",
|
|
430
446
|
"NIST-PD-fallback",
|
|
431
447
|
"NIST-Software",
|
|
432
448
|
"NLOD-1.0",
|
|
@@ -486,12 +502,15 @@ var require_spdx_license_ids = __commonJS({
|
|
|
486
502
|
"OPL-1.0",
|
|
487
503
|
"OPL-UK-3.0",
|
|
488
504
|
"OPUBL-1.0",
|
|
505
|
+
"OSC-1.0",
|
|
489
506
|
"OSET-PL-2.1",
|
|
490
507
|
"OSL-1.0",
|
|
491
508
|
"OSL-1.1",
|
|
492
509
|
"OSL-2.0",
|
|
493
510
|
"OSL-2.1",
|
|
494
511
|
"OSL-3.0",
|
|
512
|
+
"OSSP",
|
|
513
|
+
"OpenMDW-1.0",
|
|
495
514
|
"OpenPBS-2.3",
|
|
496
515
|
"OpenSSL",
|
|
497
516
|
"OpenSSL-standalone",
|
|
@@ -502,6 +521,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
502
521
|
"PHP-3.01",
|
|
503
522
|
"PPL",
|
|
504
523
|
"PSF-2.0",
|
|
524
|
+
"ParaType-Free-Font-1.3",
|
|
505
525
|
"Parity-6.0.0",
|
|
506
526
|
"Parity-7.0.0",
|
|
507
527
|
"Pixar",
|
|
@@ -530,6 +550,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
530
550
|
"SGI-B-1.1",
|
|
531
551
|
"SGI-B-2.0",
|
|
532
552
|
"SGI-OpenGL",
|
|
553
|
+
"SGMLUG-PM",
|
|
533
554
|
"SGP4",
|
|
534
555
|
"SHL-0.5",
|
|
535
556
|
"SHL-0.51",
|
|
@@ -577,6 +598,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
577
598
|
"TTYP0",
|
|
578
599
|
"TU-Berlin-1.0",
|
|
579
600
|
"TU-Berlin-2.0",
|
|
601
|
+
"TekHVC",
|
|
580
602
|
"TermReadKey",
|
|
581
603
|
"ThirdEye",
|
|
582
604
|
"TrustedQSL",
|
|
@@ -586,6 +608,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
586
608
|
"UPL-1.0",
|
|
587
609
|
"URT-RLE",
|
|
588
610
|
"Ubuntu-font-1.0",
|
|
611
|
+
"UnRAR",
|
|
589
612
|
"Unicode-3.0",
|
|
590
613
|
"Unicode-DFS-2015",
|
|
591
614
|
"Unicode-DFS-2016",
|
|
@@ -597,15 +620,19 @@ var require_spdx_license_ids = __commonJS({
|
|
|
597
620
|
"VOSTROM",
|
|
598
621
|
"VSL-1.0",
|
|
599
622
|
"Vim",
|
|
623
|
+
"Vixie-Cron",
|
|
600
624
|
"W3C",
|
|
601
625
|
"W3C-19980720",
|
|
602
626
|
"W3C-20150513",
|
|
627
|
+
"WTFNMFPL",
|
|
603
628
|
"WTFPL",
|
|
604
629
|
"Watcom-1.0",
|
|
605
630
|
"Widget-Workshop",
|
|
631
|
+
"WordNet",
|
|
606
632
|
"Wsuipa",
|
|
607
633
|
"X11",
|
|
608
634
|
"X11-distribute-modifications-variant",
|
|
635
|
+
"X11-no-permit-persons",
|
|
609
636
|
"X11-swapped",
|
|
610
637
|
"XFree86-1.1",
|
|
611
638
|
"XSkat",
|
|
@@ -646,6 +673,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
646
673
|
"gnuplot",
|
|
647
674
|
"gtkbook",
|
|
648
675
|
"hdparm",
|
|
676
|
+
"hyphen-bulgarian",
|
|
649
677
|
"iMatix",
|
|
650
678
|
"jove",
|
|
651
679
|
"libpng-1.6.35",
|
|
@@ -686,9 +714,9 @@ var require_spdx_license_ids = __commonJS({
|
|
|
686
714
|
}
|
|
687
715
|
});
|
|
688
716
|
|
|
689
|
-
// node_modules/.pnpm/spdx-license-ids@3.0.
|
|
717
|
+
// node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/deprecated.json
|
|
690
718
|
var require_deprecated = __commonJS({
|
|
691
|
-
"node_modules/.pnpm/spdx-license-ids@3.0.
|
|
719
|
+
"node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/deprecated.json"(exports2, module2) {
|
|
692
720
|
module2.exports = [
|
|
693
721
|
"AGPL-1.0",
|
|
694
722
|
"AGPL-3.0",
|
|
@@ -794,9 +822,9 @@ var require_spdx_exceptions = __commonJS({
|
|
|
794
822
|
}
|
|
795
823
|
});
|
|
796
824
|
|
|
797
|
-
// node_modules/.pnpm/spdx-expression-parse@
|
|
825
|
+
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/scan.js
|
|
798
826
|
var require_scan = __commonJS({
|
|
799
|
-
"node_modules/.pnpm/spdx-expression-parse@
|
|
827
|
+
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/scan.js"(exports2, module2) {
|
|
800
828
|
"use strict";
|
|
801
829
|
var licenses = [].concat(require_spdx_license_ids()).concat(require_deprecated());
|
|
802
830
|
var exceptions = require_spdx_exceptions();
|
|
@@ -828,7 +856,7 @@ var require_scan = __commonJS({
|
|
|
828
856
|
__name(skipWhitespace, "skipWhitespace");
|
|
829
857
|
function operator() {
|
|
830
858
|
var string;
|
|
831
|
-
var possibilities = [
|
|
859
|
+
var possibilities = [/^WITH/i, /^AND/i, /^OR/i, "(", ")", ":", "+"];
|
|
832
860
|
for (var i = 0; i < possibilities.length; i++) {
|
|
833
861
|
string = read(possibilities[i]);
|
|
834
862
|
if (string) {
|
|
@@ -840,7 +868,7 @@ var require_scan = __commonJS({
|
|
|
840
868
|
}
|
|
841
869
|
return string && {
|
|
842
870
|
type: "OPERATOR",
|
|
843
|
-
string
|
|
871
|
+
string: string.toUpperCase()
|
|
844
872
|
};
|
|
845
873
|
}
|
|
846
874
|
__name(operator, "operator");
|
|
@@ -908,9 +936,9 @@ var require_scan = __commonJS({
|
|
|
908
936
|
}
|
|
909
937
|
});
|
|
910
938
|
|
|
911
|
-
// node_modules/.pnpm/spdx-expression-parse@
|
|
939
|
+
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/parse.js
|
|
912
940
|
var require_parse = __commonJS({
|
|
913
|
-
"node_modules/.pnpm/spdx-expression-parse@
|
|
941
|
+
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/parse.js"(exports2, module2) {
|
|
914
942
|
"use strict";
|
|
915
943
|
module2.exports = function(tokens) {
|
|
916
944
|
var index = 0;
|
|
@@ -1032,9 +1060,9 @@ var require_parse = __commonJS({
|
|
|
1032
1060
|
}
|
|
1033
1061
|
});
|
|
1034
1062
|
|
|
1035
|
-
// node_modules/.pnpm/spdx-expression-parse@
|
|
1063
|
+
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/index.js
|
|
1036
1064
|
var require_spdx_expression_parse = __commonJS({
|
|
1037
|
-
"node_modules/.pnpm/spdx-expression-parse@
|
|
1065
|
+
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/index.js"(exports2, module2) {
|
|
1038
1066
|
"use strict";
|
|
1039
1067
|
var scan = require_scan();
|
|
1040
1068
|
var parse = require_parse();
|
|
@@ -1381,259 +1409,9 @@ var require_spdx_correct = __commonJS({
|
|
|
1381
1409
|
}
|
|
1382
1410
|
});
|
|
1383
1411
|
|
|
1384
|
-
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/scan.js
|
|
1385
|
-
var require_scan2 = __commonJS({
|
|
1386
|
-
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/scan.js"(exports2, module2) {
|
|
1387
|
-
"use strict";
|
|
1388
|
-
var licenses = [].concat(require_spdx_license_ids()).concat(require_deprecated());
|
|
1389
|
-
var exceptions = require_spdx_exceptions();
|
|
1390
|
-
module2.exports = function(source) {
|
|
1391
|
-
var index = 0;
|
|
1392
|
-
function hasMore() {
|
|
1393
|
-
return index < source.length;
|
|
1394
|
-
}
|
|
1395
|
-
__name(hasMore, "hasMore");
|
|
1396
|
-
function read(value) {
|
|
1397
|
-
if (value instanceof RegExp) {
|
|
1398
|
-
var chars = source.slice(index);
|
|
1399
|
-
var match = chars.match(value);
|
|
1400
|
-
if (match) {
|
|
1401
|
-
index += match[0].length;
|
|
1402
|
-
return match[0];
|
|
1403
|
-
}
|
|
1404
|
-
} else {
|
|
1405
|
-
if (source.indexOf(value, index) === index) {
|
|
1406
|
-
index += value.length;
|
|
1407
|
-
return value;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
__name(read, "read");
|
|
1412
|
-
function skipWhitespace() {
|
|
1413
|
-
read(/[ ]*/);
|
|
1414
|
-
}
|
|
1415
|
-
__name(skipWhitespace, "skipWhitespace");
|
|
1416
|
-
function operator() {
|
|
1417
|
-
var string;
|
|
1418
|
-
var possibilities = [/^WITH/i, /^AND/i, /^OR/i, "(", ")", ":", "+"];
|
|
1419
|
-
for (var i = 0; i < possibilities.length; i++) {
|
|
1420
|
-
string = read(possibilities[i]);
|
|
1421
|
-
if (string) {
|
|
1422
|
-
break;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
if (string === "+" && index > 1 && source[index - 2] === " ") {
|
|
1426
|
-
throw new Error("Space before `+`");
|
|
1427
|
-
}
|
|
1428
|
-
return string && {
|
|
1429
|
-
type: "OPERATOR",
|
|
1430
|
-
string: string.toUpperCase()
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
__name(operator, "operator");
|
|
1434
|
-
function idstring() {
|
|
1435
|
-
return read(/[A-Za-z0-9-.]+/);
|
|
1436
|
-
}
|
|
1437
|
-
__name(idstring, "idstring");
|
|
1438
|
-
function expectIdstring() {
|
|
1439
|
-
var string = idstring();
|
|
1440
|
-
if (!string) {
|
|
1441
|
-
throw new Error("Expected idstring at offset " + index);
|
|
1442
|
-
}
|
|
1443
|
-
return string;
|
|
1444
|
-
}
|
|
1445
|
-
__name(expectIdstring, "expectIdstring");
|
|
1446
|
-
function documentRef() {
|
|
1447
|
-
if (read("DocumentRef-")) {
|
|
1448
|
-
var string = expectIdstring();
|
|
1449
|
-
return { type: "DOCUMENTREF", string };
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
__name(documentRef, "documentRef");
|
|
1453
|
-
function licenseRef() {
|
|
1454
|
-
if (read("LicenseRef-")) {
|
|
1455
|
-
var string = expectIdstring();
|
|
1456
|
-
return { type: "LICENSEREF", string };
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
__name(licenseRef, "licenseRef");
|
|
1460
|
-
function identifier() {
|
|
1461
|
-
var begin = index;
|
|
1462
|
-
var string = idstring();
|
|
1463
|
-
if (licenses.indexOf(string) !== -1) {
|
|
1464
|
-
return {
|
|
1465
|
-
type: "LICENSE",
|
|
1466
|
-
string
|
|
1467
|
-
};
|
|
1468
|
-
} else if (exceptions.indexOf(string) !== -1) {
|
|
1469
|
-
return {
|
|
1470
|
-
type: "EXCEPTION",
|
|
1471
|
-
string
|
|
1472
|
-
};
|
|
1473
|
-
}
|
|
1474
|
-
index = begin;
|
|
1475
|
-
}
|
|
1476
|
-
__name(identifier, "identifier");
|
|
1477
|
-
function parseToken() {
|
|
1478
|
-
return operator() || documentRef() || licenseRef() || identifier();
|
|
1479
|
-
}
|
|
1480
|
-
__name(parseToken, "parseToken");
|
|
1481
|
-
var tokens = [];
|
|
1482
|
-
while (hasMore()) {
|
|
1483
|
-
skipWhitespace();
|
|
1484
|
-
if (!hasMore()) {
|
|
1485
|
-
break;
|
|
1486
|
-
}
|
|
1487
|
-
var token = parseToken();
|
|
1488
|
-
if (!token) {
|
|
1489
|
-
throw new Error("Unexpected `" + source[index] + "` at offset " + index);
|
|
1490
|
-
}
|
|
1491
|
-
tokens.push(token);
|
|
1492
|
-
}
|
|
1493
|
-
return tokens;
|
|
1494
|
-
};
|
|
1495
|
-
}
|
|
1496
|
-
});
|
|
1497
|
-
|
|
1498
|
-
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/parse.js
|
|
1499
|
-
var require_parse2 = __commonJS({
|
|
1500
|
-
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/parse.js"(exports2, module2) {
|
|
1501
|
-
"use strict";
|
|
1502
|
-
module2.exports = function(tokens) {
|
|
1503
|
-
var index = 0;
|
|
1504
|
-
function hasMore() {
|
|
1505
|
-
return index < tokens.length;
|
|
1506
|
-
}
|
|
1507
|
-
__name(hasMore, "hasMore");
|
|
1508
|
-
function token() {
|
|
1509
|
-
return hasMore() ? tokens[index] : null;
|
|
1510
|
-
}
|
|
1511
|
-
__name(token, "token");
|
|
1512
|
-
function next() {
|
|
1513
|
-
if (!hasMore()) {
|
|
1514
|
-
throw new Error();
|
|
1515
|
-
}
|
|
1516
|
-
index++;
|
|
1517
|
-
}
|
|
1518
|
-
__name(next, "next");
|
|
1519
|
-
function parseOperator(operator) {
|
|
1520
|
-
var t = token();
|
|
1521
|
-
if (t && t.type === "OPERATOR" && operator === t.string) {
|
|
1522
|
-
next();
|
|
1523
|
-
return t.string;
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
__name(parseOperator, "parseOperator");
|
|
1527
|
-
function parseWith() {
|
|
1528
|
-
if (parseOperator("WITH")) {
|
|
1529
|
-
var t = token();
|
|
1530
|
-
if (t && t.type === "EXCEPTION") {
|
|
1531
|
-
next();
|
|
1532
|
-
return t.string;
|
|
1533
|
-
}
|
|
1534
|
-
throw new Error("Expected exception after `WITH`");
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
__name(parseWith, "parseWith");
|
|
1538
|
-
function parseLicenseRef() {
|
|
1539
|
-
var begin = index;
|
|
1540
|
-
var string = "";
|
|
1541
|
-
var t = token();
|
|
1542
|
-
if (t.type === "DOCUMENTREF") {
|
|
1543
|
-
next();
|
|
1544
|
-
string += "DocumentRef-" + t.string + ":";
|
|
1545
|
-
if (!parseOperator(":")) {
|
|
1546
|
-
throw new Error("Expected `:` after `DocumentRef-...`");
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
t = token();
|
|
1550
|
-
if (t.type === "LICENSEREF") {
|
|
1551
|
-
next();
|
|
1552
|
-
string += "LicenseRef-" + t.string;
|
|
1553
|
-
return { license: string };
|
|
1554
|
-
}
|
|
1555
|
-
index = begin;
|
|
1556
|
-
}
|
|
1557
|
-
__name(parseLicenseRef, "parseLicenseRef");
|
|
1558
|
-
function parseLicense() {
|
|
1559
|
-
var t = token();
|
|
1560
|
-
if (t && t.type === "LICENSE") {
|
|
1561
|
-
next();
|
|
1562
|
-
var node2 = { license: t.string };
|
|
1563
|
-
if (parseOperator("+")) {
|
|
1564
|
-
node2.plus = true;
|
|
1565
|
-
}
|
|
1566
|
-
var exception = parseWith();
|
|
1567
|
-
if (exception) {
|
|
1568
|
-
node2.exception = exception;
|
|
1569
|
-
}
|
|
1570
|
-
return node2;
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
__name(parseLicense, "parseLicense");
|
|
1574
|
-
function parseParenthesizedExpression() {
|
|
1575
|
-
var left = parseOperator("(");
|
|
1576
|
-
if (!left) {
|
|
1577
|
-
return;
|
|
1578
|
-
}
|
|
1579
|
-
var expr = parseExpression();
|
|
1580
|
-
if (!parseOperator(")")) {
|
|
1581
|
-
throw new Error("Expected `)`");
|
|
1582
|
-
}
|
|
1583
|
-
return expr;
|
|
1584
|
-
}
|
|
1585
|
-
__name(parseParenthesizedExpression, "parseParenthesizedExpression");
|
|
1586
|
-
function parseAtom() {
|
|
1587
|
-
return parseParenthesizedExpression() || parseLicenseRef() || parseLicense();
|
|
1588
|
-
}
|
|
1589
|
-
__name(parseAtom, "parseAtom");
|
|
1590
|
-
function makeBinaryOpParser(operator, nextParser) {
|
|
1591
|
-
return /* @__PURE__ */ __name(function parseBinaryOp() {
|
|
1592
|
-
var left = nextParser();
|
|
1593
|
-
if (!left) {
|
|
1594
|
-
return;
|
|
1595
|
-
}
|
|
1596
|
-
if (!parseOperator(operator)) {
|
|
1597
|
-
return left;
|
|
1598
|
-
}
|
|
1599
|
-
var right = parseBinaryOp();
|
|
1600
|
-
if (!right) {
|
|
1601
|
-
throw new Error("Expected expression");
|
|
1602
|
-
}
|
|
1603
|
-
return {
|
|
1604
|
-
left,
|
|
1605
|
-
conjunction: operator.toLowerCase(),
|
|
1606
|
-
right
|
|
1607
|
-
};
|
|
1608
|
-
}, "parseBinaryOp");
|
|
1609
|
-
}
|
|
1610
|
-
__name(makeBinaryOpParser, "makeBinaryOpParser");
|
|
1611
|
-
var parseAnd = makeBinaryOpParser("AND", parseAtom);
|
|
1612
|
-
var parseExpression = makeBinaryOpParser("OR", parseAnd);
|
|
1613
|
-
var node = parseExpression();
|
|
1614
|
-
if (!node || hasMore()) {
|
|
1615
|
-
throw new Error("Syntax error");
|
|
1616
|
-
}
|
|
1617
|
-
return node;
|
|
1618
|
-
};
|
|
1619
|
-
}
|
|
1620
|
-
});
|
|
1621
|
-
|
|
1622
|
-
// node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/index.js
|
|
1623
|
-
var require_spdx_expression_parse2 = __commonJS({
|
|
1624
|
-
"node_modules/.pnpm/spdx-expression-parse@4.0.0/node_modules/spdx-expression-parse/index.js"(exports2, module2) {
|
|
1625
|
-
"use strict";
|
|
1626
|
-
var scan = require_scan2();
|
|
1627
|
-
var parse = require_parse2();
|
|
1628
|
-
module2.exports = function(source) {
|
|
1629
|
-
return parse(scan(source));
|
|
1630
|
-
};
|
|
1631
|
-
}
|
|
1632
|
-
});
|
|
1633
|
-
|
|
1634
1412
|
// src/external/spdx-pack.js
|
|
1635
1413
|
var spdxCorrect = require_spdx_correct();
|
|
1636
|
-
var spdxExpressionParse =
|
|
1414
|
+
var spdxExpressionParse = require_spdx_expression_parse();
|
|
1637
1415
|
module.exports = {
|
|
1638
1416
|
spdxCorrect,
|
|
1639
1417
|
spdxExpressionParse
|