@owlmeans/client-entrypoint 0.1.18-rc.2 → 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
@@ -1,66 +1,91 @@
1
1
  # @owlmeans/client-entrypoint
2
2
 
3
- Client-side entrypoint system: elevates route definitions into API-calling `ClientEntrypoint` instances.
3
+ Client-side entrypoint system: binds shared protocol declarations into API-calling client views.
4
4
 
5
5
  ## Overview
6
6
 
7
- - `elevate(entrypoints, alias, handler?, opts?)` — attaches a client handler to an entrypoint (mirrors server `elevate`)
8
- - `ClientEntrypoint<T>` has a `call(request?)` method that resolves the URL and makes an HTTP/WS request
9
- - `stab` — no-op handler for entrypoints that only need URL resolution (no logic)
7
+ - `bind(protocol, opts?)` — binds one shared protocol declaration
8
+ - `bindAll(protocolTree)` — binds every protocol in a shared declaration tree
9
+ - `bindScreen(protocol, handler, opts?)` — binds a screen renderer to a shared frontend protocol
10
+ - `ClientProtocolEntrypoint<Protocol>` exposes three explicit verbs: `call()` for the value,
11
+ `invoke()` for the value plus its outcome, and `url()` for the address
12
+ - `stab` — no-op handler for entrypoints that only need a URL (no logic)
10
13
  - `provideRequest(alias, path)` — creates an `AbstractRequest` for programmatic entrypoint calls
11
14
  - `pickPerSchema(schema, obj)` — extracts fields from an object matching an AJV schema
12
- - Re-exported as `celevate` from `@owlmeans/server-app`
13
15
 
14
16
  ## Installation
15
17
 
16
18
  ```bash
17
- bun add @owlmeans/client-entrypoint
19
+ bun add @owlmeans/client-entrypoint@^0.1.18-rc.12
18
20
  ```
19
21
 
20
22
  ## Usage
21
23
 
22
- Define and elevate a client entrypoint for API calls:
24
+ Bind shared protocols for browser API calls and screens:
23
25
 
24
26
  ```typescript
25
- import { elevate, stab } from '@owlmeans/client-entrypoint'
26
- import type { ClientEntrypoint } from '@owlmeans/client-entrypoint'
27
-
28
- const appModules = [
29
- entrypoint(route('project-list', '/projects', frontend('base'))),
30
- entrypoint(route('project-create', '/projects', backend(RouteMethod.POST))),
27
+ import { bindAll, bindScreen, stab } from '@owlmeans/client-entrypoint'
28
+ import { appEntrypoints as protocols } from 'my-app-common'
29
+ import { handler } from '@owlmeans/client'
30
+ import { ProjectListScreen } from './screens/project-list.js'
31
+
32
+ const appEntrypoints = [
33
+ ...bindAll(protocols.api),
34
+ bindScreen(protocols.web.projectList, handler(ProjectListScreen)),
35
+ bindScreen(protocols.web.project, stab),
31
36
  ]
32
-
33
- // Frontend navigation — just a stub, no network call
34
- elevate(appModules, 'project-list', stab)
35
-
36
- // Backend API call — call() makes a POST request
37
- elevate(appModules, 'project-create')
38
37
  ```
39
38
 
40
39
  Call an entrypoint from a service:
41
40
 
42
41
  ```typescript
43
- const agentEntrypoint = ctx.entrypoint<ClientEntrypoint<Project>>(agent.project.create)
44
- const [result] = await agentEntrypoint.call({
45
- body: { prompt: payload.prompt, entity: req.auth?.entityId }
42
+ const agentEntrypoint = ctx.entrypoint(agent.project.create)
43
+ const result = await agentEntrypoint.call({
44
+ body: { prompt: payload.prompt, entity: req.auth?.entitySlug }
46
45
  })
47
46
  ```
48
47
 
48
+ Take the outcome when it decides what happens next, and build a link with `url()`:
49
+
50
+ ```typescript
51
+ const { value, outcome } = await agentEntrypoint.invoke({ body: payload })
52
+
53
+ const href = await ctx.entrypoint(protocols.web.projectList)
54
+ .url({ params: { id: value.id } }, { absolute: true })
55
+ ```
56
+
49
57
  ## API
50
58
 
51
- ### `elevate<T, R>(entrypoints, alias, handler?, opts?): ClientEntrypoint<T, R>[]`
59
+ ### `bind<Protocol>(protocol, opts?): ClientProtocolEntrypoint<Protocol>`
52
60
 
