@stackonward/cli 1.3.3 → 1.5.0
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 +248 -0
- package/dist/index.js +14124 -635
- package/dist/index.js.map +1 -1
- package/dist/resources/components/nuxt/site-source/app/app.vue +4 -2
- package/dist/resources/components/nuxt/site-source/app/assets/css/site-shell.css +50 -50
- package/dist/resources/components/nuxt/site-source/app/components/{site/ApplicationHeader.vue → app/Header.vue} +3 -3
- package/dist/resources/components/nuxt/site-source/app/components/{site/ApplicationShell.vue → app/Shell.vue} +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/{site/ApplicationSidebar.vue → app/Sidebar.vue} +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/{ui/CheckoutStatus.vue → checkout/Status.vue} +8 -3
- package/dist/resources/components/nuxt/site-source/app/components/{ui/CheckoutSummary.vue → checkout/Summary.vue} +11 -11
- package/dist/resources/components/nuxt/site-source/app/components/{site/CookieConsent.vue → consent/Banner.vue} +3 -3
- package/dist/resources/components/nuxt/site-source/app/components/{site/ContentArticlePage.vue → content/Article.vue} +3 -3
- package/dist/resources/components/nuxt/site-source/app/components/{site/ContentListPage.vue → content/List.vue} +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/{ui/GoogleSignInButton.vue → google/SignInButton.vue} +3 -3
- package/dist/resources/components/nuxt/site-source/app/components/{site/LocaleSwitcher.vue → locale/Menu.vue} +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/site/{MarketingFooter.vue → Footer.vue} +8 -8
- package/dist/resources/components/nuxt/site-source/app/components/site/{MarketingHeader.vue → Header.vue} +27 -27
- package/dist/resources/components/nuxt/site-source/app/components/site/Shell.vue +29 -0
- package/dist/resources/components/nuxt/site-source/app/components/{site/ThemeSwitcher.vue → theme/Menu.vue} +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/ui/{BaseButton.vue → Button.vue} +1 -8
- package/dist/resources/components/nuxt/site-source/app/components/ui/InfiniteScroll.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/{ui/YoutubeEmbed.vue → youtube/Embed.vue} +10 -2
- package/dist/resources/components/nuxt/site-source/app/composables/useConsent.ts +8 -10
- package/dist/resources/components/nuxt/site-source/app/composables/useNavigation.ts +9 -14
- package/dist/resources/components/nuxt/site-source/app/composables/useSeo.ts +3 -1
- package/dist/resources/components/nuxt/site-source/app/composables/useSiteShell.ts +19 -22
- package/dist/resources/components/nuxt/site-source/app/consent/types.ts +59 -0
- package/dist/resources/components/nuxt/site-source/app/content/types.ts +17 -0
- package/dist/resources/components/nuxt/site-source/app/layouts/app.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/layouts/default.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/navigation/types.ts +68 -0
- package/dist/resources/components/nuxt/site-source/app/plugins/consent.ts +2 -2
- package/dist/resources/components/nuxt/site-source/app/site/config.ts +35 -0
- package/dist/resources/components/registry.json +63 -51
- package/dist/resources/deploy/ci/github/caller.yml +38 -0
- package/dist/resources/deploy/ci/onedev/import.yml +14 -0
- package/dist/resources/deploy/nginx/cache.conf +17 -0
- package/dist/resources/deploy/nginx/compression.conf +23 -0
- package/dist/resources/deploy/nginx/proxy.conf +15 -0
- package/dist/resources/deploy/profiles/go-service/compose.yaml +19 -0
- package/dist/resources/deploy/profiles/nuxt-node/Dockerfile +17 -0
- package/dist/resources/deploy/profiles/static-files/nginx/site.conf.template +55 -0
- package/dist/resources/deploy/profiles/static-nginx/Dockerfile +18 -0
- package/dist/resources/deploy/profiles/static-nginx/nginx/default.conf.template +28 -0
- package/dist/resources/deploy/targets/compose-host/deploy.config.example.json +114 -0
- package/dist/resources/deploy/traffic/nginx/stackonward-nginx-traffic +96 -0
- package/dist/resources/registry.json +30 -30
- package/dist/resources/templates/base/.claude/docs/architecture.md +4 -0
- package/dist/resources/templates/base/AGENTS.md +15 -0
- package/dist/resources/templates/base/CLAUDE.md +15 -0
- package/dist/resources/templates/go-backend/.dockerignore +25 -3
- package/dist/resources/templates/go-backend/deploy.config.json +26 -0
- package/dist/resources/templates/go-backend/docs/runtime-provenance.json +9 -6
- package/dist/resources/templates/go-backend/docs/source-provenance.json +33 -22
- package/dist/resources/templates/go-backend/internal/common/enums/register_locale.go +7 -0
- package/dist/resources/templates/go-backend/internal/common/enums/register_locale_test.go +30 -0
- package/dist/resources/templates/go-backend/internal/common/locale/locale.go +102 -76
- package/dist/resources/templates/go-backend/internal/common/locale/locale_test.go +168 -45
- package/dist/resources/templates/go-backend/internal/core/commandreplay/model.go +5 -5
- package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence.go +20 -7
- package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence_test.go +51 -22
- package/dist/resources/templates/go-backend/internal/core/commandreplay/repository.go +2 -2
- package/dist/resources/templates/go-backend/internal/core/commandreplay/service.go +13 -24
- package/dist/resources/templates/go-backend/internal/core/commandreplay/service_persistence_test.go +98 -13
- package/dist/resources/templates/go-backend/internal/core/commandreplay/service_test.go +61 -36
- package/dist/resources/templates/go-backend/internal/core/commandreplay/types.go +6 -6
- package/dist/resources/templates/go-backend/internal/core/integrationevent/config.go +24 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/errors.go +53 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/model.go +71 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence.go +193 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence_postgres_test.go +178 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence_test.go +168 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/provider.go +16 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/registry.go +69 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/repository.go +17 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/service.go +283 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/service_test.go +433 -0
- package/dist/resources/templates/go-backend/internal/core/integrationevent/types.go +67 -0
- package/dist/resources/templates/go-backend/migrations/000001_infrastructure.down.sql +6 -0
- package/dist/resources/templates/go-backend/migrations/000001_infrastructure.up.sql +176 -16
- package/dist/resources/templates/go-backend/tests/infrastructure.sql +109 -6
- package/dist/resources/templates/nuxt/.claude/docs/stack.md +5 -1
- package/dist/resources/templates/nuxt/.dockerignore +19 -0
- package/dist/resources/templates/nuxt/README.md +3 -3
- package/dist/resources/templates/nuxt/app/app.config.ts +1 -1
- package/dist/resources/templates/nuxt/app/i18n/locales/en.json +1 -1
- package/dist/resources/templates/nuxt/app/pages/app/index.vue +1 -1
- package/dist/resources/templates/nuxt/app/pages/authors/[slug].vue +2 -2
- package/dist/resources/templates/nuxt/app/pages/blog/[slug].vue +4 -3
- package/dist/resources/templates/nuxt/app/pages/blog/category/[category].vue +2 -2
- package/dist/resources/templates/nuxt/app/pages/blog/index.vue +2 -2
- package/dist/resources/templates/nuxt/app/pages/legal/cookies.vue +3 -3
- package/dist/resources/templates/nuxt/app/pages/legal/privacy.vue +2 -2
- package/dist/resources/templates/nuxt/app/pages/legal/terms.vue +2 -2
- package/dist/resources/templates/nuxt/app/pages/ui/index.vue +45 -45
- package/dist/resources/templates/nuxt/deploy.config.json +27 -0
- package/dist/resources/templates/nuxt/nuxt.config.ts +4 -10
- package/dist/resources/templates/nuxt/package.json +8 -8
- package/dist/resources/templates/nuxt/test/e2e/rendering.test.ts +1 -0
- package/dist/resources/templates/nuxt/test/unit/consent.test.ts +4 -7
- package/package.json +5 -3
- package/dist/resources/components/nuxt/site-source/app/components/site/MarketingShell.vue +0 -33
- package/dist/resources/components/nuxt/site-source/app/types/site-shell.ts +0 -172
- /package/dist/resources/components/nuxt/site-source/app/components/{site/ConsentSettingsButton.vue → consent/Settings.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/{site/StaticPage.vue → content/Document.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/{site/ToastViewport.vue → feedback/Toast.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/site/{SiteBrand.vue → Brand.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/ui/{BaseGradientBorder.vue → GradientBorder.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/ui/{BaseModal.vue → Modal.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/ui/{BasePopover.vue → Popover.vue} +0 -0
- /package/dist/resources/components/nuxt/site-source/app/components/ui/{BaseText.vue → Text.vue} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# @stackonward/cli
|
|
2
|
+
|
|
3
|
+
`@stackonward/cli` 是 StackOnward 的唯一公共命令入口。它把项目模板、可安装
|
|
4
|
+
源、分析制品、Apple 交付和部署生命周期放在同一个可审计的命令树下;领域实现
|
|
5
|
+
在 `src/` 中按 owner 分层,发布后只读取 npm 包内的 `dist/resources`。
|
|
6
|
+
|
|
7
|
+
CLI 不承载云厂商控制面、产品业务逻辑或长期运行的服务器 agent。它编排已经
|
|
8
|
+
声明的适配器,并以结构化 JSON、稳定退出码和 receipt 作为自动化边界。
|
|
9
|
+
|
|
10
|
+
## 运行要求
|
|
11
|
+
|
|
12
|
+
- Node.js 20 或更高版本(构建仓库本身使用 Node.js 22.22+)
|
|
13
|
+
- 生成 `go-backend` 时需要 Go 工具链
|
|
14
|
+
- Apple 命令只在对应 scope 需要时要求 macOS、Xcode、Fastlane 和 App Store Connect 凭证
|
|
15
|
+
- 部署命令按所选 target 需要 Docker、Compose、OpenSSH、Nginx 或 OCI registry
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm dlx @stackonward/cli --help
|
|
19
|
+
pnpm add --global @stackonward/cli
|
|
20
|
+
stackonward --version
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 命令树
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
stackonward
|
|
27
|
+
├── init [name]
|
|
28
|
+
├── add [items...]
|
|
29
|
+
├── list [templates|components|snippets]
|
|
30
|
+
├── analytics
|
|
31
|
+
│ ├── schema
|
|
32
|
+
│ └── generate
|
|
33
|
+
├── apple
|
|
34
|
+
│ ├── schema | init | import-assets
|
|
35
|
+
│ ├── status | export | handoff
|
|
36
|
+
│ ├── preflight | plan | apply | verify
|
|
37
|
+
│ └── ...(按 scope 的计划/执行命令)
|
|
38
|
+
└── deploy
|
|
39
|
+
├── init | validate
|
|
40
|
+
├── build | publish
|
|
41
|
+
├── release | verify | rollback | reconcile
|
|
42
|
+
└── provision
|
|
43
|
+
├── validate | plan | apply | verify | reconcile
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`src/index.ts` 只负责注册顶层命令;命令适配器位于 `src/commands`,部署状态机
|
|
47
|
+
位于 `src/deploy`,平台资源配置位于 `src/provision`,Apple 和 analytics 分别
|
|
48
|
+
拥有自己的 contracts、registry、adapter 和 receipt。不要按产品或云厂商复制一份
|
|
49
|
+
CLI;新增 provider 应注册 adapter,而不是改写 coordinator。
|
|
50
|
+
|
|
51
|
+
## 项目模板与 registry
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
stackonward list templates
|
|
55
|
+
stackonward init example-site --template nuxt --yes
|
|
56
|
+
stackonward init example-api --template go-backend \
|
|
57
|
+
--module example.com/acme/example-api --yes
|
|
58
|
+
stackonward list components
|
|
59
|
+
stackonward add button
|
|
60
|
+
stackonward add --snippet useAsync
|
|
61
|
+
stackonward add --all --component
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
初始化只接受空目录,不会把已有产品当成升级目标。模板、隐藏规则文件、依赖
|
|
65
|
+
闭包和二进制资源由 registry 与 `copyTemplate` 共同拥有;安装后的组件和 snippet
|
|
66
|
+
归产品仓库所有。npm 包中不保留源码 checkout 路径。
|
|
67
|
+
|
|
68
|
+
## Analytics 制品
|
|
69
|
+
|
|
70
|
+
分析配置通过 provider registry 生成可审查文件,不会自动登录或发布到第三方账号:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
stackonward analytics schema --provider google-tag-manager
|
|
74
|
+
stackonward analytics generate \
|
|
75
|
+
--provider google-tag-manager \
|
|
76
|
+
--config analytics.google.json \
|
|
77
|
+
--out gtm.container.json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
输出文件已存在时必须显式传 `--overwrite`。配置和 provider 凭证不写入公共包或
|
|
81
|
+
生成产物。
|
|
82
|
+
|
|
83
|
+
## Apple 交付
|
|
84
|
+
|
|
85
|
+
Apple 交付采用 manifest → preflight → signed plan → apply → verify。计划绑定
|
|
86
|
+
Bundle ID、账号指纹、scope、intent、输入摘要和观测到的远端状态;未知写入结果
|
|
87
|
+
只能 reconcile,不能盲目重试。
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
stackonward apple schema
|
|
91
|
+
stackonward apple init ./apple-delivery \
|
|
92
|
+
--bundle-id com.example.app --name "Example App"
|
|
93
|
+
stackonward apple preflight --manifest ./apple-delivery/app.json \
|
|
94
|
+
--scope metadata --offline
|
|
95
|
+
stackonward apple plan --manifest ./apple-delivery/app.json \
|
|
96
|
+
--scope metadata --account ./account.json --out ./metadata.plan.json
|
|
97
|
+
stackonward apple apply --manifest ./apple-delivery/app.json \
|
|
98
|
+
--scope metadata --account ./account.json --plan ./metadata.plan.json --yes
|
|
99
|
+
stackonward apple verify --manifest ./apple-delivery/app.json \
|
|
100
|
+
--scope metadata --account ./account.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
可用 scope 为 `setup`、`native`、`metadata`、`assets`、`catalog`、`pricing`、
|
|
104
|
+
`signing`、`build`、`upload`、`testflight`、`review` 和 `release`;`status`、
|
|
105
|
+
`export`、`handoff` 为只读检查或交接。
|
|
106
|
+
|
|
107
|
+
## 部署生命周期
|
|
108
|
+
|
|
109
|
+
应用在仓库根目录提供不含密钥的 `deploy.config.json`。Profile 决定构建形态,
|
|
110
|
+
target 决定传输边界,rollout 决定切流方式,lifecycle hooks 仍由产品仓库拥有。
|
|
111
|
+
发布顺序固定为:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
validate → build → publish immutable artifact → stage
|
|
115
|
+
→ preflight/migrate → activate traffic → verify → retain → receipt
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 初始化与校验
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
stackonward deploy init --profile nuxt-node \
|
|
122
|
+
--target compose-host --rollout blue-green
|
|
123
|
+
stackonward deploy validate \
|
|
124
|
+
--config deploy.config.json --environment production
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 构建、发布与蓝绿发布
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
REVISION="$(git rev-parse HEAD)"
|
|
131
|
+
stackonward deploy build \
|
|
132
|
+
--config deploy.config.json --environment production \
|
|
133
|
+
--revision "$REVISION" --output .stackonward/build.json
|
|
134
|
+
stackonward deploy publish \
|
|
135
|
+
--config deploy.config.json --environment production \
|
|
136
|
+
--artifact .stackonward/build.json \
|
|
137
|
+
--output .stackonward/published.json
|
|
138
|
+
stackonward deploy release \
|
|
139
|
+
--config deploy.config.json --environment production \
|
|
140
|
+
--artifact .stackonward/published.json
|
|
141
|
+
stackonward deploy verify \
|
|
142
|
+
--config deploy.config.json --environment production \
|
|
143
|
+
--release <release-id>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
只有成功观测到新版本才会更新 `current`/`previous`。健康检查失败会进入回滚
|
|
147
|
+
路径;远端效果不可观测时退出码为 `7`,必须先执行:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
stackonward deploy reconcile \
|
|
151
|
+
--config deploy.config.json --environment production
|
|
152
|
+
stackonward deploy rollback \
|
|
153
|
+
--config deploy.config.json --environment production \
|
|
154
|
+
--release <known-good-release-id>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### OneDev 平台资源
|
|
158
|
+
|
|
159
|
+
OneDev 是第一个 provisioning provider,资源配置、secret lease、签名计划和
|
|
160
|
+
receipt 由 CLI 统一管理,协议细节位于 `@stackonward/onedev-provisioning`:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
stackonward deploy provision validate --provider onedev \
|
|
164
|
+
--config provision.config.json --secrets provision.secrets.json --json
|
|
165
|
+
stackonward deploy provision plan --intent converge --provider onedev \
|
|
166
|
+
--config provision.config.json --secrets provision.secrets.json \
|
|
167
|
+
--attestation provision.attestation.json --credential-file bootstrap.token \
|
|
168
|
+
--out converge.plan.json --json
|
|
169
|
+
stackonward deploy provision apply --plan converge.plan.json \
|
|
170
|
+
--config provision.config.json --secrets provision.secrets.json \
|
|
171
|
+
--attestation provision.attestation.json --credential-file bootstrap.token \
|
|
172
|
+
--yes --json
|
|
173
|
+
stackonward deploy provision verify --provider onedev \
|
|
174
|
+
--config provision.config.json --secrets provision.secrets.json \
|
|
175
|
+
--credential-file bootstrap.token --json
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Bootstrap 凭证只能来自一个来源:`STACKONWARD_PROVISION_TOKEN`、
|
|
179
|
+
`--credential-file` 或 `--token-stdin`。计划、state、receipt、私钥和 secret
|
|
180
|
+
JSON 均为 owner-only 文件,不得提交;secret 不会出现在日志、诊断或子进程参数中。
|
|
181
|
+
|
|
182
|
+
## 退出码与机器输出
|
|
183
|
+
|
|
184
|
+
所有部署命令在 stdout 输出一个 JSON 成功结果,在 stderr 输出一个安全的 JSON 失败
|
|
185
|
+
结果。稳定退出码如下:
|
|
186
|
+
|
|
187
|
+
| Code | 含义 |
|
|
188
|
+
| ----- | ----------------------------------------------- |
|
|
189
|
+
| `0` | 成功并已完成声明的阶段 |
|
|
190
|
+
| `2` | 本地参数、路径或配置无效 |
|
|
191
|
+
| `3` | provider/transport 前置条件不可用 |
|
|
192
|
+
| `4` | 计划过期、所有权或并发冲突 |
|
|
193
|
+
| `5` | 已知失败效果 |
|
|
194
|
+
| `7` | 未知效果或 blocked 状态,只允许观测与 reconcile |
|
|
195
|
+
| `130` | 收到取消信号 |
|
|
196
|
+
|
|
197
|
+
“文件已写入”“镜像已推送”“进程正在运行”都不是完成证明;receipt 必须包含
|
|
198
|
+
不可变身份、状态转换和健康结果。
|
|
199
|
+
|
|
200
|
+
## CLI 目录与扩展边界
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
packages/cli/
|
|
204
|
+
├── src/index.ts # 唯一入口与顶层注册
|
|
205
|
+
├── src/commands/ # Commander 注册与按领域拆分的薄适配层
|
|
206
|
+
│ └── deploy/ # operations、runtime、I/O、guard、provision adapter
|
|
207
|
+
├── src/analytics/ # provider artifact generator registry
|
|
208
|
+
├── src/apple/ # Apple contract、plan、resource、执行状态
|
|
209
|
+
├── src/deploy/ # profile、target、rollout、lifecycle、receipt
|
|
210
|
+
├── src/provision/ # provider-neutral plan/state/secret/sink 协调
|
|
211
|
+
├── src/utils/ # 文件、registry、项目与进程边界
|
|
212
|
+
├── resources/ # 发布时复制到 dist/resources 的完整资源
|
|
213
|
+
└── scripts/check-package.mjs # 包外 tarball 安装与运行验证
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
一个可执行文件是稳定的产品边界:共享认证、配置、退出码、日志脱敏、锁和
|
|
217
|
+
receipt,避免多个 CLI 产生不同语义。只有当某个能力需要独立运行时(例如长期
|
|
218
|
+
驻留在服务器上的 agent、不同权限边界或独立发布周期)才建立独立包/二进制;它
|
|
219
|
+
必须通过明确的 protocol adapter 与本 CLI 的声明和 receipt 对接,而不是把运行时
|
|
220
|
+
实现复制到 `src/commands`。
|
|
221
|
+
|
|
222
|
+
新增功能的顺序是:先在领域 owner 定义 contract 和输入 schema,再实现 adapter、
|
|
223
|
+
registry 注册、command wiring、fake/real boundary 测试和 packed artifact 检查。
|
|
224
|
+
跨 provider 增长只新增 provider 目录与配置项,不修改已有 coordinator 的语义。
|
|
225
|
+
|
|
226
|
+
## 开发与发布检查
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
pnpm --filter @stackonward/cli typecheck
|
|
230
|
+
pnpm --filter @stackonward/cli test
|
|
231
|
+
pnpm --filter @stackonward/cli build
|
|
232
|
+
pnpm --filter @stackonward/cli check:package
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`check:package` 会打包 npm tarball,在 workspace 外安装并执行 discovery、模板
|
|
236
|
+
生成、provider lifecycle 和部署资源检查。它是资源或 CLI 行为交付的必要证据;
|
|
237
|
+
版本与 Changeset 通过仓库发布流程管理,CLI 本身不会隐式发布 npm 包或第三方配置。
|
|
238
|
+
|
|
239
|
+
## 参考
|
|
240
|
+
|
|
241
|
+
- [Node.js package entry points](https://nodejs.org/api/packages.html)
|
|
242
|
+
- [npm `bin` package field](https://docs.npmjs.com/files/package.json/)
|
|
243
|
+
- [Commander subcommands and async parsing](https://github.com/tj/commander.js#commands)
|
|
244
|
+
- [GitHub CLI extension boundary](https://cli.github.com/manual/gh_extension)
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
MIT
|