fast-vue-multi-pages-vite 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/vite/index.d.ts +4 -1
- package/vite/index.js +12 -3
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import axios from "axios";
|
|
|
4
4
|
import { clear, del, get, keys, set, update } from "idb-keyval";
|
|
5
5
|
import CryptoJSMD5 from "crypto-js/md5";
|
|
6
6
|
import * as uuid from "uuid";
|
|
7
|
-
import
|
|
7
|
+
import * as pako from "pako";
|
|
8
8
|
import store from "store2";
|
|
9
9
|
import cookies from "js-cookie";
|
|
10
10
|
import copy from "copy-to-clipboard";
|
|
@@ -997,7 +997,7 @@ let FastVueMultiHttp;
|
|
|
997
997
|
const posFactor = i & 255;
|
|
998
998
|
unCompressData[i] = (uint8Data[i] ^ k ^ posFactor) & 255;
|
|
999
999
|
}
|
|
1000
|
-
const decompressedData =
|
|
1000
|
+
const decompressedData = pako.ungzip(unCompressData);
|
|
1001
1001
|
doReturn(new TextDecoder("utf-8").decode(decompressedData));
|
|
1002
1002
|
} else doReturn(new TextDecoder("utf-8").decode(uint8Data));
|
|
1003
1003
|
}).catch(function(error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-vue-multi-pages-vite",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"author": "janesen",
|
|
5
5
|
"description": "Vite-快速搭建VUE项目工具类的基本库,主要用于多个页面独立生成html",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"wavesurfer.js": "^7.9.4",
|
|
48
48
|
"lz-string": "^1.5.0",
|
|
49
49
|
"zstddec": "^0.2.0",
|
|
50
|
-
"
|
|
50
|
+
"pako": "^3.0.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.8.1",
|
package/vite/index.d.ts
CHANGED
|
@@ -233,7 +233,10 @@ declare class FastViteMultiTool {
|
|
|
233
233
|
}: any): void;
|
|
234
234
|
configResolved(resolvedConfig: any): void;
|
|
235
235
|
configureServer(server: any): void;
|
|
236
|
-
transform(source: string, id: string):
|
|
236
|
+
transform(source: string, id: string): {
|
|
237
|
+
code: any;
|
|
238
|
+
map: any;
|
|
239
|
+
};
|
|
237
240
|
transformIndexHtml: {
|
|
238
241
|
order: string;
|
|
239
242
|
handler(html: string, ctx: any): {
|
package/vite/index.js
CHANGED
|
@@ -915,13 +915,22 @@ var FastViteMultiTool = class FastViteMultiTool {
|
|
|
915
915
|
transform(source, id) {
|
|
916
916
|
source = FastViteTransformText.transform(id, source, option);
|
|
917
917
|
if (id.includes(".vue") || id.includes("/src/") && id.includes(".js")) source = FastViteTransformResources.transform(source, option);
|
|
918
|
-
if (id.includes(".vue")) return
|
|
918
|
+
if (id.includes(".vue")) return {
|
|
919
|
+
code: FastViteTransformVue.transform(source, option),
|
|
920
|
+
map: null
|
|
921
|
+
};
|
|
919
922
|
if (FastViteMultiTool._viteConfig.command === "build") {
|
|
920
923
|
if (option.safeCodeJsFileName) {
|
|
921
|
-
for (let fileName of option.safeCodeJsFileName) if (id.includes(fileName)) return
|
|
924
|
+
for (let fileName of option.safeCodeJsFileName) if (id.includes(fileName)) return {
|
|
925
|
+
code: FastJavascriptObfuscator.getObfuscateCode(source),
|
|
926
|
+
map: null
|
|
927
|
+
};
|
|
922
928
|
}
|
|
923
929
|
}
|
|
924
|
-
return
|
|
930
|
+
return {
|
|
931
|
+
code: source,
|
|
932
|
+
map: null
|
|
933
|
+
};
|
|
925
934
|
},
|
|
926
935
|
transformIndexHtml: {
|
|
927
936
|
order: "pre",
|