@owlmeans/server-app 0.1.18-rc.6 → 0.1.18-rc.8

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-app",
4
- "version": "0.1.18-rc.6",
5
- "generatedAt": "2026-08-18T14:48:00.528Z",
4
+ "version": "0.1.18-rc.7",
5
+ "generatedAt": "2026-08-21T09:53:56.642Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,19 +8,19 @@ user-invocable: false
8
8
  # @owlmeans/server-app
9
9
 
10
10
  **Layer:** Server
11
- **Install:** `"@owlmeans/server-app": "^0.1.18-rc.6"` in `dependencies`
11
+ **Install:** `"@owlmeans/server-app": "^0.1.18-rc.7"` in `dependencies`
12
12
 
13
13
  ## Key Exports
14
14
 
15
15
  | Export | Description |
16
16
  |--------|-------------|
17
- | `main<E, C, T>(context, modules)` | Entry point — boots Express, registers all entrypoints as routes |
17
+ | `main<E, C, T>(context, entrypoints)` | Entry point — registers all entrypoints, configures/inits the context, then boots the Fastify API server (`@owlmeans/server-api`) |
18
18
  | `handleRequest(fn)` | Wrap an async function as a server handler `(req, context) => result` |
19
19
  | `handleBody<T>(fn)` | Wrap an async function with validated body — `(payload, context, req) => result` |
20
20
  | `elevate(modules, alias, handler)` | Attach a handler to an entrypoint declaration |
21
21
  | `celevate(modules, alias, handler)` | Conditional elevate — only if entrypoint exists |
22
22
  | `sservice(options, cfg)` | Register a server-side service entry in the config |
23
- | `modules` | Built-in system entrypoints — spread into `appModules` |
23
+ | `modules` | Built-in system entrypoints — spread into `appEntrypoints` |
24
24
  | `Context`, `Config`, `ClientEntrypoint` re-exports | Common types |
25
25
 
26
26
  ## Usage
@@ -31,10 +31,10 @@ user-invocable: false
31
31
  import { main } from '@owlmeans/server-app'
32
32
  import config from './config.js'
33
33
  import { makeContext } from './context.js'
34
- import { appModules } from './modules.js'
34
+ import { appEntrypoints } from './entrypoints.js'
35
35
 
36
36
  const context = makeContext(config)
37
- main<{}, Config, Context>(context, appModules)
37
+ main<{}, Config, Context>(context, appEntrypoints)
38
38
  ```
39
39
 
40
40
  ### Handlers
@@ -59,20 +59,24 @@ export const create = handleBody<CreateProject>(async (payload, context, req) =>
59
59
  })
60
60
  ```
61
61
 
62
- ### Module elevation
62
+ ### Entrypoint elevation
63
63
  ```typescript
64
- import { elevate, modules } from '@owlmeans/server-app'
65
- import { managerModules } from 'my-common'
64
+ // entrypoints.ts
65
+ import { elevate, modules as systemEntrypoints } from '@owlmeans/server-app'
66
+ import { managerEntrypoints } from 'my-common'
66
67
  import { create, list } from './app/project/index.js'
67
68
 
68
- elevate(managerModules, manager.back.project.create, create)
69
- elevate(managerModules, manager.back.project.list, list)
69
+ elevate(managerEntrypoints, manager.back.project.create, create)
70
+ elevate(managerEntrypoints, manager.back.project.list, list)
70
71
 
71
- export const appModules = [...modules, ...paymentModules, ...managerModules]
72
+ export const appEntrypoints = [...systemEntrypoints, ...paymentEntrypoints, ...managerEntrypoints]
72
73
  ```
73
74
 
75
+ A backend alias that carries only a `guard()`/`gate()` for its children still needs a **bare**
76
+ `elevate(entrypoints, alias)` — that is what makes the declaration a live server route group.
77
+
74
78
  ## Depends On
75
79
 
76
80
  - `@owlmeans/server-context`, `@owlmeans/server-entrypoint`, `@owlmeans/server-route`, `@owlmeans/server-api`
77
81
  - `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/auth`, `@owlmeans/error`
78
- - `express` / `fastify` (server runtime)
82
+ - `fastify` (server runtime — the HTTP server is created by `@owlmeans/server-api`; there is no Express here)
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAMvD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,cAAa,OAAO,MAkBnG,CAAA"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAMvD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,YAAW,OAAe,MAkB3G,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErF,MAAM,CAAC,MAAM,WAAW,GAAG,CAA+C,GAAM,EAAE,SAAS,GAAY,KAAK,EAAE,EAAE;IAC9G,MAAM,OAAO,GAAG,iBAAiB,CAAC,GAAG,CAAM,CAAA;IAE3C,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,mBAAmB,CAAO,OAAO,CAAC,CAAA;IAElC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,CAAC,CAAA;IAEpD,oBAAoB,CAAO,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QACnD,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AW,CAAC,GAAG,EAAE,SAAS,CAAQ,CAAA;IAE/D,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAIvD,eAAO,MAAM,IAAI,GAAU,CAAC,EAAE,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,OACnE,CAAC,WAAW,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,kBAK5D,CAAA"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAIvD,eAAO,MAAM,IAAI,GAAU,CAAC,EAAE,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,EACxE,KAAK,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,kBAK5D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-app",
3
- "version": "0.1.18-rc.6",
3
+ "version": "0.1.18-rc.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -29,12 +29,12 @@
29
29
  "@owlmeans/kluster": "^0.1.18-rc.6",
30
30
  "@owlmeans/entrypoint": "^0.1.18-rc.6",
31
31
  "@owlmeans/route": "^0.1.18-rc.6",
32
- "@owlmeans/server-api": "^0.1.18-rc.6",
33
- "@owlmeans/server-auth": "^0.1.18-rc.6",
32
+ "@owlmeans/server-api": "^0.1.18-rc.8",
33
+ "@owlmeans/server-auth": "^0.1.18-rc.8",
34
34
  "@owlmeans/server-context": "^0.1.18-rc.6",
35
35
  "@owlmeans/server-entrypoint": "^0.1.18-rc.6",
36
36
  "@owlmeans/server-route": "^0.1.18-rc.6",
37
- "@owlmeans/server-socket": "^0.1.18-rc.6",
37
+ "@owlmeans/server-socket": "^0.1.18-rc.8",
38
38
  "@owlmeans/static-resource": "^0.1.18-rc.6"
39
39
  },
40
40
  "devDependencies": {