@owlmeans/api-config-server 0.1.18-rc.19 → 0.1.18-rc.20
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 +2 -4
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/api-config-server/SKILL.md +2 -2
- package/build/actions/config.d.ts +2 -3
- package/build/actions/config.d.ts.map +1 -1
- package/build/actions/config.js +3 -4
- package/build/actions/config.js.map +1 -1
- package/build/entrypoints.d.ts +2 -2
- package/build/entrypoints.d.ts.map +1 -1
- package/build/entrypoints.js +4 -6
- package/build/entrypoints.js.map +1 -1
- package/package.json +5 -5
- package/src/actions/config.ts +7 -6
- package/src/entrypoints.ts +4 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Server-side entrypoint that serves safe configuration values at `GET /assets/con
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
- Registers the `API_CONFIG` handler that returns
|
|
7
|
+
- Registers the `API_CONFIG` handler that returns non-sensitive config fields to clients
|
|
8
8
|
- Used alongside `@owlmeans/api-config-client` to push runtime config from server to browser
|
|
9
9
|
- Include `entrypoints` in your server entrypoint registration
|
|
10
10
|
|
|
@@ -28,8 +28,6 @@ context.registerEntrypoints([...appEntrypoints, ...apiConfigEntrypoints])
|
|
|
28
28
|
### `entrypoints`
|
|
29
29
|
|
|
30
30
|
Array of server-side route handlers for the config advertisement endpoint (`GET /assets/config.json`).
|
|
31
|
-
The handler returns only values registered through `apiConfigPlugin()` by packages loaded in the
|
|
32
|
-
server process; it never copies server config generically.
|
|
33
31
|
|
|
34
32
|
## Related Packages
|
|
35
33
|
|
|
@@ -44,7 +42,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
44
42
|
your project's skill store (`.agents/skills/`):
|
|
45
43
|
|
|
46
44
|
```sh
|
|
47
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
45
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.15
|
|
48
46
|
```
|
|
49
47
|
|
|
50
48
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/api-config-server",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.20",
|
|
5
|
+
"generatedAt": "2026-09-12T08:39:52.720Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/api-config-server
|
|
9
9
|
|
|
10
10
|
**Layer:** Server
|
|
11
|
-
**Install:** `"@owlmeans/api-config-server": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/api-config-server": "^0.1.18-rc.20"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Answers the declaration shared by `@owlmeans/api-config`; the browser side that consumes it is
|
|
14
14
|
`@owlmeans/api-config-client`.
|
|
@@ -17,7 +17,7 @@ Answers the declaration shared by `@owlmeans/api-config`; the browser side that
|
|
|
17
17
|
|
|
18
18
|
| Export | Description |
|
|
19
19
|
|--------|-------------|
|
|
20
|
-
| `entrypoints` | The `API_CONFIG`
|
|
20
|
+
| `entrypoints` | The `API_CONFIG` protocol bound to the advertise handler, ready to spread into the app's entrypoint list |
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const advertise: RefedEntrypointHandler<ApiConfig>;
|
|
1
|
+
import type { EntrypointProtocol, OpenRequest, OpenValue } from '@owlmeans/entrypoint';
|
|
2
|
+
export declare const advertise: (protocol: EntrypointProtocol<OpenRequest, OpenValue>) => import("@owlmeans/server-entrypoint").BoundEntrypointHandler<EntrypointProtocol<OpenRequest, OpenValue>>;
|
|
4
3
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/actions/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/actions/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAMtF,eAAO,MAAM,SAAS,aAAc,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,6GACF,CAAA"}
|
package/build/actions/config.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
1
2
|
import { advertisedConfig } from '@owlmeans/api-config';
|
|
2
|
-
|
|
3
|
-
export const advertise =
|
|
4
|
-
return advertisedConfig(ctx.cfg);
|
|
5
|
-
});
|
|
3
|
+
const api = handlers();
|
|
4
|
+
export const advertise = (protocol) => api.request(protocol, async (_, context) => advertisedConfig(context.cfg));
|
|
6
5
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/actions/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/actions/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGvD,MAAM,GAAG,GAAG,QAAQ,EAA+B,CAAA;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAoD,EAAE,EAAE,CAChF,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA"}
|
package/build/entrypoints.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const entrypoints:
|
|
1
|
+
/** The server-local binding of the shared runtime-config protocol. */
|
|
2
|
+
export declare const entrypoints: import("@owlmeans/server-entrypoint").ServerProtocolEntrypoint<import("@owlmeans/entrypoint").EntrypointProtocol<import("@owlmeans/entrypoint").OpenRequest, import("@owlmeans/entrypoint").OpenValue>>[];
|
|
3
3
|
//# sourceMappingURL=entrypoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAKA,sEAAsE;AACtE,eAAO,MAAM,WAAW,2MAAiD,CAAA"}
|
package/build/entrypoints.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { advertise } from '@owlmeans/api-config';
|
|
2
|
+
import { bind } from '@owlmeans/server-entrypoint';
|
|
3
3
|
import { config } from './actions/index.js';
|
|
4
|
-
|
|
5
|
-
export const entrypoints = [
|
|
6
|
-
...list.filter((module) => module.alias === API_CONFIG)
|
|
7
|
-
];
|
|
4
|
+
/** The server-local binding of the shared runtime-config protocol. */
|
|
5
|
+
export const entrypoints = [bind(advertise, config.advertise(advertise))];
|
|
8
6
|
//# sourceMappingURL=entrypoints.js.map
|
package/build/entrypoints.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/api-config-server",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/api-config": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/api-config": "^0.1.18-rc.15",
|
|
25
|
+
"@owlmeans/server-api": "^0.1.18-rc.20",
|
|
26
|
+
"@owlmeans/server-context": "^0.1.18-rc.15",
|
|
27
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.14"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@owlmeans/dep-config": "workspace:*",
|
package/src/actions/config.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { handlers } from '@owlmeans/server-api'
|
|
2
|
+
import type { EntrypointProtocol, OpenRequest, OpenValue } from '@owlmeans/entrypoint'
|
|
3
3
|
import { advertisedConfig } from '@owlmeans/api-config'
|
|
4
|
-
import {
|
|
4
|
+
import type { ServerConfig, ServerContext } from '@owlmeans/server-context'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const api = handlers<ServerContext<ServerConfig>>()
|
|
7
|
+
|
|
8
|
+
export const advertise = (protocol: EntrypointProtocol<OpenRequest, OpenValue>) =>
|
|
9
|
+
api.request(protocol, async (_, context) => advertisedConfig(context.cfg))
|
package/src/entrypoints.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { entrypoints as list, API_CONFIG } from '@owlmeans/api-config'
|
|
2
|
+
import { advertise } from '@owlmeans/api-config'
|
|
3
|
+
import { bind } from '@owlmeans/server-entrypoint'
|
|
5
4
|
import { config } from './actions/index.js'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const entrypoints: ServerEntrypoint<unknown>[] = [
|
|
10
|
-
...list.filter((module): module is ServerEntrypoint<unknown> => module.alias === API_CONFIG)
|
|
11
|
-
]
|
|
6
|
+
/** The server-local binding of the shared runtime-config protocol. */
|
|
7
|
+
export const entrypoints = [bind(advertise, config.advertise(advertise))]
|