devlanes 0.7.0 → 0.8.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 +77 -46
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlanes",
3
- "version": "0.7.0",
3
+ "version": "0.8.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.7.0",
34
- "@devlanes/darwin-x64": "0.7.0",
35
- "@devlanes/linux-arm64": "0.7.0",
36
- "@devlanes/linux-x64": "0.7.0",
37
- "@devlanes/win32-arm64": "0.7.0",
38
- "@devlanes/win32-x64": "0.7.0"
33
+ "@devlanes/darwin-arm64": "0.8.0",
34
+ "@devlanes/darwin-x64": "0.8.0",
35
+ "@devlanes/linux-arm64": "0.8.0",
36
+ "@devlanes/linux-x64": "0.8.0",
37
+ "@devlanes/win32-arm64": "0.8.0",
38
+ "@devlanes/win32-x64": "0.8.0"
39
39
  }
40
40
  }
package/schema.json CHANGED
@@ -737,11 +737,11 @@
737
737
  "type": "null"
738
738
  }
739
739
  ],
740
- "description": "Working directory, relative to the lane's worktree; defaults to the worktree root.",
740
+ "description": "Working directory, relative to the project file's directory in the lane's worktree; defaults to that directory.",
741
741
  "examples": [
742
742
  "infra"
743
743
  ],
744
- "markdownDescription": "Working directory, relative to the lane's worktree; defaults to the worktree root."
744
+ "markdownDescription": "Working directory, relative to the project file's directory in the lane's worktree; defaults to that directory."
745
745
  },
746
746
  "env": {
747
747
  "additionalProperties": {
@@ -1340,7 +1340,7 @@
1340
1340
  },
1341
1341
  "LanesConfig": {
1342
1342
  "additionalProperties": false,
1343
- "description": "Each Git worktree of the project is a lane with its own ports, hostnames and data. These settings decide which worktrees get a lane, where new ones are created, how many ports each lane reserves, and the values each lane computes.",
1343
+ "description": "Each Git worktree of the project is a lane with its own ports, hostnames and data. These settings decide which worktrees get a lane, how many ports each lane reserves, and the values each lane computes.",
1344
1344
  "examples": [
1345
1345
  {
1346
1346
  "hosts_file": "always",
@@ -1350,7 +1350,7 @@
1350
1350
  }
1351
1351
  }
1352
1352
  ],
1353
- "markdownDescription": "Each Git worktree of the project is a lane with its own ports, hostnames and data. These settings decide which worktrees get a lane, where new ones are created, how many ports each lane reserves, and the values each lane computes.",
1353
+ "markdownDescription": "Each Git worktree of the project is a lane with its own ports, hostnames and data. These settings decide which worktrees get a lane, how many ports each lane reserves, and the values each lane computes.",
1354
1354
  "properties": {
1355
1355
  "block_size": {
1356
1356
  "anyOf": [
@@ -1463,20 +1463,20 @@
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 or `devlanes lane new` creates 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 devlanes 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 or `devlanes lane new` creates 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 devlanes runs in it, not merely because it exists."
1473
1473
  },
1474
1474
  "primary": {
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`.",
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.",
1476
1476
  "examples": [
1477
1477
  "main"
1478
1478
  ],
1479
- "markdownDescription": "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`.",
1479
+ "markdownDescription": "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.",
1480
1480
  "type": [
1481
1481
  "string",
1482
1482
  "null"
@@ -1519,24 +1519,6 @@
1519
1519
  ],
1520
1520
  "markdownDescription": "Values computed for each lane and read as `${{ lane.<name> }}`, such as a database name, vhost, bucket or Redis index per lane. A var named `domain` replaces the default lane domain, and one named `port` fixes where the lane's port block starts. Cannot be combined with `matrix`.",
1521
1521
  "type": "object"
1522
- },
1523
- "worktree_dir": {
1524
- "anyOf": [
1525
- {
1526
- "$ref": "#/$defs/Templated_string",
1527
- "description": "",
1528
- "examples": [],
1529
- "markdownDescription": ""
1530
- },
1531
- {
1532
- "type": "null"
1533
- }
1534
- ],
1535
- "description": "Directory where `devlanes lane new` creates worktrees, relative to the project directory of the primary worktree. Defaults to `../<project>-lanes`. Expressions can only use `project.*` here.",
1536
- "examples": [
1537
- "../${{ project.name }}-lanes"
1538
- ],
1539
- "markdownDescription": "Directory where `devlanes lane new` creates worktrees, relative to the project directory of the primary worktree. Defaults to `../<project>-lanes`. Expressions can only use `project.*` here."
1540
1522
  }
1541
1523
  },
1542
1524
  "type": "object"
@@ -1738,6 +1720,34 @@
1738
1720
  },
1739
1721
  "type": "object"
1740
1722
  },
