@powerhousedao/codegen 6.0.0-dev.130 → 6.0.0-dev.131

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/dist/index.mjs CHANGED
@@ -1,4378 +1,27 @@
1
- import { At as switchboardEntrypointTemplate, Ct as syncAndPublishWorkflowTemplate, Dt as editorsTemplate, Ft as claudeSettingsLocalTemplate, It as agentsTemplate, Mt as dockerfileTemplate, Nt as connectEntrypointTemplate, Pt as cursorMcpTemplate, St as gitIgnoreTemplate, Tt as eslintConfigTemplate, _t as licenseTemplate, ct as styleTemplate, d as processorsIndexTemplate, dt as buildPowerhouseConfigTemplate, f as processorsFactoryTemplate, gt as mcpTemplate, ht as npmrcTemplate, it as vitestConfigTemplate, jt as nginxConfTemplate, kt as documentModelsTemplate, lt as readmeTemplate, ot as tsConfigTemplate, ut as powerhouseManifestTemplate, vt as indexTsTemplate, wt as geminiSettingsTemplate, xt as indexHtmlTemplate, yt as mainTsxTemplate } from "./templates-BYDhXDXu.mjs";
1
+ import { At as eslintConfigTemplate, Bt as claudeSettingsLocalTemplate, Ct as indexTsTemplate, Dt as gitIgnoreTemplate, Et as indexHtmlTemplate, Ft as switchboardEntrypointTemplate, It as nginxConfTemplate, Lt as dockerfileTemplate, Mt as editorsTemplate, Ot as syncAndPublishWorkflowTemplate, Pt as documentModelsTemplate, Rt as connectEntrypointTemplate, St as licenseTemplate, Vt as agentsTemplate, bt as npmrcTemplate, f as processorsIndexTemplate, ft as styleTemplate, ht as buildPowerhouseConfigTemplate, kt as geminiSettingsTemplate, lt as tsConfigTemplate, m as processorsFactoryTemplate, mt as powerhouseManifestTemplate, p as factoryBuildersTemplate, pt as readmeTemplate, st as vitestConfigTemplate, wt as mainTsxTemplate, xt as mcpTemplate, zt as cursorMcpTemplate } from "./templates-CKdxigVj.mjs";
2
2
  import { configSpec, parseArgs, parseConfig, runPrettier, validateDocumentModelState } from "./src/utils/index.mjs";
3
- import { C as tsMorphGenerateProcessor, S as scalarsValidation, _ as buildBoilerplatePackageJson, b as generateTypesAndZodSchemasFromGraphql, v as generateDocumentModelZodSchemas, x as scalars, y as generateSchemas } from "./file-builders-BRJcuumC.mjs";
3
+ import { C as tsMorphGenerateProcessor, S as scalarsValidation, _ as buildBoilerplatePackageJson, b as generateTypesAndZodSchemasFromGraphql, v as generateDocumentModelZodSchemas, x as scalars, y as generateSchemas } from "./file-builders-DTtl0nnu.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import { makeSubgraphsIndexFile, tsMorphGenerateDocumentEditor, tsMorphGenerateDocumentModel, tsMorphGenerateDriveEditor, tsMorphGenerateSubgraph } from "@powerhousedao/codegen/file-builders";
6
6
  import { fileExists } from "@powerhousedao/shared/clis";
7
7
  import { camelCase, kebabCase, pascalCase } from "change-case";
8
+ import "get-tsconfig";
8
9
  import fs, { existsSync } from "node:fs";
