gencow 0.1.148 → 0.1.150

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 (111) hide show
  1. package/bin/gencow.mjs +46 -10
  2. package/core/index.js +2974 -2254
  3. package/dashboard/assets/index-BFEs29Zt.js +398 -0
  4. package/dashboard/assets/index-hoAwatY0.css +1 -0
  5. package/dashboard/index.html +7 -4
  6. package/lib/add-command.mjs +47 -320
  7. package/lib/add-rag.mjs +222 -0
  8. package/lib/add-sso.mjs +116 -0
  9. package/lib/api-codegen.mjs +1 -1
  10. package/lib/app-command.mjs +129 -60
  11. package/lib/app-diagnostics.mjs +63 -0
  12. package/lib/cli-artifact-guard.mjs +11 -3
  13. package/lib/cli-dev-runtime.mjs +28 -16
  14. package/lib/cli-project-runtime.mjs +262 -81
  15. package/lib/cli-version-check.mjs +3 -1
  16. package/lib/cloud-targets.mjs +1 -1
  17. package/lib/codegen/index.mjs +8949 -8733
  18. package/lib/codegen-command.mjs +135 -26
  19. package/lib/component-readme.mjs +134 -92
  20. package/lib/cors-command.mjs +22 -7
  21. package/lib/cron-manifest.mjs +485 -7
  22. package/lib/db-command.mjs +17 -28
  23. package/lib/deploy-auditor.mjs +28 -4
  24. package/lib/deploy-command.mjs +95 -32
  25. package/lib/deploy-package-runtime.mjs +27 -7
  26. package/lib/deploy-runtime.mjs +2 -4
  27. package/lib/deploy-static-fullstack-runtime.mjs +0 -5
  28. package/lib/dev-cloud-bundle.mjs +39 -10
  29. package/lib/dev-cloud-command.mjs +53 -19
  30. package/lib/dev-cloud-migrations.mjs +28 -0
  31. package/lib/dev-local-command.mjs +35 -8
  32. package/lib/domain-command.mjs +117 -23
  33. package/lib/files-command.mjs +83 -27
  34. package/lib/init-command.mjs +106 -65
  35. package/lib/install-features.mjs +374 -0
  36. package/lib/jobs-command.mjs +3 -1
  37. package/lib/logs-command.mjs +11 -3
  38. package/lib/platform-client.mjs +14 -7
  39. package/lib/readme-codegen.mjs +264 -452
  40. package/package.json +13 -10
  41. package/scripts/bundle-codegen.mjs +17 -1
  42. package/scripts/bundle-core.mjs +54 -0
  43. package/scripts/bundle-server.mjs +24 -43
  44. package/scripts/pre-publish-check.mjs +6 -2
  45. package/server/config.js +14608 -0
  46. package/server/index.js +34308 -19507
  47. package/server/index.js.map +4 -4
  48. package/templateFeature/agent/manifest.json +17 -0
  49. package/templateFeature/ai/ai-errors.ts +54 -0
  50. package/templateFeature/ai/ai-facade.ts +339 -0
  51. package/templateFeature/ai/ai-image.ts +243 -0
  52. package/templateFeature/ai/ai-provider.ts +278 -0
  53. package/templateFeature/ai/ai.ts +26 -0
  54. package/templateFeature/ai/manifest.json +27 -0
  55. package/templateFeature/analytics/manifest.json +11 -0
  56. package/templateFeature/guardrails/manifest.json +17 -0
  57. package/templateFeature/memory/manifest.json +17 -0
  58. package/templateFeature/parsers/manifest.json +18 -0
  59. package/templateFeature/prompts/manifest.json +16 -0
  60. package/templateFeature/rag/manifest.json +21 -0
  61. package/{templates → templateFeature/rag}/rag.ts +21 -13
  62. package/templateFeature/reranker/manifest.json +17 -0
  63. package/templateFeature/search/manifest.json +17 -0
  64. package/templateFeature/sso/manifest.json +26 -0
  65. package/templateFeature/sso/sso-auth-callback.tsx +64 -0
  66. package/templateFeature/sso/sso-google-sign-in-button.tsx +63 -0
  67. package/templateFeature/tools/manifest.json +15 -0
  68. package/templates/SECURITY.md +245 -134
  69. package/templates/admin-tool/README.md +22 -13
  70. package/templates/admin-tool/index.ts +21 -2
  71. package/templates/admin-tool/items.ts +6 -4
  72. package/templates/ai-chat/README.md +89 -69
  73. package/templates/ai-chat/chat.ts +19 -33
  74. package/templates/ai-chat/index.ts +14 -1
  75. package/templates/ai-chat/prompt.md +114 -113
  76. package/templates/ai-chat/schema.ts +6 -1
  77. package/templates/auth.ts +8 -17
  78. package/templates/default/README.md +54 -61
  79. package/templates/default/index.ts +20 -19
  80. package/templates/default/schema.ts +6 -1
  81. package/templates/fullstack/README.md +81 -75
  82. package/templates/fullstack/files.ts +31 -21
  83. package/templates/fullstack/index.ts +24 -3
  84. package/templates/fullstack/prompt.md +133 -149
  85. package/templates/fullstack/schema.ts +6 -1
  86. package/templates/fullstack/tasks.ts +32 -52
  87. package/templates/runtime.ts +22 -0
  88. package/templates/schema-auth.ts +10 -0
  89. package/templates/task-app/README.md +72 -68
  90. package/templates/task-app/files.ts +31 -21
  91. package/templates/task-app/index.ts +24 -3
  92. package/templates/task-app/prompt.md +102 -122
  93. package/templates/task-app/schema.ts +6 -1
  94. package/templates/task-app/tasks.ts +32 -52
  95. package/dashboard/assets/index-7pP-gCcL.js +0 -388
  96. package/dashboard/assets/index-CbDHShVr.css +0 -1
  97. package/templates/ai-chat/ai.ts +0 -525
  98. package/templates/ai.ts +0 -525
  99. package/templates/auth-schema.ts +0 -67
  100. package/templates/fullstack/ai.ts +0 -525
  101. /package/{templates → templateFeature/agent}/agent.ts +0 -0
  102. /package/{templates → templateFeature/guardrails}/guardrails.ts +0 -0
  103. /package/{templates → templateFeature/memory}/memory.ts +0 -0
  104. /package/{templates → templateFeature/memory}/schema-memory.ts +0 -0
  105. /package/{templates → templateFeature/parsers}/parsers.ts +0 -0
  106. /package/{templates → templateFeature/prompts}/prompts.ts +0 -0
  107. /package/{templates → templateFeature/rag}/schema-rag.ts +0 -0
  108. /package/{templates → templateFeature/reranker}/reranker.ts +0 -0
  109. /package/{templates → templateFeature/search}/schema-search.ts +0 -0
  110. /package/{templates → templateFeature/search}/search.ts +0 -0
  111. /package/{templates → templateFeature/tools}/tools.ts +0 -0
