gencow 0.1.124 → 0.1.125

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
@@ -1630,7 +1630,8 @@ ${BOLD}Commands (login required):${RESET}
1630
1630
  ${GREEN}static [dir]${RESET} Deploy static files ${DIM}(dist/, out/, build/)${RESET}
1631
1631
  ${DIM}--prod Deploy to production app${RESET}
1632
1632
  ${DIM}--force, -f Skip dependency audit${RESET}
1633
- ${GREEN}deploy${RESET} Deploy backend to production ${DIM}(Pro+ only)${RESET}
1633
+ ${GREEN}deploy${RESET} Deploy backend to cloud ${DIM}(dev by default)${RESET}
1634
+ ${DIM}--prod Deploy to production (Pro+ only)${RESET}
1634
1635
  ${DIM}--rollback Rollback to previous deployment${RESET}
1635
1636
  ${DIM}--force, -f Skip dependency audit${RESET}
1636
1637
  ${GREEN}env list${RESET} List cloud env vars ${DIM}(--prod for production)${RESET}
@@ -1656,7 +1657,7 @@ ${BOLD}App management:${RESET}
1656
1657
  ${GREEN}app status${RESET} Show app status
1657
1658
 
1658
1659
  ${DIM}Tip: Most commands support --prod to target the production app.${RESET}
1659
- ${DIM} e.g. gencow env list --prod, gencow db:seed --prod${RESET}
1660
+ ${DIM} e.g. gencow deploy --prod, gencow env list --prod${RESET}
1660
1661
 
1661
1662
  ${BOLD}Examples:${RESET}
1662
1663
  ${DIM}# New project:${RESET}
@@ -1665,9 +1666,11 @@ ${BOLD}Examples:${RESET}
1665
1666
  ${DIM}# Initialize in current directory:${RESET}
1666
1667
  gencow init . --force
1667
1668
 
1668
- ${DIM}# Deploy to production (Pro+ only):${RESET}
1669
- gencow login
1669
+ ${DIM}# Deploy to dev:${RESET}
1670
1670
  gencow deploy
1671
+
1672
+ ${DIM}# Deploy to production (Pro+ only):${RESET}
1673
+ gencow deploy --prod
1671
1674
  `);
1672
1675
  },
1673
1676
 
@@ -1865,14 +1868,14 @@ ${BOLD}Examples:${RESET}
1865
1868
  });
1866
1869
  },
1867
1870
 
1868
- // ── deploy — 프로덕션 배포 (Pro+ only) ───────────────
1871
+ // ── deploy — 클라우드 배포 (dev 기본, --prod로 프로덕션) ──
1869
1872
  async deploy(...deployArgs) {
1870
1873
  const creds = requireCreds();
1871
1874
 
1872
1875
  // gencow.json에서 앱 ID 확인 (자동 생성된 유니크 ID)
1873
1876
  let appId = null;
1874
1877
  let displayName = null;
1875
- let envTarget = "prod"; // v0.1.120: deploy = prod 기본값
1878
+ let envTarget = "dev"; // v0.1.125: deploy = dev 기본값, --prod prod
1876
1879
  let forceDeploy = false; // --force: skip dependency audit
1877
1880
  let isRollback = false; // --rollback: rollback to previous deploy
1878
1881
 
@@ -1939,9 +1942,6 @@ ${BOLD}Examples:${RESET}
1939
1942
  for (let i = 0; i < deployArgs.length; i++) {
1940
1943
  const a = deployArgs[i];
1941
1944
  if (a === "--prod") {
1942
- // deprecated: deploy는 이미 prod 기본값
1943
- warn(`${YELLOW}--prod flag is no longer needed.${RESET}`);
1944
- info(`gencow deploy targets production by default.`);
1945
1945
  envTarget = "prod";
1946
1946
  }
1947
1947
  else if (a === "--force" || a === "-f") forceDeploy = true;
@@ -1960,7 +1960,8 @@ ${BOLD}Examples:${RESET}
1960
1960
  error(`Unknown deploy argument: "${a}"`);
1961
1961
  log("");
1962
1962
  info(`Usage: gencow deploy [options]`);
1963
- info(` gencow deploy Production backend deploy (Pro+)`);
1963
+ info(` gencow deploy Dev backend deploy`);
1964
+ info(` gencow deploy --prod Production backend deploy (Pro+)`);
1964
1965
  info(` gencow deploy --rollback Rollback to previous version`);
1965
1966
  info(` gencow deploy logs View server logs`);
1966
1967
  info(` gencow deploy status Check app status`);
@@ -1996,15 +1997,15 @@ ${BOLD}Examples:${RESET}
1996
1997
 
1997
1998
  // ── Rollback 분기 ─────────────────────────────────────
1998
1999
  if (isRollback) {
1999
- // prodApp이 있으면 prod 대상 롤백, 없으면 dev 대상 롤백
2000
- const rollbackTarget = prodAppId || appId;
2000
+ // --prod: prod 롤백, 기본: dev 롤백
2001
+ const rollbackTarget = envTarget === "prod" ? (prodAppId || appId) : appId;
2001
2002
  if (!rollbackTarget) {
2002
2003
  error("App not found. Run from the project root with gencow.json.");
2003
2004
  process.exit(1);
2004
2005
  }
2005
2006
 
2006
2007
  log(`\n${BOLD}${CYAN}Gencow Rollback${RESET}\n`);
2007
- info(`App: ${rollbackTarget}${prodAppId ? " (prod)" : ""}`);
2008
+ info(`App: ${rollbackTarget}${envTarget === "prod" ? " (prod)" : ""}`);
2008
2009
  log("");
2009
2010
 
2010
2011
  const rollbackStartTime = Date.now();
@@ -2078,11 +2079,12 @@ ${BOLD}Examples:${RESET}
2078
2079
  log("");
2079
2080
  log(` ${RED}⛔ Production Deploy — Pro plan or higher required${RESET}`);
2080
2081
  log("");
2081
- log(` ${DIM}gencow deploy is for production deployment.${RESET}`);
2082
+ log(` ${DIM}gencow deploy --prod is for production deployment.${RESET}`);
2082
2083
  log("");
2083
2084
  log(` ${BOLD}💡 Dev environment deploy:${RESET}`);
2084
- log(` ${GREEN}gencow dev${RESET} ${DIM}← Real-time backend + live logs${RESET}`);
2085
- log(` ${GREEN}gencow static dist/${RESET} ${DIM}← Static file (dist/) deploy${RESET}`);
2085
+ log(` ${GREEN}gencow deploy${RESET} ${DIM}← Deploy backend to dev${RESET}`);
2086
+ log(` ${GREEN}gencow dev${RESET} ${DIM}← Real-time backend + live logs${RESET}`);
2087
+ log(` ${GREEN}gencow static dist/${RESET} ${DIM}← Static file (dist/) deploy${RESET}`);
2086
2088
  log("");
2087
2089
  log(` ${BOLD}🚀 Unlock production deploy:${RESET}`);
2088
2090
  log(` ${GREEN}gencow upgrade${RESET} ${DIM}← Upgrade to Pro plan${RESET}`);
@@ -2124,7 +2126,7 @@ ${BOLD}Examples:${RESET}
2124
2126
  } else {
2125
2127
  info(`App: new (auto-generated ID)`);
2126
2128
  }
2127
- info(`Env: ${envTarget}`);
2129
+ info(`Env: ${envTarget}${envTarget === "prod" ? ` ${YELLOW}(production)${RESET}` : ""}`);
2128
2130
  info(`Format: tar.gz`);
2129
2131
  log("");
2130
2132