@dcloudio/uni-cli-shared 3.0.0-alpha-3071220230331001 → 3.0.0-alpha-3071320230407001
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.
|
@@ -31,11 +31,10 @@ exports.getNVueStyleCompiler = getNVueStyleCompiler;
|
|
|
31
31
|
const flexDirs = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
32
32
|
function getNVueFlexDirection(manifestJson) {
|
|
33
33
|
let flexDir = 'column';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
34
|
+
const appPlusJson = manifestJson['app-plus'] || manifestJson['plus'];
|
|
35
|
+
if (appPlusJson?.nvue?.['flex-direction'] &&
|
|
36
|
+
flexDirs.includes(appPlusJson?.nvue?.['flex-direction'])) {
|
|
37
|
+
flexDir = appPlusJson.nvue['flex-direction'];
|
|
39
38
|
}
|
|
40
39
|
return flexDir;
|
|
41
40
|
}
|
|
@@ -3,7 +3,7 @@ export declare function isMiniProgramPageFile(file: string, inputDir?: string):
|
|
|
3
3
|
export declare function isMiniProgramPageSfcFile(file: string, inputDir?: string): boolean;
|
|
4
4
|
export declare function hasJsonFile(filename: string): boolean;
|
|
5
5
|
export declare function getComponentJsonFilenames(): string[];
|
|
6
|
-
export declare function findJsonFile(filename: string): Record<string, any> | undefined;
|
|
6
|
+
export declare function findJsonFile(filename: string): ComponentJson | PageWindowOptions | Record<string, any> | undefined;
|
|
7
7
|
export declare function findUsingComponents(filename: string): UsingComponents | undefined;
|
|
8
8
|
export declare function normalizeJsonFilename(filename: string): string;
|
|
9
9
|
export declare function findChangedJsonFiles(supportGlobalUsingComponents?: boolean): Map<string, string>;
|
package/dist/json/mp/types.d.ts
CHANGED
package/dist/uni_modules.js
CHANGED
|
@@ -12,6 +12,13 @@ function parseUniExtApis(vite = true) {
|
|
|
12
12
|
if (!fs_extra_1.default.existsSync(uniModulesDir)) {
|
|
13
13
|
return {};
|
|
14
14
|
}
|
|
15
|
+
let platform = process.env.UNI_PLATFORM;
|
|
16
|
+
if (platform === 'h5') {
|
|
17
|
+
platform = 'web';
|
|
18
|
+
}
|
|
19
|
+
else if (platform === 'app-plus') {
|
|
20
|
+
platform = 'app';
|
|
21
|
+
}
|
|
15
22
|
const injects = {};
|
|
16
23
|
fs_extra_1.default.readdirSync(uniModulesDir).forEach((uniModuleDir) => {
|
|
17
24
|
// 必须以 uni- 开头
|
|
@@ -26,9 +33,19 @@ function parseUniExtApis(vite = true) {
|
|
|
26
33
|
const exports = JSON.parse(fs_extra_1.default.readFileSync(pkgPath, 'utf8'))
|
|
27
34
|
?.uni_modules?.['uni-ext-api'];
|
|
28
35
|
if (exports) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
const curInjects = parseInjects(vite, platform, `@/uni_modules/${uniModuleDir}`, exports);
|
|
37
|
+
if (platform === 'app') {
|
|
38
|
+
Object.keys(curInjects).forEach((name) => {
|
|
39
|
+
const options = curInjects[name];
|
|
40
|
+
// js 平台禁用了
|
|
41
|
+
if (Array.isArray(options) && options.length === 3) {
|
|
42
|
+
if (options[2] && options[2].js === false) {
|
|
43
|
+
delete curInjects[name];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
Object.assign(injects, curInjects);
|
|
32
49
|
}
|
|
33
50
|
}
|
|
34
51
|
catch (e) { }
|
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-3071320230407001",
|
|
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-3071320230407001",
|
|
29
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3071320230407001",
|
|
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-3071320230407001",
|
|
68
68
|
"@types/babel__core": "^7.1.19",
|
|
69
69
|
"@types/debug": "^4.1.7",
|
|
70
70
|
"@types/estree": "^0.0.51",
|