package/bin/gencow.mjs CHANGED
@@ -32,7 +32,6 @@ import {
32
32
  findServerRoot,
33
33
  isLocalDbTarget,
34
34
  isMonorepo,
35
- isStandaloneProject,
36
35
  loadConfig,
37
36
  runInServer,
38
37
  spawnInServer,
@@ -93,7 +92,7 @@ const runAddCommand = createAddCommand({
93
92
  errorImpl: error,
94
93
  cwdImpl: () => process.cwd(),
95
94
  existsSyncImpl: existsSync,
96
- templateDir: resolve(__dirname, "..", "templates"),
95
+ templateFeatureDir: resolve(__dirname, "..", "templateFeature"),
97
96
  BOLD,
98
97
  CYAN,
99
98
  DIM,
@@ -115,6 +114,7 @@ const runCodegenCommand = createCodegenCommand({
115
114
  exitImpl: (code) => process.exit(code),
116
115
  resolvePathImpl: resolve,
117
116
  cwdImpl: () => process.cwd(),
117
+ existsSyncImpl: existsSync,
118
118
  processEnv: process.env,
119
119
  dirnameValue: __dirname,
120
120
  BOLD,
@@ -136,11 +136,11 @@ const {
136
136
  drizzleKitCmdImpl: _drizzleKitCmd,
137
137
  isLocalDbTarget,
138
138
  isMonorepo,
139
- isStandaloneProject,
140
139
  loadConfig,
141
140
  runInServer,
142
141
  });
143
142
  const runDevCloudCommand = createDevCloudCommand({
143
+ buildEnvImpl: buildEnv,
144
144
  requireCreds,
145
145
  loadConfig,
146
146
  existsSyncImpl: existsSync,
@@ -154,6 +154,8 @@ const runDevCloudCommand = createDevCloudCommand({
154
154
  updateEnvLocalUrlImpl: updateEnvLocalUrl,
155
155
  generateApiTsImpl: generateApiTs,
156
156
  drizzleKitCmdImpl: _drizzleKitCmd,
157
+ isMonorepoImpl: isMonorepo,
158
+ runInServerImpl: runInServer,
157
159
  logImpl: log,
158
160
  infoImpl: info,
159
161
  warnImpl: warn,
@@ -184,10 +186,11 @@ const { dev: runDevCommand, devLocal: runDevLocalCommand } = createDevLocalComma
184
186
  cleanupOldBackups,
185
187
  cwdImpl: () => process.cwd(),
186
188
  drizzleKitCmdImpl: _drizzleKitCmd,
189
+ errorImpl: error,
190
+ exitImpl: (code) => process.exit(code),
187
191
  findServerRoot,
188
192
  generateApiTsImpl: generateApiTs,
189
193
  isMonorepo,
190
- isStandaloneProject,
191
194
  loadConfig,
192
195
  logImpl: log,
193
196
  infoImpl: info,
@@ -212,7 +215,6 @@ const runDeployCommand = createDeployCommand({
212
215
  existsSyncImpl: existsSync,
213
216
  handleDeployReadonlySubcommandImpl: handleDeployReadonlySubcommand,
214
217
  isMonorepoImpl: isMonorepo,
215
- isStandaloneProjectImpl: isStandaloneProject,
216
218
  platformFetchImpl: platformFetch,
217
219
  processEnv: process.env,
218
220
  processRef: process,
@@ -232,7 +234,33 @@ const runDeployCommand = createDeployCommand({
232
234
  const runDomainCommand = createDomainCommand();
233
235
  const runEnvCommand = createEnvCommand();
234
236
  const runFilesCommand = createFilesCommand();
235
- const runInitCommand = createInitCommand();
237
+ const runInitCommand = createInitCommand({
238
+ templateFeatureDir: resolve(__dirname, "..", "templateFeature"),
239
+ runCodegenImpl: async (projectDir) => {
240
+ const runProjectCodegen = createCodegenCommand({
241
+ loadConfig: (opts = {}) => loadConfig({ ...opts, cwd: projectDir }),
242
+ findServerRoot,
243
+ resolveCoreImport,
244
+ logImpl: log,
245
+ infoImpl: info,
246
+ errorImpl: error,
247
+ successImpl: success,
248
+ exitImpl: (code) => {
249
+ throw new Error(`Codegen failed with exit code ${code}`);
250
+ },
251
+ resolvePathImpl: resolve,
252
+ cwdImpl: () => projectDir,
253
+ existsSyncImpl: existsSync,
254
+ processEnv: process.env,
255
+ dirnameValue: __dirname,
256
+ BOLD,
257
+ CYAN,
258
+ DIM,
259
+ RESET,
260
+ });
261
+ await runProjectCodegen();
262
+ },
263
+ });
236
264
  const runJobsCommand = createJobsCommand();
237
265
  const runLogsCommand = createLogsCommand({ loadConfig });
238
266
  const runStaticCommand = createStaticCommand({
@@ -321,6 +349,8 @@ ${BOLD}Commands (login required):${RESET}
321
349
  ${DIM}--prod Deploy to production (Pro+ only)${RESET}
322
350
  ${DIM}--rollback Rollback to previous deployment${RESET}
323
351
  ${DIM}--force, -f Skip optional dependency scan${RESET}
352
+ ${DIM}logs [-n N] Show cloud app server logs${RESET}
353
+ ${DIM}status Show cloud app status + diagnostics${RESET}
324
354
  ${GREEN}env list${RESET} List cloud env vars ${DIM}(--prod for production)${RESET}
325
355
  ${GREEN}env set K=V${RESET} Set cloud env var ${DIM}(hot-reload, no restart)${RESET}
326
356
  ${GREEN}env unset KEY${RESET} Remove cloud env var
@@ -336,9 +366,9 @@ ${BOLD}Commands (login required):${RESET}
336
366
  ${DIM}Keys: image.maxWidth (0-10000), image.quality (0-100)${RESET}
337
367
  ${GREEN}config get${RESET} Show current image config
338
368
  ${GREEN}config reset${RESET} Reset image config to tier defaults
339
- ${GREEN}domain set${RESET} Connect custom domain ${DIM}(myapp.com)${RESET}
340
- ${GREEN}domain status${RESET} Check domain DNS/TLS status
341
- ${GREEN}domain remove${RESET} Disconnect custom domain
369
+ ${GREEN}domain set${RESET} Connect custom domain ${DIM}(myapp.com, --prod for production)${RESET}
370
+ ${GREEN}domain status${RESET} Check domain DNS/TLS status ${DIM}(--prod for production)${RESET}
371
+ ${GREEN}domain remove${RESET} Disconnect custom domain ${DIM}(--prod for production)${RESET}
342
372
 
343
373
  ${BOLD}App management:${RESET}
344
374
  ${GREEN}app list${RESET} List your apps
@@ -347,6 +377,7 @@ ${BOLD}App management:${RESET}
347
377
  ${GREEN}app status${RESET} Show app status
348
378
 
349
379
  ${BOLD}Ops (Observability):${RESET}
380
+ ${GREEN}logs${RESET} Show local dev server logs ${DIM}(--lines N, --follow)${RESET}
350
381
  ${GREEN}jobs${RESET} List cron jobs & scheduled tasks status
351
382
  ${GREEN}jobs history${RESET} Show recent cron execution history
352
383
  ${GREEN}jobs workflow cancel${RESET} Best-effort stop for pending/running workflow
@@ -464,7 +495,12 @@ ${BOLD}Examples:${RESET}
464
495
  // ─── updateReadme: gencow/ 폴더 스캔 → README에 컴포넌트 문서 자동 추가 ────
465
496
 
466
497
  const [, , rawCmd = "help", ...args] = process.argv;
467
- const cmd = rawCmd === "--help" || rawCmd === "-h" ? "help" : rawCmd === "--version" || rawCmd === "-v" ? "version" : rawCmd;
498
+ const cmd =
499
+ rawCmd === "--help" || rawCmd === "-h"
500
+ ? "help"
501
+ : rawCmd === "--version" || rawCmd === "-v"
502
+ ? "version"
503
+ : rawCmd;
468
504
  maybeCheckCliVersion({
469
505
  command: cmd,
470
506
  currentVersion: CLI_VERSION,