@owlmeans/server-context 0.1.7 → 0.1.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/README.md
CHANGED
|
@@ -61,3 +61,20 @@ Extends `BasicContext<C>` with `getApiServer(): ApiServer`.
|
|
|
61
61
|
- [`@owlmeans/context`](../context) — `BasicContext` base
|
|
62
62
|
- [`@owlmeans/server-app`](../server-app) — higher-level `makeContext` that calls this internally
|
|
63
63
|
- [`@owlmeans/server-config`](../server-config) — `sservice()` used to configure services
|
|
64
|
+
|
|
65
|
+
<!-- owlmeans:agent-guidance:start -->
|
|
66
|
+
## Agent guidance
|
|
67
|
+
|
|
68
|
+
This package ships embedded Claude Code skills and GitHub Copilot instructions under
|
|
69
|
+
`agent-meta/`. After installing your `@owlmeans/*` packages, run the OwlMeans
|
|
70
|
+
agent-skills installer to place them into your project's native locations
|
|
71
|
+
(`.claude/skills/` and `.github/instructions/`):
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npx @owlmeans/agent-skills
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The embedded files are version-matched to this package release. Do not edit them
|
|
78
|
+
directly — they are regenerated on each publish. To contribute guidance edits,
|
|
79
|
+
open a PR against the source monorepo.
|
|
80
|
+
<!-- owlmeans:agent-guidance:end -->
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "How to use @owlmeans/server-context — server-side context factory (makeServerContext / makeBackendContext) used as the base in your server makeContext()."
|
|
3
|
+
applyTo: "**/context.ts, **/*.ts, **/*.tsx"
|
|
4
|
+
---
|
|
5
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
6
|
+
|
|
7
|
+
# @owlmeans/server-context
|
|
8
|
+
|
|
9
|
+
**Layer:** Server
|
|
10
|
+
**Install:** `"@owlmeans/server-context": "^0.1.8"` in `dependencies`
|
|
11
|
+
|
|
12
|
+
## Key Exports
|
|
13
|
+
|
|
14
|
+
| Export | Description |
|
|
15
|
+
|--------|-------------|
|
|
16
|
+
| `makeServerContext` / `makeBackendContext` | Server context factory |
|
|
17
|
+
| `Context` (server) types | Server-side Context |
|
|
18
|
+
| Server config types | Server-specific config |
|
|
19
|
+
|
|
20
|
+
## Subpath Exports
|
|
21
|
+
|
|
22
|
+
- `./utils`
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { makeBackendContext as makeBaseBackendContext } from '@owlmeans/server-context'
|
|
28
|
+
|
|
29
|
+
export const makeBackendContext = <C extends Config, T extends Context<C>>(cfg: C): T => {
|
|
30
|
+
const context = makeBaseBackendContext<C, T>(cfg)
|
|
31
|
+
return context
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Depends On
|
|
36
|
+
|
|
37
|
+
- `@owlmeans/context`, `@owlmeans/server-config`, `@owlmeans/server-entrypoint`, `@owlmeans/server-route`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@owlmeans/server-context",
|
|
4
|
+
"version": "0.1.8",
|
|
5
|
+
"generatedAt": "2026-06-11T16:30:27.167Z",
|
|
6
|
+
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
|
+
"entries": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "skill",
|
|
10
|
+
"name": "server-context",
|
|
11
|
+
"category": "package-specific",
|
|
12
|
+
"file": "skills/server-context/SKILL.md",
|
|
13
|
+
"canonicalPath": ".claude/skills/server-context/SKILL.md"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"kind": "instruction",
|
|
17
|
+
"name": "server-context",
|
|
18
|
+
"category": "package-specific",
|
|
19
|
+
"file": "instructions/server-context.instructions.md",
|
|
20
|
+
"canonicalPath": ".github/instructions/server-context.instructions.md"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: server-context
|
|
3
|
+
description: How to use @owlmeans/server-context — server-side context factory (makeServerContext / makeBackendContext) used as the base in your server makeContext(). Auto-invoked when building a server context.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
7
|
+
|
|
8
|
+
# @owlmeans/server-context
|
|
9
|
+
|
|
10
|
+
**Layer:** Server
|
|
11
|
+
**Install:** `"@owlmeans/server-context": "^0.1.8"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
## Key Exports
|
|
14
|
+
|
|
15
|
+
| Export | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `makeServerContext` / `makeBackendContext` | Server context factory — base for your `makeContext` |
|
|
18
|
+
| `Context` (server) types | Server-side Context interface |
|
|
19
|
+
| Server config types | Server-specific config shape |
|
|
20
|
+
|
|
21
|
+
## Subpath Exports
|
|
22
|
+
|
|
23
|
+
- `./utils` — server context utilities
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
A downstream `backend` package typically wraps `makeBackendContext` and re-exports its own `makeContext`:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// viable-backend/src/context.ts
|
|
31
|
+
import { makeBackendContext as makeBaseBackendContext } from '@owlmeans/server-context'
|
|
32
|
+
|
|
33
|
+
export const makeBackendContext = <C extends Config, T extends Context<C>>(cfg: C): T => {
|
|
34
|
+
const context = makeBaseBackendContext<C, T>(cfg)
|
|
35
|
+
// ... register shared services
|
|
36
|
+
return context
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Depends On
|
|
41
|
+
|
|
42
|
+
- `@owlmeans/context`, `@owlmeans/server-config`, `@owlmeans/server-entrypoint`, `@owlmeans/server-route`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-context",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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.
|
|
32
|
-
"@owlmeans/config": "^0.1.
|
|
33
|
-
"@owlmeans/context": "^0.1.
|
|
34
|
-
"@owlmeans/route": "^0.1.
|
|
35
|
-
"@owlmeans/server-config": "^0.1.
|
|
31
|
+
"@owlmeans/client-config": "^0.1.8",
|
|
32
|
+
"@owlmeans/config": "^0.1.8",
|
|
33
|
+
"@owlmeans/context": "^0.1.8",
|
|
34
|
+
"@owlmeans/route": "^0.1.8",
|
|
35
|
+
"@owlmeans/server-config": "^0.1.8"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@owlmeans/dep-config": "workspace:*",
|