devlanes 0.11.3 → 0.13.0

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 (2) hide show
  1. package/package.json +7 -7
  2. package/schema.json +28 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlanes",
3
- "version": "0.11.3",
3
+ "version": "0.13.0",
4
4
  "description": "Development environments in Git worktree lanes",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://devlanes.run",
@@ -30,11 +30,11 @@
30
30
  "node": ">=18"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@devlanes/darwin-arm64": "0.11.3",
34
- "@devlanes/darwin-x64": "0.11.3",
35
- "@devlanes/linux-arm64": "0.11.3",
36
- "@devlanes/linux-x64": "0.11.3",
37
- "@devlanes/win32-arm64": "0.11.3",
38
- "@devlanes/win32-x64": "0.11.3"
33
+ "@devlanes/darwin-arm64": "0.13.0",
34
+ "@devlanes/darwin-x64": "0.13.0",
35
+ "@devlanes/linux-arm64": "0.13.0",
36
+ "@devlanes/linux-x64": "0.13.0",
37
+ "@devlanes/win32-arm64": "0.13.0",
38
+ "@devlanes/win32-x64": "0.13.0"
39
39
  }
40
40
  }
package/schema.json CHANGED
@@ -66,14 +66,14 @@
66
66
  "type": "null"
67
67
  }
68
68
  ],
69
- "description": "Command replacing the image's default: a list is used as is, a string runs through `/bin/sh -c` inside the container.",
69
+ "description": "Command replacing the image's default: a list is used as is, a string runs through `/bin/sh -c` inside the container. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`.",
70
70
  "examples": [
71
71
  [
72
72
  "server",
73
73
  "--config=/policies/config.yaml"
74
74
  ]
75
75
  ],
76
- "markdownDescription": "Command replacing the image's default: a list is used as is, a string runs through `/bin/sh -c` inside the container."
76
+ "markdownDescription": "Command replacing the image's default: a list is used as is, a string runs through `/bin/sh -c` inside the container. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`."
77
77
  },
