@dcloudio/uni-cli-shared 3.0.0-alpha-4080720251125001 → 3.0.0-alpha-5000020260104004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +6 -1
- package/dist/deps.js +6 -1
- package/dist/dom2/index.d.ts +1 -0
- package/dist/dom2/index.js +17 -0
- package/dist/dom2/sharedData.d.ts +2 -0
- package/dist/dom2/sharedData.js +19 -0
- package/dist/easycom.js +34 -5
- package/dist/hbx/alias.js +24 -0
- package/dist/hbx/index.d.ts +1 -1
- package/dist/hbx/index.js +4 -2
- package/dist/hbx/log.d.ts +5 -0
- package/dist/hbx/log.js +44 -1
- package/dist/i18n.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json/app/manifest/index.d.ts +1 -0
- package/dist/json/app/manifest/index.js +3 -1
- package/dist/json/mp/pages.js +0 -5
- package/dist/json/pages.d.ts +2 -2
- package/dist/json/pages.js +4 -1
- package/dist/json/uni-x/index.d.ts +1 -1
- package/dist/json/utils.js +31 -22
- package/dist/logs/console.js +1 -1
- package/dist/logs/index.d.ts +11 -0
- package/dist/logs/index.js +34 -1
- package/dist/messages/en.d.ts +5 -1
- package/dist/messages/en.js +5 -1
- package/dist/messages/index.d.ts +10 -2
- package/dist/messages/zh_CN.d.ts +5 -1
- package/dist/messages/zh_CN.js +5 -1
- package/dist/mp/assets.d.ts +1 -0
- package/dist/mp/assets.js +23 -1
- package/dist/mp/index.d.ts +1 -1
- package/dist/mp/index.js +2 -1
- package/dist/mp/plugin.d.ts +1 -0
- package/dist/mp/plugin.js +14 -1
- package/dist/mp/style.d.ts +1 -0
- package/dist/mp/style.js +8 -1
- package/dist/postcss/plugins/stylePluginScoped.js +30 -0
- package/dist/preprocess/context.js +2 -0
- package/dist/preprocess/index.d.ts +9 -6
- package/dist/preprocess/index.js +33 -8
- package/dist/resolve.js +5 -1
- package/dist/uni_modules.js +20 -4
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +9 -6
- package/dist/utsUtils.d.ts +1 -0
- package/dist/utsUtils.js +2 -1
- package/dist/vite/autoImport.js +76 -5
- package/dist/vite/plugins/console.js +1 -1
- package/dist/vite/plugins/easycom.js +7 -0
- package/dist/vite/plugins/json.js +59 -2
- package/dist/vite/plugins/pre.js +4 -2
- package/dist/vite/plugins/sfc.js +1 -1
- package/dist/vite/plugins/stats.js +32 -0
- package/dist/vite/plugins/uts/ext-api.js +1 -1
- package/dist/vite/plugins/uts/uni_modules.js +12 -0
- package/dist/vite/plugins/uts/uvue.js +8 -2
- package/dist/vite/plugins/vitejs/plugins/asset.d.ts +1 -0
- package/dist/vite/plugins/vitejs/plugins/asset.js +19 -1
- package/dist/vite/plugins/vitejs/plugins/css.d.ts +2 -1
- package/dist/vite/plugins/vitejs/plugins/css.js +28 -10
- package/dist/vite/utils/ast.d.ts +2 -1
- package/dist/vite/utils/ast.js +5 -1
- package/dist/vue/parse.d.ts +2 -0
- package/dist/vue/parse.js +3 -1
- package/dist/vue/transforms/index.d.ts +1 -0
- package/dist/vue/transforms/index.js +1 -0
- package/dist/vue/transforms/transformLineBreak.d.ts +2 -0
- package/dist/vue/transforms/transformLineBreak.js +15 -0
- package/dist/vue/transforms/x/transformMPBuiltInTag.js +2 -2
- package/dist/vue/utils.js +8 -1
- package/lib/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
- package/lib/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
- package/lib/dom2/app/@vitejs/plugin-vue/LICENSE +21 -0
- package/lib/dom2/app/@vitejs/plugin-vue/README.md +278 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +3353 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.cts +113 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.mts +111 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.ts +113 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +3338 -0
- package/lib/dom2/app/@vitejs/plugin-vue/package.json +50 -0
- package/lib/dom2/app/@vue/compiler-core/LICENSE +21 -0
- package/lib/dom2/app/@vue/compiler-core/README.md +1 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +6984 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6859 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +1134 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +5923 -0
- package/lib/dom2/app/@vue/compiler-core/index.js +7 -0
- package/lib/dom2/app/@vue/compiler-core/package.json +58 -0
- package/lib/dom2/app/@vue/compiler-dom/LICENSE +21 -0
- package/lib/dom2/app/@vue/compiler-dom/README.md +1 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +943 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +901 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.d.ts +65 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +6739 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +14 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +695 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +6922 -0
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +14 -0
- package/lib/dom2/app/@vue/compiler-dom/index.js +7 -0
- package/lib/dom2/app/@vue/compiler-dom/package.json +57 -0
- package/lib/dom2/app/@vue/compiler-sfc/LICENSE +21 -0
- package/lib/dom2/app/@vue/compiler-sfc/README.md +80 -0
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +22208 -0
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.d.ts +504 -0
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +55952 -0
- package/lib/dom2/app/@vue/compiler-sfc/package.json +68 -0
- package/lib/dom2/app/@vue/compiler-vapor/LICENSE +21 -0
- package/lib/dom2/app/@vue/compiler-vapor/README.md +1 -0
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +4631 -0
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +541 -0
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +28218 -0
- package/lib/dom2/app/@vue/compiler-vapor/package.json +51 -0
- package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +83 -0
- package/lib/dom2/app/@vue/compiler-vapor-dom2/package.json +56 -0
- package/lib/dom2/app/@vue/shared/LICENSE +21 -0
- package/lib/dom2/app/@vue/shared/README.md +3 -0
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +724 -0
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +716 -0
- package/lib/dom2/app/@vue/shared/dist/shared.d.ts +379 -0
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +639 -0
- package/lib/dom2/app/@vue/shared/index.js +7 -0
- package/lib/dom2/app/@vue/shared/package.json +47 -0
- package/lib/preprocess/lib/preprocess.js +9 -3
- package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
- package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
- package/package.json +8 -6
package/dist/messages/en.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
12
12
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
13
13
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
14
|
+
readonly 'dev.watching.restart.vapor': "DONE Restart required. Switching vapor mode requires restarting to take effect.";
|
|
14
15
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
16
|
readonly 'compiler.build.failed': "Build failed with errors.";
|
|
16
17
|
readonly 'stat.warn.appid': "The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303";
|
|
@@ -29,9 +30,11 @@ declare const _default: {
|
|
|
29
30
|
readonly 'uts.ios.standard.tips': "When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground";
|
|
30
31
|
readonly 'prompt.run.message': "Run method: open {devtools}, import {outputDir} run.";
|
|
31
32
|
readonly 'prompt.run.devtools.app': "HBuilderX";
|
|
33
|
+
readonly 'prompt.run.devtools.app-harmony': "HBuilderX";
|
|
34
|
+
readonly 'prompt.run.devtools.mp-harmony': "HBuilderX";
|
|
32
35
|
readonly 'prompt.run.devtools.mp-alipay': "Alipay Mini Program Devtools";
|
|
33
36
|
readonly 'prompt.run.devtools.mp-baidu': "Baidu Mini Program Devtools";
|
|
34
|
-
readonly 'prompt.run.devtools.mp
|
|
37
|
+
readonly 'prompt.run.devtools.mp-kuaishou': "Kuaishou Mini Program Devtools";
|
|
35
38
|
readonly 'prompt.run.devtools.mp-lark': "Lark Mini Program Devtools";
|
|
36
39
|
readonly 'prompt.run.devtools.mp-qq': "QQ Mini Program Devtools";
|
|
37
40
|
readonly 'prompt.run.devtools.mp-toutiao': "Douyin Mini Program Devtools";
|
|
@@ -45,5 +48,6 @@ declare const _default: {
|
|
|
45
48
|
readonly 'uvue.dev.watching.end.empty': "The compilation outcome remains unchanged; there is no need to synchronize.";
|
|
46
49
|
readonly 'uni_modules.import': "Plug-in [{0}] only supports @/uni_modules/{1}.";
|
|
47
50
|
readonly 'pages.json.page.notfound': "The page \"{pagePath}\" does not exist.";
|
|
51
|
+
readonly 'pages.json.page.slash': "The Path \"{pagePath}\" cannot start with \"/\"";
|
|
48
52
|
};
|
|
49
53
|
export default _default;
|
package/dist/messages/en.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.default = {
|
|
|
13
13
|
'dev.watching.end': 'DONE Build complete. Watching for changes...',
|
|
14
14
|
'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
|
|
15
15
|
'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
|
|
16
|
+
'dev.watching.restart.vapor': 'DONE Restart required. Switching vapor mode requires restarting to take effect.',
|
|
16
17
|
'build.failed': 'DONE Build failed.',
|
|
17
18
|
'compiler.build.failed': 'Build failed with errors.',
|
|
18
19
|
'stat.warn.appid': 'The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303',
|
|
@@ -31,9 +32,11 @@ exports.default = {
|
|
|
31
32
|
'uts.ios.standard.tips': 'When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground',
|
|
32
33
|
'prompt.run.message': 'Run method: open {devtools}, import {outputDir} run.',
|
|
33
34
|
'prompt.run.devtools.app': 'HBuilderX',
|
|
35
|
+
'prompt.run.devtools.app-harmony': 'HBuilderX',
|
|
36
|
+
'prompt.run.devtools.mp-harmony': 'HBuilderX',
|
|
34
37
|
'prompt.run.devtools.mp-alipay': 'Alipay Mini Program Devtools',
|
|
35
38
|
'prompt.run.devtools.mp-baidu': 'Baidu Mini Program Devtools',
|
|
36
|
-
'prompt.run.devtools.mp
|
|
39
|
+
'prompt.run.devtools.mp-kuaishou': 'Kuaishou Mini Program Devtools',
|
|
37
40
|
'prompt.run.devtools.mp-lark': 'Lark Mini Program Devtools',
|
|
38
41
|
'prompt.run.devtools.mp-qq': 'QQ Mini Program Devtools',
|
|
39
42
|
'prompt.run.devtools.mp-toutiao': 'Douyin Mini Program Devtools',
|
|
@@ -47,4 +50,5 @@ exports.default = {
|
|
|
47
50
|
'uvue.dev.watching.end.empty': 'The compilation outcome remains unchanged; there is no need to synchronize.',
|
|
48
51
|
'uni_modules.import': 'Plug-in [{0}] only supports @/uni_modules/{1}.',
|
|
49
52
|
'pages.json.page.notfound': 'The page "{pagePath}" does not exist.',
|
|
53
|
+
'pages.json.page.slash': 'The Path "{pagePath}" cannot start with "/"',
|
|
50
54
|
};
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare const M: {
|
|
|
11
11
|
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
12
12
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
13
13
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
14
|
+
readonly 'dev.watching.restart.vapor': "DONE Restart required. 切换蒸汽模式需要重新运行才能生效。";
|
|
14
15
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
16
|
readonly 'compiler.build.failed': "编译失败";
|
|
16
17
|
readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
|
|
@@ -29,9 +30,11 @@ export declare const M: {
|
|
|
29
30
|
readonly 'uts.ios.standard.tips': "iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座";
|
|
30
31
|
readonly 'prompt.run.message': "运行方式:打开 {devtools}, 导入 {outputDir} 运行。";
|
|
31
32
|
readonly 'prompt.run.devtools.app': "HBuilderX";
|
|
33
|
+
readonly 'prompt.run.devtools.app-harmony': "HBuilderX";
|
|
34
|
+
readonly 'prompt.run.devtools.mp-harmony': "HBuilderX";
|
|
32
35
|
readonly 'prompt.run.devtools.mp-alipay': "支付宝小程序开发者工具";
|
|
33
36
|
readonly 'prompt.run.devtools.mp-baidu': "百度开发者工具";
|
|
34
|
-
readonly 'prompt.run.devtools.mp
|
|
37
|
+
readonly 'prompt.run.devtools.mp-kuaishou': "快手开发者工具";
|
|
35
38
|
readonly 'prompt.run.devtools.mp-lark': "飞书开发者工具";
|
|
36
39
|
readonly 'prompt.run.devtools.mp-qq': "QQ小程序开发者工具";
|
|
37
40
|
readonly 'prompt.run.devtools.mp-toutiao': "抖音开发者工具";
|
|
@@ -45,6 +48,7 @@ export declare const M: {
|
|
|
45
48
|
readonly 'uvue.dev.watching.end.empty': "本次代码变更,编译结果未发生变化,跳过同步手机端程序文件。";
|
|
46
49
|
readonly 'uni_modules.import': "插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。";
|
|
47
50
|
readonly 'pages.json.page.notfound': "页面\"{pagePath}\"不存在,请确保填写的页面路径不包含文件后缀,且必须与真实的文件路径大小写保持一致。";
|
|
51
|
+
readonly 'pages.json.page.slash': "路径 \"{pagePath}\" 不能以 \"/\" 开头";
|
|
48
52
|
} | {
|
|
49
53
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
50
54
|
readonly compiling: "Compiling...";
|
|
@@ -58,6 +62,7 @@ export declare const M: {
|
|
|
58
62
|
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
59
63
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
60
64
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
65
|
+
readonly 'dev.watching.restart.vapor': "DONE Restart required. Switching vapor mode requires restarting to take effect.";
|
|
61
66
|
readonly 'build.failed': "DONE Build failed.";
|
|
62
67
|
readonly 'compiler.build.failed': "Build failed with errors.";
|
|
63
68
|
readonly 'stat.warn.appid': "The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303";
|
|
@@ -76,9 +81,11 @@ export declare const M: {
|
|
|
76
81
|
readonly 'uts.ios.standard.tips': "When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground";
|
|
77
82
|
readonly 'prompt.run.message': "Run method: open {devtools}, import {outputDir} run.";
|
|
78
83
|
readonly 'prompt.run.devtools.app': "HBuilderX";
|
|
84
|
+
readonly 'prompt.run.devtools.app-harmony': "HBuilderX";
|
|
85
|
+
readonly 'prompt.run.devtools.mp-harmony': "HBuilderX";
|
|
79
86
|
readonly 'prompt.run.devtools.mp-alipay': "Alipay Mini Program Devtools";
|
|
80
87
|
readonly 'prompt.run.devtools.mp-baidu': "Baidu Mini Program Devtools";
|
|
81
|
-
readonly 'prompt.run.devtools.mp
|
|
88
|
+
readonly 'prompt.run.devtools.mp-kuaishou': "Kuaishou Mini Program Devtools";
|
|
82
89
|
readonly 'prompt.run.devtools.mp-lark': "Lark Mini Program Devtools";
|
|
83
90
|
readonly 'prompt.run.devtools.mp-qq': "QQ Mini Program Devtools";
|
|
84
91
|
readonly 'prompt.run.devtools.mp-toutiao': "Douyin Mini Program Devtools";
|
|
@@ -92,4 +99,5 @@ export declare const M: {
|
|
|
92
99
|
readonly 'uvue.dev.watching.end.empty': "The compilation outcome remains unchanged; there is no need to synchronize.";
|
|
93
100
|
readonly 'uni_modules.import': "Plug-in [{0}] only supports @/uni_modules/{1}.";
|
|
94
101
|
readonly 'pages.json.page.notfound': "The page \"{pagePath}\" does not exist.";
|
|
102
|
+
readonly 'pages.json.page.slash': "The Path \"{pagePath}\" cannot start with \"/\"";
|
|
95
103
|
};
|
package/dist/messages/zh_CN.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
12
12
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
13
13
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
14
|
+
readonly 'dev.watching.restart.vapor': "DONE Restart required. 切换蒸汽模式需要重新运行才能生效。";
|
|
14
15
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
16
|
readonly 'compiler.build.failed': "编译失败";
|
|
16
17
|
readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
|
|
@@ -29,9 +30,11 @@ declare const _default: {
|
|
|
29
30
|
readonly 'uts.ios.standard.tips': "iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座";
|
|
30
31
|
readonly 'prompt.run.message': "运行方式:打开 {devtools}, 导入 {outputDir} 运行。";
|
|
31
32
|
readonly 'prompt.run.devtools.app': "HBuilderX";
|
|
33
|
+
readonly 'prompt.run.devtools.app-harmony': "HBuilderX";
|
|
34
|
+
readonly 'prompt.run.devtools.mp-harmony': "HBuilderX";
|
|
32
35
|
readonly 'prompt.run.devtools.mp-alipay': "支付宝小程序开发者工具";
|
|
33
36
|
readonly 'prompt.run.devtools.mp-baidu': "百度开发者工具";
|
|
34
|
-
readonly 'prompt.run.devtools.mp
|
|
37
|
+
readonly 'prompt.run.devtools.mp-kuaishou': "快手开发者工具";
|
|
35
38
|
readonly 'prompt.run.devtools.mp-lark': "飞书开发者工具";
|
|
36
39
|
readonly 'prompt.run.devtools.mp-qq': "QQ小程序开发者工具";
|
|
37
40
|
readonly 'prompt.run.devtools.mp-toutiao': "抖音开发者工具";
|
|
@@ -45,5 +48,6 @@ declare const _default: {
|
|
|
45
48
|
readonly 'uvue.dev.watching.end.empty': "本次代码变更,编译结果未发生变化,跳过同步手机端程序文件。";
|
|
46
49
|
readonly 'uni_modules.import': "插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。";
|
|
47
50
|
readonly 'pages.json.page.notfound': "页面\"{pagePath}\"不存在,请确保填写的页面路径不包含文件后缀,且必须与真实的文件路径大小写保持一致。";
|
|
51
|
+
readonly 'pages.json.page.slash': "路径 \"{pagePath}\" 不能以 \"/\" 开头";
|
|
48
52
|
};
|
|
49
53
|
export default _default;
|
package/dist/messages/zh_CN.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.default = {
|
|
|
13
13
|
'dev.watching.end': 'DONE Build complete. Watching for changes...',
|
|
14
14
|
'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
|
|
15
15
|
'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
|
|
16
|
+
'dev.watching.restart.vapor': 'DONE Restart required. 切换蒸汽模式需要重新运行才能生效。',
|
|
16
17
|
'build.failed': 'DONE Build failed.',
|
|
17
18
|
'compiler.build.failed': '编译失败',
|
|
18
19
|
'stat.warn.appid': '当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303',
|
|
@@ -31,9 +32,11 @@ exports.default = {
|
|
|
31
32
|
'uts.ios.standard.tips': 'iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座',
|
|
32
33
|
'prompt.run.message': '运行方式:打开 {devtools}, 导入 {outputDir} 运行。',
|
|
33
34
|
'prompt.run.devtools.app': 'HBuilderX',
|
|
35
|
+
'prompt.run.devtools.app-harmony': 'HBuilderX',
|
|
36
|
+
'prompt.run.devtools.mp-harmony': 'HBuilderX',
|
|
34
37
|
'prompt.run.devtools.mp-alipay': '支付宝小程序开发者工具',
|
|
35
38
|
'prompt.run.devtools.mp-baidu': '百度开发者工具',
|
|
36
|
-
'prompt.run.devtools.mp
|
|
39
|
+
'prompt.run.devtools.mp-kuaishou': '快手开发者工具',
|
|
37
40
|
'prompt.run.devtools.mp-lark': '飞书开发者工具',
|
|
38
41
|
'prompt.run.devtools.mp-qq': 'QQ小程序开发者工具',
|
|
39
42
|
'prompt.run.devtools.mp-toutiao': '抖音开发者工具',
|
|
@@ -48,4 +51,5 @@ exports.default = {
|
|
|
48
51
|
'uvue.dev.watching.end.empty': '本次代码变更,编译结果未发生变化,跳过同步手机端程序文件。',
|
|
49
52
|
'uni_modules.import': '插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。',
|
|
50
53
|
'pages.json.page.notfound': '页面"{pagePath}"不存在,请确保填写的页面路径不包含文件后缀,且必须与真实的文件路径大小写保持一致。',
|
|
54
|
+
'pages.json.page.slash': '路径 "{pagePath}" 不能以 "/" 开头',
|
|
51
55
|
};
|
package/dist/mp/assets.d.ts
CHANGED
package/dist/mp/assets.js
CHANGED
|
@@ -3,8 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isMiniProgramAssetFile = void 0;
|
|
6
|
+
exports.createCopyComponentDirs = exports.isMiniProgramAssetFile = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const utils_1 = require("../vite/plugins/vitejs/utils");
|
|
10
|
+
const json_1 = require("../json");
|
|
8
11
|
const EXTNAMES = [
|
|
9
12
|
'.png',
|
|
10
13
|
'.jpg',
|
|
@@ -31,3 +34,22 @@ function isMiniProgramAssetFile(filename) {
|
|
|
31
34
|
return EXTNAMES.includes(path_1.default.extname(filename));
|
|
32
35
|
}
|
|
33
36
|
exports.isMiniProgramAssetFile = isMiniProgramAssetFile;
|
|
37
|
+
function createCopyComponentDirs(dir) {
|
|
38
|
+
const dirs = [dir];
|
|
39
|
+
const uniModulesDir = 'uni_modules/*/' + dir + '/**/*';
|
|
40
|
+
dirs.push(uniModulesDir);
|
|
41
|
+
const inputDir = process.env.UNI_INPUT_DIR;
|
|
42
|
+
const platform = process.env.UNI_PLATFORM;
|
|
43
|
+
if (!inputDir || !platform) {
|
|
44
|
+
return dirs;
|
|
45
|
+
}
|
|
46
|
+
const { appJson } = (0, json_1.parseMiniProgramPagesJson)(fs_1.default.readFileSync(path_1.default.resolve((0, utils_1.normalizePath)(inputDir), 'pages.json'), 'utf8'), platform, { subpackages: true });
|
|
47
|
+
const roots = Object.values(appJson.subPackages || appJson.subpackages || {})
|
|
48
|
+
.map(({ root }) => root)
|
|
49
|
+
.filter(Boolean);
|
|
50
|
+
roots.forEach((root) => {
|
|
51
|
+
dirs.push((0, utils_1.normalizePath)(path_1.default.join(root, dir)), (0, utils_1.normalizePath)(path_1.default.join(root, uniModulesDir)));
|
|
52
|
+
});
|
|
53
|
+
return dirs;
|
|
54
|
+
}
|
|
55
|
+
exports.createCopyComponentDirs = createCopyComponentDirs;
|
package/dist/mp/index.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export * from './assets';
|
|
|
7
7
|
export * from './template';
|
|
8
8
|
export * from './constants';
|
|
9
9
|
export { HTML_TO_MINI_PROGRAM_TAGS } from './tags';
|
|
10
|
-
export { copyMiniProgramPluginJson, copyMiniProgramThemeJson } from './plugin';
|
|
10
|
+
export { copyMiniProgramPluginJson, copyMiniProgramThemeJson, createCopyPluginTarget, } from './plugin';
|
|
11
11
|
export { parseMainDescriptor, parseScriptDescriptor, parseTemplateDescriptor, transformDynamicImports, updateMiniProgramGlobalComponents, updateMiniProgramComponentsByMainFilename, updateMiniProgramComponentsByScriptFilename, updateMiniProgramComponentsByTemplateFilename, } from './usingComponents';
|
|
12
12
|
export { hasExternalClasses, parseExternalClasses, findMiniProgramComponentExternalClasses, updateMiniProgramComponentExternalClasses, } from './externalClasses';
|
package/dist/mp/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.updateMiniProgramComponentExternalClasses = exports.findMiniProgramComponentExternalClasses = exports.parseExternalClasses = exports.hasExternalClasses = exports.updateMiniProgramComponentsByTemplateFilename = exports.updateMiniProgramComponentsByScriptFilename = exports.updateMiniProgramComponentsByMainFilename = exports.updateMiniProgramGlobalComponents = exports.transformDynamicImports = exports.parseTemplateDescriptor = exports.parseScriptDescriptor = exports.parseMainDescriptor = exports.copyMiniProgramThemeJson = exports.copyMiniProgramPluginJson = exports.HTML_TO_MINI_PROGRAM_TAGS = void 0;
|
|
17
|
+
exports.updateMiniProgramComponentExternalClasses = exports.findMiniProgramComponentExternalClasses = exports.parseExternalClasses = exports.hasExternalClasses = exports.updateMiniProgramComponentsByTemplateFilename = exports.updateMiniProgramComponentsByScriptFilename = exports.updateMiniProgramComponentsByMainFilename = exports.updateMiniProgramGlobalComponents = exports.transformDynamicImports = exports.parseTemplateDescriptor = exports.parseScriptDescriptor = exports.parseMainDescriptor = exports.createCopyPluginTarget = exports.copyMiniProgramThemeJson = exports.copyMiniProgramPluginJson = exports.HTML_TO_MINI_PROGRAM_TAGS = void 0;
|
|
18
18
|
__exportStar(require("./ast"), exports);
|
|
19
19
|
__exportStar(require("./wxs"), exports);
|
|
20
20
|
__exportStar(require("./nvue"), exports);
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "HTML_TO_MINI_PROGRAM_TAGS", { enumerable: true,
|
|
|
28
28
|
var plugin_1 = require("./plugin");
|
|
29
29
|
Object.defineProperty(exports, "copyMiniProgramPluginJson", { enumerable: true, get: function () { return plugin_1.copyMiniProgramPluginJson; } });
|
|
30
30
|
Object.defineProperty(exports, "copyMiniProgramThemeJson", { enumerable: true, get: function () { return plugin_1.copyMiniProgramThemeJson; } });
|
|
31
|
+
Object.defineProperty(exports, "createCopyPluginTarget", { enumerable: true, get: function () { return plugin_1.createCopyPluginTarget; } });
|
|
31
32
|
var usingComponents_1 = require("./usingComponents");
|
|
32
33
|
Object.defineProperty(exports, "parseMainDescriptor", { enumerable: true, get: function () { return usingComponents_1.parseMainDescriptor; } });
|
|
33
34
|
Object.defineProperty(exports, "parseScriptDescriptor", { enumerable: true, get: function () { return usingComponents_1.parseScriptDescriptor; } });
|
package/dist/mp/plugin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { UniViteCopyPluginTarget } from '../vite/plugins/copy';
|
|
2
2
|
export declare const copyMiniProgramPluginJson: UniViteCopyPluginTarget;
|
|
3
3
|
export declare const copyMiniProgramThemeJson: () => UniViteCopyPluginTarget[];
|
|
4
|
+
export declare function createCopyPluginTarget(src: string[]): UniViteCopyPluginTarget;
|
package/dist/mp/plugin.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.copyMiniProgramThemeJson = exports.copyMiniProgramPluginJson = void 0;
|
|
6
|
+
exports.createCopyPluginTarget = exports.copyMiniProgramThemeJson = exports.copyMiniProgramPluginJson = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const json_1 = require("../json/json");
|
|
@@ -46,3 +46,16 @@ const copyMiniProgramThemeJson = () => {
|
|
|
46
46
|
return [];
|
|
47
47
|
};
|
|
48
48
|
exports.copyMiniProgramThemeJson = copyMiniProgramThemeJson;
|
|
49
|
+
function createCopyPluginTarget(src) {
|
|
50
|
+
return {
|
|
51
|
+
src,
|
|
52
|
+
get dest() {
|
|
53
|
+
return process.env.UNI_OUTPUT_DIR;
|
|
54
|
+
},
|
|
55
|
+
transform(source, filename) {
|
|
56
|
+
const extJson = (0, json_1.parseJson)(source.toString(), true, path_1.default.basename(filename));
|
|
57
|
+
return JSON.stringify(extJson, null, 2);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.createCopyPluginTarget = createCopyPluginTarget;
|
package/dist/mp/style.d.ts
CHANGED
package/dist/mp/style.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformScopedCss = void 0;
|
|
3
|
+
exports.transformPartSelector = exports.transformScopedCss = void 0;
|
|
4
4
|
const tags_1 = require("./tags");
|
|
5
5
|
const logs_1 = require("../logs");
|
|
6
|
+
const uni_shared_1 = require("@dcloudio/uni-shared");
|
|
6
7
|
function transformScopedCss(cssCode) {
|
|
7
8
|
checkHtmlTagSelector(cssCode);
|
|
8
9
|
return cssCode.replace(/\[(data-v-[a-f0-9]{8})\]/gi, (_, scopedId) => {
|
|
@@ -10,6 +11,12 @@ function transformScopedCss(cssCode) {
|
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
exports.transformScopedCss = transformScopedCss;
|
|
14
|
+
function transformPartSelector(cssCode) {
|
|
15
|
+
return cssCode.replace(/::part\(([^)]+)\)/gi, (_, partName) => {
|
|
16
|
+
return ' .' + (0, uni_shared_1.getPartClass)(partName.trim());
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.transformPartSelector = transformPartSelector;
|
|
13
20
|
function checkHtmlTagSelector(cssCode) {
|
|
14
21
|
for (const tag in tags_1.HTML_TO_MINI_PROGRAM_TAGS) {
|
|
15
22
|
if (new RegExp(`( |\n|\t|,|})${tag}( *)(,|{)`, 'g').test(cssCode)) {
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const postcss_selector_parser_1 = __importDefault(require("postcss-selector-parser"));
|
|
7
|
+
const uni_shared_1 = require("@dcloudio/uni-shared");
|
|
7
8
|
const scopedPlugin = () => {
|
|
8
9
|
return {
|
|
9
10
|
postcssPlugin: 'uni-sfc-scoped',
|
|
@@ -26,14 +27,43 @@ function processRule(rule, hasVueSfcScoped) {
|
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
29
|
processedRules.add(rule);
|
|
30
|
+
const isXWeb = process.env.UNI_APP_X === 'true' && process.env.UNI_UTS_PLATFORM === 'web';
|
|
29
31
|
rule.selector = (0, postcss_selector_parser_1.default)((selectorRoot) => {
|
|
30
32
|
selectorRoot.each((selector) => {
|
|
31
33
|
hasVueSfcScoped
|
|
32
34
|
? rewriteDeprecatedSelector(selector)
|
|
33
35
|
: rewriteSelector(selector, selectorRoot);
|
|
36
|
+
if (isXWeb) {
|
|
37
|
+
rewritePartSelector(selector, selectorRoot);
|
|
38
|
+
}
|
|
34
39
|
});
|
|
35
40
|
}).processSync(rule.selector);
|
|
36
41
|
}
|
|
42
|
+
function rewritePartSelector(selector, selectorRoot) {
|
|
43
|
+
if (selector.some((n) => {
|
|
44
|
+
return n.type === 'pseudo' && n.value === '::part';
|
|
45
|
+
})) {
|
|
46
|
+
const uniPartSelector = selector.clone();
|
|
47
|
+
_rewritePartSelector(uniPartSelector, selectorRoot);
|
|
48
|
+
selectorRoot.insertAfter(selector, uniPartSelector);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function _rewritePartSelector(selector, selectorRoot) {
|
|
52
|
+
selector.each((n) => {
|
|
53
|
+
if (n.type === 'pseudo' && n.value === '::part') {
|
|
54
|
+
const partClass = (0, uni_shared_1.getPartClass)(n.nodes[0].toString());
|
|
55
|
+
selector.insertAfter(n, postcss_selector_parser_1.default.pseudo({
|
|
56
|
+
value: ':deep',
|
|
57
|
+
nodes: [
|
|
58
|
+
postcss_selector_parser_1.default.className({
|
|
59
|
+
value: partClass,
|
|
60
|
+
}),
|
|
61
|
+
],
|
|
62
|
+
}));
|
|
63
|
+
selector.removeChild(n);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
37
67
|
/**
|
|
38
68
|
* @param selector
|
|
39
69
|
* @returns
|
|
@@ -37,6 +37,7 @@ const DEFAULT_KEYS = [
|
|
|
37
37
|
'VUE2',
|
|
38
38
|
'VUE3',
|
|
39
39
|
'WEB',
|
|
40
|
+
'VUE3_VAPOR',
|
|
40
41
|
];
|
|
41
42
|
const preVueContext = Object.create(null);
|
|
42
43
|
const preNVueContext = Object.create(null);
|
|
@@ -66,6 +67,7 @@ function initScopedPreContext(platform, userPreContext, utsPlatform, isX) {
|
|
|
66
67
|
vueContext.VUE3 = true;
|
|
67
68
|
nvueContext.VUE3 = true;
|
|
68
69
|
uvueContext.VUE3 = true;
|
|
70
|
+
uvueContext.VUE3_VAPOR = process.env.UNI_APP_X_DOM2 === 'true';
|
|
69
71
|
if (isX) {
|
|
70
72
|
vueContext.UNI_APP_X = true;
|
|
71
73
|
nvueContext.UNI_APP_X = true;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export { initPreContext } from './context';
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export interface PreprocessOptions {
|
|
3
|
+
unbalanced?: 'error' | 'skip' | 'skip-lazy';
|
|
4
|
+
}
|
|
5
|
+
export declare function preJs(jsCode: string, filename: string, options?: PreprocessOptions): any;
|
|
6
|
+
export declare function preHtml(htmlCode: string, filename: string, options?: PreprocessOptions): any;
|
|
4
7
|
export declare const preCss: typeof preJs;
|
|
5
8
|
export declare const preJson: typeof preJs;
|
|
6
|
-
export declare function preNVueJs(jsCode: string, filename: string): any;
|
|
7
|
-
export declare function preNVueHtml(htmlCode: string, filename: string): any;
|
|
9
|
+
export declare function preNVueJs(jsCode: string, filename: string, options?: PreprocessOptions): any;
|
|
10
|
+
export declare function preNVueHtml(htmlCode: string, filename: string, options?: PreprocessOptions): any;
|
|
8
11
|
export declare const preNVueCss: typeof preNVueJs;
|
|
9
12
|
export declare const preNVueJson: typeof preNVueJs;
|
|
10
|
-
export declare function preUVueJs(jsCode: string, filename: string): any;
|
|
11
|
-
export declare function preUVueHtml(htmlCode: string, filename: string): any;
|
|
13
|
+
export declare function preUVueJs(jsCode: string, filename: string, options?: PreprocessOptions): any;
|
|
14
|
+
export declare function preUVueHtml(htmlCode: string, filename: string, options?: PreprocessOptions): any;
|
|
12
15
|
export declare const preUVueCss: typeof preUVueJs;
|
|
13
16
|
export declare const preUVueJson: typeof preUVueJs;
|
package/dist/preprocess/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.preUVueJson = exports.preUVueCss = exports.preUVueHtml = exports.preUVue
|
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
const context_1 = require("./context");
|
|
10
|
+
const utils_2 = require("../vite/plugins/vitejs/utils");
|
|
10
11
|
/* eslint-disable no-restricted-globals */
|
|
11
12
|
const { preprocess: preprocessLib } = require('../../lib/preprocess');
|
|
12
13
|
var context_2 = require("./context");
|
|
@@ -23,55 +24,61 @@ function normalizeFilename(filename) {
|
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
function preJs(jsCode, filename) {
|
|
27
|
+
function preJs(jsCode, filename, options) {
|
|
27
28
|
if (process.env.UNI_APP_X === 'true') {
|
|
28
|
-
return preUVueJs(jsCode, filename);
|
|
29
|
+
return preUVueJs(jsCode, filename, options);
|
|
29
30
|
}
|
|
30
31
|
return preprocess(jsCode, (0, context_1.getPreVueContext)(), {
|
|
31
32
|
type: 'js',
|
|
32
33
|
filename: normalizeFilename(filename),
|
|
34
|
+
unbalanced: options?.unbalanced,
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
exports.preJs = preJs;
|
|
36
|
-
function preHtml(htmlCode, filename) {
|
|
38
|
+
function preHtml(htmlCode, filename, options) {
|
|
37
39
|
if (process.env.UNI_APP_X === 'true') {
|
|
38
|
-
return preUVueHtml(htmlCode, filename);
|
|
40
|
+
return preUVueHtml(htmlCode, filename, options);
|
|
39
41
|
}
|
|
40
42
|
return preprocess(htmlCode, (0, context_1.getPreVueContext)(), {
|
|
41
43
|
type: 'html',
|
|
42
44
|
filename: normalizeFilename(filename),
|
|
45
|
+
unbalanced: options?.unbalanced,
|
|
43
46
|
});
|
|
44
47
|
}
|
|
45
48
|
exports.preHtml = preHtml;
|
|
46
49
|
exports.preCss = preJs;
|
|
47
50
|
exports.preJson = preJs;
|
|
48
|
-
function preNVueJs(jsCode, filename) {
|
|
51
|
+
function preNVueJs(jsCode, filename, options) {
|
|
49
52
|
return preprocess(jsCode, (0, context_1.getPreNVueContext)(), {
|
|
50
53
|
type: 'js',
|
|
51
54
|
filename: normalizeFilename(filename),
|
|
55
|
+
unbalanced: options?.unbalanced,
|
|
52
56
|
});
|
|
53
57
|
}
|
|
54
58
|
exports.preNVueJs = preNVueJs;
|
|
55
|
-
function preNVueHtml(htmlCode, filename) {
|
|
59
|
+
function preNVueHtml(htmlCode, filename, options) {
|
|
56
60
|
return preprocess(htmlCode, (0, context_1.getPreNVueContext)(), {
|
|
57
61
|
type: 'html',
|
|
58
62
|
filename: normalizeFilename(filename),
|
|
63
|
+
unbalanced: options?.unbalanced,
|
|
59
64
|
});
|
|
60
65
|
}
|
|
61
66
|
exports.preNVueHtml = preNVueHtml;
|
|
62
67
|
exports.preNVueCss = preNVueJs;
|
|
63
68
|
exports.preNVueJson = preNVueJs;
|
|
64
|
-
function preUVueJs(jsCode, filename) {
|
|
69
|
+
function preUVueJs(jsCode, filename, options) {
|
|
65
70
|
return preprocess(jsCode, (0, context_1.getPreUVueContext)(), {
|
|
66
71
|
type: 'js',
|
|
67
72
|
filename: normalizeFilename(filename),
|
|
73
|
+
unbalanced: options?.unbalanced,
|
|
68
74
|
});
|
|
69
75
|
}
|
|
70
76
|
exports.preUVueJs = preUVueJs;
|
|
71
|
-
function preUVueHtml(htmlCode, filename) {
|
|
77
|
+
function preUVueHtml(htmlCode, filename, options) {
|
|
72
78
|
return preprocess(htmlCode, (0, context_1.getPreUVueContext)(), {
|
|
73
79
|
type: 'html',
|
|
74
80
|
filename: normalizeFilename(filename),
|
|
81
|
+
unbalanced: options?.unbalanced,
|
|
75
82
|
});
|
|
76
83
|
}
|
|
77
84
|
exports.preUVueHtml = preUVueHtml;
|
|
@@ -105,6 +112,24 @@ function preprocess(code, context, options) {
|
|
|
105
112
|
return preprocessLib(code, context, options);
|
|
106
113
|
}
|
|
107
114
|
catch (e) {
|
|
115
|
+
// `Unbalanced left delimiter found in string at position 1520`
|
|
116
|
+
// `Unbalanced right delimiter found in string at position 1520`
|
|
117
|
+
if (e.message) {
|
|
118
|
+
const msg = e.message;
|
|
119
|
+
// 正则匹配left/right及position
|
|
120
|
+
const unbalancedMatch = msg.match(/Unbalanced (left|right) delimiter found in string at position (\d+)/);
|
|
121
|
+
if (unbalancedMatch) {
|
|
122
|
+
const errorDirective = unbalancedMatch[1] === 'left' ? '#ifdef/#ifndef' : '#endif';
|
|
123
|
+
const missedDirective = unbalancedMatch[1] === 'left' ? '#endif' : '#ifdef/#ifndef';
|
|
124
|
+
const position = parseInt(unbalancedMatch[2], 10);
|
|
125
|
+
const filename = options.filename?.() || '';
|
|
126
|
+
const { line } = (0, utils_2.offsetToLineColumn)(code, position);
|
|
127
|
+
console.error(`条件编译失败: ${errorDirective} 缺少配对的 ${missedDirective}`);
|
|
128
|
+
console.error(`${filename.split(':')[0]}:${line}`);
|
|
129
|
+
console.log((0, utils_2.generateCodeFrame)(code, position));
|
|
130
|
+
return code;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
108
133
|
const msg = ERRORS[options.type];
|
|
109
134
|
if (msg) {
|
|
110
135
|
console.error(msg.replace('%FILENAME%', options.filename?.() || ''));
|
package/dist/resolve.js
CHANGED
|
@@ -109,7 +109,11 @@ exports.resolveVueI18nRuntime = resolveVueI18nRuntime;
|
|
|
109
109
|
let componentsLibPath = '';
|
|
110
110
|
function resolveComponentsLibPath() {
|
|
111
111
|
if (!componentsLibPath) {
|
|
112
|
-
const dir = process.env.
|
|
112
|
+
const dir = process.env.UNI_APP_X_DOM2 === 'true'
|
|
113
|
+
? '../lib-x-vapor'
|
|
114
|
+
: process.env.UNI_APP_X === 'true'
|
|
115
|
+
? '../lib-x'
|
|
116
|
+
: '../lib';
|
|
113
117
|
if ((0, env_1.isInHBuilderX)()) {
|
|
114
118
|
componentsLibPath = path_1.default.join(resolveBuiltIn('@dcloudio/uni-components/package.json'), dir);
|
|
115
119
|
}
|
package/dist/uni_modules.js
CHANGED
|
@@ -351,9 +351,25 @@ exports.capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() +
|
|
|
351
351
|
*/
|
|
352
352
|
function parseUTSModuleDeps(deps, inputDir) {
|
|
353
353
|
const modulesDir = path_1.default.resolve(inputDir, 'uni_modules');
|
|
354
|
-
return deps
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
354
|
+
return deps
|
|
355
|
+
.map((dep) => {
|
|
356
|
+
let depName = '';
|
|
357
|
+
if (dep.includes(':')) {
|
|
358
|
+
const parts = dep.split(':');
|
|
359
|
+
if (process.env.UNI_UTS_PLATFORM &&
|
|
360
|
+
process.env.UNI_UTS_PLATFORM === parts[0]) {
|
|
361
|
+
depName = parts[1];
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
depName = dep;
|
|
366
|
+
}
|
|
367
|
+
if (depName &&
|
|
368
|
+
fs_extra_1.default.existsSync(path_1.default.resolve(modulesDir, depName, 'utssdk'))) {
|
|
369
|
+
return depName;
|
|
370
|
+
}
|
|
371
|
+
return '';
|
|
372
|
+
})
|
|
373
|
+
.filter(Boolean);
|
|
358
374
|
}
|
|
359
375
|
exports.parseUTSModuleDeps = parseUTSModuleDeps;
|
package/dist/utils.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export declare function pathToGlob(pathString: string, glob: string, options?: {
|
|
|
23
23
|
export declare function resolveSourceMapPath(outputDir?: string, platform?: UniApp.PLATFORM): string;
|
|
24
24
|
export declare function installDepTips(type: 'dependencies' | 'devDependencies', module: string, version?: string): string;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {string} filename
|
|
26
|
+
* 根据环境变量 UNI_INPUT_DIR 路径判断是否为 App.(u?)vue
|
|
27
|
+
* @param {string} filename
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
30
|
export declare function isAppVue(filename: string): boolean;
|
package/dist/utils.js
CHANGED
|
@@ -137,13 +137,13 @@ Please run \`${picocolors_1.default.cyan(`${getInstallCommand(process.cwd())} ${
|
|
|
137
137
|
}
|
|
138
138
|
exports.installDepTips = installDepTips;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
141
|
-
* @param {string} filename
|
|
140
|
+
* 根据环境变量 UNI_INPUT_DIR 路径判断是否为 App.(u?)vue
|
|
141
|
+
* @param {string} filename
|
|
142
142
|
* @returns
|
|
143
143
|
*/
|
|
144
144
|
function isAppVue(filename) {
|
|
145
|
-
const
|
|
146
|
-
return
|
|
145
|
+
const appVue = resolveAppVue(process.env.UNI_INPUT_DIR);
|
|
146
|
+
return appVue === normalizePath(filename);
|
|
147
147
|
}
|
|
148
148
|
exports.isAppVue = isAppVue;
|
|
149
149
|
function resolveAppVue(inputDir) {
|
|
@@ -179,8 +179,11 @@ function enableSourceMap() {
|
|
|
179
179
|
}
|
|
180
180
|
exports.enableSourceMap = enableSourceMap;
|
|
181
181
|
function requireUniHelpers() {
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
if (process.env.UNI_HBUILDERX_PLUGINS) {
|
|
183
|
+
require(path_1.default.resolve(process.env.UNI_HBUILDERX_PLUGINS, 'uni_helpers/lib/bytenode'));
|
|
184
|
+
}
|
|
185
|
+
return require(process.env.UNI_HELPERS_DIR ??
|
|
186
|
+
path_1.default.join(process.env.UNI_HBUILDERX_PLUGINS, 'uni_helpers'));
|
|
184
187
|
}
|
|
185
188
|
exports.requireUniHelpers = requireUniHelpers;
|
|
186
189
|
function normalizeEmitAssetFileName(fileName) {
|
package/dist/utsUtils.d.ts
CHANGED
package/dist/utsUtils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.genUTSClassName = exports.matchUTSComponent = void 0;
|
|
3
|
+
exports.verifySymbol = exports.genUTSClassName = exports.matchUTSComponent = void 0;
|
|
4
4
|
const easycom_1 = require("./easycom");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
function matchUTSComponent(tag) {
|
|
@@ -42,3 +42,4 @@ function verifySymbol(s) {
|
|
|
42
42
|
}
|
|
43
43
|
return buf.join('');
|
|
44
44
|
}
|
|
45
|
+
exports.verifySymbol = verifySymbol;
|