@kubb/core 4.1.4 → 4.2.1
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/URLPath-8WVzHBnA.cjs +134 -0
- package/dist/URLPath-8WVzHBnA.cjs.map +1 -0
- package/dist/URLPath-BYceu_vY.js +117 -0
- package/dist/URLPath-BYceu_vY.js.map +1 -0
- package/dist/{acorn-Cg_eXN51.cjs → acorn-BAVXZMtK.cjs} +17 -21
- package/dist/{acorn-Cg_eXN51.cjs.map → acorn-BAVXZMtK.cjs.map} +1 -1
- package/dist/{acorn-Z0oy0vSt.js → acorn-D-VhIOLw.js} +17 -21
- package/dist/{acorn-Z0oy0vSt.js.map → acorn-D-VhIOLw.js.map} +1 -1
- package/dist/{angular-nBly58h0.cjs → angular-Bp0XO9db.cjs} +24 -29
- package/dist/{angular-nBly58h0.cjs.map → angular-Bp0XO9db.cjs.map} +1 -1
- package/dist/{angular-BUlb_iaU.js → angular-Czhp4eq5.js} +24 -29
- package/dist/{angular-BUlb_iaU.js.map → angular-Czhp4eq5.js.map} +1 -1
- package/dist/{babel-DfXTN9QX.js → babel-DCR_B4Qn.js} +27 -37
- package/dist/{babel-DfXTN9QX.js.map → babel-DCR_B4Qn.js.map} +1 -1
- package/dist/{babel-5qXjvTGO.cjs → babel-NI0v59ga.cjs} +27 -37
- package/dist/{babel-5qXjvTGO.cjs.map → babel-NI0v59ga.cjs.map} +1 -1
- package/dist/casing-BSeq_teY.js +100 -0
- package/dist/casing-BSeq_teY.js.map +1 -0
- package/dist/casing-CP-9GGdK.cjs +112 -0
- package/dist/casing-CP-9GGdK.cjs.map +1 -0
- package/dist/{chunk-kPDogv7o.js → chunk-1SJ2vVWa.js} +1 -1
- package/dist/{estree-DyiFjXDy.cjs → estree-C3BZPlpU.cjs} +49 -64
- package/dist/{estree-DyiFjXDy.cjs.map → estree-C3BZPlpU.cjs.map} +1 -1
- package/dist/{estree-Bt3vRtV3.js → estree-DU2NummP.js} +49 -64
- package/dist/{estree-Bt3vRtV3.js.map → estree-DU2NummP.js.map} +1 -1
- package/dist/{flow-DdtBrX0O.cjs → flow-CWUBUkoi.cjs} +978 -1038
- package/dist/{flow-DdtBrX0O.cjs.map → flow-CWUBUkoi.cjs.map} +1 -1
- package/dist/{flow-Bb8_yYns.js → flow-JiEbweKj.js} +978 -1038
- package/dist/{flow-Bb8_yYns.js.map → flow-JiEbweKj.js.map} +1 -1
- package/dist/{fs-BNC5Fj6t.js → fs-BIPMUfpW.js} +3 -4
- package/dist/{fs-BNC5Fj6t.js.map → fs-BIPMUfpW.js.map} +1 -1
- package/dist/{fs-Bi2kuxAm.cjs → fs-RSVoUw3S.cjs} +2 -3
- package/dist/{fs-Bi2kuxAm.cjs.map → fs-RSVoUw3S.cjs.map} +1 -1
- package/dist/fs.cjs +1 -1
- package/dist/fs.d.cts +1 -1
- package/dist/fs.d.ts +1 -1
- package/dist/fs.js +2 -2
- package/dist/{glimmer-BuCRLjbI.cjs → glimmer-CX9OqG1j.cjs} +27 -41
- package/dist/{glimmer-BuCRLjbI.cjs.map → glimmer-CX9OqG1j.cjs.map} +1 -1
- package/dist/{glimmer-By8WZPkK.js → glimmer-t9nWn9aE.js} +27 -41
- package/dist/{glimmer-By8WZPkK.js.map → glimmer-t9nWn9aE.js.map} +1 -1
- package/dist/{graphql-DsrNefXx.js → graphql-DjErlIi5.js} +16 -20
- package/dist/{graphql-DsrNefXx.js.map → graphql-DjErlIi5.js.map} +1 -1
- package/dist/{graphql-TN0hv-fx.cjs → graphql-GOxQAKxM.cjs} +16 -20
- package/dist/{graphql-TN0hv-fx.cjs.map → graphql-GOxQAKxM.cjs.map} +1 -1
- package/dist/hooks.cjs +29 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.cts +16 -0
- package/dist/hooks.d.ts +16 -0
- package/dist/hooks.js +25 -0
- package/dist/hooks.js.map +1 -0
- package/dist/{html-1W4-2_9J.cjs → html-CWrdYAhQ.cjs} +26 -27
- package/dist/{html-1W4-2_9J.cjs.map → html-CWrdYAhQ.cjs.map} +1 -1
- package/dist/{html-Y5KDc150.js → html-_apcbx34.js} +26 -27
- package/dist/{html-Y5KDc150.js.map → html-_apcbx34.js.map} +1 -1
- package/dist/{index-CGJ3tdk-.d.ts → index-BTe91LHd.d.ts} +7 -2
- package/dist/{index-CWX6_-da.d.cts → index-BmQIxvw0.d.cts} +5 -2
- package/dist/index.cjs +383 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -10
- package/dist/index.d.ts +43 -10
- package/dist/index.js +376 -23
- package/dist/index.js.map +1 -1
- package/dist/{logger-OWS6fqk0.d.cts → logger-BA-za85-.d.ts} +2 -2
- package/dist/{logger-DBJsdlpZ.cjs → logger-BXL0YCrv.cjs} +8 -12
- package/dist/{logger-DBJsdlpZ.cjs.map → logger-BXL0YCrv.cjs.map} +1 -1
- package/dist/{logger-BKPT4rkB.js → logger-CDxSrFkR.js} +10 -14
- package/dist/{logger-BKPT4rkB.js.map → logger-CDxSrFkR.js.map} +1 -1
- package/dist/{logger-B-4AXUmB.d.ts → logger-DpoDtxfo.d.cts} +2 -2
- package/dist/logger.cjs +1 -1
- package/dist/logger.d.cts +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +2 -2
- package/dist/{markdown-Drl4Cbq5.js → markdown-ckUc3Q6q.js} +25 -29
- package/dist/{markdown-Drl4Cbq5.js.map → markdown-ckUc3Q6q.js.map} +1 -1
- package/dist/{markdown-Bltb-uzO.cjs → markdown-pzqiRmft.cjs} +25 -29
- package/dist/{markdown-Bltb-uzO.cjs.map → markdown-pzqiRmft.cjs.map} +1 -1
- package/dist/{meriyah-Cz9whwp-.js → meriyah-BjnGqpUs.js} +21 -29
- package/dist/{meriyah-Cz9whwp-.js.map → meriyah-BjnGqpUs.js.map} +1 -1
- package/dist/{meriyah-CdG8HPS2.cjs → meriyah-D_x7itbT.cjs} +21 -29
- package/dist/{meriyah-CdG8HPS2.cjs.map → meriyah-D_x7itbT.cjs.map} +1 -1
- package/dist/mocks.cjs +87 -144
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.cts +4 -3
- package/dist/mocks.d.ts +4 -3
- package/dist/mocks.js +83 -141
- package/dist/mocks.js.map +1 -1
- package/dist/{postcss-B7n9zUIy.cjs → postcss-B_c2wbFu.cjs} +41 -54
- package/dist/{postcss-B7n9zUIy.cjs.map → postcss-B_c2wbFu.cjs.map} +1 -1
- package/dist/{postcss-Dfx_9buT.js → postcss-v7BP6SZ-.js} +41 -54
- package/dist/{postcss-Dfx_9buT.js.map → postcss-v7BP6SZ-.js.map} +1 -1
- package/dist/{prompt-BMs_Y-vT.js → prompt-DBVnG4Me.js} +30 -32
- package/dist/{prompt-BMs_Y-vT.js.map → prompt-DBVnG4Me.js.map} +1 -1
- package/dist/{prompt-BXlYKArM.cjs → prompt-DgONOpPH.cjs} +29 -31
- package/dist/{prompt-BXlYKArM.cjs.map → prompt-DgONOpPH.cjs.map} +1 -1
- package/dist/{transformers-DZ22lE-S.cjs → transformers-BH0KLJJP.cjs} +130 -248
- package/dist/transformers-BH0KLJJP.cjs.map +1 -0
- package/dist/{transformers-BllSzdDt.js → transformers-DzHGqYO2.js} +130 -236
- package/dist/transformers-DzHGqYO2.js.map +1 -0
- package/dist/transformers.cjs +4 -3
- package/dist/transformers.js +2 -1
- package/dist/types-BzI9JlV8.d.ts +5 -0
- package/dist/types-C3ea5qNG.d.cts +5 -0
- package/dist/{PluginManager-BSUDeUfP.d.ts → types-DNxlynJr.d.cts} +187 -246
- package/dist/{PluginManager-a3RiDAFC.d.cts → types-DPeNK0FO.d.ts} +187 -246
- package/dist/{typescript-Evf8GXVW.cjs → typescript-6kMN6Wqz.cjs} +100 -152
- package/dist/{typescript-Evf8GXVW.cjs.map → typescript-6kMN6Wqz.cjs.map} +1 -1
- package/dist/{typescript-C8iCxnaF.js → typescript-B_IBfKSe.js} +101 -153
- package/dist/{typescript-C8iCxnaF.js.map → typescript-B_IBfKSe.js.map} +1 -1
- package/dist/typescript-C5hce4HG.cjs +4 -0
- package/dist/typescript-Cas1XcNz.js +3 -0
- package/dist/utils.cjs +165 -20
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +136 -5
- package/dist/utils.d.ts +136 -5
- package/dist/utils.js +156 -5
- package/dist/utils.js.map +1 -0
- package/dist/{write-O9QWtBJ_.js → write-CxO1CDML.js} +2 -2
- package/dist/{write-O9QWtBJ_.js.map → write-CxO1CDML.js.map} +1 -1
- package/dist/{yaml-Bi_nSoU_.js → yaml-BfWM_B73.js} +141 -157
- package/dist/{yaml-Bi_nSoU_.js.map → yaml-BfWM_B73.js.map} +1 -1
- package/dist/{yaml-B2qeXFgu.cjs → yaml-DZs6MhV1.cjs} +141 -157
- package/dist/{yaml-B2qeXFgu.cjs.map → yaml-DZs6MhV1.cjs.map} +1 -1
- package/package.json +15 -3
- package/src/FileManager.ts +34 -302
- package/src/PluginManager.ts +9 -8
- package/src/__snapshots__/barrel.json +5 -5
- package/src/build.ts +19 -5
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useMode.ts +8 -0
- package/src/hooks/usePlugin.ts +8 -0
- package/src/hooks/usePluginManager.ts +8 -0
- package/src/index.ts +1 -2
- package/src/mocks/index.ts +4 -3
- package/src/plugin.ts +1 -1
- package/src/types.ts +4 -1
- package/src/utils/TreeNode.ts +3 -3
- package/src/utils/index.ts +2 -4
- package/dist/FileManager-B0V0rX5Z.js +0 -881
- package/dist/FileManager-B0V0rX5Z.js.map +0 -1
- package/dist/FileManager-COJW0Zp4.cjs +0 -1003
- package/dist/FileManager-COJW0Zp4.cjs.map +0 -1
- package/dist/index-B7KKQHG8.d.cts +0 -179
- package/dist/index-BhFFCWR1.d.ts +0 -179
- package/dist/transformers-BllSzdDt.js.map +0 -1
- package/dist/transformers-DZ22lE-S.cjs.map +0 -1
- package/dist/typescript-BY9-7pw9.js +0 -3
- package/dist/typescript-PxlX-TH7.cjs +0 -4
- package/src/utils/parser.ts +0 -199
package/dist/mocks.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CZg_9w7l.cjs');
|
|
2
|
-
require('./
|
|
3
|
-
require('./
|
|
4
|
-
const require_transformers = require('./transformers-DZ22lE-S.cjs');
|
|
5
|
-
const require_FileManager = require('./FileManager-COJW0Zp4.cjs');
|
|
6
|
-
const require_typescript = require('./typescript-Evf8GXVW.cjs');
|
|
2
|
+
const require_casing = require('./casing-CP-9GGdK.cjs');
|
|
3
|
+
const require_typescript = require('./typescript-6kMN6Wqz.cjs');
|
|
7
4
|
let node_path = require("node:path");
|
|
8
5
|
node_path = require_chunk.__toESM(node_path);
|
|
6
|
+
let __kubb_fabric_core = require("@kubb/fabric-core");
|
|
7
|
+
__kubb_fabric_core = require_chunk.__toESM(__kubb_fabric_core);
|
|
9
8
|
let module$1 = require("module");
|
|
10
9
|
module$1 = require_chunk.__toESM(module$1);
|
|
11
10
|
let url = require("url");
|
|
@@ -131,14 +130,14 @@ function traverseDoc$1(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
|
|
|
131
130
|
case DOC_TYPE_ARRAY$1:
|
|
132
131
|
case DOC_TYPE_FILL$1: {
|
|
133
132
|
const parts = docType === DOC_TYPE_ARRAY$1 ? doc2 : doc2.parts;
|
|
134
|
-
for (let
|
|
133
|
+
for (let i = parts.length - 1; i >= 0; --i) docsStack.push(parts[i]);
|
|
135
134
|
break;
|
|
136
135
|
}
|
|
137
136
|
case DOC_TYPE_IF_BREAK$1:
|
|
138
137
|
docsStack.push(doc2.flatContents, doc2.breakContents);
|
|
139
138
|
break;
|
|
140
139
|
case DOC_TYPE_GROUP$1:
|
|
141
|
-
if (shouldTraverseConditionalGroups && doc2.expandedStates) for (let
|
|
140
|
+
if (shouldTraverseConditionalGroups && doc2.expandedStates) for (let i = doc2.expandedStates.length - 1; i >= 0; --i) docsStack.push(doc2.expandedStates[i]);
|
|
142
141
|
else docsStack.push(doc2.contents);
|
|
143
142
|
break;
|
|
144
143
|
case DOC_TYPE_ALIGN$1:
|
|
@@ -803,11 +802,10 @@ function printDocToString$1(doc, options) {
|
|
|
803
802
|
});
|
|
804
803
|
break;
|
|
805
804
|
} else {
|
|
806
|
-
const state = doc2.expandedStates[i];
|
|
807
805
|
const cmd = {
|
|
808
806
|
ind,
|
|
809
807
|
mode: MODE_FLAT$1,
|
|
810
|
-
doc:
|
|
808
|
+
doc: doc2.expandedStates[i]
|
|
811
809
|
};
|
|
812
810
|
if (fits$1(cmd, cmds, rem, hasLineSuffix, groupModeMap)) {
|
|
813
811
|
cmds.push(cmd);
|
|
@@ -1027,8 +1025,7 @@ var public_default = public_exports$1;
|
|
|
1027
1025
|
//#endregion
|
|
1028
1026
|
//#region ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.mjs
|
|
1029
1027
|
const require$1 = (0, module$1.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
1030
|
-
|
|
1031
|
-
(0, path.dirname)(__filename$1);
|
|
1028
|
+
(0, path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
1032
1029
|
var __create = Object.create;
|
|
1033
1030
|
var __defProp = Object.defineProperty;
|
|
1034
1031
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -2004,7 +2001,7 @@ var require_parse = __commonJS({ "node_modules/braces/lib/parse.js"(exports$1, m
|
|
|
2004
2001
|
}
|
|
2005
2002
|
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
2006
2003
|
depth++;
|
|
2007
|
-
|
|
2004
|
+
block = push2({
|
|
2008
2005
|
type: "brace",
|
|
2009
2006
|
open: true,
|
|
2010
2007
|
close: false,
|
|
@@ -2013,8 +2010,7 @@ var require_parse = __commonJS({ "node_modules/braces/lib/parse.js"(exports$1, m
|
|
|
2013
2010
|
commas: 0,
|
|
2014
2011
|
ranges: 0,
|
|
2015
2012
|
nodes: []
|
|
2016
|
-
};
|
|
2017
|
-
block = push2(brace);
|
|
2013
|
+
});
|
|
2018
2014
|
stack2.push(block);
|
|
2019
2015
|
push2({
|
|
2020
2016
|
type: "open",
|
|
@@ -2170,12 +2166,6 @@ var require_constants2 = __commonJS({ "node_modules/micromatch/node_modules/pico
|
|
|
2170
2166
|
var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
|
2171
2167
|
var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
|
2172
2168
|
var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
|
2173
|
-
var NO_DOT = `(?!${DOT_LITERAL})`;
|
|
2174
|
-
var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
|
|
2175
|
-
var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
|
|
2176
|
-
var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
|
2177
|
-
var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
|
2178
|
-
var STAR = `${QMARK}*?`;
|
|
2179
2169
|
var POSIX_CHARS = {
|
|
2180
2170
|
DOT_LITERAL,
|
|
2181
2171
|
PLUS_LITERAL,
|
|
@@ -2185,12 +2175,12 @@ var require_constants2 = __commonJS({ "node_modules/micromatch/node_modules/pico
|
|
|
2185
2175
|
QMARK,
|
|
2186
2176
|
END_ANCHOR,
|
|
2187
2177
|
DOTS_SLASH,
|
|
2188
|
-
NO_DOT
|
|
2189
|
-
NO_DOTS
|
|
2190
|
-
NO_DOT_SLASH,
|
|
2191
|
-
NO_DOTS_SLASH
|
|
2192
|
-
QMARK_NO_DOT
|
|
2193
|
-
STAR
|
|
2178
|
+
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
2179
|
+
NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`,
|
|
2180
|
+
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`,
|
|
2181
|
+
NO_DOTS_SLASH: `(?!${DOTS_SLASH})`,
|
|
2182
|
+
QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`,
|
|
2183
|
+
STAR: `${QMARK}*?`,
|
|
2194
2184
|
START_ANCHOR
|
|
2195
2185
|
};
|
|
2196
2186
|
var WINDOWS_CHARS = {
|
|
@@ -2352,9 +2342,7 @@ var require_utils2 = __commonJS({ "node_modules/micromatch/node_modules/picomatc
|
|
|
2352
2342
|
return output;
|
|
2353
2343
|
};
|
|
2354
2344
|
exports$1.wrapOutput = (input, state = {}, options8 = {}) => {
|
|
2355
|
-
|
|
2356
|
-
const append = options8.contains ? "" : "$";
|
|
2357
|
-
let output = `${prepend}(?:${input})${append}`;
|
|
2345
|
+
let output = `${options8.contains ? "" : "^"}(?:${input})${options8.contains ? "" : "$"}`;
|
|
2358
2346
|
if (state.negated === true) output = `(?:^(?!${output}).*$)`;
|
|
2359
2347
|
return output;
|
|
2360
2348
|
};
|
|
@@ -2866,8 +2854,7 @@ var require_parse2 = __commonJS({ "node_modules/micromatch/node_modules/picomatc
|
|
|
2866
2854
|
if (inner.includes(":")) {
|
|
2867
2855
|
const idx = prev.value.lastIndexOf("[");
|
|
2868
2856
|
const pre = prev.value.slice(0, idx);
|
|
2869
|
-
const
|
|
2870
|
-
const posix = POSIX_REGEX_SOURCE[rest2];
|
|
2857
|
+
const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
|
|
2871
2858
|
if (posix) {
|
|
2872
2859
|
prev.value = pre + posix;
|
|
2873
2860
|
state.backtrack = true;
|
|
@@ -3393,8 +3380,7 @@ var require_parse2 = __commonJS({ "node_modules/micromatch/node_modules/picomatc
|
|
|
3393
3380
|
}
|
|
3394
3381
|
}
|
|
3395
3382
|
};
|
|
3396
|
-
|
|
3397
|
-
let source2 = create(output);
|
|
3383
|
+
let source2 = create(utils$1.removePrefix(input, state));
|
|
3398
3384
|
if (source2 && opts.strictSlashes !== true) source2 += `${SLASH_LITERAL}?`;
|
|
3399
3385
|
return source2;
|
|
3400
3386
|
};
|
|
@@ -4231,8 +4217,7 @@ var require_async2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/provider
|
|
|
4231
4217
|
callSuccessCallback(callback, entries);
|
|
4232
4218
|
return;
|
|
4233
4219
|
}
|
|
4234
|
-
|
|
4235
|
-
rpl(tasks, (rplError, rplEntries) => {
|
|
4220
|
+
rpl(entries.map((entry) => makeRplTaskEntry(entry, settings)), (rplError, rplEntries) => {
|
|
4236
4221
|
if (rplError !== null) {
|
|
4237
4222
|
callFailureCallback(callback, rplError);
|
|
4238
4223
|
return;
|
|
@@ -4268,7 +4253,7 @@ var require_async2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/provider
|
|
|
4268
4253
|
callFailureCallback(callback, readdirError);
|
|
4269
4254
|
return;
|
|
4270
4255
|
}
|
|
4271
|
-
|
|
4256
|
+
rpl(names.map((name) => {
|
|
4272
4257
|
const path14 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
4273
4258
|
return (done) => {
|
|
4274
4259
|
fsStat.stat(path14, settings.fsStatSettings, (error, stats) => {
|
|
@@ -4285,8 +4270,7 @@ var require_async2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/provider
|
|
|
4285
4270
|
done(null, entry);
|
|
4286
4271
|
});
|
|
4287
4272
|
};
|
|
4288
|
-
})
|
|
4289
|
-
rpl(tasks, (rplError, entries) => {
|
|
4273
|
+
}), (rplError, entries) => {
|
|
4290
4274
|
if (rplError !== null) {
|
|
4291
4275
|
callFailureCallback(callback, rplError);
|
|
4292
4276
|
return;
|
|
@@ -5186,8 +5170,7 @@ var require_deep = __commonJS({ "node_modules/fast-glob/out/providers/filters/de
|
|
|
5186
5170
|
_getEntryLevel(basePath, entryPath) {
|
|
5187
5171
|
const entryPathDepth = entryPath.split("/").length;
|
|
5188
5172
|
if (basePath === "") return entryPathDepth;
|
|
5189
|
-
|
|
5190
|
-
return entryPathDepth - basePathDepth;
|
|
5173
|
+
return entryPathDepth - basePath.split("/").length;
|
|
5191
5174
|
}
|
|
5192
5175
|
_isSkippedSymbolicLink(entry) {
|
|
5193
5176
|
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
@@ -5675,12 +5658,10 @@ var require_constants4 = __commonJS({ "node_modules/semver/internal/constants.js
|
|
|
5675
5658
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
5676
5659
|
var MAX_LENGTH = 256;
|
|
5677
5660
|
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
5678
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
5679
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
5680
5661
|
module$2.exports = {
|
|
5681
5662
|
MAX_LENGTH,
|
|
5682
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
5683
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
5663
|
+
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
5664
|
+
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
|
|
5684
5665
|
MAX_SAFE_INTEGER,
|
|
5685
5666
|
RELEASE_TYPES: [
|
|
5686
5667
|
"major",
|
|
@@ -7554,8 +7535,7 @@ var require_src = __commonJS({ "node_modules/editorconfig/src/index.js"(exports$
|
|
|
7554
7535
|
var glob = section[0];
|
|
7555
7536
|
var options22 = section[1];
|
|
7556
7537
|
if (!glob) return;
|
|
7557
|
-
|
|
7558
|
-
if (!fnmatch(filepath, fullGlob)) return;
|
|
7538
|
+
if (!fnmatch(filepath, buildFullGlob(pathPrefix, glob))) return;
|
|
7559
7539
|
matches = extendProps(matches, options22);
|
|
7560
7540
|
});
|
|
7561
7541
|
return matches;
|
|
@@ -7647,9 +7627,7 @@ var require_src = __commonJS({ "node_modules/editorconfig/src/index.js"(exports$
|
|
|
7647
7627
|
function parseSync(_filepath, _options) {
|
|
7648
7628
|
if (_options === void 0) _options = {};
|
|
7649
7629
|
var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1];
|
|
7650
|
-
|
|
7651
|
-
var files = readConfigFilesSync(filepaths);
|
|
7652
|
-
return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions);
|
|
7630
|
+
return parseFromConfigs(getConfigsForFiles(readConfigFilesSync(getConfigFileNames(resolvedFilePath, processedOptions))), resolvedFilePath, processedOptions);
|
|
7653
7631
|
}
|
|
7654
7632
|
exports$1.parseSync = parseSync;
|
|
7655
7633
|
} });
|
|
@@ -8872,10 +8850,8 @@ var require_lib2 = __commonJS({ "node_modules/@babel/code-frame/lib/index.js"(ex
|
|
|
8872
8850
|
if (lineDiff2) for (let i = 0; i <= lineDiff2; i++) {
|
|
8873
8851
|
const lineNumber = i + startLine;
|
|
8874
8852
|
if (!startColumn) markerLines[lineNumber] = true;
|
|
8875
|
-
else if (i === 0)
|
|
8876
|
-
|
|
8877
|
-
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
|
|
8878
|
-
} else if (i === lineDiff2) markerLines[lineNumber] = [0, endColumn];
|
|
8853
|
+
else if (i === 0) markerLines[lineNumber] = [startColumn, source2[lineNumber - 1].length - startColumn + 1];
|
|
8854
|
+
else if (i === lineDiff2) markerLines[lineNumber] = [0, endColumn];
|
|
8879
8855
|
else markerLines[lineNumber] = [0, source2[lineNumber - i].length];
|
|
8880
8856
|
}
|
|
8881
8857
|
else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0];
|
|
@@ -8890,8 +8866,7 @@ var require_lib2 = __commonJS({ "node_modules/@babel/code-frame/lib/index.js"(ex
|
|
|
8890
8866
|
function codeFrameColumns3(rawLines, loc, opts = {}) {
|
|
8891
8867
|
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
8892
8868
|
const defs = getDefs(shouldHighlight);
|
|
8893
|
-
const
|
|
8894
|
-
const { start, end, markerLines } = getMarkerLines(loc, lines, opts);
|
|
8869
|
+
const { start, end, markerLines } = getMarkerLines(loc, rawLines.split(NEWLINE), opts);
|
|
8895
8870
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
8896
8871
|
const numberMaxWidth = String(end).length;
|
|
8897
8872
|
let frame = (shouldHighlight ? highlight(rawLines) : rawLines).split(NEWLINE, end).slice(start, end).map((line3, index2) => {
|
|
@@ -9084,8 +9059,7 @@ var require_ignore = __commonJS({ "node_modules/ignore/index.js"(exports$1, modu
|
|
|
9084
9059
|
}],
|
|
9085
9060
|
[/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"],
|
|
9086
9061
|
[/(^|[^\\]+)(\\\*)+(?=.+)/g, (_, p1, p2) => {
|
|
9087
|
-
|
|
9088
|
-
return p1 + unescaped;
|
|
9062
|
+
return p1 + p2.replace(/\\\*/g, "[^\\/]*");
|
|
9089
9063
|
}],
|
|
9090
9064
|
[/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE],
|
|
9091
9065
|
[/\\\\/g, () => ESCAPE],
|
|
@@ -9517,8 +9491,7 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne
|
|
|
9517
9491
|
else {
|
|
9518
9492
|
const { callback } = optionsObj;
|
|
9519
9493
|
diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
|
|
9520
|
-
|
|
9521
|
-
callback(patch);
|
|
9494
|
+
callback(diffLinesResultToPatch(diff));
|
|
9522
9495
|
} }));
|
|
9523
9496
|
}
|
|
9524
9497
|
function diffLinesResultToPatch(diff) {
|
|
@@ -10411,10 +10384,8 @@ function clearEditorconfigCache() {
|
|
|
10411
10384
|
editorconfigCache.clear();
|
|
10412
10385
|
}
|
|
10413
10386
|
async function loadEditorconfigInternal(file, { shouldCache }) {
|
|
10414
|
-
const
|
|
10415
|
-
|
|
10416
|
-
const editorConfig = await import_editorconfig.default.parse(file, { root: root2 });
|
|
10417
|
-
return editorconfig_to_prettier_default(editorConfig);
|
|
10387
|
+
const root2 = await findProjectRoot(path.default.dirname(file), { shouldCache });
|
|
10388
|
+
return editorconfig_to_prettier_default(await import_editorconfig.default.parse(file, { root: root2 }));
|
|
10418
10389
|
}
|
|
10419
10390
|
function loadEditorconfig(file, { shouldCache }) {
|
|
10420
10391
|
file = path.default.resolve(file);
|
|
@@ -11921,7 +11892,7 @@ async function loadConfigFromPackageYaml(file) {
|
|
|
11921
11892
|
var parseYaml;
|
|
11922
11893
|
async function loadYaml(file) {
|
|
11923
11894
|
const content = await read_file_default(file);
|
|
11924
|
-
if (!parseYaml) ({__parsePrettierYamlConfig: parseYaml} = await Promise.resolve().then(() => require("./yaml-
|
|
11895
|
+
if (!parseYaml) ({__parsePrettierYamlConfig: parseYaml} = await Promise.resolve().then(() => require("./yaml-DZs6MhV1.cjs")));
|
|
11925
11896
|
try {
|
|
11926
11897
|
return parseYaml(content);
|
|
11927
11898
|
} catch (error) {
|
|
@@ -12393,8 +12364,7 @@ function getFileProtocolModuleFormat(url3, _context, ignoreErrors) {
|
|
|
12393
12364
|
const format3 = extensionFormatMap[value];
|
|
12394
12365
|
if (format3) return format3;
|
|
12395
12366
|
if (ignoreErrors) return;
|
|
12396
|
-
|
|
12397
|
-
throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath);
|
|
12367
|
+
throw new ERR_UNKNOWN_FILE_EXTENSION(value, (0, url.fileURLToPath)(url3));
|
|
12398
12368
|
}
|
|
12399
12369
|
function getHttpProtocolModuleFormat() {}
|
|
12400
12370
|
function defaultGetFormatWithoutErrors(url3, context) {
|
|
@@ -12534,8 +12504,7 @@ function exportsNotFound(subpath, packageJsonUrl, base) {
|
|
|
12534
12504
|
return new ERR_PACKAGE_PATH_NOT_EXPORTED((0, url.fileURLToPath)(new url.URL(".", packageJsonUrl)), subpath, base && (0, url.fileURLToPath)(base));
|
|
12535
12505
|
}
|
|
12536
12506
|
function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
|
|
12537
|
-
|
|
12538
|
-
throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && (0, url.fileURLToPath)(base));
|
|
12507
|
+
throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${(0, url.fileURLToPath)(packageJsonUrl)}`, base && (0, url.fileURLToPath)(base));
|
|
12539
12508
|
}
|
|
12540
12509
|
function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
|
|
12541
12510
|
target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
|
|
@@ -12550,18 +12519,14 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
|
|
|
12550
12519
|
new url.URL(target);
|
|
12551
12520
|
isURL2 = true;
|
|
12552
12521
|
} catch {}
|
|
12553
|
-
if (!isURL2)
|
|
12554
|
-
const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath;
|
|
12555
|
-
return packageResolve(exportTarget, packageJsonUrl, conditions);
|
|
12556
|
-
}
|
|
12522
|
+
if (!isURL2) return packageResolve(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath, packageJsonUrl, conditions);
|
|
12557
12523
|
}
|
|
12558
12524
|
throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
|
|
12559
12525
|
}
|
|
12560
12526
|
if (invalidSegmentRegEx.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {
|
|
12561
12527
|
if (!isPathMap) {
|
|
12562
12528
|
const request = pattern ? match.replace("*", () => subpath) : match + subpath;
|
|
12563
|
-
|
|
12564
|
-
emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, true);
|
|
12529
|
+
emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true);
|
|
12565
12530
|
}
|
|
12566
12531
|
} else throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
|
|
12567
12532
|
const resolved = new url.URL(target, packageJsonUrl);
|
|
@@ -12572,10 +12537,7 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
|
|
|
12572
12537
|
if (invalidSegmentRegEx.exec(subpath) !== null) {
|
|
12573
12538
|
const request = pattern ? match.replace("*", () => subpath) : match + subpath;
|
|
12574
12539
|
if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {
|
|
12575
|
-
if (!isPathMap)
|
|
12576
|
-
const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target;
|
|
12577
|
-
emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, false);
|
|
12578
|
-
}
|
|
12540
|
+
if (!isPathMap) emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false);
|
|
12579
12541
|
} else throwInvalidSubpath(request, match, packageJsonUrl, internal, base);
|
|
12580
12542
|
}
|
|
12581
12543
|
if (pattern) return new url.URL(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));
|
|
@@ -12751,10 +12713,9 @@ function parsePackageName(specifier, base) {
|
|
|
12751
12713
|
const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);
|
|
12752
12714
|
if (invalidPackageNameRegEx.exec(packageName) !== null) validPackageName = false;
|
|
12753
12715
|
if (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER(specifier, "is not a valid package name", (0, url.fileURLToPath)(base));
|
|
12754
|
-
const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex));
|
|
12755
12716
|
return {
|
|
12756
12717
|
packageName,
|
|
12757
|
-
packageSubpath,
|
|
12718
|
+
packageSubpath: "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)),
|
|
12758
12719
|
isScoped
|
|
12759
12720
|
};
|
|
12760
12721
|
}
|
|
@@ -12945,8 +12906,7 @@ function getSearchFunction(stopDirectory) {
|
|
|
12945
12906
|
}
|
|
12946
12907
|
function searchPrettierConfig(startDirectory, options8 = {}) {
|
|
12947
12908
|
startDirectory = startDirectory ? path.default.resolve(startDirectory) : process.cwd();
|
|
12948
|
-
|
|
12949
|
-
return getSearchFunction(stopDirectory)(startDirectory, { cache: options8.shouldCache });
|
|
12909
|
+
return getSearchFunction(mockable_default.getPrettierConfigSearchStopDirectory())(startDirectory, { cache: options8.shouldCache });
|
|
12950
12910
|
}
|
|
12951
12911
|
function clearCache() {
|
|
12952
12912
|
clearPrettierConfigCache();
|
|
@@ -12960,10 +12920,7 @@ function loadEditorconfig2(file, options8) {
|
|
|
12960
12920
|
async function loadPrettierConfig2(file, options8) {
|
|
12961
12921
|
const shouldCache = options8.useCache;
|
|
12962
12922
|
let configFile = options8.config;
|
|
12963
|
-
if (!configFile) {
|
|
12964
|
-
const directory = file ? path.default.dirname(path.default.resolve(file)) : void 0;
|
|
12965
|
-
configFile = await searchPrettierConfig(directory, { shouldCache });
|
|
12966
|
-
}
|
|
12923
|
+
if (!configFile) configFile = await searchPrettierConfig(file ? path.default.dirname(path.default.resolve(file)) : void 0, { shouldCache });
|
|
12967
12924
|
if (!configFile) return;
|
|
12968
12925
|
configFile = toPath(configFile);
|
|
12969
12926
|
return {
|
|
@@ -12987,8 +12944,7 @@ async function resolveConfig(fileUrlOrPath, options8) {
|
|
|
12987
12944
|
return merged;
|
|
12988
12945
|
}
|
|
12989
12946
|
async function resolveConfigFile(fileUrlOrPath) {
|
|
12990
|
-
|
|
12991
|
-
return await searchPrettierConfig(directory, { shouldCache: false }) ?? null;
|
|
12947
|
+
return await searchPrettierConfig(fileUrlOrPath ? path.default.dirname(path.default.resolve(toPath(fileUrlOrPath))) : void 0, { shouldCache: false }) ?? null;
|
|
12992
12948
|
}
|
|
12993
12949
|
function mergeOverrides(configResult, filePath) {
|
|
12994
12950
|
const { config, configFile } = configResult || {};
|
|
@@ -13136,14 +13092,14 @@ function traverseDoc(doc2, onEnter, onExit, shouldTraverseConditionalGroups) {
|
|
|
13136
13092
|
case DOC_TYPE_ARRAY:
|
|
13137
13093
|
case DOC_TYPE_FILL: {
|
|
13138
13094
|
const parts = docType === DOC_TYPE_ARRAY ? doc3 : doc3.parts;
|
|
13139
|
-
for (let
|
|
13095
|
+
for (let i = parts.length - 1; i >= 0; --i) docsStack.push(parts[i]);
|
|
13140
13096
|
break;
|
|
13141
13097
|
}
|
|
13142
13098
|
case DOC_TYPE_IF_BREAK:
|
|
13143
13099
|
docsStack.push(doc3.flatContents, doc3.breakContents);
|
|
13144
13100
|
break;
|
|
13145
13101
|
case DOC_TYPE_GROUP:
|
|
13146
|
-
if (shouldTraverseConditionalGroups && doc3.expandedStates) for (let
|
|
13102
|
+
if (shouldTraverseConditionalGroups && doc3.expandedStates) for (let i = doc3.expandedStates.length - 1; i >= 0; --i) docsStack.push(doc3.expandedStates[i]);
|
|
13147
13103
|
else docsStack.push(doc3.contents);
|
|
13148
13104
|
break;
|
|
13149
13105
|
case DOC_TYPE_ALIGN:
|
|
@@ -13767,11 +13723,10 @@ function printDocToString(doc2, options8) {
|
|
|
13767
13723
|
});
|
|
13768
13724
|
break;
|
|
13769
13725
|
} else {
|
|
13770
|
-
const state = doc3.expandedStates[i];
|
|
13771
13726
|
const cmd = {
|
|
13772
13727
|
ind,
|
|
13773
13728
|
mode: MODE_FLAT,
|
|
13774
|
-
doc:
|
|
13729
|
+
doc: doc3.expandedStates[i]
|
|
13775
13730
|
};
|
|
13776
13731
|
if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) {
|
|
13777
13732
|
cmds.push(cmd);
|
|
@@ -14218,8 +14173,7 @@ function skipNewline(text, startIndex, options8) {
|
|
|
14218
14173
|
var skip_newline_default = skipNewline;
|
|
14219
14174
|
function hasNewline(text, startIndex, options8 = {}) {
|
|
14220
14175
|
const idx = skipSpaces(text, options8.backwards ? startIndex - 1 : startIndex, options8);
|
|
14221
|
-
|
|
14222
|
-
return idx !== idx2;
|
|
14176
|
+
return idx !== skip_newline_default(text, idx, options8);
|
|
14223
14177
|
}
|
|
14224
14178
|
var has_newline_default = hasNewline;
|
|
14225
14179
|
function isNonEmptyArray(object) {
|
|
@@ -14461,18 +14415,15 @@ function printTrailingComment(path14, options8, previousComment) {
|
|
|
14461
14415
|
const printed = printComment(path14, options8);
|
|
14462
14416
|
const { printer: printer$1, originalText, locStart } = options8;
|
|
14463
14417
|
const isBlock = (_a = printer$1.isBlockComment) == null ? void 0 : _a.call(printer$1, comment);
|
|
14464
|
-
if ((previousComment == null ? void 0 : previousComment.hasLineSuffix) && !(previousComment == null ? void 0 : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) {
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
hasLineSuffix: true
|
|
14474
|
-
};
|
|
14475
|
-
}
|
|
14418
|
+
if ((previousComment == null ? void 0 : previousComment.hasLineSuffix) && !(previousComment == null ? void 0 : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) return {
|
|
14419
|
+
doc: lineSuffix([
|
|
14420
|
+
hardline,
|
|
14421
|
+
is_previous_line_empty_default(originalText, locStart(comment)) ? hardline : "",
|
|
14422
|
+
printed
|
|
14423
|
+
]),
|
|
14424
|
+
isBlock,
|
|
14425
|
+
hasLineSuffix: true
|
|
14426
|
+
};
|
|
14476
14427
|
if (!isBlock || (previousComment == null ? void 0 : previousComment.hasLineSuffix)) return {
|
|
14477
14428
|
doc: [lineSuffix([" ", printed]), breakParent],
|
|
14478
14429
|
isBlock,
|
|
@@ -14897,11 +14848,10 @@ function normalizeOptions(options8, optionInfos, { logger = false, isCLI = false
|
|
|
14897
14848
|
schemas: schemas2
|
|
14898
14849
|
});
|
|
14899
14850
|
} : Array.isArray(passThrough) ? (key2, value) => !passThrough.includes(key2) ? void 0 : { [key2]: value } : (key2, value) => ({ [key2]: value });
|
|
14900
|
-
const
|
|
14851
|
+
const normalizer = new Normalizer(optionInfosToSchemas(optionInfos, {
|
|
14901
14852
|
isCLI,
|
|
14902
14853
|
FlagSchema
|
|
14903
|
-
})
|
|
14904
|
-
const normalizer = new Normalizer(schemas, {
|
|
14854
|
+
}), {
|
|
14905
14855
|
logger,
|
|
14906
14856
|
unknown,
|
|
14907
14857
|
descriptor
|
|
@@ -15001,19 +14951,16 @@ function getParserPluginByParserName(plugins, parserName) {
|
|
|
15001
14951
|
if (!parserName) throw new Error("parserName is required.");
|
|
15002
14952
|
const plugin = array_find_last_default(false, plugins, (plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName));
|
|
15003
14953
|
if (plugin) return plugin;
|
|
15004
|
-
|
|
15005
|
-
throw new ConfigError(message);
|
|
14954
|
+
throw new ConfigError(`Couldn't resolve parser "${parserName}".`);
|
|
15006
14955
|
}
|
|
15007
14956
|
function getPrinterPluginByAstFormat(plugins, astFormat) {
|
|
15008
14957
|
if (!astFormat) throw new Error("astFormat is required.");
|
|
15009
14958
|
const plugin = array_find_last_default(false, plugins, (plugin2) => plugin2.printers && Object.prototype.hasOwnProperty.call(plugin2.printers, astFormat));
|
|
15010
14959
|
if (plugin) return plugin;
|
|
15011
|
-
|
|
15012
|
-
throw new ConfigError(message);
|
|
14960
|
+
throw new ConfigError(`Couldn't find plugin for AST format "${astFormat}".`);
|
|
15013
14961
|
}
|
|
15014
14962
|
function resolveParser({ plugins, parser }) {
|
|
15015
|
-
|
|
15016
|
-
return initParser(plugin, parser);
|
|
14963
|
+
return initParser(getParserPluginByParserName(plugins, parser), parser);
|
|
15017
14964
|
}
|
|
15018
14965
|
function initParser(plugin, parserName) {
|
|
15019
14966
|
const parserOrParserInitFunction = plugin.parsers[parserName];
|
|
@@ -15141,8 +15088,7 @@ async function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc2
|
|
|
15141
15088
|
rangeEnd: void 0
|
|
15142
15089
|
}, { passThrough: true });
|
|
15143
15090
|
const { ast } = await parse_default(text, options8);
|
|
15144
|
-
|
|
15145
|
-
return stripTrailingHardline(doc2);
|
|
15091
|
+
return stripTrailingHardline(await printAstToDoc2(ast, options8));
|
|
15146
15092
|
}
|
|
15147
15093
|
function printIgnored(path14, options8) {
|
|
15148
15094
|
const { originalText, [Symbol.for("comments")]: comments, locStart, locEnd, [Symbol.for("printedComments")]: printedComments } = options8;
|
|
@@ -15487,8 +15433,7 @@ async function coreFormat(originalText, opts, addAlignmentSize = 0) {
|
|
|
15487
15433
|
};
|
|
15488
15434
|
const oldCursorNodeCharArray = oldCursorRegionText.split("");
|
|
15489
15435
|
oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorRegionStart, 0, CURSOR);
|
|
15490
|
-
const
|
|
15491
|
-
const cursorNodeDiff = diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray);
|
|
15436
|
+
const cursorNodeDiff = diffArrays(oldCursorNodeCharArray, newCursorRegionText.split(""));
|
|
15492
15437
|
let cursorOffset = newCursorRegionStart;
|
|
15493
15438
|
for (const entry of cursorNodeDiff) if (entry.removed) {
|
|
15494
15439
|
if (entry.value.includes(CURSOR)) break;
|
|
@@ -15619,12 +15564,10 @@ async function parse6(originalText, originalOptions, devOptions) {
|
|
|
15619
15564
|
}
|
|
15620
15565
|
async function formatAst(ast, options8) {
|
|
15621
15566
|
options8 = await normalize_format_options_default(options8);
|
|
15622
|
-
|
|
15623
|
-
return printDocToString(doc2, options8);
|
|
15567
|
+
return printDocToString(await printAstToDoc(ast, options8), options8);
|
|
15624
15568
|
}
|
|
15625
15569
|
async function formatDoc(doc2, options8) {
|
|
15626
|
-
const
|
|
15627
|
-
const { formatted } = await formatWithCursor(text, {
|
|
15570
|
+
const { formatted } = await formatWithCursor(printDocToDebug(doc2), {
|
|
15628
15571
|
...options8,
|
|
15629
15572
|
parser: "__js_expression"
|
|
15630
15573
|
});
|
|
@@ -16420,11 +16363,11 @@ var languages = [
|
|
|
16420
16363
|
];
|
|
16421
16364
|
var { parsers, printers } = createParsersAndPrinters([
|
|
16422
16365
|
{
|
|
16423
|
-
importPlugin: () => Promise.resolve().then(() => require("./acorn-
|
|
16366
|
+
importPlugin: () => Promise.resolve().then(() => require("./acorn-BAVXZMtK.cjs")),
|
|
16424
16367
|
parsers: ["acorn", "espree"]
|
|
16425
16368
|
},
|
|
16426
16369
|
{
|
|
16427
|
-
importPlugin: () => Promise.resolve().then(() => require("./angular-
|
|
16370
|
+
importPlugin: () => Promise.resolve().then(() => require("./angular-Bp0XO9db.cjs")),
|
|
16428
16371
|
parsers: [
|
|
16429
16372
|
"__ng_action",
|
|
16430
16373
|
"__ng_binding",
|
|
@@ -16433,7 +16376,7 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
16433
16376
|
]
|
|
16434
16377
|
},
|
|
16435
16378
|
{
|
|
16436
|
-
importPlugin: () => Promise.resolve().then(() => require("./babel-
|
|
16379
|
+
importPlugin: () => Promise.resolve().then(() => require("./babel-NI0v59ga.cjs")),
|
|
16437
16380
|
parsers: [
|
|
16438
16381
|
"babel",
|
|
16439
16382
|
"babel-flow",
|
|
@@ -16452,25 +16395,25 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
16452
16395
|
]
|
|
16453
16396
|
},
|
|
16454
16397
|
{
|
|
16455
|
-
importPlugin: () => Promise.resolve().then(() => require("./estree-
|
|
16398
|
+
importPlugin: () => Promise.resolve().then(() => require("./estree-C3BZPlpU.cjs")),
|
|
16456
16399
|
printers: ["estree", "estree-json"]
|
|
16457
16400
|
},
|
|
16458
16401
|
{
|
|
16459
|
-
importPlugin: () => Promise.resolve().then(() => require("./flow-
|
|
16402
|
+
importPlugin: () => Promise.resolve().then(() => require("./flow-CWUBUkoi.cjs")),
|
|
16460
16403
|
parsers: ["flow"]
|
|
16461
16404
|
},
|
|
16462
16405
|
{
|
|
16463
|
-
importPlugin: () => Promise.resolve().then(() => require("./glimmer-
|
|
16406
|
+
importPlugin: () => Promise.resolve().then(() => require("./glimmer-CX9OqG1j.cjs")),
|
|
16464
16407
|
parsers: ["glimmer"],
|
|
16465
16408
|
printers: ["glimmer"]
|
|
16466
16409
|
},
|
|
16467
16410
|
{
|
|
16468
|
-
importPlugin: () => Promise.resolve().then(() => require("./graphql-
|
|
16411
|
+
importPlugin: () => Promise.resolve().then(() => require("./graphql-GOxQAKxM.cjs")),
|
|
16469
16412
|
parsers: ["graphql"],
|
|
16470
16413
|
printers: ["graphql"]
|
|
16471
16414
|
},
|
|
16472
16415
|
{
|
|
16473
|
-
importPlugin: () => Promise.resolve().then(() => require("./html-
|
|
16416
|
+
importPlugin: () => Promise.resolve().then(() => require("./html-CWrdYAhQ.cjs")),
|
|
16474
16417
|
parsers: [
|
|
16475
16418
|
"html",
|
|
16476
16419
|
"angular",
|
|
@@ -16481,7 +16424,7 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
16481
16424
|
printers: ["html"]
|
|
16482
16425
|
},
|
|
16483
16426
|
{
|
|
16484
|
-
importPlugin: () => Promise.resolve().then(() => require("./markdown-
|
|
16427
|
+
importPlugin: () => Promise.resolve().then(() => require("./markdown-pzqiRmft.cjs")),
|
|
16485
16428
|
parsers: [
|
|
16486
16429
|
"markdown",
|
|
16487
16430
|
"mdx",
|
|
@@ -16490,11 +16433,11 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
16490
16433
|
printers: ["mdast"]
|
|
16491
16434
|
},
|
|
16492
16435
|
{
|
|
16493
|
-
importPlugin: () => Promise.resolve().then(() => require("./meriyah-
|
|
16436
|
+
importPlugin: () => Promise.resolve().then(() => require("./meriyah-D_x7itbT.cjs")),
|
|
16494
16437
|
parsers: ["meriyah"]
|
|
16495
16438
|
},
|
|
16496
16439
|
{
|
|
16497
|
-
importPlugin: () => Promise.resolve().then(() => require("./postcss-
|
|
16440
|
+
importPlugin: () => Promise.resolve().then(() => require("./postcss-B_c2wbFu.cjs")),
|
|
16498
16441
|
parsers: [
|
|
16499
16442
|
"css",
|
|
16500
16443
|
"less",
|
|
@@ -16503,11 +16446,11 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
16503
16446
|
printers: ["postcss"]
|
|
16504
16447
|
},
|
|
16505
16448
|
{
|
|
16506
|
-
importPlugin: () => Promise.resolve().then(() => require("./typescript-
|
|
16449
|
+
importPlugin: () => Promise.resolve().then(() => require("./typescript-C5hce4HG.cjs")),
|
|
16507
16450
|
parsers: ["typescript"]
|
|
16508
16451
|
},
|
|
16509
16452
|
{
|
|
16510
|
-
importPlugin: () => Promise.resolve().then(() => require("./yaml-
|
|
16453
|
+
importPlugin: () => Promise.resolve().then(() => require("./yaml-DZs6MhV1.cjs")),
|
|
16511
16454
|
parsers: ["yaml"],
|
|
16512
16455
|
printers: ["yaml"]
|
|
16513
16456
|
}
|
|
@@ -16721,13 +16664,12 @@ function hasSpaces(text, startIndex, options8 = {}) {
|
|
|
16721
16664
|
var has_spaces_default = hasSpaces;
|
|
16722
16665
|
function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
|
|
16723
16666
|
const otherQuote = enclosingQuote === "\"" ? "'" : "\"";
|
|
16724
|
-
|
|
16667
|
+
return enclosingQuote + string_replace_all_default(false, rawText, /\\(.)|(["'])/gsu, (match, escaped, quote) => {
|
|
16725
16668
|
if (escaped === otherQuote) return escaped;
|
|
16726
16669
|
if (quote === enclosingQuote) return "\\" + quote;
|
|
16727
16670
|
if (quote) return quote;
|
|
16728
16671
|
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped;
|
|
16729
|
-
});
|
|
16730
|
-
return enclosingQuote + raw + enclosingQuote;
|
|
16672
|
+
}) + enclosingQuote;
|
|
16731
16673
|
}
|
|
16732
16674
|
var make_string_default = makeString;
|
|
16733
16675
|
function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
|
|
@@ -16837,10 +16779,10 @@ const mockedLogger = {
|
|
|
16837
16779
|
};
|
|
16838
16780
|
const createMockedPluginManager = (name) => ({
|
|
16839
16781
|
resolveName: (result) => {
|
|
16840
|
-
if (result.type === "file") return
|
|
16841
|
-
if (result.type === "type") return
|
|
16842
|
-
if (result.type === "function") return
|
|
16843
|
-
return
|
|
16782
|
+
if (result.type === "file") return require_casing.camelCase(name || result.name);
|
|
16783
|
+
if (result.type === "type") return require_casing.pascalCase(result.name);
|
|
16784
|
+
if (result.type === "function") return require_casing.camelCase(result.name);
|
|
16785
|
+
return require_casing.camelCase(result.name);
|
|
16844
16786
|
},
|
|
16845
16787
|
config: { output: { path: "./path" } },
|
|
16846
16788
|
resolvePath: ({ baseName }) => baseName,
|
|
@@ -16864,8 +16806,9 @@ const createMockedPluginManager = (name) => ({
|
|
|
16864
16806
|
const mockedPluginManager = createMockedPluginManager("");
|
|
16865
16807
|
async function matchFiles(files, pre) {
|
|
16866
16808
|
if (!files) return;
|
|
16809
|
+
const fileProcessor = new __kubb_fabric_core.FileProcessor();
|
|
16867
16810
|
for await (const file of files) {
|
|
16868
|
-
const source$1 = await
|
|
16811
|
+
const source$1 = await fileProcessor.parse((0, __kubb_fabric_core.createFile)(file));
|
|
16869
16812
|
let code = source$1;
|
|
16870
16813
|
if (!file.baseName.endsWith(".json")) code = await format(source$1);
|
|
16871
16814
|
await expect(code).toMatchFileSnapshot(node_path.default.join(...[
|