@dcloudio/uni-cli-shared 3.0.0-alpha-3071320230407001 → 3.0.0-alpha-3071320230417001
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/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.d.ts +2 -1
- package/dist/preprocess/context.js +17 -2
- package/dist/preprocess/index.d.ts +4 -0
- package/dist/preprocess/index.js +11 -1
- package/dist/resolve.js +4 -0
- package/package.json +4 -4
package/dist/messages/en.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ declare const _default: {
|
|
|
36
36
|
readonly 'prompt.run.devtools.quickapp-webview': "Quick App Alliance Devtools | Huawei Quick App Devtools";
|
|
37
37
|
readonly 'prompt.run.devtools.quickapp-webview-huawei': "Huawei Quick App Devtools";
|
|
38
38
|
readonly 'prompt.run.devtools.quickapp-webview-union': "Quick App Alliance Devtools";
|
|
39
|
+
readonly 'uvue.unsupported': "uvue does not support {platform} platform";
|
|
39
40
|
};
|
|
40
41
|
export default _default;
|
package/dist/messages/en.js
CHANGED
|
@@ -38,4 +38,5 @@ exports.default = {
|
|
|
38
38
|
'prompt.run.devtools.quickapp-webview': 'Quick App Alliance Devtools | Huawei Quick App Devtools',
|
|
39
39
|
'prompt.run.devtools.quickapp-webview-huawei': 'Huawei Quick App Devtools',
|
|
40
40
|
'prompt.run.devtools.quickapp-webview-union': 'Quick App Alliance Devtools',
|
|
41
|
+
'uvue.unsupported': 'uvue does not support {platform} platform',
|
|
41
42
|
};
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare const M: {
|
|
|
36
36
|
readonly 'prompt.run.devtools.quickapp-webview': "快应用联盟开发者工具 | 华为快应用开发者工具";
|
|
37
37
|
readonly 'prompt.run.devtools.quickapp-webview-huawei': "华为快应用开发者工具";
|
|
38
38
|
readonly 'prompt.run.devtools.quickapp-webview-union': "快应用联盟开发者工具";
|
|
39
|
+
readonly 'uvue.unsupported': "uvue 暂不支持 {platform} 平台";
|
|
39
40
|
} | {
|
|
40
41
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
41
42
|
readonly compiling: "Compiling...";
|
|
@@ -74,4 +75,5 @@ export declare const M: {
|
|
|
74
75
|
readonly 'prompt.run.devtools.quickapp-webview': "Quick App Alliance Devtools | Huawei Quick App Devtools";
|
|
75
76
|
readonly 'prompt.run.devtools.quickapp-webview-huawei': "Huawei Quick App Devtools";
|
|
76
77
|
readonly 'prompt.run.devtools.quickapp-webview-union': "Quick App Alliance Devtools";
|
|
78
|
+
readonly 'uvue.unsupported': "uvue does not support {platform} platform";
|
|
77
79
|
};
|
package/dist/messages/zh_CN.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ declare const _default: {
|
|
|
36
36
|
readonly 'prompt.run.devtools.quickapp-webview': "快应用联盟开发者工具 | 华为快应用开发者工具";
|
|
37
37
|
readonly 'prompt.run.devtools.quickapp-webview-huawei': "华为快应用开发者工具";
|
|
38
38
|
readonly 'prompt.run.devtools.quickapp-webview-union': "快应用联盟开发者工具";
|
|
39
|
+
readonly 'uvue.unsupported': "uvue 暂不支持 {platform} 平台";
|
|
39
40
|
};
|
|
40
41
|
export default _default;
|
package/dist/messages/zh_CN.js
CHANGED
|
@@ -38,4 +38,5 @@ exports.default = {
|
|
|
38
38
|
'prompt.run.devtools.quickapp-webview': '快应用联盟开发者工具 | 华为快应用开发者工具',
|
|
39
39
|
'prompt.run.devtools.quickapp-webview-huawei': '华为快应用开发者工具',
|
|
40
40
|
'prompt.run.devtools.quickapp-webview-union': '快应用联盟开发者工具',
|
|
41
|
+
'uvue.unsupported': 'uvue 暂不支持 {platform} 平台',
|
|
41
42
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function getPreVueContext(): any;
|
|
2
2
|
export declare function getPreNVueContext(): any;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getPreUVueContext(): any;
|
|
4
|
+
export declare function initPreContext(platform: UniApp.PLATFORM, userPreContext?: Record<string, boolean> | string, utsPlatform?: typeof process.env.UNI_UTS_PLATFORM): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initPreContext = exports.getPreNVueContext = exports.getPreVueContext = void 0;
|
|
3
|
+
exports.initPreContext = exports.getPreUVueContext = exports.getPreNVueContext = exports.getPreVueContext = void 0;
|
|
4
4
|
const shared_1 = require("@vue/shared");
|
|
5
5
|
const DEFAULT_KEYS = [
|
|
6
6
|
'APP',
|
|
@@ -31,6 +31,7 @@ const DEFAULT_KEYS = [
|
|
|
31
31
|
];
|
|
32
32
|
const preVueContext = Object.create(null);
|
|
33
33
|
const preNVueContext = Object.create(null);
|
|
34
|
+
const preUVueContext = Object.create(null);
|
|
34
35
|
function getPreVueContext() {
|
|
35
36
|
return preVueContext;
|
|
36
37
|
}
|
|
@@ -39,9 +40,14 @@ function getPreNVueContext() {
|
|
|
39
40
|
return preNVueContext;
|
|
40
41
|
}
|
|
41
42
|
exports.getPreNVueContext = getPreNVueContext;
|
|
42
|
-
function
|
|
43
|
+
function getPreUVueContext() {
|
|
44
|
+
return preUVueContext;
|
|
45
|
+
}
|
|
46
|
+
exports.getPreUVueContext = getPreUVueContext;
|
|
47
|
+
function initPreContext(platform, userPreContext, utsPlatform) {
|
|
43
48
|
const vueContext = Object.create(null);
|
|
44
49
|
const nvueContext = Object.create(null);
|
|
50
|
+
const uvueContext = Object.create(null);
|
|
45
51
|
const defaultContext = Object.create(null);
|
|
46
52
|
DEFAULT_KEYS.forEach((key) => {
|
|
47
53
|
defaultContext[key] = false;
|
|
@@ -49,12 +55,20 @@ function initPreContext(platform, userPreContext) {
|
|
|
49
55
|
defaultContext[normalizeKey(platform)] = true;
|
|
50
56
|
vueContext.VUE3 = true;
|
|
51
57
|
nvueContext.VUE3 = true;
|
|
58
|
+
uvueContext.VUE3 = true;
|
|
52
59
|
if (platform === 'app' || platform === 'app-plus') {
|
|
53
60
|
defaultContext.APP = true;
|
|
54
61
|
defaultContext.APP_PLUS = true;
|
|
55
62
|
vueContext.APP_VUE = true;
|
|
56
63
|
nvueContext.APP_NVUE = true;
|
|
57
64
|
nvueContext.APP_PLUS_NVUE = true;
|
|
65
|
+
uvueContext.APP_UVUE = true;
|
|
66
|
+
if (utsPlatform === 'app-android') {
|
|
67
|
+
uvueContext.APP_ANDROID = true;
|
|
68
|
+
}
|
|
69
|
+
else if (utsPlatform === 'app-ios') {
|
|
70
|
+
uvueContext.APP_IOS = true;
|
|
71
|
+
}
|
|
58
72
|
}
|
|
59
73
|
else if (platform.startsWith('mp-')) {
|
|
60
74
|
defaultContext.MP = true;
|
|
@@ -80,6 +94,7 @@ function initPreContext(platform, userPreContext) {
|
|
|
80
94
|
}
|
|
81
95
|
(0, shared_1.extend)(preVueContext, defaultContext, vueContext);
|
|
82
96
|
(0, shared_1.extend)(preNVueContext, defaultContext, nvueContext);
|
|
97
|
+
(0, shared_1.extend)(preUVueContext, defaultContext, uvueContext);
|
|
83
98
|
}
|
|
84
99
|
exports.initPreContext = initPreContext;
|
|
85
100
|
function normalizeKey(name) {
|
|
@@ -7,3 +7,7 @@ export declare function preNVueJs(jsCode: string): any;
|
|
|
7
7
|
export declare function preNVueHtml(htmlCode: string): any;
|
|
8
8
|
export declare const preNVueCss: typeof preNVueJs;
|
|
9
9
|
export declare const preNVueJson: typeof preNVueJs;
|
|
10
|
+
export declare function preUVueJs(jsCode: string): any;
|
|
11
|
+
export declare function preUVueHtml(htmlCode: string): any;
|
|
12
|
+
export declare const preUVueCss: typeof preUVueJs;
|
|
13
|
+
export declare const preUVueJson: typeof preUVueJs;
|
package/dist/preprocess/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.preNVueJson = exports.preNVueCss = exports.preNVueHtml = exports.preNVueJs = exports.preJson = exports.preCss = exports.preHtml = exports.preJs = exports.initPreContext = void 0;
|
|
3
|
+
exports.preUVueJson = exports.preUVueCss = exports.preUVueHtml = exports.preUVueJs = exports.preNVueJson = exports.preNVueCss = exports.preNVueHtml = exports.preNVueJs = exports.preJson = exports.preCss = exports.preHtml = exports.preJs = exports.initPreContext = void 0;
|
|
4
4
|
const context_1 = require("./context");
|
|
5
5
|
/* eslint-disable no-restricted-globals */
|
|
6
6
|
const { preprocess } = require('../../lib/preprocess');
|
|
@@ -26,3 +26,13 @@ function preNVueHtml(htmlCode) {
|
|
|
26
26
|
exports.preNVueHtml = preNVueHtml;
|
|
27
27
|
exports.preNVueCss = preNVueJs;
|
|
28
28
|
exports.preNVueJson = preNVueJs;
|
|
29
|
+
function preUVueJs(jsCode) {
|
|
30
|
+
return preprocess(jsCode, (0, context_1.getPreUVueContext)(), { type: 'js' });
|
|
31
|
+
}
|
|
32
|
+
exports.preUVueJs = preUVueJs;
|
|
33
|
+
function preUVueHtml(htmlCode) {
|
|
34
|
+
return preprocess(htmlCode, (0, context_1.getPreUVueContext)(), { type: 'html' });
|
|
35
|
+
}
|
|
36
|
+
exports.preUVueHtml = preUVueHtml;
|
|
37
|
+
exports.preUVueCss = preUVueJs;
|
|
38
|
+
exports.preUVueJson = preUVueJs;
|
package/dist/resolve.js
CHANGED
|
@@ -30,6 +30,10 @@ function relativeFile(from, to) {
|
|
|
30
30
|
}
|
|
31
31
|
exports.relativeFile = relativeFile;
|
|
32
32
|
exports.resolveMainPathOnce = (0, uni_shared_1.once)((inputDir) => {
|
|
33
|
+
const mainUTSPath = path_1.default.resolve(inputDir, 'main.uts');
|
|
34
|
+
if (fs_1.default.existsSync(mainUTSPath)) {
|
|
35
|
+
return (0, utils_1.normalizePath)(mainUTSPath);
|
|
36
|
+
}
|
|
33
37
|
const mainTsPath = path_1.default.resolve(inputDir, 'main.ts');
|
|
34
38
|
if (fs_1.default.existsSync(mainTsPath)) {
|
|
35
39
|
return (0, utils_1.normalizePath)(mainTsPath);
|
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-3071320230417001",
|
|
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.20.5",
|
|
26
26
|
"@babel/parser": "^7.20.5",
|
|
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-3071320230417001",
|
|
29
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3071320230417001",
|
|
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-3071320230417001",
|
|
68
68
|
"@types/babel__core": "^7.1.19",
|
|
69
69
|
"@types/debug": "^4.1.7",
|
|
70
70
|
"@types/estree": "^0.0.51",
|