@dcloudio/uni-cli-shared 3.0.0-alpha-3060820221027003 → 3.0.0-alpha-3060820221027004

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.
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.getNVueFlexDirection = exports.getNVueStyleCompiler = exports.getNVueCompiler = exports.hasConfusionFile = exports.isConfusionFile = exports.APP_CONFUSION_FILENAME = exports.normalizeAppManifestJson = void 0;
18
+ const shared_1 = require("@vue/shared");
18
19
  const merge_1 = require("./merge");
19
20
  const defaultManifestJson_1 = require("./defaultManifestJson");
20
21
  const statusbar_1 = require("./statusbar");
@@ -32,7 +33,8 @@ const i18n_1 = require("./i18n");
32
33
  const theme_1 = require("../../theme");
33
34
  function normalizeAppManifestJson(userManifestJson, pagesJson) {
34
35
  const manifestJson = (0, merge_1.initRecursiveMerge)((0, defaultManifestJson_1.initDefaultManifestJson)(), userManifestJson);
35
- pagesJson = (0, theme_1.initTheme)(manifestJson, pagesJson);
36
+ const { pages, globalStyle, tabBar } = (0, theme_1.initTheme)(manifestJson, pagesJson);
37
+ (0, shared_1.extend)(pagesJson, { pages, globalStyle, tabBar });
36
38
  (0, statusbar_1.initAppStatusbar)(manifestJson, pagesJson);
37
39
  (0, arguments_1.initArguments)(manifestJson, pagesJson);
38
40
  (0, plus_1.initPlus)(manifestJson, pagesJson);
@@ -35,6 +35,14 @@ function initPlus(manifestJson, pagesJson) {
35
35
  manifestJson.plus.distribute.plugins = distribute.sdkConfigs;
36
36
  delete manifestJson.plus.distribute.sdkConfigs;
37
37
  }
38
+ if (manifestJson.plus.darkmode) {
39
+ if (!(distribute.google || (distribute.google = {})).defaultNightMode) {
40
+ distribute.google.defaultNightMode = 'auto';
41
+ }
42
+ if (!(distribute.apple || (distribute.apple = {})).UIUserInterfaceStyle) {
43
+ distribute.apple.UIUserInterfaceStyle = 'Automatic';
44
+ }
45
+ }
38
46
  }
39
47
  // 屏幕启动方向
