@4399ywkf/core 5.1.6 → 5.3.1

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.
@@ -541,7 +541,7 @@ interface I18nPluginOptions {
541
541
  * 开发流程:
542
542
  * 1. 开发者在 src/locales/default/ 中编写 TypeScript 翻译源文件(有类型推导 + IDE 补全)
543
543
  * 2. 运行 `pnpm i18n:gen` 将 TS 源文件转换为 locales/{defaultLocale}/*.json
544
- * 3. 运行 `pnpm i18n` 使用 @lobehub/i18n-cli 将默认语言 JSON 翻译为其他语言
544
+ * 3. 运行 `pnpm i18n`(ywkf-i18n,来自 @4399ywkf/i18n)将默认语言 JSON 翻译为其他语言
545
545
  * 4. 运行时:开发模式下默认语言直接 import TS,其他场景懒加载 JSON
546
546
  *
547
547
  * @example
@@ -980,6 +980,21 @@ interface EnvConfig {
980
980
  publicEnvFile?: string;
981
981
  /** 环境特定的变量文件目录 */
982
982
  envDir?: string;
983
+ /**
984
+ * 额外内联进客户端产物的环境变量名。
985
+ *
986
+ * 产物只内联 env 文件里声明的键 + 框架自身变量 + 本项 + `exposePrefixes` 前缀命中的键,
987
+ * 其余(构建机 shell、CI 凭据等)一律不进产物。用于「不写在 env 文件、由 CI 注入」的公开变量。
988
+ *
989
+ * @example ["SENTRY_RELEASE", "BUILD_VERSION"]
990
+ */
991
+ expose?: string[];
992
+ /**
993
+ * 按前缀放行的环境变量,同 Vite 的 `VITE_` / Next 的 `NEXT_PUBLIC_` 约定。
994
+ *
995
+ * @default ["YWKF_PUBLIC_", "NEXT_PUBLIC_"]
996
+ */
997
+ exposePrefixes?: string[];
983
998
  }
984
999
  /**
985
1000
  * 内置插件快捷配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4399ywkf/core",
3
- "version": "5.1.6",
3
+ "version": "5.3.1",
4
4
  "description": "4399运维开发前端框架核心",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,16 +39,6 @@
39
39
  "dist",
40
40
  "biome.json"
41
41
  ],
42
- "scripts": {
43
- "build": "tsup",
44
- "dev": "tsup --watch",
45
- "test": "vitest run",
46
- "typecheck": "tsc --noEmit",
47
- "prepublishOnly": "npm run build",
48
- "release": "npm version patch && npm publish --access public",
49
- "release:minor": "npm version minor && npm publish --access public",
50
- "release:major": "npm version major && npm publish --access public"
51
- },
52
42
  "dependencies": {
53
43
  "@rsdoctor/rspack-plugin": "^1.5.17",
54
44
  "@rspack/core": "^2.1.0",
@@ -106,5 +96,14 @@
106
96
  },
107
97
  "publishConfig": {
108
98
  "access": "public"
99
+ },
100
+ "scripts": {
101
+ "build": "tsup",
102
+ "dev": "tsup --watch",
103
+ "test": "vitest run",
104
+ "typecheck": "tsc --noEmit",
105
+ "release": "npm version patch && npm publish --access public",
106
+ "release:minor": "npm version minor && npm publish --access public",
107
+ "release:major": "npm version major && npm publish --access public"
109
108
  }
110
- }
109
+ }