@dcloudio/uni-cli-shared 3.0.0-alpha-4010820240529001 → 3.0.0-alpha-4010820240529002
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeAppXUniConfig = void 0;
|
|
4
4
|
const uniConfig_1 = require("../app/pages/uniConfig");
|
|
5
|
+
// app-config.js 内容
|
|
5
6
|
function normalizeAppXUniConfig(pagesJson, manifestJson) {
|
|
6
7
|
const config = {
|
|
7
8
|
pages: [],
|
|
@@ -16,6 +17,10 @@ function normalizeAppXUniConfig(pagesJson, manifestJson) {
|
|
|
16
17
|
config.conditionUrl = config.entryPagePath;
|
|
17
18
|
config.entryPagePath = config.realEntryPagePath;
|
|
18
19
|
}
|
|
20
|
+
// darkmode
|
|
21
|
+
if (pagesJson.themeConfig) {
|
|
22
|
+
config.themeConfig = pagesJson.themeConfig;
|
|
23
|
+
}
|
|
19
24
|
// TODO 待支持分包
|
|
20
25
|
return JSON.stringify(config);
|
|
21
26
|
}
|
package/dist/uni_modules.d.ts
CHANGED
|
@@ -70,15 +70,15 @@ export declare const capitalize: (str: string) => string;
|
|
|
70
70
|
* @returns
|
|
71
71
|
*/
|
|
72
72
|
export declare function parseUTSModuleDeps(deps: string[], inputDir: string): string[];
|
|
73
|
-
export declare function genEncryptEasyComModuleIndex(components: string
|
|
74
|
-
export declare function parseUniModulesWithComponents(inputDir: string): Record<string, string
|
|
73
|
+
export declare function genEncryptEasyComModuleIndex(components: Record<string, '.vue' | '.uvue'>): string;
|
|
74
|
+
export declare function parseUniModulesWithComponents(inputDir: string): Record<string, Record<string, ".vue" | ".uvue">>;
|
|
75
75
|
/**
|
|
76
76
|
* 解析 easyCom 组件列表
|
|
77
77
|
* @param pluginId
|
|
78
78
|
* @param inputDir
|
|
79
79
|
* @returns
|
|
80
80
|
*/
|
|
81
|
-
export declare function parseEasyComComponents(pluginId: string, inputDir: string, detectBinary?: boolean): string
|
|
81
|
+
export declare function parseEasyComComponents(pluginId: string, inputDir: string, detectBinary?: boolean): Record<string, ".vue" | ".uvue">;
|
|
82
82
|
export declare function findEncryptUniModules(inputDir: string, cacheDir?: string): Record<string, EncryptPackageJson | undefined>;
|
|
83
83
|
export declare function findUploadEncryptUniModulesFiles(uniModules: Record<string, EncryptPackageJson | undefined>, platform: typeof process.env.UNI_UTS_PLATFORM, inputDir: string): Record<string, string[]>;
|
|
84
84
|
export declare function packUploadEncryptUniModules(uniModules: Record<string, EncryptPackageJson | undefined>, platform: typeof process.env.UNI_UTS_PLATFORM, inputDir: string, cacheDir: string): {
|
package/dist/uni_modules.js
CHANGED
|
@@ -255,9 +255,9 @@ exports.parseUTSModuleDeps = parseUTSModuleDeps;
|
|
|
255
255
|
function genEncryptEasyComModuleIndex(components) {
|
|
256
256
|
const imports = [];
|
|
257
257
|
const ids = [];
|
|
258
|
-
components.forEach((component) => {
|
|
258
|
+
Object.keys(components).forEach((component) => {
|
|
259
259
|
const id = (0, exports.capitalize)((0, exports.camelize)(component));
|
|
260
|
-
imports.push(`import ${id} from './components/${component}/${component}
|
|
260
|
+
imports.push(`import ${id} from './components/${component}/${component}${components[component]}'`);
|
|
261
261
|
ids.push(id);
|
|
262
262
|
});
|
|
263
263
|
return `
|
|
@@ -291,11 +291,11 @@ exports.parseUniModulesWithComponents = parseUniModulesWithComponents;
|
|
|
291
291
|
*/
|
|
292
292
|
function parseEasyComComponents(pluginId, inputDir, detectBinary = true) {
|
|
293
293
|
const componentsDir = path_1.default.resolve(inputDir, 'uni_modules', pluginId, 'components');
|
|
294
|
-
const components =
|
|
294
|
+
const components = {};
|
|
295
295
|
if (fs_extra_1.default.existsSync(componentsDir)) {
|
|
296
296
|
fs_extra_1.default.readdirSync(componentsDir).forEach((componentDir) => {
|
|
297
297
|
const componentFile = path_1.default.resolve(componentsDir, componentDir, componentDir);
|
|
298
|
-
|
|
298
|
+
const extname = ['.vue', '.uvue'].find((extname) => {
|
|
299
299
|
const filename = componentFile + extname;
|
|
300
300
|
// 探测 filename 是否是二进制文件
|
|
301
301
|
if (fs_extra_1.default.existsSync(filename)) {
|
|
@@ -309,8 +309,9 @@ function parseEasyComComponents(pluginId, inputDir, detectBinary = true) {
|
|
|
309
309
|
return true;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
})
|
|
313
|
-
|
|
312
|
+
});
|
|
313
|
+
if (extname) {
|
|
314
|
+
components[componentDir] = extname;
|
|
314
315
|
}
|
|
315
316
|
});
|
|
316
317
|
}
|
package/dist/vite/cloud.js
CHANGED
|
@@ -216,13 +216,14 @@ function initEncryptUniModulesBuildOptions(inputDir) {
|
|
|
216
216
|
// 生成入口文件
|
|
217
217
|
const input = {};
|
|
218
218
|
moduleNames.forEach((module) => {
|
|
219
|
-
const
|
|
219
|
+
const moduleDir = path_1.default.resolve(inputDir, 'uni_modules', module);
|
|
220
|
+
const indexEncryptFile = path_1.default.resolve(moduleDir, 'index.module.uts');
|
|
220
221
|
const codes = [];
|
|
221
|
-
if (hasIndexFile(
|
|
222
|
+
if (hasIndexFile(moduleDir)) {
|
|
222
223
|
codes.push(`export * from './index'`);
|
|
223
224
|
}
|
|
224
225
|
// easyCom
|
|
225
|
-
if (modules[module].length) {
|
|
226
|
+
if (modules[module] && Object.keys(modules[module]).length) {
|
|
226
227
|
codes.push((0, uni_modules_1.genEncryptEasyComModuleIndex)(modules[module]));
|
|
227
228
|
}
|
|
228
229
|
if (codes.length) {
|
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-4010820240529002",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/core": "^7.23.3",
|
|
27
27
|
"@babel/parser": "^7.23.9",
|
|
28
28
|
"@babel/types": "^7.20.7",
|
|
29
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
29
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-4010820240529002",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4010820240529002",
|
|
31
31
|
"@intlify/core-base": "9.1.9",
|
|
32
32
|
"@intlify/shared": "9.1.9",
|
|
33
33
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
74
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4010820240529002",
|
|
75
75
|
"@types/adm-zip": "^0.5.5",
|
|
76
76
|
"@types/babel__code-frame": "^7.0.6",
|
|
77
77
|
"@types/babel__core": "^7.1.19",
|