@dcloudio/uni-cli-shared 3.0.0-alpha-3090020230909001 → 3.0.0-alpha-3090120230928001
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 -3
- package/dist/messages/en.d.ts +1 -0
- package/dist/messages/en.js +1 -0
- package/dist/messages/index.d.ts +2 -0
- package/dist/messages/zh_CN.d.ts +1 -0
- package/dist/messages/zh_CN.js +1 -0
- package/dist/preprocess/context.js +1 -0
- package/dist/utils.js +3 -2
- package/dist/vite/plugins/utsPlugin.js +1 -0
- package/dist/vite/utils/url.js +5 -1
- package/package.json +4 -4
package/dist/constants.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare const PUBLIC_DIR = "static";
|
|
|
2
2
|
export declare const EXTNAME_JS: string[];
|
|
3
3
|
export declare const EXTNAME_TS: string[];
|
|
4
4
|
export declare const EXTNAME_VUE: string[];
|
|
5
|
+
export declare const X_EXTNAME_VUE: string[];
|
|
5
6
|
export declare const EXTNAME_VUE_TEMPLATE: string[];
|
|
6
7
|
export declare const EXTNAME_VUE_RE: RegExp;
|
|
7
8
|
export declare const EXTNAME_JS_RE: RegExp;
|
|
@@ -23,6 +24,8 @@ export declare const APP_CONFIG_SERVICE = "app-config-service.js";
|
|
|
23
24
|
export declare const BINDING_COMPONENTS = "__BINDING_COMPONENTS__";
|
|
24
25
|
export declare const PAGE_EXTNAME_APP: string[];
|
|
25
26
|
export declare const PAGE_EXTNAME: string[];
|
|
27
|
+
export declare const X_PAGE_EXTNAME: string[];
|
|
28
|
+
export declare const X_PAGE_EXTNAME_APP: string[];
|
|
26
29
|
export declare const H5_API_STYLE_PATH = "@dcloudio/uni-h5/style/api/";
|
|
27
30
|
export declare const H5_FRAMEWORK_STYLE_PATH = "@dcloudio/uni-h5/style/framework/";
|
|
28
31
|
export declare const H5_COMPONENTS_STYLE_PATH = "@dcloudio/uni-h5/style/";
|
package/dist/constants.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TEXT_STYLE = exports.DEFAULT_ASSETS_RE = exports.KNOWN_ASSET_TYPES = exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_CONFIG_SERVICE = exports.APP_CONFIG = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.JSON_JS_MAP = exports.MANIFEST_JSON_UTS = exports.MANIFEST_JSON_JS = exports.PAGES_JSON_UTS = exports.PAGES_JSON_JS = exports.uni_app_x_extensions = exports.extensions = exports.EXTNAME_TS_RE = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE_TEMPLATE = exports.EXTNAME_VUE = exports.EXTNAME_TS = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
|
|
3
|
+
exports.TEXT_STYLE = exports.DEFAULT_ASSETS_RE = exports.KNOWN_ASSET_TYPES = exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.X_PAGE_EXTNAME_APP = exports.X_PAGE_EXTNAME = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_CONFIG_SERVICE = exports.APP_CONFIG = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.JSON_JS_MAP = exports.MANIFEST_JSON_UTS = exports.MANIFEST_JSON_JS = exports.PAGES_JSON_UTS = exports.PAGES_JSON_JS = exports.uni_app_x_extensions = exports.extensions = exports.EXTNAME_TS_RE = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE_TEMPLATE = exports.X_EXTNAME_VUE = exports.EXTNAME_VUE = exports.EXTNAME_TS = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
|
|
4
4
|
exports.PUBLIC_DIR = 'static';
|
|
5
5
|
exports.EXTNAME_JS = ['.js', '.ts', '.jsx', '.tsx'];
|
|
6
6
|
exports.EXTNAME_TS = ['.ts', '.tsx'];
|
|
7
|
-
exports.EXTNAME_VUE = ['.vue', '.nvue'];
|
|
8
|
-
exports.
|
|
7
|
+
exports.EXTNAME_VUE = ['.vue', '.nvue', '.uvue'];
|
|
8
|
+
exports.X_EXTNAME_VUE = ['.uvue', '.vue'];
|
|
9
|
+
exports.EXTNAME_VUE_TEMPLATE = ['.vue', '.nvue', '.uvue', '.jsx', '.tsx'];
|
|
9
10
|
exports.EXTNAME_VUE_RE = /\.(vue|nvue|uvue)$/;
|
|
10
11
|
exports.EXTNAME_JS_RE = /\.(js|jsx|ts|tsx|mjs)$/;
|
|
11
12
|
exports.EXTNAME_TS_RE = /\.tsx?$/;
|
|
@@ -37,6 +38,8 @@ exports.BINDING_COMPONENTS = '__BINDING_COMPONENTS__';
|
|
|
37
38
|
exports.PAGE_EXTNAME_APP = ['.nvue', '.vue', '.tsx', '.jsx', '.js'];
|
|
38
39
|
// 其他平台解析页面后缀的优先级
|
|
39
40
|
exports.PAGE_EXTNAME = ['.vue', '.nvue', '.tsx', '.jsx', '.js'];
|
|
41
|
+
exports.X_PAGE_EXTNAME = ['.vue', '.uvue', '.tsx', '.jsx', '.js'];
|
|
42
|
+
exports.X_PAGE_EXTNAME_APP = ['.uvue', '.tsx', '.jsx', '.js'];
|
|
40
43
|
exports.H5_API_STYLE_PATH = '@dcloudio/uni-h5/style/api/';
|
|
41
44
|
exports.H5_FRAMEWORK_STYLE_PATH = '@dcloudio/uni-h5/style/framework/';
|
|
42
45
|
exports.H5_COMPONENTS_STYLE_PATH = '@dcloudio/uni-h5/style/';
|
package/dist/messages/en.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ declare const _default: {
|
|
|
2
2
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
3
3
|
readonly compiling: "Compiling...";
|
|
4
4
|
readonly 'dev.performance': "Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.";
|
|
5
|
+
readonly 'dev.exclusion': "Please configure the antivirus software to set up an exclusion list for scanning, reducing system resource consumption. [详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)";
|
|
5
6
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
6
7
|
readonly 'dev.performance.mp': "To officially release, please click the release menu or use the cli release command to release";
|
|
7
8
|
readonly 'build.done': "DONE Build complete.";
|
package/dist/messages/en.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.default = {
|
|
|
4
4
|
'app.compiler.version': 'Compiler version: {version}',
|
|
5
5
|
compiling: 'Compiling...',
|
|
6
6
|
'dev.performance': 'Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.',
|
|
7
|
+
'dev.exclusion': 'Please configure the antivirus software to set up an exclusion list for scanning, reducing system resource consumption. [详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)',
|
|
7
8
|
'dev.performance.nvue': 'Especially the sourcemap of app-nvue has a greater impact',
|
|
8
9
|
'dev.performance.mp': 'To officially release, please click the release menu or use the cli release command to release',
|
|
9
10
|
'build.done': 'DONE Build complete.',
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare const M: {
|
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
3
|
readonly compiling: "正在编译中...";
|
|
4
4
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
|
+
readonly 'dev.exclusion': "请在杀毒软件中设置扫描排除名单,减少系统资源消耗。[详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)";
|
|
5
6
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
6
7
|
readonly 'dev.performance.mp': "若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布";
|
|
7
8
|
readonly 'build.done': "DONE Build complete.";
|
|
@@ -45,6 +46,7 @@ export declare const M: {
|
|
|
45
46
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
46
47
|
readonly compiling: "Compiling...";
|
|
47
48
|
readonly 'dev.performance': "Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.";
|
|
49
|
+
readonly 'dev.exclusion': "Please configure the antivirus software to set up an exclusion list for scanning, reducing system resource consumption. [详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)";
|
|
48
50
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
49
51
|
readonly 'dev.performance.mp': "To officially release, please click the release menu or use the cli release command to release";
|
|
50
52
|
readonly 'build.done': "DONE Build complete.";
|
package/dist/messages/zh_CN.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ declare const _default: {
|
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
3
|
readonly compiling: "正在编译中...";
|
|
4
4
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
|
+
readonly 'dev.exclusion': "请在杀毒软件中设置扫描排除名单,减少系统资源消耗。[详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)";
|
|
5
6
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
6
7
|
readonly 'dev.performance.mp': "若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布";
|
|
7
8
|
readonly 'build.done': "DONE Build complete.";
|
package/dist/messages/zh_CN.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.default = {
|
|
|
4
4
|
'app.compiler.version': '编译器版本:{version}',
|
|
5
5
|
compiling: '正在编译中...',
|
|
6
6
|
'dev.performance': '请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。',
|
|
7
|
+
'dev.exclusion': '请在杀毒软件中设置扫描排除名单,减少系统资源消耗。[详情](https://uniapp.dcloud.net.cn/uni-app-x/compiler/#tips)',
|
|
7
8
|
'dev.performance.nvue': '尤其是 app-nvue 的 sourcemap 影响较大',
|
|
8
9
|
'dev.performance.mp': '若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布',
|
|
9
10
|
'build.done': 'DONE Build complete.',
|
package/dist/utils.js
CHANGED
|
@@ -33,9 +33,10 @@ function normalizeIdentifier(str) {
|
|
|
33
33
|
exports.normalizeIdentifier = normalizeIdentifier;
|
|
34
34
|
function normalizePagePath(pagePath, platform) {
|
|
35
35
|
const absolutePagePath = path_1.default.resolve(process.env.UNI_INPUT_DIR, pagePath);
|
|
36
|
-
|
|
36
|
+
const isX = process.env.UNI_APP_X === 'true';
|
|
37
|
+
let extensions = isX ? constants_1.X_PAGE_EXTNAME : constants_1.PAGE_EXTNAME;
|
|
37
38
|
if (platform === 'app') {
|
|
38
|
-
extensions = constants_1.PAGE_EXTNAME_APP;
|
|
39
|
+
extensions = isX ? constants_1.X_PAGE_EXTNAME_APP : constants_1.PAGE_EXTNAME_APP;
|
|
39
40
|
}
|
|
40
41
|
for (let i = 0; i < extensions.length; i++) {
|
|
41
42
|
const extname = extensions[i];
|
package/dist/vite/utils/url.js
CHANGED
|
@@ -61,7 +61,11 @@ function isJsFile(id) {
|
|
|
61
61
|
return true;
|
|
62
62
|
}
|
|
63
63
|
const isVueJs = constants_1.EXTNAME_VUE.includes(path_1.default.extname(filename)) &&
|
|
64
|
-
(!query.vue ||
|
|
64
|
+
(!query.vue ||
|
|
65
|
+
query.setup ||
|
|
66
|
+
(0, shared_1.hasOwn)(query, 'lang.ts') ||
|
|
67
|
+
(0, shared_1.hasOwn)(query, 'lang.js') ||
|
|
68
|
+
(0, shared_1.hasOwn)(query, 'lang.uts'));
|
|
65
69
|
if (isVueJs) {
|
|
66
70
|
return true;
|
|
67
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-3090120230928001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@babel/core": "^7.21.3",
|
|
26
26
|
"@babel/parser": "^7.16.4",
|
|
27
27
|
"@babel/types": "^7.20.7",
|
|
28
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
29
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
28
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-3090120230928001",
|
|
29
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3090120230928001",
|
|
30
30
|
"@intlify/core-base": "9.1.9",
|
|
31
31
|
"@intlify/shared": "9.1.9",
|
|
32
32
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
67
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-3090120230928001",
|
|
68
68
|
"@types/babel__core": "^7.1.19",
|
|
69
69
|
"@types/debug": "^4.1.7",
|
|
70
70
|
"@types/estree": "^0.0.51",
|