78
78
  "env": {
79
79
  "additionalProperties": {
@@ -179,7 +179,7 @@
179
179
  "markdownDescription": "Extra check the start waits for once the container is up (the image's healthcheck, else its first port accepting TCP), before setup, tasks and services run. Write `started` or one of `tcp`, `http`, `log` (matched against the container's logs) or `cmd` (run on the host). If it does not pass within its timeout (default 60s), the start fails."
180
180
  },
181
181
  "volumes": {
182
- "description": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts, relative ones from the owning worktree; a bare name is a named volume kept per project or per lane.",
182
+ "description": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts; relative ones start at the project file's directory, in the lane's worktree for a `per_lane` container and in the primary worktree for a shared one. A bare name is a named volume kept per project or per lane.",
183
183
  "examples": [
184
184
  [
185
185
  "./infra/cerbos:/policies:ro"
@@ -187,13 +187,13 @@
187
187
  ],
188
188
  "items": {
189
189
  "$ref": "#/$defs/Templated_string",
190
- "description": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts, relative ones from the owning worktree; a bare name is a named volume kept per project or per lane.",
190
+ "description": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts; relative ones start at the project file's directory, in the lane's worktree for a `per_lane` container and in the primary worktree for a shared one. A bare name is a named volume kept per project or per lane.",
191
191
  "examples": [
192
192
  "./infra/cerbos:/policies:ro"
193
193
  ],
194
- "markdownDescription": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts, relative ones from the owning worktree; a bare name is a named volume kept per project or per lane."
194
+ "markdownDescription": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts; relative ones start at the project file's directory, in the lane's worktree for a `per_lane` container and in the primary worktree for a shared one. A bare name is a named volume kept per project or per lane."
195
195
  },
196
- "markdownDescription": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts, relative ones from the owning worktree; a bare name is a named volume kept per project or per lane.",
196
+ "markdownDescription": "Mounts as `source:destination[:mode]`. `./relative` and `/absolute` sources are bind mounts; relative ones start at the project file's directory, in the lane's worktree for a `per_lane` container and in the primary worktree for a shared one. A bare name is a named volume kept per project or per lane.",
197
197
  "type": [
198
198
  "array",
199
199
  "null"
@@ -793,7 +793,7 @@
793
793
  "type": "null"
794
794
  }
795
795
  ],
796
- "description": "Command to run: a string runs through `/bin/sh -c`, a list runs the program directly. Write the command you mean, such as `docker compose exec -T postgres ...`; devlanes runs it as written. Required.",
796
+ "description": "Command to run: a string runs through `/bin/sh -c`, a list runs the program directly. Write the command you mean, such as `docker compose exec -T postgres ...`; devlanes runs it as written. Required. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`.",
797
797
  "examples": [
798
798
  "pnpm dev",
799
799
  [
@@ -803,7 +803,7 @@
803
803
  "${{ self.port }}"
804
804
  ]
805
805
  ],
806
- "markdownDescription": "Command to run: a string runs through `/bin/sh -c`, a list runs the program directly. Write the command you mean, such as `docker compose exec -T postgres ...`; devlanes runs it as written. Required."
806
+ "markdownDescription": "Command to run: a string runs through `/bin/sh -c`, a list runs the program directly. Write the command you mean, such as `docker compose exec -T postgres ...`; devlanes runs it as written. Required. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`."
807
807
  },
808
808
  "timeout": {
809
809
  "anyOf": [
@@ -852,7 +852,7 @@
852
852
  "type": "null"
853
853
  }
854
854
  ],
855
- "description": "Compose file, or a list of files merged like repeated `-f`, relative to the project. Its services are shared by every lane unless listed in `per_lane`; the shared project runs from the primary worktree with that worktree's `.env` as `--env-file`.",
855
+ "description": "Compose file, or a list of files merged like repeated `-f`, relative to the project. Its services are shared by every lane unless listed in `per_lane`; the shared project runs from the primary worktree with the `.env` next to the project file there as `--env-file`.",
856
856
  "examples": [
857
857
  "docker-compose.yml",
858
858
  [
@@ -860,7 +860,7 @@
860
860
  "docker-compose.dev.yml"
861
861
  ]
862
862
  ],
863
- "markdownDescription": "Compose file, or a list of files merged like repeated `-f`, relative to the project. Its services are shared by every lane unless listed in `per_lane`; the shared project runs from the primary worktree with that worktree's `.env` as `--env-file`."
863
+ "markdownDescription": "Compose file, or a list of files merged like repeated `-f`, relative to the project. Its services are shared by every lane unless listed in `per_lane`; the shared project runs from the primary worktree with the `.env` next to the project file there as `--env-file`."
864
864
  },
865
865
  "containers": {
866
866
  "additionalProperties": {
@@ -1463,13 +1463,13 @@
1463
1463
  "type": "null"
1464
1464
  }
1465
1465
  ],
1466
- "description": "What devlanes does when a worktree gets its lane: only reserve it, also set it up, or also start it. Defaults to `register`. A worktree gets a lane the first time devlanes runs in it, not merely because it exists.",
1466
+ "description": "What devlanes does when a worktree gets its lane: only reserve it, also set it up, or also start it. Defaults to `register`. A worktree gets a lane the first time `start`, `status` or another command that acts on lanes runs in it, not merely because it exists.",
1467
1467
  "examples": [
1468
1468
  "register",
1469
1469
  "setup",
1470
1470
  "start"
1471
1471
  ],
1472
- "markdownDescription": "What devlanes does when a worktree gets its lane: only reserve it, also set it up, or also start it. Defaults to `register`. A worktree gets a lane the first time devlanes runs in it, not merely because it exists."
1472
+ "markdownDescription": "What devlanes does when a worktree gets its lane: only reserve it, also set it up, or also start it. Defaults to `register`. A worktree gets a lane the first time `start`, `status` or another command that acts on lanes runs in it, not merely because it exists."
1473
1473
  },
