@dcloudio/uni-cli-shared 3.0.0-alpha-3090820231120001 → 3.0.0-alpha-3090920231127001
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/pages/uniConfig.d.ts +5 -0
- package/dist/json/app/pages/uniConfig.js +2 -1
- package/dist/json/index.d.ts +1 -1
- package/dist/json/index.js +4 -3
- package/dist/json/mp/pages.js +1 -1
- package/dist/json/uni-x/index.d.ts +8 -0
- package/dist/json/{uniAppX.js → uni-x/index.js} +23 -4
- package/dist/json/uni-x/uniConfig.d.ts +1 -0
- package/dist/json/uni-x/uniConfig.js +18 -0
- package/package.json +4 -4
- package/dist/json/uniAppX.d.ts +0 -1
|
@@ -1 +1,6 @@
|
|
|
1
1
|
export declare function normalizeAppUniConfig(pagesJson: UniApp.PagesJson, manifestJson: Record<string, any>): string;
|
|
2
|
+
export declare function parseEntryPagePath(pagesJson: UniApp.PagesJson): {
|
|
3
|
+
entryPagePath: string;
|
|
4
|
+
entryPageQuery: string;
|
|
5
|
+
realEntryPagePath: string;
|
|
6
|
+
};
|
|
@@ -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.normalizeAppUniConfig = void 0;
|
|
6
|
+
exports.parseEntryPagePath = exports.normalizeAppUniConfig = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const i18n_1 = require("../../../i18n");
|
|
9
9
|
const manifest_1 = require("../../manifest");
|
|
@@ -70,3 +70,4 @@ function parseEntryPagePath(pagesJson) {
|
|
|
70
70
|
}
|
|
71
71
|
return res;
|
|
72
72
|
}
|
|
73
|
+
exports.parseEntryPagePath = parseEntryPagePath;
|
package/dist/json/index.d.ts
CHANGED
package/dist/json/index.js
CHANGED
|
@@ -14,12 +14,13 @@ 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.normalizeUniAppXAppPagesJson = void 0;
|
|
17
|
+
exports.normalizeUniAppXAppConfig = exports.normalizeUniAppXAppPagesJson = void 0;
|
|
18
18
|
__exportStar(require("./mp"), exports);
|
|
19
19
|
__exportStar(require("./app"), exports);
|
|
20
20
|
__exportStar(require("./json"), exports);
|
|
21
21
|
__exportStar(require("./pages"), exports);
|
|
22
22
|
__exportStar(require("./manifest"), exports);
|
|
23
23
|
__exportStar(require("./theme"), exports);
|
|
24
|
-
var
|
|
25
|
-
Object.defineProperty(exports, "normalizeUniAppXAppPagesJson", { enumerable: true, get: function () { return
|
|
24
|
+
var uni_x_1 = require("./uni-x");
|
|
25
|
+
Object.defineProperty(exports, "normalizeUniAppXAppPagesJson", { enumerable: true, get: function () { return uni_x_1.normalizeUniAppXAppPagesJson; } });
|
|
26
|
+
Object.defineProperty(exports, "normalizeUniAppXAppConfig", { enumerable: true, get: function () { return uni_x_1.normalizeUniAppXAppConfig; } });
|
package/dist/json/mp/pages.js
CHANGED
|
@@ -24,9 +24,9 @@ const NON_APP_JSON_KEYS = [
|
|
|
24
24
|
'usingComponents',
|
|
25
25
|
'optimization',
|
|
26
26
|
'scopedSlotsCompiler',
|
|
27
|
-
'usingComponents',
|
|
28
27
|
'uniStatistics',
|
|
29
28
|
'mergeVirtualHostAttributes',
|
|
29
|
+
'styleIsolation',
|
|
30
30
|
];
|
|
31
31
|
function mergeMiniProgramAppJson(appJson, platformJson = {}) {
|
|
32
32
|
Object.keys(platformJson).forEach((name) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function normalizeUniAppXAppPagesJson(jsonStr: string): UniApp.PagesJson;
|
|
2
|
+
/**
|
|
3
|
+
* TODO 应该闭包,通过globalThis赋值?
|
|
4
|
+
* @param pagesJson
|
|
5
|
+
* @param manifestJson
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeUniAppXAppConfig(pagesJson: UniApp.PagesJson, manifestJson: Record<string, any>): string;
|
|
@@ -3,12 +3,14 @@ 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.normalizeUniAppXAppPagesJson = void 0;
|
|
6
|
+
exports.normalizeUniAppXAppConfig = exports.normalizeUniAppXAppPagesJson = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const shared_1 = require("@vue/shared");
|
|
9
|
-
const json_1 = require("
|
|
10
|
-
const pages_1 = require("
|
|
11
|
-
const utils_1 = require("
|
|
9
|
+
const json_1 = require("../json");
|
|
10
|
+
const pages_1 = require("../pages");
|
|
11
|
+
const utils_1 = require("../../utils");
|
|
12
|
+
const uniRoutes_1 = require("../app/pages/uniRoutes");
|
|
13
|
+
const uniConfig_1 = require("./uniConfig");
|
|
12
14
|
function normalizeUniAppXAppPagesJson(jsonStr) {
|
|
13
15
|
const pagesJson = {
|
|
14
16
|
pages: [],
|
|
@@ -46,6 +48,10 @@ function normalizeUniAppXAppPagesJson(jsonStr) {
|
|
|
46
48
|
if (userPagesJson.condition) {
|
|
47
49
|
pagesJson.condition = userPagesJson.condition;
|
|
48
50
|
}
|
|
51
|
+
// uniIdRouter
|
|
52
|
+
if (userPagesJson.uniIdRouter) {
|
|
53
|
+
pagesJson.uniIdRouter = userPagesJson.uniIdRouter;
|
|
54
|
+
}
|
|
49
55
|
return pagesJson;
|
|
50
56
|
}
|
|
51
57
|
exports.normalizeUniAppXAppPagesJson = normalizeUniAppXAppPagesJson;
|
|
@@ -77,3 +83,16 @@ function normalizePageStyle(pageStyle) {
|
|
|
77
83
|
}
|
|
78
84
|
return {};
|
|
79
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* TODO 应该闭包,通过globalThis赋值?
|
|
88
|
+
* @param pagesJson
|
|
89
|
+
* @param manifestJson
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
function normalizeUniAppXAppConfig(pagesJson, manifestJson) {
|
|
93
|
+
return `const __uniConfig = ${(0, uniConfig_1.normalizeAppXUniConfig)(pagesJson, manifestJson)};
|
|
94
|
+
const __uniRoutes = ${(0, uniRoutes_1.normalizeAppUniRoutes)(pagesJson)}.map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
|
95
|
+
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
exports.normalizeUniAppXAppConfig = normalizeUniAppXAppConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeAppXUniConfig(pagesJson: UniApp.PagesJson, manifestJson: Record<string, any>): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeAppXUniConfig = void 0;
|
|
4
|
+
const uniConfig_1 = require("../app/pages/uniConfig");
|
|
5
|
+
function normalizeAppXUniConfig(pagesJson, manifestJson) {
|
|
6
|
+
const config = {
|
|
7
|
+
pages: [],
|
|
8
|
+
globalStyle: pagesJson.globalStyle,
|
|
9
|
+
appname: manifestJson.name || '',
|
|
10
|
+
compilerVersion: process.env.UNI_COMPILER_VERSION,
|
|
11
|
+
...(0, uniConfig_1.parseEntryPagePath)(pagesJson),
|
|
12
|
+
tabBar: pagesJson.tabBar,
|
|
13
|
+
fallbackLocale: manifestJson.fallbackLocale,
|
|
14
|
+
};
|
|
15
|
+
// TODO 待支持分包
|
|
16
|
+
return JSON.stringify(config);
|
|
17
|
+
}
|
|
18
|
+
exports.normalizeAppXUniConfig = normalizeAppXUniConfig;
|
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-3090920231127001",
|
|
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-3090920231127001",
|
|
29
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3090920231127001",
|
|
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-3090920231127001",
|
|
68
68
|
"@types/babel__core": "^7.1.19",
|
|
69
69
|
"@types/debug": "^4.1.7",
|
|
70
70
|
"@types/estree": "^0.0.51",
|
package/dist/json/uniAppX.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function normalizeUniAppXAppPagesJson(jsonStr: string): UniApp.PagesJson;
|