zdev 0.1.3 → 0.1.5

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/dist/index.js CHANGED
@@ -2515,10 +2515,13 @@ async function start(featureName, projectPath = ".", options = {}) {
2515
2515
  console.log(` Run: zdev stop ${featureName} --project ${fullPath}`);
2516
2516
  process.exit(1);
2517
2517
  }
2518
- console.log(`
2518
+ const hasOrigin = run("git", ["remote", "get-url", "origin"], { cwd: fullPath });
2519
+ if (hasOrigin.success) {
2520
+ console.log(`
2519
2521
  \uD83D\uDCE5 Fetching latest from origin...`);
2520
- if (!gitFetch(fullPath)) {
2521
- console.error(` Failed to fetch, continuing anyway...`);
2522
+ if (!gitFetch(fullPath)) {
2523
+ console.error(` Failed to fetch, continuing anyway...`);
2524
+ }
2522
2525
  }
2523
2526
  console.log(`
2524
2527
  \uD83C\uDF33 Creating worktree...`);
@@ -3083,7 +3086,7 @@ program2.command("create <name>").description("Create a new TanStack Start proje
3083
3086
  program2.command("init [path]").description("Initialize zdev for a project").option("-s, --seed", "Create initial seed data from current Convex state").action(async (path, options) => {
3084
3087
  await init(path, options);
3085
3088
  });
3086
- program2.command("start <feature>").description("Start working on a feature (creates worktree, starts servers)").option("-p, --project <path>", "Project path (default: current directory)", ".").option("--port <number>", "Frontend port (auto-allocated if not specified)", parseInt).option("--local", "Local only - skip public URL setup via Traefik").option("-s, --seed", "Import seed data into the new worktree").option("-b, --base-branch <branch>", "Base branch to create from", "origin/main").option("-w, --web-dir <dir>", "Subdirectory containing package.json (auto-detected if not specified)").action(async (feature, options) => {
3089
+ program2.command("start <feature>").description("Start working on a feature (creates worktree, starts servers)").option("-p, --project <path>", "Project path (default: current directory)", ".").option("--port <number>", "Frontend port (auto-allocated if not specified)", parseInt).option("--local", "Local only - skip public URL setup via Traefik").option("-s, --seed", "Import seed data into the new worktree").option("-b, --base-branch <branch>", "Base branch to create from (auto-detected if not specified)").option("-w, --web-dir <dir>", "Subdirectory containing package.json (auto-detected if not specified)").action(async (feature, options) => {
3087
3090
  await start(feature, options.project, {
3088
3091
  port: options.port,
3089
3092
  local: options.local,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zdev",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Multi-agent worktree development environment for cloud dev with preview URLs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -105,10 +105,13 @@ export async function start(
105
105
  process.exit(1);
106
106
  }
107
107
 
108
- // Fetch latest
109
- console.log(`\nšŸ“„ Fetching latest from origin...`);
110
- if (!gitFetch(fullPath)) {
111
- console.error(` Failed to fetch, continuing anyway...`);
108
+ // Fetch latest (only if origin remote exists)
109
+ const hasOrigin = run("git", ["remote", "get-url", "origin"], { cwd: fullPath });
110
+ if (hasOrigin.success) {
111
+ console.log(`\nšŸ“„ Fetching latest from origin...`);
112
+ if (!gitFetch(fullPath)) {
113
+ console.error(` Failed to fetch, continuing anyway...`);
114
+ }
112
115
  }
113
116
 
114
117
  // Create worktree
package/src/index.ts CHANGED
@@ -52,7 +52,7 @@ program
52
52
  .option("--port <number>", "Frontend port (auto-allocated if not specified)", parseInt)
53
53
  .option("--local", "Local only - skip public URL setup via Traefik")
54
54
  .option("-s, --seed", "Import seed data into the new worktree")
55
- .option("-b, --base-branch <branch>", "Base branch to create from", "origin/main")
55
+ .option("-b, --base-branch <branch>", "Base branch to create from (auto-detected if not specified)")
56
56
  .option("-w, --web-dir <dir>", "Subdirectory containing package.json (auto-detected if not specified)")
57
57
  .action(async (feature, options) => {
58
58
  await start(feature, options.project, {