reylo-effect 0.5.0 → 0.5.1
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/CHANGELOG.md +6 -0
- package/README.md +13 -0
- package/SPEC.md +2 -0
- package/dist/esbuild.js +1 -1
- package/dist/mapper.js +1 -1
- package/dist/register.js +1 -1
- package/dist/vite.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.1 — 2026-10-26
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Workspace members inherit the workspace root's `.reylo.yaml`. A package listed by `workspaces` in the root `package.json` (npm, Yarn, Bun) or by `pnpm-workspace.yaml` that has no project file of its own now searches past its `package.json` up to the workspace root, so one root file (for example `schema: [migrations/*.sql]`) configures every member without per-package copies or `REYLO_CONFIG`. A member's own or nested `.reylo.yaml` still wins, and the content mapper watches each directory up to the root for one being added.
|
|
8
|
+
|
|
3
9
|
## 0.5.0 — 2026-10-26
|
|
4
10
|
|
|
5
11
|
### Breaking
|
package/README.md
CHANGED
|
@@ -102,6 +102,19 @@ direct_url: postgres://localhost/app
|
|
|
102
102
|
|
|
103
103
|
Analysis results are cached in `.reylo/` and refreshed when SQL or schema changes. Analysis never migrates the application database.
|
|
104
104
|
|
|
105
|
+
### Workspaces
|
|
106
|
+
|
|
107
|
+
A query uses the nearest `.reylo.yaml` at or above it, up to its package's `package.json`. A workspace member — a package that `workspaces` in the root `package.json` (npm, Yarn, Bun) or `pnpm-workspace.yaml` lists — keeps looking up to the workspace root, so one root file configures every member:
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
# .reylo.yaml at the workspace root
|
|
111
|
+
schema:
|
|
112
|
+
- migrations/*.sql
|
|
113
|
+
direct_url: file:./dev.db
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Paths in it resolve from the root, and `.reylo/` is written there. A `.reylo.yaml` inside a member, or nested deeper, still configures the queries under it. Engines and SQLite drivers are read from the root `package.json`.
|
|
117
|
+
|
|
105
118
|
### Migrations
|
|
106
119
|
|
|
107
120
|
`migrate(directory)` from `reylo-effect` applies pending `N_name.sql` files in numeric order and records them in `reylo_migrations`. Provide the SQL client and `NodeServices.layer`, as in the quick start.
|
package/SPEC.md
CHANGED
|
@@ -267,6 +267,8 @@ The unbundled loader is `node --import reylo-effect/register`. It resolves and l
|
|
|
267
267
|
|
|
268
268
|
Deployment modes are in [section 2.2](#22-deployment-modes).
|
|
269
269
|
|
|
270
|
+
A query's project file is the nearest `.reylo.yaml` or `.reylo.yml` at or above its directory, searched up to its package's `package.json`. A workspace member — a package listed by `workspaces` in its workspace root's `package.json` (npm and Bun patterns, or Yarn's `{ packages }`) or by `packages` in `pnpm-workspace.yaml`, after `!` exclusions — searches on up to that root; the nearest directory declaring a workspace is the root, and a `pnpm-workspace.yaml` there takes precedence over `package.json`. The file found configures the queries below it as its own directory's project: relative paths, `.env` files, and `.reylo/` resolve from that directory, and the engines and SQLite drivers its `package.json` lists apply. `REYLO_CONFIG` names one file for every query.
|
|
271
|
+
|
|
270
272
|
The analysis URL is `direct_url` in `.reylo.yaml`, else `DATABASE_URL`. With a URL, a session reads the schema fingerprint and analyzes live, falling back to `.reylo/` when the database cannot be reached. Cache-only analysis — `REYLO_OFFLINE=1` in the environment or `offline: true` in `.reylo.yaml`; the environment wins, and `REYLO_OFFLINE=0` turns it off — never opens a connection, not even for the fingerprint, and answers from `.reylo/` entries alone. A statement with no entry fails its import with a diagnostic that names the file. Schema-file sessions in cache-only mode read the schema files for their fingerprint but never load them into a database. Native JSON arguments need parameter descriptions that are not cached, so they fail in cache-only mode.
|
|
271
273
|
|
|
272
274
|
Production `register` deployments analyze in CI against a dedicated analysis database (populating `.reylo/`), ship `.reylo/` with the application, and run with `REYLO_OFFLINE=1`. A deployment that wants live analysis sets `direct_url` to a dedicated analysis database rather than relying on a production `DATABASE_URL`.
|
package/dist/esbuild.js
CHANGED
package/dist/mapper.js
CHANGED
package/dist/register.js
CHANGED
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reylo-effect",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Import .sql files as Effect queries checked against SQLite, Postgres, or MySQL.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"workspaces": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@effect/sql-d1": "4.0.6",
|
|
86
|
-
"reylo-effect-tooling": "0.5.
|
|
86
|
+
"reylo-effect-tooling": "0.5.1",
|
|
87
87
|
"vite": ">=8.0.0 <9.0.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|