@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 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 package-allowlisted config fields to clients
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.14
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
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/api-config-server",
4
- "version": "0.1.18-rc.19",
5
- "generatedAt": "2026-09-10T23:12:07.507Z",
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.19"` in `dependencies`
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` declaration elevated with the advertise handler, ready to spread into the app's entrypoint list |
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 { RefedEntrypointHandler } from '@owlmeans/server-entrypoint';
2
- import type { ApiConfig } from '@owlmeans/api-config';
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":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAIrD,eAAO,MAAM,SAAS,EAAE,sBAAsB,CAAC,SAAS,CAEtD,CAAA"}
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"}
@@ -1,6 +1,5 @@
1
+ import { handlers } from '@owlmeans/server-api';
1
2
  import { advertisedConfig } from '@owlmeans/api-config';
2
- import { handleRequest } from '@owlmeans/server-api';
3
- export const advertise = handleRequest(async (_, ctx) => {
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":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,CAAC,MAAM,SAAS,GAAsC,aAAa,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE;IACzF,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAc,CAAA;AAC/C,CAAC,CAAC,CAAA"}
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"}
@@ -1,3 +1,3 @@
1
- import type { ServerEntrypoint } from '@owlmeans/server-entrypoint';
2
- export declare const entrypoints: ServerEntrypoint<unknown>[];
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":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAOnE,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAElD,CAAA"}
1
+ {"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAKA,sEAAsE;AACtE,eAAO,MAAM,WAAW,2MAAiD,CAAA"}
@@ -1,8 +1,6 @@
1
- import { elevate } from '@owlmeans/server-entrypoint';
2
- import { entrypoints as list, API_CONFIG } from '@owlmeans/api-config';
1
+ import { advertise } from '@owlmeans/api-config';
2
+ import { bind } from '@owlmeans/server-entrypoint';
3
3
  import { config } from './actions/index.js';
4
- elevate(list, API_CONFIG, config.advertise);
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
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,WAAW,IAAI,IAAI,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAgC;IACtD,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAuC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC;CAC7F,CAAA"}
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.19",
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.14",
25
- "@owlmeans/server-api": "^0.1.18-rc.19",
26
- "@owlmeans/server-context": "^0.1.18-rc.14",
27
- "@owlmeans/server-entrypoint": "^0.1.18-rc.13"
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:*",
@@ -1,8 +1,9 @@
1
- import type { RefedEntrypointHandler } from '@owlmeans/server-entrypoint'
2
- import type { ApiConfig } from '@owlmeans/api-config'
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 { handleRequest } from '@owlmeans/server-api'
4
+ import type { ServerConfig, ServerContext } from '@owlmeans/server-context'
5
5
 
6
- export const advertise: RefedEntrypointHandler<ApiConfig> = handleRequest(async (_, ctx) => {
7
- return advertisedConfig(ctx.cfg) as ApiConfig
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))
@@ -1,11 +1,7 @@
1
1
 
2
- import type { ServerEntrypoint } from '@owlmeans/server-entrypoint'
3
- import { elevate } from '@owlmeans/server-entrypoint'
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
- elevate(list, API_CONFIG, config.advertise)
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))]