@dcloudio/uni-cli-shared 3.0.0-alpha-3050120220706001 → 3.0.0-alpha-3050220220718001
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/json/app/manifest/plus.js +4 -4
- package/dist/json/manifest.d.ts +1 -0
- package/dist/json/manifest.js +16 -1
- package/dist/messages/en.d.ts +23 -0
- package/dist/messages/en.js +24 -0
- package/dist/messages/index.d.ts +21 -0
- package/dist/messages/index.js +19 -22
- package/dist/messages/zh_CN.d.ts +23 -0
- package/dist/messages/zh_CN.js +24 -0
- package/package.json +4 -3
|
@@ -91,12 +91,12 @@ function initUniStatistics(manifestJson) {
|
|
|
91
91
|
manifestJson.plus.uniStatistics = (0, merge_1.recursive)(true, manifestJson.uniStatistics, manifestJson.plus.uniStatistics);
|
|
92
92
|
delete manifestJson.uniStatistics;
|
|
93
93
|
}
|
|
94
|
-
if (!process.env.
|
|
94
|
+
if (!process.env.UNI_CLOUD_PROVIDER) {
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
let spaces = [];
|
|
98
98
|
try {
|
|
99
|
-
spaces = JSON.parse(process.env.
|
|
99
|
+
spaces = JSON.parse(process.env.UNI_CLOUD_PROVIDER);
|
|
100
100
|
}
|
|
101
101
|
catch (e) { }
|
|
102
102
|
if (!(0, shared_1.isArray)(spaces) || !spaces.length) {
|
|
@@ -116,9 +116,9 @@ function initUniStatistics(manifestJson) {
|
|
|
116
116
|
}
|
|
117
117
|
uniStatistics.uniCloud = {
|
|
118
118
|
provider: space.provider,
|
|
119
|
-
spaceId: space.
|
|
119
|
+
spaceId: space.spaceId,
|
|
120
120
|
clientSecret: space.clientSecret,
|
|
121
|
-
endpoint: space.
|
|
121
|
+
endpoint: space.endpoint,
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
}
|
package/dist/json/manifest.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare function normalizeNetworkTimeout(networkTimeout?: Partial<typeof
|
|
|
19
19
|
downloadFile: number;
|
|
20
20
|
};
|
|
21
21
|
export declare function getUniStatistics(inputDir: string, platform: UniApp.PLATFORM): any;
|
|
22
|
+
export declare function isEnableUniPushV1(inputDir: string, platform: UniApp.PLATFORM): boolean;
|
|
22
23
|
export declare function isEnableUniPushV2(inputDir: string, platform: UniApp.PLATFORM): boolean;
|
|
23
24
|
export declare function isUniPushOffline(inputDir: string): boolean;
|
|
24
25
|
export declare function getRouterOptions(manifestJson: Record<string, any>): {
|
package/dist/json/manifest.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.getDevServerOptions = exports.isEnableTreeShaking = exports.getRouterOptions = exports.isUniPushOffline = exports.isEnableUniPushV2 = exports.getUniStatistics = exports.normalizeNetworkTimeout = exports.parseCompatConfigOnce = exports.parseRpx2UnitOnce = exports.parseManifestJsonOnce = exports.parseManifestJson = void 0;
|
|
6
|
+
exports.getDevServerOptions = exports.isEnableTreeShaking = exports.getRouterOptions = exports.isUniPushOffline = exports.isEnableUniPushV2 = exports.isEnableUniPushV1 = exports.getUniStatistics = exports.normalizeNetworkTimeout = exports.parseCompatConfigOnce = exports.parseRpx2UnitOnce = exports.parseManifestJsonOnce = exports.parseManifestJson = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const shared_1 = require("@vue/shared");
|
|
@@ -47,6 +47,21 @@ function getUniStatistics(inputDir, platform) {
|
|
|
47
47
|
return (0, shared_1.extend)({}, manifest.uniStatistics, manifest[platform] && manifest[platform].uniStatistics);
|
|
48
48
|
}
|
|
49
49
|
exports.getUniStatistics = getUniStatistics;
|
|
50
|
+
function isEnableUniPushV1(inputDir, platform) {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
if (isEnableUniPushV2(inputDir, platform)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const manifest = (0, exports.parseManifestJsonOnce)(inputDir);
|
|
56
|
+
if (platform === 'app') {
|
|
57
|
+
const push = (_c = (_b = (_a = manifest['app-plus']) === null || _a === void 0 ? void 0 : _a.distribute) === null || _b === void 0 ? void 0 : _b.sdkConfigs) === null || _c === void 0 ? void 0 : _c.push;
|
|
58
|
+
if (push && (0, shared_1.hasOwn)(push, 'unipush')) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
exports.isEnableUniPushV1 = isEnableUniPushV1;
|
|
50
65
|
function isEnableUniPushV2(inputDir, platform) {
|
|
51
66
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
52
67
|
const manifest = (0, exports.parseManifestJsonOnce)(inputDir);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
3
|
+
readonly compiling: "Compiling...";
|
|
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.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
6
|
+
readonly 'dev.performance.mp': "To officially release, please click the release menu or use the cli release command to release";
|
|
7
|
+
readonly 'build.done': "DONE Build complete.";
|
|
8
|
+
readonly 'dev.watching.start': "Compiling...";
|
|
9
|
+
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
10
|
+
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
11
|
+
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
12
|
+
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";
|
|
13
|
+
readonly 'stat.warn.version': "The uni statistics version is not configured. The default version is 1.0.uni statistics version 2.0 is recommended, private deployment data is more secure and code is open source and customizable. details: https://uniapp.dcloud.io/uni-stat";
|
|
14
|
+
readonly 'stat.warn.tip': "uni statistics version: {version}";
|
|
15
|
+
readonly 'i18n.fallbackLocale.default': "fallbackLocale is missing in manifest.json, use: {locale}";
|
|
16
|
+
readonly 'i18n.fallbackLocale.missing': "./local/{locale}.json is missing";
|
|
17
|
+
readonly 'easycom.conflict': "easycom component conflict: ";
|
|
18
|
+
readonly 'mp.component.args[0]': "The first parameter of {0} must be a static string";
|
|
19
|
+
readonly 'mp.component.args[1]': "{0} requires two parameters";
|
|
20
|
+
readonly 'mp.360.unsupported': "360 is unsupported";
|
|
21
|
+
readonly 'file.notfound': "{file} is not found";
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
'app.compiler.version': 'Compiler version: {version}',
|
|
5
|
+
compiling: 'Compiling...',
|
|
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.performance.nvue': 'Especially the sourcemap of app-nvue has a greater impact',
|
|
8
|
+
'dev.performance.mp': 'To officially release, please click the release menu or use the cli release command to release',
|
|
9
|
+
'build.done': 'DONE Build complete.',
|
|
10
|
+
'dev.watching.start': 'Compiling...',
|
|
11
|
+
'dev.watching.end': 'DONE Build complete. Watching for changes...',
|
|
12
|
+
'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
|
|
13
|
+
'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
|
|
14
|
+
'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',
|
|
15
|
+
'stat.warn.version': 'The uni statistics version is not configured. The default version is 1.0.uni statistics version 2.0 is recommended, private deployment data is more secure and code is open source and customizable. details: https://uniapp.dcloud.io/uni-stat',
|
|
16
|
+
'stat.warn.tip': 'uni statistics version: {version}',
|
|
17
|
+
'i18n.fallbackLocale.default': 'fallbackLocale is missing in manifest.json, use: {locale}',
|
|
18
|
+
'i18n.fallbackLocale.missing': './local/{locale}.json is missing',
|
|
19
|
+
'easycom.conflict': 'easycom component conflict: ',
|
|
20
|
+
'mp.component.args[0]': 'The first parameter of {0} must be a static string',
|
|
21
|
+
'mp.component.args[1]': '{0} requires two parameters',
|
|
22
|
+
'mp.360.unsupported': '360 is unsupported',
|
|
23
|
+
'file.notfound': '{file} is not found',
|
|
24
|
+
};
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -19,4 +19,25 @@ export declare const M: {
|
|
|
19
19
|
readonly 'mp.component.args[1]': "{0}需要两个参数";
|
|
20
20
|
readonly 'mp.360.unsupported': "vue3暂不支持360小程序";
|
|
21
21
|
readonly 'file.notfound': "{file} 文件不存在";
|
|
22
|
+
} | {
|
|
23
|
+
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
24
|
+
readonly compiling: "Compiling...";
|
|
25
|
+
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.";
|
|
26
|
+
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
27
|
+
readonly 'dev.performance.mp': "To officially release, please click the release menu or use the cli release command to release";
|
|
28
|
+
readonly 'build.done': "DONE Build complete.";
|
|
29
|
+
readonly 'dev.watching.start': "Compiling...";
|
|
30
|
+
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
31
|
+
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
32
|
+
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
33
|
+
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";
|
|
34
|
+
readonly 'stat.warn.version': "The uni statistics version is not configured. The default version is 1.0.uni statistics version 2.0 is recommended, private deployment data is more secure and code is open source and customizable. details: https://uniapp.dcloud.io/uni-stat";
|
|
35
|
+
readonly 'stat.warn.tip': "uni statistics version: {version}";
|
|
36
|
+
readonly 'i18n.fallbackLocale.default': "fallbackLocale is missing in manifest.json, use: {locale}";
|
|
37
|
+
readonly 'i18n.fallbackLocale.missing': "./local/{locale}.json is missing";
|
|
38
|
+
readonly 'easycom.conflict': "easycom component conflict: ";
|
|
39
|
+
readonly 'mp.component.args[0]': "The first parameter of {0} must be a static string";
|
|
40
|
+
readonly 'mp.component.args[1]': "{0} requires two parameters";
|
|
41
|
+
readonly 'mp.360.unsupported': "360 is unsupported";
|
|
42
|
+
readonly 'file.notfound': "{file} is not found";
|
|
22
43
|
};
|
package/dist/messages/index.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.M = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
'easycom.conflict': 'easycom组件冲突:',
|
|
21
|
-
'mp.component.args[0]': '{0}的第一个参数必须为静态字符串',
|
|
22
|
-
'mp.component.args[1]': '{0}需要两个参数',
|
|
23
|
-
'mp.360.unsupported': 'vue3暂不支持360小程序',
|
|
24
|
-
'file.notfound': '{file} 文件不存在',
|
|
25
|
-
};
|
|
7
|
+
const os_locale_s_fix_1 = require("os-locale-s-fix");
|
|
8
|
+
const en_1 = __importDefault(require("./en"));
|
|
9
|
+
const zh_CN_1 = __importDefault(require("./zh_CN"));
|
|
10
|
+
function format(lang) {
|
|
11
|
+
const array = lang.split(/[.,]/)[0].split(/[_-]/);
|
|
12
|
+
array[0] = array[0].toLowerCase();
|
|
13
|
+
if (array[0] === 'zh') {
|
|
14
|
+
array[1] = (array[1] || 'CN').toUpperCase();
|
|
15
|
+
}
|
|
16
|
+
array.length = Math.min(array.length, 2);
|
|
17
|
+
return array.join('_');
|
|
18
|
+
}
|
|
19
|
+
const locale = format(process.env.UNI_HBUILDERX_LANGID ||
|
|
20
|
+
os_locale_s_fix_1.osLocale.sync({ spawn: true, cache: false }) ||
|
|
21
|
+
'en');
|
|
22
|
+
exports.M = locale === 'zh_CN' ? zh_CN_1.default : en_1.default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
|
+
readonly compiling: "正在编译中...";
|
|
4
|
+
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
|
+
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
6
|
+
readonly 'dev.performance.mp': "若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布";
|
|
7
|
+
readonly 'build.done': "DONE Build complete.";
|
|
8
|
+
readonly 'dev.watching.start': "开始差量编译...";
|
|
9
|
+
readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
|
|
10
|
+
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
11
|
+
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
12
|
+
readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
|
|
13
|
+
readonly 'stat.warn.version': "当前应用未配置uni统计版本,默认使用1.0版本;建议使用uni统计2.0版本 ,私有部署数据更安全,代码开源可定制。详情:https://uniapp.dcloud.io/uni-stat";
|
|
14
|
+
readonly 'stat.warn.tip': "已开启 uni统计{version} 版本";
|
|
15
|
+
readonly 'i18n.fallbackLocale.default': "当前应用未在 manifest.json 配置 fallbackLocale,默认使用:{locale}";
|
|
16
|
+
readonly 'i18n.fallbackLocale.missing': "当前应用配置的 fallbackLocale 或 locale 为:{locale},但 locale 目录缺少该语言文件";
|
|
17
|
+
readonly 'easycom.conflict': "easycom组件冲突:";
|
|
18
|
+
readonly 'mp.component.args[0]': "{0}的第一个参数必须为静态字符串";
|
|
19
|
+
readonly 'mp.component.args[1]': "{0}需要两个参数";
|
|
20
|
+
readonly 'mp.360.unsupported': "vue3暂不支持360小程序";
|
|
21
|
+
readonly 'file.notfound': "{file} 文件不存在";
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
'app.compiler.version': '编译器版本:{version}',
|
|
5
|
+
compiling: '正在编译中...',
|
|
6
|
+
'dev.performance': '请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。',
|
|
7
|
+
'dev.performance.nvue': '尤其是 app-nvue 的 sourcemap 影响较大',
|
|
8
|
+
'dev.performance.mp': '若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布',
|
|
9
|
+
'build.done': 'DONE Build complete.',
|
|
10
|
+
'dev.watching.start': '开始差量编译...',
|
|
11
|
+
'dev.watching.end': 'DONE Build complete. Watching for changes...',
|
|
12
|
+
'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
|
|
13
|
+
'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
|
|
14
|
+
'stat.warn.appid': '当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303',
|
|
15
|
+
'stat.warn.version': '当前应用未配置uni统计版本,默认使用1.0版本;建议使用uni统计2.0版本 ,私有部署数据更安全,代码开源可定制。详情:https://uniapp.dcloud.io/uni-stat',
|
|
16
|
+
'stat.warn.tip': '已开启 uni统计{version} 版本',
|
|
17
|
+
'i18n.fallbackLocale.default': '当前应用未在 manifest.json 配置 fallbackLocale,默认使用:{locale}',
|
|
18
|
+
'i18n.fallbackLocale.missing': '当前应用配置的 fallbackLocale 或 locale 为:{locale},但 locale 目录缺少该语言文件',
|
|
19
|
+
'easycom.conflict': 'easycom组件冲突:',
|
|
20
|
+
'mp.component.args[0]': '{0}的第一个参数必须为静态字符串',
|
|
21
|
+
'mp.component.args[1]': '{0}需要两个参数',
|
|
22
|
+
'mp.360.unsupported': 'vue3暂不支持360小程序',
|
|
23
|
+
'file.notfound': '{file} 文件不存在',
|
|
24
|
+
};
|
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-3050220220718001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@babel/core": "^7.17.9",
|
|
23
23
|
"@babel/parser": "^7.17.9",
|
|
24
24
|
"@babel/types": "^7.17.0",
|
|
25
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
26
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
25
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-3050220220718001",
|
|
26
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3050220220718001",
|
|
27
27
|
"@intlify/core-base": "9.1.9",
|
|
28
28
|
"@intlify/shared": "9.1.9",
|
|
29
29
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"merge": "^2.1.1",
|
|
50
50
|
"mime": "^3.0.0",
|
|
51
51
|
"module-alias": "^2.2.2",
|
|
52
|
+
"os-locale-s-fix": "^1.0.8-fix-1",
|
|
52
53
|
"picocolors": "^1.0.0",
|
|
53
54
|
"postcss-import": "^14.0.2",
|
|
54
55
|
"postcss-load-config": "^3.1.1",
|