@funcd-dev/shim 0.17.0 → 0.18.0

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/dist/blob.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // context.blob — function-facing blob over the worker-node local API (HTTP-over-UDS, ADR-0127). Dials the
2
2
  // same per-sandbox socket as context.kv/context.invoke (FUNCD_INVOKE_SOCKET); the platform routes /blob/…
3
3
  // to the binding-gated, PDP-authorized Facade with the sandbox's function identity (bind-as-grant on
4
- // spec.blob). Reached only through the built-in shim — no @aws-sdk, no keypair. The blob twin of context.kv;
4
+ // spec.bindings.blob). Reached only through the built-in shim — no @aws-sdk, no keypair. The blob twin of context.kv;
5
5
  // v1 is bytes-in-memory (streaming is a v2 follow-up).
6
6
  import { send as sendOn } from "./socket.js";
7
7
  const send = (method, path, body, member) => sendOn('context.blob', method, path, body, member);
package/dist/sql.d.ts CHANGED
@@ -18,7 +18,7 @@ export interface SQLExecResult {
18
18
  columns?: string[];
19
19
  values?: unknown[][];
20
20
  }
21
- /** A function's view of the SQL databases it binds (spec.sql), by alias. */
21
+ /** A function's view of the SQL databases it binds (spec.bindings.sql), by alias. */
22
22
  export interface SQLClient {
23
23
  query(alias: string, sql: string, params?: SQLParams): Promise<SQLRow[]>;
24
24
  queryValues(alias: string, sql: string, params?: SQLParams): Promise<SQLValues>;
package/dist/types.d.ts CHANGED
@@ -27,7 +27,7 @@ export interface CloudEvent<T = unknown> {
27
27
  export interface FunctionContext {
28
28
  /** Structured log line → stdout (collected by the platform, ADR-0010). */
29
29
  log(...args: unknown[]): void;
30
- /** Synchronously invoke a linked function by its spec.links alias (ADR-0064). The input is
30
+ /** Synchronously invoke a linked function by its spec.bindings.links alias (ADR-0064). The input is
31
31
  * validated against the target's contract by the target's shim; its result is returned. Fails
32
32
  * closed (rejects) if the caller declares no such link.
33
33
  *
@@ -36,7 +36,7 @@ export interface FunctionContext {
36
36
  * `data`, and the other keys are dropped. To send an object that has its own `data` key, wrap it in an
37
37
  * envelope: `{ specversion: '1.0', data: { data: [1], page: 2 } }`. */
38
38
  invoke<I = unknown, O = unknown>(alias: string, input: I): Promise<O>;
39
- /** Send an HTTP request to a linked Function that serves HTTP (spec.protocol: http) by its spec.links alias
39
+ /** Send an HTTP request to a linked Function that serves HTTP (spec.protocol: http) by its spec.bindings.links alias
40
40
  * (funcd ADR-0243). `path` starts with "/" and may carry a query. The reply comes back whole, at most 1 MiB, with
41
41
  * its status and headers; funcd answers an error status, and calls nothing, for an undeclared link or a target
42
42
  * that does not serve HTTP (call it with invoke). */
@@ -53,7 +53,7 @@ export interface FunctionContext {
53
53
  config: ConfigClient;
54
54
  /** The keys of the Secrets a function binds (funcd ADR-0245). */
55
55
  secret: SecretClient;
56
- /** A bound catalog's proxy URL and this function's token, by spec.catalogs alias (funcd ADR-0245). */
56
+ /** A bound catalog's proxy URL and this function's token, by spec.bindings.catalog alias (funcd ADR-0245). */
57
57
  catalog: CatalogClient;
58
58
  /** Milliseconds left before the call's deadline (X-Funcd-Timeout-Ms), floored at 0; null without one (ADR-0226). */
59
59
  remainingMs(): number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funcd-dev/shim",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "Types and the contract build for writing funcd functions in TypeScript",
6
6
  "license": "Apache-2.0",