portless 0.5.1 → 0.5.2

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 (3) hide show
  1. package/README.md +20 -0
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -64,6 +64,26 @@ portless docs.myapp next dev
64
64
  # tenant2.myapp.localhost:1355 -> myapp
65
65
  ```
66
66
 
67
+ ### Git Worktrees
68
+
69
+ `portless run` automatically detects git worktrees. When you're in a linked worktree, the branch name is prepended as a subdomain so each worktree gets its own URL without any config changes:
70
+
71
+ ```bash
72
+ # Main worktree (main/master branch) -- no prefix, works normally
73
+ portless run next dev
74
+ # -> http://myapp.localhost:1355
75
+
76
+ # Linked worktree on branch "fix-ui" -- branch name becomes a prefix
77
+ portless run next dev
78
+ # -> http://fix-ui.myapp.localhost:1355
79
+
80
+ # Linked worktree on branch "feature/auth" -- uses last segment
81
+ portless run next dev
82
+ # -> http://auth.myapp.localhost:1355
83
+ ```
84
+
85
+ This means you can put `portless run` in your `package.json` once and it just works everywhere -- the main checkout uses the plain name, and each worktree gets a unique subdomain. No `--force` needed, no name collisions.
86
+
67
87
  ### In package.json
68
88
 
69
89
  ```json
package/dist/cli.js CHANGED
@@ -1146,7 +1146,7 @@ ${chalk.bold("Reserved names:")}
1146
1146
  process.exit(0);
1147
1147
  }
1148
1148
  function printVersion() {
1149
- console.log("0.5.1");
1149
+ console.log("0.5.2");
1150
1150
  process.exit(0);
1151
1151
  }
1152
1152
  async function handleTrust() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portless",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Replace port numbers with stable, named .localhost URLs. For humans and agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",