9
- import fs$1, { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
10
+ import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
10
11
  import path, { dirname, join, resolve } from "node:path";
11
- import { fileURLToPath } from "node:url";
12
- import { promisify } from "node:util";
13
- import { execFile, spawn } from "node:child_process";
12
+ import { readPackage } from "read-pkg";
14
13
  import semver from "semver";
15
- import path$1 from "path";
16
14
  import { ts } from "@tmpl/core";
15
+ import "write-package";
16
+ import path$1 from "path";
17
17
  import { Project, SyntaxKind, VariableDeclarationKind } from "ts-morph";
18
18
  import { format } from "prettier";
19
19
  import { documentModelReducer } from "@powerhousedao/shared/document-model";
20
20
  import { baseLoadFromFile } from "document-model/node";
21
+ import { spawn } from "node:child_process";
21
22
  import { execSync } from "child_process";
22
23
  import chalk from "chalk";
23
24
  import fs$2 from "fs/promises";
24
- //#region \0rolldown/runtime.js
25
- var __create = Object.create;
26
- var __defProp = Object.defineProperty;
27
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
28
- var __getOwnPropNames = Object.getOwnPropertyNames;
29
- var __getProtoOf = Object.getPrototypeOf;
30
- var __hasOwnProp = Object.prototype.hasOwnProperty;
31
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
32
- var __copyProps = (to, from, except, desc) => {
33
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
34
- key = keys[i];
35
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
36
- get: ((k) => from[k]).bind(null, key),
37
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
38
- });
39
- }
40
- return to;
41
- };
42
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
43
- value: mod,
44
- enumerable: true
45
- }) : target, mod));
46
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
47
- //#endregion
48
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
49
- var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
50
- let p = process || {}, argv = p.argv || [], env = p.env || {};
51
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
52
- let formatter = (open, close, replace = open) => (input) => {
53
- let string = "" + input, index = string.indexOf(close, open.length);
54
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
55
- };
56
- let replaceClose = (string, close, replace, index) => {
57
- let result = "", cursor = 0;
58
- do {
59
- result += string.substring(cursor, index) + replace;
60
- cursor = index + close.length;
61
- index = string.indexOf(close, cursor);
62
- } while (~index);
63
- return result + string.substring(cursor);
64
- };
65
- let createColors = (enabled = isColorSupported) => {
66
- let f = enabled ? formatter : () => String;
67
- return {
68
- isColorSupported: enabled,
69
- reset: f("\x1B[0m", "\x1B[0m"),
70
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
71
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
72
- italic: f("\x1B[3m", "\x1B[23m"),
73
- underline: f("\x1B[4m", "\x1B[24m"),
74
- inverse: f("\x1B[7m", "\x1B[27m"),
75
- hidden: f("\x1B[8m", "\x1B[28m"),
76
- strikethrough: f("\x1B[9m", "\x1B[29m"),
77
- black: f("\x1B[30m", "\x1B[39m"),
78
- red: f("\x1B[31m", "\x1B[39m"),
79
- green: f("\x1B[32m", "\x1B[39m"),
80
- yellow: f("\x1B[33m", "\x1B[39m"),
81
- blue: f("\x1B[34m", "\x1B[39m"),
82
- magenta: f("\x1B[35m", "\x1B[39m"),
83
- cyan: f("\x1B[36m", "\x1B[39m"),
84
- white: f("\x1B[37m", "\x1B[39m"),
85
- gray: f("\x1B[90m", "\x1B[39m"),
86
- bgBlack: f("\x1B[40m", "\x1B[49m"),
87
- bgRed: f("\x1B[41m", "\x1B[49m"),
88
- bgGreen: f("\x1B[42m", "\x1B[49m"),
89
- bgYellow: f("\x1B[43m", "\x1B[49m"),
90
- bgBlue: f("\x1B[44m", "\x1B[49m"),
91
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
92
- bgCyan: f("\x1B[46m", "\x1B[49m"),
93
- bgWhite: f("\x1B[47m", "\x1B[49m"),
94
- blackBright: f("\x1B[90m", "\x1B[39m"),
95
- redBright: f("\x1B[91m", "\x1B[39m"),
96
- greenBright: f("\x1B[92m", "\x1B[39m"),
97
- yellowBright: f("\x1B[93m", "\x1B[39m"),
98
- blueBright: f("\x1B[94m", "\x1B[39m"),
99
- magentaBright: f("\x1B[95m", "\x1B[39m"),
100
- cyanBright: f("\x1B[96m", "\x1B[39m"),
101
- whiteBright: f("\x1B[97m", "\x1B[39m"),
102
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
103
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
104
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
105
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
106
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
107
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
108
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
109
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
110
- };
111
- };
112
- module.exports = createColors();
113
- module.exports.createColors = createColors;
114
- }));
115
- //#endregion
116
- //#region ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js
117
- var require_js_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
118
- Object.defineProperty(exports, "__esModule", { value: true });
119
- exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
120
- exports.matchToToken = function(match) {
121
- var token = {
122
- type: "invalid",
123
- value: match[0],
124
- closed: void 0
125
- };
126
- if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);
127
- else if (match[5]) token.type = "comment";
128
- else if (match[6]) token.type = "comment", token.closed = !!match[7];
129
- else if (match[8]) token.type = "regex";
130
- else if (match[9]) token.type = "number";
131
- else if (match[10]) token.type = "name";
132
- else if (match[11]) token.type = "punctuator";
133
- else if (match[12]) token.type = "whitespace";
134
- return token;
135
- };
136
- }));
137
- //#endregion
138
- //#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js
139
- var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
140
- Object.defineProperty(exports, "__esModule", { value: true });
141
- exports.isIdentifierChar = isIdentifierChar;
142
- exports.isIdentifierName = isIdentifierName;
143
- exports.isIdentifierStart = isIdentifierStart;
144
- let nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
145
- let nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
146
- const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
147
- const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
148
- nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
149
- const astralIdentifierStartCodes = [
150
- 0,
151
- 11,
152
- 2,
153
- 25,
154
- 2,
155
- 18,
156
- 2,
157
- 1,
158
- 2,
159
- 14,
160
- 3,
161
- 13,
162
- 35,
163
- 122,
164
- 70,
165
- 52,
166
- 268,
167
- 28,
168
- 4,
169
- 48,
170
- 48,
171
- 31,
172
- 14,
173
- 29,
174
- 6,
175
- 37,
176
- 11,
177
- 29,
178
- 3,
179
- 35,
180
- 5,
181
- 7,
182
- 2,
183
- 4,
184
- 43,
185
- 157,
186
- 19,
187
- 35,
188
- 5,
189
- 35,
190
- 5,
191
- 39,
192
- 9,
193
- 51,
194
- 13,
195
- 10,
196
- 2,
197
- 14,
198
- 2,
199
- 6,
200
- 2,
201
- 1,
202
- 2,
203
- 10,
204
- 2,
205
- 14,
206
- 2,
207
- 6,
208
- 2,
209
- 1,
210
- 4,
211
- 51,
212
- 13,
213
- 310,
214
- 10,
215
- 21,
216
- 11,
217
- 7,
218
- 25,
219
- 5,
220
- 2,
221
- 41,
222
- 2,
223
- 8,
224
- 70,
225
- 5,
226
- 3,
227
- 0,
228
- 2,
229
- 43,
230
- 2,
231
- 1,
232
- 4,
233
- 0,
234
- 3,
235
- 22,
236
- 11,
237
- 22,
238
- 10,
239
- 30,
240
- 66,
241
- 18,
242
- 2,
243
- 1,
244
- 11,
245
- 21,
246
- 11,
247
- 25,
248
- 7,
249
- 25,
250
- 39,
251
- 55,
252
- 7,
253
- 1,
254
- 65,
255
- 0,
256
- 16,
257
- 3,
258
- 2,
259
- 2,
260
- 2,
261
- 28,
262
- 43,
263
- 28,
264
- 4,
265
- 28,
266
- 36,
267
- 7,
268
- 2,
269
- 27,
270
- 28,
271
- 53,
272
- 11,
273
- 21,
274
- 11,
275
- 18,
276
- 14,
277
- 17,
278
- 111,
279
- 72,
280
- 56,
281
- 50,
282
- 14,
283
- 50,
284
- 14,
285
- 35,
286
- 39,
287
- 27,
288
- 10,
289
- 22,
290
- 251,
291
- 41,
292
- 7,
293
- 1,
294
- 17,
295
- 5,
296
- 57,
297
- 28,
298
- 11,
299
- 0,
300
- 9,
301
- 21,
302
- 43,
303
- 17,
304
- 47,
305
- 20,
306
- 28,
307
- 22,
308
- 13,
309
- 52,
310
- 58,
311
- 1,
312
- 3,
313
- 0,
314
- 14,
315
- 44,
316
- 33,
317
- 24,
318
- 27,
319
- 35,
320
- 30,
321
- 0,
322
- 3,
323
- 0,
324
- 9,
325
- 34,
326
- 4,
327
- 0,
328
- 13,
329
- 47,
330
- 15,
331
- 3,
332
- 22,
333
- 0,
334
- 2,
335
- 0,
336
- 36,
337
- 17,
338
- 2,
339
- 24,
340
- 20,
341
- 1,
342
- 64,
343
- 6,
344
- 2,
345
- 0,
346
- 2,
347
- 3,
348
- 2,
349
- 14,
350
- 2,
351
- 9,
352
- 8,
353
- 46,
354
- 39,
355
- 7,
356
- 3,
357
- 1,
358
- 3,
359
- 21,
360
- 2,
361
- 6,
362
- 2,
363
- 1,
364
- 2,
365
- 4,
366
- 4,
367
- 0,
368
- 19,
369
- 0,
370
- 13,
371
- 4,
372
- 31,
373
- 9,
374
- 2,
375
- 0,
376
- 3,
377
- 0,
378
- 2,
379
- 37,
380
- 2,
381
- 0,
382
- 26,
383
- 0,
384
- 2,
385
- 0,
386
- 45,
387
- 52,
388
- 19,
389
- 3,
390
- 21,
391
- 2,
392
- 31,
393
- 47,
394
- 21,
395
- 1,
396
- 2,
397
- 0,
398
- 185,
399
- 46,
400
- 42,
401
- 3,
402
- 37,
403
- 47,
404
- 21,
405
- 0,
406
- 60,
407
- 42,
408
- 14,
409
- 0,
410
- 72,
411
- 26,
412
- 38,
413
- 6,
414
- 186,
415
- 43,
416
- 117,
417
- 63,
418
- 32,
419
- 7,
420
- 3,
421
- 0,
422
- 3,
423
- 7,
424
- 2,
425
- 1,
426
- 2,
427
- 23,
428
- 16,
429
- 0,
430
- 2,
431
- 0,
432
- 95,
433
- 7,
434
- 3,
435
- 38,
436
- 17,
437
- 0,
438
- 2,
439
- 0,
440
- 29,
441
- 0,
442
- 11,
443
- 39,
444
- 8,
445
- 0,
446
- 22,
447
- 0,
448
- 12,
449
- 45,
450
- 20,
451
- 0,
452
- 19,
453
- 72,
454
- 200,
455
- 32,
456
- 32,
457
- 8,
458
- 2,
459
- 36,
460
- 18,
461
- 0,
462
- 50,
463
- 29,
464
- 113,
465
- 6,
466
- 2,
467
- 1,
468
- 2,
469
- 37,
470
- 22,
471
- 0,
472
- 26,
473
- 5,
474
- 2,
475
- 1,
476
- 2,
477
- 31,
478
- 15,
479
- 0,
480
- 24,
481
- 43,
482
- 261,
483
- 18,
484
- 16,
485
- 0,
486
- 2,
487
- 12,
488
- 2,
489
- 33,
490
- 125,
491
- 0,
492
- 80,
493
- 921,
494
- 103,
495
- 110,
496
- 18,
497
- 195,
498
- 2637,
499
- 96,
500
- 16,
501
- 1071,
502
- 18,
503
- 5,
504
- 26,
505
- 3994,
506
- 6,
507
- 582,
508
- 6842,
509
- 29,
510
- 1763,
511
- 568,
512
- 8,
513
- 30,
514
- 18,
515
- 78,
516
- 18,
517
- 29,
518
- 19,
519
- 47,
520
- 17,
521
- 3,
522
- 32,
523
- 20,
524
- 6,
525
- 18,
526
- 433,
527
- 44,
528
- 212,
529
- 63,
530
- 33,
531
- 24,
532
- 3,
533
- 24,
534
- 45,
535
- 74,
536
- 6,
537
- 0,
538
- 67,
539
- 12,
540
- 65,
541
- 1,
542
- 2,
543
- 0,
544
- 15,
545
- 4,
546
- 10,
547
- 7381,
548
- 42,
549
- 31,
550
- 98,
551
- 114,
552
- 8702,
553
- 3,
554
- 2,
555
- 6,
556
- 2,
557
- 1,
558
- 2,
559
- 290,
560
- 16,
561
- 0,
562
- 30,
563
- 2,
564
- 3,
565
- 0,
566
- 15,
567
- 3,
568
- 9,
569
- 395,
570
- 2309,
571
- 106,
572
- 6,
573
- 12,
574
- 4,
575
- 8,
576
- 8,
577
- 9,
578
- 5991,
579
- 84,
580
- 2,
581
- 70,
582
- 2,
583
- 1,
584
- 3,
585
- 0,
586
- 3,
587
- 1,
588
- 3,
589
- 3,
590
- 2,
591
- 11,
592
- 2,
593
- 0,
594
- 2,
595
- 6,
596
- 2,
597
- 64,
598
- 2,
599
- 3,
600
- 3,
601
- 7,
602
- 2,
603
- 6,
604
- 2,
605
- 27,
606
- 2,
607
- 3,
608
- 2,
609
- 4,
610
- 2,
611
- 0,
612
- 4,
613
- 6,
614
- 2,
615
- 339,
616
- 3,
617
- 24,
618
- 2,
619
- 24,
620
- 2,
621
- 30,
622
- 2,
623
- 24,
624
- 2,
625
- 30,
626
- 2,
627
- 24,
628
- 2,
629
- 30,
630
- 2,
631
- 24,
632
- 2,
633
- 30,
634
- 2,
635
- 24,
636
- 2,
637
- 7,
638
- 1845,
639
- 30,
640
- 7,
641
- 5,
642
- 262,
643
- 61,
644
- 147,
645
- 44,
646
- 11,
647
- 6,
648
- 17,
649
- 0,
650
- 322,
651
- 29,
652
- 19,
653
- 43,
654
- 485,
655
- 27,
656
- 229,
657
- 29,
658
- 3,
659
- 0,
660
- 208,
661
- 30,
662
- 2,
663
- 2,
664
- 2,
665
- 1,
666
- 2,
667
- 6,
668
- 3,
669
- 4,
670
- 10,
671
- 1,
672
- 225,
673
- 6,
674
- 2,
675
- 3,
676
- 2,
677
- 1,
678
- 2,
679
- 14,
680
- 2,
681
- 196,
682
- 60,
683
- 67,
684
- 8,
685
- 0,
686
- 1205,
687
- 3,
688
- 2,
689
- 26,
690
- 2,
691
- 1,
692
- 2,
693
- 0,
694
- 3,
695
- 0,
696
- 2,
697
- 9,
698
- 2,
699
- 3,
700
- 2,
701
- 0,
702
- 2,
703
- 0,
704
- 7,
705
- 0,
706
- 5,
707
- 0,
708
- 2,
709
- 0,
710
- 2,
711
- 0,
712
- 2,
713
- 2,
714
- 2,
715
- 1,
716
- 2,
717
- 0,
718
- 3,
719
- 0,
720
- 2,
721
- 0,
722
- 2,
723
- 0,
724
- 2,
725
- 0,
726
- 2,
727
- 0,
728
- 2,
729
- 1,
730
- 2,
731
- 0,
732
- 3,
733
- 3,
734
- 2,
735
- 6,
736
- 2,
737
- 3,
738
- 2,
739
- 3,
740
- 2,
741
- 0,
742
- 2,
743
- 9,
744
- 2,
745
- 16,
746
- 6,
747
- 2,
748
- 2,
749
- 4,
750
- 2,
751
- 16,
752
- 4421,
753
- 42719,
754
- 33,
755
- 4381,
756
- 3,
757
- 5773,
758
- 3,
759
- 7472,
760
- 16,
761
- 621,
762
- 2467,
763
- 541,
764
- 1507,
765
- 4938,
766
- 6,
767
- 8489
768
- ];
769
- const astralIdentifierCodes = [
770
- 509,
771
- 0,
772
- 227,
773
- 0,
774
- 150,
775
- 4,
776
- 294,
777
- 9,
778
- 1368,
779
- 2,
780
- 2,
781
- 1,
782
- 6,
783
- 3,
784
- 41,
785
- 2,
786
- 5,
787
- 0,
788
- 166,
789
- 1,
790
- 574,
791
- 3,
792
- 9,
793
- 9,
794
- 7,
795
- 9,
796
- 32,
797
- 4,
798
- 318,
799
- 1,
800
- 78,
801
- 5,
802
- 71,
803
- 10,
804
- 50,
805
- 3,
806
- 123,
807
- 2,
808
- 54,
809
- 14,
810
- 32,
811
- 10,
812
- 3,
813
- 1,
814
- 11,
815
- 3,
816
- 46,
817
- 10,
818
- 8,
819
- 0,
820
- 46,
821
- 9,
822
- 7,
823
- 2,
824
- 37,
825
- 13,
826
- 2,
827
- 9,
828
- 6,
829
- 1,
830
- 45,
831
- 0,
832
- 13,
833
- 2,
834
- 49,
835
- 13,
836
- 9,
837
- 3,
838
- 2,
839
- 11,
840
- 83,
841
- 11,
842
- 7,
843
- 0,
844
- 3,
845
- 0,
846
- 158,
847
- 11,
848
- 6,
849
- 9,
850
- 7,
851
- 3,
852
- 56,
853
- 1,
854
- 2,
855
- 6,
856
- 3,
857
- 1,
858
- 3,
859
- 2,
860
- 10,
861
- 0,
862
- 11,
863
- 1,
864
- 3,
865
- 6,
866
- 4,
867
- 4,
868
- 68,
869
- 8,
870
- 2,
871
- 0,
872
- 3,
873
- 0,
874
- 2,
875
- 3,
876
- 2,
877
- 4,
878
- 2,
879
- 0,
880
- 15,
881
- 1,
882
- 83,
883
- 17,
884
- 10,
885
- 9,
886
- 5,
887
- 0,
888
- 82,
889
- 19,
890
- 13,
891
- 9,
892
- 214,
893
- 6,
894
- 3,
895
- 8,
896
- 28,
897
- 1,
898
- 83,
899
- 16,
900
- 16,
901
- 9,
902
- 82,
903
- 12,
904
- 9,
905
- 9,
906
- 7,
907
- 19,
908
- 58,
909
- 14,
910
- 5,
911
- 9,
912
- 243,
913
- 14,
914
- 166,
915
- 9,
916
- 71,
917
- 5,
918
- 2,
919
- 1,
920
- 3,
921
- 3,
922
- 2,
923
- 0,
924
- 2,
925
- 1,
926
- 13,
927
- 9,
928
- 120,
929
- 6,
930
- 3,
931
- 6,
932
- 4,
933
- 0,
934
- 29,
935
- 9,
936
- 41,
937
- 6,
938
- 2,
939
- 3,
940
- 9,
941
- 0,
942
- 10,
943
- 10,
944
- 47,
945
- 15,
946
- 199,
947
- 7,
948
- 137,
949
- 9,
950
- 54,
951
- 7,
952
- 2,
953
- 7,
954
- 17,
955
- 9,
956
- 57,
957
- 21,
958
- 2,
959
- 13,
960
- 123,
961
- 5,
962
- 4,
963
- 0,
964
- 2,
965
- 1,
966
- 2,
967
- 6,
968
- 2,
969
- 0,
970
- 9,
971
- 9,
972
- 49,
973
- 4,
974
- 2,
975
- 1,
976
- 2,
977
- 4,
978
- 9,
979
- 9,
980
- 55,
981
- 9,
982
- 266,
983
- 3,
984
- 10,
985
- 1,
986
- 2,
987
- 0,
988
- 49,
989
- 6,
990
- 4,
991
- 4,
992
- 14,
993
- 10,
994
- 5350,
995
- 0,
996
- 7,
997
- 14,
998
- 11465,
999
- 27,
1000
- 2343,
1001
- 9,
1002
- 87,
1003
- 9,
1004
- 39,
1005
- 4,
1006
- 60,
1007
- 6,
1008
- 26,
1009
- 9,
1010
- 535,
1011
- 9,
1012
- 470,
1013
- 0,
1014
- 2,
1015
- 54,
1016
- 8,
1017
- 3,
1018
- 82,
1019
- 0,
1020
- 12,
1021
- 1,
1022
- 19628,
1023
- 1,
1024
- 4178,
1025
- 9,
1026
- 519,
1027
- 45,
1028
- 3,
1029
- 22,
1030
- 543,
1031
- 4,
1032
- 4,
1033
- 5,
1034
- 9,
1035
- 7,
1036
- 3,
1037
- 6,
1038
- 31,
1039
- 3,
1040
- 149,
1041
- 2,
1042
- 1418,
1043
- 49,
1044
- 513,
1045
- 54,
1046
- 5,
1047
- 49,
1048
- 9,
1049
- 0,
1050
- 15,
1051
- 0,
1052
- 23,
1053
- 4,
1054
- 2,
1055
- 14,
1056
- 1361,
1057
- 6,
1058
- 2,
1059
- 16,
1060
- 3,
1061
- 6,
1062
- 2,
1063
- 1,
1064
- 2,
1065
- 4,
1066
- 101,
1067
- 0,
1068
- 161,
1069
- 6,
1070
- 10,
1071
- 9,
1072
- 357,
1073
- 0,
1074
- 62,
1075
- 13,
1076
- 499,
1077
- 13,
1078
- 245,
1079
- 1,
1080
- 2,
1081
- 9,
1082
- 233,
1083
- 0,
1084
- 3,
1085
- 0,
1086
- 8,
1087
- 1,
1088
- 6,
1089
- 0,
1090
- 475,
1091
- 6,
1092
- 110,
1093
- 6,
1094
- 6,
1095
- 9,
1096
- 4759,
1097
- 9,
1098
- 787719,
1099
- 239
1100
- ];
1101
- function isInAstralSet(code, set) {
1102
- let pos = 65536;
1103
- for (let i = 0, length = set.length; i < length; i += 2) {
1104
- pos += set[i];
1105
- if (pos > code) return false;
1106
- pos += set[i + 1];
1107
- if (pos >= code) return true;
1108
- }
1109
- return false;
1110
- }
1111
- function isIdentifierStart(code) {
1112
- if (code < 65) return code === 36;
1113
- if (code <= 90) return true;
1114
- if (code < 97) return code === 95;
1115
- if (code <= 122) return true;
1116
- if (code <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
1117
- return isInAstralSet(code, astralIdentifierStartCodes);
1118
- }
1119
- function isIdentifierChar(code) {
1120
- if (code < 48) return code === 36;
1121
- if (code < 58) return true;
1122
- if (code < 65) return false;
1123
- if (code <= 90) return true;
1124
- if (code < 97) return code === 95;
1125
- if (code <= 122) return true;
1126
- if (code <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
1127
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
1128
- }
1129
- function isIdentifierName(name) {
1130
- let isFirst = true;
1131
- for (let i = 0; i < name.length; i++) {
1132
- let cp = name.charCodeAt(i);
1133
- if ((cp & 64512) === 55296 && i + 1 < name.length) {
1134
- const trail = name.charCodeAt(++i);
1135
- if ((trail & 64512) === 56320) cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
1136
- }
1137
- if (isFirst) {
1138
- isFirst = false;
1139
- if (!isIdentifierStart(cp)) return false;
1140
- } else if (!isIdentifierChar(cp)) return false;
1141
- }
1142
- return !isFirst;
1143
- }
1144
- }));
1145
- //#endregion
1146
- //#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js
1147
- var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
1148
- Object.defineProperty(exports, "__esModule", { value: true });
1149
- exports.isKeyword = isKeyword;
1150
- exports.isReservedWord = isReservedWord;
1151
- exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
1152
- exports.isStrictBindReservedWord = isStrictBindReservedWord;
1153
- exports.isStrictReservedWord = isStrictReservedWord;
1154
- const reservedWords = {
1155
- keyword: [
1156
- "break",
1157
- "case",
1158
- "catch",
1159
- "continue",
1160
- "debugger",
1161
- "default",
1162
- "do",
1163
- "else",
1164
- "finally",
1165
- "for",
1166
- "function",
1167
- "if",
1168
- "return",
1169
- "switch",
1170
- "throw",
1171
- "try",
1172
- "var",
1173
- "const",
1174
- "while",
1175
- "with",
1176
- "new",
1177
- "this",
1178
- "super",
1179
- "class",
1180
- "extends",
1181
- "export",
1182
- "import",
1183
- "null",
1184
- "true",
1185
- "false",
1186
- "in",
1187
- "instanceof",
1188
- "typeof",
1189
- "void",
1190
- "delete"
1191
- ],
1192
- strict: [
1193
- "implements",
1194
- "interface",
1195
- "let",
1196
- "package",
1197
- "private",
1198
- "protected",
1199
- "public",
1200
- "static",
1201
- "yield"
1202
- ],
1203
- strictBind: ["eval", "arguments"]
1204
- };
1205
- const keywords = new Set(reservedWords.keyword);
1206
- const reservedWordsStrictSet = new Set(reservedWords.strict);
1207
- const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
1208
- function isReservedWord(word, inModule) {
1209
- return inModule && word === "await" || word === "enum";
1210
- }
1211
- function isStrictReservedWord(word, inModule) {
1212
- return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
1213
- }
1214
- function isStrictBindOnlyReservedWord(word) {
1215
- return reservedWordsStrictBindSet.has(word);
1216
- }
1217
- function isStrictBindReservedWord(word, inModule) {
1218
- return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
1219
- }
1220
- function isKeyword(word) {
1221
- return keywords.has(word);
1222
- }
1223
- }));
1224
- //#endregion
1225
- //#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js
1226
- var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
1227
- Object.defineProperty(exports, "__esModule", { value: true });
1228
- Object.defineProperty(exports, "isIdentifierChar", {
1229
- enumerable: true,
1230
- get: function() {
1231
- return _identifier.isIdentifierChar;
1232
- }
1233
- });
1234
- Object.defineProperty(exports, "isIdentifierName", {
1235
- enumerable: true,
1236
- get: function() {
1237
- return _identifier.isIdentifierName;
1238
- }
1239
- });
1240
- Object.defineProperty(exports, "isIdentifierStart", {
1241
- enumerable: true,
1242
- get: function() {
1243
- return _identifier.isIdentifierStart;
1244
- }
1245
- });
1246
- Object.defineProperty(exports, "isKeyword", {
1247
- enumerable: true,
1248
- get: function() {
1249
- return _keyword.isKeyword;
1250
- }
1251
- });
1252
- Object.defineProperty(exports, "isReservedWord", {
1253
- enumerable: true,
1254
- get: function() {
1255
- return _keyword.isReservedWord;
1256
- }
1257
- });
1258
- Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
1259
- enumerable: true,
1260
- get: function() {
1261
- return _keyword.isStrictBindOnlyReservedWord;
1262
- }
1263
- });
1264
- Object.defineProperty(exports, "isStrictBindReservedWord", {
1265
- enumerable: true,
1266
- get: function() {
1267
- return _keyword.isStrictBindReservedWord;
1268
- }
1269
- });
1270
- Object.defineProperty(exports, "isStrictReservedWord", {
1271
- enumerable: true,
1272
- get: function() {
1273
- return _keyword.isStrictReservedWord;
1274
- }
1275
- });
1276
- var _identifier = require_identifier();
1277
- var _keyword = require_keyword();
1278
- }));
1279
- //#endregion
1280
- //#region ../../node_modules/.pnpm/index-to-position@1.2.0/node_modules/index-to-position/index.js
1281
- var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
1282
- Object.defineProperty(exports, "__esModule", { value: true });
1283
- var picocolors = require_picocolors();
1284
- var jsTokens = require_js_tokens();
1285
- var helperValidatorIdentifier = require_lib$2();
1286
- function isColorSupported() {
1287
- return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported;
1288
- }
1289
- const compose = (f, g) => (v) => f(g(v));
1290
- function buildDefs(colors) {
1291
- return {
1292
- keyword: colors.cyan,
1293
- capitalized: colors.yellow,
1294
- jsxIdentifier: colors.yellow,
1295
- punctuator: colors.yellow,
1296
- number: colors.magenta,
1297
- string: colors.green,
1298
- regex: colors.magenta,
1299
- comment: colors.gray,
1300
- invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
1301
- gutter: colors.gray,
1302
- marker: compose(colors.red, colors.bold),
1303
- message: compose(colors.red, colors.bold),
1304
- reset: colors.reset
1305
- };
1306
- }
1307
- const defsOn = buildDefs(picocolors.createColors(true));
1308
- const defsOff = buildDefs(picocolors.createColors(false));
1309
- function getDefs(enabled) {
1310
- return enabled ? defsOn : defsOff;
1311
- }
1312
- const sometimesKeywords = new Set([
1313
- "as",
1314
- "async",
1315
- "from",
1316
- "get",
1317
- "of",
1318
- "set"
1319
- ]);
1320
- const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
1321
- const BRACKET = /^[()[\]{}]$/;
1322
- let tokenize;
1323
- const JSX_TAG = /^[a-z][\w-]*$/i;
1324
- const getTokenType = function(token, offset, text) {
1325
- if (token.type === "name") {
1326
- const tokenValue = token.value;
1327
- if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) return "keyword";
1328
- if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) return "jsxIdentifier";
1329
- const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));
1330
- if (firstChar !== firstChar.toLowerCase()) return "capitalized";
1331
- }
1332
- if (token.type === "punctuator" && BRACKET.test(token.value)) return "bracket";
1333
- if (token.type === "invalid" && (token.value === "@" || token.value === "#")) return "punctuator";
1334
- return token.type;
1335
- };
1336
- tokenize = function* (text) {
1337
- let match;
1338
- while (match = jsTokens.default.exec(text)) {
1339
- const token = jsTokens.matchToToken(match);
1340
- yield {
1341
- type: getTokenType(token, match.index, text),
1342
- value: token.value
1343
- };
1344
- }
1345
- };
1346
- function highlight(text) {
1347
- if (text === "") return "";
1348
- const defs = getDefs(true);
1349
- let highlighted = "";
1350
- for (const { type, value } of tokenize(text)) if (type in defs) highlighted += value.split(NEWLINE$1).map((str) => defs[type](str)).join("\n");
1351
- else highlighted += value;
1352
- return highlighted;
1353
- }
1354
- const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
1355
- function getMarkerLines(loc, source, opts, startLineBaseZero) {
1356
- const startLoc = Object.assign({
1357
- column: 0,
1358
- line: -1
1359
- }, loc.start);
1360
- const endLoc = Object.assign({}, startLoc, loc.end);
1361
- const { linesAbove = 2, linesBelow = 3 } = opts || {};
1362
- const startLine = startLoc.line - startLineBaseZero;
1363
- const startColumn = startLoc.column;
1364
- const endLine = endLoc.line - startLineBaseZero;
1365
- const endColumn = endLoc.column;
1366
- let start = Math.max(startLine - (linesAbove + 1), 0);
1367
- let end = Math.min(source.length, endLine + linesBelow);
1368
- if (startLine === -1) start = 0;
1369
- if (endLine === -1) end = source.length;
1370
- const lineDiff = endLine - startLine;
1371
- const markerLines = {};
1372
- if (lineDiff) for (let i = 0; i <= lineDiff; i++) {
1373
- const lineNumber = i + startLine;
1374
- if (!startColumn) markerLines[lineNumber] = true;
1375
- else if (i === 0) markerLines[lineNumber] = [startColumn, source[lineNumber - 1].length - startColumn + 1];
1376
- else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
1377
- else markerLines[lineNumber] = [0, source[lineNumber - i].length];
1378
- }
1379
- else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0];
1380
- else markerLines[startLine] = true;
1381
- else markerLines[startLine] = [startColumn, endColumn - startColumn];
1382
- return {
1383
- start,
1384
- end,
1385
- markerLines
1386
- };
1387
- }
1388
- function codeFrameColumns(rawLines, loc, opts = {}) {
1389
- const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
1390
- const startLineBaseZero = (opts.startLine || 1) - 1;
1391
- const defs = getDefs(shouldHighlight);
1392
- const { start, end, markerLines } = getMarkerLines(loc, rawLines.split(NEWLINE), opts, startLineBaseZero);
1393
- const hasColumns = loc.start && typeof loc.start.column === "number";
1394
- const numberMaxWidth = String(end + startLineBaseZero).length;
1395
- let frame = (shouldHighlight ? highlight(rawLines) : rawLines).split(NEWLINE, end).slice(start, end).map((line, index) => {
1396
- const number = start + 1 + index;
1397
- const gutter = ` ${` ${number + startLineBaseZero}`.slice(-numberMaxWidth)} |`;
1398
- const hasMarker = markerLines[number];
1399
- const lastMarkerLine = !markerLines[number + 1];
1400
- if (hasMarker) {
1401
- let markerLine = "";
1402
- if (Array.isArray(hasMarker)) {
1403
- const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
1404
- const numberOfMarkers = hasMarker[1] || 1;
1405
- markerLine = [
1406
- "\n ",
1407
- defs.gutter(gutter.replace(/\d/g, " ")),
1408
- " ",
1409
- markerSpacing,
1410
- defs.marker("^").repeat(numberOfMarkers)
1411
- ].join("");
1412
- if (lastMarkerLine && opts.message) markerLine += " " + defs.message(opts.message);
1413
- }
1414
- return [
1415
- defs.marker(">"),
1416
- defs.gutter(gutter),
1417
- line.length > 0 ? ` ${line}` : "",
1418
- markerLine
1419
- ].join("");
1420
- } else return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
1421
- }).join("\n");
1422
- if (opts.message && !hasColumns) frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
1423
- if (shouldHighlight) return defs.reset(frame);
1424
- else return frame;
1425
- }
1426
- exports.codeFrameColumns = codeFrameColumns;
1427
- })))();
1428
- const getOffsets = ({ oneBased, oneBasedLine = oneBased, oneBasedColumn = oneBased } = {}) => [oneBasedLine ? 1 : 0, oneBasedColumn ? 1 : 0];
1429
- function getPosition(text, textIndex, options) {
1430
- const lineBreakBefore = textIndex === 0 ? -1 : text.lastIndexOf("\n", textIndex - 1);
1431
- const [lineOffset, columnOffset] = getOffsets(options);
1432
- return {
1433
- line: lineBreakBefore === -1 ? lineOffset : text.slice(0, lineBreakBefore + 1).match(/\n/g).length + lineOffset,
1434
- column: textIndex - lineBreakBefore - 1 + columnOffset
1435
- };
1436
- }
1437
- function indexToPosition(text, textIndex, options) {
1438
- if (typeof text !== "string") throw new TypeError("Text parameter should be a string");
1439
- if (!Number.isInteger(textIndex)) throw new TypeError("Index parameter should be an integer");
1440
- if (textIndex < 0 || textIndex > text.length) throw new RangeError("Index out of bounds");
1441
- return getPosition(text, textIndex, options);
1442
- }
1443
- //#endregion
1444
- //#region ../../node_modules/.pnpm/parse-json@8.3.0/node_modules/parse-json/index.js
1445
- const getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}`;
1446
- var JSONError = class JSONError extends Error {
1447
- name = "JSONError";
1448
- fileName;
1449
- #input;
1450
- #jsonParseError;
1451
- #message;
1452
- #codeFrame;
1453
- #rawCodeFrame;
1454
- constructor(messageOrOptions) {
1455
- if (typeof messageOrOptions === "string") {
1456
- super();
1457
- this.#message = messageOrOptions;
1458
- } else {
1459
- const { jsonParseError, fileName, input } = messageOrOptions;
1460
- super(void 0, { cause: jsonParseError });
1461
- this.#input = input;
1462
- this.#jsonParseError = jsonParseError;
1463
- this.fileName = fileName;
1464
- }
1465
- Error.captureStackTrace?.(this, JSONError);
1466
- }
1467
- get message() {
1468
- this.#message ??= `${addCodePointToUnexpectedToken(this.#jsonParseError.message)}${this.#input === "" ? " while parsing empty string" : ""}`;
1469
- const { codeFrame } = this;
1470
- return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${codeFrame ? `\n\n${codeFrame}\n` : ""}`;
1471
- }
1472
- set message(message) {
1473
- this.#message = message;
1474
- }
1475
- #getCodeFrame(highlightCode) {
1476
- if (!this.#jsonParseError) return;
1477
- const input = this.#input;
1478
- const location = getErrorLocation(input, this.#jsonParseError.message);
1479
- if (!location) return;
1480
- return (0, import_lib.codeFrameColumns)(input, { start: location }, { highlightCode });
1481
- }
1482
- get codeFrame() {
1483
- this.#codeFrame ??= this.#getCodeFrame(true);
1484
- return this.#codeFrame;
1485
- }
1486
- get rawCodeFrame() {
1487
- this.#rawCodeFrame ??= this.#getCodeFrame(false);
1488
- return this.#rawCodeFrame;
1489
- }
1490
- };
1491
- const getErrorLocation = (string, message) => {
1492
- const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);
1493
- if (!match) return;
1494
- const { index, line, column } = match.groups;
1495
- if (line && column) return {
1496
- line: Number(line),
1497
- column: Number(column)
1498
- };
1499
- return indexToPosition(string, Number(index), { oneBased: true });
1500
- };
1501
- const addCodePointToUnexpectedToken = (message) => message.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/, (_, _quote, token) => `"${token}"(${getCodePoint(token)})`);
1502
- function parseJson(string, reviver, fileName) {
1503
- if (typeof reviver === "string") {
1504
- fileName = reviver;
1505
- reviver = void 0;
1506
- }
1507
- try {
1508
- return JSON.parse(string, reviver);
1509
- } catch (error) {
1510
- throw new JSONError({
1511
- jsonParseError: error,
1512
- fileName,
1513
- input: string
1514
- });
1515
- }
1516
- }
1517
- //#endregion
1518
- //#region ../../node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/index.json
1519
- var require_spdx_license_ids = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1520
- module.exports = [
1521
- "0BSD",
1522
- "3D-Slicer-1.0",
1523
- "AAL",
1524
- "ADSL",
1525
- "AFL-1.1",
1526
- "AFL-1.2",
1527
- "AFL-2.0",
1528
- "AFL-2.1",
1529
- "AFL-3.0",
1530
- "AGPL-1.0-only",
1531
- "AGPL-1.0-or-later",
1532
- "AGPL-3.0-only",
1533
- "AGPL-3.0-or-later",
1534
- "ALGLIB-Documentation",
1535
- "AMD-newlib",
1536
- "AMDPLPA",
1537
- "AML",
1538
- "AML-glslang",
1539
- "AMPAS",
1540
- "ANTLR-PD",
1541
- "ANTLR-PD-fallback",
1542
- "APAFML",
1543
- "APL-1.0",
1544
- "APSL-1.0",
1545
- "APSL-1.1",
1546
- "APSL-1.2",
1547
- "APSL-2.0",
1548
- "ASWF-Digital-Assets-1.0",
1549
- "ASWF-Digital-Assets-1.1",
1550
- "Abstyles",
1551
- "AdaCore-doc",
1552
- "Adobe-2006",
1553
- "Adobe-Display-PostScript",
1554
- "Adobe-Glyph",
1555
- "Adobe-Utopia",
1556
- "Advanced-Cryptics-Dictionary",
1557
- "Afmparse",
1558
- "Aladdin",
1559
- "Apache-1.0",
1560
- "Apache-1.1",
1561
- "Apache-2.0",
1562
- "App-s2p",
1563
- "Arphic-1999",
1564
- "Artistic-1.0",
1565
- "Artistic-1.0-Perl",
1566
- "Artistic-1.0-cl8",
1567
- "Artistic-2.0",
1568
- "Artistic-dist",
1569
- "Aspell-RU",
1570
- "BOLA-1.1",
1571
- "BSD-1-Clause",
1572
- "BSD-2-Clause",
1573
- "BSD-2-Clause-Darwin",
1574
- "BSD-2-Clause-Patent",
1575
- "BSD-2-Clause-Views",
1576
- "BSD-2-Clause-first-lines",
1577
- "BSD-2-Clause-pkgconf-disclaimer",
1578
- "BSD-3-Clause",
1579
- "BSD-3-Clause-Attribution",
1580
- "BSD-3-Clause-Clear",
1581
- "BSD-3-Clause-HP",
1582
- "BSD-3-Clause-LBNL",
1583
- "BSD-3-Clause-Modification",
1584
- "BSD-3-Clause-No-Military-License",
1585
- "BSD-3-Clause-No-Nuclear-License",
1586
- "BSD-3-Clause-No-Nuclear-License-2014",
1587
- "BSD-3-Clause-No-Nuclear-Warranty",
1588
- "BSD-3-Clause-Open-MPI",
1589
- "BSD-3-Clause-Sun",
1590
- "BSD-3-Clause-Tso",
1591
- "BSD-3-Clause-acpica",
1592
- "BSD-3-Clause-flex",
1593
- "BSD-4-Clause",
1594
- "BSD-4-Clause-Shortened",
1595
- "BSD-4-Clause-UC",
1596
- "BSD-4.3RENO",
1597
- "BSD-4.3TAHOE",
1598
- "BSD-Advertising-Acknowledgement",
1599
- "BSD-Attribution-HPND-disclaimer",
1600
- "BSD-Inferno-Nettverk",
1601
- "BSD-Mark-Modifications",
1602
- "BSD-Protection",
1603
- "BSD-Source-Code",
1604
- "BSD-Source-beginning-file",
1605
- "BSD-Systemics",
1606
- "BSD-Systemics-W3Works",
1607
- "BSL-1.0",
1608
- "BUSL-1.1",
1609
- "Baekmuk",
1610
- "Bahyph",
1611
- "Barr",
1612
- "Beerware",
1613
- "BitTorrent-1.0",
1614
- "BitTorrent-1.1",
1615
- "Bitstream-Charter",
1616
- "Bitstream-Vera",
1617
- "BlueOak-1.0.0",
1618
- "Boehm-GC",
1619
- "Boehm-GC-without-fee",
1620
- "Borceux",
1621
- "Brian-Gladman-2-Clause",
1622
- "Brian-Gladman-3-Clause",
1623
- "Buddy",
1624
- "C-UDA-1.0",
1625
- "CAL-1.0",
1626
- "CAL-1.0-Combined-Work-Exception",
1627
- "CAPEC-tou",
1628
- "CATOSL-1.1",
1629
- "CC-BY-1.0",
1630
- "CC-BY-2.0",
1631
- "CC-BY-2.5",
1632
- "CC-BY-2.5-AU",
1633
- "CC-BY-3.0",
1634
- "CC-BY-3.0-AT",
1635
- "CC-BY-3.0-AU",
1636
- "CC-BY-3.0-DE",
1637
- "CC-BY-3.0-IGO",
1638
- "CC-BY-3.0-NL",
1639
- "CC-BY-3.0-US",
1640
- "CC-BY-4.0",
1641
- "CC-BY-NC-1.0",
1642
- "CC-BY-NC-2.0",
1643
- "CC-BY-NC-2.5",
1644
- "CC-BY-NC-3.0",
1645
- "CC-BY-NC-3.0-DE",
1646
- "CC-BY-NC-4.0",
1647
- "CC-BY-NC-ND-1.0",
1648
- "CC-BY-NC-ND-2.0",
1649
- "CC-BY-NC-ND-2.5",
1650
- "CC-BY-NC-ND-3.0",
1651
- "CC-BY-NC-ND-3.0-DE",
1652
- "CC-BY-NC-ND-3.0-IGO",
1653
- "CC-BY-NC-ND-4.0",
1654
- "CC-BY-NC-SA-1.0",
1655
- "CC-BY-NC-SA-2.0",
1656
- "CC-BY-NC-SA-2.0-DE",
1657
- "CC-BY-NC-SA-2.0-FR",
1658
- "CC-BY-NC-SA-2.0-UK",
1659
- "CC-BY-NC-SA-2.5",
1660
- "CC-BY-NC-SA-3.0",
1661
- "CC-BY-NC-SA-3.0-DE",
1662
- "CC-BY-NC-SA-3.0-IGO",
1663
- "CC-BY-NC-SA-4.0",
1664
- "CC-BY-ND-1.0",
1665
- "CC-BY-ND-2.0",
1666
- "CC-BY-ND-2.5",
1667
- "CC-BY-ND-3.0",
1668
- "CC-BY-ND-3.0-DE",
1669
- "CC-BY-ND-4.0",
1670
- "CC-BY-SA-1.0",
1671
- "CC-BY-SA-2.0",
1672
- "CC-BY-SA-2.0-UK",
1673
- "CC-BY-SA-2.1-JP",
1674
- "CC-BY-SA-2.5",
1675
- "CC-BY-SA-3.0",
1676
- "CC-BY-SA-3.0-AT",
1677
- "CC-BY-SA-3.0-DE",
1678
- "CC-BY-SA-3.0-IGO",
1679
- "CC-BY-SA-4.0",
1680
- "CC-PDDC",
1681
- "CC-PDM-1.0",
1682
- "CC-SA-1.0",
1683
- "CC0-1.0",
1684
- "CDDL-1.0",
1685
- "CDDL-1.1",
1686
- "CDL-1.0",
1687
- "CDLA-Permissive-1.0",
1688
- "CDLA-Permissive-2.0",
1689
- "CDLA-Sharing-1.0",
1690
- "CECILL-1.0",
1691
- "CECILL-1.1",
1692
- "CECILL-2.0",
1693
- "CECILL-2.1",
1694
- "CECILL-B",
1695
- "CECILL-C",
1696
- "CERN-OHL-1.1",
1697
- "CERN-OHL-1.2",
1698
- "CERN-OHL-P-2.0",
1699
- "CERN-OHL-S-2.0",
1700
- "CERN-OHL-W-2.0",
1701
- "CFITSIO",
1702
- "CMU-Mach",
1703
- "CMU-Mach-nodoc",
1704
- "CNRI-Jython",
1705
- "CNRI-Python",
1706
- "CNRI-Python-GPL-Compatible",
1707
- "COIL-1.0",
1708
- "CPAL-1.0",
1709
- "CPL-1.0",
1710
- "CPOL-1.02",
1711
- "CUA-OPL-1.0",
1712
- "Caldera",
1713
- "Caldera-no-preamble",
1714
- "Catharon",
1715
- "ClArtistic",
1716
- "Clips",
1717
- "Community-Spec-1.0",
1718
- "Condor-1.1",
1719
- "Cornell-Lossless-JPEG",
1720
- "Cronyx",
1721
- "Crossword",
1722
- "CryptoSwift",
1723
- "CrystalStacker",
1724
- "Cube",
1725
- "D-FSL-1.0",
1726
- "DEC-3-Clause",
1727
- "DL-DE-BY-2.0",
1728
- "DL-DE-ZERO-2.0",
1729
- "DOC",
1730
- "DRL-1.0",
1731
- "DRL-1.1",
1732
- "DSDP",
1733
- "DocBook-DTD",
1734
- "DocBook-Schema",
1735
- "DocBook-Stylesheet",
1736
- "DocBook-XML",
1737
- "Dotseqn",
1738
- "ECL-1.0",
1739
- "ECL-2.0",
1740
- "EFL-1.0",
1741
- "EFL-2.0",
1742
- "EPICS",
1743
- "EPL-1.0",
1744
- "EPL-2.0",
1745
- "ESA-PL-permissive-2.4",
1746
- "ESA-PL-strong-copyleft-2.4",
1747
- "ESA-PL-weak-copyleft-2.4",
1748
- "EUDatagrid",
1749
- "EUPL-1.0",
1750
- "EUPL-1.1",
1751
- "EUPL-1.2",
1752
- "Elastic-2.0",
1753
- "Entessa",
1754
- "ErlPL-1.1",
1755
- "Eurosym",
1756
- "FBM",
1757
- "FDK-AAC",
1758
- "FSFAP",
1759
- "FSFAP-no-warranty-disclaimer",
1760
- "FSFUL",
1761
- "FSFULLR",
1762
- "FSFULLRSD",
1763
- "FSFULLRWD",
1764
- "FSL-1.1-ALv2",
1765
- "FSL-1.1-MIT",
1766
- "FTL",
1767
- "Fair",
1768
- "Ferguson-Twofish",
1769
- "Frameworx-1.0",
1770
- "FreeBSD-DOC",
1771
- "FreeImage",
1772
- "Furuseth",
1773
- "GCR-docs",
1774
- "GD",
1775
- "GFDL-1.1-invariants-only",
1776
- "GFDL-1.1-invariants-or-later",
1777
- "GFDL-1.1-no-invariants-only",
1778
- "GFDL-1.1-no-invariants-or-later",
1779
- "GFDL-1.1-only",
1780
- "GFDL-1.1-or-later",
1781
- "GFDL-1.2-invariants-only",
1782
- "GFDL-1.2-invariants-or-later",
1783
- "GFDL-1.2-no-invariants-only",
1784
- "GFDL-1.2-no-invariants-or-later",
1785
- "GFDL-1.2-only",
1786
- "GFDL-1.2-or-later",
1787
- "GFDL-1.3-invariants-only",
1788
- "GFDL-1.3-invariants-or-later",
1789
- "GFDL-1.3-no-invariants-only",
1790
- "GFDL-1.3-no-invariants-or-later",
1791
- "GFDL-1.3-only",
1792
- "GFDL-1.3-or-later",
1793
- "GL2PS",
1794
- "GLWTPL",
1795
- "GPL-1.0-only",
1796
- "GPL-1.0-or-later",
1797
- "GPL-2.0-only",
1798
- "GPL-2.0-or-later",
1799
- "GPL-3.0-only",
1800
- "GPL-3.0-or-later",
1801
- "Game-Programming-Gems",
1802
- "Giftware",
1803
- "Glide",
1804
- "Glulxe",
1805
- "Graphics-Gems",
1806
- "Gutmann",
1807
- "HDF5",
1808
- "HIDAPI",
1809
- "HP-1986",
1810
- "HP-1989",
1811
- "HPND",
1812
- "HPND-DEC",
1813
- "HPND-Fenneberg-Livingston",
1814
- "HPND-INRIA-IMAG",
1815
- "HPND-Intel",
1816
- "HPND-Kevlin-Henney",
1817
- "HPND-MIT-disclaimer",
1818
- "HPND-Markus-Kuhn",
1819
- "HPND-Netrek",
1820
- "HPND-Pbmplus",
1821
- "HPND-SMC",
1822
- "HPND-UC",
1823
- "HPND-UC-export-US",
1824
- "HPND-doc",
1825
- "HPND-doc-sell",
1826
- "HPND-export-US",
1827
- "HPND-export-US-acknowledgement",
1828
- "HPND-export-US-modify",
1829
- "HPND-export2-US",
1830
- "HPND-merchantability-variant",
1831
- "HPND-sell-MIT-disclaimer-xserver",
1832
- "HPND-sell-regexpr",
1833
- "HPND-sell-variant",
1834
- "HPND-sell-variant-MIT-disclaimer",
1835
- "HPND-sell-variant-MIT-disclaimer-rev",
1836
- "HPND-sell-variant-critical-systems",
1837
- "HTMLTIDY",
1838
- "HaskellReport",
1839
- "Hippocratic-2.1",
1840
- "IBM-pibs",
1841
- "ICU",
1842
- "IEC-Code-Components-EULA",
1843
- "IJG",
1844
- "IJG-short",
1845
- "IPA",
1846
- "IPL-1.0",
1847
- "ISC",
1848
- "ISC-Veillard",
1849
- "ISO-permission",
1850
- "ImageMagick",
1851
- "Imlib2",
1852
- "Info-ZIP",
1853
- "Inner-Net-2.0",
1854
- "InnoSetup",
1855
- "Intel",
1856
- "Intel-ACPI",
1857
- "Interbase-1.0",
1858
- "JPL-image",
1859
- "JPNIC",
1860
- "JSON",
1861
- "Jam",
1862
- "JasPer-2.0",
1863
- "Kastrup",
1864
- "Kazlib",
1865
- "Knuth-CTAN",
1866
- "LAL-1.2",
1867
- "LAL-1.3",
1868
- "LGPL-2.0-only",
1869
- "LGPL-2.0-or-later",
1870
- "LGPL-2.1-only",
1871
- "LGPL-2.1-or-later",
1872
- "LGPL-3.0-only",
1873
- "LGPL-3.0-or-later",
1874
- "LGPLLR",
1875
- "LOOP",
1876
- "LPD-document",
1877
- "LPL-1.0",
1878
- "LPL-1.02",
1879
- "LPPL-1.0",
1880
- "LPPL-1.1",
1881
- "LPPL-1.2",
1882
- "LPPL-1.3a",
1883
- "LPPL-1.3c",
1884
- "LZMA-SDK-9.11-to-9.20",
1885
- "LZMA-SDK-9.22",
1886
- "Latex2e",
1887
- "Latex2e-translated-notice",
1888
- "Leptonica",
1889
- "LiLiQ-P-1.1",
1890
- "LiLiQ-R-1.1",
1891
- "LiLiQ-Rplus-1.1",
1892
- "Libpng",
1893
- "Linux-OpenIB",
1894
- "Linux-man-pages-1-para",
1895
- "Linux-man-pages-copyleft",
1896
- "Linux-man-pages-copyleft-2-para",
1897
- "Linux-man-pages-copyleft-var",
1898
- "Lucida-Bitmap-Fonts",
1899
- "MIPS",
1900
- "MIT",
1901
- "MIT-0",
1902
- "MIT-CMU",
1903
- "MIT-Click",
1904
- "MIT-Festival",
1905
- "MIT-Khronos-old",
1906
- "MIT-Modern-Variant",
1907
- "MIT-STK",
1908
- "MIT-Wu",
1909
- "MIT-advertising",
1910
- "MIT-enna",
1911
- "MIT-feh",
1912
- "MIT-open-group",
1913
- "MIT-testregex",
1914
- "MITNFA",
1915
- "MMIXware",
1916
- "MMPL-1.0.1",
1917
- "MPEG-SSG",
1918
- "MPL-1.0",
1919
- "MPL-1.1",
1920
- "MPL-2.0",
1921
- "MPL-2.0-no-copyleft-exception",
1922
- "MS-LPL",
1923
- "MS-PL",
1924
- "MS-RL",
1925
- "MTLL",
1926
- "Mackerras-3-Clause",
1927
- "Mackerras-3-Clause-acknowledgment",
1928
- "MakeIndex",
1929
- "Martin-Birgmeier",
1930
- "McPhee-slideshow",
1931
- "Minpack",
1932
- "MirOS",
1933
- "Motosoto",
1934
- "MulanPSL-1.0",
1935
- "MulanPSL-2.0",
1936
- "Multics",
1937
- "Mup",
1938
- "NAIST-2003",
1939
- "NASA-1.3",
1940
- "NBPL-1.0",
1941
- "NCBI-PD",
1942
- "NCGL-UK-2.0",
1943
- "NCL",
1944
- "NCSA",
1945
- "NGPL",
1946
- "NICTA-1.0",
1947
- "NIST-PD",
1948
- "NIST-PD-TNT",
1949
- "NIST-PD-fallback",
1950
- "NIST-Software",
1951
- "NLOD-1.0",
1952
- "NLOD-2.0",
1953
- "NLPL",
1954
- "NOSL",
1955
- "NPL-1.0",
1956
- "NPL-1.1",
1957
- "NPOSL-3.0",
1958
- "NRL",
1959
- "NTIA-PD",
1960
- "NTP",
1961
- "NTP-0",
1962
- "Naumen",
1963
- "NetCDF",
1964
- "Newsletr",
1965
- "Nokia",
1966
- "Noweb",
1967
- "O-UDA-1.0",
1968
- "OAR",
1969
- "OCCT-PL",
1970
- "OCLC-2.0",
1971
- "ODC-By-1.0",
1972
- "ODbL-1.0",
1973
- "OFFIS",
1974
- "OFL-1.0",
1975
- "OFL-1.0-RFN",
1976
- "OFL-1.0-no-RFN",
1977
- "OFL-1.1",
1978
- "OFL-1.1-RFN",
1979
- "OFL-1.1-no-RFN",
1980
- "OGC-1.0",
1981
- "OGDL-Taiwan-1.0",
1982
- "OGL-Canada-2.0",
1983
- "OGL-UK-1.0",
1984
- "OGL-UK-2.0",
1985
- "OGL-UK-3.0",
1986
- "OGTSL",
1987
- "OLDAP-1.1",
1988
- "OLDAP-1.2",
1989
- "OLDAP-1.3",
1990
- "OLDAP-1.4",
1991
- "OLDAP-2.0",
1992
- "OLDAP-2.0.1",
1993
- "OLDAP-2.1",
1994
- "OLDAP-2.2",
1995
- "OLDAP-2.2.1",
1996
- "OLDAP-2.2.2",
1997
- "OLDAP-2.3",
1998
- "OLDAP-2.4",
1999
- "OLDAP-2.5",
2000
- "OLDAP-2.6",
2001
- "OLDAP-2.7",
2002
- "OLDAP-2.8",
2003
- "OLFL-1.3",
2004
- "OML",
2005
- "OPL-1.0",
2006
- "OPL-UK-3.0",
2007
- "OPUBL-1.0",
2008
- "OSC-1.0",
2009
- "OSET-PL-2.1",
2010
- "OSL-1.0",
2011
- "OSL-1.1",
2012
- "OSL-2.0",
2013
- "OSL-2.1",
2014
- "OSL-3.0",
2015
- "OSSP",
2016
- "OpenMDW-1.0",
2017
- "OpenPBS-2.3",
2018
- "OpenSSL",
2019
- "OpenSSL-standalone",
2020
- "OpenVision",
2021
- "PADL",
2022
- "PDDL-1.0",
2023
- "PHP-3.0",
2024
- "PHP-3.01",
2025
- "PPL",
2026
- "PSF-2.0",
2027
- "ParaType-Free-Font-1.3",
2028
- "Parity-6.0.0",
2029
- "Parity-7.0.0",
2030
- "Pixar",
2031
- "Plexus",
2032
- "PolyForm-Noncommercial-1.0.0",
2033
- "PolyForm-Small-Business-1.0.0",
2034
- "PostgreSQL",
2035
- "Python-2.0",
2036
- "Python-2.0.1",
2037
- "QPL-1.0",
2038
- "QPL-1.0-INRIA-2004",
2039
- "Qhull",
2040
- "RHeCos-1.1",
2041
- "RPL-1.1",
2042
- "RPL-1.5",
2043
- "RPSL-1.0",
2044
- "RSA-MD",
2045
- "RSCPL",
2046
- "Rdisc",
2047
- "Ruby",
2048
- "Ruby-pty",
2049
- "SAX-PD",
2050
- "SAX-PD-2.0",
2051
- "SCEA",
2052
- "SGI-B-1.0",
2053
- "SGI-B-1.1",
2054
- "SGI-B-2.0",
2055
- "SGI-OpenGL",
2056
- "SGMLUG-PM",
2057
- "SGP4",
2058
- "SHL-0.5",
2059
- "SHL-0.51",
2060
- "SISSL",
2061
- "SISSL-1.2",
2062
- "SL",
2063
- "SMAIL-GPL",
2064
- "SMLNJ",
2065
- "SMPPL",
2066
- "SNIA",
2067
- "SOFA",
2068
- "SPL-1.0",
2069
- "SSH-OpenSSH",
2070
- "SSH-short",
2071
- "SSLeay-standalone",
2072
- "SSPL-1.0",
2073
- "SUL-1.0",
2074
- "SWL",
2075
- "Saxpath",
2076
- "SchemeReport",
2077
- "Sendmail",
2078
- "Sendmail-8.23",
2079
- "Sendmail-Open-Source-1.1",
2080
- "SimPL-2.0",
2081
- "Sleepycat",
2082
- "Soundex",
2083
- "Spencer-86",
2084
- "Spencer-94",
2085
- "Spencer-99",
2086
- "SugarCRM-1.1.3",
2087
- "Sun-PPP",
2088
- "Sun-PPP-2000",
2089
- "SunPro",
2090
- "Symlinks",
2091
- "TAPR-OHL-1.0",
2092
- "TCL",
2093
- "TCP-wrappers",
2094
- "TGPPL-1.0",
2095
- "TMate",
2096
- "TORQUE-1.1",
2097
- "TOSL",
2098
- "TPDL",
2099
- "TPL-1.0",
2100
- "TTWL",
2101
- "TTYP0",
2102
- "TU-Berlin-1.0",
2103
- "TU-Berlin-2.0",
2104
- "TekHVC",
2105
- "TermReadKey",
2106
- "ThirdEye",
2107
- "TrustedQSL",
2108
- "UCAR",
2109
- "UCL-1.0",
2110
- "UMich-Merit",
2111
- "UPL-1.0",
2112
- "URT-RLE",
2113
- "Ubuntu-font-1.0",
2114
- "UnRAR",
2115
- "Unicode-3.0",
2116
- "Unicode-DFS-2015",
2117
- "Unicode-DFS-2016",
2118
- "Unicode-TOU",
2119
- "UnixCrypt",
2120
- "Unlicense",
2121
- "Unlicense-libtelnet",
2122
- "Unlicense-libwhirlpool",
2123
- "VOSTROM",
2124
- "VSL-1.0",
2125
- "Vim",
2126
- "Vixie-Cron",
2127
- "W3C",
2128
- "W3C-19980720",
2129
- "W3C-20150513",
2130
- "WTFNMFPL",
2131
- "WTFPL",
2132
- "Watcom-1.0",
2133
- "Widget-Workshop",
2134
- "WordNet",
2135
- "Wsuipa",
2136
- "X11",
2137
- "X11-distribute-modifications-variant",
2138
- "X11-no-permit-persons",
2139
- "X11-swapped",
2140
- "XFree86-1.1",
2141
- "XSkat",
2142
- "Xdebug-1.03",
2143
- "Xerox",
2144
- "Xfig",
2145
- "Xnet",
2146
- "YPL-1.0",
2147
- "YPL-1.1",
2148
- "ZPL-1.1",
2149
- "ZPL-2.0",
2150
- "ZPL-2.1",
2151
- "Zed",
2152
- "Zeeff",
2153
- "Zend-2.0",
2154
- "Zimbra-1.3",
2155
- "Zimbra-1.4",
2156
- "Zlib",
2157
- "any-OSI",
2158
- "any-OSI-perl-modules",
2159
- "bcrypt-Solar-Designer",
2160
- "blessing",
2161
- "bzip2-1.0.6",
2162
- "check-cvs",
2163
- "checkmk",
2164
- "copyleft-next-0.3.0",
2165
- "copyleft-next-0.3.1",
2166
- "curl",
2167
- "cve-tou",
2168
- "diffmark",
2169
- "dtoa",
2170
- "dvipdfm",
2171
- "eGenix",
2172
- "etalab-2.0",
2173
- "fwlw",
2174
- "gSOAP-1.3b",
2175
- "generic-xts",
2176
- "gnuplot",
2177
- "gtkbook",
2178
- "hdparm",
2179
- "hyphen-bulgarian",
2180
- "iMatix",
2181
- "jove",
2182
- "libpng-1.6.35",
2183
- "libpng-2.0",
2184
- "libselinux-1.0",
2185
- "libtiff",
2186
- "libutil-David-Nugent",
2187
- "lsof",
2188
- "magaz",
2189
- "mailprio",
2190
- "man2html",
2191
- "metamail",
2192
- "mpi-permissive",
2193
- "mpich2",
2194
- "mplus",
2195
- "ngrep",
2196
- "pkgconf",
2197
- "pnmstitch",
2198
- "psfrag",
2199
- "psutils",
2200
- "python-ldap",
2201
- "radvd",
2202
- "snprintf",
2203
- "softSurfer",
2204
- "ssh-keyscan",
2205
- "swrule",
2206
- "threeparttable",
2207
- "ulem",
2208
- "w3m",
2209
- "wwl",
2210
- "xinetd",
2211
- "xkeyboard-config-Zinoviev",
2212
- "xlock",
2213
- "xpp",
2214
- "xzoom",
2215
- "zlib-acknowledgement"
2216
- ];
2217
- }));
2218
- //#endregion
2219
- //#region ../../node_modules/.pnpm/spdx-license-ids@3.0.23/node_modules/spdx-license-ids/deprecated.json
2220
- var require_deprecated = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2221
- module.exports = [
2222
- "AGPL-1.0",
2223
- "AGPL-3.0",
2224
- "BSD-2-Clause-FreeBSD",
2225
- "BSD-2-Clause-NetBSD",
2226
- "GFDL-1.1",
2227
- "GFDL-1.2",
2228
- "GFDL-1.3",
2229
- "GPL-1.0",
2230
- "GPL-2.0",
2231
- "GPL-2.0-with-GCC-exception",
2232
- "GPL-2.0-with-autoconf-exception",
2233
- "GPL-2.0-with-bison-exception",
2234
- "GPL-2.0-with-classpath-exception",
2235
- "GPL-2.0-with-font-exception",
2236
- "GPL-3.0",
2237
- "GPL-3.0-with-GCC-exception",
2238
- "GPL-3.0-with-autoconf-exception",
2239
- "LGPL-2.0",
2240
- "LGPL-2.1",
2241
- "LGPL-3.0",
2242
- "Net-SNMP",
2243
- "Nunit",
2244
- "StandardML-NJ",
2245
- "bzip2-1.0.5",
2246
- "eCos-2.0",
2247
- "wxWindows"
2248
- ];
2249
- }));
2250
- //#endregion
2251
- //#region ../../node_modules/.pnpm/spdx-exceptions@2.5.0/node_modules/spdx-exceptions/index.json
2252
- var require_spdx_exceptions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2253
- module.exports = [
2254
- "389-exception",
2255
- "Asterisk-exception",
2256
- "Autoconf-exception-2.0",
2257
- "Autoconf-exception-3.0",
2258
- "Autoconf-exception-generic",
2259
- "Autoconf-exception-generic-3.0",
2260
- "Autoconf-exception-macro",
2261
- "Bison-exception-1.24",
2262
- "Bison-exception-2.2",
2263
- "Bootloader-exception",
2264
- "Classpath-exception-2.0",
2265
- "CLISP-exception-2.0",
2266
- "cryptsetup-OpenSSL-exception",
2267
- "DigiRule-FOSS-exception",
2268
- "eCos-exception-2.0",
2269
- "Fawkes-Runtime-exception",
2270
- "FLTK-exception",
2271
- "fmt-exception",
2272
- "Font-exception-2.0",
2273
- "freertos-exception-2.0",
2274
- "GCC-exception-2.0",
2275
- "GCC-exception-2.0-note",
2276
- "GCC-exception-3.1",
2277
- "Gmsh-exception",
2278
- "GNAT-exception",
2279
- "GNOME-examples-exception",
2280
- "GNU-compiler-exception",
2281
- "gnu-javamail-exception",
2282
- "GPL-3.0-interface-exception",
2283
- "GPL-3.0-linking-exception",
2284
- "GPL-3.0-linking-source-exception",
2285
- "GPL-CC-1.0",
2286
- "GStreamer-exception-2005",
2287
- "GStreamer-exception-2008",
2288
- "i2p-gpl-java-exception",
2289
- "KiCad-libraries-exception",
2290
- "LGPL-3.0-linking-exception",
2291
- "libpri-OpenH323-exception",
2292
- "Libtool-exception",
2293
- "Linux-syscall-note",
2294
- "LLGPL",
2295
- "LLVM-exception",
2296
- "LZMA-exception",
2297
- "mif-exception",
2298
- "OCaml-LGPL-linking-exception",
2299
- "OCCT-exception-1.0",
2300
- "OpenJDK-assembly-exception-1.0",
2301
- "openvpn-openssl-exception",
2302
- "PS-or-PDF-font-exception-20170817",
2303
- "QPL-1.0-INRIA-2004-exception",
2304
- "Qt-GPL-exception-1.0",
2305
- "Qt-LGPL-exception-1.1",
2306
- "Qwt-exception-1.0",
2307
- "SANE-exception",
2308
- "SHL-2.0",
2309
- "SHL-2.1",
2310
- "stunnel-exception",
2311
- "SWI-exception",
2312
- "Swift-exception",
2313
- "Texinfo-exception",
2314
- "u-boot-exception-2.0",
2315
- "UBDL-exception",
2316
- "Universal-FOSS-exception-1.0",
2317
- "vsftpd-openssl-exception",
2318
- "WxWindows-exception-3.1",
2319
- "x11vnc-openssl-exception"
2320
- ];
2321
- }));
2322
- //#endregion
2323
- //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js
2324
- var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2325
- var licenses = [].concat(require_spdx_license_ids()).concat(require_deprecated());
2326
- var exceptions = require_spdx_exceptions();
2327
- module.exports = function(source) {
2328
- var index = 0;
2329
- function hasMore() {
2330
- return index < source.length;
2331
- }
2332
- function read(value) {
2333
- if (value instanceof RegExp) {
2334
- var match = source.slice(index).match(value);
2335
- if (match) {
2336
- index += match[0].length;
2337
- return match[0];
2338
- }
2339
- } else if (source.indexOf(value, index) === index) {
2340
- index += value.length;
2341
- return value;
2342
- }
2343
- }
2344
- function skipWhitespace() {
2345
- read(/[ ]*/);
2346
- }
2347
- function operator() {
2348
- var string;
2349
- var possibilities = [
2350
- "WITH",
2351
- "AND",
2352
- "OR",
2353
- "(",
2354
- ")",
2355
- ":",
2356
- "+"
2357
- ];
2358
- for (var i = 0; i < possibilities.length; i++) {
2359
- string = read(possibilities[i]);
2360
- if (string) break;
2361
- }
2362
- if (string === "+" && index > 1 && source[index - 2] === " ") throw new Error("Space before `+`");
2363
- return string && {
2364
- type: "OPERATOR",
2365
- string
2366
- };
2367
- }
2368
- function idstring() {
2369
- return read(/[A-Za-z0-9-.]+/);
2370
- }
2371
- function expectIdstring() {
2372
- var string = idstring();
2373
- if (!string) throw new Error("Expected idstring at offset " + index);
2374
- return string;
2375
- }
2376
- function documentRef() {
2377
- if (read("DocumentRef-")) return {
2378
- type: "DOCUMENTREF",
2379
- string: expectIdstring()
2380
- };
2381
- }
2382
- function licenseRef() {
2383
- if (read("LicenseRef-")) return {
2384
- type: "LICENSEREF",
2385
- string: expectIdstring()
2386
- };
2387
- }
2388
- function identifier() {
2389
- var begin = index;
2390
- var string = idstring();
2391
- if (licenses.indexOf(string) !== -1) return {
2392
- type: "LICENSE",
2393
- string
2394
- };
2395
- else if (exceptions.indexOf(string) !== -1) return {
2396
- type: "EXCEPTION",
2397
- string
2398
- };
2399
- index = begin;
2400
- }
2401
- function parseToken() {
2402
- return operator() || documentRef() || licenseRef() || identifier();
2403
- }
2404
- var tokens = [];
2405
- while (hasMore()) {
2406
- skipWhitespace();
2407
- if (!hasMore()) break;
2408
- var token = parseToken();
2409
- if (!token) throw new Error("Unexpected `" + source[index] + "` at offset " + index);
2410
- tokens.push(token);
2411
- }
2412
- return tokens;
2413
- };
2414
- }));
2415
- //#endregion
2416
- //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js
2417
- var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2418
- module.exports = function(tokens) {
2419
- var index = 0;
2420
- function hasMore() {
2421
- return index < tokens.length;
2422
- }
2423
- function token() {
2424
- return hasMore() ? tokens[index] : null;
2425
- }
2426
- function next() {
2427
- if (!hasMore()) throw new Error();
2428
- index++;
2429
- }
2430
- function parseOperator(operator) {
2431
- var t = token();
2432
- if (t && t.type === "OPERATOR" && operator === t.string) {
2433
- next();
2434
- return t.string;
2435
- }
2436
- }
2437
- function parseWith() {
2438
- if (parseOperator("WITH")) {
2439
- var t = token();
2440
- if (t && t.type === "EXCEPTION") {
2441
- next();
2442
- return t.string;
2443
- }
2444
- throw new Error("Expected exception after `WITH`");
2445
- }
2446
- }
2447
- function parseLicenseRef() {
2448
- var begin = index;
2449
- var string = "";
2450
- var t = token();
2451
- if (t.type === "DOCUMENTREF") {
2452
- next();
2453
- string += "DocumentRef-" + t.string + ":";
2454
- if (!parseOperator(":")) throw new Error("Expected `:` after `DocumentRef-...`");
2455
- }
2456
- t = token();
2457
- if (t.type === "LICENSEREF") {
2458
- next();
2459
- string += "LicenseRef-" + t.string;
2460
- return { license: string };
2461
- }
2462
- index = begin;
2463
- }
2464
- function parseLicense() {
2465
- var t = token();
2466
- if (t && t.type === "LICENSE") {
2467
- next();
2468
- var node = { license: t.string };
2469
- if (parseOperator("+")) node.plus = true;
2470
- var exception = parseWith();
2471
- if (exception) node.exception = exception;
2472
- return node;
2473
- }
2474
- }
2475
- function parseParenthesizedExpression() {
2476
- if (!parseOperator("(")) return;
2477
- var expr = parseExpression();
2478
- if (!parseOperator(")")) throw new Error("Expected `)`");
2479
- return expr;
2480
- }
2481
- function parseAtom() {
2482
- return parseParenthesizedExpression() || parseLicenseRef() || parseLicense();
2483
- }
2484
- function makeBinaryOpParser(operator, nextParser) {
2485
- return function parseBinaryOp() {
2486
- var left = nextParser();
2487
- if (!left) return;
2488
- if (!parseOperator(operator)) return left;
2489
- var right = parseBinaryOp();
2490
- if (!right) throw new Error("Expected expression");
2491
- return {
2492
- left,
2493
- conjunction: operator.toLowerCase(),
2494
- right
2495
- };
2496
- };
2497
- }
2498
- var parseExpression = makeBinaryOpParser("OR", makeBinaryOpParser("AND", parseAtom));
2499
- var node = parseExpression();
2500
- if (!node || hasMore()) throw new Error("Syntax error");
2501
- return node;
2502
- };
2503
- }));
2504
- //#endregion
2505
- //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js
2506
- var require_spdx_expression_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2507
- var scan = require_scan();
2508
- var parse = require_parse();
2509
- module.exports = function(source) {
2510
- return parse(scan(source));
2511
- };
2512
- }));
2513
- //#endregion
2514
- //#region ../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js
2515
- var require_spdx_correct = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2516
- var parse = require_spdx_expression_parse();
2517
- var spdxLicenseIds = require_spdx_license_ids();
2518
- function valid(string) {
2519
- try {
2520
- parse(string);
2521
- return true;
2522
- } catch (error) {
2523
- return false;
2524
- }
2525
- }
2526
- function sortTranspositions(a, b) {
2527
- var length = b[0].length - a[0].length;
2528
- if (length !== 0) return length;
2529
- return a[0].toUpperCase().localeCompare(b[0].toUpperCase());
2530
- }
2531
- var transpositions = [
2532
- ["APGL", "AGPL"],
2533
- ["Gpl", "GPL"],
2534
- ["GLP", "GPL"],
2535
- ["APL", "Apache"],
2536
- ["ISD", "ISC"],
2537
- ["GLP", "GPL"],
2538
- ["IST", "ISC"],
2539
- ["Claude", "Clause"],
2540
- [" or later", "+"],
2541
- [" International", ""],
2542
- ["GNU", "GPL"],
2543
- ["GUN", "GPL"],
2544
- ["+", ""],
2545
- ["GNU GPL", "GPL"],
2546
- ["GNU LGPL", "LGPL"],
2547
- ["GNU/GPL", "GPL"],
2548
- ["GNU GLP", "GPL"],
2549
- ["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL"],
2550
- ["GNU Lesser General Public License", "LGPL"],
2551
- ["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
2552
- ["GNU Lesser General Public License", "LGPL-2.1"],
2553
- ["LESSER GENERAL PUBLIC LICENSE", "LGPL"],
2554
- ["Lesser General Public License", "LGPL"],
2555
- ["LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
2556
- ["Lesser General Public License", "LGPL-2.1"],
2557
- ["GNU General Public License", "GPL"],
2558
- ["Gnu public license", "GPL"],
2559
- ["GNU Public License", "GPL"],
2560
- ["GNU GENERAL PUBLIC LICENSE", "GPL"],
2561
- ["MTI", "MIT"],
2562
- ["Mozilla Public License", "MPL"],
2563
- ["Universal Permissive License", "UPL"],
2564
- ["WTH", "WTF"],
2565
- ["WTFGPL", "WTFPL"],
2566
- ["-License", ""]
2567
- ].sort(sortTranspositions);
2568
- var TRANSPOSED = 0;
2569
- var CORRECT = 1;
2570
- var transforms = [
2571
- function(argument) {
2572
- return argument.toUpperCase();
2573
- },
2574
- function(argument) {
2575
- return argument.trim();
2576
- },
2577
- function(argument) {
2578
- return argument.replace(/\./g, "");
2579
- },
2580
- function(argument) {
2581
- return argument.replace(/\s+/g, "");
2582
- },
2583
- function(argument) {
2584
- return argument.replace(/\s+/g, "-");
2585
- },
2586
- function(argument) {
2587
- return argument.replace("v", "-");
2588
- },
2589
- function(argument) {
2590
- return argument.replace(/,?\s*(\d)/, "-$1");
2591
- },
2592
- function(argument) {
2593
- return argument.replace(/,?\s*(\d)/, "-$1.0");
2594
- },
2595
- function(argument) {
2596
- return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2");
2597
- },
2598
- function(argument) {
2599
- return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2.0");
2600
- },
2601
- function(argument) {
2602
- return argument[0].toUpperCase() + argument.slice(1);
2603
- },
2604
- function(argument) {
2605
- return argument.replace("/", "-");
2606
- },
2607
- function(argument) {
2608
- return argument.replace(/\s*V\s*(\d)/, "-$1").replace(/(\d)$/, "$1.0");
2609
- },
2610
- function(argument) {
2611
- if (argument.indexOf("3.0") !== -1) return argument + "-or-later";
2612
- else return argument + "-only";
2613
- },
2614
- function(argument) {
2615
- return argument + "only";
2616
- },
2617
- function(argument) {
2618
- return argument.replace(/(\d)$/, "-$1.0");
2619
- },
2620
- function(argument) {
2621
- return argument.replace(/(-| )?(\d)$/, "-$2-Clause");
2622
- },
2623
- function(argument) {
2624
- return argument.replace(/(-| )clause(-| )(\d)/, "-$3-Clause");
2625
- },
2626
- function(argument) {
2627
- return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, "BSD-3-Clause");
2628
- },
2629
- function(argument) {
2630
- return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, "BSD-2-Clause");
2631
- },
2632
- function(argument) {
2633
- return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, "BSD-2-Clause-$1BSD");
2634
- },
2635
- function(argument) {
2636
- return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, "BSD-3-Clause-Clear");
2637
- },
2638
- function(argument) {
2639
- return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, "BSD-4-Clause");
2640
- },
2641
- function(argument) {
2642
- return "CC-" + argument;
2643
- },
2644
- function(argument) {
2645
- return "CC-" + argument + "-4.0";
2646
- },
2647
- function(argument) {
2648
- return argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "");
2649
- },
2650
- function(argument) {
2651
- return "CC-" + argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "") + "-4.0";
2652
- }
2653
- ];
2654
- var licensesWithVersions = spdxLicenseIds.map(function(id) {
2655
- var match = /^(.*)-\d+\.\d+$/.exec(id);
2656
- return match ? [match[0], match[1]] : [id, null];
2657
- }).reduce(function(objectMap, item) {
2658
- var key = item[1];
2659
- objectMap[key] = objectMap[key] || [];
2660
- objectMap[key].push(item[0]);
2661
- return objectMap;
2662
- }, {});
2663
- var licensesWithOneVersion = Object.keys(licensesWithVersions).map(function makeEntries(key) {
2664
- return [key, licensesWithVersions[key]];
2665
- }).filter(function identifySoleVersions(item) {
2666
- return item[1].length === 1 && item[0] !== null && item[0] !== "APL";
2667
- }).map(function createLastResorts(item) {
2668
- return [item[0], item[1][0]];
2669
- });
2670
- licensesWithVersions = void 0;
2671
- var lastResorts = [
2672
- ["UNLI", "Unlicense"],
2673
- ["WTF", "WTFPL"],
2674
- ["2 CLAUSE", "BSD-2-Clause"],
2675
- ["2-CLAUSE", "BSD-2-Clause"],
2676
- ["3 CLAUSE", "BSD-3-Clause"],
2677
- ["3-CLAUSE", "BSD-3-Clause"],
2678
- ["AFFERO", "AGPL-3.0-or-later"],
2679
- ["AGPL", "AGPL-3.0-or-later"],
2680
- ["APACHE", "Apache-2.0"],
2681
- ["ARTISTIC", "Artistic-2.0"],
2682
- ["Affero", "AGPL-3.0-or-later"],
2683
- ["BEER", "Beerware"],
2684
- ["BOOST", "BSL-1.0"],
2685
- ["BSD", "BSD-2-Clause"],
2686
- ["CDDL", "CDDL-1.1"],
2687
- ["ECLIPSE", "EPL-1.0"],
2688
- ["FUCK", "WTFPL"],
2689
- ["GNU", "GPL-3.0-or-later"],
2690
- ["LGPL", "LGPL-3.0-or-later"],
2691
- ["GPLV1", "GPL-1.0-only"],
2692
- ["GPL-1", "GPL-1.0-only"],
2693
- ["GPLV2", "GPL-2.0-only"],
2694
- ["GPL-2", "GPL-2.0-only"],
2695
- ["GPL", "GPL-3.0-or-later"],
2696
- ["MIT +NO-FALSE-ATTRIBS", "MITNFA"],
2697
- ["MIT", "MIT"],
2698
- ["MPL", "MPL-2.0"],
2699
- ["X11", "X11"],
2700
- ["ZLIB", "Zlib"]
2701
- ].concat(licensesWithOneVersion).sort(sortTranspositions);
2702
- var SUBSTRING = 0;
2703
- var IDENTIFIER = 1;
2704
- var validTransformation = function(identifier) {
2705
- for (var i = 0; i < transforms.length; i++) {
2706
- var transformed = transforms[i](identifier).trim();
2707
- if (transformed !== identifier && valid(transformed)) return transformed;
2708
- }
2709
- return null;
2710
- };
2711
- var validLastResort = function(identifier) {
2712
- var upperCased = identifier.toUpperCase();
2713
- for (var i = 0; i < lastResorts.length; i++) {
2714
- var lastResort = lastResorts[i];
2715
- if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) return lastResort[IDENTIFIER];
2716
- }
2717
- return null;
2718
- };
2719
- var anyCorrection = function(identifier, check) {
2720
- for (var i = 0; i < transpositions.length; i++) {
2721
- var transposition = transpositions[i];
2722
- var transposed = transposition[TRANSPOSED];
2723
- if (identifier.indexOf(transposed) > -1) {
2724
- var checked = check(identifier.replace(transposed, transposition[CORRECT]));
2725
- if (checked !== null) return checked;
2726
- }
2727
- }
2728
- return null;
2729
- };
2730
- module.exports = function(identifier, options) {
2731
- options = options || {};
2732
- var upgrade = options.upgrade === void 0 ? true : !!options.upgrade;
2733
- function postprocess(value) {
2734
- return upgrade ? upgradeGPLs(value) : value;
2735
- }
2736
- if (!(typeof identifier === "string" && identifier.trim().length !== 0)) throw Error("Invalid argument. Expected non-empty string.");
2737
- identifier = identifier.trim();
2738
- if (valid(identifier)) return postprocess(identifier);
2739
- var noPlus = identifier.replace(/\+$/, "").trim();
2740
- if (valid(noPlus)) return postprocess(noPlus);
2741
- var transformed = validTransformation(identifier);
2742
- if (transformed !== null) return postprocess(transformed);
2743
- transformed = anyCorrection(identifier, function(argument) {
2744
- if (valid(argument)) return argument;
2745
- return validTransformation(argument);
2746
- });
2747
- if (transformed !== null) return postprocess(transformed);
2748
- transformed = validLastResort(identifier);
2749
- if (transformed !== null) return postprocess(transformed);
2750
- transformed = anyCorrection(identifier, validLastResort);
2751
- if (transformed !== null) return postprocess(transformed);
2752
- return null;
2753
- };
2754
- function upgradeGPLs(value) {
2755
- if ([
2756
- "GPL-1.0",
2757
- "LGPL-1.0",
2758
- "AGPL-1.0",
2759
- "GPL-2.0",
2760
- "LGPL-2.0",
2761
- "AGPL-2.0",
2762
- "LGPL-2.1"
2763
- ].indexOf(value) !== -1) return value + "-only";
2764
- else if ([
2765
- "GPL-1.0+",
2766
- "GPL-2.0+",
2767
- "GPL-3.0+",
2768
- "LGPL-2.0+",
2769
- "LGPL-2.1+",
2770
- "LGPL-3.0+",
2771
- "AGPL-1.0+",
2772
- "AGPL-3.0+"
2773
- ].indexOf(value) !== -1) return value.replace(/\+$/, "-or-later");
2774
- else if ([
2775
- "GPL-3.0",
2776
- "LGPL-3.0",
2777
- "AGPL-3.0"
2778
- ].indexOf(value) !== -1) return value + "-or-later";
2779
- else return value;
2780
- }
2781
- }));
2782
- //#endregion
2783
- //#region ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js
2784
- var require_validate_npm_package_license = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2785
- var parse = require_spdx_expression_parse();
2786
- var correct = require_spdx_correct();
2787
- var genericWarning = "license should be a valid SPDX license expression (without \"LicenseRef\"), \"UNLICENSED\", or \"SEE LICENSE IN <filename>\"";
2788
- var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
2789
- function startsWith(prefix, string) {
2790
- return string.slice(0, prefix.length) === prefix;
2791
- }
2792
- function usesLicenseRef(ast) {
2793
- if (ast.hasOwnProperty("license")) {
2794
- var license = ast.license;
2795
- return startsWith("LicenseRef", license) || startsWith("DocumentRef", license);
2796
- } else return usesLicenseRef(ast.left) || usesLicenseRef(ast.right);
2797
- }
2798
- module.exports = function(argument) {
2799
- var ast;
2800
- try {
2801
- ast = parse(argument);
2802
- } catch (e) {
2803
- var match;
2804
- if (argument === "UNLICENSED" || argument === "UNLICENCED") return {
2805
- validForOldPackages: true,
2806
- validForNewPackages: true,
2807
- unlicensed: true
2808
- };
2809
- else if (match = fileReferenceRE.exec(argument)) return {
2810
- validForOldPackages: true,
2811
- validForNewPackages: true,
2812
- inFile: match[1]
2813
- };
2814
- else {
2815
- var result = {
2816
- validForOldPackages: false,
2817
- validForNewPackages: false,
2818
- warnings: [genericWarning]
2819
- };
2820
- if (argument.trim().length !== 0) {
2821
- var corrected = correct(argument);
2822
- if (corrected) result.warnings.push("license is similar to the valid expression \"" + corrected + "\"");
2823
- }
2824
- return result;
2825
- }
2826
- }
2827
- if (usesLicenseRef(ast)) return {
2828
- validForNewPackages: false,
2829
- validForOldPackages: false,
2830
- spdx: true,
2831
- warnings: [genericWarning]
2832
- };
2833
- else return {
2834
- validForNewPackages: true,
2835
- validForOldPackages: true,
2836
- spdx: true
2837
- };
2838
- };
2839
- }));
2840
- //#endregion
2841
- //#region ../../node_modules/.pnpm/lru-cache@11.2.6/node_modules/lru-cache/dist/commonjs/index.min.js
2842
- var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
2843
- Object.defineProperty(exports, "__esModule", { value: !0 });
2844
- exports.LRUCache = void 0;
2845
- var x = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, U = /* @__PURE__ */ new Set(), R = typeof process == "object" && process ? process : {}, I = (a, t, e, i) => {
2846
- typeof R.emitWarning == "function" ? R.emitWarning(a, t, e, i) : console.error(`[${e}] ${t}: ${a}`);
2847
- }, C = globalThis.AbortController, L = globalThis.AbortSignal;
2848
- if (typeof C > "u") {
2849
- L = class {
2850
- onabort;
2851
- _onabort = [];
2852
- reason;
2853
- aborted = !1;
2854
- addEventListener(i, s) {
2855
- this._onabort.push(s);
2856
- }
2857
- }, C = class {
2858
- constructor() {
2859
- t();
2860
- }
2861
- signal = new L();
2862
- abort(i) {
2863
- if (!this.signal.aborted) {
2864
- this.signal.reason = i, this.signal.aborted = !0;
2865
- for (let s of this.signal._onabort) s(i);
2866
- this.signal.onabort?.(i);
2867
- }
2868
- }
2869
- };
2870
- let a = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
2871
- a && (a = !1, I("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
2872
- };
2873
- }
2874
- var G = (a) => !U.has(a), y = (a) => a && a === Math.floor(a) && a > 0 && isFinite(a), M = (a) => y(a) ? a <= Math.pow(2, 8) ? Uint8Array : a <= Math.pow(2, 16) ? Uint16Array : a <= Math.pow(2, 32) ? Uint32Array : a <= Number.MAX_SAFE_INTEGER ? z : null : null, z = class extends Array {
2875
- constructor(t) {
2876
- super(t), this.fill(0);
2877
- }
2878
- }, W = class a {
2879
- heap;
2880
- length;
2881
- static #o = !1;
2882
- static create(t) {
2883
- let e = M(t);
2884
- if (!e) return [];
2885
- a.#o = !0;
2886
- let i = new a(t, e);
2887
- return a.#o = !1, i;
2888
- }
2889
- constructor(t, e) {
2890
- if (!a.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
2891
- this.heap = new e(t), this.length = 0;
2892
- }
2893
- push(t) {
2894
- this.heap[this.length++] = t;
2895
- }
2896
- pop() {
2897
- return this.heap[--this.length];
2898
- }
2899
- };
2900
- exports.LRUCache = class a {
2901
- #o;
2902
- #c;
2903
- #w;
2904
- #C;
2905
- #S;
2906
- #L;
2907
- #U;
2908
- #m;
2909
- get perf() {
2910
- return this.#m;
2911
- }
2912
- ttl;
2913
- ttlResolution;
2914
- ttlAutopurge;
2915
- updateAgeOnGet;
2916
- updateAgeOnHas;
2917
- allowStale;
2918
- noDisposeOnSet;
2919
- noUpdateTTL;
2920
- maxEntrySize;
2921
- sizeCalculation;
2922
- noDeleteOnFetchRejection;
2923
- noDeleteOnStaleGet;
2924
- allowStaleOnFetchAbort;
2925
- allowStaleOnFetchRejection;
2926
- ignoreFetchAbort;
2927
- #n;
2928
- #_;
2929
- #s;
2930
- #i;
2931
- #t;
2932
- #a;
2933
- #u;
2934
- #l;
2935
- #h;
2936
- #b;
2937
- #r;
2938
- #y;
2939
- #A;
2940
- #d;
2941
- #g;
2942
- #T;
2943
- #v;
2944
- #f;
2945
- #I;
2946
- static unsafeExposeInternals(t) {
2947
- return {
2948
- starts: t.#A,
2949
- ttls: t.#d,
2950
- autopurgeTimers: t.#g,
2951
- sizes: t.#y,
2952
- keyMap: t.#s,
2953
- keyList: t.#i,
2954
- valList: t.#t,
2955
- next: t.#a,
2956
- prev: t.#u,
2957
- get head() {
2958
- return t.#l;
2959
- },
2960
- get tail() {
2961
- return t.#h;
2962
- },
2963
- free: t.#b,
2964
- isBackgroundFetch: (e) => t.#e(e),
2965
- backgroundFetch: (e, i, s, h) => t.#G(e, i, s, h),
2966
- moveToTail: (e) => t.#D(e),
2967
- indexes: (e) => t.#F(e),
2968
- rindexes: (e) => t.#O(e),
2969
- isStale: (e) => t.#p(e)
2970
- };
2971
- }
2972
- get max() {
2973
- return this.#o;
2974
- }
2975
- get maxSize() {
2976
- return this.#c;
2977
- }
2978
- get calculatedSize() {
2979
- return this.#_;
2980
- }
2981
- get size() {
2982
- return this.#n;
2983
- }
2984
- get fetchMethod() {
2985
- return this.#L;
2986
- }
2987
- get memoMethod() {
2988
- return this.#U;
2989
- }
2990
- get dispose() {
2991
- return this.#w;
2992
- }
2993
- get onInsert() {
2994
- return this.#C;
2995
- }
2996
- get disposeAfter() {
2997
- return this.#S;
2998
- }
2999
- constructor(t) {
3000
- let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: h, updateAgeOnGet: n, updateAgeOnHas: o, allowStale: r, dispose: f, onInsert: m, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: g, maxSize: A = 0, maxEntrySize: p = 0, sizeCalculation: _, fetchMethod: l, memoMethod: w, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: S, allowStaleOnFetchRejection: u, allowStaleOnFetchAbort: T, ignoreFetchAbort: F, perf: v } = t;
3001
- if (v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
3002
- if (this.#m = v ?? x, e !== 0 && !y(e)) throw new TypeError("max option must be a nonnegative integer");
3003
- let O = e ? M(e) : Array;
3004
- if (!O) throw new Error("invalid max value: " + e);
3005
- if (this.#o = e, this.#c = A, this.maxEntrySize = p || this.#c, this.sizeCalculation = _, this.sizeCalculation) {
3006
- if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
3007
- if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
3008
- }
3009
- if (w !== void 0 && typeof w != "function") throw new TypeError("memoMethod must be a function if defined");
3010
- if (this.#U = w, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
3011
- if (this.#L = l, this.#v = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = new Array(e).fill(void 0), this.#t = new Array(e).fill(void 0), this.#a = new O(e), this.#u = new O(e), this.#l = 0, this.#h = 0, this.#b = W.create(e), this.#n = 0, this.#_ = 0, typeof f == "function" && (this.#w = f), typeof m == "function" && (this.#C = m), typeof c == "function" ? (this.#S = c, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#I = !!this.#C, this.#f = !!this.#S, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!g, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!u, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!F, this.maxEntrySize !== 0) {
3012
- if (this.#c !== 0 && !y(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
3013
- if (!y(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
3014
- this.#B();
3015
- }
3016
- if (this.allowStale = !!r, this.noDeleteOnStaleGet = !!S, this.updateAgeOnGet = !!n, this.updateAgeOnHas = !!o, this.ttlResolution = y(s) || s === 0 ? s : 1, this.ttlAutopurge = !!h, this.ttl = i || 0, this.ttl) {
3017
- if (!y(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
3018
- this.#j();
3019
- }
3020
- if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
3021
- if (!this.ttlAutopurge && !this.#o && !this.#c) {
3022
- let E = "LRU_CACHE_UNBOUNDED";
3023
- G(E) && (U.add(E), I("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, a));
3024
- }
3025
- }
3026
- getRemainingTTL(t) {
3027
- return this.#s.has(t) ? Infinity : 0;
3028
- }
3029
- #j() {
3030
- let t = new z(this.#o), e = new z(this.#o);
3031
- this.#d = t, this.#A = e;
3032
- let i = this.ttlAutopurge ? new Array(this.#o) : void 0;
3033
- this.#g = i, this.#N = (n, o, r = this.#m.now()) => {
3034
- if (e[n] = o !== 0 ? r : 0, t[n] = o, i?.[n] && (clearTimeout(i[n]), i[n] = void 0), o !== 0 && i) {
3035
- let f = setTimeout(() => {
3036
- this.#p(n) && this.#E(this.#i[n], "expire");
3037
- }, o + 1);
3038
- f.unref && f.unref(), i[n] = f;
3039
- }
3040
- }, this.#R = (n) => {
3041
- e[n] = t[n] !== 0 ? this.#m.now() : 0;
3042
- }, this.#z = (n, o) => {
3043
- if (t[o]) {
3044
- let r = t[o], f = e[o];
3045
- if (!r || !f) return;
3046
- n.ttl = r, n.start = f, n.now = s || h();
3047
- n.remainingTTL = r - (n.now - f);
3048
- }
3049
- };
3050
- let s = 0, h = () => {
3051
- let n = this.#m.now();
3052
- if (this.ttlResolution > 0) {
3053
- s = n;
3054
- let o = setTimeout(() => s = 0, this.ttlResolution);
3055
- o.unref && o.unref();
3056
- }
3057
- return n;
3058
- };
3059
- this.getRemainingTTL = (n) => {
3060
- let o = this.#s.get(n);
3061
- if (o === void 0) return 0;
3062
- let r = t[o], f = e[o];
3063
- if (!r || !f) return Infinity;
3064
- return r - ((s || h()) - f);
3065
- }, this.#p = (n) => {
3066
- let o = e[n], r = t[n];
3067
- return !!r && !!o && (s || h()) - o > r;
3068
- };
3069
- }
3070
- #R = () => {};
3071
- #z = () => {};
3072
- #N = () => {};
3073
- #p = () => !1;
3074
- #B() {
3075
- let t = new z(this.#o);
3076
- this.#_ = 0, this.#y = t, this.#W = (e) => {
3077
- this.#_ -= t[e], t[e] = 0;
3078
- }, this.#P = (e, i, s, h) => {
3079
- if (this.#e(i)) return 0;
3080
- if (!y(s)) if (h) {
3081
- if (typeof h != "function") throw new TypeError("sizeCalculation must be a function");
3082
- if (s = h(i, e), !y(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
3083
- } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
3084
- return s;
3085
- }, this.#M = (e, i, s) => {
3086
- if (t[e] = i, this.#c) {
3087
- let h = this.#c - t[e];
3088
- for (; this.#_ > h;) this.#x(!0);
3089
- }
3090
- this.#_ += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#_);
3091
- };
3092
- }
3093
- #W = (t) => {};
3094
- #M = (t, e, i) => {};
3095
- #P = (t, e, i, s) => {
3096
- if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
3097
- return 0;
3098
- };
3099
- *#F({ allowStale: t = this.allowStale } = {}) {
3100
- if (this.#n) for (let e = this.#h; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#l));) e = this.#u[e];
3101
- }
3102
- *#O({ allowStale: t = this.allowStale } = {}) {
3103
- if (this.#n) for (let e = this.#l; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#h));) e = this.#a[e];
3104
- }
3105
- #H(t) {
3106
- return t !== void 0 && this.#s.get(this.#i[t]) === t;
3107
- }
3108
- *entries() {
3109
- for (let t of this.#F()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
3110
- }
3111
- *rentries() {
3112
- for (let t of this.#O()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
3113
- }
3114
- *keys() {
3115
- for (let t of this.#F()) {
3116
- let e = this.#i[t];
3117
- e !== void 0 && !this.#e(this.#t[t]) && (yield e);
3118
- }
3119
- }
3120
- *rkeys() {
3121
- for (let t of this.#O()) {
3122
- let e = this.#i[t];
3123
- e !== void 0 && !this.#e(this.#t[t]) && (yield e);
3124
- }
3125
- }
3126
- *values() {
3127
- for (let t of this.#F()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
3128
- }
3129
- *rvalues() {
3130
- for (let t of this.#O()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
3131
- }
3132
- [Symbol.iterator]() {
3133
- return this.entries();
3134
- }
3135
- [Symbol.toStringTag] = "LRUCache";
3136
- find(t, e = {}) {
3137
- for (let i of this.#F()) {
3138
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
3139
- if (h !== void 0 && t(h, this.#i[i], this)) return this.get(this.#i[i], e);
3140
- }
3141
- }
3142
- forEach(t, e = this) {
3143
- for (let i of this.#F()) {
3144
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
3145
- h !== void 0 && t.call(e, h, this.#i[i], this);
3146
- }
3147
- }
3148
- rforEach(t, e = this) {
3149
- for (let i of this.#O()) {
3150
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
3151
- h !== void 0 && t.call(e, h, this.#i[i], this);
3152
- }
3153
- }
3154
- purgeStale() {
3155
- let t = !1;
3156
- for (let e of this.#O({ allowStale: !0 })) this.#p(e) && (this.#E(this.#i[e], "expire"), t = !0);
3157
- return t;
3158
- }
3159
- info(t) {
3160
- let e = this.#s.get(t);
3161
- if (e === void 0) return;
3162
- let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
3163
- if (s === void 0) return;
3164
- let h = { value: s };
3165
- if (this.#d && this.#A) {
3166
- let n = this.#d[e], o = this.#A[e];
3167
- if (n && o) h.ttl = n - (this.#m.now() - o), h.start = Date.now();
3168
- }
3169
- return this.#y && (h.size = this.#y[e]), h;
3170
- }
3171
- dump() {
3172
- let t = [];
3173
- for (let e of this.#F({ allowStale: !0 })) {
3174
- let i = this.#i[e], s = this.#t[e], h = this.#e(s) ? s.__staleWhileFetching : s;
3175
- if (h === void 0 || i === void 0) continue;
3176
- let n = { value: h };
3177
- if (this.#d && this.#A) {
3178
- n.ttl = this.#d[e];
3179
- let o = this.#m.now() - this.#A[e];
3180
- n.start = Math.floor(Date.now() - o);
3181
- }
3182
- this.#y && (n.size = this.#y[e]), t.unshift([i, n]);
3183
- }
3184
- return t;
3185
- }
3186
- load(t) {
3187
- this.clear();
3188
- for (let [e, i] of t) {
3189
- if (i.start) {
3190
- let s = Date.now() - i.start;
3191
- i.start = this.#m.now() - s;
3192
- }
3193
- this.set(e, i.value, i);
3194
- }
3195
- }
3196
- set(t, e, i = {}) {
3197
- if (e === void 0) return this.delete(t), this;
3198
- let { ttl: s = this.ttl, start: h, noDisposeOnSet: n = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: r } = i, { noUpdateTTL: f = this.noUpdateTTL } = i, m = this.#P(t, e, i.size || 0, o);
3199
- if (this.maxEntrySize && m > this.maxEntrySize) return r && (r.set = "miss", r.maxEntrySizeExceeded = !0), this.#E(t, "set"), this;
3200
- let c = this.#n === 0 ? void 0 : this.#s.get(t);
3201
- if (c === void 0) c = this.#n === 0 ? this.#h : this.#b.length !== 0 ? this.#b.pop() : this.#n === this.#o ? this.#x(!1) : this.#n, this.#i[c] = t, this.#t[c] = e, this.#s.set(t, c), this.#a[this.#h] = c, this.#u[c] = this.#h, this.#h = c, this.#n++, this.#M(c, m, r), r && (r.set = "add"), f = !1, this.#I && this.#C?.(e, t, "add");
3202
- else {
3203
- this.#D(c);
3204
- let d = this.#t[c];
3205
- if (e !== d) {
3206
- if (this.#v && this.#e(d)) {
3207
- d.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
3208
- let { __staleWhileFetching: g } = d;
3209
- g !== void 0 && !n && (this.#T && this.#w?.(g, t, "set"), this.#f && this.#r?.push([
3210
- g,
3211
- t,
3212
- "set"
3213
- ]));
3214
- } else n || (this.#T && this.#w?.(d, t, "set"), this.#f && this.#r?.push([
3215
- d,
3216
- t,
3217
- "set"
3218
- ]));
3219
- if (this.#W(c), this.#M(c, m, r), this.#t[c] = e, r) {
3220
- r.set = "replace";
3221
- let g = d && this.#e(d) ? d.__staleWhileFetching : d;
3222
- g !== void 0 && (r.oldValue = g);
3223
- }
3224
- } else r && (r.set = "update");
3225
- this.#I && this.onInsert?.(e, t, e === d ? "update" : "replace");
3226
- }
3227
- if (s !== 0 && !this.#d && this.#j(), this.#d && (f || this.#N(c, s, h), r && this.#z(r, c)), !n && this.#f && this.#r) {
3228
- let d = this.#r, g;
3229
- for (; g = d?.shift();) this.#S?.(...g);
3230
- }
3231
- return this;
3232
- }
3233
- pop() {
3234
- try {
3235
- for (; this.#n;) {
3236
- let t = this.#t[this.#l];
3237
- if (this.#x(!0), this.#e(t)) {
3238
- if (t.__staleWhileFetching) return t.__staleWhileFetching;
3239
- } else if (t !== void 0) return t;
3240
- }
3241
- } finally {
3242
- if (this.#f && this.#r) {
3243
- let t = this.#r, e;
3244
- for (; e = t?.shift();) this.#S?.(...e);
3245
- }
3246
- }
3247
- }
3248
- #x(t) {
3249
- let e = this.#l, i = this.#i[e], s = this.#t[e];
3250
- return this.#v && this.#e(s) ? s.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
3251
- s,
3252
- i,
3253
- "evict"
3254
- ])), this.#W(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = void 0), t && (this.#i[e] = void 0, this.#t[e] = void 0, this.#b.push(e)), this.#n === 1 ? (this.#l = this.#h = 0, this.#b.length = 0) : this.#l = this.#a[e], this.#s.delete(i), this.#n--, e;
3255
- }
3256
- has(t, e = {}) {
3257
- let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, h = this.#s.get(t);
3258
- if (h !== void 0) {
3259
- let n = this.#t[h];
3260
- if (this.#e(n) && n.__staleWhileFetching === void 0) return !1;
3261
- if (this.#p(h)) s && (s.has = "stale", this.#z(s, h));
3262
- else return i && this.#R(h), s && (s.has = "hit", this.#z(s, h)), !0;
3263
- } else s && (s.has = "miss");
3264
- return !1;
3265
- }
3266
- peek(t, e = {}) {
3267
- let { allowStale: i = this.allowStale } = e, s = this.#s.get(t);
3268
- if (s === void 0 || !i && this.#p(s)) return;
3269
- let h = this.#t[s];
3270
- return this.#e(h) ? h.__staleWhileFetching : h;
3271
- }
3272
- #G(t, e, i, s) {
3273
- let h = e === void 0 ? void 0 : this.#t[e];
3274
- if (this.#e(h)) return h;
3275
- let n = new C(), { signal: o } = i;
3276
- o?.addEventListener("abort", () => n.abort(o.reason), { signal: n.signal });
3277
- let r = {
3278
- signal: n.signal,
3279
- options: i,
3280
- context: s
3281
- }, f = (p, _ = !1) => {
3282
- let { aborted: l } = n.signal, w = i.ignoreFetchAbort && p !== void 0, b = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && p !== void 0);
3283
- if (i.status && (l && !_ ? (i.status.fetchAborted = !0, i.status.fetchError = n.signal.reason, w && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), l && !w && !_) return c(n.signal.reason, b);
3284
- let S = g, u = this.#t[e];
3285
- return (u === g || w && _ && u === void 0) && (p === void 0 ? S.__staleWhileFetching !== void 0 ? this.#t[e] = S.__staleWhileFetching : this.#E(t, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.set(t, p, r.options))), p;
3286
- }, m = (p) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = p), c(p, !1)), c = (p, _) => {
3287
- let { aborted: l } = n.signal, w = l && i.allowStaleOnFetchAbort, b = w || i.allowStaleOnFetchRejection, S = b || i.noDeleteOnFetchRejection, u = g;
3288
- if (this.#t[e] === g && (!S || !_ && u.__staleWhileFetching === void 0 ? this.#E(t, "fetch") : w || (this.#t[e] = u.__staleWhileFetching)), b) return i.status && u.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), u.__staleWhileFetching;
3289
- if (u.__returned === u) throw p;
3290
- }, d = (p, _) => {
3291
- let l = this.#L?.(t, h, r);
3292
- l && l instanceof Promise && l.then((w) => p(w === void 0 ? void 0 : w), _), n.signal.addEventListener("abort", () => {
3293
- (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (p(void 0), i.allowStaleOnFetchAbort && (p = (w) => f(w, !0)));
3294
- });
3295
- };
3296
- i.status && (i.status.fetchDispatched = !0);
3297
- let g = new Promise(d).then(f, m), A = Object.assign(g, {
3298
- __abortController: n,
3299
- __staleWhileFetching: h,
3300
- __returned: void 0
3301
- });
3302
- return e === void 0 ? (this.set(t, A, {
3303
- ...r.options,
3304
- status: void 0
3305
- }), e = this.#s.get(t)) : this.#t[e] = A, A;
3306
- }
3307
- #e(t) {
3308
- if (!this.#v) return !1;
3309
- let e = t;
3310
- return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof C;
3311
- }
3312
- async fetch(t, e = {}) {
3313
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, ttl: n = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: r = 0, sizeCalculation: f = this.sizeCalculation, noUpdateTTL: m = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: g = this.ignoreFetchAbort, allowStaleOnFetchAbort: A = this.allowStaleOnFetchAbort, context: p, forceRefresh: _ = !1, status: l, signal: w } = e;
3314
- if (!this.#v) return l && (l.fetch = "get"), this.get(t, {
3315
- allowStale: i,
3316
- updateAgeOnGet: s,
3317
- noDeleteOnStaleGet: h,
3318
- status: l
3319
- });
3320
- let b = {
3321
- allowStale: i,
3322
- updateAgeOnGet: s,
3323
- noDeleteOnStaleGet: h,
3324
- ttl: n,
3325
- noDisposeOnSet: o,
3326
- size: r,
3327
- sizeCalculation: f,
3328
- noUpdateTTL: m,
3329
- noDeleteOnFetchRejection: c,
3330
- allowStaleOnFetchRejection: d,
3331
- allowStaleOnFetchAbort: A,
3332
- ignoreFetchAbort: g,
3333
- status: l,
3334
- signal: w
3335
- }, S = this.#s.get(t);
3336
- if (S === void 0) {
3337
- l && (l.fetch = "miss");
3338
- let u = this.#G(t, S, b, p);
3339
- return u.__returned = u;
3340
- } else {
3341
- let u = this.#t[S];
3342
- if (this.#e(u)) {
3343
- let E = i && u.__staleWhileFetching !== void 0;
3344
- return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ? u.__staleWhileFetching : u.__returned = u;
3345
- }
3346
- let T = this.#p(S);
3347
- if (!_ && !T) return l && (l.fetch = "hit"), this.#D(S), s && this.#R(S), l && this.#z(l, S), u;
3348
- let F = this.#G(t, S, b, p), O = F.__staleWhileFetching !== void 0 && i;
3349
- return l && (l.fetch = T ? "stale" : "refresh", O && T && (l.returnedStale = !0)), O ? F.__staleWhileFetching : F.__returned = F;
3350
- }
3351
- }
3352
- async forceFetch(t, e = {}) {
3353
- let i = await this.fetch(t, e);
3354
- if (i === void 0) throw new Error("fetch() returned undefined");
3355
- return i;
3356
- }
3357
- memo(t, e = {}) {
3358
- let i = this.#U;
3359
- if (!i) throw new Error("no memoMethod provided to constructor");
3360
- let { context: s, forceRefresh: h, ...n } = e, o = this.get(t, n);
3361
- if (!h && o !== void 0) return o;
3362
- let r = i(t, o, {
3363
- options: n,
3364
- context: s
3365
- });
3366
- return this.set(t, r, n), r;
3367
- }
3368
- get(t, e = {}) {
3369
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, status: n } = e, o = this.#s.get(t);
3370
- if (o !== void 0) {
3371
- let r = this.#t[o], f = this.#e(r);
3372
- return n && this.#z(n, o), this.#p(o) ? (n && (n.get = "stale"), f ? (n && i && r.__staleWhileFetching !== void 0 && (n.returnedStale = !0), i ? r.__staleWhileFetching : void 0) : (h || this.#E(t, "expire"), n && i && (n.returnedStale = !0), i ? r : void 0)) : (n && (n.get = "hit"), f ? r.__staleWhileFetching : (this.#D(o), s && this.#R(o), r));
3373
- } else n && (n.get = "miss");
3374
- }
3375
- #k(t, e) {
3376
- this.#u[e] = t, this.#a[t] = e;
3377
- }
3378
- #D(t) {
3379
- t !== this.#h && (t === this.#l ? this.#l = this.#a[t] : this.#k(this.#u[t], this.#a[t]), this.#k(this.#h, t), this.#h = t);
3380
- }
3381
- delete(t) {
3382
- return this.#E(t, "delete");
3383
- }
3384
- #E(t, e) {
3385
- let i = !1;
3386
- if (this.#n !== 0) {
3387
- let s = this.#s.get(t);
3388
- if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#V(e);
3389
- else {
3390
- this.#W(s);
3391
- let h = this.#t[s];
3392
- if (this.#e(h) ? h.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(h, t, e), this.#f && this.#r?.push([
3393
- h,
3394
- t,
3395
- e
3396
- ])), this.#s.delete(t), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
3397
- else if (s === this.#l) this.#l = this.#a[s];
3398
- else {
3399
- let n = this.#u[s];
3400
- this.#a[n] = this.#a[s];
3401
- let o = this.#a[s];
3402
- this.#u[o] = this.#u[s];
3403
- }
3404
- this.#n--, this.#b.push(s);
3405
- }
3406
- }
3407
- if (this.#f && this.#r?.length) {
3408
- let s = this.#r, h;
3409
- for (; h = s?.shift();) this.#S?.(...h);
3410
- }
3411
- return i;
3412
- }
3413
- clear() {
3414
- return this.#V("delete");
3415
- }
3416
- #V(t) {
3417
- for (let e of this.#O({ allowStale: !0 })) {
3418
- let i = this.#t[e];
3419
- if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
3420
- else {
3421
- let s = this.#i[e];
3422
- this.#T && this.#w?.(i, s, t), this.#f && this.#r?.push([
3423
- i,
3424
- s,
3425
- t
3426
- ]);
3427
- }
3428
- }
3429
- if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#A) {
3430
- this.#d.fill(0), this.#A.fill(0);
3431
- for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
3432
- this.#g?.fill(void 0);
3433
- }
3434
- if (this.#y && this.#y.fill(0), this.#l = 0, this.#h = 0, this.#b.length = 0, this.#_ = 0, this.#n = 0, this.#f && this.#r) {
3435
- let e = this.#r, i;
3436
- for (; i = e?.shift();) this.#S?.(...i);
3437
- }
3438
- }
3439
- };
3440
- }));
3441
- //#endregion
3442
- //#region ../../node_modules/.pnpm/hosted-git-info@9.0.2/node_modules/hosted-git-info/lib/hosts.js
3443
- var require_hosts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3444
- const maybeJoin = (...args) => args.every((arg) => arg) ? args.join("") : "";
3445
- const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : "";
3446
- const formatHashFragment = (f) => f.toLowerCase().replace(/^\W+/g, "").replace(/(?<!\W)\W+$/, "").replace(/\//g, "").replace(/\W+/g, "-");
3447
- const defaults = {
3448
- sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`,
3449
- sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
3450
- edittemplate: ({ domain, user, project, committish, editpath, path }) => `https://${domain}/${user}/${project}${maybeJoin("/", editpath, "/", maybeEncode(committish || "HEAD"), "/", path)}`,
3451
- browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}`,
3452
- browsetreetemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || "HEAD")}/${path}${maybeJoin("#", hashformat(fragment || ""))}`,
3453
- browseblobtemplate: ({ domain, user, project, committish, blobpath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish || "HEAD")}/${path}${maybeJoin("#", hashformat(fragment || ""))}`,
3454
- docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}#readme`,
3455
- httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
3456
- filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish || "HEAD")}/${path}`,
3457
- shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin("#", committish)}`,
3458
- pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin("#", committish)}`,
3459
- bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`,
3460
- hashformat: formatHashFragment
3461
- };
3462
- const hosts = {};
3463
- hosts.github = {
3464
- protocols: [
3465
- "git:",
3466
- "http:",
3467
- "git+ssh:",
3468
- "git+https:",
3469
- "ssh:",
3470
- "https:"
3471
- ],
3472
- domain: "github.com",
3473
- treepath: "tree",
3474
- blobpath: "blob",
3475
- editpath: "edit",
3476
- filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, "@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish || "HEAD")}/${path}`,
3477
- gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
3478
- tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish || "HEAD")}`,
3479
- extract: (url) => {
3480
- let [, user, project, type, committish] = url.pathname.split("/", 5);
3481
- if (type && type !== "tree") return;
3482
- if (!type) committish = url.hash.slice(1);
3483
- if (project && project.endsWith(".git")) project = project.slice(0, -4);
3484
- if (!user || !project) return;
3485
- return {
3486
- user,
3487
- project,
3488
- committish
3489
- };
3490
- }
3491
- };
3492
- hosts.bitbucket = {
3493
- protocols: [
3494
- "git+ssh:",
3495
- "git+https:",
3496
- "ssh:",
3497
- "https:"
3498
- ],
3499
- domain: "bitbucket.org",
3500
- treepath: "src",
3501
- blobpath: "src",
3502
- editpath: "?mode=edit",
3503
- edittemplate: ({ domain, user, project, committish, treepath, path, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish || "HEAD"), "/", path, editpath)}`,
3504
- tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish || "HEAD")}.tar.gz`,
3505
- extract: (url) => {
3506
- let [, user, project, aux] = url.pathname.split("/", 4);
3507
- if (["get"].includes(aux)) return;
3508
- if (project && project.endsWith(".git")) project = project.slice(0, -4);
3509
- if (!user || !project) return;
3510
- return {
3511
- user,
3512
- project,
3513
- committish: url.hash.slice(1)
3514
- };
3515
- }
3516
- };
3517
- hosts.gitlab = {
3518
- protocols: [
3519
- "git+ssh:",
3520
- "git+https:",
3521
- "ssh:",
3522
- "https:"
3523
- ],
3524
- domain: "gitlab.com",
3525
- treepath: "tree",
3526
- blobpath: "tree",
3527
- editpath: "-/edit",
3528
- tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish || "HEAD")}`,
3529
- extract: (url) => {
3530
- const path = url.pathname.slice(1);
3531
- if (path.includes("/-/") || path.includes("/archive.tar.gz")) return;
3532
- const segments = path.split("/");
3533
- let project = segments.pop();
3534
- if (project.endsWith(".git")) project = project.slice(0, -4);
3535
- const user = segments.join("/");
3536
- if (!user || !project) return;
3537
- return {
3538
- user,
3539
- project,
3540
- committish: url.hash.slice(1)
3541
- };
3542
- }
3543
- };
3544
- hosts.gist = {
3545
- protocols: [
3546
- "git:",
3547
- "git+ssh:",
3548
- "git+https:",
3549
- "ssh:",
3550
- "https:"
3551
- ],
3552
- domain: "gist.github.com",
3553
- editpath: "edit",
3554
- sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin("#", committish)}`,
3555
- sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin("#", committish)}`,
3556
- edittemplate: ({ domain, user, project, committish, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", maybeEncode(committish))}/${editpath}`,
3557
- browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
3558
- browsetreetemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path))}`,
3559
- browseblobtemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path))}`,
3560
- docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
3561
- httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin("#", committish)}`,
3562
- filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/", maybeEncode(committish))}/${path}`,
3563
- shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin("#", committish)}`,
3564
- pathtemplate: ({ project, committish }) => `${project}${maybeJoin("#", committish)}`,
3565
- bugstemplate: ({ domain, project }) => `https://${domain}/${project}`,
3566
- gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin("#", committish)}`,
3567
- tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish || "HEAD")}`,
3568
- extract: (url) => {
3569
- let [, user, project, aux] = url.pathname.split("/", 4);
3570
- if (aux === "raw") return;
3571
- if (!project) {
3572
- if (!user) return;
3573
- project = user;
3574
- user = null;
3575
- }
3576
- if (project.endsWith(".git")) project = project.slice(0, -4);
3577
- return {
3578
- user,
3579
- project,
3580
- committish: url.hash.slice(1)
3581
- };
3582
- },
3583
- hashformat: function(fragment) {
3584
- return fragment && "file-" + formatHashFragment(fragment);
3585
- }
3586
- };
3587
- hosts.sourcehut = {
3588
- protocols: ["git+ssh:", "https:"],
3589
- domain: "git.sr.ht",
3590
- treepath: "tree",
3591
- blobpath: "tree",
3592
- filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || "HEAD"}/${path}`,
3593
- httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
3594
- tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || "HEAD"}.tar.gz`,
3595
- bugstemplate: () => null,
3596
- extract: (url) => {
3597
- let [, user, project, aux] = url.pathname.split("/", 4);
3598
- if (["archive"].includes(aux)) return;
3599
- if (project && project.endsWith(".git")) project = project.slice(0, -4);
3600
- if (!user || !project) return;
3601
- return {
3602
- user,
3603
- project,
3604
- committish: url.hash.slice(1)
3605
- };
3606
- }
3607
- };
3608
- for (const [name, host] of Object.entries(hosts)) hosts[name] = Object.assign({}, defaults, host);
3609
- module.exports = hosts;
3610
- }));
3611
- //#endregion
3612
- //#region ../../node_modules/.pnpm/hosted-git-info@9.0.2/node_modules/hosted-git-info/lib/parse-url.js
3613
- var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3614
- const url = __require("url");
3615
- const lastIndexOfBefore = (str, char, beforeChar) => {
3616
- const startPosition = str.indexOf(beforeChar);
3617
- return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity);
3618
- };
3619
- const safeUrl = (u) => {
3620
- try {
3621
- return new url.URL(u);
3622
- } catch {}
3623
- };
3624
- const correctProtocol = (arg, protocols) => {
3625
- const firstColon = arg.indexOf(":");
3626
- const proto = arg.slice(0, firstColon + 1);
3627
- if (Object.prototype.hasOwnProperty.call(protocols, proto)) return arg;
3628
- if (arg.substr(firstColon, 3) === "://") return arg;
3629
- const firstAt = arg.indexOf("@");
3630
- if (firstAt > -1) if (firstAt > firstColon) return `git+ssh://${arg}`;
3631
- else return arg;
3632
- return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}`;
3633
- };
3634
- const correctUrl = (giturl) => {
3635
- const firstAt = lastIndexOfBefore(giturl, "@", "#");
3636
- const lastColonBeforeHash = lastIndexOfBefore(giturl, ":", "#");
3637
- if (lastColonBeforeHash > firstAt) giturl = giturl.slice(0, lastColonBeforeHash) + "/" + giturl.slice(lastColonBeforeHash + 1);
3638
- if (lastIndexOfBefore(giturl, ":", "#") === -1 && giturl.indexOf("//") === -1) giturl = `git+ssh://${giturl}`;
3639
- return giturl;
3640
- };
3641
- module.exports = (giturl, protocols) => {
3642
- const withProtocol = protocols ? correctProtocol(giturl, protocols) : giturl;
3643
- return safeUrl(withProtocol) || safeUrl(correctUrl(withProtocol));
3644
- };
3645
- }));
3646
- //#endregion
3647
- //#region ../../node_modules/.pnpm/hosted-git-info@9.0.2/node_modules/hosted-git-info/lib/from-url.js
3648
- var require_from_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3649
- const parseUrl = require_parse_url();
3650
- const isGitHubShorthand = (arg) => {
3651
- const firstHash = arg.indexOf("#");
3652
- const firstSlash = arg.indexOf("/");
3653
- const secondSlash = arg.indexOf("/", firstSlash + 1);
3654
- const firstColon = arg.indexOf(":");
3655
- const firstSpace = /\s/.exec(arg);
3656
- const firstAt = arg.indexOf("@");
3657
- const spaceOnlyAfterHash = !firstSpace || firstHash > -1 && firstSpace.index > firstHash;
3658
- const atOnlyAfterHash = firstAt === -1 || firstHash > -1 && firstAt > firstHash;
3659
- const colonOnlyAfterHash = firstColon === -1 || firstHash > -1 && firstColon > firstHash;
3660
- const secondSlashOnlyAfterHash = secondSlash === -1 || firstHash > -1 && secondSlash > firstHash;
3661
- const hasSlash = firstSlash > 0;
3662
- const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== "/" : !arg.endsWith("/");
3663
- const doesNotStartWithDot = !arg.startsWith(".");
3664
- return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && secondSlashOnlyAfterHash;
3665
- };
3666
- module.exports = (giturl, opts, { gitHosts, protocols }) => {
3667
- if (!giturl) return;
3668
- const parsed = parseUrl(isGitHubShorthand(giturl) ? `github:${giturl}` : giturl, protocols);
3669
- if (!parsed) return;
3670
- const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
3671
- const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname];
3672
- const gitHostName = gitHostShortcut || gitHostDomain;
3673
- if (!gitHostName) return;
3674
- const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain];
3675
- let auth = null;
3676
- if (protocols[parsed.protocol]?.auth && (parsed.username || parsed.password)) auth = `${parsed.username}${parsed.password ? ":" + parsed.password : ""}`;
3677
- let committish = null;
3678
- let user = null;
3679
- let project = null;
3680
- let defaultRepresentation = null;
3681
- try {
3682
- if (gitHostShortcut) {
3683
- let pathname = parsed.pathname.startsWith("/") ? parsed.pathname.slice(1) : parsed.pathname;
3684
- const firstAt = pathname.indexOf("@");
3685
- if (firstAt > -1) pathname = pathname.slice(firstAt + 1);
3686
- const lastSlash = pathname.lastIndexOf("/");
3687
- if (lastSlash > -1) {
3688
- user = decodeURIComponent(pathname.slice(0, lastSlash));
3689
- if (!user) user = null;
3690
- project = decodeURIComponent(pathname.slice(lastSlash + 1));
3691
- } else project = decodeURIComponent(pathname);
3692
- if (project.endsWith(".git")) project = project.slice(0, -4);
3693
- if (parsed.hash) committish = decodeURIComponent(parsed.hash.slice(1));
3694
- defaultRepresentation = "shortcut";
3695
- } else {
3696
- if (!gitHostInfo.protocols.includes(parsed.protocol)) return;
3697
- const segments = gitHostInfo.extract(parsed);
3698
- if (!segments) return;
3699
- user = segments.user && decodeURIComponent(segments.user);
3700
- project = decodeURIComponent(segments.project);
3701
- committish = decodeURIComponent(segments.committish);
3702
- defaultRepresentation = protocols[parsed.protocol]?.name || parsed.protocol.slice(0, -1);
3703
- }
3704
- } catch (err) {
3705
- /* istanbul ignore else */
3706
- if (err instanceof URIError) return;
3707
- else throw err;
3708
- }
3709
- return [
3710
- gitHostName,
3711
- user,
3712
- auth,
3713
- project,
3714
- committish,
3715
- defaultRepresentation,
3716
- opts
3717
- ];
3718
- };
3719
- }));
3720
- //#endregion
3721
- //#region ../../node_modules/.pnpm/hosted-git-info@9.0.2/node_modules/hosted-git-info/lib/index.js
3722
- var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3723
- const { LRUCache } = require_index_min();
3724
- const hosts = require_hosts();
3725
- const fromUrl = require_from_url();
3726
- const parseUrl = require_parse_url();
3727
- const cache = new LRUCache({ max: 1e3 });
3728
- function unknownHostedUrl(url) {
3729
- try {
3730
- const { protocol, hostname, pathname } = new URL(url);
3731
- if (!hostname) return null;
3732
- return `${/(?:git\+)http:$/.test(protocol) ? "http:" : "https:"}//${hostname}${pathname.replace(/\.git$/, "")}`;
3733
- } catch {
3734
- return null;
3735
- }
3736
- }
3737
- var GitHost = class GitHost {
3738
- constructor(type, user, auth, project, committish, defaultRepresentation, opts = {}) {
3739
- Object.assign(this, GitHost.#gitHosts[type], {
3740
- type,
3741
- user,
3742
- auth,
3743
- project,
3744
- committish,
3745
- default: defaultRepresentation,
3746
- opts
3747
- });
3748
- }
3749
- static #gitHosts = {
3750
- byShortcut: {},
3751
- byDomain: {}
3752
- };
3753
- static #protocols = {
3754
- "git+ssh:": { name: "sshurl" },
3755
- "ssh:": { name: "sshurl" },
3756
- "git+https:": {
3757
- name: "https",
3758
- auth: true
3759
- },
3760
- "git:": { auth: true },
3761
- "http:": { auth: true },
3762
- "https:": { auth: true },
3763
- "git+http:": { auth: true }
3764
- };
3765
- static addHost(name, host) {
3766
- GitHost.#gitHosts[name] = host;
3767
- GitHost.#gitHosts.byDomain[host.domain] = name;
3768
- GitHost.#gitHosts.byShortcut[`${name}:`] = name;
3769
- GitHost.#protocols[`${name}:`] = { name };
3770
- }
3771
- static fromUrl(giturl, opts) {
3772
- if (typeof giturl !== "string") return;
3773
- const key = giturl + JSON.stringify(opts || {});
3774
- if (!cache.has(key)) {
3775
- const hostArgs = fromUrl(giturl, opts, {
3776
- gitHosts: GitHost.#gitHosts,
3777
- protocols: GitHost.#protocols
3778
- });
3779
- cache.set(key, hostArgs ? new GitHost(...hostArgs) : void 0);
3780
- }
3781
- return cache.get(key);
3782
- }
3783
- static fromManifest(manifest, opts = {}) {
3784
- if (!manifest || typeof manifest !== "object") return;
3785
- const r = manifest.repository;
3786
- const rurl = r && (typeof r === "string" ? r : typeof r === "object" && typeof r.url === "string" ? r.url : null);
3787
- if (!rurl) throw new Error("no repository");
3788
- const info = rurl && GitHost.fromUrl(rurl.replace(/^git\+/, ""), opts) || null;
3789
- if (info) return info;
3790
- const unk = unknownHostedUrl(rurl);
3791
- return GitHost.fromUrl(unk, opts) || unk;
3792
- }
3793
- static parseUrl(url) {
3794
- return parseUrl(url);
3795
- }
3796
- #fill(template, opts) {
3797
- if (typeof template !== "function") return null;
3798
- const options = {
3799
- ...this,
3800
- ...this.opts,
3801
- ...opts
3802
- };
3803
- if (!options.path) options.path = "";
3804
- if (options.path.startsWith("/")) options.path = options.path.slice(1);
3805
- if (options.noCommittish) options.committish = null;
3806
- const result = template(options);
3807
- return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result;
3808
- }
3809
- hash() {
3810
- return this.committish ? `#${this.committish}` : "";
3811
- }
3812
- ssh(opts) {
3813
- return this.#fill(this.sshtemplate, opts);
3814
- }
3815
- sshurl(opts) {
3816
- return this.#fill(this.sshurltemplate, opts);
3817
- }
3818
- browse(path, ...args) {
3819
- if (typeof path !== "string") return this.#fill(this.browsetemplate, path);
3820
- if (typeof args[0] !== "string") return this.#fill(this.browsetreetemplate, {
3821
- ...args[0],
3822
- path
3823
- });
3824
- return this.#fill(this.browsetreetemplate, {
3825
- ...args[1],
3826
- fragment: args[0],
3827
- path
3828
- });
3829
- }
3830
- browseFile(path, ...args) {
3831
- if (typeof args[0] !== "string") return this.#fill(this.browseblobtemplate, {
3832
- ...args[0],
3833
- path
3834
- });
3835
- return this.#fill(this.browseblobtemplate, {
3836
- ...args[1],
3837
- fragment: args[0],
3838
- path
3839
- });
3840
- }
3841
- docs(opts) {
3842
- return this.#fill(this.docstemplate, opts);
3843
- }
3844
- bugs(opts) {
3845
- return this.#fill(this.bugstemplate, opts);
3846
- }
3847
- https(opts) {
3848
- return this.#fill(this.httpstemplate, opts);
3849
- }
3850
- git(opts) {
3851
- return this.#fill(this.gittemplate, opts);
3852
- }
3853
- shortcut(opts) {
3854
- return this.#fill(this.shortcuttemplate, opts);
3855
- }
3856
- path(opts) {
3857
- return this.#fill(this.pathtemplate, opts);
3858
- }
3859
- tarball(opts) {
3860
- return this.#fill(this.tarballtemplate, {
3861
- ...opts,
3862
- noCommittish: false
3863
- });
3864
- }
3865
- file(path, opts) {
3866
- return this.#fill(this.filetemplate, {
3867
- ...opts,
3868
- path
3869
- });
3870
- }
3871
- edit(path, opts) {
3872
- return this.#fill(this.edittemplate, {
3873
- ...opts,
3874
- path
3875
- });
3876
- }
3877
- getDefaultRepresentation() {
3878
- return this.default;
3879
- }
3880
- toString(opts) {
3881
- if (this.default && typeof this[this.default] === "function") return this[this.default](opts);
3882
- return this.sshurl(opts);
3883
- }
3884
- };
3885
- for (const [name, host] of Object.entries(hosts)) GitHost.addHost(name, host);
3886
- module.exports = GitHost;
3887
- }));
3888
- //#endregion
3889
- //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/extract_description.js
3890
- var require_extract_description = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3891
- module.exports = extractDescription;
3892
- function extractDescription(d) {
3893
- if (!d) return;
3894
- if (d === "ERROR: No README data found!") return;
3895
- d = d.trim().split("\n");
3896
- let s = 0;
3897
- while (d[s] && d[s].trim().match(/^(#|$)/)) s++;
3898
- const l = d.length;
3899
- let e = s + 1;
3900
- while (e < l && d[e].trim()) e++;
3901
- return d.slice(s, e).join(" ").trim();
3902
- }
3903
- }));
3904
- //#endregion
3905
- //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/typos.json
3906
- var require_typos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3907
- module.exports = {
3908
- "topLevel": {
3909
- "dependancies": "dependencies",
3910
- "dependecies": "dependencies",
3911
- "depdenencies": "dependencies",
3912
- "devEependencies": "devDependencies",
3913
- "depends": "dependencies",
3914
- "dev-dependencies": "devDependencies",
3915
- "devDependences": "devDependencies",
3916
- "devDepenencies": "devDependencies",
3917
- "devdependencies": "devDependencies",
3918
- "repostitory": "repository",
3919
- "repo": "repository",
3920
- "prefereGlobal": "preferGlobal",
3921
- "hompage": "homepage",
3922
- "hampage": "homepage",
3923
- "autohr": "author",
3924
- "autor": "author",
3925
- "contributers": "contributors",
3926
- "publicationConfig": "publishConfig",
3927
- "script": "scripts"
3928
- },
3929
- "bugs": {
3930
- "web": "url",
3931
- "name": "url"
3932
- },
3933
- "script": {
3934
- "server": "start",
3935
- "tests": "test"
3936
- }
3937
- };
3938
- }));
3939
- //#endregion
3940
- //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/fixer.js
3941
- var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3942
- var { URL: URL$1 } = __require("node:url");
3943
- var isValidSemver = __require("semver/functions/valid");
3944
- var cleanSemver = __require("semver/functions/clean");
3945
- var validateLicense = require_validate_npm_package_license();
3946
- var hostedGitInfo = require_lib();
3947
- var { isBuiltin } = __require("node:module");
3948
- var depTypes = [
3949
- "dependencies",
3950
- "devDependencies",
3951
- "optionalDependencies"
3952
- ];
3953
- var extractDescription = require_extract_description();
3954
- var typos = require_typos();
3955
- var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
3956
- module.exports = {
3957
- warn: function() {},
3958
- fixRepositoryField: function(data) {
3959
- if (data.repositories) {
3960
- this.warn("repositories");
3961
- data.repository = data.repositories[0];
3962
- }
3963
- if (!data.repository) return this.warn("missingRepository");
3964
- if (typeof data.repository === "string") data.repository = {
3965
- type: "git",
3966
- url: data.repository
3967
- };
3968
- var r = data.repository.url || "";
3969
- if (r) {
3970
- var hosted = hostedGitInfo.fromUrl(r);
3971
- if (hosted) r = data.repository.url = hosted.getDefaultRepresentation() === "shortcut" ? hosted.https() : hosted.toString();
3972
- }
3973
- if (r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)) this.warn("brokenGitUrl", r);
3974
- },
3975
- fixTypos: function(data) {
3976
- Object.keys(typos.topLevel).forEach(function(d) {
3977
- if (Object.prototype.hasOwnProperty.call(data, d)) this.warn("typo", d, typos.topLevel[d]);
3978
- }, this);
3979
- },
3980
- fixScriptsField: function(data) {
3981
- if (!data.scripts) return;
3982
- if (typeof data.scripts !== "object") {
3983
- this.warn("nonObjectScripts");
3984
- delete data.scripts;
3985
- return;
3986
- }
3987
- Object.keys(data.scripts).forEach(function(k) {
3988
- if (typeof data.scripts[k] !== "string") {
3989
- this.warn("nonStringScript");
3990
- delete data.scripts[k];
3991
- } else if (typos.script[k] && !data.scripts[typos.script[k]]) this.warn("typo", k, typos.script[k], "scripts");
3992
- }, this);
3993
- },
3994
- fixFilesField: function(data) {
3995
- var files = data.files;
3996
- if (files && !Array.isArray(files)) {
3997
- this.warn("nonArrayFiles");
3998
- delete data.files;
3999
- } else if (data.files) data.files = data.files.filter(function(file) {
4000
- if (!file || typeof file !== "string") {
4001
- this.warn("invalidFilename", file);
4002
- return false;
4003
- } else return true;
4004
- }, this);
4005
- },
4006
- fixBinField: function(data) {
4007
- if (!data.bin) return;
4008
- if (typeof data.bin === "string") {
4009
- var b = {};
4010
- var match;
4011
- if (match = data.name.match(/^@[^/]+[/](.*)$/)) b[match[1]] = data.bin;
4012
- else b[data.name] = data.bin;
4013
- data.bin = b;
4014
- }
4015
- },
4016
- fixManField: function(data) {
4017
- if (!data.man) return;
4018
- if (typeof data.man === "string") data.man = [data.man];
4019
- },
4020
- fixBundleDependenciesField: function(data) {
4021
- var bdd = "bundledDependencies";
4022
- var bd = "bundleDependencies";
4023
- if (data[bdd] && !data[bd]) {
4024
- data[bd] = data[bdd];
4025
- delete data[bdd];
4026
- }
4027
- if (data[bd] && !Array.isArray(data[bd])) {
4028
- this.warn("nonArrayBundleDependencies");
4029
- delete data[bd];
4030
- } else if (data[bd]) data[bd] = data[bd].filter(function(filtered) {
4031
- if (!filtered || typeof filtered !== "string") {
4032
- this.warn("nonStringBundleDependency", filtered);
4033
- return false;
4034
- } else {
4035
- if (!data.dependencies) data.dependencies = {};
4036
- if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) {
4037
- this.warn("nonDependencyBundleDependency", filtered);
4038
- data.dependencies[filtered] = "*";
4039
- }
4040
- return true;
4041
- }
4042
- }, this);
4043
- },
4044
- fixDependencies: function(data) {
4045
- objectifyDeps(data, this.warn);
4046
- addOptionalDepsToDeps(data, this.warn);
4047
- this.fixBundleDependenciesField(data);
4048
- ["dependencies", "devDependencies"].forEach(function(deps) {
4049
- if (!(deps in data)) return;
4050
- if (!data[deps] || typeof data[deps] !== "object") {
4051
- this.warn("nonObjectDependencies", deps);
4052
- delete data[deps];
4053
- return;
4054
- }
4055
- Object.keys(data[deps]).forEach(function(d) {
4056
- var r = data[deps][d];
4057
- if (typeof r !== "string") {
4058
- this.warn("nonStringDependency", d, JSON.stringify(r));
4059
- delete data[deps][d];
4060
- }
4061
- var hosted = hostedGitInfo.fromUrl(data[deps][d]);
4062
- if (hosted) data[deps][d] = hosted.toString();
4063
- }, this);
4064
- }, this);
4065
- },
4066
- fixModulesField: function(data) {
4067
- if (data.modules) {
4068
- this.warn("deprecatedModules");
4069
- delete data.modules;
4070
- }
4071
- },
4072
- fixKeywordsField: function(data) {
4073
- if (typeof data.keywords === "string") data.keywords = data.keywords.split(/,\s+/);
4074
- if (data.keywords && !Array.isArray(data.keywords)) {
4075
- delete data.keywords;
4076
- this.warn("nonArrayKeywords");
4077
- } else if (data.keywords) data.keywords = data.keywords.filter(function(kw) {
4078
- if (typeof kw !== "string" || !kw) {
4079
- this.warn("nonStringKeyword");
4080
- return false;
4081
- } else return true;
4082
- }, this);
4083
- },
4084
- fixVersionField: function(data, strict) {
4085
- var loose = !strict;
4086
- if (!data.version) {
4087
- data.version = "";
4088
- return true;
4089
- }
4090
- if (!isValidSemver(data.version, loose)) throw new Error("Invalid version: \"" + data.version + "\"");
4091
- data.version = cleanSemver(data.version, loose);
4092
- return true;
4093
- },
4094
- fixPeople: function(data) {
4095
- modifyPeople(data, unParsePerson);
4096
- modifyPeople(data, parsePerson);
4097
- },
4098
- fixNameField: function(data, options) {
4099
- if (typeof options === "boolean") options = { strict: options };
4100
- else if (typeof options === "undefined") options = {};
4101
- var strict = options.strict;
4102
- if (!data.name && !strict) {
4103
- data.name = "";
4104
- return;
4105
- }
4106
- if (typeof data.name !== "string") throw new Error("name field must be a string.");
4107
- if (!strict) data.name = data.name.trim();
4108
- ensureValidName(data.name, strict, options.allowLegacyCase);
4109
- if (isBuiltin(data.name)) this.warn("conflictingName", data.name);
4110
- },
4111
- fixDescriptionField: function(data) {
4112
- if (data.description && typeof data.description !== "string") {
4113
- this.warn("nonStringDescription");
4114
- delete data.description;
4115
- }
4116
- if (data.readme && !data.description) data.description = extractDescription(data.readme);
4117
- if (data.description === void 0) delete data.description;
4118
- if (!data.description) this.warn("missingDescription");
4119
- },
4120
- fixReadmeField: function(data) {
4121
- if (!data.readme) {
4122
- this.warn("missingReadme");
4123
- data.readme = "ERROR: No README data found!";
4124
- }
4125
- },
4126
- fixBugsField: function(data) {
4127
- if (!data.bugs && data.repository && data.repository.url) {
4128
- var hosted = hostedGitInfo.fromUrl(data.repository.url);
4129
- if (hosted && hosted.bugs()) data.bugs = { url: hosted.bugs() };
4130
- } else if (data.bugs) {
4131
- if (typeof data.bugs === "string") if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
4132
- else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
4133
- else this.warn("nonEmailUrlBugsString");
4134
- else {
4135
- bugsTypos(data.bugs, this.warn);
4136
- var oldBugs = data.bugs;
4137
- data.bugs = {};
4138
- if (oldBugs.url) if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
4139
- else this.warn("nonUrlBugsUrlField");
4140
- if (oldBugs.email) if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
4141
- else this.warn("nonEmailBugsEmailField");
4142
- }
4143
- if (!data.bugs.email && !data.bugs.url) {
4144
- delete data.bugs;
4145
- this.warn("emptyNormalizedBugs");
4146
- }
4147
- }
4148
- },
4149
- fixHomepageField: function(data) {
4150
- if (!data.homepage && data.repository && data.repository.url) {
4151
- var hosted = hostedGitInfo.fromUrl(data.repository.url);
4152
- if (hosted && hosted.docs()) data.homepage = hosted.docs();
4153
- }
4154
- if (!data.homepage) return;
4155
- if (typeof data.homepage !== "string") {
4156
- this.warn("nonUrlHomepage");
4157
- return delete data.homepage;
4158
- }
4159
- if (!URL$1.canParse(data.homepage)) data.homepage = "http://" + data.homepage;
4160
- },
4161
- fixLicenseField: function(data) {
4162
- const license = data.license || data.licence;
4163
- if (!license) return this.warn("missingLicense");
4164
- if (typeof license !== "string" || license.length < 1 || license.trim() === "") return this.warn("invalidLicense");
4165
- if (!validateLicense(license).validForNewPackages) return this.warn("invalidLicense");
4166
- }
4167
- };
4168
- function isValidScopedPackageName(spec) {
4169
- if (spec.charAt(0) !== "@") return false;
4170
- var rest = spec.slice(1).split("/");
4171
- if (rest.length !== 2) return false;
4172
- return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]);
4173
- }
4174
- function isCorrectlyEncodedName(spec) {
4175
- return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec);
4176
- }
4177
- function ensureValidName(name, strict, allowLegacyCase) {
4178
- if (name.charAt(0) === "." || !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || strict && !allowLegacyCase && name !== name.toLowerCase() || name.toLowerCase() === "node_modules" || name.toLowerCase() === "favicon.ico") throw new Error("Invalid name: " + JSON.stringify(name));
4179
- }
4180
- function modifyPeople(data, fn) {
4181
- if (data.author) data.author = fn(data.author);
4182
- ["maintainers", "contributors"].forEach(function(set) {
4183
- if (!Array.isArray(data[set])) return;
4184
- data[set] = data[set].map(fn);
4185
- });
4186
- return data;
4187
- }
4188
- function unParsePerson(person) {
4189
- if (typeof person === "string") return person;
4190
- var name = person.name || "";
4191
- var u = person.url || person.web;
4192
- var wrappedUrl = u ? " (" + u + ")" : "";
4193
- var e = person.email || person.mail;
4194
- return name + (e ? " <" + e + ">" : "") + wrappedUrl;
4195
- }
4196
- function parsePerson(person) {
4197
- if (typeof person !== "string") return person;
4198
- var matchedName = person.match(/^([^(<]+)/);
4199
- var matchedUrl = person.match(/\(([^()]+)\)/);
4200
- var matchedEmail = person.match(/<([^<>]+)>/);
4201
- var obj = {};
4202
- if (matchedName && matchedName[0].trim()) obj.name = matchedName[0].trim();
4203
- if (matchedEmail) obj.email = matchedEmail[1];
4204
- if (matchedUrl) obj.url = matchedUrl[1];
4205
- return obj;
4206
- }
4207
- function addOptionalDepsToDeps(data) {
4208
- var o = data.optionalDependencies;
4209
- if (!o) return;
4210
- var d = data.dependencies || {};
4211
- Object.keys(o).forEach(function(k) {
4212
- d[k] = o[k];
4213
- });
4214
- data.dependencies = d;
4215
- }
4216
- function depObjectify(deps, type, warn) {
4217
- if (!deps) return {};
4218
- if (typeof deps === "string") deps = deps.trim().split(/[\n\r\s\t ,]+/);
4219
- if (!Array.isArray(deps)) return deps;
4220
- warn("deprecatedArrayDependencies", type);
4221
- var o = {};
4222
- deps.filter(function(d) {
4223
- return typeof d === "string";
4224
- }).forEach(function(d) {
4225
- d = d.trim().split(/(:?[@\s><=])/);
4226
- var dn = d.shift();
4227
- var dv = d.join("");
4228
- dv = dv.trim();
4229
- dv = dv.replace(/^@/, "");
4230
- o[dn] = dv;
4231
- });
4232
- return o;
4233
- }
4234
- function objectifyDeps(data, warn) {
4235
- depTypes.forEach(function(type) {
4236
- if (!data[type]) return;
4237
- data[type] = depObjectify(data[type], type, warn);
4238
- });
4239
- }
4240
- function bugsTypos(bugs, warn) {
4241
- if (!bugs) return;
4242
- Object.keys(bugs).forEach(function(k) {
4243
- if (typos.bugs[k]) {
4244
- warn("typo", k, typos.bugs[k], "bugs");
4245
- bugs[typos.bugs[k]] = bugs[k];
4246
- delete bugs[k];
4247
- }
4248
- });
4249
- }
4250
- }));
4251
- //#endregion
4252
- //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/warning_messages.json
4253
- var require_warning_messages = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4254
- module.exports = {
4255
- "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
4256
- "missingRepository": "No repository field.",
4257
- "brokenGitUrl": "Probably broken git url: %s",
4258
- "nonObjectScripts": "scripts must be an object",
4259
- "nonStringScript": "script values must be string commands",
4260
- "nonArrayFiles": "Invalid 'files' member",
4261
- "invalidFilename": "Invalid filename in 'files' list: %s",
4262
- "nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names",
4263
- "nonStringBundleDependency": "Invalid bundleDependencies member: %s",
4264
- "nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s",
4265
- "nonObjectDependencies": "%s field must be an object",
4266
- "nonStringDependency": "Invalid dependency: %s %s",
4267
- "deprecatedArrayDependencies": "specifying %s as array is deprecated",
4268
- "deprecatedModules": "modules field is deprecated",
4269
- "nonArrayKeywords": "keywords should be an array of strings",
4270
- "nonStringKeyword": "keywords should be an array of strings",
4271
- "conflictingName": "%s is also the name of a node core module.",
4272
- "nonStringDescription": "'description' field should be a string",
4273
- "missingDescription": "No description",
4274
- "missingReadme": "No README data",
4275
- "missingLicense": "No license field.",
4276
- "nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}",
4277
- "nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted.",
4278
- "nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted.",
4279
- "emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted.",
4280
- "nonUrlHomepage": "homepage field must be a string url. Deleted.",
4281
- "invalidLicense": "license should be a valid SPDX license expression",
4282
- "typo": "%s should probably be %s."
4283
- };
4284
- }));
4285
- //#endregion
4286
- //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/make_warning.js
4287
- var require_make_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4288
- var util = __require("util");
4289
- var messages = require_warning_messages();
4290
- module.exports = function() {
4291
- var args = Array.prototype.slice.call(arguments, 0);
4292
- var warningName = args.shift();
4293
- if (warningName === "typo") return makeTypoWarning.apply(null, args);
4294
- else {
4295
- var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'";
4296
- args.unshift(msgTemplate);
4297
- return util.format.apply(null, args);
4298
- }
4299
- };
4300
- function makeTypoWarning(providedName, probableName, field) {
4301
- if (field) {
4302
- providedName = field + "['" + providedName + "']";
4303
- probableName = field + "['" + probableName + "']";
4304
- }
4305
- return util.format(messages.typo, providedName, probableName);
4306
- }
4307
- }));
4308
- //#endregion
4309
- //#region ../../node_modules/.pnpm/unicorn-magic@0.4.0/node_modules/unicorn-magic/node.js
4310
- var import_normalize = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
4311
- module.exports = normalize;
4312
- var fixer = require_fixer();
4313
- normalize.fixer = fixer;
4314
- var makeWarning = require_make_warning();
4315
- var fieldsToFix = [
4316
- "name",
4317
- "version",
4318
- "description",
4319
- "repository",
4320
- "modules",
4321
- "scripts",
4322
- "files",
4323
- "bin",
4324
- "man",
4325
- "bugs",
4326
- "keywords",
4327
- "readme",
4328
- "homepage",
4329
- "license"
4330
- ];
4331
- var otherThingsToFix = [
4332
- "dependencies",
4333
- "people",
4334
- "typos"
4335
- ];
4336
- var thingsToFix = fieldsToFix.map(function(fieldName) {
4337
- return ucFirst(fieldName) + "Field";
4338
- });
4339
- thingsToFix = thingsToFix.concat(otherThingsToFix);
4340
- function normalize(data, warn, strict) {
4341
- if (warn === true) {
4342
- warn = null;
4343
- strict = true;
4344
- }
4345
- if (!strict) strict = false;
4346
- if (!warn || data.private) warn = function() {};
4347
- if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) data.gypfile = true;
4348
- fixer.warn = function() {
4349
- warn(makeWarning.apply(null, arguments));
4350
- };
4351
- thingsToFix.forEach(function(thingName) {
4352
- fixer["fix" + ucFirst(thingName)](data, strict);
4353
- });
4354
- data._id = data.name + "@" + data.version;
4355
- }
4356
- function ucFirst(string) {
4357
- return string.charAt(0).toUpperCase() + string.slice(1);
4358
- }
4359
- })))(), 1);
4360
- promisify(execFile);
4361
- function toPath(urlOrPath) {
4362
- return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
4363
- }
4364
- //#endregion
4365
- //#region ../../node_modules/.pnpm/read-pkg@10.1.0/node_modules/read-pkg/index.js
4366
- const getPackagePath = (cwd) => path.resolve(toPath(cwd) ?? ".", "package.json");
4367
- const _readPackage = (file, normalize) => {
4368
- const json = typeof file === "string" ? parseJson(file) : file;
4369
- if (normalize) (0, import_normalize.default)(json);
4370
- return json;
4371
- };
4372
- async function readPackage({ cwd, normalize = true } = {}) {
4373
- return _readPackage(await fs$1.readFile(getPackagePath(cwd), "utf8"), normalize);
4374
- }
4375
- //#endregion
4376
25
  //#region src/codegen/utils.ts
