@shivaedev/server 0.38.1 → 0.38.3

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.38.3 - 2026-11-20
4
+
5
+ ### Changed
6
+
7
+ - `migrationsIn` fails with that message when the directory it is given has no `migrations` folder.
8
+
9
+ ## 0.38.2 - 2026-11-20
10
+
11
+ ### Changed
12
+
13
+ - Update `@shivaedev/admin` from 0.27.1 to 0.27.2.
14
+ - Update `@shivaedev/contract` from 0.51.0 to 0.52.0.
15
+ - Update `@shivaedev/identity` from 0.34.2 to 0.35.0.
16
+
3
17
  ## 0.38.1 - 2026-11-20
4
18
 
5
19
  ### Changed
package/README.md CHANGED
@@ -84,7 +84,7 @@ Host option types include this HTTP-only shape. A wrapper that reads native RPC
84
84
 
85
85
  `appHost` is the server entry point for an Effect app. For a PostgreSQL app, supply the native RPC group, handler and service Layers, migration loader, session policy and static asset directory. The host completes migrations before acquiring application services, starts Node HTTP with native Effect RPC over a WebSocket upgrade at `/rpc`, and provides SQL, Reactivity and `LiveServer` from `@shivaedev/contract/live-server/service.ts` to those Layers.
86
86
 
87
- For feature modules, install the optional peer `@shivaedev/admin` and declare each registration with `satisfies AppModule` from `@shivaedev/server/AppModule.ts`. Each module supplies its operations, `services` and, when it owns tables, `migrations: { loader, components? }`; a module without migrations leaves the field out. A defined module takes its name from the module itself and its registration gives none, so the two cannot disagree; a `group` plus `handlers` registration supplies a `name`, because nothing else names it. `migrationsIn(directory)` from `@shivaedev/server/adapters/migrationsIn.ts` returns `{ loader }` for the `migrations` folder in `directory`, found by `migrationsFromDirectory` from `@shivaedev/sql/migrationsFromDirectory.ts` under Node's `NodeServices.layer`, so a registration writes `migrations: migrationsIn(import.meta.dirname)` and needs the optional peer `@effect/platform-node`. Register caller-dependent Layers in the optional `requestServices` slot beside global `services`. Keep default adapters in its optional `ports` Layer, put an optional `registerAdmin` result in `admin`, and declare owned `queues` and a `workers` Layer on the module. `jobModule` from `@shivaedev/jobs/server/jobModule.ts` supplies those two fields from a jobs registration list.
87
+ For feature modules, install the optional peer `@shivaedev/admin` and declare each registration with `satisfies AppModule` from `@shivaedev/server/AppModule.ts`. Each module supplies its operations, `services` and, when it owns tables, `migrations: { loader, components? }`; a module without migrations leaves the field out. A defined module takes its name from the module itself and its registration gives none, so the two cannot disagree; a `group` plus `handlers` registration supplies a `name`, because nothing else names it. `migrationsIn(directory)` from `@shivaedev/server/adapters/migrationsIn.ts` takes the folder that contains `migrations`, the same argument as `loadMigrationsIn` from `@shivaedev/sql/loadMigrationsIn.ts`, and returns `{ loader }` for the `migrations` folder in it, found by `loadMigrationsIn` under Node's `NodeServices.layer`, so a registration beside its `migrations` folder writes `migrations: migrationsIn(import.meta.dirname)` and needs the optional peer `@effect/platform-node`. Register caller-dependent Layers in the optional `requestServices` slot beside global `services`. Keep default adapters in its optional `ports` Layer, put an optional `registerAdmin` result in `admin`, and declare owned `queues` and a `workers` Layer on the module. `jobModule` from `@shivaedev/jobs/server/jobModule.ts` supplies those two fields from a jobs registration list.
88
88
 
