@open-dy/vibecoding-cli 0.1.3 → 0.1.4
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 +1 -1
- package/package.json +1 -1
- package/release-provenance.json +3 -3
- package/src/commands/pack.mjs +5 -2
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ CLI 内置 Schema 与通用小程序模板支持可选 `BgMusicUrl`;填写时
|
|
|
36
36
|
|
|
37
37
|
两套模板的 `node scripts/check-routes.js` 与 `node scripts/validate-feed-card.js` 均保留为兼容入口,规则统一来自 CLI 的 CJS validator 导出;CLI 命令本身使用对应的 ESM 外层。程序化调用 `validateFeedCard(context, { touchTimestamp: false })` 可禁用时间戳更新。Ajv 由 CLI 自带;OpenCard Lynx CSS 检查复用 `@open-dy/vibecoding-sdk-opencard/eslint/lint-lynx-css`。
|
|
38
38
|
|
|
39
|
-
`pack --target taro` 默认先清理 `/tmp/microapp_artifacts`,由 CLI 编排 TT 生产构建、server 生产构建以及存在的封闭域服务和 OpenCard 构建,再生成归档。包含 `microapp.zip`、`server.zip`、`Dockerfile`、`run.sh
|
|
39
|
+
`pack --target taro` 默认先清理 `/tmp/microapp_artifacts`,由 CLI 编排 TT 生产构建、server 生产构建以及存在的封闭域服务和 OpenCard 构建,再生成归档。包含 `microapp.zip`、`server.zip`、`Dockerfile`、`run.sh`;仅当 `config/card-routing.json` 的 `cardData.serviceDomain` 为 `closed`,且 `closed-domain-server/package.json` 是文件时,追加 `closed-domain-server.zip`、`closed-domain-Dockerfile`、`closed-domain-run.sh`。`open`、`none` 或缺少路由配置时跳过封闭域产物;存在路由配置时复制 `card-routing.json`,存在 OpenCard 时生成 `opencard.zip`。两个 server 每次均构建,不受卡片域开关影响。旧项目若自行提供 `build:pack`,CLI 仍会传递 `ARTIFACTS_DIR` 兼容其产物;两套当前模板均不依赖该分支。
|
|
40
40
|
|
|
41
41
|
服务包仅包含 `dist`、生成的 `Dockerfile`、`package.json`、`run.sh` 以及可选的 `sql`、`scripts`。生成 Dockerfile 时按原脚本规则为每条 `COPY package.json` 追加存在的目录,项目源文件不改写。构建/zip 失败保留退出码,临时目录在失败时也会清理。
|
|
42
42
|
|
package/package.json
CHANGED
package/release-provenance.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"producer": "vibecoding-cli",
|
|
4
4
|
"packageName": "@open-dy/vibecoding-cli",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.4",
|
|
6
6
|
"source": {
|
|
7
|
-
"digest": "sha256-
|
|
7
|
+
"digest": "sha256-e03f57170ea6127cad313ef3d94a0f50d515eee64741b0675ed4536132c285e6",
|
|
8
8
|
"files": 85
|
|
9
9
|
},
|
|
10
|
-
"payload": "sha256-
|
|
10
|
+
"payload": "sha256-64c484bf390b2145117810f76b8d81868ab4e969d931d401a1bc01e3d1b65cf5",
|
|
11
11
|
"toolchain": {
|
|
12
12
|
"node": "v22.22.3",
|
|
13
13
|
"packageManager": null
|
package/src/commands/pack.mjs
CHANGED
|
@@ -108,16 +108,19 @@ async function packServer(server, artifacts, closed = false) {
|
|
|
108
108
|
|
|
109
109
|
export async function packTaroArtifacts(context, artifacts) {
|
|
110
110
|
artifacts = resolveArtifactsDirectory(context.root, artifacts)
|
|
111
|
+
const serviceDomain = readCardRouting({ root: context.root, target: 'taro' })?.cardData?.serviceDomain
|
|
111
112
|
mkdirSync(artifacts, { recursive: true })
|
|
112
113
|
const dist = path.join(context.root, 'dist-tt')
|
|
113
114
|
console.log(`Packing ${dist} into ${artifacts}/microapp.zip`)
|
|
114
115
|
await zipDirectory(dist, path.join(artifacts, 'microapp.zip'))
|
|
115
116
|
await packServer(context.serverRoot ?? path.join(context.root, 'server'), artifacts)
|
|
116
117
|
const closedServer = path.join(context.root, 'closed-domain-server')
|
|
117
|
-
if (
|
|
118
|
+
if (serviceDomain === 'closed' &&
|
|
119
|
+
existsSync(path.join(closedServer, 'package.json')) &&
|
|
120
|
+
statSync(path.join(closedServer, 'package.json')).isFile()) {
|
|
118
121
|
await packServer(closedServer, artifacts, true)
|
|
119
122
|
} else {
|
|
120
|
-
console.log(
|
|
123
|
+
console.log(`Skipping closed-domain-server artifacts: requires cardData.serviceDomain=closed and a closed-domain-server/package.json file (serviceDomain=${serviceDomain ?? 'unset'})`)
|
|
121
124
|
}
|
|
122
125
|
const routing = path.join(context.root, 'config/card-routing.json')
|
|
123
126
|
if (existsSync(routing) && statSync(routing).isFile()) {
|