gencow 0.1.73 → 0.1.74

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/bin/gencow.mjs CHANGED
@@ -426,7 +426,8 @@ function generateReadmeMd(config, apiObj) {
426
426
 
427
427
  let md = `# Gencow API Guide\n`;
428
428
  md += `> ⚡ Auto-generated by Gencow CLI — do not edit manually.\n`;
429
- md += `> Last updated: ${now}\n\n`;
429
+ md += `> Last updated: ${now}\n`;
430
+ md += `> 📚 Gencow 공식 문서 (전체 참조): https://docs.gencow.com/llms-full.txt\n\n`;
430
431
  md += `---\n\n`;
431
432
 
432
433
  // ── 1. API Reference Table ─────────────────────────────
@@ -1946,10 +1947,12 @@ ${BOLD}Examples:${RESET}
1946
1947
  let envTarget = "dev";
1947
1948
  let staticDir = null; // --static 옵션
1948
1949
  let isStatic = false;
1950
+ let forceDeploy = false; // --force: skip dependency audit
1949
1951
 
1950
1952
  for (let i = 0; i < deployArgs.length; i++) {
1951
1953
  const a = deployArgs[i];
1952
1954
  if (a === "--prod") envTarget = "prod";
1955
+ else if (a === "--force" || a === "-f") forceDeploy = true;
1953
1956
  else if (a === "--app" || a === "-a") appId = deployArgs[++i];
1954
1957
  else if (a === "--static") {
1955
1958
  isStatic = true;
@@ -2025,6 +2028,23 @@ ${BOLD}Examples:${RESET}
2025
2028
  process.exit(1);
2026
2029
  }
2027
2030
 
2031
+ // 1-0. Pre-deploy dependency audit
2032
+ if (!forceDeploy) {
2033
+ try {
2034
+ const { auditDeployDependencies, formatAuditError } = await import("../lib/deploy-auditor.mjs");
2035
+ const entryPoint = resolve(process.cwd(), "gencow", "index.ts");
2036
+ if (existsSync(entryPoint)) {
2037
+ const auditResult = await auditDeployDependencies(entryPoint);
2038
+ if (!auditResult.passed) {
2039
+ log(formatAuditError(auditResult));
2040
+ process.exit(1);
2041
+ }
2042
+ }
2043
+ } catch (auditErr) {
2044
+ warn(`의존성 검사 스킵: ${auditErr.message}`);
2045
+ }
2046
+ }
2047
+
2028
2048
  try {
2029
2049
  exec(`tar -czf "${tmpBundle}" ${filesToPack.join(" ")}`, { cwd: process.cwd() });
2030
2050
  } catch (e) {
@@ -2127,6 +2147,11 @@ ${BOLD}Examples:${RESET}
2127
2147
  if (!retryRes.ok) {
2128
2148
  const retryErr = await retryRes.json().catch(() => ({}));
2129
2149
  error(`배포 실패: ${retryErr.error || retryRes.statusText}`);
2150
+ if (retryErr.crashLogs?.length) {
2151
+ log("");
2152
+ warn("서버 시작 실패 원인:");
2153
+ for (const line of retryErr.crashLogs) log(` ${DIM}${line}${RESET}`);
2154
+ }
2130
2155
  process.exit(1);
2131
2156
  }
2132
2157
 
@@ -2142,6 +2167,11 @@ ${BOLD}Examples:${RESET}
2142
2167
  }
2143
2168
 
2144
2169
  error(`배포 실패: ${errData.error || deployRes.statusText}`);
2170
+ if (errData.crashLogs?.length) {
2171
+ log("");
2172
+ warn("서버 시작 실패 원인:");
2173
+ for (const line of errData.crashLogs) log(` ${DIM}${line}${RESET}`);
2174
+ }
2145
2175
  process.exit(1);
2146
2176
  }
2147
2177