1474
1474
  "primary": {
1475
1475
  "description": "Branch whose worktree is lane 0, the main lane (`lanes.main` in expressions) and the only worktree that gets a lane by itself. Defaults to the remote's default branch, else `main` or `master`. In CI (a variable such as `CI` or `GITHUB_ACTIONS` is set) the checkout takes lane 0 on any branch when lane 0 is free.",
@@ -1606,20 +1606,20 @@
1606
1606
  "env": {
1607
1607
  "additionalProperties": {
1608
1608
  "$ref": "#/$defs/Templated_Scalar",
1609
- "description": "Variables for the services this profile starts, above their own `env`.",
1609
+ "description": "Variables for the services, tasks and `infra.setup` and `infra.teardown` commands of a lane while this profile is active, and for `devlanes exec` and `devlanes with` when they read neither `self` nor `replica`. They sit above each unit's own `env`, which cannot override them, so put a variable that some task must not get, such as `NODE_ENV: production` next to an install task that needs devDependencies, in `global_env` instead.",
1610
1610
  "examples": [
1611
- "production"
1611
+ "warn"
1612
1612
  ],
1613
- "markdownDescription": "Variables for the services this profile starts, above their own `env`."
1613
+ "markdownDescription": "Variables for the services, tasks and `infra.setup` and `infra.teardown` commands of a lane while this profile is active, and for `devlanes exec` and `devlanes with` when they read neither `self` nor `replica`. They sit above each unit's own `env`, which cannot override them, so put a variable that some task must not get, such as `NODE_ENV: production` next to an install task that needs devDependencies, in `global_env` instead."
1614
1614
  },
1615
1615
  "default": {},
1616
- "description": "Variables for the services this profile starts, above their own `env`.",
1616
+ "description": "Variables for the services, tasks and `infra.setup` and `infra.teardown` commands of a lane while this profile is active, and for `devlanes exec` and `devlanes with` when they read neither `self` nor `replica`. They sit above each unit's own `env`, which cannot override them, so put a variable that some task must not get, such as `NODE_ENV: production` next to an install task that needs devDependencies, in `global_env` instead.",
1617
1617
  "examples": [
1618
1618
  {
1619
- "NODE_ENV": "production"
1619
+ "LOG_LEVEL": "warn"
1620
1620
  }
1621
1621
  ],
1622
- "markdownDescription": "Variables for the services this profile starts, above their own `env`.",
1622
+ "markdownDescription": "Variables for the services, tasks and `infra.setup` and `infra.teardown` commands of a lane while this profile is active, and for `devlanes exec` and `devlanes with` when they read neither `self` nor `replica`. They sit above each unit's own `env`, which cannot override them, so put a variable that some task must not get, such as `NODE_ENV: production` next to an install task that needs devDependencies, in `global_env` instead.",
1623
1623
  "type": "object"
1624
1624
  },
1625
1625
  "exclude": {
@@ -1821,11 +1821,11 @@
1821
1821
  "type": "null"
1822
1822
  }
1823
1823
  ],
1824
- "description": "Ready once a line of output matches this regular expression, with colors and other terminal escape codes removed; recent lines printed before the check began count too. Suits workers without a port: have them print a line once connected.",
1824
+ "description": "Ready once a line of the unit's log, as `devlanes logs` shows it (for a container, its Docker log), matches this regular expression, with colors removed; lines printed before the check began count too. Suits workers without a port: have them print a line once connected.",
1825
1825
  "examples": [
1826
1826
  "Connected to Redis"
1827
1827
  ],