1723
+ "ProjectExtends": {
1724
+ "anyOf": [
1725
+ {
1726
+ "type": "string"
1727
+ },
1728
+ {
1729
+ "items": {
1730
+ "description": "Project files merged in order, later ones winning.",
1731
+ "examples": [
1732
+ "devlanes.yaml",
1733
+ "devlanes.shared.yaml"
1734
+ ],
1735
+ "markdownDescription": "Project files merged in order, later ones winning.",
1736
+ "type": "string"
1737
+ },
1738
+ "type": "array"
1739
+ }
1740
+ ],
1741
+ "description": "Project file, or files merged in order, that a project file builds on.",
1742
+ "examples": [
1743
+ "devlanes.yaml",
1744
+ [
1745
+ "devlanes.yaml",
1746
+ "devlanes.shared.yaml"
1747
+ ]
1748
+ ],
1749
+ "markdownDescription": "Project file, or files merged in order, that a project file builds on."
1750
+ },
1741
1751
  "ReadyCheck": {
1742
1752
  "additionalProperties": false,
1743
1753
  "description": "Readiness probe: exactly one of `tcp`, `http`, `log` or `cmd`, retried until it passes or `timeout` runs out.",
@@ -1895,7 +1905,7 @@
1895
1905
  ],
1896
1906
  "enumDescriptions": [
1897
1907
  "Stop the lane's processes; once nothing runs, the lane is cleaned.",
1898
- "Clean the lane right away: stop its processes, run `lane.clean` tasks and `infra.teardown`, and free its index and ports."
1908
+ "Clean the lane right away: stop its processes, remove its own containers and free its index and ports. `lane.clean` tasks and `infra.teardown` need the folder to run in, so they are skipped; data they would drop from shared containers stays."
1899
1909
  ],
1900
1910
  "examples": [
1901
1911
  "stop",
@@ -1904,7 +1914,7 @@
1904
1914
  "markdownDescription": "What happens to a running lane whose worktree folder is deleted.",
1905
1915
  "markdownEnumDescriptions": [
1906
1916
  "Stop the lane's processes; once nothing runs, the lane is cleaned.",
1907
- "Clean the lane right away: stop its processes, run `lane.clean` tasks and `infra.teardown`, and free its index and ports."
1917
+ "Clean the lane right away: stop its processes, remove its own containers and free its index and ports. `lane.clean` tasks and `infra.teardown` need the folder to run in, so they are skipped; data they would drop from shared containers stays."
1908
1918
  ],
1909
1919
  "type": "string"
1910
1920
  },
@@ -1957,13 +1967,13 @@
1957
1967
  "markdownDescription": "Script from a project file, as a mapping with `file` and `name`. devlanes picks the tool from the file name: package.json (the project's package manager), Makefile or `*.mk`, justfile or `*.just`, deno.json, pyproject.toml (uv or poetry) and Cargo.toml (a binary). In `devlanes.local.yaml` or a service that `extends` a template, either key can be left out to keep the inherited one.",
1958
1968
  "properties": {
1959
1969
  "file": {
1960
- "description": "File that defines the script, relative to the worktree, such as `apps/api/package.json`. The script runs in this file's directory. Required unless an override or `extends` child keeps the inherited file.",
1970
+ "description": "File that defines the script, relative to the project file's directory, such as `apps/api/package.json`. The script runs in this file's directory. Required unless an override or `extends` child keeps the inherited file.",
1961
1971
  "examples": [
1962
1972
  "apps/api/package.json",
1963
1973
  "Makefile",
1964
1974
  "justfile"
1965
1975
  ],
1966
- "markdownDescription": "File that defines the script, relative to the worktree, such as `apps/api/package.json`. The script runs in this file's directory. Required unless an override or `extends` child keeps the inherited file.",
1976
+ "markdownDescription": "File that defines the script, relative to the project file's directory, such as `apps/api/package.json`. The script runs in this file's directory. Required unless an override or `extends` child keeps the inherited file.",
1967
1977
  "type": "string"
1968
1978
  },
1969
1979
  "name": {
@@ -2129,11 +2139,11 @@
2129
2139
  "type": "null"
2130
2140
  }
2131
2141
  ],
2132
- "description": "Directory `run` starts in, relative to the lane's worktree; defaults to the worktree root. Platform detection also looks here. Cannot be combined with `run_script`, which runs in the script file's directory; `devlanes config check` refuses the pair, including a `cwd` inherited through `extends`.",
2142
+ "description": "Directory `run` starts in, relative to the project file's directory in the lane's worktree; defaults to that directory. Platform detection also looks here. Cannot be combined with `run_script`, which runs in the script file's directory; `devlanes config check` refuses the pair, including a `cwd` inherited through `extends`.",
2133
2143
  "examples": [
2134
2144
  "apps/api"
2135
2145
  ],
