@shijiu/jsview 2.3.0 → 3.0.0-next-vue.0
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/dom/bin/jsview-dom-browser-engine-core.min.js +1 -1
- package/dom/bin/jsview-dom-browser-engine-modules.min.js +1 -1
- package/dom/bin/{jsview-dom-browser-forge.1436.54c9.wasm → jsview-dom-browser-forge.1760.0e35.wasm} +0 -0
- package/dom/bin/jsview-dom-browser-forge.min.js +1 -1
- package/dom/bin/jsview-dom-browser-forge.worker.min.js +1 -1
- package/dom/bin/jsview-dom-browser.min.js +1 -1
- package/dom/bin/jsview-dom-native.min.js +1 -1
- package/dom/bin/jsview-engine-js-native.min.js +1 -1
- package/dom/target_core_revision.mjs +2 -2
- package/loader/jsv-core-api/jsview-core-api-glue.js +10 -1
- package/loader/jsv-core-api/wasm/core-api.js +87 -1
- package/loader/jsv-core-api/wasm/wasm-extension.js +5 -0
- package/loader/jsview-loader.js +7 -0
- package/loader/jsview-main.mjs +2 -1
- package/loader/jsview.config.default.js +4 -0
- package/package.json +7 -5
- package/patches/@vitejs+plugin-vue+4.0.0.patch +51 -0
- package/patches/@vitejs+plugin-vue+6.0.6.patch +54 -0
- package/patches/@vue+compiler-dom+3.2.45.patch +22 -0
- package/patches/@vue+compiler-dom+3.6.0-beta.10.patch +22 -0
- package/patches/@vue+compiler-sfc+3.2.45.patch +1986 -0
- package/patches/@vue+compiler-sfc+3.6.0-beta.10.patch +69 -0
- package/patches/@vue+runtime-core+3.2.45.patch +353 -0
- package/patches/@vue+runtime-core+3.6.0-beta.10.patch +196 -0
- package/patches/@vue+runtime-dom+3.2.45.patch +81 -0
- package/patches/@vue+runtime-dom+3.6.0-beta.10.patch +47 -0
- package/patches/postcss-js+5.1.0.patch +20 -0
- package/patches/vite+4.0.0.patch +117 -0
- package/patches/vite+8.0.9.patch +77 -0
- package/patches/vue-router+4.1.6.patch +17 -0
- package/patches/vue-router+5.0.6.patch +0 -0
- package/{patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js → thirdparty/@vue/compiler-sfc/jsview-css-to-js.cjs} +15 -10
- package/{patches/node_modules/@vue/compiler-sfc/dist/jsview-style-checker.js → thirdparty/@vue/compiler-sfc/jsview-style-checker.cjs} +6 -1
- package/{patches/node_modules/@vue/compiler-sfc/dist/jsview-style-formator.cjs.js → thirdparty/@vue/compiler-sfc/jsview-style-formator.cjs} +3 -0
- package/thirdparty/@vue/runtime-core/jsview-render-break.mjs +189 -0
- package/thirdparty/vite/jsview-vite-extension.mjs +336 -0
- package/tools/jsview-build-zip.mjs +7 -2
- package/tools/jsview-common.mjs +18 -4
- package/tools/{jsview-logger.js → jsview-logger.cjs} +1 -1
- package/tools/jsview-post-build.mjs +88 -6
- package/tools/jsview-post-install.mjs +110 -103
- package/tools/jsview-run-tool.mjs +3 -6
- package/tools/jsview-vue-devtools.mjs +1 -1
- package/loader/jsview-react-main.js +0 -37
- package/loader/jsview-react-script-loader.js +0 -134
- package/patches/node_modules/@vitejs/plugin-react/dist/index.cjs +0 -520
- package/patches/node_modules/@vitejs/plugin-react/package.json +0 -55
- package/patches/node_modules/@vitejs/plugin-vue/dist/index.mjs +0 -2756
- package/patches/node_modules/@vitejs/plugin-vue/package.json +0 -51
- package/patches/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +0 -3152
- package/patches/node_modules/@vue/compiler-dom/package.json +0 -43
- package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +0 -17730
- package/patches/node_modules/@vue/compiler-sfc/package.json +0 -59
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -8154
- package/patches/node_modules/@vue/runtime-core/package.json +0 -38
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +0 -1531
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1740
- package/patches/node_modules/@vue/runtime-dom/package.json +0 -42
- package/patches/node_modules/postcss-js/objectifier.js +0 -94
- package/patches/node_modules/postcss-js/package.json +0 -42
- package/patches/node_modules/react-dev-utils/WebpackDevServerUtils.js +0 -450
- package/patches/node_modules/react-dev-utils/package.json +0 -88
- package/patches/node_modules/react-dom/cjs/react-dom.development.js +0 -29868
- package/patches/node_modules/react-dom/cjs/react-dom.production.min.js +0 -323
- package/patches/node_modules/react-dom/package.json +0 -62
- package/patches/node_modules/react-scripts/config/paths.js +0 -179
- package/patches/node_modules/react-scripts/config/webpack.config.js +0 -858
- package/patches/node_modules/react-scripts/package.json +0 -108
- package/patches/node_modules/vite/dist/node/chunks/dep-ed9cb113.js +0 -63182
- package/patches/node_modules/vite/dist/node/constants.js +0 -125
- package/patches/node_modules/vite/dist/node/jsview-vite-extension.js +0 -245
- package/patches/node_modules/vite/package.json +0 -153
- package/patches/node_modules/vue-router/dist/vue-router.mjs +0 -3613
- package/patches/node_modules/vue-router/package.json +0 -114
- package/patches/node_modules/webpack-dev-server/client/utils/reloadApp.js +0 -76
- package/patches/node_modules/webpack-dev-server/client/utils/sendMessage.js +0 -21
- package/patches/node_modules/webpack-dev-server/package.json +0 -141
- /package/patches/{node_modules/@originjs/vite-plugin-federation/1.3.4/@originjs+vite-plugin-federation+1.3.4.patch → @originjs+vite-plugin-federation+1.3.4.patch} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
2
|
+
index 43b2e3d..ab0a606 100644
|
|
3
|
+
--- a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
4
|
+
+++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
5
|
+
@@ -213,6 +213,11 @@ export interface CSSProperties
|
|
6
|
+
* https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
|
|
7
|
+
*/
|
|
8
|
+
[v: `--${string}`]: string | number | undefined
|
|
9
|
+
+
|
|
10
|
+
+ // JsView Added >>>
|
|
11
|
+
+ // 解决npm run build时,ts判断style自定义属性值错误的问题。
|
|
12
|
+
+ [Jsv: string]: string | number | undefined
|
|
13
|
+
+ // JsView Added <<<
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type Booleanish = boolean | 'true' | 'false'
|
|
17
|
+
diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
18
|
+
index 8d1d1fa..0552d44 100644
|
|
19
|
+
--- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
20
|
+
+++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
21
|
+
@@ -38,6 +38,25 @@ const nodeOps = {
|
|
22
|
+
setScopeId(el, id) {
|
|
23
|
+
el.setAttribute(id, '');
|
|
24
|
+
},
|
|
25
|
+
+// JsView Removed >>>
|
|
26
|
+
+// 删除盒子不支持的cloneNode函数,Vue会自动转为重新创建。
|
|
27
|
+
+/* cloneNode(el) {
|
|
28
|
+
+ const cloned = el.cloneNode(true);
|
|
29
|
+
+ // #3072
|
|
30
|
+
+ // - in `patchDOMProp`, we store the actual value in the `el._value` property.
|
|
31
|
+
+ // - normally, elements using `:value` bindings will not be hoisted, but if
|
|
32
|
+
+ // the bound value is a constant, e.g. `:value="true"` - they do get
|
|
33
|
+
+ // hoisted.
|
|
34
|
+
+ // - in production, hoisted nodes are cloned when subsequent inserts, but
|
|
35
|
+
+ // cloneNode() does not copy the custom property we attached.
|
|
36
|
+
+ // - This may need to account for other custom DOM properties we attach to
|
|
37
|
+
+ // elements in addition to `_value` in the future.
|
|
38
|
+
+ if (`_value` in el) {
|
|
39
|
+
+ cloned._value = el._value;
|
|
40
|
+
+ }
|
|
41
|
+
+ return cloned;
|
|
42
|
+
+ }, */
|
|
43
|
+
+// JsView Removed <<<
|
|
44
|
+
// __UNSAFE__
|
|
45
|
+
// Reason: innerHTML.
|
|
46
|
+
// Static content here can only come from compiled templates.
|
|
47
|
+
@@ -314,6 +333,23 @@ function parseName(name) {
|
|
48
|
+
options[m[0].toLowerCase()] = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
+// JsView Added >>>
|
|
52
|
+
+// 处理自定义的 addEventListener() options, 前缀为jsv
|
|
53
|
+
+// onJsvXxx留给自定义Event,这样判断防止出现下面写法
|
|
54
|
+
+// :jsvevent.jsvoption1.jsvoption2 => onJsvEventJsvOption1JsvOption2
|
|
55
|
+
+ if (name.lastIndexOf('Jsv') > 2) {
|
|
56
|
+
+ options = options ?? {};
|
|
57
|
+
+
|
|
58
|
+
+ const optNames = name.substring(3); // 过滤掉jsvEvent
|
|
59
|
+
+ const optArray = optNames.split('Jsv');
|
|
60
|
+
+ // optArray[0] 为EventName部分内容
|
|
61
|
+
+ for (let idx = optArray.length - 1; idx > 0; idx--) {
|
|
62
|
+
+ const optName = 'jsv' + optArray[idx];
|
|
63
|
+
+ options[optName] = true;
|
|
64
|
+
+ name = name.slice(0, name.length - optName.length);
|
|
65
|
+
+ }
|
|
66
|
+
+ }
|
|
67
|
+
+// JsView Added <<<
|
|
68
|
+
const event = name[2] === ':' ? name.slice(3) : hyphenate(name.slice(2));
|
|
69
|
+
return [event, options];
|
|
70
|
+
}
|
|
71
|
+
@@ -1659,6 +1695,10 @@ function injectCompilerOptionsCheck(app) {
|
|
72
|
+
`- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
|
|
73
|
+
Object.defineProperty(app.config, 'compilerOptions', {
|
|
74
|
+
get() {
|
|
75
|
+
+// JsView Added >>>
|
|
76
|
+
+// 解决连接vuejs-devtools后的大量报警问题
|
|
77
|
+
+ if(!this.jsvVuejsDevtools)
|
|
78
|
+
+// JsView Added <<<
|
|
79
|
+
warn(msg);
|
|
80
|
+
return compilerOptions;
|
|
81
|
+
},
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
2
|
+
index f2047cf..28b0e2b 100644
|
|
3
|
+
--- a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
4
|
+
+++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
|
|
5
|
+
@@ -109,6 +109,12 @@ export interface CSSProperties extends CSS.Properties<string | number>, CSS.Prop
|
|
6
|
+
* https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
|
|
7
|
+
*/
|
|
8
|
+
[v: `--${string}`]: string | number | undefined;
|
|
9
|
+
+
|
|
10
|
+
+ // JsView Added >>>
|
|
11
|
+
+ // 解决npm run build时,ts判断style自定义属性值错误的问题。
|
|
12
|
+
+ [Jsv: string]: string | number | undefined
|
|
13
|
+
+ // JsView Added <<<
|
|
14
|
+
+
|
|
15
|
+
}
|
|
16
|
+
type Booleanish = boolean | "true" | "false";
|
|
17
|
+
type Numberish = number | string;
|
|
18
|
+
diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
19
|
+
index 23a8ee5..28cc77a 100644
|
|
20
|
+
--- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
21
|
+
+++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
22
|
+
@@ -578,6 +578,25 @@ function parseName(name) {
|
|
23
|
+
options[m[0].toLowerCase()] = true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
+
|
|
27
|
+
+// JsView Added >>>
|
|
28
|
+
+// 处理自定义的 addEventListener() options, 前缀为jsv
|
|
29
|
+
+// onJsvXxx留给自定义Event,这样判断防止出现下面写法
|
|
30
|
+
+// :jsvevent.jsvoption1.jsvoption2 => onJsvEventJsvOption1JsvOption2
|
|
31
|
+
+ if (name.lastIndexOf('Jsv') > 2) {
|
|
32
|
+
+ options = options ?? {};
|
|
33
|
+
+
|
|
34
|
+
+ const optNames = name.substring(3); // 过滤掉jsvEvent
|
|
35
|
+
+ const optArray = optNames.split('Jsv');
|
|
36
|
+
+ // optArray[0] 为EventName部分内容
|
|
37
|
+
+ for (let idx = optArray.length - 1; idx > 0; idx--) {
|
|
38
|
+
+ const optName = 'jsv' + optArray[idx];
|
|
39
|
+
+ options[optName] = true;
|
|
40
|
+
+ name = name.slice(0, name.length - optName.length);
|
|
41
|
+
+ }
|
|
42
|
+
+ }
|
|
43
|
+
+// JsView Added <<<
|
|
44
|
+
+
|
|
45
|
+
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
46
|
+
}
|
|
47
|
+
let cachedNow = 0;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
diff --git a/node_modules/postcss-js/objectifier.js b/node_modules/postcss-js/objectifier.js
|
|
2
|
+
index 6cb9d88c..24c47835 100644
|
|
3
|
+
--- a/node_modules/postcss-js/objectifier.js
|
|
4
|
+
+++ b/node_modules/postcss-js/objectifier.js
|
|
5
|
+
@@ -1,4 +1,15 @@
|
|
6
|
+
let UNITLESS = {
|
|
7
|
+
+// JsView Added >>>
|
|
8
|
+
+// 添加将px转为int的属性,用于Css转为Js。
|
|
9
|
+
+ height: true,
|
|
10
|
+
+ left: true,
|
|
11
|
+
+ top: true,
|
|
12
|
+
+ width: true,
|
|
13
|
+
+
|
|
14
|
+
+ fontSize: true,
|
|
15
|
+
+ lineHeight: true,
|
|
16
|
+
+// JsView Added <<<
|
|
17
|
+
+
|
|
18
|
+
boxFlex: true,
|
|
19
|
+
boxFlexGroup: true,
|
|
20
|
+
columnCount: true,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
diff --git a/node_modules/vite/dist/node/chunks/dep-ed9cb113.js b/node_modules/vite/dist/node/chunks/dep-ed9cb113.js
|
|
2
|
+
index 06c7511..b483cfb 100644
|
|
3
|
+
--- a/node_modules/vite/dist/node/chunks/dep-ed9cb113.js
|
|
4
|
+
+++ b/node_modules/vite/dist/node/chunks/dep-ed9cb113.js
|
|
5
|
+
@@ -12601,6 +12601,12 @@ function printServerUrls(urls, optionsHost, info) {
|
|
6
|
+
picocolors.exports.bold('--host') +
|
|
7
|
+
picocolors.exports.dim(' to expose'));
|
|
8
|
+
}
|
|
9
|
+
+// JsView Modified >>>
|
|
10
|
+
+// 将url写入network.mjs文件,用于npm run android。
|
|
11
|
+
+ import('../jsview-vite-extension.js').then((module) => {
|
|
12
|
+
+ module.jsvSaveUrlToCache(urls);
|
|
13
|
+
+ });
|
|
14
|
+
+// JsView Modified <<<
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const groups = [
|
|
18
|
+
@@ -13537,6 +13543,17 @@ const buildEsbuildPlugin = (config) => {
|
|
19
|
+
if (!options) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
+
|
|
23
|
+
+// JsView Added >>>
|
|
24
|
+
+// Minify文件过滤
|
|
25
|
+
+ if(options.minify && tsconfckParseOptions.jsvMinifyExclude) {
|
|
26
|
+
+ const regex = new RegExp(tsconfckParseOptions.jsvMinifyExclude.trim() );
|
|
27
|
+
+ if(regex.test(chunk.name)) {
|
|
28
|
+
+ options.minify = false;
|
|
29
|
+
+ }
|
|
30
|
+
+ }
|
|
31
|
+
+// JsView Added <<<
|
|
32
|
+
+
|
|
33
|
+
const res = await transformWithEsbuild(code, chunk.fileName, options);
|
|
34
|
+
if (config.build.lib) {
|
|
35
|
+
// #7188, esbuild adds helpers out of the UMD and IIFE wrappers, and the
|
|
36
|
+
@@ -13658,6 +13675,10 @@ const tsconfckParseOptions = {
|
|
37
|
+
tsConfigPaths: undefined,
|
|
38
|
+
root: undefined,
|
|
39
|
+
resolveWithEmptyIfConfigNotFound: true,
|
|
40
|
+
+// JsView Added >>>
|
|
41
|
+
+// Minify文件过滤
|
|
42
|
+
+ jsvMinifyExclude: undefined,
|
|
43
|
+
+// JsView Added <<<
|
|
44
|
+
};
|
|
45
|
+
async function initTSConfck(config) {
|
|
46
|
+
const workspaceRoot = searchForWorkspaceRoot(config.root);
|
|
47
|
+
@@ -13669,6 +13690,10 @@ async function initTSConfck(config) {
|
|
48
|
+
skip: (dir) => dir === 'node_modules' || dir === '.git',
|
|
49
|
+
})),
|
|
50
|
+
]);
|
|
51
|
+
+// JsView Added >>>
|
|
52
|
+
+// Minify文件过滤
|
|
53
|
+
+ tsconfckParseOptions.jsvMinifyExclude = config.build.jsvMinifyExclude;
|
|
54
|
+
+// JsView Added <<<
|
|
55
|
+
debug$f(`init tsconfck end`);
|
|
56
|
+
}
|
|
57
|
+
async function loadTsconfigJsonForFile(filename) {
|
|
58
|
+
@@ -39465,6 +39490,12 @@ function normalizeHmrUrl(url) {
|
|
59
|
+
if (!url.startsWith('.') && !url.startsWith('/')) {
|
|
60
|
+
url = wrapId(url);
|
|
61
|
+
}
|
|
62
|
+
+// JsView Added >>>
|
|
63
|
+
+// 解决@import的css文件没有被热更新问题。
|
|
64
|
+
+ if (url.includes('type=style')) {
|
|
65
|
+
+ url = url.substr(0, url.indexOf('?'))
|
|
66
|
+
+ }
|
|
67
|
+
+// JsView Added <<<
|
|
68
|
+
return url;
|
|
69
|
+
}
|
|
70
|
+
function error$1(pos) {
|
|
71
|
+
@@ -44386,7 +44417,11 @@ function preload(baseModule, deps, importerUrl) {
|
|
72
|
+
function buildImportAnalysisPlugin(config) {
|
|
73
|
+
const ssr = !!config.build.ssr;
|
|
74
|
+
const isWorker = config.isWorker;
|
|
75
|
+
- const insertPreload = !(ssr ||
|
|
76
|
+
+// JsView Modified >>>
|
|
77
|
+
+// 关闭 preload,盒子不支持
|
|
78
|
+
+ // const insertPreload = !(ssr ||
|
|
79
|
+
+ const insertPreload = false && !(ssr ||
|
|
80
|
+
+// JsView Modified <<<
|
|
81
|
+
!!config.build.lib ||
|
|
82
|
+
isWorker ||
|
|
83
|
+
config.build.modulePreload === false);
|
|
84
|
+
@@ -61896,7 +61931,15 @@ async function createServer(inlineConfig = {}) {
|
|
85
|
+
if (httpServer) {
|
|
86
|
+
setClientErrorHandler(httpServer, config.logger);
|
|
87
|
+
}
|
|
88
|
+
- const watcher = chokidar.watch(path$o.resolve(root), resolvedWatchOptions);
|
|
89
|
+
+// JsView Modified >>>
|
|
90
|
+
+// 将@shijiu目录加入文件改变监控
|
|
91
|
+
+ // const watcher = chokidar.watch(path$o.resolve(root), resolvedWatchOptions);
|
|
92
|
+
+ const watchPaths = [
|
|
93
|
+
+ path$o.resolve(root),
|
|
94
|
+
+ path$o.resolve(root, 'node_modules/@shijiu'),
|
|
95
|
+
+ ];
|
|
96
|
+
+ const watcher = chokidar.watch(watchPaths, resolvedWatchOptions);
|
|
97
|
+
+// JsView Modified <<<
|
|
98
|
+
const moduleGraph = new ModuleGraph((url, ssr) => container.resolveId(url, undefined, { ssr }));
|
|
99
|
+
const container = await createPluginContainer(config, moduleGraph, watcher);
|
|
100
|
+
const closeHttpServer = createServerCloseFn(httpServer);
|
|
101
|
+
@@ -62579,6 +62622,16 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
|
|
102
|
+
configFileDependencies = loadResult.dependencies;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
+
|
|
106
|
+
+// JsView Added >>>
|
|
107
|
+
+// 合并jsview自定义config
|
|
108
|
+
+ const { jsvCreateJsViewViteConfig } = (await import('../jsview-vite-extension.js'));
|
|
109
|
+
+ const jsviewViteConfig = jsvCreateJsViewViteConfig(config);
|
|
110
|
+
+ if (jsviewViteConfig) {
|
|
111
|
+
+ config = mergeConfig(jsviewViteConfig, config);
|
|
112
|
+
+ }
|
|
113
|
+
+// JsView Added <<<
|
|
114
|
+
+
|
|
115
|
+
// user config may provide an alternative mode. But --mode has a higher priority
|
|
116
|
+
mode = inlineConfig.mode || config.mode || mode;
|
|
117
|
+
configEnv.mode = mode;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
diff --git a/node_modules/vite/dist/node/chunks/logger.js b/node_modules/vite/dist/node/chunks/logger.js
|
|
2
|
+
index bd8dd7c..d5cc4b5 100644
|
|
3
|
+
--- a/node_modules/vite/dist/node/chunks/logger.js
|
|
4
|
+
+++ b/node_modules/vite/dist/node/chunks/logger.js
|
|
5
|
+
@@ -317,6 +317,13 @@ function printServerUrls(urls, optionsHost, info) {
|
|
6
|
+
for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
|
|
7
|
+
for (const url of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}`);
|
|
8
|
+
if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors.default.dim(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: use `) + import_picocolors.default.bold("--host") + import_picocolors.default.dim(" to expose"));
|
|
9
|
+
+
|
|
10
|
+
+// JsView Modified >>>
|
|
11
|
+
+// 将url写入network.mjs文件,用于npm run android。
|
|
12
|
+
+ import('@shijiu/jsview/thirdparty/vite/jsview-vite-extension.mjs').then((module) => {
|
|
13
|
+
+ module.jsvSaveUrlToCache(urls);
|
|
14
|
+
+ });
|
|
15
|
+
+// JsView Modified <<<
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { OPTIMIZABLE_ENTRY_RE as A, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR as C, JS_TYPES_RE as D, FS_PREFIX as E, defaultAllowedOrigins as F, loopbackHosts as I, wildcardHosts as L, SPECIAL_QUERY_RE as M, VERSION as N, KNOWN_ASSET_TYPES as O, VITE_PACKAGE_DIR as P, require_picocolors as R, ENV_PUBLIC_PATH as S, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET as T, DEFAULT_SERVER_CONDITIONS as _, CLIENT_ENTRY as a, DEV_PROD_CONDITION as b, DEFAULT_ASSETS_INLINE_LIMIT as c, DEFAULT_CLIENT_MAIN_FIELDS as d, DEFAULT_CONFIG_FILES as f, DEFAULT_PREVIEW_PORT as g, DEFAULT_EXTERNAL_CONDITIONS as h, CLIENT_DIR as i, ROLLUP_HOOKS as j, METADATA_FILENAME as k, DEFAULT_ASSETS_RE as l, DEFAULT_EXTENSIONS as m, createLogger as n, CLIENT_PUBLIC_PATH as o, DEFAULT_DEV_PORT as p, printServerUrls as r, CSS_LANGS_RE as s, LogLevels as t, DEFAULT_CLIENT_CONDITIONS as u, DEFAULT_SERVER_MAIN_FIELDS as v, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR as w, ENV_ENTRY as x, DEP_VERSION_RE as y };
|
|
19
|
+
diff --git a/node_modules/vite/dist/node/chunks/node.js b/node_modules/vite/dist/node/chunks/node.js
|
|
20
|
+
index ffddb72..b031ad8 100644
|
|
21
|
+
--- a/node_modules/vite/dist/node/chunks/node.js
|
|
22
|
+
+++ b/node_modules/vite/dist/node/chunks/node.js
|
|
23
|
+
@@ -26025,6 +26025,10 @@ async function _createServer(inlineConfig = {}, options) {
|
|
24
|
+
if (httpServer) setClientErrorHandler(httpServer, config.logger);
|
|
25
|
+
const watcher = serverConfig.watch !== null ? import_chokidar.watch([
|
|
26
|
+
...config.experimental.bundledDev ? [] : [root],
|
|
27
|
+
+// JsView Modified >>>
|
|
28
|
+
+// 将@shijiu目录加入文件改变监控
|
|
29
|
+
+ path.resolve(root, "node_modules/@shijiu"),
|
|
30
|
+
+// JsView Modified <<<
|
|
31
|
+
...config.configFileDependencies,
|
|
32
|
+
...getEnvFilesForMode(config.mode, config.envDir),
|
|
33
|
+
...publicDir && publicFiles ? [publicDir] : []
|
|
34
|
+
@@ -26951,6 +26955,14 @@ function lexAcceptedHmrExports(code, start, exportNames) {
|
|
35
|
+
}
|
|
36
|
+
function normalizeHmrUrl(url) {
|
|
37
|
+
if (url[0] !== "." && url[0] !== "/") url = wrapId(url);
|
|
38
|
+
+
|
|
39
|
+
+// JsView Added >>>
|
|
40
|
+
+// 解决@import的css文件没有被热更新问题。
|
|
41
|
+
+ if (url.includes('type=style')) {
|
|
42
|
+
+ url = url.substr(0, url.indexOf('?'))
|
|
43
|
+
+ }
|
|
44
|
+
+// JsView Added <<<
|
|
45
|
+
+
|
|
46
|
+
return url;
|
|
47
|
+
}
|
|
48
|
+
function error(pos) {
|
|
49
|
+
@@ -28215,7 +28227,10 @@ function getPreloadCode(environment, renderBuiltUrlBoolean, isRelativeBase) {
|
|
50
|
+
* Build only. During serve this is performed as part of ./importAnalysis.
|
|
51
|
+
*/
|
|
52
|
+
function buildImportAnalysisPlugin(config) {
|
|
53
|
+
- const getInsertPreload = (environment) => environment.config.consumer === "client" && !config.isWorker && !config.build.lib;
|
|
54
|
+
+// JsView Modified >>>
|
|
55
|
+
+// 关闭 preload,盒子不支持
|
|
56
|
+
+ const getInsertPreload = (environment) => false && environment.config.consumer === "client" && !config.isWorker && !config.build.lib;
|
|
57
|
+
+// JsView Modified <<<
|
|
58
|
+
const renderBuiltUrl = config.experimental.renderBuiltUrl;
|
|
59
|
+
const isRelativeBase = config.base === "./" || config.base === "";
|
|
60
|
+
return [{
|
|
61
|
+
@@ -34199,6 +34214,16 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
62
|
+
configFileDependencies = loadResult.dependencies;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
+
|
|
66
|
+
+// JsView Added >>>
|
|
67
|
+
+// 合并jsview自定义config
|
|
68
|
+
+ const { jsvCreateJsViewViteConfig } = (await import('@shijiu/jsview/thirdparty/vite/jsview-vite-extension.mjs'));
|
|
69
|
+
+ const jsviewViteConfig = jsvCreateJsViewViteConfig(config);
|
|
70
|
+
+ if (jsviewViteConfig) {
|
|
71
|
+
+ config = mergeConfig(defineConfig(jsviewViteConfig), config);
|
|
72
|
+
+ }
|
|
73
|
+
+// JsView Added <<<
|
|
74
|
+
+
|
|
75
|
+
mode = inlineConfig.mode || config.mode || mode;
|
|
76
|
+
configEnv.mode = mode;
|
|
77
|
+
const filterPlugin = (p) => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
diff --git a/node_modules/vue-router/dist/vue-router.mjs b/node_modules/vue-router/dist/vue-router.mjs
|
|
2
|
+
index 947b094..deddeea 100644
|
|
3
|
+
--- a/node_modules/vue-router/dist/vue-router.mjs
|
|
4
|
+
+++ b/node_modules/vue-router/dist/vue-router.mjs
|
|
5
|
+
@@ -3088,7 +3088,11 @@ function createRouter(options) {
|
|
6
|
+
: assign({}, to);
|
|
7
|
+
}
|
|
8
|
+
function checkCanceledNavigation(to, from) {
|
|
9
|
+
- if (pendingLocation !== to) {
|
|
10
|
+
+// JsView Modified >>>
|
|
11
|
+
+// 修改location是否相等判定
|
|
12
|
+
+ // if (pendingLocation !== to) {
|
|
13
|
+
+ if (pendingLocation.href !== to.href) { // 防止按键粘连带来的连续进入同一页面报警
|
|
14
|
+
+// JsView Modified <<<
|
|
15
|
+
return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {
|
|
16
|
+
from,
|
|
17
|
+
to,
|
|
File without changes
|
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const crypto = require('crypto');
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
const path = require('path');
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const compilerSfc =
|
|
8
|
+
const crypto = require('node:crypto');
|
|
9
|
+
const fs = require('node:fs');
|
|
10
|
+
const path = require('node:path');
|
|
11
|
+
const { createRequire } = require('node:module');
|
|
12
|
+
|
|
13
|
+
const projectRequire = createRequire(path.resolve(process.cwd(), 'package.json'));
|
|
14
|
+
const postCss = projectRequire('postcss');
|
|
15
|
+
const postCssJs = projectRequire('postcss-js');
|
|
16
|
+
const compilerSfc = projectRequire('@vue/compiler-sfc/dist/compiler-sfc.cjs.js');
|
|
17
|
+
const styleChecker = projectRequire('@shijiu/jsview/thirdparty/@vue/compiler-sfc/jsview-style-checker.cjs');
|
|
18
|
+
const { Logger } = projectRequire('@shijiu/jsview/tools/jsview-logger.cjs');
|
|
19
|
+
|
|
17
20
|
const processorLangList = [
|
|
18
21
|
'less',
|
|
19
22
|
'sass',
|
|
@@ -110,7 +113,9 @@ function ensureSfcDescriptorImpl(descriptor) {
|
|
|
110
113
|
// Logger.Debug('insert a empty script.');
|
|
111
114
|
descriptor.script = {
|
|
112
115
|
type: 'script',
|
|
113
|
-
|
|
116
|
+
// Vite plugin-vue 会在后续拼接统一的 export default,
|
|
117
|
+
// 这里仅提供 _sfc_main 占位,避免重复默认导出导致语法错误。
|
|
118
|
+
content: '',
|
|
114
119
|
loc: {
|
|
115
120
|
source: '',
|
|
116
121
|
start: { column: 0, line: 0, offset: 0 },
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* QCode Added
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const { Logger } = require('../../../tools/jsview-logger.cjs');
|
|
1
7
|
const {
|
|
2
8
|
StyleFormator,
|
|
3
9
|
StyleName,
|
|
4
10
|
StyleValue,
|
|
5
11
|
StyleVariable
|
|
6
12
|
} = require("./jsview-style-formator.cjs");
|
|
7
|
-
const { Logger } = require('@shijiu/jsview/tools/jsview-logger');
|
|
8
13
|
|
|
9
14
|
class StyleChecker {
|
|
10
15
|
static GetFormattedValue(fileName, propName, propValue) {
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* QCode Added
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const jsvDelayQueue = [];
|
|
7
|
+
let jsvPendingForFirstDelayRender = false;
|
|
8
|
+
let jsvDelayQueueTimer = 0;
|
|
9
|
+
let jsvDelayQueueTaskToken = 1;
|
|
10
|
+
const jsvDelayQueueRecord = [];
|
|
11
|
+
let JsvRenderCount = 0;
|
|
12
|
+
|
|
13
|
+
function jsvSliceDelayQueue(queue)
|
|
14
|
+
{
|
|
15
|
+
let delayQueueSize = jsvDelayQueue?.length ?? 0;
|
|
16
|
+
|
|
17
|
+
if (jsvDelayQueue.length > 0 && !jsvPendingForFirstDelayRender) {
|
|
18
|
+
// 将延迟后的任务放入执行队列前,如果任务本身已经失效了,此instance.update就会被设置成inactive
|
|
19
|
+
// console.log("QCodeDrop jsvDelayQueue.length=", jsvDelayQueue.length);
|
|
20
|
+
queue.unshift(...jsvDelayQueue);
|
|
21
|
+
|
|
22
|
+
// 记录 Recorder 用于调试
|
|
23
|
+
// jsvDelayQueueRecord.length = 0;
|
|
24
|
+
// jsvDelayQueueRecord.unshift(...jsvDelayQueue);
|
|
25
|
+
|
|
26
|
+
jsvDelayQueue.length = 0;
|
|
27
|
+
jsvDelayQueueTaskToken++;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return delayQueueSize;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function jsvPostDelayQueue(queueFlush)
|
|
34
|
+
{
|
|
35
|
+
//重置允许描画的个数
|
|
36
|
+
JsvRenderCount = 0;
|
|
37
|
+
// 重置pending drawing状态
|
|
38
|
+
jsvPendingForFirstDelayRender = false;
|
|
39
|
+
|
|
40
|
+
// 测试是否开启新的 pending draw 状态
|
|
41
|
+
if (window.JsView?.hasPendingUserInput?.()) {
|
|
42
|
+
jsvPendingForFirstDelayRender = true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// JsView 提交延迟执行任务
|
|
46
|
+
if (jsvDelayQueue.length > 0) {
|
|
47
|
+
if (jsvDelayQueueTimer > 0) {
|
|
48
|
+
clearTimeout(jsvDelayQueueTimer);
|
|
49
|
+
jsvDelayQueueTimer = 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
jsvDelayQueueTimer = setTimeout(() => {
|
|
53
|
+
jsvDelayQueueTimer = 0;
|
|
54
|
+
if (jsvDelayQueue.length > 0) {
|
|
55
|
+
queueFlush();
|
|
56
|
+
}
|
|
57
|
+
}, 0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function jsvRemoveNodeIfRenderBreaked(vnode)
|
|
62
|
+
{
|
|
63
|
+
// 前一次的patch被打断
|
|
64
|
+
|
|
65
|
+
// anchor和container要从vnode中还原出来
|
|
66
|
+
const jsvContainer = vnode.jsvRenderBreaker.patchPack.container;
|
|
67
|
+
const jsvAnchor = vnode.jsvRenderBreaker.patchPack.anchor;
|
|
68
|
+
|
|
69
|
+
// 释放renderBreak时,创建出来的占位element
|
|
70
|
+
if (vnode.el) {
|
|
71
|
+
vnode.el.parentNode.removeChild(vnode.el);
|
|
72
|
+
vnode.el = null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
jsvContainer,
|
|
77
|
+
jsvAnchor,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function jsvCancelPatchIfRenderBreaked(vnode, options, container, anchor, parentComponent)
|
|
82
|
+
{
|
|
83
|
+
if (vnode.key == "__QcodeJsviewMetroWidgetSlot"
|
|
84
|
+
&& (jsvPendingForFirstDelayRender
|
|
85
|
+
|| window.JsvCode.Dom.IsLazyTaskQueueOverLoad()
|
|
86
|
+
|| window.JsView?.hasPendingUserInput?.())
|
|
87
|
+
&& JsvRenderCount >= (window.JsView?.getInstantRenderNum?.() ?? 0)) {
|
|
88
|
+
const { insert: hostInsert, createComment: hostCreateComment } = options;
|
|
89
|
+
|
|
90
|
+
// 创建Comment节点, 以解决el释放可能出错问题
|
|
91
|
+
// 同时存储el以便给父节点进行属性链接
|
|
92
|
+
hostInsert((vnode.el = hostCreateComment('')), container, anchor)
|
|
93
|
+
vnode.anchor = anchor;
|
|
94
|
+
|
|
95
|
+
vnode.jsvRenderBreaker = {
|
|
96
|
+
breaked: true,
|
|
97
|
+
patchPack: {
|
|
98
|
+
container,
|
|
99
|
+
anchor, // 可能获取从fragment提交过来的anchor
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// TODO: 有时候children[0]不存在
|
|
104
|
+
// TODO: 为什么需要对children[0]进行设置?是否是考虑patch时第一子节点不递归的问题, 需要vue版本升级时重新评估
|
|
105
|
+
if (vnode.children?.[0]?.key === "__QcodeJsviewMetroWidgetSlot") {
|
|
106
|
+
vnode.children[0].anchor = anchor;
|
|
107
|
+
vnode.children[0].jsvRenderBreaker = {
|
|
108
|
+
breaked: true,
|
|
109
|
+
patchPack: {
|
|
110
|
+
container,
|
|
111
|
+
anchor, // 可能获取从fragment提交过来的anchor
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!parentComponent.update.delayToken || parentComponent.update.delayToken != jsvDelayQueueTaskToken) {
|
|
117
|
+
parentComponent.update.delayToken = jsvDelayQueueTaskToken;
|
|
118
|
+
jsvDelayQueue.push(parentComponent.update);
|
|
119
|
+
} else {
|
|
120
|
+
// console.log("QCodeDrop repeat add parentComponent.update for id=" + parentComponent.update.id);
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
JsvRenderCount++;
|
|
125
|
+
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function jsvUpdatePatchNode(prevTree, hostParentNode, getNextHostNode)
|
|
130
|
+
{
|
|
131
|
+
let parentNode;
|
|
132
|
+
let nextHostNode;
|
|
133
|
+
if (prevTree.jsvRenderBreaker?.breaked) {
|
|
134
|
+
// parentNode = hostParentNode(prevTree.el);
|
|
135
|
+
// nextHostNode = getNextHostNode(prevTree);
|
|
136
|
+
parentNode = prevTree.jsvRenderBreaker.patchPack.container;
|
|
137
|
+
nextHostNode = prevTree.jsvRenderBreaker.patchPack.anchor;
|
|
138
|
+
|
|
139
|
+
if (nextHostNode && nextHostNode.parent != parentNode) {
|
|
140
|
+
// anchor失效了
|
|
141
|
+
// console.warn("QCodeDrop lost anchor for anchor.parent=", nextHostNode.parent);
|
|
142
|
+
nextHostNode = null;
|
|
143
|
+
}
|
|
144
|
+
} else if (prevTree.jsvPatchedFlag) {
|
|
145
|
+
// if (!prevTree.el) {
|
|
146
|
+
// console.log("QCodeDrop element lost...");
|
|
147
|
+
// }
|
|
148
|
+
parentNode = hostParentNode(prevTree.el);
|
|
149
|
+
nextHostNode = getNextHostNode(prevTree);
|
|
150
|
+
} else {
|
|
151
|
+
console.warn("QCodeDrop update with no patched item, use default set");
|
|
152
|
+
// parentNode = container;
|
|
153
|
+
// nextHostNode = anchor;
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
parentNode,
|
|
159
|
+
nextHostNode,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function jsvResetPatchNode(vnode)
|
|
164
|
+
{
|
|
165
|
+
if (!vnode.jsvPatchedFlag) {
|
|
166
|
+
// unmount动作要进行的是vnode中的子节点进行unmount,但是vnode本身没有去进行创建,所以也不用去销毁
|
|
167
|
+
// 但是 mount 状态需要进行记录,避免由于RenderBreaker引起子节点未patch因为无法umount状态
|
|
168
|
+
|
|
169
|
+
if (vnode.jsvRenderBreaker?.breaked) {
|
|
170
|
+
vnode.el.parentNode.removeChild(vnode.el);
|
|
171
|
+
vnode.el = null;
|
|
172
|
+
vnode.anchor = null;
|
|
173
|
+
vnode.jsvRenderBreaker = null;
|
|
174
|
+
}
|
|
175
|
+
return;
|
|
176
|
+
} else {
|
|
177
|
+
// unmount时重置jsvPatchedFlag
|
|
178
|
+
vnode.jsvPatchedFlag = false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export {
|
|
183
|
+
jsvSliceDelayQueue,
|
|
184
|
+
jsvPostDelayQueue,
|
|
185
|
+
jsvRemoveNodeIfRenderBreaked,
|
|
186
|
+
jsvCancelPatchIfRenderBreaked,
|
|
187
|
+
jsvUpdatePatchNode,
|
|
188
|
+
jsvResetPatchNode,
|
|
189
|
+
}
|