@owlmeans/server-app 0.1.18-rc.5 → 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.
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-app",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-08-
|
|
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.
|
|
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,
|
|
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 `
|
|
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 {
|
|
34
|
+
import { appEntrypoints } from './entrypoints.js'
|
|
35
35
|
|
|
36
36
|
const context = makeContext(config)
|
|
37
|
-
main<{}, Config, Context>(context,
|
|
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
|
-
###
|
|
62
|
+
### Entrypoint elevation
|
|
63
63
|
```typescript
|
|
64
|
-
|
|
65
|
-
import {
|
|
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(
|
|
69
|
-
elevate(
|
|
69
|
+
elevate(managerEntrypoints, manager.back.project.create, create)
|
|
70
|
+
elevate(managerEntrypoints, manager.back.project.list, list)
|
|
70
71
|
|
|
71
|
-
export const
|
|
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
|
-
- `
|
|
82
|
+
- `fastify` (server runtime — the HTTP server is created by `@owlmeans/server-api`; there is no Express here)
|
package/build/context.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/build/context.js.map
CHANGED
|
@@ -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,
|
|
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,YAAqB,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,oBAAoB,CAAO,OAAO,EAAE,UAAU,CAAC,CAAA;QAC/C,iBAAiB,CAAO,OAAO,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,SAAS,CAAQ,CAAA;IAE/D,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
package/build/main.d.ts.map
CHANGED
|
@@ -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,
|
|
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.
|
|
3
|
+
"version": "0.1.18-rc.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/api": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/client-config": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
29
|
-
"@owlmeans/kluster": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/server-auth": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/server-route": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/server-socket": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/static-resource": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/api": "^0.1.18-rc.6",
|
|
25
|
+
"@owlmeans/client-config": "^0.1.18-rc.6",
|
|
26
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.6",
|
|
27
|
+
"@owlmeans/config": "^0.1.18-rc.6",
|
|
28
|
+
"@owlmeans/context": "^0.1.18-rc.6",
|
|
29
|
+
"@owlmeans/kluster": "^0.1.18-rc.6",
|
|
30
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.6",
|
|
31
|
+
"@owlmeans/route": "^0.1.18-rc.6",
|
|
32
|
+
"@owlmeans/server-api": "^0.1.18-rc.8",
|
|
33
|
+
"@owlmeans/server-auth": "^0.1.18-rc.8",
|
|
34
|
+
"@owlmeans/server-context": "^0.1.18-rc.6",
|
|
35
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.6",
|
|
36
|
+
"@owlmeans/server-route": "^0.1.18-rc.6",
|
|
37
|
+
"@owlmeans/server-socket": "^0.1.18-rc.8",
|
|
38
|
+
"@owlmeans/static-resource": "^0.1.18-rc.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@owlmeans/dep-config": "workspace:*",
|