@h-ai/cli 0.1.0-alpha.13 → 0.1.0-alpha.16

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.
package/README.md CHANGED
@@ -10,6 +10,7 @@
10
10
  - **代码生成** — 快速生成页面、组件、API 端点、数据模型、数据库迁移
11
11
  - **模板选择** — 最小 / 标准 / 完整 / 自定义四种项目模板
12
12
  - **功能组合** — 按需启用 IAM、DB、AI、Storage、Crypto 等模块
13
+ - **API 服务脚手架** — API Service 模板使用 `@h-ai/api-contract` + `@h-ai/serv` 组合公共 contract / procedures,并通过 `@h-ai/api-client` typed client 消费
13
14
  - **自动依赖解析** — 选择功能时自动补全依赖(如 IAM 自动引入 Crypto)
14
15
 
15
16
  ## 快速开始
@@ -80,12 +81,12 @@ npx hai g:model order
80
81
 
81
82
  ## 项目模板
82
83
 
83
- | 模板 | 说明 | 包含功能 |
84
- | --------- | -------- | ------------------------------------------------------------------------------------------- |
85
- | `minimal` | 最小模板 | 仅 SvelteKit + @h-ai/core |
86
- | `default` | 标准模板 | IAM + DB + Cache + Crypto |
87
- | `full` | 完整模板 | IAM + DB + Cache + Crypto + AI + Storage + Audit + Reach + Payment + VecDB + Datapipe + ... |
88
- | `custom` | 自定义 | 按需选择 |
84
+ | 模板 | 说明 | 包含功能 |
85
+ | --------- | -------- | ------------------------------------------ |
86
+ | `minimal` | 最小模板 | 仅 SvelteKit + @h-ai/core |
87
+ | `default` | 标准模板 | IAM + DB + Cache + Crypto |
88
+ | `full` | 完整模板 | 全量业务模块 + API Service / contract 机制 |
89
+ | `custom` | 自定义 | 按需选择 |
89
90
 
90
91
  ## 全局选项
91
92
 
package/dist/index.js CHANGED
@@ -1116,7 +1116,7 @@ async function deployCommand(options) {
1116
1116
  try {
1117
1117
  let deployModule;
1118
1118
  try {
1119
- deployModule = await import('./src-XJ6YXNAF.js');
1119
+ deployModule = await import('./src-RZ4DPYNJ.js');
1120
1120
  } catch {
1121
1121
  core.logger.error(chalk.red("Deploy module not found. Install @h-ai/deploy first:"));
1122
1122
  core.logger.info(chalk.cyan(" pnpm add @h-ai/deploy"));
@@ -14663,13 +14663,13 @@ function createResendProvisioner() {
14663
14663
  try {
14664
14664
  const apiToken = credentials.apiKey ?? credentials.api_key ?? credentials.token ?? "";
14665
14665
  if (!apiToken) {
14666
- throw new Error('Missing "api_key" in credentials');
14666
+ throw new Error(deployM("deploy_credentialMissing", { params: { fields: "api_key" } }));
14667
14667
  }
14668
14668
  const res = await fetch(`${RESEND_API}/domains`, {
14669
14669
  headers: { Authorization: `Bearer ${apiToken}` }
14670
14670
  });
14671
14671
  if (!res.ok) {
14672
- throw new Error(`Resend API ${res.status}: ${await res.text()}`);
14672
+ throw new Error(deployM("deploy_apiError", { params: { service: "Resend", status: String(res.status), body: await res.text() } }));
14673
14673
  }
14674
14674
  token = apiToken;
14675
14675
  logger8.info("Resend authenticated");
@@ -15026,5 +15026,5 @@ var deploy = {
15026
15026
  };
15027
15027
 
15028
15028
  export { DeployConfigSchema, HaiDeployError, ProviderConfigSchema, deploy, getCredentialsPath, loadCredentials, saveCredential, saveCredentials, scanApp };
15029
- //# sourceMappingURL=src-XJ6YXNAF.js.map
15030
- //# sourceMappingURL=src-XJ6YXNAF.js.map
15029
+ //# sourceMappingURL=src-RZ4DPYNJ.js.map
15030
+ //# sourceMappingURL=src-RZ4DPYNJ.js.map