53
- Mutates `entrypoints` in-place and returns the array typed as `ClientEntrypoint`. The `handler` sets how `call()` behaves.
61
+ Materializes one immutable protocol declaration for a browser context. The declaration is never mutated.
62
+
63
+ ### `bindAll(protocolTree): ClientProtocolEntrypoint[]`
64
+
65
+ Materializes every protocol in a shared declaration tree, preserving each protocol reference for typed context lookup.
66
+
67
+ ### `bindScreen<Protocol>(protocol, handler, opts?): ClientProtocolEntrypoint<Protocol>`
68
+
69
+ Materializes a frontend protocol and attaches its renderer.
54
70
 
55
71
  ### `stab: RefedEntrypointHandler`
56
72
 
57
- No-op handler for frontend-only entrypoints that just need URL resolution.
73
+ No-op handler for frontend-only entrypoints that are addressed by URL rather than called.
58
74
 
59
- ### `ClientEntrypoint<T>` (type)
75
+ ### `ClientProtocolEntrypoint<Protocol>` (type)
60
76
 
61
- - `call(request?)` — resolves URL, makes HTTP request, returns `[T, EntrypointOutcome]`
77
+ - `call(request?)` — addresses the entrypoint over the wire and resolves to the value, throwing
78
+ whatever error the reply carried
79
+ - `invoke(request?)` — the same round trip, resolving to `{ value, outcome }`
80
+ - `url(request?, { absolute? })` — builds the URL this entrypoint addresses, with `:params` filled in
81
+ and the query appended; absolute when the route belongs to another service or `absolute` is asked for
62
82
  - `validate(request?)` — validates the request against the entrypoint filter schema
63
- - `getPath(partial?)` — returns the URL path (with or without path params)
83
+ - `segment()` / `path()` / `mount()` — the segment this entrypoint contributes, that segment under its
84
+ ancestors, and the same path under the service base. All three are computed from the declaration
85
+ and the context on every call — nothing is written back into the route.
86
+
87
+ An entrypoint carrying a renderer *is* a screen: it is addressed by URL, never called over the wire,
88
+ so `call()` and `invoke()` throw and point the caller at `url()`.
64
89
 
65
90
  ### `provideRequest<T>(alias, path): AbstractRequest<T>`
66
91
 
@@ -70,11 +95,17 @@ Creates a minimal request object for programmatic `call()` invocations.
70
95
 
71
96
  Extracts only the keys present in the AJV schema from `obj`.
72
97
 
98
+ ### `@owlmeans/client-entrypoint/utils`
99
+
100
+ The low-level pair the verbs are built on, for code that holds an entrypoint reference directly:
101
+
102
+ - `entrypointUrl(ref, request, opts?)` — the address behind `url()`
103
+ - `apiInvoke(ref, opts?)` — the round trip behind `invoke()`
104
+
73
105
  ## Related Packages
74
106
 
75
- - [`@owlmeans/entrypoint`](../entrypoint) — `CommonEntrypoint` base that gets elevated
76
- - [`@owlmeans/client`](../client) — `useNavigate` uses `ClientEntrypoint.call()`
77
- - [`@owlmeans/server-app`](../server-app) — re-exports `elevate` as `celevate`
107
+ - [`@owlmeans/entrypoint`](../entrypoint) — `CommonEntrypoint` base that gets materialized
108
+ - [`@owlmeans/client`](../client) — `useNavigate` navigates by a bound protocol's `url()`
78
109
 
79
110
  <!-- owlmeans:agent-guidance:start -->
80
111
  ## Agent guidance
@@ -84,7 +115,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
84
115
  your project's skill store (`.agents/skills/`):
85
116
 
86
117
  ```sh
87
- npx @owlmeans/agent-skills
118
+ npx @owlmeans/agent-skills@^0.1.18-rc.19
88
119
  ```
89
120
 
90
121
  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/client-entrypoint",
4
- "version": "0.1.18-rc.0",
5
- "generatedAt": "2026-08-16T22:20:50.501Z",
4
+ "version": "0.1.18-rc.20",
5
+ "generatedAt": "2026-09-12T13:51:53.528Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,50 +1,38 @@
1
1
  ---
2
2
  name: client-entrypoint
3
- description: How to use @owlmeans/client-entrypoint — client-side entrypoint helpers extending @owlmeans/entrypoint with React component attachment and call helpers. Auto-invoked when importing client entrypoint helpers. Also covers the deprecated @owlmeans/client-module reexport shim.
3
+ description: Bind shared entrypoint protocols in a client context with typed call(), invoke(), url(), bindAll(), and bindScreen(). Load when wiring client API routes or screens.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
7
 
