@owlmeans/server-context 0.1.18-rc.1 → 0.1.18-rc.10
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 +2 -2
- package/agent-meta/skills/server-context/SKILL.md +13 -10
- package/build/config.d.ts.map +1 -1
- package/build/context.d.ts.map +1 -1
- package/build/context.js +0 -1
- package/build/context.js.map +1 -1
- package/package.json +6 -6
- package/src/context.ts +0 -2
- package/build/.gitkeep +0 -0
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-context",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.10",
|
|
5
|
+
"generatedAt": "2026-09-01T16:28:56.990Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: server-context
|
|
3
|
-
description: How to use @owlmeans/server-context — server-side context factory (makeServerContext
|
|
3
|
+
description: How to use @owlmeans/server-context — server-side context factory (makeServerContext) used as the base in your server makeContext(). Auto-invoked when building a server context.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,30 +8,33 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/server-context
|
|
9
9
|
|
|
10
10
|
**Layer:** Server
|
|
11
|
-
**Install:** `"@owlmeans/server-context": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/server-context": "^0.1.18-rc.10"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
## Key Exports
|
|
14
14
|
|
|
15
15
|
| Export | Description |
|
|
16
16
|
|--------|-------------|
|
|
17
|
-
| `makeServerContext`
|
|
18
|
-
| `
|
|
19
|
-
|
|
|
17
|
+
| `makeServerContext` | Server context factory — the base your `makeContext` builds on |
|
|
18
|
+
| `ServerContext<C>` | Server-side Context interface |
|
|
19
|
+
| `ServerConfig`, `config()` | Server-specific config shape and its factory |
|
|
20
20
|
|
|
21
21
|
## Subpath Exports
|
|
22
22
|
|
|
23
|
-
- `./utils` — server context utilities
|
|
23
|
+
- `./utils` — server context utilities (`fileConfigReader`, the config-reading middleware)
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
|
-
A downstream `backend` package
|
|
27
|
+
A downstream `backend` package wraps `makeServerContext` and exports its own `makeContext`. It calls
|
|
28
|
+
the factory below it, applies its own idempotent `append*(context)` mixins and service
|
|
29
|
+
registrations, and returns that same context — the process gets one context, built once:
|
|
28
30
|
|
|
29
31
|
```typescript
|
|
30
32
|
// viable-backend/src/context.ts
|
|
31
|
-
import {
|
|
33
|
+
import { makeServerContext } from '@owlmeans/server-context'
|
|
34
|
+
import type { ServerConfig, ServerContext } from '@owlmeans/server-context'
|
|
32
35
|
|
|
33
|
-
export const makeBackendContext = <C extends
|
|
34
|
-
const context =
|
|
36
|
+
export const makeBackendContext = <C extends ServerConfig, T extends ServerContext<C>>(cfg: C): T => {
|
|
37
|
+
const context = makeServerContext<C, T>(cfg)
|
|
35
38
|
// ... register shared services
|
|
36
39
|
return context
|
|
37
40
|
}
|
package/build/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,YAAY,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,YAAY,EAAE,SAAS,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,CAKlF,CAAA"}
|
package/build/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAMxD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAMxD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAG,CAY9F,CAAA"}
|
package/build/context.js
CHANGED
|
@@ -6,7 +6,6 @@ import { authMiddleware, makeBasicEd25519Guard } from '@owlmeans/auth-common';
|
|
|
6
6
|
export const makeServerContext = (cfg) => {
|
|
7
7
|
const context = makeBasicContext(cfg);
|
|
8
8
|
context.registerMiddleware(fileConfigReader);
|
|
9
|
-
context.makeContext = makeServerContext;
|
|
10
9
|
appendConfigResource(context);
|
|
11
10
|
appendConfigResource(context, TRUSTED, TRUSTED);
|
|
12
11
|
appendConfigResource(context, PLUGINS, PLUGIN_RECORD);
|
package/build/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,E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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-context",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@owlmeans/client-config": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/server-config": "^0.1.18-rc.
|
|
31
|
+
"@owlmeans/client-config": "^0.1.18-rc.10",
|
|
32
|
+
"@owlmeans/config": "^0.1.18-rc.10",
|
|
33
|
+
"@owlmeans/context": "^0.1.18-rc.7",
|
|
34
|
+
"@owlmeans/route": "^0.1.18-rc.7",
|
|
35
|
+
"@owlmeans/server-config": "^0.1.18-rc.10"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@owlmeans/dep-config": "workspace:*",
|
package/src/context.ts
CHANGED
|
@@ -10,8 +10,6 @@ export const makeServerContext = <C extends ServerConfig, T extends ServerContex
|
|
|
10
10
|
|
|
11
11
|
context.registerMiddleware(fileConfigReader)
|
|
12
12
|
|
|
13
|
-
context.makeContext = makeServerContext as typeof context.makeContext
|
|
14
|
-
|
|
15
13
|
appendConfigResource<C, T>(context)
|
|
16
14
|
appendConfigResource<C, T>(context, TRUSTED, TRUSTED)
|
|
17
15
|
appendConfigResource<C, T>(context, PLUGINS, PLUGIN_RECORD)
|
package/build/.gitkeep
DELETED
|
File without changes
|