@owlmeans/server-app 0.1.18-rc.15 → 0.1.18-rc.16
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/README.md +14 -11
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-app/SKILL.md +19 -10
- package/build/context.d.ts.map +1 -1
- package/build/context.js +0 -1
- package/build/context.js.map +1 -1
- package/build/entrypoints.d.ts +2 -0
- package/build/entrypoints.d.ts.map +1 -0
- package/build/entrypoints.js +4 -0
- package/build/entrypoints.js.map +1 -0
- package/build/exports.d.ts +3 -3
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +2 -2
- package/build/exports.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/main.d.ts +1 -1
- package/build/main.d.ts.map +1 -1
- package/build/main.js +2 -2
- package/build/main.js.map +1 -1
- package/package.json +16 -16
- package/src/context.ts +0 -2
- package/src/entrypoints.ts +4 -0
- package/src/exports.ts +3 -3
- package/src/index.ts +1 -1
- package/src/main.ts +2 -2
- package/build/modules.d.ts +0 -2
- package/build/modules.d.ts.map +0 -1
- package/build/modules.js +0 -4
- package/build/modules.js.map +0 -1
- package/src/modules.ts +0 -4
package/README.md
CHANGED
|
@@ -20,25 +20,26 @@ bun add @owlmeans/server-app
|
|
|
20
20
|
Bootstrap a backend service:
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
import { makeContext, main,
|
|
23
|
+
import { makeContext, main, entrypoints, config, service, AppType } from '@owlmeans/server-app'
|
|
24
24
|
|
|
25
25
|
const appConfig = config(
|
|
26
26
|
AppType.Backend,
|
|
27
27
|
'manager-api',
|
|
28
|
-
service({ service: '
|
|
29
|
-
{
|
|
28
|
+
service({ service: 'manager-api', host: process.env.API_HOST!, port: 3000 }),
|
|
29
|
+
{ port: 3000, dbs: [{ service: 'mongo', alias: 'mongo', host: process.env.MONGO_HOST!, port: 27017 }] }
|
|
30
30
|
)
|
|
31
31
|
|
|
32
32
|
const context = makeContext(appConfig)
|
|
33
|
-
await main(context, [...
|
|
33
|
+
await main(context, [...entrypoints, ...appEntrypoints])
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Elevate an entrypoint with a handler:
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
import { elevate, handleBody, guard, GUARD_ED25519
|
|
39
|
+
import { elevate, handleBody, guard, GUARD_ED25519 } from '@owlmeans/server-app'
|
|
40
|
+
import { appEntrypoints } from './entrypoints'
|
|
40
41
|
|
|
41
|
-
elevate(
|
|
42
|
+
elevate(appEntrypoints, 'project-create', handleBody<CreateProject>(async (payload, ctx) => {
|
|
42
43
|
return await (ctx as Context).project().create(payload)
|
|
43
44
|
}), guard(GUARD_ED25519))
|
|
44
45
|
```
|
|
@@ -62,19 +63,21 @@ Registers entrypoints, calls `configure().init()`, then starts the Fastify serve
|
|
|
62
63
|
| `celevate` | `@owlmeans/client-entrypoint` |
|
|
63
64
|
| `route` | `@owlmeans/route` |
|
|
64
65
|
| `broute` | `@owlmeans/server-route` |
|
|
65
|
-
| `filter`, `body`, `params`, `
|
|
66
|
+
| `filter`, `body`, `params`, `EntrypointOutcome` | `@owlmeans/entrypoint` |
|
|
66
67
|
| `config`, `service`, `sservice`, `toConfigRecord` | various config packages |
|
|
67
|
-
| `AppType`, `
|
|
68
|
+
| `AppType`, `BASE`, `assertContext` | `@owlmeans/context` |
|
|
68
69
|
| `DAUTH_GUARD` | `@owlmeans/server-auth` |
|
|
69
70
|
| `GUARD_ED25519`, `BED255_CASHE_RESOURCE` | `@owlmeans/auth-common` |
|
|
70
71
|
| `klusterize` | `@owlmeans/kluster` |
|
|
71
|
-
| `
|
|
72
|
+
| `createListSchema`, `filterObject` | `@owlmeans/resource` |
|
|
73
|
+
| `Request`, `Response`, `ClientEntrypoint`, `RefedEntrypointHandler` | type re-exports |
|
|
74
|
+
| `Criteria`, `ListOptions`, `ListQuery`, `ListResult`, `Sort` | type re-exports from `@owlmeans/resource` |
|
|
72
75
|
|
|
73
|
-
### `
|
|
76
|
+
### `entrypoints`
|
|
74
77
|
|
|
75
78
|
Default entrypoint array providing auth and API config routes. Spread into `main()`:
|
|
76
79
|
```typescript
|
|
77
|
-
await main(context, [...
|
|
80
|
+
await main(context, [...entrypoints, ...myEntrypoints])
|
|
78
81
|
```
|
|
79
82
|
|
|
80
83
|
## Related Packages
|
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-09-
|
|
4
|
+
"version": "0.1.18-rc.16",
|
|
5
|
+
"generatedAt": "2026-09-01T16:28:56.991Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: server-app
|
|
3
|
-
description: How to use @owlmeans/server-app — main() entry point, handleRequest()/handleBody() handler wrappers, elevate()/celevate() to attach handlers to
|
|
3
|
+
description: How to use @owlmeans/server-app — main() entry point, handleRequest()/handleBody() handler wrappers, elevate()/celevate() to attach handlers to entrypoint declarations, sservice() to register backend services. Auto-invoked when working with the server entry point or request handlers.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,20 +8,25 @@ 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.16"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
## Key Exports
|
|
14
14
|
|
|
15
15
|
| Export | Description |
|
|
16
16
|
|--------|-------------|
|
|
17
|
-
| `main<
|
|
17
|
+
| `main<R, C, T>(ctx, entrypoints)` | Entry point — registers all entrypoints, configures/inits the context, then boots the Fastify API server (`@owlmeans/server-api`) |
|
|
18
|
+
| `makeContext(cfg, customize?)` | Build the server context with API server, API client, sockets, static resource and auth appended |
|
|
18
19
|
| `handleRequest(fn)` | Wrap an async function as a server handler `(req, context) => result` |
|
|
19
20
|
| `handleBody<T>(fn)` | Wrap an async function with validated body — `(payload, context, req) => result` |
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
21
|
+
| `handleParams<T>(fn)` | The same, over validated URL params |
|
|
22
|
+
| `elevate(entrypoints, alias, handler?, opts?)` | Attach a handler to an entrypoint declaration |
|
|
23
|
+
| `celevate(entrypoints, alias, handler?, opts?)` | Make a declaration client-callable from the server side |
|
|
24
|
+
| `entrypoint(...)`, `guard(...)`, `route(...)`, `broute(...)` | Re-exported declaration builders |
|
|
25
|
+
| `filter`, `body`, `params`, `EntrypointOutcome` | Re-exported validators and the outcome enum |
|
|
22
26
|
| `sservice(options, cfg)` | Register a server-side service entry in the config |
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
27
|
+
| `holdApiPort(cfg, opts?)` | Own the app's port during boot |
|
|
28
|
+
| `entrypoints` | Built-in system entrypoints — spread into `appEntrypoints` |
|
|
29
|
+
| `Request`, `Response`, `Module`, `ClientEntrypoint`, `Criteria`, `ListResult`, `Sort` | Re-exported common types |
|
|
25
30
|
|
|
26
31
|
## Usage
|
|
27
32
|
|
|
@@ -52,17 +57,19 @@ export const list = handleRequest(async (req, context) => {
|
|
|
52
57
|
|
|
53
58
|
export const create = handleBody<CreateProject>(async (payload, context, req) => {
|
|
54
59
|
const ctx = context as Context
|
|
55
|
-
|
|
60
|
+
return await ctx.entrypoint<ClientEntrypoint<Project>>(agent.project.create).call({
|
|
56
61
|
body: { prompt: payload.prompt, entity: req.auth?.entityId }
|
|
57
62
|
})
|
|
58
|
-
return result
|
|
59
63
|
})
|
|
60
64
|
```
|
|
61
65
|
|
|
66
|
+
A cross-service call from a handler uses `call()` — it resolves to the value and throws whatever the
|
|
67
|
+
peer replied. Reach for `invoke()` only where the outcome decides what happens next.
|
|
68
|
+
|
|
62
69
|
### Entrypoint elevation
|
|
63
70
|
```typescript
|
|
64
71
|
// entrypoints.ts
|
|
65
|
-
import { elevate,
|
|
72
|
+
import { elevate, entrypoints as systemEntrypoints } from '@owlmeans/server-app'
|
|
66
73
|
import { managerEntrypoints } from 'my-common'
|
|
67
74
|
import { create, list } from './app/project/index.js'
|
|
68
75
|
|
|
@@ -74,6 +81,8 @@ export const appEntrypoints = [...systemEntrypoints, ...paymentEntrypoints, ...m
|
|
|
74
81
|
|
|
75
82
|
A backend alias that carries only a `guard()`/`gate()` for its children still needs a **bare**
|
|
76
83
|
`elevate(entrypoints, alias)` — that is what makes the declaration a live server route group.
|
|
84
|
+
Elevating is idempotent, so a later `elevate` of the same alias is legal and simply replaces the
|
|
85
|
+
element again; the guards it brings are added to the declared ones rather than replacing them.
|
|
77
86
|
|
|
78
87
|
## Depends On
|
|
79
88
|
|
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,MAgB3G,CAAA"}
|
package/build/context.js
CHANGED
|
@@ -15,7 +15,6 @@ export const makeContext = (cfg, customize = false) => {
|
|
|
15
15
|
appendStaticResource(context, AUTH_CACHE);
|
|
16
16
|
appendAuthService(context);
|
|
17
17
|
}
|
|
18
|
-
context.makeContext = cfg => makeContext(cfg, customize);
|
|
19
18
|
return context;
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=context.js.map
|
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,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,mEAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,WAAW,IAAI,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC,CAAA"}
|
package/build/exports.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export { config } from '@owlmeans/server-context';
|
|
|
2
2
|
export { sservice } from '@owlmeans/server-config';
|
|
3
3
|
export { addWebService } from '@owlmeans/client-config';
|
|
4
4
|
export { service, toConfigRecord, PLUGINS } from '@owlmeans/config';
|
|
5
|
-
export {
|
|
5
|
+
export { filter, body, params, EntrypointOutcome } from '@owlmeans/entrypoint';
|
|
6
6
|
export type { AbstractRequest as Request, AbstractResponse as Response } from '@owlmeans/entrypoint';
|
|
7
7
|
export { createListSchema, filterObject } from '@owlmeans/resource';
|
|
8
|
-
export type { ListResult } from '@owlmeans/resource';
|
|
9
|
-
export { AppType, BASE,
|
|
8
|
+
export type { Criteria, ListOptions, ListQuery, ListResult, Sort } from '@owlmeans/resource';
|
|
9
|
+
export { AppType, BASE, assertContext } from '@owlmeans/context';
|
|
10
10
|
export { elevate, entrypoint, guard } from '@owlmeans/server-entrypoint';
|
|
11
11
|
export { elevate as celevate } from '@owlmeans/client-entrypoint';
|
|
12
12
|
export type { ServerEntrypoint as Module, RefedEntrypointHandler } from '@owlmeans/server-entrypoint';
|
package/build/exports.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC9E,YAAY,EAAE,eAAe,IAAI,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpG,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACnE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACjE,YAAY,EAAE,gBAAgB,IAAI,MAAM,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACrG,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAC3F,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,aAAa,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/build/exports.js
CHANGED
|
@@ -2,9 +2,9 @@ export { config } from '@owlmeans/server-context';
|
|
|
2
2
|
export { sservice } from '@owlmeans/server-config';
|
|
3
3
|
export { addWebService } from '@owlmeans/client-config';
|
|
4
4
|
export { service, toConfigRecord, PLUGINS } from '@owlmeans/config';
|
|
5
|
-
export {
|
|
5
|
+
export { filter, body, params, EntrypointOutcome } from '@owlmeans/entrypoint';
|
|
6
6
|
export { createListSchema, filterObject } from '@owlmeans/resource';
|
|
7
|
-
export { AppType, BASE,
|
|
7
|
+
export { AppType, BASE, assertContext } from '@owlmeans/context';
|
|
8
8
|
export { elevate, entrypoint, guard } from '@owlmeans/server-entrypoint';
|
|
9
9
|
export { elevate as celevate } from '@owlmeans/client-entrypoint';
|
|
10
10
|
export { route as broute } from '@owlmeans/server-route';
|
package/build/exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE3F,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,aAAa,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,mBAAmB,YAAY,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,mBAAmB,YAAY,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AAEzB,cAAc,cAAc,CAAA;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AAEzB,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
|
package/build/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServerEntrypoint } from '@owlmeans/server-entrypoint';
|
|
2
2
|
import type { CommonEntrypoint } from '@owlmeans/entrypoint';
|
|
3
3
|
import type { AppContext, AppConfig } from './types.js';
|
|
4
|
-
export declare const main: <R, C extends AppConfig, T extends AppContext<C>>(ctx: T,
|
|
4
|
+
export declare const main: <R, C extends AppConfig, T extends AppContext<C>>(ctx: T, entrypoints: (CommonEntrypoint | ServerEntrypoint<R>)[]) => Promise<void>;
|
|
5
5
|
//# sourceMappingURL=main.d.ts.map
|
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,aAAa,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,kBAKhE,CAAA"}
|
package/build/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @TODO Remove or refactor request types. We actually don't use them and this make
|
|
2
2
|
// a mess with <R
|
|
3
|
-
export const main = async (ctx,
|
|
4
|
-
ctx.registerEntrypoints(
|
|
3
|
+
export const main = async (ctx, entrypoints) => {
|
|
4
|
+
ctx.registerEntrypoints(entrypoints);
|
|
5
5
|
await ctx.configure().init();
|
|
6
6
|
await ctx.getApiServer().listen();
|
|
7
7
|
};
|
package/build/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAMA,mFAAmF;AACnF,iBAAiB;AACjB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EACvB,GAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAMA,mFAAmF;AACnF,iBAAiB;AACjB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EACvB,GAAM,EAAE,WAAuD,EAC/D,EAAE;IACF,GAAG,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IACpC,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAA;IAC5B,MAAM,GAAG,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAA;AACnC,CAAC,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.16",
|
|
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.11",
|
|
25
|
+
"@owlmeans/client-config": "^0.1.18-rc.10",
|
|
26
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.11",
|
|
27
|
+
"@owlmeans/config": "^0.1.18-rc.10",
|
|
28
|
+
"@owlmeans/context": "^0.1.18-rc.7",
|
|
29
|
+
"@owlmeans/kluster": "^0.1.18-rc.10",
|
|
30
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.9",
|
|
31
|
+
"@owlmeans/route": "^0.1.18-rc.7",
|
|
32
|
+
"@owlmeans/server-api": "^0.1.18-rc.15",
|
|
33
|
+
"@owlmeans/server-auth": "^0.1.18-rc.16",
|
|
34
|
+
"@owlmeans/server-context": "^0.1.18-rc.10",
|
|
35
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.9",
|
|
36
|
+
"@owlmeans/server-route": "^0.1.18-rc.7",
|
|
37
|
+
"@owlmeans/server-socket": "^0.1.18-rc.16",
|
|
38
|
+
"@owlmeans/static-resource": "^0.1.18-rc.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@owlmeans/dep-config": "workspace:*",
|
package/src/context.ts
CHANGED
package/src/exports.ts
CHANGED
|
@@ -3,11 +3,11 @@ export { config } from '@owlmeans/server-context'
|
|
|
3
3
|
export { sservice } from '@owlmeans/server-config'
|
|
4
4
|
export { addWebService } from '@owlmeans/client-config'
|
|
5
5
|
export { service, toConfigRecord, PLUGINS } from '@owlmeans/config'
|
|
6
|
-
export {
|
|
6
|
+
export { filter, body, params, EntrypointOutcome } from '@owlmeans/entrypoint'
|
|
7
7
|
export type { AbstractRequest as Request, AbstractResponse as Response } from '@owlmeans/entrypoint'
|
|
8
8
|
export { createListSchema, filterObject } from '@owlmeans/resource'
|
|
9
|
-
export type { ListResult } from '@owlmeans/resource'
|
|
10
|
-
export { AppType, BASE,
|
|
9
|
+
export type { Criteria, ListOptions, ListQuery, ListResult, Sort } from '@owlmeans/resource'
|
|
10
|
+
export { AppType, BASE, assertContext } from '@owlmeans/context'
|
|
11
11
|
export { elevate, entrypoint, guard } from '@owlmeans/server-entrypoint'
|
|
12
12
|
export { elevate as celevate } from '@owlmeans/client-entrypoint'
|
|
13
13
|
export type { ServerEntrypoint as Module, RefedEntrypointHandler } from '@owlmeans/server-entrypoint'
|
package/src/index.ts
CHANGED
package/src/main.ts
CHANGED
|
@@ -7,9 +7,9 @@ import type { AppContext, AppConfig } from './types.js'
|
|
|
7
7
|
// @TODO Remove or refactor request types. We actually don't use them and this make
|
|
8
8
|
// a mess with <R
|
|
9
9
|
export const main = async <R, C extends AppConfig, T extends AppContext<C>>(
|
|
10
|
-
ctx: T,
|
|
10
|
+
ctx: T, entrypoints: (CommonEntrypoint | ServerEntrypoint<R>)[]
|
|
11
11
|
) => {
|
|
12
|
-
ctx.registerEntrypoints(
|
|
12
|
+
ctx.registerEntrypoints(entrypoints)
|
|
13
13
|
await ctx.configure().init()
|
|
14
14
|
await ctx.getApiServer().listen()
|
|
15
15
|
}
|
package/build/modules.d.ts
DELETED
package/build/modules.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,mEAA0B,CAAA"}
|
package/build/modules.js
DELETED
package/build/modules.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC,CAAA"}
|
package/src/modules.ts
DELETED