4377
26
  async function loadDocumentModel(path) {
4378
27
  let documentModel;
@@ -4495,67 +144,6 @@ async function generateDocumentModel(args) {
4495
144
  useVersioning,
4496
145
  migrateLegacy
4497
146
  });
4498
- ensurePackageExportsWildcards();
4499
- ensureTsconfigPaths(packageName);
4500
- }
4501
- const requiredWildcardExports = {
4502
- "./document-models/*": {
4503
- types: "./dist/document-models/*/index.d.ts",
4504
- import: "./dist/document-models/*/index.js"
4505
- },
4506
- "./editors/*": {
4507
- types: "./dist/editors/*/index.d.ts",
4508
- import: "./dist/editors/*/index.js"
4509
- }
4510
- };
4511
- /**
4512
- * Ensures that the project's package.json exports field contains the
4513
- * wildcard subpath patterns required for deep imports like
4514
- * "package-name/document-models/my-doc" to resolve correctly.
4515
- */
4516
- function ensurePackageExportsWildcards(projectRoot) {
4517
- const packageJsonPath = join(projectRoot || process.cwd(), "package.json");
4518
- if (!fs.existsSync(packageJsonPath)) return;
4519
- const raw = fs.readFileSync(packageJsonPath, "utf-8");
4520
- const packageJson = JSON.parse(raw);
4521
- const exports = packageJson.exports;
4522
- if (!exports) return;
4523
- let modified = false;
4524
- for (const [key, value] of Object.entries(requiredWildcardExports)) if (!exports[key]) {
4525
- exports[key] = value;
4526
- modified = true;
4527
- }
4528
- if (modified) fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n");
4529
- }
4530
- /**
4531
- * Ensures that the project's tsconfig.json has paths mappings for
4532
- * self-referencing imports, which are needed by vite-tsconfig-paths
4533
- * to resolve imports like "package-name/document-models/my-doc"
4534
- * to source files during dev mode.
4535
- */
4536
- function ensureTsconfigPaths(packageName, projectRoot) {
4537
- const tsconfigPath = join(projectRoot || process.cwd(), "tsconfig.json");
4538
- if (!fs.existsSync(tsconfigPath)) return;
4539
- const stripped = fs.readFileSync(tsconfigPath, "utf-8").replace(/("(?:\\.|[^"\\])*")|\/\/.*$|\/\*[\s\S]*?\*\//gm, (_match, str) => str ?? "");
4540
- const tsconfig = JSON.parse(stripped);
4541
- const compilerOptions = tsconfig.compilerOptions ?? {};
4542
- const paths = compilerOptions.paths ?? {};
4543
- const requiredPaths = {
4544
- [`${packageName}/document-models`]: ["./document-models/index.ts"],
4545
- [`${packageName}/document-models/*`]: ["./document-models/*/index.ts"],
4546
- [`${packageName}/editors`]: ["./editors/index.ts"],
4547
- [`${packageName}/editors/*`]: ["./editors/*/index.ts"]
4548
- };
4549
- let modified = false;
4550
- for (const [key, value] of Object.entries(requiredPaths)) if (!paths[key]) {
4551
- paths[key] = value;
4552
- modified = true;
4553
- }
4554
- if (modified) {
4555
- compilerOptions.paths = paths;
4556
- tsconfig.compilerOptions = compilerOptions;
4557
- fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2) + "\n");
4558
- }
4559
147
  }
