cistack 6.0.0 → 6.2.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.
Files changed (61) hide show
  1. package/.github/dependabot.yml +42 -0
  2. package/.github/workflows/ci.yml +2 -1
  3. package/.github/workflows/pipeline.yml +250 -0
  4. package/README.md +4 -0
  5. package/package.json +7 -2
  6. package/product-site/.github/dependabot.yml +27 -0
  7. package/product-site/.github/workflows/pipeline.yml +215 -0
  8. package/product-site/.lighthouserc.json +22 -0
  9. package/product-site/README.md +1 -0
  10. package/product-site/app/[lang]/layout.tsx +95 -0
  11. package/product-site/app/[lang]/page.tsx +19 -0
  12. package/product-site/app/favicon.ico +0 -0
  13. package/product-site/app/globals.css +228 -0
  14. package/product-site/app/manifest.ts +20 -0
  15. package/product-site/app/robots.ts +12 -0
  16. package/product-site/app/sitemap.ts +12 -0
  17. package/product-site/components/CanvasText.tsx +219 -0
  18. package/product-site/components/CopyButton.tsx +101 -0
  19. package/product-site/components/HomeClient.tsx +664 -0
  20. package/product-site/components/InstallToggle.tsx +123 -0
  21. package/product-site/components/MotionRevealClient.tsx +53 -0
  22. package/product-site/components/TerminalCard.tsx +65 -0
  23. package/product-site/components/TerminalCardMotion.tsx +324 -0
  24. package/product-site/components/site-motion.tsx +229 -0
  25. package/product-site/components/ui/accordion.tsx +74 -0
  26. package/product-site/components/ui/badge.tsx +52 -0
  27. package/product-site/components/ui/button.tsx +60 -0
  28. package/product-site/components/ui/card.tsx +103 -0
  29. package/product-site/components/ui/checkbox.tsx +29 -0
  30. package/product-site/components/ui/separator.tsx +25 -0
  31. package/product-site/components/ui/table.tsx +116 -0
  32. package/product-site/components/ui/tabs.tsx +82 -0
  33. package/product-site/components.json +25 -0
  34. package/product-site/dictionaries/br.json +276 -0
  35. package/product-site/dictionaries/cn.json +276 -0
  36. package/product-site/dictionaries/de.json +276 -0
  37. package/product-site/dictionaries/en.json +274 -0
  38. package/product-site/dictionaries/es.json +276 -0
  39. package/product-site/dictionaries/fr.json +276 -0
  40. package/product-site/dictionaries/pt.json +276 -0
  41. package/product-site/eslint.config.mjs +18 -0
  42. package/product-site/lib/dictionaries.ts +18 -0
  43. package/product-site/lib/dictionary-types.ts +3 -0
  44. package/product-site/lib/utils.ts +6 -0
  45. package/product-site/middleware.ts +39 -0
  46. package/product-site/next.config.mjs +14 -0
  47. package/product-site/package-lock.json +14201 -0
  48. package/product-site/package.json +42 -0
  49. package/product-site/postcss.config.mjs +7 -0
  50. package/product-site/public/file.svg +1 -0
  51. package/product-site/public/globe.svg +1 -0
  52. package/product-site/public/next.svg +1 -0
  53. package/product-site/public/og-image.png +0 -0
  54. package/product-site/public/vercel.svg +1 -0
  55. package/product-site/public/window.svg +1 -0
  56. package/product-site/scripts/sync-i18n.mjs +58 -0
  57. package/product-site/scripts/validate-i18n.mjs +45 -0
  58. package/product-site/tsconfig.json +34 -0
  59. package/product-site/types/negotiator.d.ts +14 -0
  60. package/product-site/vercel.json +5 -0
  61. package/src/index.js +12 -13