40
48
  if (manifestJson.plus.screenOrientation) {
@@ -131,7 +131,8 @@ function parsePagesJson(jsonStr, platform, { debug, darkmode, networkTimeout, su
131
131
  }
132
132
  else {
133
133
  const manifestJson = (0, manifest_1.parseManifestJsonOnce)(process.env.UNI_INPUT_DIR);
134
- appJson = (0, theme_1.initTheme)(manifestJson, appJson);
134
+ const { pages, window, tabBar } = (0, theme_1.initTheme)(manifestJson, appJson);
135
+ (0, shared_1.extend)(appJson, { pages, window, tabBar });
135
136
  pageJsons = (0, theme_1.initTheme)(manifestJson, pageJsons);
136
137
  }
137
138
  return {
@@ -113,7 +113,8 @@ function normalizePagesJson(jsonStr, platform, { subpackages, } = { subpackages:
113
113
  pagesJson.pages.forEach((page) => pagesCacheSet.add(page.path));
114
114
  const manifestJsonPlatform = (0, manifest_1.getPlatformManifestJsonOnce)();
115
115
  if (!manifestJsonPlatform.darkmode) {
116
- pagesJson = (0, theme_1.initTheme)(manifestJsonPlatform, pagesJson);
116
+ const { pages, globalStyle, tabBar } = (0, theme_1.initTheme)(manifestJsonPlatform, pagesJson);
117
+ (0, shared_1.extend)(pagesJson, { pages, globalStyle, tabBar });
117
118
  }
118
119
  return pagesJson;
119
120
  }
@@ -364,8 +365,8 @@ function normalizeTabBar(tabBar, platform) {
364
365
  const SCHEME_RE = /^([a-z-]+:)?\/\//i;
365
366
  const DATA_RE = /^data:.*,.*/;
366
367
  function normalizeFilepath(filepath) {
367
- const manifestJsonPlatform = (0, manifest_1.getPlatformManifestJsonOnce)();
368
- if (manifestJsonPlatform.darkmode && filepath.startsWith('@'))
368
+ const themeConfig = (0, theme_1.normalizeThemeConfigOnce)()['light'] || {};
369
+ if (themeConfig[filepath.replace('@', '')])
369
370
  return filepath;
370
371
  if (!(SCHEME_RE.test(filepath) || DATA_RE.test(filepath)) &&
371
372
  filepath.indexOf('/') !== 0) {
@@ -9,6 +9,7 @@ declare const _default: {
9
9
  readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
10
10
  readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
11
11
  readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
12
+ readonly 'compiler.build.failed': "Build failed with errors.";
12
13
  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
14
  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
15
  readonly 'stat.warn.tip': "uni statistics version: {version}";
@@ -21,5 +22,7 @@ declare const _default: {
21
22
  readonly 'file.notfound': "{file} is not found";
22
23
  readonly 'uts.ios.tips': "The project uses the uts plugin. After the uts plug-in code is modified, the [Custom playground native runner](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground) needs to be regenerated to take effect";
23
24
  readonly 'uts.android.compiler.server': "The project uses the uts plugin, installing the uts Android runtime extension...";
25
+ readonly 'uts.ios.windows.tips': "When running on Windows to iOS mobile phone, the modification of the uts plugin code needs to be submitted to the cloud to package the custom playground to take effect.";
26
+ readonly 'uts.ios.standard.tips': "When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground";
24
27
  };
25
28
  export default _default;
@@ -11,6 +11,7 @@ exports.default = {
11
11
  'dev.watching.end': 'DONE Build complete. Watching for changes...',
12
12
  'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
13
13
  'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
14
+ 'compiler.build.failed': 'Build failed with errors.',
14
15
  '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
16
  '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
17
  'stat.warn.tip': 'uni statistics version: {version}',
@@ -23,4 +24,6 @@ exports.default = {
23
24
  'file.notfound': '{file} is not found',
24
25
  'uts.ios.tips': 'The project uses the uts plugin. After the uts plug-in code is modified, the [Custom playground native runner](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground) needs to be regenerated to take effect',
25
26
  'uts.android.compiler.server': 'The project uses the uts plugin, installing the uts Android runtime extension...',
27
+ 'uts.ios.windows.tips': 'When running on Windows to iOS mobile phone, the modification of the uts plugin code needs to be submitted to the cloud to package the custom playground to take effect.',
28
+ 'uts.ios.standard.tips': 'When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground',
26
29
  };
@@ -9,6 +9,7 @@ export declare const M: {
9
9
  readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
10
10
  readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
11
11
  readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
12
+ readonly 'compiler.build.failed': "编译失败";
12
13
  readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
13
14
  readonly 'stat.warn.version': "当前应用未配置uni统计版本,默认使用1.0版本;建议使用uni统计2.0版本 ,私有部署数据更安全,代码开源可定制。详情:https://uniapp.dcloud.io/uni-stat";
14
15
  readonly 'stat.warn.tip': "已开启 uni统计{version} 版本";
@@ -21,6 +22,8 @@ export declare const M: {
21
22
  readonly 'file.notfound': "{file} 文件不存在";
22
23
  readonly 'uts.ios.tips': "项目使用了uts插件,iOS平台uts插件代码修改后需要重新生成[自定义基座](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground)才能生效";
23
24
  readonly 'uts.android.compiler.server': "项目使用了uts插件,正在安装 uts Android 运行扩展...";
25
+ readonly 'uts.ios.windows.tips': "iOS手机在windows上真机运行时uts插件代码修改需提交云端打包自定义基座才能生效";
26
+ readonly 'uts.ios.standard.tips': "iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座";
24
27
  } | {
25
28
  readonly 'app.compiler.version': "Compiler version: {version}";
26
29
  readonly compiling: "Compiling...";
@@ -32,6 +35,7 @@ export declare const M: {
32
35
  readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
33
36
  readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
34
37
  readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
38
+ readonly 'compiler.build.failed': "Build failed with errors.";
35
39
  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";
36
40
  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";
37
41
  readonly 'stat.warn.tip': "uni statistics version: {version}";
@@ -44,4 +48,6 @@ export declare const M: {
44
48
  readonly 'file.notfound': "{file} is not found";
45
49
  readonly 'uts.ios.tips': "The project uses the uts plugin. After the uts plug-in code is modified, the [Custom playground native runner](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground) needs to be regenerated to take effect";
46
50
  readonly 'uts.android.compiler.server': "The project uses the uts plugin, installing the uts Android runtime extension...";
51
+ readonly 'uts.ios.windows.tips': "When running on Windows to iOS mobile phone, the modification of the uts plugin code needs to be submitted to the cloud to package the custom playground to take effect.";
52
+ readonly 'uts.ios.standard.tips': "When the standard playground runs to an IOS phone, the uts plugin is temporarily not supported. If you need to call the uts plugin, please use a custom playground";
47
53
  };
@@ -9,6 +9,7 @@ declare const _default: {
9
9
  readonly 'dev.watching.end': "DONE Build complete. Watching for changes...";
10
10
  readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
11
11
  readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
12
+ readonly 'compiler.build.failed': "编译失败";
12
13
  readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
13
14
  readonly 'stat.warn.version': "当前应用未配置uni统计版本,默认使用1.0版本;建议使用uni统计2.0版本 ,私有部署数据更安全,代码开源可定制。详情:https://uniapp.dcloud.io/uni-stat";
14
15
  readonly 'stat.warn.tip': "已开启 uni统计{version} 版本";
@@ -21,5 +22,7 @@ declare const _default: {
21
22
  readonly 'file.notfound': "{file} 文件不存在";
22
23
  readonly 'uts.ios.tips': "项目使用了uts插件,iOS平台uts插件代码修改后需要重新生成[自定义基座](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground)才能生效";
23
24
  readonly 'uts.android.compiler.server': "项目使用了uts插件,正在安装 uts Android 运行扩展...";
25
+ readonly 'uts.ios.windows.tips': "iOS手机在windows上真机运行时uts插件代码修改需提交云端打包自定义基座才能生效";
26
+ readonly 'uts.ios.standard.tips': "iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座";
24
27
  };
25
28
  export default _default;
@@ -11,6 +11,7 @@ exports.default = {
11
11
  'dev.watching.end': 'DONE Build complete. Watching for changes...',
12
12
  'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
13
13
  'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
14
+ 'compiler.build.failed': '编译失败',
14
15
  'stat.warn.appid': '当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303',
15
16
  'stat.warn.version': '当前应用未配置uni统计版本,默认使用1.0版本;建议使用uni统计2.0版本 ,私有部署数据更安全,代码开源可定制。详情:https://uniapp.dcloud.io/uni-stat',
16
17
  'stat.warn.tip': '已开启 uni统计{version} 版本',
@@ -23,4 +24,6 @@ exports.default = {
23
24
  'file.notfound': '{file} 文件不存在',
24
25
  'uts.ios.tips': '项目使用了uts插件,iOS平台uts插件代码修改后需要重新生成[自定义基座](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html#customplayground)才能生效',
25
26
  'uts.android.compiler.server': '项目使用了uts插件,正在安装 uts Android 运行扩展...',
27
+ 'uts.ios.windows.tips': 'iOS手机在windows上真机运行时uts插件代码修改需提交云端打包自定义基座才能生效',
28
+ 'uts.ios.standard.tips': 'iOS手机在标准基座真机运行暂不支持uts插件,如需调用uts插件请使用自定义基座',
26
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-3060820221027003",
3
+ "version": "3.0.0-alpha-3060820221027004",
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.19.6",
26
26
  "@babel/parser": "^7.19.6",
27
27
  "@babel/types": "^7.20.0",
28
- "@dcloudio/uni-i18n": "3.0.0-alpha-3060820221027003",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-3060820221027003",
28
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3060820221027004",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3060820221027004",
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-3060820221027003",
67
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-3060820221027004",
68
68
  "@types/babel__core": "^7.1.19",
69
69
  "@types/debug": "^4.1.7",
70
70
  "@types/estree": "^0.0.51",