2136
- "markdownDescription": "Directory `run` starts in, relative to the lane's worktree; defaults to the worktree root. Platform detection also looks here. Cannot be combined with `run_script`, which runs in the script file's directory; `devlanes config check` refuses the pair, including a `cwd` inherited through `extends`."
2146
+ "markdownDescription": "Directory `run` starts in, relative to the project file's directory in the lane's worktree; defaults to that directory. Platform detection also looks here. Cannot be combined with `run_script`, which runs in the script file's directory; `devlanes config check` refuses the pair, including a `cwd` inherited through `extends`."
2137
2147
  },
2138
2148
  "env": {
2139
2149
  "additionalProperties": {
@@ -2155,11 +2165,11 @@
2155
2165
  "type": "object"
2156
2166
  },
2157
2167
  "extends": {
2158
- "description": "Template under `templates` whose settings this service inherits; its own settings apply on top. Mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates and are resolved after devlanes.local.yaml is merged.",
2168
+ "description": "Template under `templates` whose settings this service inherits; its own settings apply on top. Mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates and are resolved after every project file and local override is merged.",
2159
2169
  "examples": [
2160
2170
  "fastify-api"
2161
2171
  ],
2162
- "markdownDescription": "Template under `templates` whose settings this service inherits; its own settings apply on top. Mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates and are resolved after devlanes.local.yaml is merged.",
2172
+ "markdownDescription": "Template under `templates` whose settings this service inherits; its own settings apply on top. Mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates and are resolved after every project file and local override is merged.",
2163
2173
  "type": [
2164
2174
  "string",
2165
2175
  "null"
@@ -2603,11 +2613,11 @@
2603
2613
  "properties": {
2604
2614
  "from": {
2605
2615
  "$ref": "#/$defs/Templated_string",
2606
- "description": "Folder to copy, relative to the lane's worktree.",
2616
+ "description": "Folder to copy, relative to the project file's directory in the lane's worktree.",
2607
2617
  "examples": [
2608
2618
  "apps/extension/.output/chrome-mv3"
2609
2619
  ],
2610
- "markdownDescription": "Folder to copy, relative to the lane's worktree."
2620
+ "markdownDescription": "Folder to copy, relative to the project file's directory in the lane's worktree."
2611
2621
  },
2612
2622
  "ignore": {
2613
2623
  "default": [],
@@ -2640,11 +2650,11 @@
2640
2650
  "type": "null"
2641
2651
  }
2642
2652
  ],
2643
- "description": "Local destination; `~/` is your home and other relative paths start at the worktree. Defaults to `~/devlanes/sync/<project>/<lane>/<folder>`. Machines connected with `devlanes remote connect` ignore it and use their own path.",
2653
+ "description": "Local destination; `~/` is your home and other relative paths start at the project file's directory. Defaults to `~/devlanes/sync/<project>/<lane>/<folder>`. Machines connected with `devlanes remote connect` ignore it and use their own path.",
2644
2654
  "examples": [
2645
2655
  "~/devlanes/sync/acme/${{ lane.name }}/chrome-mv3"
2646
2656
  ],
2647
- "markdownDescription": "Local destination; `~/` is your home and other relative paths start at the worktree. Defaults to `~/devlanes/sync/<project>/<lane>/<folder>`. Machines connected with `devlanes remote connect` ignore it and use their own path."
2657
+ "markdownDescription": "Local destination; `~/` is your home and other relative paths start at the project file's directory. Defaults to `~/devlanes/sync/<project>/<lane>/<folder>`. Machines connected with `devlanes remote connect` ignore it and use their own path."
2648
2658
  }
2649
2659
  },
2650
2660
  "required": [
@@ -2857,11 +2867,11 @@
2857
2867
  "type": "null"
2858
2868
  }
2859
2869
  ],
2860
- "description": "Working directory for `run`, relative to the lane's worktree; defaults to the worktree root. Cannot be combined with `run_script`, which runs in the script file's directory.",
2870
+ "description": "Working directory for `run`, relative to the project file's directory in the lane's worktree; defaults to that directory. Cannot be combined with `run_script`, which runs in the script file's directory.",
2861
2871
  "examples": [
2862
2872
  "apps/api"
2863
2873
  ],
2864
- "markdownDescription": "Working directory for `run`, relative to the lane's worktree; defaults to the worktree root. Cannot be combined with `run_script`, which runs in the script file's directory."
2874
+ "markdownDescription": "Working directory for `run`, relative to the project file's directory in the lane's worktree; defaults to that directory. Cannot be combined with `run_script`, which runs in the script file's directory."
2865
2875
  },
