@h-ai/cli 0.1.0-alpha.12 → 0.1.0-alpha.15
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 +7 -6
- package/dist/index.js +1 -1
- package/dist/{src-XJ6YXNAF.js → src-RZ4DPYNJ.js} +4 -4
- package/dist/{src-XJ6YXNAF.js.map → src-RZ4DPYNJ.js.map} +1 -1
- package/package.json +2 -2
- package/templates/apps/android-app/src/lib/api.ts.hbs +5 -4
- package/templates/base/package.json.hbs +21 -21
- package/templates/base/src/app.css.hbs +2 -1
- package/templates/skills/AGENTS.md +1 -0
- package/templates/skills/copilot-instructions.md +3 -0
- package/templates/skills/hai-ai/SKILL.md +44 -30
- package/templates/skills/hai-api-client/SKILL.md +94 -295
- package/templates/skills/hai-api-contract/SKILL.md +272 -0
- package/templates/skills/hai-build/SKILL.md +25 -13
- package/templates/skills/hai-capacitor/SKILL.md +7 -7
- package/templates/skills/hai-ci/SKILL.md +112 -0
- package/templates/skills/hai-core/SKILL.md +65 -2
- package/templates/skills/hai-crypto/SKILL.md +42 -1
- package/templates/skills/hai-framework-sync/SKILL.md +98 -0
- package/templates/skills/hai-iam/SKILL.md +13 -35
- package/templates/skills/hai-kit/SKILL.md +85 -412
- package/templates/skills/hai-payment/SKILL.md +8 -10
- package/templates/skills/hai-pr-review/SKILL.md +109 -0
- package/templates/skills/hai-reldb/SKILL.md +1 -1
- package/templates/skills/hai-serv/SKILL.md +658 -0
- package/templates/skills/hai-storage/SKILL.md +7 -47
- package/templates/skills/hai-ui/SKILL.md +2 -1
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` | 完整模板 |
|
|
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-
|
|
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(
|
|
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(
|
|
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-
|
|
15030
|
-
//# sourceMappingURL=src-
|
|
15029
|
+
//# sourceMappingURL=src-RZ4DPYNJ.js.map
|
|
15030
|
+
//# sourceMappingURL=src-RZ4DPYNJ.js.map
|