@dcloudio/uni-cli-shared 3.0.0-alpha-5000720260416001 → 3.0.0-alpha-5000820260420001
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/constants.d.ts +1 -3
- package/dist/constants.js +2 -6
- package/dist/deps.d.ts +1 -0
- package/dist/deps.js +22 -13
- package/dist/dom2/fontFamily.d.ts +4 -0
- package/dist/dom2/fontFamily.js +21 -0
- package/dist/dom2/index.d.ts +2 -0
- package/dist/dom2/index.js +2 -0
- package/dist/dom2/sharedData.d.ts +4 -0
- package/dist/dom2/sharedData.js +38 -5
- package/dist/dom2/vue.d.ts +15 -0
- package/dist/dom2/vue.js +41 -0
- package/dist/easycom.js +13 -9
- package/dist/env/define.d.ts +0 -1
- package/dist/env/define.js +3 -11
- package/dist/hbx/alias.js +48 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json/uni-x/manifest.d.ts +1 -1
- package/dist/json/uni-x/manifest.js +2 -1
- package/dist/json/utils.js +24 -0
- package/dist/messages/en.d.ts +2 -0
- package/dist/messages/en.js +2 -0
- package/dist/messages/index.d.ts +4 -0
- package/dist/messages/zh_CN.d.ts +2 -0
- package/dist/messages/zh_CN.js +2 -0
- package/dist/uni_modules.cloud.js +28 -13
- package/dist/uni_modules.js +3 -2
- package/dist/uts.js +4 -2
- package/dist/vite/autoImport.js +7 -4
- package/dist/vite/cloud.js +13 -6
- package/dist/vite/extApi.js +4 -1
- package/dist/vite/plugins/json.js +2 -69
- package/dist/vite/plugins/stats.js +2 -1
- package/dist/vite/plugins/uts/uni_modules.js +7 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +6 -4
- package/dist/workers.js +2 -0
- package/dist/x.d.ts +10 -0
- package/dist/x.js +39 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +0 -7
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +0 -7
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +1 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +348 -120
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +99 -56
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +70 -47
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +127 -107
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +70 -48
- package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-beta.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -12025,7 +12025,7 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
|
|
|
12025
12025
|
if (!userPlugins || !userPlugins.some((p) => p === "importAssertions" || p === "importAttributes" || (0, _vue_shared.isArray)(p) && p[0] === "importAttributes")) plugins.push("importAttributes");
|
|
12026
12026
|
if (lang === "jsx" || lang === "tsx" || lang === "mtsx") plugins.push("jsx");
|
|
12027
12027
|
else if (userPlugins) userPlugins = userPlugins.filter((p) => p !== "jsx");
|
|
12028
|
-
if (lang === "uts" || lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
|
|
12028
|
+
if (lang === "uts" || lang === "ts" || lang === "mts" || lang === "tsx" || lang === "cts" || lang === "mtsx") {
|
|
12029
12029
|
plugins.push(["typescript", { dts }], "explicitResourceManagement");
|
|
12030
12030
|
if (!userPlugins || !userPlugins.includes("decorators")) plugins.push("decorators-legacy");
|
|
12031
12031
|
}
|
|
@@ -12332,7 +12332,7 @@ function expand_(str, max, isTop) {
|
|
|
12332
12332
|
}
|
|
12333
12333
|
|
|
12334
12334
|
//#endregion
|
|
12335
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
12335
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
12336
12336
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
12337
12337
|
const assertValidPattern = (pattern) => {
|
|
12338
12338
|
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
@@ -12340,7 +12340,7 @@ const assertValidPattern = (pattern) => {
|
|
|
12340
12340
|
};
|
|
12341
12341
|
|
|
12342
12342
|
//#endregion
|
|
12343
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
12343
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/brace-expressions.js
|
|
12344
12344
|
const posixClasses = {
|
|
12345
12345
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
12346
12346
|
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
@@ -12462,7 +12462,7 @@ const parseClass = (glob, position) => {
|
|
|
12462
12462
|
};
|
|
12463
12463
|
|
|
12464
12464
|
//#endregion
|
|
12465
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
12465
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/unescape.js
|
|
12466
12466
|
/**
|
|
12467
12467
|
* Un-escape a string that has been escaped with {@link escape}.
|
|
12468
12468
|
*
|
|
@@ -12488,8 +12488,10 @@ const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}
|
|
|
12488
12488
|
};
|
|
12489
12489
|
|
|
12490
12490
|
//#endregion
|
|
12491
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
12491
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/ast.js
|
|
12492
12492
|
var _AST;
|
|
12493
|
+
let _Symbol$for;
|
|
12494
|
+
var _a;
|
|
12493
12495
|
const types = new Set([
|
|
12494
12496
|
"!",
|
|
12495
12497
|
"?",
|
|
@@ -12498,6 +12500,53 @@ const types = new Set([
|
|
|
12498
12500
|
"@"
|
|
12499
12501
|
]);
|
|
12500
12502
|
const isExtglobType = (c) => types.has(c);
|
|
12503
|
+
const isExtglobAST = (c) => isExtglobType(c.type);
|
|
12504
|
+
const adoptionMap = new Map([
|
|
12505
|
+
["!", ["@"]],
|
|
12506
|
+
["?", ["?", "@"]],
|
|
12507
|
+
["@", ["@"]],
|
|
12508
|
+
["*", [
|
|
12509
|
+
"*",
|
|
12510
|
+
"+",
|
|
12511
|
+
"?",
|
|
12512
|
+
"@"
|
|
12513
|
+
]],
|
|
12514
|
+
["+", ["+", "@"]]
|
|
12515
|
+
]);
|
|
12516
|
+
const adoptionWithSpaceMap = new Map([
|
|
12517
|
+
["!", ["?"]],
|
|
12518
|
+
["@", ["?"]],
|
|
12519
|
+
["+", ["?", "*"]]
|
|
12520
|
+
]);
|
|
12521
|
+
const adoptionAnyMap = new Map([
|
|
12522
|
+
["!", ["?", "@"]],
|
|
12523
|
+
["?", ["?", "@"]],
|
|
12524
|
+
["@", ["?", "@"]],
|
|
12525
|
+
["*", [
|
|
12526
|
+
"*",
|
|
12527
|
+
"+",
|
|
12528
|
+
"?",
|
|
12529
|
+
"@"
|
|
12530
|
+
]],
|
|
12531
|
+
["+", [
|
|
12532
|
+
"+",
|
|
12533
|
+
"@",
|
|
12534
|
+
"?",
|
|
12535
|
+
"*"
|
|
12536
|
+
]]
|
|
12537
|
+
]);
|
|
12538
|
+
const usurpMap = new Map([
|
|
12539
|
+
["!", new Map([["!", "@"]])],
|
|
12540
|
+
["?", new Map([["*", "*"], ["+", "*"]])],
|
|
12541
|
+
["@", new Map([
|
|
12542
|
+
["!", "!"],
|
|
12543
|
+
["?", "?"],
|
|
12544
|
+
["@", "@"],
|
|
12545
|
+
["*", "*"],
|
|
12546
|
+
["+", "+"]
|
|
12547
|
+
])],
|
|
12548
|
+
["+", new Map([["?", "*"], ["*", "*"]])]
|
|
12549
|
+
]);
|
|
12501
12550
|
const startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
12502
12551
|
const startNoDot = "(?!\\.)";
|
|
12503
12552
|
const addPatternStart = new Set(["[", "."]);
|
|
@@ -12507,6 +12556,7 @@ const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
|
12507
12556
|
const qmark = "[^/]";
|
|
12508
12557
|
const star$1 = qmark + "*?";
|
|
12509
12558
|
const starNoEmpty = qmark + "+?";
|
|
12559
|
+
let ID = 0;
|
|
12510
12560
|
var _root = /* @__PURE__ */ new WeakMap();
|
|
12511
12561
|
var _hasMagic2 = /* @__PURE__ */ new WeakMap();
|
|
12512
12562
|
var _uflag = /* @__PURE__ */ new WeakMap();
|
|
@@ -12519,7 +12569,25 @@ var _options = /* @__PURE__ */ new WeakMap();
|
|
|
12519
12569
|
var _toString = /* @__PURE__ */ new WeakMap();
|
|
12520
12570
|
var _emptyExt = /* @__PURE__ */ new WeakMap();
|
|
12521
12571
|
var _AST_brand = /* @__PURE__ */ new WeakSet();
|
|
12572
|
+
_Symbol$for = Symbol.for("nodejs.util.inspect.custom");
|
|
12522
12573
|
var AST = class AST {
|
|
12574
|
+
get depth() {
|
|
12575
|
+
var _this$parent$depth, _classPrivateFieldGet2$1;
|
|
12576
|
+
return ((_this$parent$depth = (_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet2$1 === void 0 ? void 0 : _classPrivateFieldGet2$1.depth) !== null && _this$parent$depth !== void 0 ? _this$parent$depth : -1) + 1;
|
|
12577
|
+
}
|
|
12578
|
+
[_Symbol$for]() {
|
|
12579
|
+
var _classPrivateFieldGet3;
|
|
12580
|
+
return {
|
|
12581
|
+
"@@type": "AST",
|
|
12582
|
+
id: this.id,
|
|
12583
|
+
type: this.type,
|
|
12584
|
+
root: _classPrivateFieldGet2(_root, this).id,
|
|
12585
|
+
parent: (_classPrivateFieldGet3 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.id,
|
|
12586
|
+
depth: this.depth,
|
|
12587
|
+
partsLength: _classPrivateFieldGet2(_parts, this).length,
|
|
12588
|
+
parts: _classPrivateFieldGet2(_parts, this)
|
|
12589
|
+
};
|
|
12590
|
+
}
|
|
12523
12591
|
constructor(type, parent, options = {}) {
|
|
12524
12592
|
_classPrivateMethodInitSpec(this, _AST_brand);
|
|
12525
12593
|
_classPrivateFieldInitSpec(this, _root, void 0);
|
|
@@ -12533,6 +12601,7 @@ var AST = class AST {
|
|
|
12533
12601
|
_classPrivateFieldInitSpec(this, _options, void 0);
|
|
12534
12602
|
_classPrivateFieldInitSpec(this, _toString, void 0);
|
|
12535
12603
|
_classPrivateFieldInitSpec(this, _emptyExt, false);
|
|
12604
|
+
this.id = ++ID;
|
|
12536
12605
|
this.type = type;
|
|
12537
12606
|
if (type) _classPrivateFieldSet2(_hasMagic2, this, true);
|
|
12538
12607
|
_classPrivateFieldSet2(_parent, this, parent);
|
|
@@ -12561,36 +12630,36 @@ var AST = class AST {
|
|
|
12561
12630
|
for (const p of parts) {
|
|
12562
12631
|
if (p === "") continue;
|
|
12563
12632
|
/* c8 ignore start */
|
|
12564
|
-
if (typeof p !== "string" && !(p instanceof
|
|
12633
|
+
if (typeof p !== "string" && !(p instanceof _a && _classPrivateFieldGet2(_parent, p) === this)) throw new Error("invalid part: " + p);
|
|
12565
12634
|
/* c8 ignore stop */
|
|
12566
12635
|
_classPrivateFieldGet2(_parts, this).push(p);
|
|
12567
12636
|
}
|
|
12568
12637
|
}
|
|
12569
12638
|
toJSON() {
|
|
12570
|
-
var
|
|
12639
|
+
var _classPrivateFieldGet4;
|
|
12571
12640
|
const ret = this.type === null ? _classPrivateFieldGet2(_parts, this).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ..._classPrivateFieldGet2(_parts, this).map((p) => p.toJSON())];
|
|
12572
12641
|
if (this.isStart() && !this.type) ret.unshift([]);
|
|
12573
|
-
if (this.isEnd() && (this === _classPrivateFieldGet2(_root, this) || _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((
|
|
12642
|
+
if (this.isEnd() && (this === _classPrivateFieldGet2(_root, this) || _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet4 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.type) === "!")) ret.push({});
|
|
12574
12643
|
return ret;
|
|
12575
12644
|
}
|
|
12576
12645
|
isStart() {
|
|
12577
|
-
var
|
|
12646
|
+
var _classPrivateFieldGet5;
|
|
12578
12647
|
if (_classPrivateFieldGet2(_root, this) === this) return true;
|
|
12579
|
-
if (!((
|
|
12648
|
+
if (!((_classPrivateFieldGet5 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.isStart())) return false;
|
|
12580
12649
|
if (_classPrivateFieldGet2(_parentIndex, this) === 0) return true;
|
|
12581
12650
|
const p = _classPrivateFieldGet2(_parent, this);
|
|
12582
12651
|
for (let i = 0; i < _classPrivateFieldGet2(_parentIndex, this); i++) {
|
|
12583
12652
|
const pp = _classPrivateFieldGet2(_parts, p)[i];
|
|
12584
|
-
if (!(pp instanceof
|
|
12653
|
+
if (!(pp instanceof _a && pp.type === "!")) return false;
|
|
12585
12654
|
}
|
|
12586
12655
|
return true;
|
|
12587
12656
|
}
|
|
12588
12657
|
isEnd() {
|
|
12589
|
-
var
|
|
12658
|
+
var _classPrivateFieldGet6, _classPrivateFieldGet7, _classPrivateFieldGet8;
|
|
12590
12659
|
if (_classPrivateFieldGet2(_root, this) === this) return true;
|
|
12591
|
-
if (((
|
|
12592
|
-
if (!((
|
|
12593
|
-
if (!this.type) return (
|
|
12660
|
+
if (((_classPrivateFieldGet6 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.type) === "!") return true;
|
|
12661
|
+
if (!((_classPrivateFieldGet7 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet7 === void 0 ? void 0 : _classPrivateFieldGet7.isEnd())) return false;
|
|
12662
|
+
if (!this.type) return (_classPrivateFieldGet8 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet8 === void 0 ? void 0 : _classPrivateFieldGet8.isEnd();
|
|
12594
12663
|
/* c8 ignore start */
|
|
12595
12664
|
const pl = _classPrivateFieldGet2(_parent, this) ? _classPrivateFieldGet2(_parts, _classPrivateFieldGet2(_parent, this)).length : 0;
|
|
12596
12665
|
/* c8 ignore stop */
|
|
@@ -12601,13 +12670,13 @@ var AST = class AST {
|
|
|
12601
12670
|
else this.push(part.clone(this));
|
|
12602
12671
|
}
|
|
12603
12672
|
clone(parent) {
|
|
12604
|
-
const c = new
|
|
12673
|
+
const c = new _a(this.type, parent);
|
|
12605
12674
|
for (const p of _classPrivateFieldGet2(_parts, this)) c.copyIn(p);
|
|
12606
12675
|
return c;
|
|
12607
12676
|
}
|
|
12608
12677
|
static fromGlob(pattern, options = {}) {
|
|
12609
|
-
const ast = new
|
|
12610
|
-
_parseAST.call(
|
|
12678
|
+
const ast = new _a(null, void 0, options);
|
|
12679
|
+
_assertClassBrand(AST, _a, _parseAST).call(_a, pattern, ast, 0, options, 0);
|
|
12611
12680
|
return ast;
|
|
12612
12681
|
}
|
|
12613
12682
|
toMMPattern() {
|
|
@@ -12628,12 +12697,15 @@ var AST = class AST {
|
|
|
12628
12697
|
}
|
|
12629
12698
|
toRegExpSource(allowDot) {
|
|
12630
12699
|
const dot = allowDot !== null && allowDot !== void 0 ? allowDot : !!_classPrivateFieldGet2(_options, this).dot;
|
|
12631
|
-
if (_classPrivateFieldGet2(_root, this) === this)
|
|
12632
|
-
|
|
12633
|
-
|
|
12700
|
+
if (_classPrivateFieldGet2(_root, this) === this) {
|
|
12701
|
+
_assertClassBrand(_AST_brand, this, _flatten).call(this);
|
|
12702
|
+
_assertClassBrand(_AST_brand, this, _fillNegs).call(this);
|
|
12703
|
+
}
|
|
12704
|
+
if (!isExtglobAST(this)) {
|
|
12705
|
+
var _classPrivateFieldGet9;
|
|
12634
12706
|
const noEmpty = this.isStart() && this.isEnd() && !_classPrivateFieldGet2(_parts, this).some((s) => typeof s !== "string");
|
|
12635
12707
|
const src = _classPrivateFieldGet2(_parts, this).map((p) => {
|
|
12636
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? _parseGlob.call(
|
|
12708
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? _assertClassBrand(AST, _a, _parseGlob).call(_a, p, _classPrivateFieldGet2(_hasMagic2, this), noEmpty) : p.toRegExpSource(allowDot);
|
|
12637
12709
|
_classPrivateFieldSet2(_hasMagic2, this, _classPrivateFieldGet2(_hasMagic2, this) || hasMagic);
|
|
12638
12710
|
_classPrivateFieldSet2(_uflag, this, _classPrivateFieldGet2(_uflag, this) || uflag);
|
|
12639
12711
|
return re;
|
|
@@ -12650,7 +12722,7 @@ var AST = class AST {
|
|
|
12650
12722
|
}
|
|
12651
12723
|
}
|
|
12652
12724
|
let end = "";
|
|
12653
|
-
if (this.isEnd() && _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((
|
|
12725
|
+
if (this.isEnd() && _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet9 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet9 === void 0 ? void 0 : _classPrivateFieldGet9.type) === "!") end = "(?:$|\\/)";
|
|
12654
12726
|
return [
|
|
12655
12727
|
start + src + end,
|
|
12656
12728
|
unescape(src),
|
|
@@ -12663,9 +12735,10 @@ var AST = class AST {
|
|
|
12663
12735
|
let body = _assertClassBrand(_AST_brand, this, _partsToRegExp).call(this, dot);
|
|
12664
12736
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
12665
12737
|
const s = this.toString();
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12738
|
+
const me = this;
|
|
12739
|
+
_classPrivateFieldSet2(_parts, me, [s]);
|
|
12740
|
+
me.type = null;
|
|
12741
|
+
_classPrivateFieldSet2(_hasMagic2, me, void 0);
|
|
12669
12742
|
return [
|
|
12670
12743
|
s,
|
|
12671
12744
|
unescape(this.toString()),
|
|
@@ -12716,7 +12789,9 @@ function _fillNegs() {
|
|
|
12716
12789
|
}
|
|
12717
12790
|
return this;
|
|
12718
12791
|
}
|
|
12719
|
-
function _parseAST(str, ast, pos, opt) {
|
|
12792
|
+
function _parseAST(str, ast, pos, opt, extDepth) {
|
|
12793
|
+
var _opt$maxExtglobRecurs;
|
|
12794
|
+
const maxDepth = (_opt$maxExtglobRecurs = opt.maxExtglobRecursion) !== null && _opt$maxExtglobRecurs !== void 0 ? _opt$maxExtglobRecurs : 2;
|
|
12720
12795
|
let escaping = false;
|
|
12721
12796
|
let inBrace = false;
|
|
12722
12797
|
let braceStart = -1;
|
|
@@ -12744,11 +12819,11 @@ function _parseAST(str, ast, pos, opt) {
|
|
|
12744
12819
|
acc += c;
|
|
12745
12820
|
continue;
|
|
12746
12821
|
}
|
|
12747
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(") {
|
|
12822
|
+
if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && extDepth <= maxDepth) {
|
|
12748
12823
|
ast.push(acc);
|
|
12749
12824
|
acc = "";
|
|
12750
|
-
const ext = new
|
|
12751
|
-
i = _parseAST.call(
|
|
12825
|
+
const ext = new _a(c, ast);
|
|
12826
|
+
i = _assertClassBrand(_AST, _a, _parseAST).call(_a, str, ext, i, opt, extDepth + 1);
|
|
12752
12827
|
ast.push(ext);
|
|
12753
12828
|
continue;
|
|
12754
12829
|
}
|
|
@@ -12758,7 +12833,7 @@ function _parseAST(str, ast, pos, opt) {
|
|
|
12758
12833
|
return i;
|
|
12759
12834
|
}
|
|
12760
12835
|
let i = pos + 1;
|
|
12761
|
-
let part = new
|
|
12836
|
+
let part = new _a(null, ast);
|
|
12762
12837
|
const parts = [];
|
|
12763
12838
|
let acc = "";
|
|
12764
12839
|
while (i < str.length) {
|
|
@@ -12781,19 +12856,21 @@ function _parseAST(str, ast, pos, opt) {
|
|
|
12781
12856
|
acc += c;
|
|
12782
12857
|
continue;
|
|
12783
12858
|
}
|
|
12784
|
-
|
|
12859
|
+
/* c8 ignore stop */
|
|
12860
|
+
if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && (extDepth <= maxDepth || ast && _assertClassBrand(_AST_brand, ast, _canAdoptType).call(ast, c))) {
|
|
12861
|
+
const depthAdd = ast && _assertClassBrand(_AST_brand, ast, _canAdoptType).call(ast, c) ? 0 : 1;
|
|
12785
12862
|
part.push(acc);
|
|
12786
12863
|
acc = "";
|
|
12787
|
-
const ext = new
|
|
12864
|
+
const ext = new _a(c, part);
|
|
12788
12865
|
part.push(ext);
|
|
12789
|
-
i = _parseAST.call(
|
|
12866
|
+
i = _assertClassBrand(_AST, _a, _parseAST).call(_a, str, ext, i, opt, extDepth + depthAdd);
|
|
12790
12867
|
continue;
|
|
12791
12868
|
}
|
|
12792
12869
|
if (c === "|") {
|
|
12793
12870
|
part.push(acc);
|
|
12794
12871
|
acc = "";
|
|
12795
12872
|
parts.push(part);
|
|
12796
|
-
part = new
|
|
12873
|
+
part = new _a(null, ast);
|
|
12797
12874
|
continue;
|
|
12798
12875
|
}
|
|
12799
12876
|
if (c === ")") {
|
|
@@ -12810,6 +12887,83 @@ function _parseAST(str, ast, pos, opt) {
|
|
|
12810
12887
|
_classPrivateFieldSet2(_parts, ast, [str.substring(pos - 1)]);
|
|
12811
12888
|
return i;
|
|
12812
12889
|
}
|
|
12890
|
+
function _canAdoptWithSpace(child) {
|
|
12891
|
+
return _assertClassBrand(_AST_brand, this, _canAdopt).call(this, child, adoptionWithSpaceMap);
|
|
12892
|
+
}
|
|
12893
|
+
function _canAdopt(child, map = adoptionMap) {
|
|
12894
|
+
if (!child || typeof child !== "object" || child.type !== null || _classPrivateFieldGet2(_parts, child).length !== 1 || this.type === null) return false;
|
|
12895
|
+
const gc = _classPrivateFieldGet2(_parts, child)[0];
|
|
12896
|
+
if (!gc || typeof gc !== "object" || gc.type === null) return false;
|
|
12897
|
+
return _assertClassBrand(_AST_brand, this, _canAdoptType).call(this, gc.type, map);
|
|
12898
|
+
}
|
|
12899
|
+
function _canAdoptType(c, map = adoptionAnyMap) {
|
|
12900
|
+
var _map$get;
|
|
12901
|
+
return !!((_map$get = map.get(this.type)) === null || _map$get === void 0 ? void 0 : _map$get.includes(c));
|
|
12902
|
+
}
|
|
12903
|
+
function _adoptWithSpace(child, index) {
|
|
12904
|
+
const gc = _classPrivateFieldGet2(_parts, child)[0];
|
|
12905
|
+
const blank = new _a(null, gc, this.options);
|
|
12906
|
+
_classPrivateFieldGet2(_parts, blank).push("");
|
|
12907
|
+
gc.push(blank);
|
|
12908
|
+
_assertClassBrand(_AST_brand, this, _adopt).call(this, child, index);
|
|
12909
|
+
}
|
|
12910
|
+
function _adopt(child, index) {
|
|
12911
|
+
const gc = _classPrivateFieldGet2(_parts, child)[0];
|
|
12912
|
+
_classPrivateFieldGet2(_parts, this).splice(index, 1, ..._classPrivateFieldGet2(_parts, gc));
|
|
12913
|
+
for (const p of _classPrivateFieldGet2(_parts, gc)) if (typeof p === "object") _classPrivateFieldSet2(_parent, p, this);
|
|
12914
|
+
_classPrivateFieldSet2(_toString, this, void 0);
|
|
12915
|
+
}
|
|
12916
|
+
function _canUsurpType(c) {
|
|
12917
|
+
const m = usurpMap.get(this.type);
|
|
12918
|
+
return !!(m === null || m === void 0 ? void 0 : m.has(c));
|
|
12919
|
+
}
|
|
12920
|
+
function _canUsurp(child) {
|
|
12921
|
+
if (!child || typeof child !== "object" || child.type !== null || _classPrivateFieldGet2(_parts, child).length !== 1 || this.type === null || _classPrivateFieldGet2(_parts, this).length !== 1) return false;
|
|
12922
|
+
const gc = _classPrivateFieldGet2(_parts, child)[0];
|
|
12923
|
+
if (!gc || typeof gc !== "object" || gc.type === null) return false;
|
|
12924
|
+
return _assertClassBrand(_AST_brand, this, _canUsurpType).call(this, gc.type);
|
|
12925
|
+
}
|
|
12926
|
+
function _usurp(child) {
|
|
12927
|
+
const m = usurpMap.get(this.type);
|
|
12928
|
+
const gc = _classPrivateFieldGet2(_parts, child)[0];
|
|
12929
|
+
const nt = m === null || m === void 0 ? void 0 : m.get(gc.type);
|
|
12930
|
+
/* c8 ignore start - impossible */
|
|
12931
|
+
if (!nt) return false;
|
|
12932
|
+
/* c8 ignore stop */
|
|
12933
|
+
_classPrivateFieldSet2(_parts, this, _classPrivateFieldGet2(_parts, gc));
|
|
12934
|
+
for (const p of _classPrivateFieldGet2(_parts, this)) if (typeof p === "object") _classPrivateFieldSet2(_parent, p, this);
|
|
12935
|
+
this.type = nt;
|
|
12936
|
+
_classPrivateFieldSet2(_toString, this, void 0);
|
|
12937
|
+
_classPrivateFieldSet2(_emptyExt, this, false);
|
|
12938
|
+
}
|
|
12939
|
+
function _flatten() {
|
|
12940
|
+
if (!isExtglobAST(this)) {
|
|
12941
|
+
for (const p of _classPrivateFieldGet2(_parts, this)) if (typeof p === "object") _assertClassBrand(_AST_brand, p, _flatten).call(p);
|
|
12942
|
+
} else {
|
|
12943
|
+
let iterations = 0;
|
|
12944
|
+
let done = false;
|
|
12945
|
+
do {
|
|
12946
|
+
done = true;
|
|
12947
|
+
for (let i = 0; i < _classPrivateFieldGet2(_parts, this).length; i++) {
|
|
12948
|
+
const c = _classPrivateFieldGet2(_parts, this)[i];
|
|
12949
|
+
if (typeof c === "object") {
|
|
12950
|
+
_assertClassBrand(_AST_brand, c, _flatten).call(c);
|
|
12951
|
+
if (_assertClassBrand(_AST_brand, this, _canAdopt).call(this, c)) {
|
|
12952
|
+
done = false;
|
|
12953
|
+
_assertClassBrand(_AST_brand, this, _adopt).call(this, c, i);
|
|
12954
|
+
} else if (_assertClassBrand(_AST_brand, this, _canAdoptWithSpace).call(this, c)) {
|
|
12955
|
+
done = false;
|
|
12956
|
+
_assertClassBrand(_AST_brand, this, _adoptWithSpace).call(this, c, i);
|
|
12957
|
+
} else if (_assertClassBrand(_AST_brand, this, _canUsurp).call(this, c)) {
|
|
12958
|
+
done = false;
|
|
12959
|
+
_assertClassBrand(_AST_brand, this, _usurp).call(this, c);
|
|
12960
|
+
}
|
|
12961
|
+
}
|
|
12962
|
+
}
|
|
12963
|
+
} while (!done && ++iterations < 10);
|
|
12964
|
+
}
|
|
12965
|
+
_classPrivateFieldSet2(_toString, this, void 0);
|
|
12966
|
+
}
|
|
12813
12967
|
function _partsToRegExp(dot) {
|
|
12814
12968
|
return _classPrivateFieldGet2(_parts, this).map((p) => {
|
|
12815
12969
|
/* c8 ignore start */
|
|
@@ -12824,6 +12978,7 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
|
|
|
12824
12978
|
let escaping = false;
|
|
12825
12979
|
let re = "";
|
|
12826
12980
|
let uflag = false;
|
|
12981
|
+
let inStar = false;
|
|
12827
12982
|
for (let i = 0; i < glob.length; i++) {
|
|
12828
12983
|
const c = glob.charAt(i);
|
|
12829
12984
|
if (escaping) {
|
|
@@ -12831,6 +12986,13 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
|
|
|
12831
12986
|
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
12832
12987
|
continue;
|
|
12833
12988
|
}
|
|
12989
|
+
if (c === "*") {
|
|
12990
|
+
if (inStar) continue;
|
|
12991
|
+
inStar = true;
|
|
12992
|
+
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star$1;
|
|
12993
|
+
hasMagic = true;
|
|
12994
|
+
continue;
|
|
12995
|
+
} else inStar = false;
|
|
12834
12996
|
if (c === "\\") {
|
|
12835
12997
|
if (i === glob.length - 1) re += "\\\\";
|
|
12836
12998
|
else escaping = true;
|
|
@@ -12846,11 +13008,6 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
|
|
|
12846
13008
|
continue;
|
|
12847
13009
|
}
|
|
12848
13010
|
}
|
|
12849
|
-
if (c === "*") {
|
|
12850
|
-
re += noEmpty && glob === "*" ? starNoEmpty : star$1;
|
|
12851
|
-
hasMagic = true;
|
|
12852
|
-
continue;
|
|
12853
|
-
}
|
|
12854
13011
|
if (c === "?") {
|
|
12855
13012
|
re += qmark;
|
|
12856
13013
|
hasMagic = true;
|
|
@@ -12865,9 +13022,10 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
|
|
|
12865
13022
|
uflag
|
|
12866
13023
|
];
|
|
12867
13024
|
}
|
|
13025
|
+
_a = AST;
|
|
12868
13026
|
|
|
12869
13027
|
//#endregion
|
|
12870
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
13028
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/escape.js
|
|
12871
13029
|
/**
|
|
12872
13030
|
* Escape all magic characters in a glob pattern.
|
|
12873
13031
|
*
|
|
@@ -12886,7 +13044,7 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {})
|
|
|
12886
13044
|
};
|
|
12887
13045
|
|
|
12888
13046
|
//#endregion
|
|
12889
|
-
//#region node_modules/.pnpm/minimatch@10.
|
|
13047
|
+
//#region node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/index.js
|
|
12890
13048
|
const minimatch = (p, pattern, options = {}) => {
|
|
12891
13049
|
assertValidPattern(pattern);
|
|
12892
13050
|
if (!options.nocomment && pattern.charAt(0) === "#") return false;
|
|
@@ -12995,7 +13153,7 @@ minimatch.defaults = defaults;
|
|
|
12995
13153
|
const braceExpand = (pattern, options = {}) => {
|
|
12996
13154
|
assertValidPattern(pattern);
|
|
12997
13155
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) return [pattern];
|
|
12998
|
-
return expand(pattern);
|
|
13156
|
+
return expand(pattern, { max: options.braceExpandMax });
|
|
12999
13157
|
};
|
|
13000
13158
|
minimatch.braceExpand = braceExpand;
|
|
13001
13159
|
const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
@@ -13009,15 +13167,19 @@ const match = (list, pattern, options = {}) => {
|
|
|
13009
13167
|
minimatch.match = match;
|
|
13010
13168
|
const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
13011
13169
|
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
13170
|
+
var _Minimatch_brand = /* @__PURE__ */ new WeakSet();
|
|
13012
13171
|
var Minimatch = class {
|
|
13013
13172
|
constructor(pattern, options = {}) {
|
|
13173
|
+
var _options$maxGlobstarR;
|
|
13174
|
+
_classPrivateMethodInitSpec(this, _Minimatch_brand);
|
|
13014
13175
|
assertValidPattern(pattern);
|
|
13015
13176
|
options = options || {};
|
|
13016
13177
|
this.options = options;
|
|
13178
|
+
this.maxGlobstarRecursion = (_options$maxGlobstarR = options.maxGlobstarRecursion) !== null && _options$maxGlobstarR !== void 0 ? _options$maxGlobstarR : 200;
|
|
13017
13179
|
this.pattern = pattern;
|
|
13018
13180
|
this.platform = options.platform || defaultPlatform;
|
|
13019
13181
|
this.isWindows = this.platform === "win32";
|
|
13020
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options
|
|
13182
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options["allowWindowsEscape"] === false;
|
|
13021
13183
|
if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
|
|
13022
13184
|
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
13023
13185
|
this.regexp = null;
|
|
@@ -13252,7 +13414,8 @@ var Minimatch = class {
|
|
|
13252
13414
|
this.negate = negate;
|
|
13253
13415
|
}
|
|
13254
13416
|
matchOne(file, pattern, partial = false) {
|
|
13255
|
-
|
|
13417
|
+
let fileStartIndex = 0;
|
|
13418
|
+
let patternStartIndex = 0;
|
|
13256
13419
|
if (this.isWindows) {
|
|
13257
13420
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
13258
13421
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -13264,77 +13427,15 @@ var Minimatch = class {
|
|
|
13264
13427
|
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
13265
13428
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
13266
13429
|
pattern[pdi] = fd;
|
|
13267
|
-
|
|
13268
|
-
|
|
13430
|
+
patternStartIndex = pdi;
|
|
13431
|
+
fileStartIndex = fdi;
|
|
13269
13432
|
}
|
|
13270
13433
|
}
|
|
13271
13434
|
}
|
|
13272
13435
|
const { optimizationLevel = 1 } = this.options;
|
|
13273
13436
|
if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
pattern
|
|
13277
|
-
});
|
|
13278
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
13279
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
13280
|
-
this.debug("matchOne loop");
|
|
13281
|
-
var p = pattern[pi];
|
|
13282
|
-
var f = file[fi];
|
|
13283
|
-
this.debug(pattern, p, f);
|
|
13284
|
-
/* c8 ignore start */
|
|
13285
|
-
if (p === false) return false;
|
|
13286
|
-
/* c8 ignore stop */
|
|
13287
|
-
if (p === GLOBSTAR) {
|
|
13288
|
-
this.debug("GLOBSTAR", [
|
|
13289
|
-
pattern,
|
|
13290
|
-
p,
|
|
13291
|
-
f
|
|
13292
|
-
]);
|
|
13293
|
-
var fr = fi;
|
|
13294
|
-
var pr = pi + 1;
|
|
13295
|
-
if (pr === pl) {
|
|
13296
|
-
this.debug("** at the end");
|
|
13297
|
-
for (; fi < fl; fi++) if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
|
|
13298
|
-
return true;
|
|
13299
|
-
}
|
|
13300
|
-
while (fr < fl) {
|
|
13301
|
-
var swallowee = file[fr];
|
|
13302
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
13303
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
13304
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
13305
|
-
return true;
|
|
13306
|
-
} else {
|
|
13307
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
13308
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
13309
|
-
break;
|
|
13310
|
-
}
|
|
13311
|
-
this.debug("globstar swallow a segment, and continue");
|
|
13312
|
-
fr++;
|
|
13313
|
-
}
|
|
13314
|
-
}
|
|
13315
|
-
/* c8 ignore start */
|
|
13316
|
-
if (partial) {
|
|
13317
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
13318
|
-
if (fr === fl) return true;
|
|
13319
|
-
}
|
|
13320
|
-
/* c8 ignore stop */
|
|
13321
|
-
return false;
|
|
13322
|
-
}
|
|
13323
|
-
let hit;
|
|
13324
|
-
if (typeof p === "string") {
|
|
13325
|
-
hit = f === p;
|
|
13326
|
-
this.debug("string match", p, f, hit);
|
|
13327
|
-
} else {
|
|
13328
|
-
hit = p.test(f);
|
|
13329
|
-
this.debug("pattern match", p, f, hit);
|
|
13330
|
-
}
|
|
13331
|
-
if (!hit) return false;
|
|
13332
|
-
}
|
|
13333
|
-
if (fi === fl && pi === pl) return true;
|
|
13334
|
-
else if (fi === fl) return partial;
|
|
13335
|
-
else if (pi === pl) return fi === fl - 1 && file[fi] === "";
|
|
13336
|
-
else throw new Error("wtf?");
|
|
13337
|
-
/* c8 ignore stop */
|
|
13437
|
+
if (pattern.includes(GLOBSTAR)) return _assertClassBrand(_Minimatch_brand, this, _matchGlobstar).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
13438
|
+
return _assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
13338
13439
|
}
|
|
13339
13440
|
braceExpand() {
|
|
13340
13441
|
return braceExpand(this.pattern, this.options);
|
|
@@ -13436,6 +13537,113 @@ var Minimatch = class {
|
|
|
13436
13537
|
return minimatch.defaults(def).Minimatch;
|
|
13437
13538
|
}
|
|
13438
13539
|
};
|
|
13540
|
+
function _matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
13541
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
13542
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
13543
|
+
const [head, body, tail] = partial ? [
|
|
13544
|
+
pattern.slice(patternIndex, firstgs),
|
|
13545
|
+
pattern.slice(firstgs + 1),
|
|
13546
|
+
[]
|
|
13547
|
+
] : [
|
|
13548
|
+
pattern.slice(patternIndex, firstgs),
|
|
13549
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
13550
|
+
pattern.slice(lastgs + 1)
|
|
13551
|
+
];
|
|
13552
|
+
if (head.length) {
|
|
13553
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
13554
|
+
if (!_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, fileHead, head, partial, 0, 0)) return false;
|
|
13555
|
+
fileIndex += head.length;
|
|
13556
|
+
patternIndex += head.length;
|
|
13557
|
+
}
|
|
13558
|
+
let fileTailMatch = 0;
|
|
13559
|
+
if (tail.length) {
|
|
13560
|
+
if (tail.length + fileIndex > file.length) return false;
|
|
13561
|
+
let tailStart = file.length - tail.length;
|
|
13562
|
+
if (_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, tail, partial, tailStart, 0)) fileTailMatch = tail.length;
|
|
13563
|
+
else {
|
|
13564
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) return false;
|
|
13565
|
+
tailStart--;
|
|
13566
|
+
if (!_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, tail, partial, tailStart, 0)) return false;
|
|
13567
|
+
fileTailMatch = tail.length + 1;
|
|
13568
|
+
}
|
|
13569
|
+
}
|
|
13570
|
+
if (!body.length) {
|
|
13571
|
+
let sawSome = !!fileTailMatch;
|
|
13572
|
+
for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
|
|
13573
|
+
const f = String(file[i]);
|
|
13574
|
+
sawSome = true;
|
|
13575
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
|
|
13576
|
+
}
|
|
13577
|
+
return partial || sawSome;
|
|
13578
|
+
}
|
|
13579
|
+
const bodySegments = [[[], 0]];
|
|
13580
|
+
let currentBody = bodySegments[0];
|
|
13581
|
+
let nonGsParts = 0;
|
|
13582
|
+
const nonGsPartsSums = [0];
|
|
13583
|
+
for (const b of body) if (b === GLOBSTAR) {
|
|
13584
|
+
nonGsPartsSums.push(nonGsParts);
|
|
13585
|
+
currentBody = [[], 0];
|
|
13586
|
+
bodySegments.push(currentBody);
|
|
13587
|
+
} else {
|
|
13588
|
+
currentBody[0].push(b);
|
|
13589
|
+
nonGsParts++;
|
|
13590
|
+
}
|
|
13591
|
+
let i = bodySegments.length - 1;
|
|
13592
|
+
const fileLength = file.length - fileTailMatch;
|
|
13593
|
+
for (const b of bodySegments) b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
13594
|
+
return !!_assertClassBrand(_Minimatch_brand, this, _matchGlobStarBodySections).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
13595
|
+
}
|
|
13596
|
+
function _matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
13597
|
+
const bs = bodySegments[bodyIndex];
|
|
13598
|
+
if (!bs) {
|
|
13599
|
+
for (let i = fileIndex; i < file.length; i++) {
|
|
13600
|
+
sawTail = true;
|
|
13601
|
+
const f = file[i];
|
|
13602
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
|
|
13603
|
+
}
|
|
13604
|
+
return sawTail;
|
|
13605
|
+
}
|
|
13606
|
+
const [body, after] = bs;
|
|
13607
|
+
while (fileIndex <= after) {
|
|
13608
|
+
if (_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0) && globStarDepth < this.maxGlobstarRecursion) {
|
|
13609
|
+
const sub = _assertClassBrand(_Minimatch_brand, this, _matchGlobStarBodySections).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
13610
|
+
if (sub !== false) return sub;
|
|
13611
|
+
}
|
|
13612
|
+
const f = file[fileIndex];
|
|
13613
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
|
|
13614
|
+
fileIndex++;
|
|
13615
|
+
}
|
|
13616
|
+
return partial || null;
|
|
13617
|
+
}
|
|
13618
|
+
function _matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
13619
|
+
let fi;
|
|
13620
|
+
let pi;
|
|
13621
|
+
let pl;
|
|
13622
|
+
let fl;
|
|
13623
|
+
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
13624
|
+
this.debug("matchOne loop");
|
|
13625
|
+
let p = pattern[pi];
|
|
13626
|
+
let f = file[fi];
|
|
13627
|
+
this.debug(pattern, p, f);
|
|
13628
|
+
/* c8 ignore start */
|
|
13629
|
+
if (p === false || p === GLOBSTAR) return false;
|
|
13630
|
+
/* c8 ignore stop */
|
|
13631
|
+
let hit;
|
|
13632
|
+
if (typeof p === "string") {
|
|
13633
|
+
hit = f === p;
|
|
13634
|
+
this.debug("string match", p, f, hit);
|
|
13635
|
+
} else {
|
|
13636
|
+
hit = p.test(f);
|
|
13637
|
+
this.debug("pattern match", p, f, hit);
|
|
13638
|
+
}
|
|
13639
|
+
if (!hit) return false;
|
|
13640
|
+
}
|
|
13641
|
+
if (fi === fl && pi === pl) return true;
|
|
13642
|
+
else if (fi === fl) return partial;
|
|
13643
|
+
else if (pi === pl) return fi === fl - 1 && file[fi] === "";
|
|
13644
|
+
else throw new Error("wtf?");
|
|
13645
|
+
/* c8 ignore stop */
|
|
13646
|
+
}
|
|
13439
13647
|
/* c8 ignore stop */
|
|
13440
13648
|
minimatch.AST = AST;
|
|
13441
13649
|
minimatch.Minimatch = Minimatch;
|
|
@@ -13844,11 +14052,17 @@ function importSourceToScope(ctx, node, scope, source) {
|
|
|
13844
14052
|
} else return ctx.error(`Failed to resolve import source ${JSON.stringify(source)}.`, node, scope);
|
|
13845
14053
|
}
|
|
13846
14054
|
function resolveExt(filename, fs) {
|
|
13847
|
-
|
|
14055
|
+
let moduleType = "u";
|
|
14056
|
+
if (filename.endsWith(".mjs")) moduleType = "m";
|
|
14057
|
+
else if (filename.endsWith(".cjs")) moduleType = "c";
|
|
14058
|
+
filename = filename.replace(/\.[cm]?jsx?$/, "");
|
|
13848
14059
|
const tryResolve = (filename) => {
|
|
13849
14060
|
if (fs.fileExists(filename)) return filename;
|
|
13850
14061
|
};
|
|
13851
|
-
|
|
14062
|
+
const resolveTs = () => tryResolve(filename + `.uts`) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`);
|
|
14063
|
+
const resolveMts = () => tryResolve(filename + `.mts`) || tryResolve(filename + `.d.mts`);
|
|
14064
|
+
const resolveCts = () => tryResolve(filename + `.cts`) || tryResolve(filename + `.d.cts`);
|
|
14065
|
+
return tryResolve(filename) || (moduleType === "m" ? resolveMts() || resolveTs() : moduleType === "c" ? resolveCts() || resolveTs() : resolveTs() || resolveMts() || resolveCts()) || tryResolve(joinPaths(filename, `index.uts`)) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
|
|
13852
14066
|
}
|
|
13853
14067
|
const tsConfigCache = createCache();
|
|
13854
14068
|
const tsConfigRefMap = /* @__PURE__ */ new Map();
|
|
@@ -13932,8 +14146,8 @@ function fileToScope(ctx, filename, asGlobal = false) {
|
|
|
13932
14146
|
}
|
|
13933
14147
|
function parseFile(filename, content, fs, parserPlugins) {
|
|
13934
14148
|
const ext = (0, path.extname)(filename);
|
|
13935
|
-
if (ext === ".uts" || ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") return (0, _babel_parser.parse)(content, {
|
|
13936
|
-
plugins: resolveParserPlugins(ext.slice(1), parserPlugins, /\.d\.
|
|
14149
|
+
if (ext === ".uts" || ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".cts" || ext === ".mtsx") return (0, _babel_parser.parse)(content, {
|
|
14150
|
+
plugins: resolveParserPlugins(ext.slice(1), parserPlugins, /\.d\.[cm]?ts$/.test(filename)),
|
|
13937
14151
|
sourceType: "module"
|
|
13938
14152
|
}).program.body;
|
|
13939
14153
|
const isUnknownTypeSource = !/\.[cm]?[tj]sx?$/.test(filename);
|
|
@@ -14563,7 +14777,18 @@ function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStat
|
|
|
14563
14777
|
return resolveObjectKey(node.key, node.computed) === key;
|
|
14564
14778
|
});
|
|
14565
14779
|
if (prop) if (prop.type === "ObjectProperty") defaultString = `default: ${ctx.getString(prop.value)}`;
|
|
14566
|
-
else
|
|
14780
|
+
else {
|
|
14781
|
+
let paramsString = "";
|
|
14782
|
+
if (prop.params.length) {
|
|
14783
|
+
const start = prop.params[0].start;
|
|
14784
|
+
const end = prop.params[prop.params.length - 1].end;
|
|
14785
|
+
paramsString = ctx.getString({
|
|
14786
|
+
start,
|
|
14787
|
+
end
|
|
14788
|
+
});
|
|
14789
|
+
}
|
|
14790
|
+
defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default(${paramsString}) ${ctx.getString(prop.body)}`;
|
|
14791
|
+
}
|
|
14567
14792
|
}
|
|
14568
14793
|
const finalKey = getEscapedPropName(key);
|
|
14569
14794
|
if (!ctx.options.isProd) return `${finalKey}: { ${concatStrings([
|
|
@@ -15309,13 +15534,16 @@ function compileScript(sfc, options) {
|
|
|
15309
15534
|
const optionsProps = [];
|
|
15310
15535
|
if (hasScriptCpp) optionsProps.push("scriptCpp: true");
|
|
15311
15536
|
const optionsCode = optionsProps.length ? `, { ${optionsProps.join(", ")} }` : "";
|
|
15537
|
+
const dynamicSharedDataOptionsCode = options.dynamicSharedData ? `_useSharedDataPageOptions({ bundleKey: __className, sharedDataClassId: 0 })` : `_useSharedDataPageOptions()`;
|
|
15538
|
+
const dynamicSharedDataComponentOptionsCode = options.dynamicSharedData ? `_useSharedDataComponentOptions({ bundleKey: __className, sharedDataClassId: 0 })` : `_useSharedDataComponentOptions()`;
|
|
15312
15539
|
if (componentType === "page") {
|
|
15313
15540
|
setupPreambleLines.unshift(`const __sharedDataScope = _useSharedDataScope(__sharedData)`);
|
|
15314
|
-
setupPreambleLines.unshift(`const __sharedData = _withSharedDataPage(useSharedDataPage<__SHARED_DATA_CLASS_NAME_TYPE>(_useSharedDataRenderer() == 'component' ? _useSharedDataScope() : _useSharedDataPageId(),
|
|
15541
|
+
setupPreambleLines.unshift(`const __sharedData = _withSharedDataPage(useSharedDataPage<__SHARED_DATA_CLASS_NAME_TYPE>(_useSharedDataRenderer() == 'component' ? _useSharedDataScope() : _useSharedDataPageId(), ${dynamicSharedDataOptionsCode})${optionsCode})`);
|
|
15315
15542
|
} else if (componentType === "component") {
|
|
15316
|
-
setupPreambleLines.unshift(`const __sharedData = _withSharedDataComponent(useSharedDataComponent<__SHARED_DATA_CLASS_NAME_TYPE>(__sharedDataScope,
|
|
15543
|
+
setupPreambleLines.unshift(`const __sharedData = _withSharedDataComponent(useSharedDataComponent<__SHARED_DATA_CLASS_NAME_TYPE>(__sharedDataScope, ${dynamicSharedDataComponentOptionsCode})${optionsCode})`);
|
|
15317
15544
|
setupPreambleLines.unshift(`const __sharedDataScope = _useSharedDataScope()`);
|
|
15318
15545
|
}
|
|
15546
|
+
if (options.dynamicSharedData) runtimeOptions += `\n __dynamicSharedData: true,`;
|
|
15319
15547
|
if (options.isWatch && templateHash) runtimeOptions += `\n __hash: "${templateHash}",`;
|
|
15320
15548
|
runtimeOptions += `\n __className,`;
|
|
15321
15549
|
runtimeOptions += `\n __filename: '${((_options$templateOpti3 = options.templateOptions) === null || _options$templateOpti3 === void 0 ? void 0 : _options$templateOpti3.compilerOptions).relativeFilename || ""}',`;
|
|
@@ -15486,7 +15714,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
15486
15714
|
|
|
15487
15715
|
//#endregion
|
|
15488
15716
|
//#region packages/compiler-sfc/src/index.ts
|
|
15489
|
-
const version = "3.6.0-beta.
|
|
15717
|
+
const version = "3.6.0-beta.7";
|
|
15490
15718
|
const parseCache = parseCache$1;
|
|
15491
15719
|
const errorMessages = {
|
|
15492
15720
|
..._vue_compiler_dom.errorMessages,
|