1828
- "markdownDescription": "Ready once a line of output matches this regular expression, with colors and other terminal escape codes removed; recent lines printed before the check began count too. Suits workers without a port: have them print a line once connected."
1828
+ "markdownDescription": "Ready once a line of the unit's log, as `devlanes logs` shows it (for a container, its Docker log), matches this regular expression, with colors removed; lines printed before the check began count too. Suits workers without a port: have them print a line once connected."
1829
1829
  },
1830
1830
  "tcp": {
1831
1831
  "anyOf": [
@@ -2331,7 +2331,7 @@
2331
2331
  "type": "null"
2332
2332
  }
2333
2333
  ],
2334
- "description": "When the service counts as up: `devlanes start` waits for it, and `after: services` tasks run once every started service is ready. Write `started` (ready once the process runs) or a mapping with one of `tcp`, `http`, `log` or `cmd`, plus `timeout` (default 60s). Without it, a service with `hosts` waits for TCP on its port and one without hosts uses `started`. A check that times out marks the service failed, which also skips `after: services` tasks; the process keeps running and is not restarted.",
2334
+ "description": "When the service counts as up: once its check passed and it has run half a second. `devlanes start` waits for it, and `after: services` tasks run once every started service is ready. Write `started` (no probe) or a mapping with one of `tcp`, `http`, `log` or `cmd`, plus `timeout` (default 60s). Without it, a service with `hosts` waits for TCP on its port and one without hosts uses `started`. A service that exits within that half second failed to start. A check that times out marks the service failed, which also skips `after: services` tasks; the process keeps running and is not restarted.",
2335
2335
  "examples": [
2336
2336
  "started",
2337
2337
  {
@@ -2343,7 +2343,7 @@
2343
2343
  "tcp": true
2344
2344
  }
2345
2345
  ],
2346
- "markdownDescription": "When the service counts as up: `devlanes start` waits for it, and `after: services` tasks run once every started service is ready. Write `started` (ready once the process runs) or a mapping with one of `tcp`, `http`, `log` or `cmd`, plus `timeout` (default 60s). Without it, a service with `hosts` waits for TCP on its port and one without hosts uses `started`. A check that times out marks the service failed, which also skips `after: services` tasks; the process keeps running and is not restarted."
2346
+ "markdownDescription": "When the service counts as up: once its check passed and it has run half a second. `devlanes start` waits for it, and `after: services` tasks run once every started service is ready. Write `started` (no probe) or a mapping with one of `tcp`, `http`, `log` or `cmd`, plus `timeout` (default 60s). Without it, a service with `hosts` waits for TCP on its port and one without hosts uses `started`. A service that exits within that half second failed to start. A check that times out marks the service failed, which also skips `after: services` tasks; the process keeps running and is not restarted."
2347
2347
  },
2348
2348
  "replicas": {
2349
2349
  "description": "Number of copies of this service to run, each with its own port, for example several queue workers. They run as `<name>.1` to `<name>.N`, `${{ replica.index }}` counts from 1, and `services.<name>` in expressions means the first copy; use `${{ replica.index }}` in `hosts` to give each copy its own hostname. A plain number of at least 1, the same in every lane, because each copy reserves ports in every lane's block; `${{ ... }}` expressions are not allowed. Defaults to 1.",
@@ -2372,7 +2372,7 @@
2372
2372
  "type": "null"
2373
2373
  }
2374
2374
  ],
2375
- "description": "Command that starts the service. A string runs with `/bin/sh -c`, so pipes, `&&` and multi-line scripts work; a list is an argv run directly without a shell. It starts in the lane's worktree root unless `cwd` is set. devlanes runs it exactly as written, so it cannot be combined with `preset`; prefer `run_script` when the command is a script in a project file. Exactly one of `run` and `run_script` is required after templates are applied.",
2375
+ "description": "Command that starts the service. A string runs with `/bin/sh -c`, so pipes, `&&` and multi-line scripts work; a list is an argv run directly without a shell. It starts in the project file's directory unless `cwd` is set. devlanes runs it exactly as written, so it cannot be combined with `preset`; prefer `run_script` when the command is a script in a project file. Exactly one of `run` and `run_script` is required after templates are applied. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`.",
2376
2376
  "examples": [
2377
2377
  "pnpm dev",
2378
2378
  [
@@ -2382,7 +2382,7 @@
2382
2382
  "${{ self.port }}"
2383
2383
  ]
2384
2384
  ],
