@liujitcn/kratos-admin-core 0.0.62 → 0.0.65

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.
Files changed (38) hide show
  1. package/README.md +2 -0
  2. package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +1 -1
  3. package/dist/package/declarations/src/components/YamlEditor/index.vue.d.ts +23 -0
  4. package/dist/package/declarations/src/locales/generated.d.ts +60 -0
  5. package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +20 -0
  6. package/dist/package/declarations/src/rpc/google/protobuf/struct.d.ts +81 -0
  7. package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +4 -23
  8. package/dist/package/declarations/src/runtime-messages.d.ts +2 -0
  9. package/dist/package/declarations/src/utils/conflict-message.d.ts +7 -0
  10. package/dist/package/declarations/src/utils/oauthProvider.d.ts +4 -0
  11. package/dist/package/declarations/src/utils/request-response.d.ts +9 -0
  12. package/dist/package/src/api/base/v1/file.ts +1 -1
  13. package/dist/package/src/components/YamlEditor/index.vue +107 -0
  14. package/dist/package/src/directives/modules/copy.ts +2 -1
  15. package/dist/package/src/hooks/useTable.ts +1 -1
  16. package/dist/package/src/locales/en-US.json +16 -1
  17. package/dist/package/src/locales/index.ts +3 -2
  18. package/dist/package/src/locales/ja-JP.json +16 -1
  19. package/dist/package/src/locales/zh-CN.json +16 -1
  20. package/dist/package/src/locales/zh-TW.json +16 -1
  21. package/dist/package/src/modules/index.ts +6 -5
  22. package/dist/package/src/routers/index.ts +1 -1
  23. package/dist/package/src/routers/modules/dynamicRouter.ts +1 -1
  24. package/dist/package/src/routers/modules/staticRouter.ts +2 -1
  25. package/dist/package/src/rpc/base/v1/oauth.ts +16 -0
  26. package/dist/package/src/rpc/google/protobuf/struct.ts +80 -0
  27. package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +4 -24
  28. package/dist/package/src/runtime-messages.ts +39 -0
  29. package/dist/package/src/stores/modules/auth.ts +15 -4
  30. package/dist/package/src/stores/modules/config.ts +2 -0
  31. package/dist/package/src/utils/conflict-message.ts +79 -0
  32. package/dist/package/src/utils/oauthProvider.ts +9 -1
  33. package/dist/package/src/utils/request-response.ts +14 -0
  34. package/dist/package/src/utils/request.ts +10 -6
  35. package/dist/package/types/generated/components.d.ts +1 -0
  36. package/package.json +8 -1
  37. package/types/generated/components.d.ts +1 -0
  38. package/vite.config.ts +3 -4
package/vite.config.ts CHANGED
@@ -9,6 +9,7 @@ import { wrapperEnv } from "./build/getEnv";
9
9
  import { createProxy } from "./build/proxy";
10
10
  import { createVitePlugins } from "./build/plugins";
11
11
  import { createSourcePatterns } from "./build/source-patterns";
12
+ import { runtimeMessage } from "./src/runtime-messages";
12
13
 
13
14
  const coreRoot = dirname(fileURLToPath(import.meta.url));
14
15
  const viteLogger = createLogger();
@@ -199,9 +200,7 @@ function resolveHttpsOptions(viteEnv: ViteEnv, root: string): ServerOptions | un
199
200
  const keyPath = resolve(root, viteEnv.VITE_HTTPS_KEY || "../../../../certs/dev-key.pem");
200
201
  const certPath = resolve(root, viteEnv.VITE_HTTPS_CERT || "../../../../certs/dev-cert.pem");
201
202
  if (!existsSync(keyPath) || !existsSync(certPath)) {
202
- throw new Error(
203
- `VITE_HTTPS 已开启,但未找到证书文件,请先在仓库根目录运行 scripts/generate-dev-cert.sh;期望路径:${keyPath} 和 ${certPath}`
204
- );
203
+ throw new Error(runtimeMessage("https_certificate_missing", { keyPath, certPath }));
205
204
  }
206
205
 
207
206
  return {
@@ -225,7 +224,7 @@ function resolveSourceRoot(packageRoot: string): string {
225
224
 
226
225
  const publishedSourceRoot = resolve(packageRoot, "dist/package/src");
227
226
  if (existsSync(resolve(publishedSourceRoot, "index.ts"))) return publishedSourceRoot;
228
- throw new Error(`管理端模块缺少源码入口: ${packageRoot}`);
227
+ throw new Error(runtimeMessage("missing_source_entry", { root: packageRoot }));
229
228
  }
230
229
 
231
230
  /** 根据 package.json exports 创建源码别名。 */