8
8
  # @owlmeans/client-entrypoint
9
9
 
10
- **Layer:** Client
11
- **Install:** `"@owlmeans/client-entrypoint": "^0.1.18-rc.0"` in `dependencies`
10
+ **Install:** `bun add @owlmeans/client-entrypoint@^0.1.18-rc.19`
12
11
 
13
- ## Key Exports
12
+ Bind a declaration from `@owlmeans/entrypoint`; never construct or replace a contextual
13
+ entrypoint by alias.
14
14
 
15
- | Export | Description |
16
- |--------|-------------|
17
- | `ClientEntrypoint<T>` types | Client entrypoint interface (handler component + call helpers) |
18
- | `EntrypointCall` / `EntrypointFilter` | Typed call and validation helpers |
19
- | `EntrypointRef` / `RefedEntrypointHandler` | Handler reference pattern |
20
- | Entrypoint helpers | Build client entrypoints; resolve callable references |
15
+ ```ts
16
+ import { bind, bindAll, bindScreen } from '@owlmeans/client-entrypoint'
21
17
 
22
- ## Subpath Exports
18
+ context.registerEntrypoints(bindAll(projectEntrypoints))
19
+ context.registerEntrypoint(bind(projectEntrypoints.health))
20
+ context.registerEntrypoint(bindScreen(projectEntrypoints.home, handler(Home)))
23
21
 
24
- - `./utils`
25
-
26
- ## Usage
27
-
28
- Most app code uses `elevate()` from `@owlmeans/web-client` (which builds on this). Use this directly only for cross-platform entrypoint helpers.
29
-
30
- ```typescript
31
- import type { ClientEntrypoint } from '@owlmeans/client-entrypoint'
32
- ```
33
-
34
- ## URL Generation via Entrypoint Call
35
-
36
- Entrypoints with a `handler` (React component) use `urlCall` internally — calling `.call()` returns a URL string. Use `{ full: true }` to get a fully-qualified URL via `makeSecurityHelper`:
37
-
38
- ```typescript
39
- import type { ClientEntrypoint } from '@owlmeans/client-entrypoint'
40
- import { HOME } from '@owlmeans/context'
41
-
42
- const [url] = await context.entrypoint<ClientEntrypoint<string>>(HOME).call({ full: true }) ?? []
43
- // Returns e.g. "https://app.example.com/"
22
+ const value = await context.entrypoint(projectEntrypoints.create).call({ body })
23
+ const { value, outcome } = await context.entrypoint(projectEntrypoints.create).invoke({ body })
24
+ const href = await context.entrypoint(projectEntrypoints.edit).url({ params: { id } })
44
25
  ```
45
26
 
46
- This is the preferred pattern for redirect URIs and navigation targets instead of manual `window.location` concatenation.
27
+ `bindAll(tree)` flattens a nested named declaration tree while preserving the union of its protocol
28
+ types. `bind(protocol)` is appropriate where one protocol must use a distinct client option.
29
+ `bindScreen` is for a frontend route and renderer; screens are addressed by `url` and reject
30
+ `call`/`invoke`.
47
31
 
48
- ## Depends On
32
+ `context.entrypoint(protocol)` derives `ClientProtocolEntrypoint<Protocol>` from the protocol. Do
33
+ not add an explicit result generic. `entrypointRef<Request, Response>(alias)` is reserved for a
34
+ dynamic remote declaration that cannot be imported.
49
35
 
50
- - `@owlmeans/entrypoint`, `@owlmeans/client-route`, `@owlmeans/client-context`
36
+ Client calls include only contract request sections plus `CallOptions` (`auth`, host/port/base,
37
+ timeout, signal). `url` accepts params/query plus the same address options. The route transport is
38
+ chosen by the declaration; callers do not branch for HTTP, socket, or queue.
@@ -1,6 +1,5 @@
1
- import type { ClientRouteModel } from '@owlmeans/client-route';
2
1
  import type { ClientEntrypoint, ClientEntrypointOptions, RefedEntrypointHandler } from './types.js';
3
2
  import type { AbstractRequest, CommonEntrypoint } from '@owlmeans/entrypoint';
4
- import type { CommonRouteModel } from '@owlmeans/route';
5
- export declare const entrypoint: <T, R extends AbstractRequest = AbstractRequest>(arg: CommonEntrypoint | ClientRouteModel | CommonRouteModel, handler?: RefedEntrypointHandler<T, R> | ClientEntrypointOptions | boolean, opts?: ClientEntrypointOptions | boolean) => ClientEntrypoint<T, R>;
3
+ /** Attach client behaviour to an entrypoint already materialized from a protocol. */
4
+ export declare const bindMaterializedEntrypoint: <T, R extends AbstractRequest = AbstractRequest>(arg: CommonEntrypoint, handler?: RefedEntrypointHandler<T, R>, opts?: ClientEntrypointOptions) => ClientEntrypoint<T, R>;
6
5
  //# sourceMappingURL=entrypoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAiB,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAClH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAO7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAGvD,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,CAAC,SAAS,eAAe,GAAG,eAAe,OAClE,gBAAgB,GAAG,gBAAgB,GAAG,gBAAgB,YACjD,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,uBAAuB,GAAG,OAAO,SACnE,uBAAuB,GAAG,OAAO,KACvC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CA+DvB,CAAA"}
1
+ {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAiB,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAClH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAO7E,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,GAAI,CAAC,EAAE,CAAC,SAAS,eAAe,GAAG,eAAe,OAClF,gBAAgB,YACX,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,SAC/B,uBAAuB,KAC7B,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAqDvB,CAAA"}
@@ -1,44 +1,36 @@
1
- import { isEntrypoint, makeBasicEntrypoint, normalizeHelperParams, validate } from './utils/entrypoint.js';
2
- import { isClientRouteModel, route } from '@owlmeans/client-route';
3
- import { apiCall, apiHandler, urlCall } from './utils/handler.js';
1
+ import { validate } from './utils/entrypoint.js';
2
+ import { route } from '@owlmeans/client-route';
3
+ import { apiInvoke, apiHandler, entrypointUrl } from './utils/handler.js';
4
4
  import { AppType } from '@owlmeans/context';
5
- import { normalizePath } from '@owlmeans/route';
6
5
  import { provideRequest } from './helper.js';
7
- export const entrypoint = (arg, handler, opts) => {
6
+ /** Attach client behaviour to an entrypoint already materialized from a protocol. */
7
+ export const bindMaterializedEntrypoint = (arg, handler, opts) => {
8
8
  const entrypointHandle = { ref: undefined };
9
9
  let _entrypoint;
10
- [handler, opts] = normalizeHelperParams(handler, opts);
11
- const _handler = handler ??
12
- (('route' in arg.route ? arg.route.route.type : arg.route.type)
13
- === AppType.Backend ? apiHandler : undefined);
14
- if (isEntrypoint(arg)) {
15
- assertExplicitHandler(arg.route.route.type, handler);
16
- const routeModel = route(arg.route, opts?.routeOptions);
17
- _entrypoint = arg;
18
- _entrypoint.route = routeModel;
19
- _entrypoint.guards = opts?.guards ?? arg.guards;
20
- _entrypoint.filter = opts?.filter ?? arg.filter;
21
- _entrypoint.gate = opts?.gate ?? arg.gate;
22
- _entrypoint.gateParams = opts?.gateParams ?? arg.gateParams;
23
- }
24
- else if (isClientRouteModel(arg)) {
25
- assertExplicitHandler(arg.route.type, handler);
26
- _entrypoint = makeBasicEntrypoint(arg, { ...opts });
27
- _entrypoint.route = arg;
28
- }
29
- else {
30
- assertExplicitHandler(arg.route.type, handler);
31
- const _route = route(arg, opts?.routeOptions);
32
- _entrypoint = makeBasicEntrypoint(_route, { ...opts });
33
- _entrypoint.route = _route;
34
- }
35
- _entrypoint.getPath = (partial) => partial === true ? normalizePath(_entrypoint.route.route.partialPath) : _entrypoint.route.route.path;
36
- _entrypoint.call = handler != null ? urlCall(entrypointHandle, opts) : apiCall(entrypointHandle, opts);
10
+ const _handler = handler ?? (arg.route.route.type === AppType.Backend ? apiHandler : undefined);
11
+ assertExplicitHandler(arg.route.route.type, handler);
12
+ const routeModel = route(arg.route, opts?.routeOptions);
13
+ _entrypoint = arg;
14
+ _entrypoint.route = routeModel;
15
+ // Binding adds guards, it never swaps them: what the declaration carries still applies.
16
+ _entrypoint.guards = [...new Set([...(arg.guards ?? []), ...(opts?.guards ?? [])])];
17
+ _entrypoint.filter = opts?.filter ?? arg.filter;
18
+ _entrypoint.gate = opts?.gate ?? arg.gate;
19
+ _entrypoint.gateParams = opts?.gateParams ?? arg.gateParams;
20
+ _entrypoint.url = ((req, urlOpts) => entrypointUrl(entrypointHandle, req, urlOpts));
21
+ // An entrypoint carrying a renderer IS a screen: it is addressed by URL, never called over the
22
+ // wire. Saying so here turns what used to be a URL-shaped answer from `call()` into a report.
23
+ _entrypoint.invoke = (handler != null
24
+ ? (async () => {
25
+ throw new SyntaxError(`Entrypoint ${_entrypoint.alias} renders a screen - address it with url() instead of call()/invoke()`);
26
+ })
27
+ : apiInvoke(entrypointHandle, opts));
28
+ _entrypoint.call = (async (req) => (await _entrypoint.invoke(req)).value);
37
29
  _entrypoint.request = ((request) => {
38
30
  if (entrypointHandle.ref == null) {
39
31
  throw SyntaxError(`Try to request uninitialized entrypoint ${JSON.stringify(arg)}`);
40
32
  }
41
- const _request = provideRequest(entrypointHandle.ref.getAlias(), entrypointHandle.ref.getPath());
33
+ const _request = provideRequest(entrypointHandle.ref.alias, entrypointHandle.ref.path());
42
34
  request != null && Object.entries(request).forEach(([key, value]) => {
43
35
  _request[key] = value;
44
36
  });
@@ -46,11 +38,6 @@ export const entrypoint = (arg, handler, opts) => {
46
38
  });
47
39
  _entrypoint.handle = _handler?.(entrypointHandle);
48
40
  _entrypoint.validate = validate(entrypointHandle);
49
- _entrypoint.reinitializeContext = (context) => {
50
- const newEntrypoint = entrypoint(_entrypoint.route, handler, opts);
51
- newEntrypoint.ctx = context;
52
- return newEntrypoint;
53
- };
54
41
  entrypointHandle.ref = _entrypoint;
55
42
  return _entrypoint;
56
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC1G,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;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jB,CAAC,CAAQ,CAAA;IAET,WAAW,CAAC,MAAM,GAAG,QAAQ,EAAE,CAAC,gBAAgB,CAAC,CAAA;IAEjD,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IAEjD,gBAAgB,CAAC,GAAG,GAAG,WAAW,CAAA;IAElC,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,CAC5B,IAAa,EAAE,OAAiD,EAChE,EAAE;IACF,IAAI,IAAI,KAAK,OAAO,CAAC,OAAO,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,WAAW,CAAC,iEAAiE,CAAC,CAAA;IAC1F,CAAC;AACH,CAAC,CAAA"}
package/build/helper.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import type { ClientEntrypoint, ClientEntrypointOptions, RefedEntrypointHandler } from './types.js';
2
- import type { AbstractRequest, CommonEntrypoint } from '@owlmeans/entrypoint';
1
+ import type { RefedEntrypointHandler } from './types.js';
2
+ import type { AbstractRequest } from '@owlmeans/entrypoint';
3
3
  import type { JSONSchemaType } from "ajv";
4
- export declare const elevate: <T = {}, R extends AbstractRequest = AbstractRequest>(entrypoints: (CommonEntrypoint | ClientEntrypoint<T, R>)[], alias: string, handler?: RefedEntrypointHandler<T, R> | ClientEntrypointOptions | boolean, opts?: ClientEntrypointOptions | boolean) => ClientEntrypoint<T, R>[];
5
4
  export declare const stab: RefedEntrypointHandler<{}>;
6
5
  export declare const provideRequest: <T extends {} = {}>(alias: string, path: string) => AbstractRequest<T>;
7
6
  export declare const pickPerSchema: <T, R>(object: T, schema: JSONSchemaType<R>) => Partial<R>;
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAGnG,OAAO,KAAK,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UAAU,cAAc,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAQjF,CAAA"}
package/build/helper.js CHANGED
@@ -1,18 +1,3 @@
1
- import { entrypoint } from './entrypoint.js';
2
- import { isClientRouteModel } from '@owlmeans/client-route';
3
- import { normalizeHelperParams } from './utils/entrypoint.js';
4
- export const elevate = (entrypoints, alias, handler, opts) => {
5
- [handler, opts] = normalizeHelperParams(handler, opts);
6
- const idx = entrypoints.findIndex(({ route }) => route.route.alias === alias);
7
- if (idx === -1) {
8
- throw new SyntaxError(`Entrypoint with alias ${alias} not present`);
9
- }
10
- if (isClientRouteModel(entrypoints[idx].route) && opts?.force !== true) {
11
- throw new SyntaxError(`Entrypoint with alias ${alias} is already elevated`);
12
- }
13
- entrypoints[idx] = entrypoint(entrypoints[idx], handler, opts);
14
- return entrypoints;
15
- };
16
1
  export const stab = () => () => {
17
2
  return void 0;
18
3
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,WAA0D,EAC1D,KAAa,EACb,OAA0E,EAC1E,IAAwC,EACd,EAAE;IAC5B,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAEtD,MAAM,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAA;IAC7E,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,WAAW,CAAC,yBAAyB,KAAK,cA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":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,IAAI,GAA+B,GAAG,EAAE,CAAC,GAAG,EAAE;IACzD,OAAO,KAAK,CAAQ,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAoB,KAAa,EAAE,IAAY,EAAsB,EAAE;IACnG,MAAM,OAAO,GAAG;QACd,KAAK;QACL,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,IAAI;QACJ,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI;KACtC,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAO,MAAS,EAAE,MAAyB,EAAc,EAAE,CACtF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CACnC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACX,IAAI,MAAM,CAAC,GAAc,CAAC,IAAI,IAAI,EAAE,CAAC;QACnC,GAAG,CAAC,GAAc,CAAC,GAAG,MAAM,CAAC,GAAc,CAA0B,CAAA;IACvE,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,EAAE,EAAgB,CACpB,CAAA"}
package/build/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './helper.js';
2
1
  export type * from './types.js';
3
- export * from './entrypoint.js';
4
2
  export * from './errors.js';
3
+ export * from './protocol.js';
4
+ export { pickPerSchema, provideRequest, stab } from './helper.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA"}
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from './helper.js';
2
- export * from './entrypoint.js';
3
1
  export * from './errors.js';
2
+ export * from './protocol.js';
3
+ export { pickPerSchema, provideRequest, stab } from './helper.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAE3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { EntrypointProtocolDeclaration, EntrypointTree } from '@owlmeans/entrypoint';
2
+ import type { ClientEntrypointOptions, ClientProtocolEntrypoint, RefedEntrypointHandler } from './types.js';
3
+ /** Bind a shared protocol to the client context without changing the declaration itself. */
4
+ export declare const bind: <Protocol extends EntrypointProtocolDeclaration>(protocol: Protocol, options?: ClientEntrypointOptions) => ClientProtocolEntrypoint<Protocol>;
5
+ /** Materialize every protocol in an exported declaration tree for a browser context. */
6
+ export declare const bindAll: (tree: EntrypointTree) => ClientProtocolEntrypoint<EntrypointProtocolDeclaration>[];
7
+ /** Bind a frontend protocol to the component that renders it. */
8
+ export declare const bindScreen: <Protocol extends EntrypointProtocolDeclaration>(protocol: Protocol, handler: RefedEntrypointHandler, options?: ClientEntrypointOptions) => ClientProtocolEntrypoint<Protocol>;
9
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEzF,OAAO,KAAK,EACV,uBAAuB,EAAE,wBAAwB,EAAE,sBAAsB,EAC1E,MAAM,YAAY,CAAA;AAEnB,4FAA4F;AAC5F,eAAO,MAAM,IAAI,GAAI,QAAQ,SAAS,6BAA6B,YACvD,QAAQ,YACR,uBAAuB,KAChC,wBAAwB,CAAC,QAAQ,CAQnC,CAAA;AAED,wFAAwF;AACxF,eAAO,MAAM,OAAO,SAAU,cAAc,KAAG,wBAAwB,CAAC,6BAA6B,CAAC,EACrD,CAAA;AAEjD,iEAAiE;AACjE,eAAO,MAAM,UAAU,GAAI,QAAQ,SAAS,6BAA6B,YAC7D,QAAQ,WACT,sBAAsB,YACrB,uBAAuB,KAChC,wBAAwB,CAAC,QAAQ,CAQnC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { materializeEntrypoint, protocols } from '@owlmeans/entrypoint';
2
+ import { bindMaterializedEntrypoint } from './entrypoint.js';
3
+ /** Bind a shared protocol to the client context without changing the declaration itself. */
4
+ export const bind = (protocol, options) => {
5
+ const bound = Object.assign(bindMaterializedEntrypoint(materializeEntrypoint(protocol), undefined, options), { protocol });
6
+ return bound;
7
+ };
8
+ /** Materialize every protocol in an exported declaration tree for a browser context. */
9
+ export const bindAll = (tree) => protocols(tree).map(protocol => bind(protocol));
10
+ /** Bind a frontend protocol to the component that renders it. */
11
+ export const bindScreen = (protocol, handler, options) => {
12
+ const bound = Object.assign(bindMaterializedEntrypoint(materializeEntrypoint(protocol), handler, options), { protocol });
13
+ return bound;
14
+ };
15
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAK5D,4FAA4F;AAC5F,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,QAAkB,EAClB,OAAiC,EACG,EAAE;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,0BAA0B,CACpD,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,SAAS,EACT,OAAO,CACR,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEhB,OAAO,KAA2C,CAAA;AACpD,CAAC,CAAA;AAED,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAoB,EAA6D,EAAE,CACzG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEjD,iEAAiE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,QAAkB,EAClB,OAA+B,EAC/B,OAAiC,EACG,EAAE;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,0BAA0B,CACpD,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,OAAO,EACP,OAAO,CACR,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEhB,OAAO,KAA2C,CAAA;AACpD,CAAC,CAAA"}
package/build/types.d.ts CHANGED
@@ -1,33 +1,63 @@
1
1
  import type { ClientRouteModel, ClientRouteOptions } from '@owlmeans/client-route';
2
- import type { AbstractRequest, AbstractResponse, CommonEntrypoint, CommonEntrypointOptions, EntrypointHandler, EntrypointOutcome } from '@owlmeans/entrypoint';
2
+ import type { AbstractRequest, CommonEntrypoint, CommonEntrypointOptions, EntrypointHandler, EntrypointOutcome, EntrypointProtocolDeclaration, RegisteredEntrypoint, RequestOf } from '@owlmeans/entrypoint';
3
3
  export interface ClientEntrypoint<T = {}, R extends ClientRequest = ClientRequest> extends CommonEntrypoint {
4
4
  route: ClientRouteModel;
5
+ /**
6
+ * Address the entrypoint and resolve to what it answered. The reply's error is thrown, so a
7
+ * caller that only needs the value never inspects an outcome.
8
+ */
5
9
  call: EntrypointCall<T, R>;
10
+ /**
11
+ * The same round trip as {@link ClientEntrypoint.call}, resolving to the value AND the outcome.
12
+ * Use it only where the outcome decides what happens next.
13
+ */
14
+ invoke: EntrypointInvoke<T, R>;
15
+ /**
16
+ * Build the URL this entrypoint addresses, with `:params` filled in and the query appended.
17
+ * Absolute when the route belongs to another service, or when `absolute` is asked for.
18
+ */
19
+ url: EntrypointUrl<R>;
6
20
  validate: EntrypointFilter<R>;
7
- getPath: (partial?: boolean) => string;
8
21
  request: (request?: Partial<R>) => R;
9
22
  }
23
+ /**
24
+ * The context-bound client view of a protocol. Unlike the legacy `ClientEntrypoint` generic,
25
+ * its request and reply types are read directly from the declaration and cannot be replaced at a
26
+ * call site.
27
+ */
28
+ export type ClientProtocolEntrypoint<Protocol extends EntrypointProtocolDeclaration> = Omit<ClientEntrypoint, 'call' | 'invoke' | 'url' | 'validate' | 'request'> & RegisteredEntrypoint<RequestOf<Protocol>, import('@owlmeans/entrypoint').ResponseOf<Protocol>> & {
29
+ readonly protocol: Protocol;
30
+ };
10
31
  export interface EntrypointCall<T, Req extends ClientRequest = ClientRequest> {
11
- <Type extends T, R extends Req = Req, P extends AbstractResponse<Type> = AbstractResponse<Type>>(req?: Partial<R>, res?: P): Promise<[Type, EntrypointOutcome]>;
32
+ <Type extends T, R extends Req = Req>(req?: Partial<R>): Promise<Type>;
33
+ }
34
+ export interface EntrypointInvoke<T, Req extends ClientRequest = ClientRequest> {
35
+ <Type extends T, R extends Req = Req>(req?: Partial<R>): Promise<EntrypointReply<Type>>;
36
+ }
37
+ export interface EntrypointReply<T> {
38
+ value: T;
39
+ outcome: EntrypointOutcome;
40
+ }
41
+ export interface EntrypointUrl<Req extends ClientRequest = ClientRequest> {
42
+ <R extends Req = Req>(req?: Partial<R>, opts?: EntrypointUrlOptions): Promise<string>;
43
+ }
44
+ export interface EntrypointUrlOptions {
45
+ /** Force a fully qualified URL even when the route belongs to the current service. */
46
+ absolute?: boolean;
12
47
  }
13
48
  export interface EntrypointFilter<Req extends AbstractRequest = AbstractRequest> {
14
49
  <R extends Req>(req?: Partial<R>): Promise<boolean>;
15
50
  }
16
51
  export interface ClientRequest<T extends {} = {}> extends AbstractRequest<T> {
17
- full?: boolean;
18
52
  }
19
53
  export interface ClientEntrypointOptions extends CommonEntrypointOptions {
20
- /**
21
- * Force entrypoint to be elevated even if it is already elevated
22
- */
23
- force?: boolean;
24
54
  routeOptions?: ClientRouteOptions;
25
55
  validateOnCall?: boolean;
26
56
  }
27
57
  export interface EntrypointRef<T, R extends AbstractRequest = AbstractRequest> {
28
58
  ref?: ClientEntrypoint<T, R>;
29
59
  }
30
- export interface RefedEntrypointHandler<T, R extends AbstractRequest = AbstractRequest> {
60
+ export interface RefedEntrypointHandler<T = {}, R extends AbstractRequest = AbstractRequest> {
31
61
  (ref: EntrypointRef<T, R>): EntrypointHandler;
32
62
  }
33
63
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE9J,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,aAAa,GAAG,aAAa,CAAE,SAAQ,gBAAgB;IACzG,KAAK,EAAE,gBAAgB,CAAA;IACvB,IAAI,EAAE,cAAc,CAAC,CAAC,EA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,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,GAAG,eAAe;IAC3E,GAAG,CAAC,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,eAAe,GAAG,eAAe;IACzF,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,iBAAiB,CAAA;CAC9C"}
@@ -1,12 +1,10 @@
1
- import type { EntrypointFilter, ClientEntrypointOptions } from '../types.js';
1
+ import type { EntrypointFilter } from '../types.js';
2
2
  import type { AbstractRequest } from '@owlmeans/entrypoint';
3
- import type { EntrypointRef, RefedEntrypointHandler } from '../types.js';
4
- export { entrypoint as makeBasicEntrypoint } from '@owlmeans/entrypoint';
3
+ import type { EntrypointRef } from '../types.js';
5
4
  export { isEntrypoint } from '@owlmeans/entrypoint/utils';
6
5
  /**
7
6
  * @throws {SyntaxError} if data shape doesn't match validation
8
7
  * @throws {ClientValidationError} if request is not valid
9
8
  */
10
9
  export declare const validate: <T, R extends AbstractRequest = AbstractRequest>(ref: EntrypointRef<T, R>) => EntrypointFilter;
11
- export declare const normalizeHelperParams: <T, R extends AbstractRequest = AbstractRequest>(handler?: RefedEntrypointHandler<T, R> | ClientEntrypointOptions | boolean, opts?: ClientEntrypointOptions | boolean) => [RefedEntrypointHandler<T, R> | undefined, ClientEntrypointOptions | undefined];
12
10
  //# sourceMappingURL=entrypoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MA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Error } from '../errors.js';
3
3
  import formatsPlugin from 'ajv-formats';
4
- export { entrypoint as makeBasicEntrypoint } from '@owlmeans/entrypoint';
5
4
  export { isEntrypoint } from '@owlmeans/entrypoint/utils';
6
5
  const ajv = new Ajv({ strict: false });
7
6
  formatsPlugin(ajv);
@@ -40,12 +39,4 @@ export const validate = (ref) => async (req) => {
40
39
  }
41
40
  return true;
42
41
  };
43
- export const normalizeHelperParams = (handler, opts) => {
44
- if (typeof handler !== 'function' && handler != null) {
45
- opts = handler;
46
- handler = undefined;
47
- }
48
- opts = typeof opts === 'boolean' ? { validateOnCall: opts } : opts;
49
- return [handler, opts];
50
- };
51
42
  //# sourceMappingURL=entrypoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAGrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAGpD,OAAO,aAAa,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;AACtC,aAAa,CAAC,GAAU,CAAC,CAAA;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GACnB,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,CAAA;IAClB,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;QACf,MAAM,IAAI,WAAW,CAAC,gDAAgD,CAAC,CAAA;IACzE,CAAC;IACD,IAAI,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,WAAW,CAAC,g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