@northtalk/ts 0.8.0 → 0.9.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/{checker-Q4w7rLXk.js → checker-D74oYIhs.js} +2 -2
- package/debug.js +1 -1
- package/driver.js +1 -1
- package/{encoding-B7MCQ4ii.js → encoding-DzVFpg7k.js} +2 -2
- package/{engine-OL1BveVZ.js → engine-Bx8B63iQ.js} +6 -6
- package/{errors-VuwK669R.js → errors-CNc-xY_9.js} +1 -1
- package/{group-Ccuqwq12.js → group-CY4FKhzT.js} +8 -8
- package/{http-fetch--O27xjSW.js → http-fetch-DnpfiOWK.js} +2 -2
- package/http.js +4 -4
- package/index-CBuczWK0.d.ts +9 -0
- package/index.d.ts +3 -9
- package/index.js +15 -15
- package/{lean-D6DQfbqH.d.ts → lean-Bg_UTRj0.d.ts} +134 -5
- package/{lean-BjhQvHyr.js → lean-DTCTJUmR.js} +10 -10
- package/lean.d.ts +2 -3
- package/lean.js +15 -15
- package/{manifest-BeViDIoy.js → manifest-DVS1SEmN.js} +3 -3
- package/message-layer.js +2 -2
- package/notify.js +1 -1
- package/{objects-TarIKBL8.js → objects-OKVLH190.js} +1 -1
- package/{operations-BAELnqwf.js → operations-B3XaG7Ve.js} +113 -10
- package/package.json +1 -1
- package/{peer-capability-B8eKbljR.js → peer-capability-3etyPHs3.js} +4 -4
- package/peer.js +4 -4
- package/{readers-BG8g59qS.js → readers-G1lHqrPl.js} +1 -1
- package/{request-pump-binary-87klb6sX.js → request-pump-binary-VOPVqRZD.js} +4 -4
- package/{router-DXmPA-qi.js → router-Bdm4KiMG.js} +4 -4
- package/session.js +15 -15
- package/setup.js +5 -5
- package/sqlite.js +5 -5
- package/{store-DzpyWjt2.js → store-BTcyKBLg.js} +2 -2
- package/{store-capability-CxQJ_Huz.js → store-capability-CBJ6mUoH.js} +3 -3
- package/store.js +2 -2
- package/{user-capability-ClYd8Vln.js → user-capability-DNY2dyjq.js} +3 -3
- package/wasm.d.ts +2 -2
- package/wasm.js +13 -13
- package/{inline-grants-DmOdgSoK.js → zone-rules-DsCJtmlC.js} +88 -5
- package/manifest-l07K7nW-.d.ts +0 -124
package/manifest-l07K7nW-.d.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { Fn as Library, J as Value, K as Decimal, _ as LoadOptions, en as Core, ht as ObjectKind, jt as Grant, nn as Script, qt as Shape, tn as Group } from "./debug-s6QIovKS.js";
|
|
3
|
-
import { n as Drive, r as DrivenGroupOptions } from "./driver-D5yrK3Nu.js";
|
|
4
|
-
//#region src/talk.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Dedents NorthTalk source; rejects JS interpolation.
|
|
7
|
-
*
|
|
8
|
-
* Write NorthTalk's own interpolation as `\${…}` and its backticks as `` \` ``.
|
|
9
|
-
* Pass values as Request arguments instead of splicing them into source. The
|
|
10
|
-
* longest whitespace prefix shared by every non-blank line is removed, compared
|
|
11
|
-
* exactly, so tabs and spaces never match each other.
|
|
12
|
-
*/
|
|
13
|
-
declare const talk: (strings: TemplateStringsArray, ...values: unknown[]) => string;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/plain.d.ts
|
|
16
|
-
/** Plain JS data, as `fromValue` writes it (ADR 0119). */
|
|
17
|
-
type PlainValue = null | boolean | string | Decimal | Uint8Array | Value | PlainValue[] | {
|
|
18
|
-
[key: string]: PlainValue;
|
|
19
|
-
} | Map<string, PlainValue>;
|
|
20
|
-
type ToValueOptions = {
|
|
21
|
-
/**
|
|
22
|
-
* `integer` reads safe integers through `num`; `decimal` uses `num` for
|
|
23
|
-
* any JS number. The default refuses JS numbers.
|
|
24
|
-
*/
|
|
25
|
-
numbers?: 'refuse' | 'integer' | 'decimal';
|
|
26
|
-
};
|
|
27
|
-
type FromValueOptions = {
|
|
28
|
-
maps?: 'object' | 'map';
|
|
29
|
-
numbers?: 'decimal' | 'string';
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Plain JS data to a Value by the named constructors (ADR 0119). Anything
|
|
33
|
-
* the table doesn't name, and cyclic data, throws `invalid value`.
|
|
34
|
-
*/
|
|
35
|
-
declare const toValue: (plain: unknown, options?: ToValueOptions) => Value;
|
|
36
|
-
/** A Value as plain JS data (ADR 0119); kinds with no JS form stay Values. */
|
|
37
|
-
declare const fromValue: (v: Value, options?: FromValueOptions) => PlainValue;
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/encoding.d.ts
|
|
40
|
-
/**
|
|
41
|
-
* A Message Layer adapter's own spelling of a Function Value or a Text
|
|
42
|
-
* Pattern, which the Value Encoding doesn't hold.
|
|
43
|
-
*/
|
|
44
|
-
type AdapterEncoder = (v: Value) => string;
|
|
45
|
-
declare const encodeValue: (value: Value, adapter?: AdapterEncoder) => string;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/json.d.ts
|
|
48
|
-
/** Read exact decimal digits, NFC strings and insertion-ordered maps. */
|
|
49
|
-
declare const decodeJson: (source: string) => Value;
|
|
50
|
-
/** Compact JSON, with canonical numbers and chapter 7's string escapes. */
|
|
51
|
-
declare const encodeJson: (value: Value) => string;
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/handlers.d.ts
|
|
54
|
-
/** Untyped Handler calls accept safe-integer JS numbers and plain data. */
|
|
55
|
-
type Handlers = {
|
|
56
|
-
[name: string]: (...args: (PlainValue | number | bigint)[]) => Promise<PlainValue>;
|
|
57
|
-
};
|
|
58
|
-
/** The Host supplies T without runtime checking of its arguments or results. */
|
|
59
|
-
type ScriptWithHandlers<T = Handlers> = Script & {
|
|
60
|
-
readonly handlers: T;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Calls invoke with integer-mode toValue arguments and default fromValue answers.
|
|
64
|
-
* The Script's existing driver or Host Pump loop still runs the Requests.
|
|
65
|
-
* Promise hooks, symbols and non-message properties read as undefined.
|
|
66
|
-
*/
|
|
67
|
-
declare const handlersOf: <T = Handlers>(script: Script) => T;
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/group-helper.d.ts
|
|
70
|
-
/** A Group whose driver closes explicitly or at the end of an `await using` scope. */
|
|
71
|
-
type DrivenGroup = Omit<Group, 'load'> & Pick<Drive, 'close' | typeof Symbol.asyncDispose> & {
|
|
72
|
-
load<T = Handlers>(o: LoadOptions): ScriptWithHandlers<T>;
|
|
73
|
-
};
|
|
74
|
-
/** The Zig Host Adapter requires its asynchronously created Core. */
|
|
75
|
-
type CreateGroupOptions = DrivenGroupOptions & {
|
|
76
|
-
core: Core;
|
|
77
|
-
};
|
|
78
|
-
/** Creates a driven Group on the supplied Core; close has the driver's shutdown semantics. */
|
|
79
|
-
declare const createGroup: (o: CreateGroupOptions) => DrivenGroup;
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/inline-grants.d.ts
|
|
82
|
-
/** Argument and result types are supplied by the Host, without runtime checking. */
|
|
83
|
-
type InlineFunction = (...args: never[]) => unknown;
|
|
84
|
-
type InlineOperation = InlineFunction | {
|
|
85
|
-
arity?: number;
|
|
86
|
-
fn: InlineFunction;
|
|
87
|
-
} | {
|
|
88
|
-
arity?: number;
|
|
89
|
-
async: InlineFunction;
|
|
90
|
-
maxPendingMs?: number;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Defines one Capability per key and grants all its Operations. Arguments use
|
|
94
|
-
* default fromValue; results use integer-mode toValue. Arity is fn.length unless
|
|
95
|
-
* overridden, including for async functions, which also receive a final signal.
|
|
96
|
-
*/
|
|
97
|
-
declare const inlineGrants: (capabilities: Readonly<Record<string, Readonly<Record<string, InlineOperation>>>>) => Record<string, Grant<void>>;
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region src/manifest.d.ts
|
|
100
|
-
type MessageDecl = {
|
|
101
|
-
args?: readonly Shape[];
|
|
102
|
-
description?: string;
|
|
103
|
-
/** NorthTalk source, each sending this message. */
|
|
104
|
-
examples?: readonly string[];
|
|
105
|
-
name: string;
|
|
106
|
-
receivers?: readonly ObjectKind[];
|
|
107
|
-
};
|
|
108
|
-
type ManifestSpec = {
|
|
109
|
-
grants: Readonly<Record<string, Grant<any>>>;
|
|
110
|
-
kind: string;
|
|
111
|
-
libraries?: readonly Library[];
|
|
112
|
-
messages?: readonly MessageDecl[];
|
|
113
|
-
/** Whether the Host supplies a musical clock (chapter 9, The musical clock). */
|
|
114
|
-
musicalTime?: boolean;
|
|
115
|
-
objectKinds?: readonly ObjectKind[];
|
|
116
|
-
objects?: Readonly<Record<string, ObjectKind>>;
|
|
117
|
-
/** The Owner Kind: one of objectKinds, the kind of `me` for tooling. */
|
|
118
|
-
ownerKind?: ObjectKind;
|
|
119
|
-
version: string;
|
|
120
|
-
};
|
|
121
|
-
/** Chapter 9's deterministic JSON file, ending in LF; never calls the Host. */
|
|
122
|
-
declare const exportManifest: (m: ManifestSpec) => string;
|
|
123
|
-
//#endregion
|
|
124
|
-
export { PlainValue as _, InlineOperation as a, toValue as b, DrivenGroup as c, ScriptWithHandlers as d, handlersOf as f, FromValueOptions as g, encodeValue as h, InlineFunction as i, createGroup as l, encodeJson as m, MessageDecl as n, inlineGrants as o, decodeJson as p, exportManifest as r, CreateGroupOptions as s, ManifestSpec as t, Handlers as u, ToValueOptions as v, talk as x, fromValue as y };
|