2385
- "markdownDescription": "Command that starts the service. A string runs with `/bin/sh -c`, so pipes, `&&` and multi-line scripts work; a list is an argv run directly without a shell. It starts in the lane's worktree root unless `cwd` is set. devlanes runs it exactly as written, so it cannot be combined with `preset`; prefer `run_script` when the command is a script in a project file. Exactly one of `run` and `run_script` is required after templates are applied."
2385
+ "markdownDescription": "Command that starts the service. A string runs with `/bin/sh -c`, so pipes, `&&` and multi-line scripts work; a list is an argv run directly without a shell. It starts in the project file's directory unless `cwd` is set. devlanes runs it exactly as written, so it cannot be combined with `preset`; prefer `run_script` when the command is a script in a project file. Exactly one of `run` and `run_script` is required after templates are applied. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`."
2386
2386
  },
2387
2387
  "run_script": {
2388
2388
  "anyOf": [
@@ -2542,14 +2542,14 @@
2542
2542
  "started"
2543
2543
  ],
2544
2544
  "enumDescriptions": [
2545
- "Count the unit ready as soon as it runs, without probing anything. A dev server whose program crashed under a file watcher still counts as ready, so prefer a check when there is something to probe."
2545
+ "Count the unit ready once it runs, without probing anything; a service once it has run half a second. A dev server whose program crashed under a file watcher still counts as ready, so prefer a check when there is something to probe."
2546
2546
  ],
2547
2547
  "examples": [
2548
2548
  "started"
2549
2549
  ],
2550
2550
  "markdownDescription": "Readiness without a probe.",
2551
2551
  "markdownEnumDescriptions": [
2552
- "Count the unit ready as soon as it runs, without probing anything. A dev server whose program crashed under a file watcher still counts as ready, so prefer a check when there is something to probe."
2552
+ "Count the unit ready once it runs, without probing anything; a service once it has run half a second. A dev server whose program crashed under a file watcher still counts as ready, so prefer a check when there is something to probe."
2553
2553
  ],
2554
2554
  "type": "string"
2555
2555
  },
@@ -2965,7 +2965,7 @@
2965
2965
  "type": "null"
2966
2966
  }
2967
2967
  ],
2968
- "description": "Command to run: a string runs through `/bin/sh -c` (pipes and multi-line scripts work), a list runs the program directly with those arguments. Use exactly one of `run`, `run_script` or `steps`.",
2968
+ "description": "Command to run: a string runs through `/bin/sh -c` (pipes and multi-line scripts work), a list runs the program directly with those arguments. Use exactly one of `run`, `run_script` or `steps`. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`.",
2969
2969
  "examples": [
2970
2970
  "pnpm dev",
2971
2971
  [
@@ -2975,7 +2975,7 @@
2975
2975
  "${{ self.port }}"
2976
2976
  ]
2977
2977
  ],
2978
- "markdownDescription": "Command to run: a string runs through `/bin/sh -c` (pipes and multi-line scripts work), a list runs the program directly with those arguments. Use exactly one of `run`, `run_script` or `steps`."
2978
+ "markdownDescription": "Command to run: a string runs through `/bin/sh -c` (pipes and multi-line scripts work), a list runs the program directly with those arguments. Use exactly one of `run`, `run_script` or `steps`. In a list, an item that is one `${{ }}` expression giving a number or `true`/`false` becomes its text, such as `--port` followed by `${{ self.port }}`."
2979
2979
  },
2980
2980
  "run_script": {
2981
2981
  "anyOf": [