@@ -0,0 +1,82 @@
1
+ "use client"
2
+
3
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Tabs({
9
+ className,
10
+ orientation = "horizontal",
11
+ ...props
12
+ }: TabsPrimitive.Root.Props) {
13
+ return (
14
+ <TabsPrimitive.Root
15
+ data-slot="tabs"
16
+ data-orientation={orientation}
17
+ className={cn(
18
+ "group/tabs flex gap-2 data-horizontal:flex-col",
19
+ className
20
+ )}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ const tabsListVariants = cva(
27
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
28
+ {
29
+ variants: {
30
+ variant: {
31
+ default: "bg-muted",
32
+ line: "gap-1 bg-transparent",
33
+ },
34
+ },
35
+ defaultVariants: {
36
+ variant: "default",
37
+ },
38
+ }
39
+ )
40
+
41
+ function TabsList({
42
+ className,
43
+ variant = "default",
44
+ ...props
45
+ }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {
46
+ return (
47
+ <TabsPrimitive.List
48
+ data-slot="tabs-list"
49
+ data-variant={variant}
50
+ className={cn(tabsListVariants({ variant }), className)}
51
+ {...props}
52
+ />
53
+ )
54
+ }
55
+
56
+ function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
57
+ return (
58
+ <TabsPrimitive.Tab
59
+ data-slot="tabs-trigger"
60
+ className={cn(
61
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
62
+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
63
+ "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
64
+ "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
65
+ className
66
+ )}
67
+ {...props}
68
+ />
69
+ )
70
+ }
71
+
72
+ function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
73
+ return (
74
+ <TabsPrimitive.Panel
75
+ data-slot="tabs-content"
76
+ className={cn("flex-1 text-sm outline-none", className)}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "base-nova",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "app/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "rtl": false,
15
+ "aliases": {
16
+ "components": "@/components",
17
+ "utils": "@/lib/utils",
18
+ "ui": "@/components/ui",
19
+ "lib": "@/lib",
20
+ "hooks": "@/hooks"
21
+ },
22
+ "menuColor": "default",
23
+ "menuAccent": "subtle",
24
+ "registries": {}
25
+ }
@@ -0,0 +1,276 @@
1
+ {
2
+ "copy_button": {
3
+ "idle": "Copiar",
4
+ "success": "Copiado"
5
+ },
6
+ "navigation": {
7
+ "repository": "GitHub",
8
+ "registry": "npm",
9
+ "reference": "Referência",
10
+ "version": "Versão",
11
+ "status": "Estável"
12
+ },
13
+ "hero": {
14
+ "product_name": "cistack",
15
+ "tagline": "Gere pipelines CI/CD no GitHub Actions analisando o código que você já tem.",
16
+ "intro": "O cistack analisa seu projeto, detecta o stack e grava workflows do GitHub Actions prontos para produção: CI, deploy, Docker e releases. Feito para repositórios reais, não demos: lê lockfiles, sinais de framework, config de release, workspaces monorepo, hospedagem e metadados de branches Git antes de gerar o YAML.",
17
+ "npx_command": "npx cistack",
18
+ "weekly_downloads": "Downloads semanais",
19
+ "per_week": "última semana no npm",
20
+ "live_registry": "Ao vivo do registro"
21
+ },
22
+ "preview": {
23
+ "title": "Pré-visualização",
24
+ "caption": "Saída do CLI animada após escanear um projeto típico."
25
+ },
26
+ "why": {
27
+ "title": "Por que cistack",
28
+ "items": [
29
+ "Detecta automaticamente linguagens, frameworks, ferramentas de teste, provedores de hospedagem e ferramentas de release",
30
+ "Usa o branch Git padrão do repositório quando disponível, em vez de assumir main",
31
+ "Suporta monorepos, workflows por pacote e comandos conscientes do gerenciador de pacotes",
32
+ "Gera configuração Dependabot alinhada ao ecossistema, incluindo Bun quando existe bun.lock",
33
+ "Faz merge inteligente dos workflows gerados com arquivos existentes sem sobrescrever às cegas",
34
+ "Gera pipelines de deploy para Vercel, Netlify, Firebase, GitHub Pages, AWS, Azure, Heroku, Render e Railway",
35
+ "Inclui comandos integrados de auditoria e upgrade de workflows",
36
+ "Suporta cistack.config.js tipado via index.d.ts",
37
+ "Com suíte de regressão automatizada (branches, release, merge inteligente, scripts monorepo, testes smoke do CLI)"
38
+ ]
39
+ },
40
+ "install": {
41
+ "title": "Instalação",
42
+ "quick_command": "Instalação rápida",
43
+ "node_note": "O cistack suporta Node.js 16+; o projeto é verificado continuamente em Node.js 18, 20 e 22 no GitHub Actions."
44
+ },
45
+ "cli": {
46
+ "section_title": "Uso do CLI",
47
+ "items": [
48
+ {
49
+ "title": "Gerar workflows",
50
+ "paragraphs": [
51
+ "generate é o comando padrão: funcionam npx cistack e npx cistack generate.",
52
+ "Opções comuns:"
53
+ ],
54
+ "snippets": [
55
+ "npx cistack",
56
+ "npx cistack generate",
57
+ "npx cistack generate --path /path/to/project",
58
+ "npx cistack generate --dry-run",
59
+ "npx cistack generate --explain",
60
+ "npx cistack generate --output .github/workflows",
61
+ "npx cistack generate --no-prompt"
62
+ ]
63
+ },
64
+ {
65
+ "title": "Auditar workflows existentes",
66
+ "paragraphs": [
67
+ "Verifica o diretório de workflows gerados (concorrência ausente, actions desatualizadas, versões antigas do Node, cache de dependências etc.). Se você definir outputDir em cistack.config.js, audit e upgrade também usam esse diretório."
68
+ ],
69
+ "snippets": ["npx cistack audit"]
70
+ },
71
+ {
72
+ "title": "Atualizar actions do workflow",
73
+ "paragraphs": [
74
+ "Atualiza GitHub Actions conhecidas para as últimas versões estáveis suportadas."
75
+ ],
76
+ "snippets": ["npx cistack upgrade", "npx cistack upgrade --dry-run"]
77
+ },
78
+ {
79
+ "title": "Criar config inicial",
80
+ "paragraphs": [
81
+ "Grava cistack.config.js com as chaves de override suportadas."
82
+ ],
83
+ "snippets": ["npx cistack init"]
84
+ }
85
+ ]
86
+ },
87
+ "generated": {
88
+ "section_title": "O que é gerado",
89
+ "items": [
90
+ {
91
+ "title": "pipeline.yml",
92
+ "paragraphs": [
93
+ "Por padrão, o cistack gera um único workflow do GitHub Actions que agrupa jobs de CI, deploy, Docker e release para acompanhar o pipeline inteiro em um arquivo.",
94
+ "Inclui lint, test, build, E2E, deploy, Docker e release quando o stack permite, usa o branch padrão detectado ou configurado, mantém previews de deploy e releases no mesmo arquivo e documenta os segredos necessários no cabeçalho."
95
+ ],
96
+ "snippets": []
97
+ },
98
+ {
99
+ "title": "dependabot.yml",
100
+ "paragraphs": [
101
+ "O Dependabot continua em um arquivo separado em .github/dependabot.yml, pois não é um workflow do GitHub Actions.",
102
+ "Para previews de deploy em PRs do Dependabot, adicione credenciais também como segredos do Dependabot, não só do Actions. Na Vercel: VERCEL_TOKEN, VERCEL_ORG_ID e VERCEL_PROJECT_ID."
103
+ ],
104
+ "snippets": []
105
+ },
106
+ {
107
+ "title": "Modo dividido (split)",
108
+ "paragraphs": [
109
+ "Se preferir o layout antigo com vários arquivos, defina workflowLayout como split em cistack.config.js. No modo split, o cistack volta a gravar ci.yml, deploy.yml, docker.yml e release.yml separadamente."
110
+ ],
111
+ "snippets": [
112
+ "module.exports = {\n workflowLayout: 'split',\n};"
113
+ ]
114
+ }
115
+ ]
116
+ },
117
+ "detection": {
118
+ "section_title": "Detecção suportada",
119
+ "hosting_title": "Hospedagem",
120
+ "hosting_tags": [
121
+ "Firebase",
122
+ "Vercel",
123
+ "Netlify",
124
+ "GitHub Pages",
125
+ "AWS",
126
+ "GCP App Engine",
127
+ "Azure",
128
+ "Heroku",
129
+ "Render",
130
+ "Railway",
131
+ "Docker"
132
+ ],
133
+ "frameworks_title": "Frameworks",
134
+ "frameworks_tags": [
135
+ "Next.js",
136
+ "Nuxt",
137
+ "SvelteKit",
138
+ "Remix",
139
+ "Astro",
140
+ "Vite",
141
+ "React",
142
+ "Vue",
143
+ "Angular",
144
+ "Svelte",
145
+ "Gatsby",
146
+ "Express",
147
+ "Fastify",
148
+ "NestJS",
149
+ "Hono",
150
+ "Koa",
151
+ "Django",
152
+ "Flask",
153
+ "FastAPI",
154
+ "Rails",
155
+ "Spring Boot",
156
+ "Laravel",
157
+ "Go",
158
+ "Rust"
159
+ ],
160
+ "testing_title": "Ferramentas de teste",
161
+ "testing_tags": [
162
+ "Jest",
163
+ "Vitest",
164
+ "Mocha",
165
+ "Cypress",
166
+ "Playwright",
167
+ "Pytest",
168
+ "RSpec",
169
+ "Go test",
170
+ "Cargo test",
171
+ "PHPUnit",
172
+ "Maven / JUnit",
173
+ "Storybook"
174
+ ]
175
+ },
176
+ "configuration": {
177
+ "section_title": "Configuração",
178
+ "intro": "Crie cistack.config.js quando quiser sobrescrever a detecção.",
179
+ "example_caption": "Exemplo",
180
+ "keys_title": "Chaves de configuração de nível superior",
181
+ "keys": [
182
+ "nodeVersion",
183
+ "packageManager",
184
+ "hosting",
185
+ "frameworks",
186
+ "testing",
187
+ "branches",
188
+ "workflowLayout",
189
+ "cache",
190
+ "monorepo",
191
+ "release",
192
+ "secrets",
193
+ "outputDir"
194
+ ],
195
+ "branches_title": "Comportamento dos branches",
196
+ "branches": [
197
+ "Se branches estiver definido na config, o cistack usa exatamente isso",
198
+ "Caso contrário, lê o branch padrão do repositório a partir dos metadados Git quando possível",
199
+ "Sem metadados Git, recai em padrões seguros como main, master e develop conforme o tipo de workflow"
200
+ ],
201
+ "config_snippet": "/** @type {import('cistack').Config} */\nmodule.exports = {\n nodeVersion: '20',\n packageManager: 'pnpm',\n branches: ['main', 'staging'],\n workflowLayout: 'single',\n hosting: ['Vercel'],\n outputDir: '.github/workflows',\n cache: {\n npm: true,\n cargo: true,\n pip: true,\n },\n monorepo: {\n perPackage: true,\n },\n release: {\n tool: 'semantic-release',\n },\n};"
202
+ },
203
+ "secrets": {
204
+ "section_title": "Segredos",
205
+ "body": "Workflows de deploy e release gerados documentam os segredos necessários no topo de cada arquivo. Adicione-os no GitHub: Settings → Secrets and variables → Actions."
206
+ },
207
+ "quality": {
208
+ "section_title": "Desenvolvimento e qualidade",
209
+ "intro": "O projeto inclui uma suíte de regressão nas áreas historicamente mais frágeis:",
210
+ "items": [
211
+ "tratamento de overrides de configuração",
212
+ "detecção do branch padrão",
213
+ "seleção do branch de deploy",
214
+ "branch de produção Netlify",
215
+ "comportamento de merge inteligente",
216
+ "busca de scripts de build por pacote em monorepo",
217
+ "detecção da config de release",
218
+ "geração do workflow de release",
219
+ "testes smoke do CLI em dry-run"
220
+ ],
221
+ "commands_title": "Rodar verificações localmente",
222
+ "commands": [
223
+ "npm test",
224
+ "npm run test:smoke",
225
+ "node bin/ciflow.js audit --path .",
226
+ "node bin/ciflow.js upgrade --path . --dry-run"
227
+ ],
228
+ "repo_note": "Com o pacote publicado, o executável é cistack. No repositório cistack, o ponto de entrada local é bin/ciflow.js."
229
+ },
230
+ "footer": {
231
+ "license": "Licença MIT",
232
+ "tagline": "Geração de workflows CI/CD a partir do repositório que você já tem.",
233
+ "architect_credit": "Criado por",
234
+ "architect_name": "Edwin Vakayil",
235
+ "copyright_suffix": "cistack. Todos os direitos reservados quando aplicável."
236
+ },
237
+ "install_toggle": {
238
+ "recommended": "recomendado",
239
+ "npm_global": "npm install -g",
240
+ "recommended_badge": "Recomendado",
241
+ "global_badge": "Global",
242
+ "npx_desc": "Sempre busca a versão mais recente. Sem instalação global.",
243
+ "npm_desc": "Melhor quando você usa o cistack em vários repositórios."
244
+ },
245
+ "terminal": {
246
+ "label": "TERMINAL",
247
+ "mission": "MISSÃO_NÚCLEO // L_02",
248
+ "project_scanned": "✔ Projeto escaneado",
249
+ "stack_detected": "✔ Stack detectado",
250
+ "detected_stack": "Stack detectado",
251
+ "languages": "Linguagens:",
252
+ "frameworks": "Frameworks:",
253
+ "hosting": "Hospedagem:",
254
+ "testing": "Testes:",
255
+ "release_tool": "Ferramenta de release:",
256
+ "look_correct": "Está correto? Gerar o pipeline com essas configurações? Sim",
257
+ "generated_workflows": "✔ Gerados 3 workflow(s) de CI",
258
+ "smart_merged": "↻ Merge inteligente: ci.yml",
259
+ "updated_on": "atualizado \"on\" de nível superior",
260
+ "updated_concurrency": "atualizado \"concurrency\" de nível superior",
261
+ "added_lint": "adicionado job \"lint\"",
262
+ "updated_build": "job \"build\" → atualizado \"name\"",
263
+ "updated_needs": "job \"build\" → atualizado \"needs\"",
264
+ "added_checkout": "job \"build\" → adicionado passo \"Checkout code\"",
265
+ "added_node": "job \"build\" → adicionado passo \"Set up Node.js\"",
266
+ "updated_step_build": "job \"build\" → atualizado passo \"Build\"",
267
+ "added_upload": "job \"build\" → adicionado passo \"Upload build artifact\"",
268
+ "written_deploy": "Gravado: deploy.yml",
269
+ "written_security": "Gravado: security.yml",
270
+ "written_dependabot": "Gravado: .github/dependabot.yml",
271
+ "done_msg": "Pronto! Seu pipeline GitHub Actions está preparado.",
272
+ "workflows_path": "Workflows → cistack/.github/workflows",
273
+ "dependabot_path": "Dependabot → cistack/.github/dependabot.yml",
274
+ "processing": "Processando saída…"
275
+ }
276
+ }
@@ -0,0 +1,276 @@
1
+ {
2
+ "copy_button": {
3
+ "idle": "复制",
4
+ "success": "已复制"
5
+ },
6
+ "navigation": {
7
+ "repository": "GitHub",
8
+ "registry": "npm",
9
+ "reference": "参考",
10
+ "version": "版本",
11
+ "status": "稳定"
12
+ },
13
+ "hero": {
14
+ "product_name": "cistack",
15
+ "tagline": "通过分析你已有的代码库,生成 GitHub Actions CI/CD 流水线。",
16
+ "intro": "cistack 扫描项目、识别技术栈,并写入可用于生产的 GitHub Actions 工作流,覆盖 CI、部署、Docker 与发布。面向真实仓库而非演示:在生成 YAML 前会读取锁文件、框架信号、发布配置、monorepo 工作区、托管配置与 Git 分支元数据。",
17
+ "npx_command": "npx cistack",
18
+ "weekly_downloads": "周下载量",
19
+ "per_week": "npm 近一周",
20
+ "live_registry": "来自 registry 的实时数据"
21
+ },
22
+ "preview": {
23
+ "title": "运行预览",
24
+ "caption": "扫描典型项目后的 CLI 动画输出。"
25
+ },
26
+ "why": {
27
+ "title": "为什么选择 cistack",
28
+ "items": [
29
+ "自动识别语言、框架、测试工具、托管提供方与发布工具",
30
+ "在可用时使用仓库默认 Git 分支,而不是假定 main",
31
+ "支持 monorepo、按包的流水线,以及面向不同包管理器的命令",
32
+ "生成贴合生态的 Dependabot 配置;存在 bun.lock 时包含 Bun",
33
+ "将生成的工作流与已有文件智能合并,而非盲目覆盖",
34
+ "为 Vercel、Netlify、Firebase、GitHub Pages、AWS、Azure、Heroku、Render、Railway 等生成部署流水线",
35
+ "内置工作流审计与升级命令",
36
+ "通过 index.d.ts 支持类型化的 cistack.config.js",
37
+ "具备自动化回归测试,覆盖分支、发布、智能合并、monorepo 脚本与 CLI 冒烟测试"
38
+ ]
39
+ },
40
+ "install": {
41
+ "title": "安装",
42
+ "quick_command": "快速安装",
43
+ "node_note": "cistack 支持 Node.js 16+;项目在 GitHub Actions 中持续针对 Node.js 18、20、22 验证。"
44
+ },
45
+ "cli": {
46
+ "section_title": "CLI 用法",
47
+ "items": [
48
+ {
49
+ "title": "生成工作流",
50
+ "paragraphs": [
51
+ "generate 为默认命令,npx cistack 与 npx cistack generate 均可使用。",
52
+ "常用选项:"
53
+ ],
54
+ "snippets": [
55
+ "npx cistack",
56
+ "npx cistack generate",
57
+ "npx cistack generate --path /path/to/project",
58
+ "npx cistack generate --dry-run",
59
+ "npx cistack generate --explain",
60
+ "npx cistack generate --output .github/workflows",
61
+ "npx cistack generate --no-prompt"
62
+ ]
63
+ },
64
+ {
65
+ "title": "审计已有工作流",
66
+ "paragraphs": [
67
+ "检查已生成的工作流目录:并发块缺失、过时的 action、旧版 Node、依赖缓存缺失等。若在 cistack.config.js 中设置了 outputDir,audit 与 upgrade 也会使用该目录。"
68
+ ],
69
+ "snippets": ["npx cistack audit"]
70
+ },
71
+ {
72
+ "title": "升级工作流中的 Actions",
73
+ "paragraphs": [
74
+ "将已知的 GitHub Actions 更新到当前支持的最新稳定版本。"
75
+ ],
76
+ "snippets": ["npx cistack upgrade", "npx cistack upgrade --dry-run"]
77
+ },
78
+ {
79
+ "title": "创建入门配置",
80
+ "paragraphs": [
81
+ "写入 cistack.config.js,包含支持的覆盖项键名。"
82
+ ],
83
+ "snippets": ["npx cistack init"]
84
+ }
85
+ ]
86
+ },
87
+ "generated": {
88
+ "section_title": "会生成什么",
89
+ "items": [
90
+ {
91
+ "title": "pipeline.yml",
92
+ "paragraphs": [
93
+ "默认情况下,cistack 生成单个 GitHub Actions 工作流,将 CI、部署、Docker 与发布任务合并在一处,便于团队在同一文件中跟踪整条流水线。",
94
+ "在检测到相应栈时会包含 lint、测试、构建、E2E、部署、Docker 与发布任务;使用检测到的默认分支或你配置的分支;在同一文件中保留预览部署与发布任务;并在文件头注明所需密钥。"
95
+ ],
96
+ "snippets": []
97
+ },
98
+ {
99
+ "title": "dependabot.yml",
100
+ "paragraphs": [
101
+ "Dependabot 仍为独立文件 .github/dependabot.yml,因为它不是 GitHub Actions 工作流。",
102
+ "若要在 Dependabot 拉取请求上做预览部署,请同时将部署凭据配置为 Dependabot 密钥,而不仅是 Actions 密钥。Vercel 需要 VERCEL_TOKEN、VERCEL_ORG_ID、VERCEL_PROJECT_ID。"
103
+ ],
104
+ "snippets": []
105
+ },
106
+ {
107
+ "title": "拆分模式",
108
+ "paragraphs": [
109
+ "若偏好旧的多文件布局,可在 cistack.config.js 中将 workflowLayout 设为 split。拆分模式下,cistack 会再次分别写入 ci.yml、deploy.yml、docker.yml 与 release.yml。"
110
+ ],
111
+ "snippets": [
112
+ "module.exports = {\n workflowLayout: 'split',\n};"
113
+ ]
114
+ }
115
+ ]
116
+ },
117
+ "detection": {
118
+ "section_title": "支持的检测能力",
119
+ "hosting_title": "托管",
120
+ "hosting_tags": [
121
+ "Firebase",
122
+ "Vercel",
123
+ "Netlify",
124
+ "GitHub Pages",
125
+ "AWS",
126
+ "GCP App Engine",
127
+ "Azure",
128
+ "Heroku",
129
+ "Render",
130
+ "Railway",
131
+ "Docker"
132
+ ],
133
+ "frameworks_title": "框架",
134
+ "frameworks_tags": [
135
+ "Next.js",
136
+ "Nuxt",
137
+ "SvelteKit",
138
+ "Remix",
139
+ "Astro",
140
+ "Vite",
141
+ "React",
142
+ "Vue",
143
+ "Angular",
144
+ "Svelte",
145
+ "Gatsby",
146
+ "Express",
147
+ "Fastify",
148
+ "NestJS",
149
+ "Hono",
150
+ "Koa",
151
+ "Django",
152
+ "Flask",
153
+ "FastAPI",
154
+ "Rails",
155
+ "Spring Boot",
156
+ "Laravel",
157
+ "Go",
158
+ "Rust"
159
+ ],
160
+ "testing_title": "测试工具",
161
+ "testing_tags": [
162
+ "Jest",
163
+ "Vitest",
164
+ "Mocha",
165
+ "Cypress",
166
+ "Playwright",
167
+ "Pytest",
168
+ "RSpec",
169
+ "Go test",
170
+ "Cargo test",
171
+ "PHPUnit",
172
+ "Maven / JUnit",
173
+ "Storybook"
174
+ ]
175
+ },
176
+ "configuration": {
177
+ "section_title": "配置",
178
+ "intro": "需要覆盖检测结果时,请创建 cistack.config.js。",
179
+ "example_caption": "示例",
180
+ "keys_title": "支持的顶层配置键",
181
+ "keys": [
182
+ "nodeVersion",
183
+ "packageManager",
184
+ "hosting",
185
+ "frameworks",
186
+ "testing",
187
+ "branches",
188
+ "workflowLayout",
189
+ "cache",
190
+ "monorepo",
191
+ "release",
192
+ "secrets",
193
+ "outputDir"
194
+ ],
195
+ "branches_title": "分支行为",
196
+ "branches": [
197
+ "若在配置中设置了 branches,cistack 将严格使用这些分支",
198
+ "否则在可用时从 Git 元数据读取仓库默认分支",
199
+ "若无法获取 Git 元数据,则按工作流类型回退到 main、master、develop 等安全默认值"
200
+ ],
201
+ "config_snippet": "/** @type {import('cistack').Config} */\nmodule.exports = {\n nodeVersion: '20',\n packageManager: 'pnpm',\n branches: ['main', 'staging'],\n workflowLayout: 'single',\n hosting: ['Vercel'],\n outputDir: '.github/workflows',\n cache: {\n npm: true,\n cargo: true,\n pip: true,\n },\n monorepo: {\n perPackage: true,\n },\n release: {\n tool: 'semantic-release',\n },\n};"
202
+ },
203
+ "secrets": {
204
+ "section_title": "密钥",
205
+ "body": "生成的部署与发布工作流会在文件顶部说明所需密钥。请在 GitHub:Settings → Secrets and variables → Actions 中添加。"
206
+ },
207
+ "quality": {
208
+ "section_title": "开发与质量",
209
+ "intro": "项目包含针对历史上易出问题领域的回归测试:",
210
+ "items": [
211
+ "配置覆盖处理",
212
+ "默认分支检测",
213
+ "部署分支选择",
214
+ "Netlify 生产分支",
215
+ "智能合并行为",
216
+ "monorepo 按包查找构建脚本",
217
+ "发布配置检测",
218
+ "发布工作流生成",
219
+ "CLI dry-run 冒烟测试"
220
+ ],
221
+ "commands_title": "在本地运行检查",
222
+ "commands": [
223
+ "npm test",
224
+ "npm run test:smoke",
225
+ "node bin/ciflow.js audit --path .",
226
+ "node bin/ciflow.js upgrade --path . --dry-run"
227
+ ],
228
+ "repo_note": "使用已发布的 npm 包时,可执行文件名为 cistack。在 cistack 源码仓库中,本地入口为 bin/ciflow.js。"
229
+ },
230
+ "footer": {
231
+ "license": "MIT 许可证",
232
+ "tagline": "从你已有的仓库生成 CI/CD 工作流。",
233
+ "architect_credit": "作者",
234
+ "architect_name": "Edwin Vakayil",
235
+ "copyright_suffix": "cistack。在适用范围内保留所有权利。"
236
+ },
237
+ "install_toggle": {
238
+ "recommended": "推荐",
239
+ "npm_global": "npm install -g",
240
+ "recommended_badge": "推荐",
241
+ "global_badge": "全局",
242
+ "npx_desc": "始终拉取最新版本,无需全局安装。",
243
+ "npm_desc": "在多个仓库中使用时更合适。"
244
+ },
245
+ "terminal": {
246
+ "label": "终端",
247
+ "mission": "核心任务 // L_02",
248
+ "project_scanned": "✔ 已扫描项目",
249
+ "stack_detected": "✔ 已识别技术栈",
250
+ "detected_stack": "识别的技术栈",
251
+ "languages": "语言:",
252
+ "frameworks": "框架:",
253
+ "hosting": "托管:",
254
+ "testing": "测试:",
255
+ "release_tool": "发布工具:",
256
+ "look_correct": "是否正确?使用这些设置生成流水线?是",
257
+ "generated_workflows": "✔ 已生成 3 个 CI 工作流",
258
+ "smart_merged": "↻ 智能合并:ci.yml",
259
+ "updated_on": "已更新顶层 \"on\"",
260
+ "updated_concurrency": "已更新顶层 \"concurrency\"",
261
+ "added_lint": "已添加任务 \"lint\"",
262
+ "updated_build": "任务 \"build\" → 已更新 \"name\"",
263
+ "updated_needs": "任务 \"build\" → 已更新 \"needs\"",
264
+ "added_checkout": "任务 \"build\" → 已添加步骤 \"Checkout code\"",
265
+ "added_node": "任务 \"build\" → 已添加步骤 \"Set up Node.js\"",
266
+ "updated_step_build": "任务 \"build\" → 已更新步骤 \"Build\"",
267
+ "added_upload": "任务 \"build\" → 已添加步骤 \"Upload build artifact\"",
268
+ "written_deploy": "已写入: deploy.yml",
269
+ "written_security": "已写入: security.yml",
270
+ "written_dependabot": "已写入: .github/dependabot.yml",
271
+ "done_msg": "完成!你的 GitHub Actions 流水线已就绪。",
272
+ "workflows_path": "工作流 → cistack/.github/workflows",
273
+ "dependabot_path": "Dependabot → cistack/.github/dependabot.yml",
274
+ "processing": "正在处理输出…"
275
+ }
276
+ }