2866
2876
  "env": {
2867
2877
  "additionalProperties": {
@@ -3234,6 +3244,28 @@
3234
3244
  ],
3235
3245
  "markdownDescription": "devlanes project config. Run a dev environment per git worktree, side by side. https://devlanes.run",
3236
3246
  "properties": {
3247
+ "extends": {
3248
+ "anyOf": [
3249
+ {
3250
+ "$ref": "#/$defs/ProjectExtends",
3251
+ "description": "",
3252
+ "examples": [],
3253
+ "markdownDescription": ""
3254
+ },
3255
+ {
3256
+ "type": "null"
3257
+ }
3258
+ ],
3259
+ "description": "Other project files this one builds on: one path or a list, relative to this file, such as `devlanes.yaml` for a `devlanes.prod.yaml` that runs the same apps another way. They are merged in order, each with its own `.local.yaml`, then this file and its `.local.yaml` go last, so later files win. Mappings merge by key and lists and single values replace, as with local overrides. An extended file may be partial and its `project` is ignored; paths in it mean what they would in this file.",
3260
+ "examples": [
3261
+ "devlanes.yaml",
3262
+ [
3263
+ "devlanes.yaml",
3264
+ "devlanes.shared.yaml"
3265
+ ]
3266
+ ],
3267
+ "markdownDescription": "Other project files this one builds on: one path or a list, relative to this file, such as `devlanes.yaml` for a `devlanes.prod.yaml` that runs the same apps another way. They are merged in order, each with its own `.local.yaml`, then this file and its `.local.yaml` go last, so later files win. Mappings merge by key and lists and single values replace, as with local overrides. An extended file may be partial and its `project` is ignored; paths in it mean what they would in this file."
3268
+ },
3237
3269
  "global_env": {
3238
3270
  "additionalProperties": {
3239
3271
  "$ref": "#/$defs/Templated_Scalar",
@@ -3290,10 +3322,9 @@
3290
3322
  "new_worktrees": null,
3291
3323
  "primary": null,
3292
3324
  "removed_worktrees": null,
3293
- "vars": {},
3294
- "worktree_dir": null
3325
+ "vars": {}
3295
3326
  },
3296
- "description": "Which worktrees get a lane, where new worktrees are created, how many ports each lane reserves, and values computed per lane (`lane.<name>`).",
3327
+ "description": "Which worktrees get a lane, how many ports each lane reserves, and values computed per lane (`lane.<name>`).",
3297
3328
  "examples": [
3298
3329
  {
3299
3330
  "hosts_file": "always",
@@ -3303,7 +3334,7 @@
3303
3334
  }
3304
3335
  }
3305
3336
  ],
3306
- "markdownDescription": "Which worktrees get a lane, where new worktrees are created, how many ports each lane reserves, and values computed per lane (`lane.<name>`)."
3337
+ "markdownDescription": "Which worktrees get a lane, how many ports each lane reserves, and values computed per lane (`lane.<name>`)."
3307
3338
  },
3308
3339
  "profiles": {
3309
3340
  "additionalProperties": {
@@ -3461,7 +3492,7 @@
3461
3492
  "markdownDescription": "A long-running process started with the lane, such as a dev server or a worker. Each service gets its own port from the lane's block (`PORT`, `${{ self.port }}`); devlanes stops it with the lane and never restarts it when it exits. A service needs `run` or `run_script`, directly or through `extends`."
3462
3493
  },
3463
3494
  "default": {},
3464
- "description": "Named service settings that services reuse with `extends: <template>`. The service inherits every setting of the template and its own settings win: mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates, are never started themselves, and are applied after `devlanes.local.yaml` is merged.",
3495
+ "description": "Named service settings that services reuse with `extends: <template>`. The service inherits every setting of the template and its own settings win: mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates, are never started themselves, and are applied after every project file and local override is merged.",
3465
3496
  "examples": [
3466
3497
  {
3467
3498
  "fastify-api": {
@@ -3477,7 +3508,7 @@
3477
3508
  }
3478
3509
  }
3479
3510
  ],
3480
- "markdownDescription": "Named service settings that services reuse with `extends: <template>`. The service inherits every setting of the template and its own settings win: mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates, are never started themselves, and are applied after `devlanes.local.yaml` is merged.",
3511
+ "markdownDescription": "Named service settings that services reuse with `extends: <template>`. The service inherits every setting of the template and its own settings win: mappings (`env`, `ready`, `stop`, preset options, `run_script`) merge by key, lists (`tags`, `hosts`, `sync`) and single values replace. Setting `run` or `run_script` drops the inherited other one, and one `ready` probe (`tcp`, `http`, `log`, `cmd`) drops the inherited probe. Templates may extend other templates, are never started themselves, and are applied after every project file and local override is merged.",
3481
3512
  "type": "object"
3482
3513
  }
3483
3514
  },