@northtalk/ts 0.7.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/{binary-value-M8v567iA.d.ts → binary-value-B93hEK7l.d.ts} +1 -1
- package/{checker-Coml0Tf9.js → checker-D74oYIhs.js} +21 -16
- package/{core-D4qYURer.d.ts → core-BBPI6EhG.d.ts} +1 -1
- package/{debug-C_Ob5rkl.d.ts → debug-s6QIovKS.d.ts} +18 -3
- package/debug.d.ts +1 -1
- package/debug.js +1 -1
- package/{driver-CLi_OmyQ.d.ts → driver-D5yrK3Nu.d.ts} +1 -1
- package/driver.d.ts +1 -1
- package/driver.js +1 -1
- package/{encoding-BL2ECJmg.js → encoding-DzVFpg7k.js} +2 -2
- package/{engine-DhBk0lTt.js → engine-Bx8B63iQ.js} +6 -6
- package/{engine-BBNHy4-F.d.ts → engine-Dy-BCoiw.d.ts} +2 -2
- package/{errors-P3ga1I-9.js → errors-CNc-xY_9.js} +35 -4
- package/{group-BqccKTWz.js → group-CY4FKhzT.js} +122 -54
- package/{http-fetch-DA-NbFIM.js → http-fetch-DnpfiOWK.js} +2 -2
- package/http.d.ts +1 -1
- package/http.js +4 -4
- package/index.d.ts +5 -5
- package/index.js +15 -15
- package/{lean-CFLJ9VrX.d.ts → lean-Bg_UTRj0.d.ts} +20 -5
- package/{lean-BJmLobmd.js → lean-DTCTJUmR.js} +10 -10
- package/lean.d.ts +5 -5
- package/lean.js +15 -15
- package/{manifest-37x-HSxH.js → manifest-DVS1SEmN.js} +3 -3
- package/message-layer.d.ts +2 -2
- package/message-layer.js +2 -2
- package/notify.d.ts +1 -1
- package/notify.js +1 -1
- package/{objects-DE6kRk0r.js → objects-OKVLH190.js} +1 -1
- package/{objects-DVlpWsi0.d.ts → objects-q0lnCK-4.d.ts} +2 -1
- package/{operations-CGjDlkGU.js → operations-B3XaG7Ve.js} +174 -54
- package/package.json +1 -1
- package/{peer-capability-elnbQy-J.js → peer-capability-3etyPHs3.js} +7 -5
- package/peer.d.ts +8 -1
- package/peer.js +29 -12
- package/{readers-ChQ0e92c.d.ts → readers-AeB1bJ--.d.ts} +1 -1
- package/{readers-yMS1eAOp.js → readers-G1lHqrPl.js} +1 -1
- package/{request-pump-binary-BS1J8DF2.js → request-pump-binary-VOPVqRZD.js} +9 -4
- package/{router-Bm7A2kjt.js → router-Bdm4KiMG.js} +4 -4
- package/{router-D0rf5SkW.d.ts → router-DXoJ_2Z4.d.ts} +2 -2
- package/session.d.ts +2 -2
- package/session.js +15 -15
- package/setup.d.ts +2 -2
- package/setup.js +6 -5
- package/sqlite.d.ts +2 -2
- package/sqlite.js +5 -5
- package/{store-D80OlpyG.js → store-BTcyKBLg.js} +2 -2
- package/{store-capability-DBLlWaNO.js → store-capability-CBJ6mUoH.js} +3 -3
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-D6hGa3eF.js → user-capability-DNY2dyjq.js} +3 -3
- package/wasm.d.ts +5 -5
- package/wasm.js +15 -13
- package/{inline-grants-BT2nnfLA.js → zone-rules-DsCJtmlC.js} +88 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { I as literalDigits, _n as unitKinds, _t as unitText, ft as parseUnit, gn as libraryExports, gt as unitEntry, hn as grammar, mn as diagnosticCodes, pn as builtins, sn as normalizeNFC, st as UnitError, vn as units } from "./errors-CNc-xY_9.js";
|
|
3
|
+
import { Mt as Lexer, Nt as RESERVED, Pt as runTask, _t as acceptsArgumentCount } from "./operations-B3XaG7Ve.js";
|
|
4
4
|
//#region src/constructs.ts
|
|
5
5
|
/** Chapter 3's kind names. */
|
|
6
6
|
const kindNames = /* @__PURE__ */ new Set([
|
|
@@ -3097,13 +3097,14 @@ const firstLeaf = (e) => {
|
|
|
3097
3097
|
while (!isLeaf(current)) current = current.children[0];
|
|
3098
3098
|
return current;
|
|
3099
3099
|
};
|
|
3100
|
+
const isJoin = (n) => n.rule === "Wait" && word(n.children[1], "for") && word(n.children[2], "all");
|
|
3100
3101
|
const WAITING_RULES = /* @__PURE__ */ new Set([
|
|
3101
3102
|
"Send",
|
|
3102
3103
|
"AskTell",
|
|
3103
3104
|
"OperationLine",
|
|
3104
3105
|
"SimpleStatement"
|
|
3105
3106
|
]);
|
|
3106
|
-
const factsOf = (root, report, lambdas) => {
|
|
3107
|
+
const factsOf = (root, report, lambdas, forbid) => {
|
|
3107
3108
|
const facts = {
|
|
3108
3109
|
commands: [],
|
|
3109
3110
|
calls: [],
|
|
@@ -3111,17 +3112,18 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3111
3112
|
};
|
|
3112
3113
|
const work = root.children.flatMap((c) => c.kind === "node" ? [{
|
|
3113
3114
|
node: c,
|
|
3114
|
-
cleanup: false
|
|
3115
|
+
cleanup: false,
|
|
3116
|
+
join: false
|
|
3115
3117
|
}] : []);
|
|
3116
3118
|
while (work.length) {
|
|
3117
|
-
const { node, cleanup } = work.pop();
|
|
3119
|
+
const { node, cleanup, join } = work.pop();
|
|
3118
3120
|
if (node.rule === "Lambda") {
|
|
3119
3121
|
lambdas.push(node);
|
|
3120
3122
|
continue;
|
|
3121
3123
|
}
|
|
3122
3124
|
const point = (leaf) => {
|
|
3123
3125
|
facts.points.push(leaf);
|
|
3124
|
-
if (cleanup) report("can't suspend here", leaf);
|
|
3126
|
+
if (cleanup || forbid) report("can't suspend here", leaf);
|
|
3125
3127
|
};
|
|
3126
3128
|
const waits = WAITING_RULES.has(node.rule) && has(node, "AndWait");
|
|
3127
3129
|
switch (node.rule) {
|
|
@@ -3130,11 +3132,11 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3130
3132
|
break;
|
|
3131
3133
|
case "Send":
|
|
3132
3134
|
if (has(node, "ResultTarget") && !waits) report("missing and wait", firstLeaf(node));
|
|
3133
|
-
if (waits) point(firstLeaf(node));
|
|
3135
|
+
if (waits && !join) point(firstLeaf(node));
|
|
3134
3136
|
break;
|
|
3135
3137
|
case "AskTell":
|
|
3136
3138
|
case "OperationLine":
|
|
3137
|
-
if (waits) point(firstLeaf(node));
|
|
3139
|
+
if (waits && !join) point(firstLeaf(node));
|
|
3138
3140
|
break;
|
|
3139
3141
|
case "SimpleStatement": {
|
|
3140
3142
|
const [head] = node.children;
|
|
@@ -3148,7 +3150,7 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3148
3150
|
binding,
|
|
3149
3151
|
name: head,
|
|
3150
3152
|
wait: waits,
|
|
3151
|
-
restricted: cleanup
|
|
3153
|
+
restricted: cleanup || forbid
|
|
3152
3154
|
});
|
|
3153
3155
|
if (waits && cleanup) report("can't suspend here", head);
|
|
3154
3156
|
} else if (has(node, "ResultTarget") && !waits && !hostCommands.has(node)) report("missing and wait", head);
|
|
@@ -3161,7 +3163,7 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3161
3163
|
if (name?.kind === "name" && (name.binding?.kind === "function" || name.binding?.kind === "handler")) facts.calls.push({
|
|
3162
3164
|
binding: name.binding,
|
|
3163
3165
|
name,
|
|
3164
|
-
restricted: cleanup
|
|
3166
|
+
restricted: cleanup || forbid
|
|
3165
3167
|
});
|
|
3166
3168
|
break;
|
|
3167
3169
|
}
|
|
@@ -3172,7 +3174,8 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3172
3174
|
const inFinally = cleanup || word(node.children[i - 1], "finally") || recoveryBody(node, i);
|
|
3173
3175
|
work.push({
|
|
3174
3176
|
node: child,
|
|
3175
|
-
cleanup: inFinally
|
|
3177
|
+
cleanup: inFinally,
|
|
3178
|
+
join: join || isJoin(node)
|
|
3176
3179
|
});
|
|
3177
3180
|
}
|
|
3178
3181
|
}
|
|
@@ -3181,9 +3184,11 @@ const factsOf = (root, report, lambdas) => {
|
|
|
3181
3184
|
};
|
|
3182
3185
|
/**
|
|
3183
3186
|
* Check a unit's Suspension Points, and give whether each of its Handlers
|
|
3184
|
-
* may suspend, by name, for the Libraries that export them.
|
|
3187
|
+
* may suspend, by name, for the Libraries that export them. With `forbid`,
|
|
3188
|
+
* every Suspension Point, and every call to a Handler that may reach one, is
|
|
3189
|
+
* `can't suspend here`.
|
|
3185
3190
|
*/
|
|
3186
|
-
const checkSuspension = (root, imported, reportTo) => {
|
|
3191
|
+
const checkSuspension = (root, imported, reportTo, forbid = false) => {
|
|
3187
3192
|
const seen = /* @__PURE__ */ new Set();
|
|
3188
3193
|
const report = (code, at) => {
|
|
3189
3194
|
if (!seen.has(at)) {
|
|
@@ -3202,7 +3207,7 @@ const checkSuspension = (root, imported, reportTo) => {
|
|
|
3202
3207
|
bodies.push({
|
|
3203
3208
|
kind: node.rule === "Handler" ? "handler" : "function",
|
|
3204
3209
|
name: named ? firstLeaf(named).text : node.rule === "Handler" ? "any message" : "",
|
|
3205
|
-
facts: factsOf(node, report, lambdas)
|
|
3210
|
+
facts: factsOf(node, report, lambdas, forbid)
|
|
3206
3211
|
});
|
|
3207
3212
|
}
|
|
3208
3213
|
}
|
|
@@ -3210,7 +3215,7 @@ const checkSuspension = (root, imported, reportTo) => {
|
|
|
3210
3215
|
while (lambdas.length) bodies.push({
|
|
3211
3216
|
kind: "lambda",
|
|
3212
3217
|
name: "",
|
|
3213
|
-
facts: factsOf(lambdas.pop(), report, lambdas)
|
|
3218
|
+
facts: factsOf(lambdas.pop(), report, lambdas, forbid)
|
|
3214
3219
|
});
|
|
3215
3220
|
const may = /* @__PURE__ */ new Map();
|
|
3216
3221
|
for (const b of bodies) if (b.kind === "handler") may.set(b.name, (may.get(b.name) ?? false) || b.facts.points.length > 0);
|
|
@@ -7339,7 +7344,7 @@ const checkParsed = (syntax, options) => {
|
|
|
7339
7344
|
const existing = options.existing?.[binding.name];
|
|
7340
7345
|
return (binding.kind === "handler" && existing?.handler ? existing.handler : existing)?.maySuspend === true || typeof exp === "object" && exp.maySuspend === true;
|
|
7341
7346
|
};
|
|
7342
|
-
const may = checkSuspension(root, importedSuspension, reportAt);
|
|
7347
|
+
const may = checkSuspension(root, importedSuspension, reportAt, options.forbidSuspension === true);
|
|
7343
7348
|
checkDecisions(root, (binding) => binding.importedFrom ? importedSuspension(binding) : may.get(binding.name) ?? false, reportAt);
|
|
7344
7349
|
diagnostics.sort((a, b) => a.span.start - b.span.start || diagnosticCodes.indexOf(a.code) - diagnosticCodes.indexOf(b.code));
|
|
7345
7350
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { B as restore,
|
|
2
|
+
import { B as restore, Bn as compileLibrary, en as Core, vt as defineObjectKind, z as newGroup } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/save-format.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A save's State Fingerprint (ADR 0142), read from its header and frames
|
|
@@ -2182,7 +2182,9 @@ declare const peerKind: ObjectKind<unknown>;
|
|
|
2182
2182
|
* `expose` hears `null` for an unnamed exposure. `unexpose` hears a name or
|
|
2183
2183
|
* a Peer. `post` and `call` hear the Peer, the Selector and the arguments,
|
|
2184
2184
|
* which may hold Peers. `caller` gives the Caller Identity recorded for
|
|
2185
|
-
* `call.delivery`, or Nothing.
|
|
2185
|
+
* `call.delivery`, or Nothing. The optional `release` is the Grant release
|
|
2186
|
+
* hook, for withdrawing the exposures a Grant made when it stops being
|
|
2187
|
+
* effective.
|
|
2186
2188
|
*/
|
|
2187
2189
|
type PeerImpl = {
|
|
2188
2190
|
call(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
@@ -2191,6 +2193,7 @@ type PeerImpl = {
|
|
|
2191
2193
|
expose(call: Call<unknown>, name?: string): void;
|
|
2192
2194
|
post(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
2193
2195
|
reach(call: Call<unknown>, address: string): void;
|
|
2196
|
+
release?(context: GrantContext<unknown>): void;
|
|
2194
2197
|
unexpose(call: Call<unknown>, exposure: string | HostObject): void;
|
|
2195
2198
|
};
|
|
2196
2199
|
/**
|
|
@@ -2609,6 +2612,10 @@ declare function defineCapability<B>(): CapabilityDefiner<B>;
|
|
|
2609
2612
|
* by their names, or a map from the name each is granted under.
|
|
2610
2613
|
*/
|
|
2611
2614
|
declare const operationDeclarations: (capabilities: ReadonlyMap<string, CapabilityDef<unknown>> | Iterable<CapabilityDef<unknown>>) => GrantDecls;
|
|
2615
|
+
/** True exactly when `v` fits `s`, with a Capability argument's acceptance (ADR 0176). */
|
|
2616
|
+
declare const conforms: (v: Value, s: Shape) => boolean;
|
|
2617
|
+
/** The `explain` Built-in's report for `v` against `s` (ADR 0176). */
|
|
2618
|
+
declare const explain: (v: Value, s: Shape) => Value;
|
|
2612
2619
|
//#endregion
|
|
2613
2620
|
//#region src/effects.d.ts
|
|
2614
2621
|
type OperationMode = 'immediate' | 'suspending' | 'fire-and-forget';
|
|
@@ -2964,6 +2971,8 @@ type TsRestoreOptions = RestoreOptions & {
|
|
|
2964
2971
|
session?: SessionPort;
|
|
2965
2972
|
};
|
|
2966
2973
|
type LoadOptions = {
|
|
2974
|
+
/** Refuse any possible Suspension Point as `can't suspend here`; kept by Reload, Extend, Library replacement and restore (ADR 0178). */
|
|
2975
|
+
forbidSuspension?: boolean;
|
|
2967
2976
|
/** Its Grants, by the name the Script uses for each. */
|
|
2968
2977
|
grants?: Readonly<Record<string, Grant<any>>>;
|
|
2969
2978
|
/** Keep only Operations used by this source and its Libraries. */
|
|
@@ -3195,6 +3204,7 @@ type MessageView = {
|
|
|
3195
3204
|
type Inspection = {
|
|
3196
3205
|
scripts: {
|
|
3197
3206
|
disabledGrants?: string[];
|
|
3207
|
+
forbidSuspension?: true;
|
|
3198
3208
|
mailbox: MessageView[];
|
|
3199
3209
|
name: string;
|
|
3200
3210
|
runs: RunView[];
|
|
@@ -3264,6 +3274,8 @@ declare class TsGroup implements Group {
|
|
|
3264
3274
|
private accounting;
|
|
3265
3275
|
private discardReason;
|
|
3266
3276
|
private inputs;
|
|
3277
|
+
private urgentInputs;
|
|
3278
|
+
private chargeInputs;
|
|
3267
3279
|
private deliveries;
|
|
3268
3280
|
private broadcasts;
|
|
3269
3281
|
/**
|
|
@@ -3323,7 +3335,7 @@ declare class TsGroup implements Group {
|
|
|
3323
3335
|
private evaluationHost;
|
|
3324
3336
|
private advanceDebugPump;
|
|
3325
3337
|
private attachSession;
|
|
3326
|
-
/** Worker. A Fingerprint covers code, declarations and
|
|
3338
|
+
/** Worker. A Fingerprint covers code, declarations, limits and `forbidSuspension`, never state. */
|
|
3327
3339
|
fingerprint(): Uint8Array;
|
|
3328
3340
|
save(o?: SaveOptions): Uint8Array;
|
|
3329
3341
|
/** Worker. Refused as a save would be, but writes no Trace record. */
|
|
@@ -3388,6 +3400,7 @@ declare class TsGroup implements Group {
|
|
|
3388
3400
|
private queueRevoke;
|
|
3389
3401
|
private applyInput;
|
|
3390
3402
|
private runsOf;
|
|
3403
|
+
private findRun;
|
|
3391
3404
|
private forgetWait;
|
|
3392
3405
|
private cancelRunning;
|
|
3393
3406
|
/**
|
|
@@ -3412,6 +3425,8 @@ declare class TsGroup implements Group {
|
|
|
3412
3425
|
private dropStoppedMailbox;
|
|
3413
3426
|
private acceptDelivery;
|
|
3414
3427
|
private recordRefusal;
|
|
3428
|
+
private pushInput;
|
|
3429
|
+
private setInputs;
|
|
3415
3430
|
private landUrgentInputs;
|
|
3416
3431
|
constructor(options: TsGroupOptions);
|
|
3417
3432
|
script(name: string): TsScript | undefined;
|
|
@@ -3663,4 +3678,4 @@ declare class DebugController {
|
|
|
3663
3678
|
enter(pause: DebugPause): void;
|
|
3664
3679
|
}
|
|
3665
3680
|
//#endregion
|
|
3666
|
-
export { instant as $,
|
|
3681
|
+
export { instant as $, NotImplementedError as $n, shape as $t, ScriptSources as A, calendarCapability as An, SourceSpan as Ar, FireOp as At, restore as B, compileLibrary as Bn, syntaxSelector as Br, ReleaseHook as Bt, Report as C, LocaleImpl as Cn, NameRole as Cr, ChargeRequest as Ct, RunEvent as D, Costs as Dn, SemanticScope as Dr, EffectResult as Dt, RestoreResult as E, ConsoleImpl as En, SemanticNode as Er, Cost as Et, TsGroupOptions as F, Library as Fn, SyntaxElement as Fr, Metering as Ft, RunStarted as G, Run as Gn, SegmentGrant as Gt, RunAccounting as H, LimitName as Hn, ScopeDecl as Ht, TsRestoreOptions as I, LibraryOptions as In, SyntaxErrorCode as Ir, Operation as It, Value as J, UnitLoadError as Jn, SuspendingOp as Jt, Decimal as K, RunRecord as Kn, SegmentLifecycle as Kt, TsScript as L, LibrarySource as Ln, SyntaxNode as Lr, Operations as Lt, SessionPort as M, consoleCapability as Mn, Mode as Mr, GrantContext as Mt, Settlement as N, musicalClockCapability as Nn, TokType as Nr, ImmediateOp as Nt, SaveOptions as O, MusicalClockImpl as On, SemanticToken as Or, ErrorDecl as Ot, TsGroup as P, timerCapability as Pn, Token as Pr, LimitReached as Pt, dec as Q, loadScript as Qn, operationDeclarations as Qt, Verdict as R, OperationRef as Rn, SyntaxRule as Rr, PlainArg as Rt, PumpedRequest as S, sqliteCapability as Sn, LibraryExport as Sr, CapabilityDefiner as St, RestoreOptions as T, CalendarImpl as Tn, SemanticName as Tr, CoordinatedLifecycle as Tt, RunAncestry as U, Limits as Un, SegmentContext as Ut, CausalWork as V, replacementLibraries as Vn, syntaxText as Vr, ReleaseReason as Vt, RunDiscarded as W, Outcome as Wn, SegmentCoordinator as Wt, bytes as X, defaultLimits as Xn, defineCapability as Xt, bool as Y, callFunction as Yn, conforms as Yt, civilDate as Z, deliver as Zn, explain as Zt, LoadOptions as _, SqlParams as _n, disassemble as _r, PropDef as _t, DebugPause as a, PeerImpl as an, LoadError as ar, quantity as at, PumpOptions as b, SqliteBinding as bn, ExportKind as br, Call as bt, RepeatedEffect as c, HttpClientImpl as cn, SendFailedReason as cr, sourceForm as ct, Counters as d, httpCapability as dn, CodeUnit as dr, nowMicros as dt, Core as en, canConvert as er, isReadable as et, Decided as f, UserImpl as fn, EventBranch as fr, parseInstant as ft, Inspection as g, storeCapability as gn, UnwindEntry as gr, ObjectKindDef as gt, GroupOptions as h, add as hn, Operand as hr, ObjectKind as ht, DebugInstruction as i, coreVersions as in, LoadDiagnostic as ir, num as it, SessionControls as j, clockCapability as jn, Lexer as jr, Grant as jt, ScriptCodeRequest as k, TimerImpl as kn, SemanticTree as kr, FieldShape as kt, CancellationOptions as l, HttpImpl as ln, Body as lr, text as lt, EffectFailure as m, StoreImpl as mn, Instruction as mr, ObjectElements as mt, DebugEvaluation as n, Script as nn, HostError as nr, map as nt, DebugSnapshot as o, peerCapability as on, MailboxFull as or, range as ot, Deciding as p, userCapability as pn, EventEntry as pr, HostObject as pt, Kind as q, Script$1 as qn, Shape as qt, DebugFrame as r, Versions as rn, HostErrorCode as rr, nothing as rt, DebugSource as s, peerKind as sn, ScriptError as sr, record as st, DebugController as t, Group as tn, waitUs as tr, list as tt, CarryOver as u, HttpServerImpl as un, BodyKind as ur, formatInstant as ut, Message as v, SqlRows as vn, Binding as vr, defineObjectKind as vt, Requested as w, localeCapability as wn, SemanticElement as wr, ChargeResult as wt, PumpResult as x, SqliteImpl as xn, FunctionContract as xr, CapabilityDef as xt, PendingCall as y, SqlValue as yn, BindingKind as yr, GrantDecls as yt, newGroup as z, codeIdentity as zn, Trivia as zr, PlainResult as zt };
|
package/debug.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { a as DebugPause, c as RepeatedEffect, ct as sourceForm, et as isReadable, i as DebugInstruction, n as DebugEvaluation, o as DebugSnapshot, r as DebugFrame, s as DebugSource, t as DebugController } from "./debug-
|
|
2
|
+
import { a as DebugPause, c as RepeatedEffect, ct as sourceForm, et as isReadable, i as DebugInstruction, n as DebugEvaluation, o as DebugSnapshot, r as DebugFrame, s as DebugSource, t as DebugController } from "./debug-s6QIovKS.js";
|
|
3
3
|
export { type DebugController, type DebugEvaluation, type DebugFrame, type DebugInstruction, type DebugPause, type DebugSnapshot, type DebugSource, type RepeatedEffect, isReadable, sourceForm };
|
package/debug.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { A as isReadable, rt as sourceForm } from "./errors-CNc-xY_9.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
2
|
+
import { b as PumpOptions, h as GroupOptions, tn as Group, x as PumpResult } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/operation-promises.d.ts
|
|
4
4
|
/** A suspending call whose Host `run` Promise has not settled. */
|
|
5
5
|
type PendingOperation = {
|
package/driver.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { a as autoDrive, i as asyncDispose, n as Drive, o as newDrivenGroup, r as DrivenGroupOptions, s as PendingOperation, t as AutoDriveOptions } from "./driver-
|
|
2
|
+
import { a as autoDrive, i as asyncDispose, n as Drive, o as newDrivenGroup, r as DrivenGroupOptions, s as PendingOperation, t as AutoDriveOptions } from "./driver-D5yrK3Nu.js";
|
|
3
3
|
export { AutoDriveOptions, Drive, DrivenGroupOptions, type PendingOperation, asyncDispose, autoDrive, newDrivenGroup };
|
package/driver.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Xt as nowMicros } from "./errors-CNc-xY_9.js";
|
|
3
3
|
import { r as waitForOperations, t as pendingOperations } from "./operation-promises-ClA1BTaS.js";
|
|
4
4
|
//#region src/driver.ts
|
|
5
5
|
/** Creates a Group on `core` ready to drive queued Inputs from the Host's event loop. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { D as instant, Z as requireValue, it as text, o as invalidValue, t as HostError } from "./errors-CNc-xY_9.js";
|
|
3
|
+
import { n as ScriptError, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
|
|
4
4
|
import { n as toBase64 } from "./base64-CDO-a06R.js";
|
|
5
5
|
//#region src/standard-capability-checks.ts
|
|
6
6
|
const checks = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { Q as sizeOf, ut as compareText } from "./operations-
|
|
4
|
-
import { i as decodeValueMembers } from "./readers-
|
|
5
|
-
import { n as quoteJSON, t as encodeValue } from "./encoding-
|
|
6
|
-
import { n as hostScriptError, t as add } from "./store-capability-
|
|
7
|
-
import { n as createRouter, t as changed } from "./router-
|
|
2
|
+
import { P as listValues, V as nothing, b as dec, it as text, o as invalidValue } from "./errors-CNc-xY_9.js";
|
|
3
|
+
import { Q as sizeOf, ut as compareText } from "./operations-B3XaG7Ve.js";
|
|
4
|
+
import { i as decodeValueMembers } from "./readers-G1lHqrPl.js";
|
|
5
|
+
import { n as quoteJSON, t as encodeValue } from "./encoding-DzVFpg7k.js";
|
|
6
|
+
import { n as hostScriptError, t as add } from "./store-capability-CBJ6mUoH.js";
|
|
7
|
+
import { n as createRouter, t as changed } from "./router-Bdm4KiMG.js";
|
|
8
8
|
//#region src/store/engine.ts
|
|
9
9
|
/** The Session Store's quotas (chapter 12, The Session Store). */
|
|
10
10
|
const sessionQuotas = Object.freeze({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { Dt as EffectResult, J as Value, Mt as GrantContext, Ut as SegmentContext, bt as Call,
|
|
3
|
-
import { i as WatchLimits, n as RouterOptions, t as NotificationRouter } from "./router-
|
|
2
|
+
import { Dt as EffectResult, J as Value, Mt as GrantContext, Ut as SegmentContext, bt as Call, mn as StoreImpl } from "./debug-s6QIovKS.js";
|
|
3
|
+
import { i as WatchLimits, n as RouterOptions, t as NotificationRouter } from "./router-DXoJ_2Z4.js";
|
|
4
4
|
//#region src/store/engine.d.ts
|
|
5
5
|
/** A Store's limits, each counted by logical size (chapter 8). */
|
|
6
6
|
type StoreQuotas = {
|
|
@@ -1247,7 +1247,7 @@ const builtins = [
|
|
|
1247
1247
|
"kind": "function",
|
|
1248
1248
|
"contract": {
|
|
1249
1249
|
"required": 2,
|
|
1250
|
-
"total":
|
|
1250
|
+
"total": 3,
|
|
1251
1251
|
"variadic": false
|
|
1252
1252
|
}
|
|
1253
1253
|
},
|
|
@@ -2567,6 +2567,20 @@ const characterJoinEnd = (s) => {
|
|
|
2567
2567
|
};
|
|
2568
2568
|
const asciiOnly = /^[\u0000-\u007f]*$/;
|
|
2569
2569
|
const isASCII = (s) => asciiOnly.test(s);
|
|
2570
|
+
/** The UTF-8 byte count of `s`, as TextEncoder would encode it, unallocated. */
|
|
2571
|
+
const utf8Length = (s) => {
|
|
2572
|
+
let bytes = s.length;
|
|
2573
|
+
for (let i = 0; i < s.length; i++) {
|
|
2574
|
+
const c = s.charCodeAt(i);
|
|
2575
|
+
if (c < 128) continue;
|
|
2576
|
+
if (c < 2048) bytes += 1;
|
|
2577
|
+
else if (c >= 55296 && c <= 56319 && (s.charCodeAt(i + 1) & 64512) === 56320) {
|
|
2578
|
+
bytes += 2;
|
|
2579
|
+
i++;
|
|
2580
|
+
} else bytes += 2;
|
|
2581
|
+
}
|
|
2582
|
+
return bytes;
|
|
2583
|
+
};
|
|
2570
2584
|
/** Slices `s` at Character boundaries from characterBoundaries. */
|
|
2571
2585
|
const charactersAt = (s, boundaries) => {
|
|
2572
2586
|
const result = new Array(boundaries.length - 1);
|
|
@@ -2648,7 +2662,6 @@ const lower = (s) => {
|
|
|
2648
2662
|
};
|
|
2649
2663
|
//#endregion
|
|
2650
2664
|
//#region src/text-storage.ts
|
|
2651
|
-
const encoder = new TextEncoder();
|
|
2652
2665
|
const headOf = (text, boundaries) => {
|
|
2653
2666
|
const end = characterJoinEnd(text);
|
|
2654
2667
|
let count = 1;
|
|
@@ -2674,7 +2687,7 @@ var TextStorage = class TextStorage {
|
|
|
2674
2687
|
this.#utf8 = ascii ? text.length : void 0;
|
|
2675
2688
|
}
|
|
2676
2689
|
get utf8Length() {
|
|
2677
|
-
return this.#utf8 ??=
|
|
2690
|
+
return this.#utf8 ??= utf8Length(this.text);
|
|
2678
2691
|
}
|
|
2679
2692
|
get characterCount() {
|
|
2680
2693
|
if (this.#count === void 0) {
|
|
@@ -3449,6 +3462,14 @@ let isDecimal;
|
|
|
3449
3462
|
let ownedMapPairs;
|
|
3450
3463
|
/** Internal: immutable Text storage and its cached derived facts. */
|
|
3451
3464
|
let textStorage;
|
|
3465
|
+
/**
|
|
3466
|
+
* Internal: a Value's cached logical size and contents (costs.ts), or -1
|
|
3467
|
+
* before either is known. Caching never changes what the Value is.
|
|
3468
|
+
*/
|
|
3469
|
+
let knownSize;
|
|
3470
|
+
let knownContents;
|
|
3471
|
+
let cacheSize;
|
|
3472
|
+
let cacheContents;
|
|
3452
3473
|
let textValue;
|
|
3453
3474
|
var Decimal = class Decimal {
|
|
3454
3475
|
#canonical;
|
|
@@ -3492,6 +3513,8 @@ var Decimal = class Decimal {
|
|
|
3492
3513
|
var Value = class Value {
|
|
3493
3514
|
#data;
|
|
3494
3515
|
#kind;
|
|
3516
|
+
#size = -1;
|
|
3517
|
+
#contents = -1;
|
|
3495
3518
|
constructor(token, kind, payload) {
|
|
3496
3519
|
if (token !== valueToken) invalidValue("Use a named Value constructor");
|
|
3497
3520
|
this.#kind = kind;
|
|
@@ -3502,6 +3525,14 @@ var Value = class Value {
|
|
|
3502
3525
|
makeValue = (kind, payload) => new Value(valueToken, kind, payload);
|
|
3503
3526
|
ownedMapPairs = (value) => value.#kind === "map" ? value.#data.pairs() : void 0;
|
|
3504
3527
|
textStorage = (value) => value.#data;
|
|
3528
|
+
knownSize = (value) => value.#size;
|
|
3529
|
+
knownContents = (value) => value.#contents;
|
|
3530
|
+
cacheSize = (value, size) => {
|
|
3531
|
+
value.#size = size;
|
|
3532
|
+
};
|
|
3533
|
+
cacheContents = (value, contents) => {
|
|
3534
|
+
value.#contents = contents;
|
|
3535
|
+
};
|
|
3505
3536
|
textValue = (storage) => makeValue("text", storage);
|
|
3506
3537
|
editListValue = (current, i, value) => makeValue("list", current.#data.set(i, value));
|
|
3507
3538
|
editMapValue = (current, key, value) => {
|
|
@@ -4243,4 +4274,4 @@ var ScriptError = class extends Error {
|
|
|
4243
4274
|
const sendFailed = (reason, error) => new ScriptError("send failed", `No answer came: the receiver's Run ended ${reason}`, map([["reason", text(reason)], ...error ? [["error", error]] : []]));
|
|
4244
4275
|
const hostDetail = (error) => error instanceof Error ? `${error.name}: ${error.message}` : `the Host threw ${typeof error === "symbol" ? error.toString() : String(error)}`;
|
|
4245
4276
|
//#endregion
|
|
4246
|
-
export {
|
|
4277
|
+
export { smallCoefficient as $, parseInstantText as $t, isReadable as A, multiply as At, mapWithEntry as B, checkInstant as Bt, extendList as C, digitsOf as Ct, instant as D, integerOf as Dt, hiddenCodePoint as E, formatDec as Et, listWithItem as F, withinLimits as Ft, patternValue as G, civilUs as Gt, num as H, civilFromFields as Ht, literalDigits as I, DateRangeError as It, range as J, isInstant as Jt, quantity as K, dayOfYear as Kt, map as L, US_PER_DAY as Lt, knownSize as M, powerInteger as Mt, list as N, roundRatio as Nt, instantOf as O, isInteger as Ot, listValues as P, subtract as Pt, sliceText as Q, parseInstant as Qt, mapLayout as R, US_PER_SECOND as Rt, displayText as S, digitCount as St, functionsBelongTo as T, divide as Tt, objectValue as U, civilOfDays as Ut, nothing as V, civilDays as Vt, ownedMapPairs as W, civilOfUs as Wt, requireArgs as X, nowMicros as Xt, record as Y, isoWeek as Yt, requireValue as Z, parseCivil as Zt, civilOf as _, unitKinds as _n, unitText as _t, hostDetail as a, isWhiteSpace as an, textStorage as at, dec as b, compareDec as bt, Decimal as c, scalarCount as cn, combine as ct, bytes as d, utf8Length as dn, ownUnit as dt, weekday as en, smallDecimalNumber as et, bytesOf as f, unicodeVersion as fn, parseUnit as ft, civilDate as g, libraryExports as gn, unitEntry as gt, canonicalNumber as h, grammar as hn, toBase as ht, ScriptError as i, generalCategory as in, text as it, knownContents as j, negate as jt, isDecimal as k, mod as kt, Value as l, simpleFold as ln, fromBase as lt, cacheSize as m, diagnosticCodes as mn, sameDimension as mt, LoadError as n, characterBoundaries as nn, smallInteger as nt, invalidValue as o, lower as on, trimWhiteSpace as ot, cacheContents as p, builtins as pn, powerOf as pt, quantityOf as q, formatInstant as qt, MailboxFull as r, charactersAt as rn, sourceForm as rt, sendFailed as s, normalizeNFC as sn, UnitError as st, HostError as t, assertScalarText as tn, smallExponent as tt, bool as u, upper as un, musicalKind as ut, compareBytes as v, units as vn, ArithmeticError as vt, functionValue as w, div as wt, decimalParts as x, decOf as xt, concatText as y, add as yt, mapOfLayout as z, addMonths as zt };
|