89
89
  ```ts
90
90
  import { Effect } from "effect";
@@ -1,8 +1,8 @@
1
1
  import * as NodeServices from "@effect/platform-node/NodeServices";
2
2
  import { Effect } from "effect";
3
- import { migrationsFromDirectory } from "@shivaedev/sql/migrationsFromDirectory.ts";
3
+ import { loadMigrationsIn } from "@shivaedev/sql/loadMigrationsIn.ts";
4
4
  // Node supplies the file system here, so a registration's migrations need nothing from the host that runs them.
5
5
  export function migrationsIn(directory) {
6
- return { loader: migrationsFromDirectory(directory).pipe(Effect.provide(NodeServices.layer)) };
6
+ return { loader: loadMigrationsIn(directory).pipe(Effect.provide(NodeServices.layer)) };
7
7
  }
8
8
  //# sourceMappingURL=migrationsIn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrationsIn.js","sourceRoot":"","sources":["../../src/adapters/migrationsIn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,gHAAgH;AAChH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC7C,OAAO,EAAE,MAAM,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AAChG,CAAC"}
1
+ {"version":3,"file":"migrationsIn.js","sourceRoot":"","sources":["../../src/adapters/migrationsIn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,gHAAgH;AAChH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC7C,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AACzF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/server",
3
- "version": "0.38.1",
3
+ "version": "0.38.3",
4
4
  "description": "The Effect application host: HTTP and RPC serving, health, OTLP export, database and migrations, and development mode",
5
5
  "keywords": [
6
6
  "effect"
@@ -47,26 +47,26 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@shivaedev/changes": "0.14.1",
50
- "@shivaedev/contract": "0.51.0",
51
- "@shivaedev/errors": "0.14.0",
52
- "@shivaedev/http": "0.9.1",
53
- "@shivaedev/identity": "0.34.2",
50
+ "@shivaedev/contract": "0.53.0",
51
+ "@shivaedev/errors": "0.14.1",
52
+ "@shivaedev/http": "0.9.2",
53
+ "@shivaedev/identity": "0.36.0",
54
54
  "@shivaedev/local-postgres": "0.16.2",
55
- "@shivaedev/sql": "0.52.0"
55
+ "@shivaedev/sql": "0.53.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@effect/platform-node": "4.1.4",
59
59
  "@effect/sql-pg": "4.1.4",
60
60
  "@effect/vitest": "4.1.4",
61
- "@shivaedev/access": "0.6.6",
62
- "@shivaedev/admin": "0.27.1",
63
- "@shivaedev/jobs": "0.43.1",
64
- "@shivaedev/quality": "0.79.0",
65
- "@shivaedev/rate-limit": "0.6.15",
61
+ "@shivaedev/access": "0.7.0",
62
+ "@shivaedev/admin": "0.27.3",
63
+ "@shivaedev/jobs": "0.43.2",
64
+ "@shivaedev/quality": "0.81.1",
65
+ "@shivaedev/rate-limit": "0.7.0",
66
66
  "@shivaedev/service": "0.9.2",
67
- "@shivaedev/test-kits": "0.13.6",
68
- "@shivaedev/test-sql": "0.25.5",
69
- "@shivaedev/test-story": "0.50.0",
67
+ "@shivaedev/test-kits": "0.14.0",
68
+ "@shivaedev/test-sql": "0.25.6",
69
+ "@shivaedev/test-story": "0.50.2",
70
70
  "@types/node": "24.19.2",
71
71
  "better-auth": "1.7.22",
72
72
  "effect": "4.1.4",
@@ -78,7 +78,7 @@
78
78
  "@effect/platform-node": "4.1.4",
79
79
  "@effect/sql-pg": "4.1.4",
80
80
  "@effect/vitest": "4.1.4",
81
- "@shivaedev/admin": "0.27.1",
81
+ "@shivaedev/admin": "0.27.3",
82
82
  "better-auth": "1.7.22",
83
83
  "effect": "4.1.4"
84
84
  },
@@ -1,8 +1,8 @@
1
1
  import * as NodeServices from "@effect/platform-node/NodeServices";
2
2
  import { Effect } from "effect";
3
- import { migrationsFromDirectory } from "@shivaedev/sql/migrationsFromDirectory.ts";
3
+ import { loadMigrationsIn } from "@shivaedev/sql/loadMigrationsIn.ts";
4
4
 
5
5
  // Node supplies the file system here, so a registration's migrations need nothing from the host that runs them.
6
6
  export function migrationsIn(directory: string) {
7
- return { loader: migrationsFromDirectory(directory).pipe(Effect.provide(NodeServices.layer)) };
7
+ return { loader: loadMigrationsIn(directory).pipe(Effect.provide(NodeServices.layer)) };
8
8
  }