@h-ai/deploy 1.0.0-beta.17 → 1.0.0-beta.18
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.en.md +2 -0
- package/README.ja.md +2 -0
- package/README.md +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.en.md
CHANGED
|
@@ -27,6 +27,8 @@ pnpm build --target image --images web
|
|
|
27
27
|
pnpm build --target desktop --platform windows --arch x64
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
Automation can select the exact build using `artifactDir` from `hai build --target image --json`. `readDeploymentArtifact` verifies archive paths and SHA-256 checksums, and returns source commit, dirty state and image platforms when present. Older manifests may omit those fields.
|
|
31
|
+
|
|
30
32
|
#### Build options
|
|
31
33
|
|
|
32
34
|
`--target` selects compile (default), image, app or desktop. `--images serv|web|serv,web` selects images. `--runtime auto|podman|docker` selects the local engine; auto prefers reachable Podman. `--network` overrides build networking, `--no-http-proxy` disables this build proxy (same as --proxy-mode none), and `--sqlite-prebuild-mirror` selects a trusted HTTP(S) binary mirror. Native `--platform` and `--arch` require the matching host SDK and Rust toolchain. Builds do not load deployment environments or runtime secrets.
|
package/README.ja.md
CHANGED
|
@@ -27,6 +27,8 @@ pnpm build --target image --images web
|
|
|
27
27
|
pnpm build --target desktop --platform windows --arch x64
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
自動化では `hai build --target image --json` の `artifactDir` で今回の成果物を指定できます。`readDeploymentArtifact` はアーカイブのパスと SHA-256 を検証し、マニフェストに含まれるソースコミット、変更状態、イメージのプラットフォームを返します。過去のマニフェストではこれらの項目を省略できます。
|
|
31
|
+
|
|
30
32
|
#### build のオプション
|
|
31
33
|
|
|
32
34
|
`--target` は compile(既定)、image、app、desktop を選択します。`--images serv|web|serv,web` は対象イメージを、`--runtime auto|podman|docker` はローカルエンジンを選択します。auto は接続可能な Podman を優先します。`--network` は構築ネットワーク、`--no-http-proxy` は 今回のビルドのプロキシ無効(none と同じ)、`--sqlite-prebuild-mirror` は信頼できる HTTP(S) バイナリ配布元です。ネイティブ配布物には対象 OS の SDK と Rust ツールチェーンが必要です。構築時にデプロイ環境や秘密情報を読み込みません。
|
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ pnpm build --target image --images web
|
|
|
27
27
|
pnpm build --target desktop --platform windows --arch x64
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
自动化可使用 `hai build --target image --json` 的 `artifactDir` 指定本次构建。`readDeploymentArtifact` 校验归档路径及 SHA-256,并返回清单中的来源提交、工作区状态和镜像平台;历史清单可以省略这些字段。
|
|
31
|
+
|
|
30
32
|
源码编译、镜像构建、桌面打包分别对应 compile/image/desktop。构建不选择部署环境、不注入运行期密钥。原生安装包在对应操作系统准备 SDK 与 Rust 工具链后构建。
|
|
31
33
|
|
|
32
34
|
#### build 的可选参数
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ declare const DeploymentArtifactSchema: z.ZodObject<{
|
|
|
24
24
|
}>;
|
|
25
25
|
appVersion: z.ZodString;
|
|
26
26
|
buildId: z.ZodString;
|
|
27
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
commit: z.ZodString;
|
|
29
|
+
dirty: z.ZodNullable<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
27
31
|
partial: z.ZodDefault<z.ZodBoolean>;
|
|
28
32
|
hasWeb: z.ZodDefault<z.ZodBoolean>;
|
|
29
33
|
webBasePath: z.ZodOptional<z.ZodString>;
|
|
@@ -37,6 +41,7 @@ declare const DeploymentArtifactSchema: z.ZodObject<{
|
|
|
37
41
|
file: z.ZodString;
|
|
38
42
|
imageRef: z.ZodString;
|
|
39
43
|
sha256: z.ZodString;
|
|
44
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
40
45
|
containerPort: z.ZodOptional<z.ZodNumber>;
|
|
41
46
|
}, z.core.$strip>>;
|
|
42
47
|
}, z.core.$strip>;
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,13 @@ var DeploymentArtifactSchema = z.object({
|
|
|
29
29
|
appVersion: z.string().max(80).regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9a-z-]+(?:\.[0-9a-z-]+)*)?(?:\+[0-9a-z-]+(?:\.[0-9a-z-]+)*)?$/i),
|
|
30
30
|
/** 本次构建标识;同一应用版本允许重复构建。 */
|
|
31
31
|
buildId: z.string().max(128).regex(/^[a-z0-9][\w.+-]*$/i),
|
|
32
|
+
/** 构建启动时观察到的 Git 来源;历史清单可以省略。 */
|
|
33
|
+
source: z.object({
|
|
34
|
+
/** 工程 package.json 所在仓库的提交 SHA;无法确定时为 unknown。 */
|
|
35
|
+
commit: z.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64}|unknown)$/),
|
|
36
|
+
/** 工程目录有未提交改动时为 true;无法检查时为 null。 */
|
|
37
|
+
dirty: z.boolean().nullable()
|
|
38
|
+
}).optional(),
|
|
32
39
|
/** 只包含所选镜像的构建不能用于首次安装。 */
|
|
33
40
|
partial: z.boolean().default(false),
|
|
34
41
|
/** 是否包含浏览器端;仅构建 serv 时也保留完整工程的 Web 拓扑。 */
|
|
@@ -49,6 +56,8 @@ var DeploymentArtifactSchema = z.object({
|
|
|
49
56
|
imageRef: z.string().regex(/^[a-z0-9][a-z0-9./:_-]*:[a-z0-9_][a-z0-9_.-]*$/).refine((value) => !value.endsWith(":latest")),
|
|
50
57
|
/** tar 内容的 SHA-256,用于部署前校验。 */
|
|
51
58
|
sha256: z.string().regex(/^[a-f0-9]{64}$/),
|
|
59
|
+
/** 引擎实际构建的镜像 OS/架构;历史清单可以省略。 */
|
|
60
|
+
platform: z.string().regex(/^[a-z0-9][a-z0-9_.-]*\/[a-z0-9][a-z0-9_.-]*$/).optional(),
|
|
52
61
|
/** 容器内部监听端口;服务器公开端口由部署选择。 */
|
|
53
62
|
containerPort: z.number().int().min(1).max(65535).optional()
|
|
54
63
|
})).min(1).max(2).refine((images) => new Set(images.map((image) => image.name)).size === images.length)
|
|
@@ -2483,6 +2492,18 @@ var deploy_config_shapes_default = {
|
|
|
2483
2492
|
type: "string",
|
|
2484
2493
|
pattern: "^[A-Z_]\\w*$"
|
|
2485
2494
|
}
|
|
2495
|
+
},
|
|
2496
|
+
gitEnvironmentRefs: {
|
|
2497
|
+
default: {},
|
|
2498
|
+
type: "object",
|
|
2499
|
+
propertyNames: {
|
|
2500
|
+
type: "string",
|
|
2501
|
+
pattern: "^[A-Z_]\\w*$"
|
|
2502
|
+
},
|
|
2503
|
+
additionalProperties: {
|
|
2504
|
+
type: "string",
|
|
2505
|
+
pattern: "^[A-Z_]\\w*$"
|
|
2506
|
+
}
|
|
2486
2507
|
}
|
|
2487
2508
|
},
|
|
2488
2509
|
required: [
|