4560
148
  function findZodDependencyInPackageJson(packageJson) {
4561
149
  return {
@@ -4585,8 +173,6 @@ async function generateEditor(args) {
4585
173
  editorName,
4586
174
  editorId
4587
175
  });
4588
- ensurePackageExportsWildcards();
4589
- ensureTsconfigPaths(packageName);
4590
176
  }
4591
177
  async function generateDriveEditor(options) {
4592
178
  const { driveEditorName, driveEditorId, allowedDocumentTypes, isDragAndDropEnabled, driveEditorDirName, specifiedPackageName } = options;
@@ -4603,7 +189,7 @@ async function generateDriveEditor(options) {
4603
189
  isDragAndDropEnabled: isDragAndDropEnabled ?? true
4604
190
  });
4605
191
  }
4606
- async function generateSubgraphFromDocumentModel(name, documentModel, config, _options = {}) {
192
+ async function generateSubgraphFromDocumentModel(name, documentModel, config) {
4607
193
  const packageName = await readPackage().then((pkg) => pkg.name);
4608
194
  await tsMorphGenerateSubgraph({
4609
195
  subgraphsDir: config.subgraphsDir,
@@ -4613,7 +199,7 @@ async function generateSubgraphFromDocumentModel(name, documentModel, config, _o
4613
199
  });
4614
200
  await makeSubgraphsIndexFile({ projectDir: path.dirname(config.subgraphsDir) });
4615
201
  }
4616
- async function generateSubgraph(name, file, config, _options = {}) {
202
+ async function generateSubgraph(name, file, config) {
4617
203
  const documentModelState = file !== null ? await loadDocumentModel(file) : null;
4618
204
  const packageName = await readPackage().then((pkg) => pkg.name);
4619
205
  await tsMorphGenerateSubgraph({
@@ -4905,6 +491,8 @@ async function writeModuleFiles() {
4905
491
  await writeFileEnsuringDir("editors/index.ts", "");
4906
492
  await writeFileEnsuringDir("processors/factory.ts", processorsFactoryTemplate);
4907
493
  await writeFileEnsuringDir("processors/index.ts", processorsIndexTemplate);
494
+ await writeFileEnsuringDir("processors/connect.ts", factoryBuildersTemplate);
495
+ await writeFileEnsuringDir("processors/switchboard.ts", factoryBuildersTemplate);
4908
496
  await writeFileEnsuringDir("subgraphs/index.ts", "");
4909
497
  await writeFileEnsuringDir("processors/index.ts", processorsIndexTemplate);
4910
498
  }