generator-mico-cli 0.2.15 → 0.2.17

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.
@@ -37,7 +37,7 @@ pnpm run build:development
37
37
 
38
38
  # 只有在 CI 环境时才写入版本号文件(覆盖写入)
39
39
  if [ "${CI}" = "true" ]; then
40
- echo "VERSION=$VERSION" > .env_x_portal-web
40
+ echo "VERSION=$VERSION" > .env_x_<%= projectName %>portal-web
41
41
  fi
42
42
 
43
43
 
@@ -37,6 +37,6 @@ pnpm run build:production
37
37
 
38
38
  # 只有在 CI 环境时才写入版本号文件(覆盖写入)
39
39
  if [ "${CI}" = "true" ]; then
40
- echo "VERSION=$VERSION" > .env_x_portal-web
40
+ echo "VERSION=$VERSION" > .env_x_<%= projectName %>
41
41
  fi
42
42
 
@@ -38,6 +38,6 @@ pnpm run build:testing
38
38
 
39
39
  # 只有在 CI 环境时才写入版本号文件(覆盖写入)
40
40
  if [ "${CI}" = "true" ]; then
41
- echo "VERSION=$VERSION" > .env_x_portal-web
41
+ echo "VERSION=$VERSION" > .env_x_<%= projectName %>
42
42
  fi
43
43
 
@@ -1,5 +1,6 @@
1
1
  import { getAuthInfo } from '@/common/auth/auth-manager';
2
2
  import { EEnv, getEnv } from '@/common/env';
3
+ import { getUmiLocale } from '@/common/locale';
3
4
  import { request } from '@/common/request';
4
5
  import { isAuthDisabled, isNoPermissionRoute } from '@/constants';
5
6
  import { Spin } from '@mico-platform/ui';
@@ -79,6 +80,8 @@ const MicroAppLoader: React.FC<MicroAppLoaderProps> = ({
79
80
  routePath,
80
81
  // 传递主应用的 request 实例,子应用可直接使用
81
82
  request,
83
+ // 传递当前多语言类型给子应用(umi 格式:zh-CN, en-US 等)
84
+ locale: getUmiLocale(),
82
85
  };
83
86
  }, [env, routePath]);
84
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-mico-cli",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "description": "Yeoman generator for Mico CLI projects",
5
5
  "keywords": ["yeoman-generator", "generator", "cli"],
6
6
  "license": "MIT",
@@ -12,7 +12,8 @@
12
12
  "scripts": {
13
13
  "format": "biome format --write .",
14
14
  "format:check": "biome format .",
15
- "sync:subapp-react-template": "node scripts/sync-subapp-react-template.js"
15
+ "sync:subapp-react-template": "node scripts/sync-subapp-react-template.js",
16
+ "verify:micro-react": "node scripts/verify-micro-react.js"
16
17
  },
17
18
  "devDependencies": {
18
19
  "@biomejs/biome": "^1.9.4"