@fangzhongya/vue-archive 0.0.2-31 → 0.0.2-32
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/node/index.cjs +122 -33
- package/dist/node/index.js +122 -33
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
- package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-17 → @fangzhongya_utils@0.0.7-18}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +1 -1
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.js +1 -1
- package/dist/packages/components/use/set-code.vue.cjs +1 -1
- package/dist/packages/components/use/set-code.vue.js +3 -3
- package/dist/packages/config.cjs +1 -1
- package/dist/packages/config.js +1 -1
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.js +4 -4
- package/dist/packages/utils/glob.cjs +1 -1
- package/dist/packages/utils/glob.js +6 -6
- package/package.json +3 -3
package/dist/node/index.cjs
CHANGED
|
@@ -63462,7 +63462,7 @@ var require_vue = __commonJS({
|
|
|
63462
63462
|
}
|
|
63463
63463
|
});
|
|
63464
63464
|
|
|
63465
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63465
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
|
|
63466
63466
|
function mergeObject(a, b, j = 0, i) {
|
|
63467
63467
|
if (a instanceof Array) {
|
|
63468
63468
|
if (j > 0 && i) {
|
|
@@ -63505,7 +63505,7 @@ function mergeObject(a, b, j = 0, i) {
|
|
|
63505
63505
|
return a;
|
|
63506
63506
|
}
|
|
63507
63507
|
|
|
63508
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63508
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
63509
63509
|
function humpToLine(name) {
|
|
63510
63510
|
const reg = /(([A-Z])([^A-Z]*))/g;
|
|
63511
63511
|
let result;
|
|
@@ -63527,12 +63527,12 @@ function humpToLine(name) {
|
|
|
63527
63527
|
}
|
|
63528
63528
|
}
|
|
63529
63529
|
|
|
63530
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63530
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
|
|
63531
63531
|
function firstUpper(str) {
|
|
63532
63532
|
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
|
63533
63533
|
}
|
|
63534
63534
|
|
|
63535
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63535
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
|
|
63536
63536
|
function lineToLargeHump(name) {
|
|
63537
63537
|
let arr = name.split("-");
|
|
63538
63538
|
arr = arr.map((vs) => {
|
|
@@ -63541,7 +63541,7 @@ function lineToLargeHump(name) {
|
|
|
63541
63541
|
return arr.join("");
|
|
63542
63542
|
}
|
|
63543
63543
|
|
|
63544
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63544
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js
|
|
63545
63545
|
function appearNum(str, t) {
|
|
63546
63546
|
let reg = t;
|
|
63547
63547
|
if (typeof t == "string") {
|
|
@@ -63552,12 +63552,12 @@ function appearNum(str, t) {
|
|
|
63552
63552
|
return c;
|
|
63553
63553
|
}
|
|
63554
63554
|
|
|
63555
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63555
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
|
|
63556
63556
|
function firstLower(str) {
|
|
63557
63557
|
return str.slice(0, 1).toLowerCase() + str.slice(1);
|
|
63558
63558
|
}
|
|
63559
63559
|
|
|
63560
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63560
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
|
|
63561
63561
|
function asyncMergeArray(arr, callback) {
|
|
63562
63562
|
return new Promise((resolve3, reject) => {
|
|
63563
63563
|
let index = 0;
|
|
@@ -63581,7 +63581,7 @@ function asyncMergeArray(arr, callback) {
|
|
|
63581
63581
|
});
|
|
63582
63582
|
}
|
|
63583
63583
|
|
|
63584
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63584
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
|
|
63585
63585
|
function getSuffix(url) {
|
|
63586
63586
|
const reg = /\.([a-z|A-Z]+)$/;
|
|
63587
63587
|
const regs = reg.exec(url);
|
|
@@ -63591,7 +63591,7 @@ function getSuffix(url) {
|
|
|
63591
63591
|
return "";
|
|
63592
63592
|
}
|
|
63593
63593
|
|
|
63594
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63594
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.js
|
|
63595
63595
|
function replaceAfter(arr, obj, id) {
|
|
63596
63596
|
const varr = [];
|
|
63597
63597
|
for (let index = 0; index < arr.length; index++) {
|
|
@@ -64189,12 +64189,12 @@ function getNotes(text) {
|
|
|
64189
64189
|
};
|
|
64190
64190
|
}
|
|
64191
64191
|
|
|
64192
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64192
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
|
|
64193
64193
|
function isArray(obj) {
|
|
64194
64194
|
return Object.prototype.toString.call(obj) == "[object Array]";
|
|
64195
64195
|
}
|
|
64196
64196
|
|
|
64197
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64197
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
|
|
64198
64198
|
function getStartSames(str, val) {
|
|
64199
64199
|
let s = "";
|
|
64200
64200
|
const vs = [...val];
|
|
@@ -64210,7 +64210,7 @@ function getStartSames(str, val) {
|
|
|
64210
64210
|
return [s, str.substring(index), val.substring(index)];
|
|
64211
64211
|
}
|
|
64212
64212
|
|
|
64213
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64213
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
|
|
64214
64214
|
function getImportUrl(url, imp) {
|
|
64215
64215
|
const arr = getStartSames(url, imp);
|
|
64216
64216
|
const ts = arr[0];
|
|
@@ -65604,7 +65604,7 @@ var top_default = (0, vue_exports.defineComponent)({
|
|
|
65604
65604
|
}
|
|
65605
65605
|
});
|
|
65606
65606
|
|
|
65607
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
65607
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/chunk-G7FBKDWD.js
|
|
65608
65608
|
|
|
65609
65609
|
|
|
65610
65610
|
|
|
@@ -65618,6 +65618,46 @@ var top_default = (0, vue_exports.defineComponent)({
|
|
|
65618
65618
|
|
|
65619
65619
|
var _fs = require('fs');
|
|
65620
65620
|
|
|
65621
|
+
function getUrlCatalogueObj(str) {
|
|
65622
|
+
const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
|
|
65623
|
+
const ml = str.replace(reg, "");
|
|
65624
|
+
let name = "";
|
|
65625
|
+
let suffix = "";
|
|
65626
|
+
let apart = "";
|
|
65627
|
+
const arr = reg.exec(str);
|
|
65628
|
+
if (arr) {
|
|
65629
|
+
apart = arr[1];
|
|
65630
|
+
name = arr[2];
|
|
65631
|
+
suffix = arr[3];
|
|
65632
|
+
}
|
|
65633
|
+
return {
|
|
65634
|
+
apart,
|
|
65635
|
+
catalogue: ml,
|
|
65636
|
+
name,
|
|
65637
|
+
suffix
|
|
65638
|
+
};
|
|
65639
|
+
}
|
|
65640
|
+
function getNewFileName(url) {
|
|
65641
|
+
const obj = getUrlCatalogueObj(url);
|
|
65642
|
+
let wb = obj.name;
|
|
65643
|
+
if (wb) {
|
|
65644
|
+
const reg = /([0-9]+)$/g;
|
|
65645
|
+
const regs = reg.exec(wb);
|
|
65646
|
+
if (regs && regs.length > 0) {
|
|
65647
|
+
const sl = Number(regs[1]) + 1;
|
|
65648
|
+
const reg1 = new RegExp(regs[1] + "$");
|
|
65649
|
+
wb = wb.replace(
|
|
65650
|
+
reg1,
|
|
65651
|
+
(sl + "").padStart(regs[1].length, "0")
|
|
65652
|
+
);
|
|
65653
|
+
} else {
|
|
65654
|
+
wb = wb + "1";
|
|
65655
|
+
}
|
|
65656
|
+
return obj.catalogue + obj.apart + wb + "." + obj.suffix;
|
|
65657
|
+
} else {
|
|
65658
|
+
return "";
|
|
65659
|
+
}
|
|
65660
|
+
}
|
|
65621
65661
|
function fsCreateReadStream(url, type) {
|
|
65622
65662
|
if (!type || type === true) {
|
|
65623
65663
|
type = "utf-8";
|
|
@@ -65692,7 +65732,7 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65692
65732
|
_fs.open.call(void 0, path, "wx", async (err, fd) => {
|
|
65693
65733
|
if (err) {
|
|
65694
65734
|
if (err.code === "EEXIST") {
|
|
65695
|
-
if (type
|
|
65735
|
+
if (type == 1 || type == 0) {
|
|
65696
65736
|
const fwrite = () => {
|
|
65697
65737
|
_fs.writeFile.call(void 0,
|
|
65698
65738
|
path,
|
|
@@ -65701,21 +65741,23 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65701
65741
|
(err2) => {
|
|
65702
65742
|
if (err2) {
|
|
65703
65743
|
console.log("6", err2);
|
|
65704
|
-
if (callback)
|
|
65744
|
+
if (callback) {
|
|
65705
65745
|
callback(
|
|
65706
65746
|
path,
|
|
65707
65747
|
cover ? 3 : 2,
|
|
65708
65748
|
false,
|
|
65709
65749
|
type
|
|
65710
65750
|
);
|
|
65751
|
+
}
|
|
65711
65752
|
} else {
|
|
65712
|
-
if (callback)
|
|
65753
|
+
if (callback) {
|
|
65713
65754
|
callback(
|
|
65714
65755
|
path,
|
|
65715
65756
|
cover ? 3 : 2,
|
|
65716
65757
|
true,
|
|
65717
65758
|
type
|
|
65718
65759
|
);
|
|
65760
|
+
}
|
|
65719
65761
|
}
|
|
65720
65762
|
}
|
|
65721
65763
|
);
|
|
@@ -65740,29 +65782,49 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65740
65782
|
} else {
|
|
65741
65783
|
fwrite();
|
|
65742
65784
|
}
|
|
65785
|
+
} else if (type == 3) {
|
|
65786
|
+
path = getNewFileName(path);
|
|
65787
|
+
if (path) {
|
|
65788
|
+
fsOpenStream(
|
|
65789
|
+
path,
|
|
65790
|
+
json,
|
|
65791
|
+
type,
|
|
65792
|
+
cover,
|
|
65793
|
+
callback
|
|
65794
|
+
);
|
|
65795
|
+
} else {
|
|
65796
|
+
if (callback) {
|
|
65797
|
+
callback(path, 3, false, type);
|
|
65798
|
+
}
|
|
65799
|
+
}
|
|
65743
65800
|
} else {
|
|
65744
|
-
if (callback)
|
|
65801
|
+
if (callback) {
|
|
65745
65802
|
callback(path, 2, false, type);
|
|
65803
|
+
}
|
|
65746
65804
|
}
|
|
65747
65805
|
} else {
|
|
65748
|
-
if (callback)
|
|
65806
|
+
if (callback) {
|
|
65749
65807
|
callback(path, 0, false, type);
|
|
65808
|
+
}
|
|
65750
65809
|
}
|
|
65751
65810
|
} else {
|
|
65752
65811
|
if (type != 1) {
|
|
65753
65812
|
_fs.write.call(void 0, fd, json, (err2) => {
|
|
65754
65813
|
if (err2) {
|
|
65755
65814
|
console.log("8", err2);
|
|
65756
|
-
if (callback)
|
|
65815
|
+
if (callback) {
|
|
65757
65816
|
callback(path, 1, false, type);
|
|
65817
|
+
}
|
|
65758
65818
|
} else {
|
|
65759
|
-
if (callback)
|
|
65819
|
+
if (callback) {
|
|
65760
65820
|
callback(path, 1, true, type);
|
|
65821
|
+
}
|
|
65761
65822
|
}
|
|
65762
65823
|
});
|
|
65763
65824
|
} else {
|
|
65764
|
-
if (callback)
|
|
65825
|
+
if (callback) {
|
|
65765
65826
|
callback(path, 1, false, type);
|
|
65827
|
+
}
|
|
65766
65828
|
}
|
|
65767
65829
|
}
|
|
65768
65830
|
});
|
|
@@ -65843,7 +65905,7 @@ function writeFileUrl(url, files, callback, isDirs, isFile) {
|
|
|
65843
65905
|
});
|
|
65844
65906
|
}
|
|
65845
65907
|
|
|
65846
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
65908
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/chunk-VAK3U2D7.js
|
|
65847
65909
|
|
|
65848
65910
|
function styleLog(msg = "", obj) {
|
|
65849
65911
|
const arr = ["\x1B[0m"];
|
|
@@ -65873,6 +65935,14 @@ function styleLog(msg = "", obj) {
|
|
|
65873
65935
|
arr.push("\x1B[0m");
|
|
65874
65936
|
return arr.join("");
|
|
65875
65937
|
}
|
|
65938
|
+
function getSuffix2(url) {
|
|
65939
|
+
const reg = /\.([a-z|A-Z]+)$/;
|
|
65940
|
+
const regs = reg.exec(url);
|
|
65941
|
+
if (regs && regs.length > 0) {
|
|
65942
|
+
return regs[1];
|
|
65943
|
+
}
|
|
65944
|
+
return "";
|
|
65945
|
+
}
|
|
65876
65946
|
function matchsEnd(key, matchs) {
|
|
65877
65947
|
if (matchs && matchs.length > 0) {
|
|
65878
65948
|
for (const value of matchs) {
|
|
@@ -65925,6 +65995,7 @@ var defaultConfig = {
|
|
|
65925
65995
|
*/
|
|
65926
65996
|
extensions: ["js", "ts"],
|
|
65927
65997
|
suffixReg: defaultSuffixReg,
|
|
65998
|
+
fileTongre: false,
|
|
65928
65999
|
/**
|
|
65929
66000
|
* 是否替换文件
|
|
65930
66001
|
*/
|
|
@@ -66098,15 +66169,30 @@ var FangCom = class {
|
|
|
66098
66169
|
);
|
|
66099
66170
|
}
|
|
66100
66171
|
}
|
|
66101
|
-
getFileNotes() {
|
|
66102
|
-
|
|
66103
|
-
|
|
66104
|
-
|
|
66105
|
-
`
|
|
66106
|
-
|
|
66107
|
-
|
|
66108
|
-
" */"
|
|
66172
|
+
getFileNotes(url) {
|
|
66173
|
+
const suffix = getSuffix2(url);
|
|
66174
|
+
const sz = [
|
|
66175
|
+
`@config cover=false`,
|
|
66176
|
+
`cover \u662F\u5426\u8986\u76D6\u5F53\u524D\u6587\u4EF6\uFF0C\u9ED8\u8BA4\u662Ffalse\uFF0C true \u8868\u793A\u4E0D\u8986\u76D6`,
|
|
66177
|
+
`\u5F53\u524D\u5DF2\u7ECF\u7531@fangzhongya/create\u81EA\u52A8\u751F\u6210`,
|
|
66178
|
+
`${(/* @__PURE__ */ new Date()).toString()}`
|
|
66109
66179
|
];
|
|
66180
|
+
const hy = ["md", "html", "vue"];
|
|
66181
|
+
if (hy.includes(suffix)) {
|
|
66182
|
+
const arr = ["<!--"];
|
|
66183
|
+
sz.forEach((v) => {
|
|
66184
|
+
arr.push(" - " + v);
|
|
66185
|
+
});
|
|
66186
|
+
arr.push("-->");
|
|
66187
|
+
return arr;
|
|
66188
|
+
} else {
|
|
66189
|
+
const arr = ["/**"];
|
|
66190
|
+
sz.forEach((v) => {
|
|
66191
|
+
arr.push(" * " + v);
|
|
66192
|
+
});
|
|
66193
|
+
arr.push(" */");
|
|
66194
|
+
return arr;
|
|
66195
|
+
}
|
|
66110
66196
|
}
|
|
66111
66197
|
/**
|
|
66112
66198
|
* 输出文件,判断目录是否存在
|
|
@@ -66161,7 +66247,10 @@ var FangCom = class {
|
|
|
66161
66247
|
* @param callback
|
|
66162
66248
|
*/
|
|
66163
66249
|
setOpen(url, str, type, callback) {
|
|
66164
|
-
let tn = this.config.
|
|
66250
|
+
let tn = this.config.fileTongre ? 3 : 2;
|
|
66251
|
+
if (this.config.fileCover) {
|
|
66252
|
+
tn = 0;
|
|
66253
|
+
}
|
|
66165
66254
|
if (tn == 2) {
|
|
66166
66255
|
if (this.isForceUpdate(url)) {
|
|
66167
66256
|
tn = 0;
|
|
@@ -66171,7 +66260,7 @@ var FangCom = class {
|
|
|
66171
66260
|
tn = type;
|
|
66172
66261
|
}
|
|
66173
66262
|
if (this.config.writeNotes && !/\.json$/.test(url)) {
|
|
66174
|
-
str = this.getFileNotes().join("\n") + "\n" + str;
|
|
66263
|
+
str = this.getFileNotes(url).join("\n") + "\n" + str;
|
|
66175
66264
|
}
|
|
66176
66265
|
fsOpenStream(
|
|
66177
66266
|
url,
|
|
@@ -66239,7 +66328,7 @@ var FangCom = class {
|
|
|
66239
66328
|
}
|
|
66240
66329
|
};
|
|
66241
66330
|
|
|
66242
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
66331
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/bins/md.js
|
|
66243
66332
|
var defaultConfig2 = Object.assign(
|
|
66244
66333
|
{},
|
|
66245
66334
|
defaultConfig,
|
package/dist/node/index.js
CHANGED
|
@@ -63462,7 +63462,7 @@ var require_vue = __commonJS({
|
|
|
63462
63462
|
}
|
|
63463
63463
|
});
|
|
63464
63464
|
|
|
63465
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63465
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
|
|
63466
63466
|
function mergeObject(a, b, j = 0, i) {
|
|
63467
63467
|
if (a instanceof Array) {
|
|
63468
63468
|
if (j > 0 && i) {
|
|
@@ -63505,7 +63505,7 @@ function mergeObject(a, b, j = 0, i) {
|
|
|
63505
63505
|
return a;
|
|
63506
63506
|
}
|
|
63507
63507
|
|
|
63508
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63508
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
63509
63509
|
function humpToLine(name) {
|
|
63510
63510
|
const reg = /(([A-Z])([^A-Z]*))/g;
|
|
63511
63511
|
let result;
|
|
@@ -63527,12 +63527,12 @@ function humpToLine(name) {
|
|
|
63527
63527
|
}
|
|
63528
63528
|
}
|
|
63529
63529
|
|
|
63530
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63530
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
|
|
63531
63531
|
function firstUpper(str) {
|
|
63532
63532
|
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
|
63533
63533
|
}
|
|
63534
63534
|
|
|
63535
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63535
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
|
|
63536
63536
|
function lineToLargeHump(name) {
|
|
63537
63537
|
let arr = name.split("-");
|
|
63538
63538
|
arr = arr.map((vs) => {
|
|
@@ -63541,7 +63541,7 @@ function lineToLargeHump(name) {
|
|
|
63541
63541
|
return arr.join("");
|
|
63542
63542
|
}
|
|
63543
63543
|
|
|
63544
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63544
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js
|
|
63545
63545
|
function appearNum(str, t) {
|
|
63546
63546
|
let reg = t;
|
|
63547
63547
|
if (typeof t == "string") {
|
|
@@ -63552,12 +63552,12 @@ function appearNum(str, t) {
|
|
|
63552
63552
|
return c;
|
|
63553
63553
|
}
|
|
63554
63554
|
|
|
63555
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63555
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
|
|
63556
63556
|
function firstLower(str) {
|
|
63557
63557
|
return str.slice(0, 1).toLowerCase() + str.slice(1);
|
|
63558
63558
|
}
|
|
63559
63559
|
|
|
63560
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63560
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
|
|
63561
63561
|
function asyncMergeArray(arr, callback) {
|
|
63562
63562
|
return new Promise((resolve3, reject) => {
|
|
63563
63563
|
let index = 0;
|
|
@@ -63581,7 +63581,7 @@ function asyncMergeArray(arr, callback) {
|
|
|
63581
63581
|
});
|
|
63582
63582
|
}
|
|
63583
63583
|
|
|
63584
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63584
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
|
|
63585
63585
|
function getSuffix(url) {
|
|
63586
63586
|
const reg = /\.([a-z|A-Z]+)$/;
|
|
63587
63587
|
const regs = reg.exec(url);
|
|
@@ -63591,7 +63591,7 @@ function getSuffix(url) {
|
|
|
63591
63591
|
return "";
|
|
63592
63592
|
}
|
|
63593
63593
|
|
|
63594
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
63594
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.js
|
|
63595
63595
|
function replaceAfter(arr, obj, id) {
|
|
63596
63596
|
const varr = [];
|
|
63597
63597
|
for (let index = 0; index < arr.length; index++) {
|
|
@@ -64189,12 +64189,12 @@ function getNotes(text) {
|
|
|
64189
64189
|
};
|
|
64190
64190
|
}
|
|
64191
64191
|
|
|
64192
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64192
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
|
|
64193
64193
|
function isArray(obj) {
|
|
64194
64194
|
return Object.prototype.toString.call(obj) == "[object Array]";
|
|
64195
64195
|
}
|
|
64196
64196
|
|
|
64197
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64197
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
|
|
64198
64198
|
function getStartSames(str, val) {
|
|
64199
64199
|
let s = "";
|
|
64200
64200
|
const vs = [...val];
|
|
@@ -64210,7 +64210,7 @@ function getStartSames(str, val) {
|
|
|
64210
64210
|
return [s, str.substring(index), val.substring(index)];
|
|
64211
64211
|
}
|
|
64212
64212
|
|
|
64213
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-
|
|
64213
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
|
|
64214
64214
|
function getImportUrl(url, imp) {
|
|
64215
64215
|
const arr = getStartSames(url, imp);
|
|
64216
64216
|
const ts = arr[0];
|
|
@@ -65604,7 +65604,7 @@ var top_default = (0, vue_exports.defineComponent)({
|
|
|
65604
65604
|
}
|
|
65605
65605
|
});
|
|
65606
65606
|
|
|
65607
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
65607
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/chunk-G7FBKDWD.js
|
|
65608
65608
|
import {
|
|
65609
65609
|
open,
|
|
65610
65610
|
readdir,
|
|
@@ -65618,6 +65618,46 @@ import {
|
|
|
65618
65618
|
constants
|
|
65619
65619
|
} from "node:fs";
|
|
65620
65620
|
import { join as join2 } from "node:path";
|
|
65621
|
+
function getUrlCatalogueObj(str) {
|
|
65622
|
+
const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
|
|
65623
|
+
const ml = str.replace(reg, "");
|
|
65624
|
+
let name = "";
|
|
65625
|
+
let suffix = "";
|
|
65626
|
+
let apart = "";
|
|
65627
|
+
const arr = reg.exec(str);
|
|
65628
|
+
if (arr) {
|
|
65629
|
+
apart = arr[1];
|
|
65630
|
+
name = arr[2];
|
|
65631
|
+
suffix = arr[3];
|
|
65632
|
+
}
|
|
65633
|
+
return {
|
|
65634
|
+
apart,
|
|
65635
|
+
catalogue: ml,
|
|
65636
|
+
name,
|
|
65637
|
+
suffix
|
|
65638
|
+
};
|
|
65639
|
+
}
|
|
65640
|
+
function getNewFileName(url) {
|
|
65641
|
+
const obj = getUrlCatalogueObj(url);
|
|
65642
|
+
let wb = obj.name;
|
|
65643
|
+
if (wb) {
|
|
65644
|
+
const reg = /([0-9]+)$/g;
|
|
65645
|
+
const regs = reg.exec(wb);
|
|
65646
|
+
if (regs && regs.length > 0) {
|
|
65647
|
+
const sl = Number(regs[1]) + 1;
|
|
65648
|
+
const reg1 = new RegExp(regs[1] + "$");
|
|
65649
|
+
wb = wb.replace(
|
|
65650
|
+
reg1,
|
|
65651
|
+
(sl + "").padStart(regs[1].length, "0")
|
|
65652
|
+
);
|
|
65653
|
+
} else {
|
|
65654
|
+
wb = wb + "1";
|
|
65655
|
+
}
|
|
65656
|
+
return obj.catalogue + obj.apart + wb + "." + obj.suffix;
|
|
65657
|
+
} else {
|
|
65658
|
+
return "";
|
|
65659
|
+
}
|
|
65660
|
+
}
|
|
65621
65661
|
function fsCreateReadStream(url, type) {
|
|
65622
65662
|
if (!type || type === true) {
|
|
65623
65663
|
type = "utf-8";
|
|
@@ -65692,7 +65732,7 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65692
65732
|
open(path, "wx", async (err, fd) => {
|
|
65693
65733
|
if (err) {
|
|
65694
65734
|
if (err.code === "EEXIST") {
|
|
65695
|
-
if (type
|
|
65735
|
+
if (type == 1 || type == 0) {
|
|
65696
65736
|
const fwrite = () => {
|
|
65697
65737
|
writeFile(
|
|
65698
65738
|
path,
|
|
@@ -65701,21 +65741,23 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65701
65741
|
(err2) => {
|
|
65702
65742
|
if (err2) {
|
|
65703
65743
|
console.log("6", err2);
|
|
65704
|
-
if (callback)
|
|
65744
|
+
if (callback) {
|
|
65705
65745
|
callback(
|
|
65706
65746
|
path,
|
|
65707
65747
|
cover ? 3 : 2,
|
|
65708
65748
|
false,
|
|
65709
65749
|
type
|
|
65710
65750
|
);
|
|
65751
|
+
}
|
|
65711
65752
|
} else {
|
|
65712
|
-
if (callback)
|
|
65753
|
+
if (callback) {
|
|
65713
65754
|
callback(
|
|
65714
65755
|
path,
|
|
65715
65756
|
cover ? 3 : 2,
|
|
65716
65757
|
true,
|
|
65717
65758
|
type
|
|
65718
65759
|
);
|
|
65760
|
+
}
|
|
65719
65761
|
}
|
|
65720
65762
|
}
|
|
65721
65763
|
);
|
|
@@ -65740,29 +65782,49 @@ function fsOpenStream(path, json, type = 0, cover, callback) {
|
|
|
65740
65782
|
} else {
|
|
65741
65783
|
fwrite();
|
|
65742
65784
|
}
|
|
65785
|
+
} else if (type == 3) {
|
|
65786
|
+
path = getNewFileName(path);
|
|
65787
|
+
if (path) {
|
|
65788
|
+
fsOpenStream(
|
|
65789
|
+
path,
|
|
65790
|
+
json,
|
|
65791
|
+
type,
|
|
65792
|
+
cover,
|
|
65793
|
+
callback
|
|
65794
|
+
);
|
|
65795
|
+
} else {
|
|
65796
|
+
if (callback) {
|
|
65797
|
+
callback(path, 3, false, type);
|
|
65798
|
+
}
|
|
65799
|
+
}
|
|
65743
65800
|
} else {
|
|
65744
|
-
if (callback)
|
|
65801
|
+
if (callback) {
|
|
65745
65802
|
callback(path, 2, false, type);
|
|
65803
|
+
}
|
|
65746
65804
|
}
|
|
65747
65805
|
} else {
|
|
65748
|
-
if (callback)
|
|
65806
|
+
if (callback) {
|
|
65749
65807
|
callback(path, 0, false, type);
|
|
65808
|
+
}
|
|
65750
65809
|
}
|
|
65751
65810
|
} else {
|
|
65752
65811
|
if (type != 1) {
|
|
65753
65812
|
write(fd, json, (err2) => {
|
|
65754
65813
|
if (err2) {
|
|
65755
65814
|
console.log("8", err2);
|
|
65756
|
-
if (callback)
|
|
65815
|
+
if (callback) {
|
|
65757
65816
|
callback(path, 1, false, type);
|
|
65817
|
+
}
|
|
65758
65818
|
} else {
|
|
65759
|
-
if (callback)
|
|
65819
|
+
if (callback) {
|
|
65760
65820
|
callback(path, 1, true, type);
|
|
65821
|
+
}
|
|
65761
65822
|
}
|
|
65762
65823
|
});
|
|
65763
65824
|
} else {
|
|
65764
|
-
if (callback)
|
|
65825
|
+
if (callback) {
|
|
65765
65826
|
callback(path, 1, false, type);
|
|
65827
|
+
}
|
|
65766
65828
|
}
|
|
65767
65829
|
}
|
|
65768
65830
|
});
|
|
@@ -65843,7 +65905,7 @@ function writeFileUrl(url, files, callback, isDirs, isFile) {
|
|
|
65843
65905
|
});
|
|
65844
65906
|
}
|
|
65845
65907
|
|
|
65846
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
65908
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/chunk-VAK3U2D7.js
|
|
65847
65909
|
import { resolve as resolve2, join as join3 } from "node:path";
|
|
65848
65910
|
function styleLog(msg = "", obj) {
|
|
65849
65911
|
const arr = ["\x1B[0m"];
|
|
@@ -65873,6 +65935,14 @@ function styleLog(msg = "", obj) {
|
|
|
65873
65935
|
arr.push("\x1B[0m");
|
|
65874
65936
|
return arr.join("");
|
|
65875
65937
|
}
|
|
65938
|
+
function getSuffix2(url) {
|
|
65939
|
+
const reg = /\.([a-z|A-Z]+)$/;
|
|
65940
|
+
const regs = reg.exec(url);
|
|
65941
|
+
if (regs && regs.length > 0) {
|
|
65942
|
+
return regs[1];
|
|
65943
|
+
}
|
|
65944
|
+
return "";
|
|
65945
|
+
}
|
|
65876
65946
|
function matchsEnd(key, matchs) {
|
|
65877
65947
|
if (matchs && matchs.length > 0) {
|
|
65878
65948
|
for (const value of matchs) {
|
|
@@ -65925,6 +65995,7 @@ var defaultConfig = {
|
|
|
65925
65995
|
*/
|
|
65926
65996
|
extensions: ["js", "ts"],
|
|
65927
65997
|
suffixReg: defaultSuffixReg,
|
|
65998
|
+
fileTongre: false,
|
|
65928
65999
|
/**
|
|
65929
66000
|
* 是否替换文件
|
|
65930
66001
|
*/
|
|
@@ -66098,15 +66169,30 @@ var FangCom = class {
|
|
|
66098
66169
|
);
|
|
66099
66170
|
}
|
|
66100
66171
|
}
|
|
66101
|
-
getFileNotes() {
|
|
66102
|
-
|
|
66103
|
-
|
|
66104
|
-
|
|
66105
|
-
`
|
|
66106
|
-
|
|
66107
|
-
|
|
66108
|
-
" */"
|
|
66172
|
+
getFileNotes(url) {
|
|
66173
|
+
const suffix = getSuffix2(url);
|
|
66174
|
+
const sz = [
|
|
66175
|
+
`@config cover=false`,
|
|
66176
|
+
`cover \u662F\u5426\u8986\u76D6\u5F53\u524D\u6587\u4EF6\uFF0C\u9ED8\u8BA4\u662Ffalse\uFF0C true \u8868\u793A\u4E0D\u8986\u76D6`,
|
|
66177
|
+
`\u5F53\u524D\u5DF2\u7ECF\u7531@fangzhongya/create\u81EA\u52A8\u751F\u6210`,
|
|
66178
|
+
`${(/* @__PURE__ */ new Date()).toString()}`
|
|
66109
66179
|
];
|
|
66180
|
+
const hy = ["md", "html", "vue"];
|
|
66181
|
+
if (hy.includes(suffix)) {
|
|
66182
|
+
const arr = ["<!--"];
|
|
66183
|
+
sz.forEach((v) => {
|
|
66184
|
+
arr.push(" - " + v);
|
|
66185
|
+
});
|
|
66186
|
+
arr.push("-->");
|
|
66187
|
+
return arr;
|
|
66188
|
+
} else {
|
|
66189
|
+
const arr = ["/**"];
|
|
66190
|
+
sz.forEach((v) => {
|
|
66191
|
+
arr.push(" * " + v);
|
|
66192
|
+
});
|
|
66193
|
+
arr.push(" */");
|
|
66194
|
+
return arr;
|
|
66195
|
+
}
|
|
66110
66196
|
}
|
|
66111
66197
|
/**
|
|
66112
66198
|
* 输出文件,判断目录是否存在
|
|
@@ -66161,7 +66247,10 @@ var FangCom = class {
|
|
|
66161
66247
|
* @param callback
|
|
66162
66248
|
*/
|
|
66163
66249
|
setOpen(url, str, type, callback) {
|
|
66164
|
-
let tn = this.config.
|
|
66250
|
+
let tn = this.config.fileTongre ? 3 : 2;
|
|
66251
|
+
if (this.config.fileCover) {
|
|
66252
|
+
tn = 0;
|
|
66253
|
+
}
|
|
66165
66254
|
if (tn == 2) {
|
|
66166
66255
|
if (this.isForceUpdate(url)) {
|
|
66167
66256
|
tn = 0;
|
|
@@ -66171,7 +66260,7 @@ var FangCom = class {
|
|
|
66171
66260
|
tn = type;
|
|
66172
66261
|
}
|
|
66173
66262
|
if (this.config.writeNotes && !/\.json$/.test(url)) {
|
|
66174
|
-
str = this.getFileNotes().join("\n") + "\n" + str;
|
|
66263
|
+
str = this.getFileNotes(url).join("\n") + "\n" + str;
|
|
66175
66264
|
}
|
|
66176
66265
|
fsOpenStream(
|
|
66177
66266
|
url,
|
|
@@ -66239,7 +66328,7 @@ var FangCom = class {
|
|
|
66239
66328
|
}
|
|
66240
66329
|
};
|
|
66241
66330
|
|
|
66242
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.3-
|
|
66331
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.3-8/node_modules/@fangzhongya/create/dist/bins/md.js
|
|
66243
66332
|
var defaultConfig2 = Object.assign(
|
|
66244
66333
|
{},
|
|
66245
66334
|
defaultConfig,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../../utils/index.cjs"),w=require("../../utils/glob.cjs"),h=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../../utils/index.cjs"),w=require("../../utils/glob.cjs"),h=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.cjs"),a=require("../../utils/props.cjs");function T(e,s){let r=e.charAt(0),l=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]],o=l.map(c=>c[0]).indexOf(r);if(o!=-1){let n=new RegExp("^"+l[o][0]+"((.|\\n|\\r)+?)"+l[o][1]+(s?"\\s":""),"gi").exec(e);if(n)return n[0]}}function k(e){delete e.problems,delete e.source;let s=e.tag,r=e.name,l=e.description,t=e.default,o="";if(s=="default")r=r.trim(),r=T(r)||r;else if(s=="selectable")r=r.trim();else{if(r.includes("=")){const p=r.split("=");r=p[0];const y=p[1]+" "+l,x=T(y,!0);x?(t=x,l=y.replace(x,"")):t=e.default||p[1]||""}const n=/\s*\((.*)\)\s/gi.exec(l);n&&n.length>0&&(o=n[1],l=l.replace(n[0],""))}return e.name=r,e.default=t||"",e.description=l,e.selectable=o,e}let b=[];function v(e){let s=["title","text","author","date"],r=i(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),E(l),r.arr.forEach(t=>{u(t.key,t.value)})}function E(e){b.push(e)}let f=[];function M(e){let s=["props","name","type","default","selectable","description","descriptions"],r=i(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),A(l),r.arr.forEach(t=>{u(t.key,t.value)})}function A(e){f=h.replaceAfter(f,e,"name")}let d=[];function N(e){let s=["slot","name","selectable","description","descriptions"],r=i(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),O(l),r.arr.forEach(t=>{u(t.key,t.value)})}function O(e){d=h.replaceAfter(d,e,"name")}let m=[];function F(e){let s=["emits","name","selectable","description","descriptions"],r=i(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),P(l),r.arr.forEach(t=>{u(t.key,t.value)})}function P(e){m=h.replaceAfter(m,e,"name")}let g=[];function G(e){let s=["expose","name","type","selectable","description","descriptions"],r=i(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),S(l),r.arr.forEach(t=>{u(t.key,t.value)})}function S(e){g=h.replaceAfter(g,e,"name")}function i(e,s){var t;const r={descriptions:(e==null?void 0:e.description)||""},l=[];return e!=null&&e.tags&&((t=e==null?void 0:e.tags)==null||t.forEach(o=>{let c=o.tag,n=k(o);if(!r.hasOwnProperty(c))r[c]=n;else{const p={};p[c]=n,l.push({key:c,value:p})}})),{arr:l,obj:r}}function u(e,s){switch(e){case"title":return E(s),!0;case"text":return E(s),!0;case"props":return A(s),!0;case"slot":return O(s),!0;case"emits":return P(s),!0;case"expose":return S(s),!0;default:return!1}}function K(e,s){switch(e){case"title":return v(s),!0;case"props":return M(s),!0;case"slot":return N(s),!0;case"emits":return F(s),!0;case"expose":return G(s),!0;default:return!1}}function z(e){return b=[],f=[],d=[],m=[],g=[],e==null||e.forEach(s=>{let r=(s==null?void 0:s.tags)||[],l=(r==null?void 0:r.length)||0;if(l>0)for(let t=0;t<l;t++){const o=r[t]||{};if(K(o.tag,s))break}}),{titles:b,propss:f,slots:d,emitss:m,exposes:g}}function C(e){return new Promise(s=>{w.getLocalTextComponents(e).then(r=>{let l=q.getTextNotes(r);s(z(l))})})}const D=[{label:"属性名",prop:"name",formatter:a.props.name},{label:"说明",prop:"description",formatter:a.props.description},{label:"类型",prop:"type",formatter:a.props.type},{label:"可选值",prop:"selectable",formatter:a.props.selectable},{label:"默认值",prop:"default",formatter:a.props.default}],H=[{label:"事件名",prop:"name",formatter:a.emits.name},{label:"说明",prop:"description",formatter:a.emits.description},{label:"回调参数",prop:"selectable",formatter:a.emits.selectable}],L=[{label:"方法名",prop:"name",formatter:a.expose.name},{label:"说明",prop:"description",formatter:a.expose.description},{label:"参数",prop:"selectable",formatter:a.expose.selectable},{label:"返回值",prop:"type",formatter:a.expose.type}],R=[{label:"插槽名",prop:"name",formatter:a.slot.name},{label:"说明",prop:"description",formatter:a.slot.description},{label:"作用域参数",prop:"selectable",formatter:a.slot.selectable}];exports.getKeyMds=w.getKeyMds;exports.getNotes=C;exports.temits=H;exports.texpose=L;exports.tprops=D;exports.tslot=R;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTextNotes as N } from "../../utils/index.js";
|
|
2
2
|
import { getLocalTextComponents as S } from "../../utils/glob.js";
|
|
3
3
|
import { getKeyMds as Y } from "../../utils/glob.js";
|
|
4
|
-
import { replaceAfter as x } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
4
|
+
import { replaceAfter as x } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOH6G74S.js";
|
|
5
5
|
import { props as i, emits as b, expose as u, slot as y } from "../../utils/props.js";
|
|
6
6
|
function O(e, l) {
|
|
7
7
|
let r = e.charAt(0), a = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const t=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
|
|
@@ -5,7 +5,7 @@ import E from "./set-code.vue.js";
|
|
|
5
5
|
import O from "./set-expose.vue.js";
|
|
6
6
|
import $ from "./set-slot.vue.js";
|
|
7
7
|
import { getPropsValue as D, getEmitsValue as w, getExposeValue as U, getSlotValue as k } from "../../utils/props.js";
|
|
8
|
-
import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
8
|
+
import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
9
9
|
const K = g({
|
|
10
10
|
/**
|
|
11
11
|
* @props {Stinrg} value 插入数据
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs"),v=require("../../util.cjs"),C={class:"form-select"},x=["value","disabled","onClick","onBlur"],A=["onMousemove","onMouseout"],j={class:"form-select-list"},O={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},L=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),y=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{b()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function k(t){return new Function("",`{
|
|
2
2
|
var a = ${t};
|
|
3
3
|
return a;
|
|
4
4
|
}`)}function b(){r.value=[];let t=l.modelValue,n=[];const o=k(t);if(o instanceof Array&&(n=o),l.list)for(let i=0;i<l.list.length;i++){const f=l.list[i];n.includes(s(f))&&r.value.push(f)}m()}function d(t){var o;let n=(o=l.config)==null?void 0:o.label;return n&&typeof t=="object"&&t?t[n]:t}function s(t){var o;let n=(o=l.config)==null?void 0:o.prop;return n&&typeof t=="object"&&t?t[n]:t}function B(t){return r.value.map(n=>s(n)).includes(s(t))}function w(){l.disabled||(a.value=!0)}function M(){c.value||(a.value=!1)}function V(){c.value=!0}function E(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=S.toggleArray(r.value,t,l.config.prop),m()}function m(){let t=_(r.value.map(n=>s(n)));g("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("input",{value:e.unref(y),readonly:"",placeholder:"请选择",type:"text",disabled:l.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(w,["stop"]),onBlur:e.withModifiers(M,["stop"])},null,40,x),e.createElementVNode("div",{onMousemove:e.withModifiers(V,["stop"]),onMouseout:e.withModifiers(E,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:B(o)}]),onClick:e.withModifiers(f=>N(o),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(o)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q," 暂无数据 "))],512),[[e.vShow,a.value]])],40,A)]))}});module.exports=L;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as T, ref as c, computed as h, watch as L, openBlock as s, createElementBlock as i, createElementVNode as f, unref as z, withModifiers as u, withDirectives as D, Fragment as E, renderList as F, normalizeClass as I, toDisplayString as O, vShow as $ } from "vue";
|
|
2
|
-
import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
2
|
+
import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js";
|
|
3
3
|
import { getSonType as P, getString as q } from "../../util.js";
|
|
4
4
|
const G = { class: "form-select" }, H = ["value", "disabled", "onClick", "onBlur"], K = ["onMousemove", "onMouseout"], Q = { class: "form-select-list" }, R = {
|
|
5
5
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("./util.cjs"),V=require("../code/highlight.vue.cjs"),N=require("../../utils/index.cjs"),O=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./util.cjs"),V=require("../code/highlight.vue.cjs"),N=require("../../utils/index.cjs"),O=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),_=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),S=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),q={class:"set-code"},y=e.createElementVNode("div",null,"代码",-1),F={class:"but-div set-code-but"},w=["onClick"],B={class:"set-code-html"},J=e.defineComponent({__name:"set-code",props:{name:{type:String},value:{type:Object},slotValue:{type:Object},propsText:{type:Object}},setup(b){const r=b,m=e.computed(()=>{const s=[],t=[];let i=!0;const n=r.value;Object.keys(n).forEach(o=>{let p=n[o];if(/^on[A-Z]/.test(o)&&typeof p=="function"){let u=o.substring(2);const a=o.split(":");let l;if(a.length>1?(l=a[0]+a.slice(1).map(f=>_.firstUpper(f)).join(""),u=S.firstLower(u)):(l=a[0],u=O.humpToLine(u)),a.includes("-")){let f=l.split("-");f=f.map((g,E)=>E!=0?_.firstUpper(g):g),l=f.join("")}s.push(" @"+u+'="'+l+'"'),t.push("function "+l+"(...arr) {"),t.push(" console.log('"+l+"', arr)"),t.push("}")}else if(s.push(" :"+o+'="'+o+'"'),typeof p=="function")t.push("const "+o+" = "+$(p,o));else if(i&&(i=!1,t.unshift("import { ref } from 'vue';")),typeof p>"u")t.push("const "+o+" = ref();");else{let u=T(p,o);t.push("const "+o+" = ref("+u+");")}}),s.length>0&&s.unshift("");const c=x(r.slotValue);return`<!--${r.name}-->
|
|
2
2
|
<template>
|
|
3
3
|
<div>
|
|
4
4
|
<${r.name}${s.join(`
|
|
@@ -2,9 +2,9 @@ import { defineComponent as C, computed as F, ref as O, openBlock as w, createEl
|
|
|
2
2
|
import { vueFormat as g, getFunctionFormat as H, prettierFormat as J, getFunBody as M } from "./util.js";
|
|
3
3
|
import U from "../code/highlight.vue.js";
|
|
4
4
|
import { copyCode as Z } from "../../utils/index.js";
|
|
5
|
-
import { humpToLine as q } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
6
|
-
import { firstUpper as _ } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
7
|
-
import { firstLower as z } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
5
|
+
import { humpToLine as q } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
6
|
+
import { firstUpper as _ } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
|
|
7
|
+
import { firstLower as z } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
8
8
|
const G = { class: "set-code" }, I = /* @__PURE__ */ f("div", null, "代码", -1), K = { class: "but-div set-code-but" }, P = ["onClick"], Q = { class: "set-code-html" }, ot = /* @__PURE__ */ C({
|
|
9
9
|
__name: "set-code",
|
|
10
10
|
props: {
|
package/dist/packages/config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs"),n={components:[]};function o(e){return t.mergeObject(n,e,2)}function r(e){return n[e]}exports.getConfig=r;exports.userConfig=o;
|
package/dist/packages/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js";
|
|
2
2
|
const o = {
|
|
3
3
|
components: []
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.cjs"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.cjs"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),m=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),A=["vue","js"];function K(t,e){let n=R.humpToLine(t.name),i=[];return t.alias&&i.push(t.alias+"-"+n),e&&e.length>0&&e.forEach(s=>{t.alias&&i.push(t.alias+"-"+s+"-"+n),i.push(s+"-"+n)}),i}function T(t){return t.sort((e,n)=>{let i=m.appearNum(e,"/"),s=m.appearNum(n,"/");return i==s?n.length-e.length:s-i}),t}function C(t=[],e=[],n=[]){let i=e;(!i||i.length==0)&&(i=A);let s=[];return t&&t.length>0&&(s=t),n&&n.length>0&&n.forEach(l=>{i==null||i.forEach(a=>{s.push(l+"."+a)})}),s=[...new Set(s)],T(s)}function N(t,e,n={},i=""){for(let s=0;s<e.length;s++){const l=e[s],a=new RegExp("^.*/([^/]+)"+l+"$");let c=t.match(a);if(c){const p=[],u={};let f="";Object.keys(n).forEach(g=>{let h=n[g];t.startsWith(h+"/")&&(f=h,u[g]=h,p.push(g))});let o=c[1],r={dir:"",suffix:E.getSuffix(t),name:q.lineToLargeHump(o),value:o,key:"",tdir:"",adir:f,alias:i,aliass:u,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0};return r.aliasNames=K(r,p),r}}}function y(t){x.setSession("aside.key",t)}function D(){return x.getSession("aside.key")}function H(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function w(t,e){return e?new RegExp(e+".+(\\.(js|ts))?$").test(t):!1}function S(t,e){return e?new RegExp("/"+e+"(\\.(js|ts))?$").test(t):!1}function M(t,e,n,i,s){const l=[],a=[],c=C(e.matchexts,e.extensions,e.matchs),p=H(e.dir);return t.forEach(u=>{const f=new RegExp("^"+e.dir);let o=u.replace(f,"");if(s.comprops&&w(o,s.comprops)||s.curprops&&S(o,s.curprops)){let r={};r.comprops=s.comprops||"",r.curprops=s.curprops||"",r.value=o,r.dir=e.dir,r.suffix=E.getSuffix(u),r.tdir=p,r.key=u,r.raw="",r.getRaw=d(n,u),l.push(r)}else{let r=N(o,c,e.aliass,e.alias);r&&(r.comprops=s.comprops,r.curprops=s.curprops,r.dir=e.dir,r.tdir=p,r.key=u,r.component=i[u],r.getRaw=d(n,u),a.push(r))}}),{props:l,components:a}}function d(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=A;exports.getAsideKey=D;exports.getComponentsArr=M;exports.getMatchs=C;exports.getRawValue=d;exports.getUrlName=N;exports.isComprops=w;exports.isCurprops=S;exports.setAsideKey=y;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setSession as E, getSession as w } from "./storage.js";
|
|
2
|
-
import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
3
|
-
import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
4
|
-
import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
5
|
-
import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
2
|
+
import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
3
|
+
import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
4
|
+
import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js";
|
|
5
|
+
import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
|
|
6
6
|
const R = ["vue", "js"];
|
|
7
7
|
function S(t, e) {
|
|
8
8
|
let n = N(t.name), i = [];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../config.cjs"),m=require("./common.cjs"),w=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../config.cjs"),m=require("./common.cjs"),w=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),L=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),M=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs"),P=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs"),x=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),H=require("./index.cjs"),f={},R={},q=[],A={},S={},d={};function I(){return y.getConfig("example")}function j(e,t,s){const n=Object.assign({exampless:[],examplessRaw:[]},t,s),r=[],a=n.examples;a&&Object.keys(a).forEach(l=>{r.push(l),S[l]=a[l]});const i=n.examplesRaw,o=[];n.urls&&n.urls.length>0?(n.exampless=n.urls,n.urls.forEach(l=>{o.push(l),i&&(d[l]=N(i,l))})):(n.exampless=r,i&&Object.keys(i).forEach(l=>{o.push(l),i&&(d[l]=N(i,l))})),n.examples=void 0,n.examplessRaw=o,n.examplesRaw=void 0,A[e]=n}function N(e,t){return typeof e=="function"?e:e&&(e[t]||e)}async function k(e,t){let s="";if(t=="vue"){let r=new RegExp(/(<script([^>]*)>)((.|\n|\r)*)(<\/script>)/g).exec(e);r&&(s=r[3])}else(t=="js"||t=="ts"||t=="")&&(s=e);if(s){const n=await H.getTextImport(s);let r=n==null?void 0:n.map(i=>i.n);const a=[];return r&&r.length>0&&r.forEach(i=>{i&&(i.startsWith("./")||i.startsWith("../"))&&a.push(i)}),a}}function U(e){return new Promise(t=>{e?e.raw?t(e.raw):e.getRaw?e.getRaw(e).then(s=>{const n=(s||"")+"";e.raw=n,e.getRaw=null,t(n)}):t(""):t("")})}function V(e,t){e=(e||"")+"";let s="";switch(e){case"1":s=t.tdir+"/";break;case"2":s=t.adir+"/";break;case"3":s=t.tdir+"/"+t.adir+"/";break}return s}function W(e,t,s){var o,l;e=(e||"")+"",s=(s||"")+"";let n=w.humpToLine(t.name),r=[];const a=Object.values(t.aliass||{});if(e==="1")t.alias&&r.push(t.alias+"-"+n);else if(e==="2")a&&a.length>0&&a.forEach(c=>{r.push(c+"-"+n)});else if(e==="3"){let c="";t.alias&&(c=t.alias+"-"),a==null||a.forEach(u=>{r.push(c+u+"-"+n)})}else e==="4"?(o=t.aliasNames)==null||o.forEach(c=>{r.push(w.humpToLine(c))}):e=="9"&&(r.push(n),(l=t.aliasNames)==null||l.forEach(c=>{r.push(w.humpToLine(c))}));r.length==0&&r.push(n);let i=[];return s==="1"?r.forEach(c=>{let u=E.lineToLargeHump(c);i.push(u,L.firstLower(u))}):s==="2"?r.forEach(c=>{let u=E.lineToLargeHump(c);i.push(c,u,L.firstLower(u))}):i=[...r],i=[...new Set(i)],i}function b(e,t,s,n){const r=[];return s.examplessRaw.forEach(a=>{for(let i=0;i<t.length;i++){const o=t[i];if(a==e+o+"/"+s.md+".md"){r.push({topurl:e,comkey:n.key,suffix:x.getSuffix(a),name:n.name,value:o,key:a,raw:"",getRaw:m.getRawValue(d,a)});break}}}),r}function T(e){h();const t=f[e];if(t.tests)return t.tests;{const s=A[t.dir],n=s.dir+V(s.level||0,t),r=W(s.aliaslevel||0,t,s.componentName||0);t.mds=b(n,r,s,t);const a={};return s.exampless.forEach(i=>{for(let o=0;o<r.length;o++){const l=r[o];if(i.startsWith(n+l+"/")){const c=new RegExp("^\\"+n+l+"/(.*)/index\\."+m.defaultExtensions.join("|")+"$");let u="",p=i.match(c);p&&p.length>1&&(u=p[1]),a[i]={topurl:n,name:l,value:u,suffix:x.getSuffix(i),comname:t.name,comkey:t.key,key:i,component:S[i],raw:"",getRaw:m.getRawValue(d,i)};break}}}),t.tests=a,a}}function B(e){if(e){const t=T(e);return Object.values(t)}else return[]}function D(e,t,s){h();const n=T(s),r=[];if(t){let a=n[t];if(a)return r.push(a),r}return Object.values(n).forEach(a=>{a.name+"/"+a.value==e&&r.push(a)}),r}function F(e){return T(e),f[e].mds}async function C(e,t,s,n){let r=await k(t,s)||[],a=e.split("/");return r.map(i=>{if(i.startsWith("./")){let o=a.slice(0,a.length-1).join("/"),l=i.substring(2);return{name:i,comprops:n||"",value:l,suffix:x.getSuffix(i),head:o,key:o+"/"+l}}else{let o=i.split("/"),l=0;for(let O=0;O<o.length;O++)if(o[O]!=".."){l=O;break}let c=o.slice(l,o.length),u=a.slice(0,a.length-l-1).join("/"),p=c.join("/");return{name:i,comprops:n||"",value:p,suffix:x.getSuffix(i),head:u,key:u+"/"+p}}})}function J(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>({raw:"",value:n.value,suffix:x.getSuffix(n.key),key:n.key,getRaw:m.getRawValue(d,n.key)}));P.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(o=>{const l=(o||"")+"";a.raw=l,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}function X(){const e=I(),t=y.getConfig("components");t==null||t.forEach(s=>{var r;$(s);let n=s.dir||((r=s==null?void 0:s.resolver)==null?void 0:r.dir)||"";j(n,e,s.example)})}const g="default";function Z(e){let t=w.humpToLine(e.name),s=[...e.aliasNames];s.push(t),s.forEach(n=>{q.push({name:n,value:e.key})})}function Q(e,t){const s={};t==null||t.forEach(n=>{f[n.key]=n,Z(n);const r=Object.values(n.aliass||{});r&&r.length?r.forEach(a=>{s[a]=s[a]||[],s[a].push(n.key)}):(s[g]=s[g]||[],s[g].push(n.key))})}function $(e){var n;let t,s;if(e.resolver)t=e.alias||((n=e.resolver)==null?void 0:n.alias)||g,s=m.getComponentsArr(e.resolver.urls||[],e.resolver,e.componentsRaw,e.components,e);else{t=e.alias||g;let r=(e==null?void 0:e.urls)||Object.keys(e.componentsRaw);s=m.getComponentsArr(r,e,e.componentsRaw,e.components,e)}s&&(s!=null&&s.props)&&s.props.forEach(r=>{R[r.key]=r}),Q(t,s.components)}function G(e){return h(),f[e]}function h(){return Object.keys(f).length==0&&X(),Object.values(f)}function Y(e,t,s){h();const n=[];if(s){let a=f[s];if(a&&a.key)return[a]}let r=w.humpToLine(e);return q.forEach(a=>{t?a.name.includes(r)&&n.push(f[a.value]):a.name==r&&n.push(f[a.value])}),M.duplicateRemoval(n,"key")}async function _(e,t){let s=e;if(e){let n=(await C(t.key,e,t.suffix,t.comprops)).filter(r=>r.key.startsWith(t.head)||m.isComprops(r.name,t.comprops||""));s=await K(n)+s}return s}function z(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>R[n.key]||R[n.key+".js"]||R[n.key+".ts"]);P.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(async o=>{const l=(o||"")+"";let c=await _(l,e[i]);a.raw=c,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}async function K(e){const t=await z(e);return((t==null?void 0:t.map(n=>n.raw))||[]).join(`
|
|
2
2
|
`)}async function v(e,t){let s=e;if(e&&(t.comprops||t.curprops)){let n=(await C(t.key,e,t.suffix,t.comprops||"")).filter(a=>m.isComprops(a.name,t.comprops||"")||m.isCurprops(a.name,t.curprops||""));s=await K(n)+s}return s}function ee(e){return new Promise(t=>{if(e){h();const s=f[e];s?s.raw?t(s.raw):s.getRaw?s.getRaw(s).then(async n=>{const r=(n||"")+"",a=await v(r,s);s.raw=a,s.getRaw=null,t(a)}):t(""):t("")}else t("")})}exports.defaultName=g;exports.getCompoName=Y;exports.getCompoNameKey=G;exports.getCompoNameObj=h;exports.getKeyMds=F;exports.getLocalTextArr=J;exports.getLocalTextComponents=ee;exports.getLocalTextTests=U;exports.getTestImportUrl=C;exports.getTestName=B;exports.getTestNameObj=D;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getConfig as L } from "../config.js";
|
|
2
2
|
import { getRawValue as O, getComponentsArr as T, defaultExtensions as j, isComprops as W, isCurprops as S } from "./common.js";
|
|
3
|
-
import { humpToLine as p } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
4
|
-
import { lineToLargeHump as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
5
|
-
import { firstLower as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
6
|
-
import { duplicateRemoval as V } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
7
|
-
import { asyncMergeArray as y } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
8
|
-
import { getSuffix as g } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
3
|
+
import { humpToLine as p } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
4
|
+
import { lineToLargeHump as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
5
|
+
import { firstLower as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
6
|
+
import { duplicateRemoval as V } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js";
|
|
7
|
+
import { asyncMergeArray as y } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js";
|
|
8
|
+
import { getSuffix as g } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
|
|
9
9
|
import { getTextImport as F } from "./index.js";
|
|
10
10
|
const m = {}, R = {}, A = [], I = {}, K = {}, w = {};
|
|
11
11
|
function H() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/vue-archive",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.2-
|
|
4
|
+
"version": "0.0.2-32",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"registry": "https://registry.npmjs.org/"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@fangzhongya/create": "0.2.3-
|
|
22
|
-
"@fangzhongya/utils": "0.0.7-
|
|
21
|
+
"@fangzhongya/create": "0.2.3-8",
|
|
22
|
+
"@fangzhongya/utils": "0.0.7-18",
|
|
23
23
|
"@fangzhongya/vue-components": "0.1.3-8",
|
|
24
24
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
25
25
|
"@types/node": "^18.14.0",
|