@northtalk/ts 0.7.0 → 0.8.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-Q4w7rLXk.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-B7MCQ4ii.js} +2 -2
- package/{engine-BBNHy4-F.d.ts → engine-Dy-BCoiw.d.ts} +2 -2
- package/{engine-DhBk0lTt.js → engine-OL1BveVZ.js} +6 -6
- package/{errors-P3ga1I-9.js → errors-VuwK669R.js} +34 -3
- package/{group-BqccKTWz.js → group-Ccuqwq12.js} +122 -54
- package/{http-fetch-DA-NbFIM.js → http-fetch--O27xjSW.js} +2 -2
- package/http.d.ts +1 -1
- package/http.js +4 -4
- package/index.d.ts +12 -6
- package/index.js +15 -15
- package/{inline-grants-BT2nnfLA.js → inline-grants-DmOdgSoK.js} +4 -4
- package/{lean-BJmLobmd.js → lean-BjhQvHyr.js} +10 -10
- package/{lean-CFLJ9VrX.d.ts → lean-D6DQfbqH.d.ts} +10 -124
- package/lean.d.ts +6 -5
- package/lean.js +15 -15
- package/{manifest-37x-HSxH.js → manifest-BeViDIoy.js} +3 -3
- package/manifest-l07K7nW-.d.ts +124 -0
- 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-TarIKBL8.js} +1 -1
- package/{objects-DVlpWsi0.d.ts → objects-q0lnCK-4.d.ts} +2 -1
- package/{operations-CGjDlkGU.js → operations-BAELnqwf.js} +62 -45
- package/package.json +1 -1
- package/{peer-capability-elnbQy-J.js → peer-capability-B8eKbljR.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-BG8g59qS.js} +1 -1
- package/{request-pump-binary-BS1J8DF2.js → request-pump-binary-87klb6sX.js} +9 -4
- package/{router-Bm7A2kjt.js → router-DXmPA-qi.js} +4 -4
- package/{router-D0rf5SkW.d.ts → router-DXoJ_2Z4.d.ts} +2 -2
- package/session.d.ts +2 -2
- package/session.js +12 -12
- 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-DzpyWjt2.js} +2 -2
- package/{store-capability-DBLlWaNO.js → store-capability-CxQJ_Huz.js} +3 -3
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-D6hGa3eF.js → user-capability-ClYd8Vln.js} +3 -3
- package/wasm.d.ts +5 -5
- package/wasm.js +15 -13
- package/index-CBuczWK0.d.ts +0 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { a as rebindObject, i as propertyChecks, n as makeObject, o as stateOf$1, r as objectKind } from "./objects-
|
|
4
|
-
import { $ as arityOf, A as musicalCount,
|
|
5
|
-
import { _ as viewSource, d as operationUses, g as checkDecisionCalls, n as checkSourceForLoad, t as checkSource, u as checkEffectCall } from "./checker-
|
|
6
|
-
import { a as operationsOf, c as CallMeter, r as grantData, s as invoke, t as canonicalJSON } from "./manifest-
|
|
2
|
+
import { $ as smallCoefficient, Dt as integerOf, H as num, Ht as civilFromFields, J as range, Jt as isInstant, K as quantity, L as map, O as instantOf$1, Ot as isInteger, P as listValues, R as mapLayout, S as displayText, T as functionsBelongTo, V as nothing, X as requireArgs, Z as requireValue, _ as civilOf, a as hostDetail, b as dec, d as bytes, f as bytesOf, ft as parseUnit, gn as libraryExports, h as canonicalNumber, hn as grammar, i as ScriptError, it as text, l as Value, mn as diagnosticCodes, n as LoadError, pn as builtins, q as quantityOf, qt as formatInstant, r as MailboxFull, s as sendFailed, t as HostError, tt as smallExponent, u as bool, w as functionValue, x as decimalParts, z as mapOfLayout } from "./errors-VuwK669R.js";
|
|
3
|
+
import { a as rebindObject, i as propertyChecks, n as makeObject, o as stateOf$1, r as objectKind } from "./objects-TarIKBL8.js";
|
|
4
|
+
import { $ as arityOf, A as musicalCount, At as validMessageSelector, B as splice, C as isKind, D as matchCaptures, E as makeRange, F as randomBound, G as cacheBuild, H as textForm, I as search, J as keysContents, K as charge, L as setKey, M as outOfRange, N as prepareConversion, O as matchesOf, Ot as shapeDiagnostics, P as property, Pt as runTask, Q as sizeOf, R as smallArithmetic, S as isEmpty, St as diagnosticRecord, T as makePatternValue, Tt as mismatch, U as waitUs, V as subjectText, W as wrongKind, X as rateOf, Y as partSize, Z as resetMeasured, _ as deleteKey, _t as acceptsArgumentCount, a as builtin, at as numberText, b as hasKey, c as canConvert, ct as splicesOf, d as chunkSet, dt as costModel, f as chunkThere, ft as errorMessages, g as decodeUtf8, h as convert, ht as reservedErrorKeys, i as arithmetic, it as capturesOf, j as negated, k as member, kt as validComputedMessageName, l as chunkDelete, lt as textDisplay, m as concat, mt as limitDefaults, n as ScriptError$1, nt as instructionSpec, o as builtinDefaults, ot as patternSource, p as comparison, pt as languageVersion, q as fixedRates, r as appendTo, rt as opcodes, s as byteOf, st as quantityText, t as NotImplementedError, tt as functionHead, u as chunkGet, ut as compareText, v as equals, w as keyText, x as integerValue, y as getKey, yt as decodeShape, z as smallCoefficientOf } from "./operations-BAELnqwf.js";
|
|
5
|
+
import { _ as viewSource, d as operationUses, g as checkDecisionCalls, n as checkSourceForLoad, t as checkSource, u as checkEffectCall } from "./checker-Q4w7rLXk.js";
|
|
6
|
+
import { a as operationsOf, c as CallMeter, r as grantData, s as invoke, t as canonicalJSON } from "./manifest-BeViDIoy.js";
|
|
7
7
|
import { n as trackOperation } from "./operation-promises-ClA1BTaS.js";
|
|
8
|
-
import { c as readDisplay } from "./readers-
|
|
9
|
-
import { l as isMusicalClock, p as standardChecks, r as MUSICAL_CLOCK } from "./encoding-
|
|
10
|
-
import { r as PEER_POST, t as PEER_CALL } from "./peer-capability-
|
|
8
|
+
import { c as readDisplay } from "./readers-BG8g59qS.js";
|
|
9
|
+
import { l as isMusicalClock, p as standardChecks, r as MUSICAL_CLOCK } from "./encoding-B7MCQ4ii.js";
|
|
10
|
+
import { r as PEER_POST, t as PEER_CALL } from "./peer-capability-B8eKbljR.js";
|
|
11
11
|
import { n as sha256, r as sha256Bytes, t as Sha256 } from "./sha256-9CGf5BS_.js";
|
|
12
12
|
//#region src/stdlib-registry.ts
|
|
13
13
|
/** The seven stdlib Library names, which a Host may not register. */
|
|
@@ -2129,24 +2129,45 @@ const eventReads = (event, guard) => {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
return out.sort((a, b) => a.start - b.start).map((entry) => entry.name);
|
|
2131
2131
|
};
|
|
2132
|
-
|
|
2132
|
+
const isTokenText = (element, text) => element?.kind === "token" && element.text === text;
|
|
2133
|
+
const declaredName = (element) => {
|
|
2134
|
+
while (element?.kind === "node") element = element.children[0];
|
|
2135
|
+
return element.text;
|
|
2136
|
+
};
|
|
2137
|
+
/**
|
|
2138
|
+
* A checked Library's exports, for the Scripts and Libraries that import it.
|
|
2139
|
+
* It reads only declaration headers, so it never converts a body.
|
|
2140
|
+
*/
|
|
2133
2141
|
const exportsOf = (tree) => {
|
|
2134
2142
|
const out = {};
|
|
2135
|
-
for (const
|
|
2136
|
-
if (
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
kind
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2143
|
+
for (const child of tree.root.children) {
|
|
2144
|
+
if (child.kind !== "node" || isTokenText(child.children[0], "private")) continue;
|
|
2145
|
+
const first = child.children[0];
|
|
2146
|
+
const decl = child.rule === "Declaration" && first?.kind === "node" ? first : child;
|
|
2147
|
+
if (decl.rule === "Function") {
|
|
2148
|
+
let required = 0;
|
|
2149
|
+
let total = 0;
|
|
2150
|
+
for (const part of decl.children.slice(2)) if (part.kind === "node" && part.rule === "Parameter") {
|
|
2151
|
+
total++;
|
|
2152
|
+
required += part.children[2] ? 0 : 1;
|
|
2153
|
+
} else if (part.kind === "node" && part.rule === "Block" || isTokenText(part, "end")) break;
|
|
2154
|
+
out[declaredName(decl.children[1])] = {
|
|
2155
|
+
kind: "function",
|
|
2156
|
+
contract: {
|
|
2157
|
+
required,
|
|
2158
|
+
total
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
} else if (decl.rule === "Handler") {
|
|
2162
|
+
if (isTokenText(decl.children[1], "any")) continue;
|
|
2163
|
+
const name = declaredName(decl.children[1]);
|
|
2164
|
+
out[name] = {
|
|
2165
|
+
kind: "handler",
|
|
2166
|
+
maySuspend: tree.maySuspend?.includes(name) ?? false
|
|
2167
|
+
};
|
|
2168
|
+
} else if (decl.rule === "Declaration" && (isTokenText(first, "constant") || isTokenText(first, "shape"))) out[declaredName(decl.children[1])] = {
|
|
2169
|
+
kind: "constant",
|
|
2170
|
+
...isTokenText(first, "shape") ? { shape: true } : {}
|
|
2150
2171
|
};
|
|
2151
2172
|
}
|
|
2152
2173
|
return out;
|
|
@@ -7421,11 +7442,13 @@ const saveSections = {
|
|
|
7421
7442
|
inputs: 11,
|
|
7422
7443
|
decisions: 12,
|
|
7423
7444
|
accounting: 13,
|
|
7424
|
-
sources: 14
|
|
7445
|
+
sources: 14,
|
|
7446
|
+
suspension: 15
|
|
7425
7447
|
};
|
|
7426
7448
|
const lastRequired = saveSections.accounting;
|
|
7427
|
-
const isKnown = (tag) => tag >= 1 && tag <= saveSections.
|
|
7428
|
-
|
|
7449
|
+
const isKnown = (tag) => tag >= 1 && tag <= saveSections.suspension;
|
|
7450
|
+
/** Whether a section is one of the known optional ones. */
|
|
7451
|
+
const isOptionalKnown = (tag) => tag === saveSections.sources || tag === saveSections.suspension;
|
|
7429
7452
|
const invalidSave = () => {
|
|
7430
7453
|
throw new HostError("invalid save");
|
|
7431
7454
|
};
|
|
@@ -8362,6 +8385,9 @@ var RecordWriter = class {
|
|
|
8362
8385
|
sources(ss) {
|
|
8363
8386
|
this.w.list(ss, (w, s) => w.text(s.source).list(s.extensions, (w, e) => w.text(e)));
|
|
8364
8387
|
}
|
|
8388
|
+
suspension(forbidden) {
|
|
8389
|
+
this.w.list(forbidden, (w, n) => w.uint(n));
|
|
8390
|
+
}
|
|
8365
8391
|
};
|
|
8366
8392
|
var RecordReader = class {
|
|
8367
8393
|
r;
|
|
@@ -9101,6 +9127,9 @@ var RecordReader = class {
|
|
|
9101
9127
|
extensions: r.list((r) => r.text())
|
|
9102
9128
|
}));
|
|
9103
9129
|
}
|
|
9130
|
+
suspension() {
|
|
9131
|
+
return this.r.list((r) => r.uint());
|
|
9132
|
+
}
|
|
9104
9133
|
};
|
|
9105
9134
|
//#endregion
|
|
9106
9135
|
//#region src/save-state.ts
|
|
@@ -9640,6 +9669,8 @@ const openSave = (bytes) => {
|
|
|
9640
9669
|
const skipped = valueRecords(section, tables);
|
|
9641
9670
|
check(skipped);
|
|
9642
9671
|
if (sources && sources.length !== skipped.scripts.length) invalidSave();
|
|
9672
|
+
const suspension = save.body(saveSections.suspension) ? section(saveSections.suspension, (r) => r.suspension()) : void 0;
|
|
9673
|
+
if (suspension && (suspension.length === 0 || suspension.some((n, i) => n >= skipped.scripts.length || i > 0 && n <= suspension[i - 1]))) invalidSave();
|
|
9643
9674
|
return {
|
|
9644
9675
|
language: save.language,
|
|
9645
9676
|
costModel: save.costModel,
|
|
@@ -9651,6 +9682,7 @@ const openSave = (bytes) => {
|
|
|
9651
9682
|
functions,
|
|
9652
9683
|
scripts: skipped.scripts,
|
|
9653
9684
|
sources,
|
|
9685
|
+
suspension,
|
|
9654
9686
|
texts: textList,
|
|
9655
9687
|
values: (io) => {
|
|
9656
9688
|
const t = {
|
|
@@ -9687,7 +9719,7 @@ const writeSections = (header, io, bodies, texts = new TextTable()) => {
|
|
|
9687
9719
|
if (body) sections.push({
|
|
9688
9720
|
tag,
|
|
9689
9721
|
body,
|
|
9690
|
-
optional: tag
|
|
9722
|
+
optional: isOptionalKnown(tag)
|
|
9691
9723
|
});
|
|
9692
9724
|
}
|
|
9693
9725
|
return writeSave(header, sections);
|
|
@@ -10840,7 +10872,8 @@ const encodeGroup = (g) => {
|
|
|
10840
10872
|
...g.sources === "embedded" ? { sources: (w) => w.sources(g.scripts.map((s) => ({
|
|
10841
10873
|
source: s.units[0].source,
|
|
10842
10874
|
extensions: s.units.slice(1).map((u) => u.source)
|
|
10843
|
-
}))) } : {}
|
|
10875
|
+
}))) } : {},
|
|
10876
|
+
...g.scripts.some((s) => s.forbidSuspension) ? { suspension: (w) => w.suspension(g.scripts.flatMap((s, i) => s.forbidSuspension ? [i] : [])) } : {}
|
|
10844
10877
|
});
|
|
10845
10878
|
};
|
|
10846
10879
|
const compareBytes = (a, b) => a < b ? -1 : a > b ? 1 : 0;
|
|
@@ -11252,6 +11285,8 @@ var TsGroup = class TsGroup {
|
|
|
11252
11285
|
accounting = emptyAccounting();
|
|
11253
11286
|
discardReason = "stop";
|
|
11254
11287
|
inputs = [];
|
|
11288
|
+
urgentInputs = 0;
|
|
11289
|
+
chargeInputs = 0;
|
|
11255
11290
|
deliveries = 0;
|
|
11256
11291
|
broadcasts = 0;
|
|
11257
11292
|
/**
|
|
@@ -11430,7 +11465,7 @@ var TsGroup = class TsGroup {
|
|
|
11430
11465
|
debugEvaluate(body, frameIndex) {
|
|
11431
11466
|
const pause = this.debugController.current;
|
|
11432
11467
|
const s = this.scripts.find((x) => x.name === pause.script);
|
|
11433
|
-
const frames = this.
|
|
11468
|
+
const frames = this.findRun(s, (r) => r.id === pause.run).run.debugFrames();
|
|
11434
11469
|
const view = frames[frameIndex ?? frames.length - 1];
|
|
11435
11470
|
if (!view) return { error: `There is no frame ${frameIndex}` };
|
|
11436
11471
|
const valueOf = (name) => {
|
|
@@ -11533,14 +11568,15 @@ var TsGroup = class TsGroup {
|
|
|
11533
11568
|
reply: (id, reply) => this.settleReply(id, reply)
|
|
11534
11569
|
});
|
|
11535
11570
|
}
|
|
11536
|
-
/** Worker. A Fingerprint covers code, declarations and
|
|
11571
|
+
/** Worker. A Fingerprint covers code, declarations, limits and `forbidSuspension`, never state. */
|
|
11537
11572
|
fingerprint() {
|
|
11538
11573
|
this.worker();
|
|
11539
11574
|
const scripts = [...this.scripts].sort(byName).map((s) => ({
|
|
11540
11575
|
name: s.name,
|
|
11541
11576
|
identity: s.identity,
|
|
11542
11577
|
grants: Object.fromEntries([...s.grants].sort(([a], [b]) => compareNames(a, b)).map(([name, grant]) => [name, grantData(grant)])),
|
|
11543
|
-
limits: Object.fromEntries(Object.keys(defaultLimits).map((name) => [name, s.limits[name]]))
|
|
11578
|
+
limits: Object.fromEntries(Object.keys(defaultLimits).map((name) => [name, s.limits[name]])),
|
|
11579
|
+
...s.forbidSuspension ? { forbidSuspension: true } : {}
|
|
11544
11580
|
}));
|
|
11545
11581
|
return hexBytes(sha256(canonicalJSON({
|
|
11546
11582
|
language: languageVersion,
|
|
@@ -11572,7 +11608,7 @@ var TsGroup = class TsGroup {
|
|
|
11572
11608
|
return stateFingerprint(this.snapshot());
|
|
11573
11609
|
}
|
|
11574
11610
|
effectsPending() {
|
|
11575
|
-
return this.effectStateUnknown || this.charges.length > 0 || this.waits.awaitedCalls(() => this.holders(), compareCallIds).some(([id]) => this.issuedEligibility(id) === true) || this.scripts.some((s) => this.
|
|
11611
|
+
return this.effectStateUnknown || this.charges.length > 0 || this.waits.awaitedCalls(() => this.holders(), compareCallIds).some(([id]) => this.issuedEligibility(id) === true) || this.scripts.some((s) => !!this.findRun(s, (r) => r.run.hasOpenScopes || r.run.hasParticipant));
|
|
11576
11612
|
}
|
|
11577
11613
|
snapshot() {
|
|
11578
11614
|
return {
|
|
@@ -11679,6 +11715,7 @@ var TsGroup = class TsGroup {
|
|
|
11679
11715
|
group.load({
|
|
11680
11716
|
name: script.name,
|
|
11681
11717
|
source: sources[0],
|
|
11718
|
+
forbidSuspension: save.suspension?.includes(i) === true,
|
|
11682
11719
|
limits: limitsOf(script.limits),
|
|
11683
11720
|
grants,
|
|
11684
11721
|
owner: script.owner === void 0 ? void 0 : objects[script.owner].handle,
|
|
@@ -12172,7 +12209,7 @@ var TsGroup = class TsGroup {
|
|
|
12172
12209
|
for (const s of this.scripts) s.incoming = 0;
|
|
12173
12210
|
} else {
|
|
12174
12211
|
this.importWaits(state, restored);
|
|
12175
|
-
this.inputs
|
|
12212
|
+
this.setInputs(inputs);
|
|
12176
12213
|
for (const x of restored) {
|
|
12177
12214
|
if (partial && changed.has(x.s.name)) continue;
|
|
12178
12215
|
x.running.run.validateSnapshot(this.knownCode());
|
|
@@ -12575,9 +12612,9 @@ var TsGroup = class TsGroup {
|
|
|
12575
12612
|
const code = eligible === void 0 ? "unknown call" : !valid || !eligible || this.charges.some((q) => q.call === call) ? "invalid value" : null;
|
|
12576
12613
|
if (code) {
|
|
12577
12614
|
const line = recordLine("charge-request", [call], [["fuel", valid ? String(fuel) : "\"invalid\""]], true);
|
|
12578
|
-
if (this.
|
|
12615
|
+
if (this.chargeInputs > 0) {
|
|
12579
12616
|
this.combinedAdmission = false;
|
|
12580
|
-
this.
|
|
12617
|
+
this.pushInput({
|
|
12581
12618
|
line,
|
|
12582
12619
|
action: {
|
|
12583
12620
|
k: "refusal",
|
|
@@ -12802,13 +12839,13 @@ var TsGroup = class TsGroup {
|
|
|
12802
12839
|
break;
|
|
12803
12840
|
case "cancel-run": {
|
|
12804
12841
|
const s = this.scripts.find((s) => s.name === action.name);
|
|
12805
|
-
const running = this.
|
|
12842
|
+
const running = this.findRun(s, (r) => r.id === action.id);
|
|
12806
12843
|
if (running) this.cancelRunning(s, running);
|
|
12807
12844
|
break;
|
|
12808
12845
|
}
|
|
12809
12846
|
case "rewind-run": {
|
|
12810
12847
|
const s = this.scripts.find((s) => s.name === action.name);
|
|
12811
|
-
const running = this.
|
|
12848
|
+
const running = this.findRun(s, (r) => r.id === action.id);
|
|
12812
12849
|
if (running?.run.rewindable && !s.stopped) this.rewindRunning(s, running);
|
|
12813
12850
|
else this.trace?.(recordLine("note", [action.id], [["kind", "not-rewindable"]]));
|
|
12814
12851
|
break;
|
|
@@ -12872,11 +12909,19 @@ var TsGroup = class TsGroup {
|
|
|
12872
12909
|
}
|
|
12873
12910
|
}
|
|
12874
12911
|
runsOf(s) {
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12912
|
+
const runs = [];
|
|
12913
|
+
for (const item of s.queue) if ("run" in item) runs.push(item);
|
|
12914
|
+
runs.push(...s.suspended, ...s.parked);
|
|
12915
|
+
if (runs.length < 2) return runs;
|
|
12916
|
+
return runs.map((r) => ({
|
|
12917
|
+
n: Number(r.id.split("/r")[1]),
|
|
12918
|
+
r
|
|
12919
|
+
})).sort((a, b) => a.n - b.n).map((x) => x.r);
|
|
12920
|
+
}
|
|
12921
|
+
findRun(s, match) {
|
|
12922
|
+
for (const item of s.queue) if ("run" in item && match(item)) return item;
|
|
12923
|
+
for (const r of s.suspended) if (match(r)) return r;
|
|
12924
|
+
return s.parked.find(match);
|
|
12880
12925
|
}
|
|
12881
12926
|
forgetWait(s, running) {
|
|
12882
12927
|
s.suspended.delete(running);
|
|
@@ -13066,7 +13111,7 @@ var TsGroup = class TsGroup {
|
|
|
13066
13111
|
}
|
|
13067
13112
|
recordRefusal(line, code) {
|
|
13068
13113
|
this.combinedAdmission = false;
|
|
13069
|
-
if (this.pumping) this.
|
|
13114
|
+
if (this.pumping) this.pushInput({
|
|
13070
13115
|
line,
|
|
13071
13116
|
urgent: true,
|
|
13072
13117
|
action: {
|
|
@@ -13079,10 +13124,22 @@ var TsGroup = class TsGroup {
|
|
|
13079
13124
|
this.trace?.(recordLine("refused", [], [["code", JSON.stringify(code)]]));
|
|
13080
13125
|
}
|
|
13081
13126
|
}
|
|
13127
|
+
pushInput(input) {
|
|
13128
|
+
this.inputs.push(input);
|
|
13129
|
+
if (input.urgent) this.urgentInputs++;
|
|
13130
|
+
else if (input.action.k === "charge") this.chargeInputs++;
|
|
13131
|
+
}
|
|
13132
|
+
setInputs(inputs) {
|
|
13133
|
+
this.inputs = [];
|
|
13134
|
+
this.urgentInputs = 0;
|
|
13135
|
+
this.chargeInputs = 0;
|
|
13136
|
+
for (const input of inputs) this.pushInput(input);
|
|
13137
|
+
}
|
|
13082
13138
|
landUrgentInputs() {
|
|
13083
|
-
while (this.
|
|
13139
|
+
while (this.urgentInputs > 0) {
|
|
13084
13140
|
const urgent = this.inputs.filter((i) => i.urgent);
|
|
13085
13141
|
this.inputs = this.inputs.filter((i) => !i.urgent);
|
|
13142
|
+
this.urgentInputs = 0;
|
|
13086
13143
|
for (const input of urgent) {
|
|
13087
13144
|
if (this.trace) this.trace(typeof input.line === "string" ? input.line : input.line());
|
|
13088
13145
|
this.applyInput(input.action);
|
|
@@ -13116,7 +13173,7 @@ var TsGroup = class TsGroup {
|
|
|
13116
13173
|
queueInput(input, notify = true) {
|
|
13117
13174
|
const landing = this.debugController?.current;
|
|
13118
13175
|
if (landing && (input.action.k === "stop" || input.action.k === "cancel-run" || input.action.k === "rewind-run") && typeof input.line === "string") input.line += ` pc=${landing.pc}`;
|
|
13119
|
-
this.
|
|
13176
|
+
this.pushInput(input);
|
|
13120
13177
|
if (!notify) return;
|
|
13121
13178
|
if (this.onReady) {
|
|
13122
13179
|
if (this.pumping || this.cleaning) queueMicrotask(() => this.onReady?.());
|
|
@@ -13184,7 +13241,10 @@ var TsGroup = class TsGroup {
|
|
|
13184
13241
|
const grants = new Map(Object.entries(o.grants ?? {}));
|
|
13185
13242
|
if (grants.has("musical-clock")) throw new HostError("invalid value", `${MUSICAL_CLOCK} is the Group's own Grant name`);
|
|
13186
13243
|
if ([...grants.values()].filter((g) => g.capability.name === "peer").length > 1) throw new HostError("invalid value", `Script ${o.name} has more than one peer Grant`);
|
|
13187
|
-
const p = prepare("script", o.name, o.source, this.libraries, objects, declarationsOf(grants), void 0,
|
|
13244
|
+
const p = prepare("script", o.name, o.source, this.libraries, objects, declarationsOf(grants), void 0, {
|
|
13245
|
+
...propertyChecks(o.objects ?? {}, o.owner),
|
|
13246
|
+
forbidSuspension: o.forbidSuspension === true
|
|
13247
|
+
});
|
|
13188
13248
|
this.trace?.(recordLine("load", [o.name], [["identity", p.identity]], true));
|
|
13189
13249
|
const limits = {
|
|
13190
13250
|
...defaultLimits,
|
|
@@ -13208,6 +13268,7 @@ var TsGroup = class TsGroup {
|
|
|
13208
13268
|
grants: kept,
|
|
13209
13269
|
revoked: /* @__PURE__ */ new Set(),
|
|
13210
13270
|
disabled: /* @__PURE__ */ new Set(),
|
|
13271
|
+
forbidSuspension: o.forbidSuspension === true,
|
|
13211
13272
|
handle,
|
|
13212
13273
|
loaded,
|
|
13213
13274
|
identity: p.identity,
|
|
@@ -13254,7 +13315,10 @@ var TsGroup = class TsGroup {
|
|
|
13254
13315
|
}
|
|
13255
13316
|
replacement(s, source, carry, libraries = this.libraries, extensions = [], keepMailbox = false) {
|
|
13256
13317
|
const grants = availableGrants(s);
|
|
13257
|
-
const p = prepare("script", s.name, source, libraries, Object.keys(s.objects), declarationsOf(grants), void 0,
|
|
13318
|
+
const p = prepare("script", s.name, source, libraries, Object.keys(s.objects), declarationsOf(grants), void 0, {
|
|
13319
|
+
...propertyChecks(s.objects, s.owner?.handle),
|
|
13320
|
+
forbidSuspension: s.forbidSuspension
|
|
13321
|
+
});
|
|
13258
13322
|
const loaded = this.loadPrepared(s.name, p, s.limits);
|
|
13259
13323
|
const staged = {
|
|
13260
13324
|
...s,
|
|
@@ -13341,7 +13405,10 @@ var TsGroup = class TsGroup {
|
|
|
13341
13405
|
}
|
|
13342
13406
|
}
|
|
13343
13407
|
}
|
|
13344
|
-
const p = prepare("script", name, source, libraries, Object.keys(s.objects), declarationsOf(availableGrants(s)), existing,
|
|
13408
|
+
const p = prepare("script", name, source, libraries, Object.keys(s.objects), declarationsOf(availableGrants(s)), existing, {
|
|
13409
|
+
...propertyChecks(s.objects, s.owner?.handle),
|
|
13410
|
+
forbidSuspension: s.forbidSuspension
|
|
13411
|
+
});
|
|
13345
13412
|
const identity = codeIdentity("extension", s.name, source, p.imports.map(identityOf));
|
|
13346
13413
|
const diagnostics = [...p.diagnostics ?? []];
|
|
13347
13414
|
if (p.checked.tree) {
|
|
@@ -13545,7 +13612,7 @@ var TsGroup = class TsGroup {
|
|
|
13545
13612
|
group,
|
|
13546
13613
|
disableGrant: (name) => {
|
|
13547
13614
|
s.disabled.add(name);
|
|
13548
|
-
const running = this.
|
|
13615
|
+
const running = this.findRun(s, (r) => r.run === run);
|
|
13549
13616
|
if (running) this.writeRecords(running, 0);
|
|
13550
13617
|
},
|
|
13551
13618
|
isDisabled: (name) => s.disabled.has(name),
|
|
@@ -14185,7 +14252,7 @@ var TsGroup = class TsGroup {
|
|
|
14185
14252
|
this.objects.set(key, state);
|
|
14186
14253
|
if (up && this.trace) {
|
|
14187
14254
|
const line = recordLine("object", [], [["object", traceValue(state.handle.value)], ["parent", traceValue(up.handle.value)]]);
|
|
14188
|
-
if (this.pumping) this.
|
|
14255
|
+
if (this.pumping) this.pushInput({
|
|
14189
14256
|
line,
|
|
14190
14257
|
urgent: true,
|
|
14191
14258
|
action: { k: "record" }
|
|
@@ -14333,7 +14400,7 @@ var TsGroup = class TsGroup {
|
|
|
14333
14400
|
const slice = o.fuelSlice ?? 0;
|
|
14334
14401
|
const cap = o.fuelCap ?? 0;
|
|
14335
14402
|
const drained = this.inputs;
|
|
14336
|
-
this.
|
|
14403
|
+
this.setInputs([]);
|
|
14337
14404
|
const reports = [];
|
|
14338
14405
|
this.drainReports = reports;
|
|
14339
14406
|
const inputLines = [];
|
|
@@ -14990,7 +15057,7 @@ var TsGroup = class TsGroup {
|
|
|
14990
15057
|
}
|
|
14991
15058
|
releaseParked(s, ended) {
|
|
14992
15059
|
const same = (r) => !r.delivery.fn && !ended.delivery.fn && sameClause(r, ended);
|
|
14993
|
-
if (this.
|
|
15060
|
+
if (this.findRun(s, (r) => !r.parked && same(r))) return;
|
|
14994
15061
|
const next = s.parked.find(same);
|
|
14995
15062
|
if (!next) return;
|
|
14996
15063
|
s.parked = s.parked.filter((r) => r !== next);
|
|
@@ -15045,7 +15112,7 @@ var TsGroup = class TsGroup {
|
|
|
15045
15112
|
return { scripts: this.inspection().scripts.map((s, i) => ({
|
|
15046
15113
|
...s,
|
|
15047
15114
|
runs: s.runs.map((view) => {
|
|
15048
|
-
const run = this.
|
|
15115
|
+
const run = this.findRun(this.scripts[i], (r) => r.id === view.id).run;
|
|
15049
15116
|
return {
|
|
15050
15117
|
...view,
|
|
15051
15118
|
fuel: run.fuel,
|
|
@@ -15081,6 +15148,7 @@ var TsGroup = class TsGroup {
|
|
|
15081
15148
|
return {
|
|
15082
15149
|
name: s.name,
|
|
15083
15150
|
...s.disabled.size ? { disabledGrants: [...s.disabled].sort(compareText) } : {},
|
|
15151
|
+
...s.forbidSuspension ? { forbidSuspension: true } : {},
|
|
15084
15152
|
vars,
|
|
15085
15153
|
runs: this.runsOf(s).map((item) => ({
|
|
15086
15154
|
id: item.id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { ft as errorMessages, n as ScriptError$1 } from "./operations-
|
|
2
|
+
import { H as num, L as map, P as listValues, V as nothing, Z as requireValue, b as dec, i as ScriptError, it as text, nn as characterBoundaries, o as invalidValue, sn as normalizeNFC, u as bool } from "./errors-VuwK669R.js";
|
|
3
|
+
import { ft as errorMessages, n as ScriptError$1 } from "./operations-BAELnqwf.js";
|
|
4
4
|
//#region src/json.ts
|
|
5
5
|
var JsonReader = class {
|
|
6
6
|
source;
|
package/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
2
|
+
import { J as Value, cn as HttpClientImpl, gt as ObjectKindDef, ht as ObjectKind, ln as HttpImpl, tn as Group, x as PumpResult } from "./debug-s6QIovKS.js";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
//#region src/http/fetch.d.ts
|
|
5
5
|
/** The largest response body `fetch` reads by default: 8 MiB. */
|
package/http.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { t as defineObjectKind } from "./objects-
|
|
4
|
-
import {
|
|
5
|
-
import { a as parseFetchUrl, i as fetchOrigin } from "./http-fetch
|
|
2
|
+
import { H as num, L as map, P as listValues, d as bytes, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-VuwK669R.js";
|
|
3
|
+
import { t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
4
|
+
import { Dt as shape } from "./operations-BAELnqwf.js";
|
|
5
|
+
import { a as parseFetchUrl, i as fetchOrigin } from "./http-fetch--O27xjSW.js";
|
|
6
6
|
import { Buffer } from "node:buffer";
|
|
7
7
|
import { createServer, request } from "node:http";
|
|
8
8
|
import { request as request$1 } from "node:https";
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { $ as instant, $n as
|
|
2
|
+
import { $ as instant, $n as NotImplementedError, $t as shape, A as ScriptSources, An as calendarCapability, Ar as SourceSpan, At as FireOp, B as restore, Bn as compileLibrary, Br as syntaxSelector, Bt as ReleaseHook, C as Report, Cn as LocaleImpl, Cr as NameRole, Ct as ChargeRequest, Dn as Costs, Dr as SemanticScope, Dt as EffectResult, E as RestoreResult, En as ConsoleImpl, Er as SemanticNode, Et as Cost, Fn as Library, Fr as SyntaxElement, Ft as Metering, G as RunStarted, Gn as Run, Gt as SegmentGrant, H as RunAccounting, Hn as LimitName, Ht as ScopeDecl, In as LibraryOptions, Ir as SyntaxErrorCode, It as Operation, J as Value, Jn as UnitLoadError, Jt as SuspendingOp, K as Decimal, Kn as RunRecord, Kt as SegmentLifecycle, L as TsScript, Ln as LibrarySource, Lr as SyntaxNode, Lt as Operations, Mn as consoleCapability, Mr as Mode, Mt as GrantContext, N as Settlement, Nn as musicalClockCapability, Nr as TokType, Nt as ImmediateOp, O as SaveOptions, On as MusicalClockImpl, Or as SemanticToken, Ot as ErrorDecl, P as TsGroup, Pn as timerCapability, Pr as Token, Pt as LimitReached, Q as dec, Qn as loadScript, Qt as operationDeclarations, R as Verdict, Rn as OperationRef, Rr as SyntaxRule, Rt as PlainArg, S as PumpedRequest, Sn as sqliteCapability, Sr as LibraryExport, St as CapabilityDefiner, T as RestoreOptions, Tn as CalendarImpl, Tr as SemanticName, Tt as CoordinatedLifecycle, U as RunAncestry, Un as Limits, Ut as SegmentContext, V as CausalWork, Vr as syntaxText, Vt as ReleaseReason, W as RunDiscarded, Wn as Outcome, Wt as SegmentCoordinator, X as bytes, Xn as defaultLimits, Xt as defineCapability, Y as bool, Yn as callFunction, Yt as conforms, Z as civilDate, Zn as deliver, Zt as explain, _ as LoadOptions, _n as SqlParams, _r as disassemble, _t as PropDef, an as PeerImpl, ar as LoadError, at as quantity, b as PumpOptions, bn as SqliteBinding, br as ExportKind, bt as Call, cn as HttpClientImpl, cr as SendFailedReason, d as Counters, dn as httpCapability, dr as CodeUnit, dt as nowMicros, en as Core, er as canConvert, f as Decided, fn as UserImpl, fr as EventBranch, ft as parseInstant, g as Inspection, gn as storeCapability, gr as UnwindEntry, gt as ObjectKindDef, h as GroupOptions, hn as add, hr as Operand, ht as ObjectKind, in as coreVersions, ir as LoadDiagnostic, it as num, jn as clockCapability, jr as Lexer, jt as Grant, k as ScriptCodeRequest, kn as TimerImpl, kr as SemanticTree, kt as FieldShape, l as CancellationOptions, ln as HttpImpl, lr as Body, lt as text, m as EffectFailure, mn as StoreImpl, mr as Instruction, mt as ObjectElements, nn as Script$1, nr as HostError, nt as map, on as peerCapability, or as MailboxFull, ot as range, p as Deciding, pn as userCapability, pr as EventEntry, pt as HostObject, q as Kind, qn as Script, qt as Shape, rn as Versions, rr as HostErrorCode, rt as nothing, sn as peerKind, sr as ScriptError, st as record, tn as Group, tr as waitUs, tt as list, u as CarryOver, un as HttpServerImpl, ur as BodyKind, ut as formatInstant, v as Message, vn as SqlRows, vr as Binding, vt as defineObjectKind, w as Requested, wn as localeCapability, wr as SemanticElement, wt as ChargeResult, x as PumpResult, xn as SqliteImpl, xr as FunctionContract, xt as CapabilityDef, y as PendingCall, yn as SqlValue, yr as BindingKind, yt as GrantDecls, z as newGroup, zn as codeIdentity, zr as Trivia, zt as PlainResult } from "./debug-s6QIovKS.js";
|
|
3
3
|
import { n as registerStdlib, r as stdlibNames, t as StdlibLibrary } from "./stdlib-registry-BwitI3Ox.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
4
|
+
import { A as builtins, C as ParseError, D as parseEntry, E as RecoveryDiagnostic, M as units, O as parseSource, S as EntryResult, T as RecoveringParseResult, _ as DiagnosticCode, a as LoweringError, b as checkSyntax, c as lowerTree, d as ShapeData, f as shapeData, g as Diagnostic, h as CheckResult, i as CompileResult, j as grammar, k as parseSourceRecovering, l as CreateGroupOptions, m as CheckOptions, n as declarationStart, o as compileSource, p as kindNames, r as CompileOptions, s as exportsOf, t as validMessageSelector, u as createGroup, v as SemanticResult, w as ParseResult, x as EntryKind, y as checkSource } from "./lean-D6DQfbqH.js";
|
|
5
|
+
import { _ as PlainValue, a as InlineOperation, b as toValue, c as DrivenGroup, d as ScriptWithHandlers, f as handlersOf, g as FromValueOptions, h as encodeValue, i as InlineFunction, m as encodeJson, n as MessageDecl, o as inlineGrants, p as decodeJson, r as exportManifest, t as ManifestSpec, u as Handlers, v as ToValueOptions, x as talk, y as fromValue } from "./manifest-l07K7nW-.js";
|
|
6
|
+
import { n as createCore, t as TsCore } from "./core-BBPI6EhG.js";
|
|
7
|
+
import { a as decodeValue, o as readDisplay, t as FunctionResolver } from "./readers-AeB1bJ--.js";
|
|
8
|
+
//#region src/generated/stdlib.d.ts
|
|
9
|
+
/** Every stdlib Library. */
|
|
10
|
+
export declare const allStdlib: readonly StdlibLibrary[];
|
|
11
|
+
/** Every stdlib Library's source, by name. */
|
|
12
|
+
export declare const stdlibSources: Record<string, string>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { type Binding, type BindingKind, type Body, type BodyKind, type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type CheckOptions, type CheckResult, type CodeUnit, type CompileOptions, type CompileResult, Script as CompiledScript, type ConsoleImpl, type CoordinatedLifecycle, type Core, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type Diagnostic, type DiagnosticCode, type DrivenGroup, type EffectFailure, type EffectResult, type EntryKind, type EntryResult, type ErrorDecl, type EventBranch, type EventEntry, type ExportKind, type FieldShape, type FireOp, type FromValueOptions, type FunctionContract, type FunctionResolver, type Grant, type GrantContext, type GrantDecls, type Group, type GroupOptions, type Handlers, HostError, type HostErrorCode, type HostObject, type HttpClientImpl, type HttpImpl, type HttpServerImpl, type ImmediateOp, type InlineFunction, type InlineOperation, type Inspection, type Instruction, type Kind, Lexer, type Library, type LibraryExport, type LibraryOptions, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, LoweringError, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type Mode, type MusicalClockImpl, type NameRole, NotImplementedError, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operand, type Operation, type OperationRef, type Operations, type Outcome, ParseError, type ParseResult, type PeerImpl, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type RecoveringParseResult, type RecoveryDiagnostic, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, Run, type RunAccounting, type RunAncestry, type RunDiscarded, type RunRecord, type RunStarted, type SaveOptions, type ScopeDecl, type Script$1 as Script, type ScriptCodeRequest, ScriptError, type ScriptSources, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SemanticElement, type SemanticName, type SemanticNode, type SemanticResult, type SemanticScope, type SemanticToken, type SemanticTree, type SendFailedReason, type Settlement, type Shape, type ShapeData, type SourceSpan, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StdlibLibrary, type StoreImpl, type SuspendingOp, type SyntaxElement, type SyntaxErrorCode, type SyntaxNode, type SyntaxRule, type TimerImpl, type ToValueOptions, type TokType, type Token, type Trivia, type TsCore, TsGroup, TsScript, UnitLoadError, type UnwindEntry, type UserImpl, Value, type Verdict, type Versions, add, bool, builtins, bytes, calendarCapability, callFunction, canConvert, checkSource, checkSyntax, civilDate, clockCapability, codeIdentity, compileLibrary, compileSource, conforms, consoleCapability, coreVersions, createCore, createGroup, dec, declarationStart, decodeJson, decodeValue, defaultLimits, defineCapability, defineObjectKind, deliver, disassemble, encodeJson, encodeValue, explain, exportManifest, exportsOf, formatInstant, fromValue, grammar, handlersOf, httpCapability, inlineGrants, instant, kindNames, list, loadScript, localeCapability, lowerTree, map, musicalClockCapability, newGroup, nothing, nowMicros, num, operationDeclarations, parseEntry, parseInstant, parseSource, parseSourceRecovering, peerCapability, peerKind, quantity, range, readDisplay, record, registerStdlib, restore, shape, shapeData, sqliteCapability, stdlibNames, storeCapability, syntaxSelector, syntaxText, talk, text, timerCapability, toValue, units, userCapability, validMessageSelector, waitUs };
|
package/index.js
CHANGED
|
@@ -6,20 +6,20 @@ import { json } from "./stdlib/json.js";
|
|
|
6
6
|
import { list as list$1 } from "./stdlib/list.js";
|
|
7
7
|
import { map as map$1 } from "./stdlib/map.js";
|
|
8
8
|
import { units as units$1 } from "./stdlib/units.js";
|
|
9
|
-
import {
|
|
10
|
-
import { S as registerStdlib, _ as loadScript, b as exportsOf, c as codeIdentity, d as Run, f as Script, g as deliver, h as defaultLimits, i as restore, l as compileLibrary, m as callFunction, n as TsScript, p as UnitLoadError, r as newGroup, t as TsGroup, v as LoweringError, w as stdlibNames, x as lowerTree, y as compileSource } from "./group-
|
|
11
|
-
import { t as defineObjectKind } from "./objects-
|
|
12
|
-
import { At as
|
|
13
|
-
import { a as syntaxText, c as parseSource, i as syntaxSelector, l as parseSourceRecovering, o as ParseError, p as declarationStart, r as checkSyntax, s as parseEntry, t as checkSource, v as shapeData, y as kindNames } from "./checker-
|
|
14
|
-
import { n as exportManifest } from "./manifest-
|
|
15
|
-
import { c as readDisplay, r as decodeValue } from "./readers-
|
|
16
|
-
import { a as clockCapability, d as timerCapability, i as calendarCapability, o as consoleCapability, t as encodeValue, u as musicalClockCapability } from "./encoding-
|
|
17
|
-
import { a as peerKind, i as peerCapability } from "./peer-capability-
|
|
18
|
-
import { a as sqliteCapability, c as talk, i as httpCapability, o as fromValue, r as handlersOf, s as toValue, t as inlineGrants } from "./inline-grants-
|
|
19
|
-
import { o as decodeJson, s as encodeJson } from "./http-fetch
|
|
20
|
-
import { n as createCore, r as coreVersions, t as createGroup } from "./lean-
|
|
21
|
-
import { n as localeCapability, t as userCapability } from "./user-capability-
|
|
22
|
-
import { r as storeCapability, t as add } from "./store-capability-
|
|
9
|
+
import { D as instant, H as num, J as range, K as quantity, L as map, N as list, Qt as parseInstant, V as nothing, Xt as nowMicros, Y as record, b as dec, c as Decimal, d as bytes, g as civilDate, hn as grammar, i as ScriptError, it as text, l as Value, n as LoadError, pn as builtins, qt as formatInstant, r as MailboxFull, t as HostError, u as bool, vn as units } from "./errors-VuwK669R.js";
|
|
10
|
+
import { S as registerStdlib, _ as loadScript, b as exportsOf, c as codeIdentity, d as Run, f as Script, g as deliver, h as defaultLimits, i as restore, l as compileLibrary, m as callFunction, n as TsScript, p as UnitLoadError, r as newGroup, t as TsGroup, v as LoweringError, w as stdlibNames, x as lowerTree, y as compileSource } from "./group-Ccuqwq12.js";
|
|
11
|
+
import { t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
12
|
+
import { At as validMessageSelector, Dt as shape, Et as operationDeclarations, Mt as Lexer, U as waitUs, bt as defineCapability, c as canConvert, et as disassemble, gt as LimitReached, t as NotImplementedError, vt as conforms, wt as explain } from "./operations-BAELnqwf.js";
|
|
13
|
+
import { a as syntaxText, c as parseSource, i as syntaxSelector, l as parseSourceRecovering, o as ParseError, p as declarationStart, r as checkSyntax, s as parseEntry, t as checkSource, v as shapeData, y as kindNames } from "./checker-Q4w7rLXk.js";
|
|
14
|
+
import { n as exportManifest } from "./manifest-BeViDIoy.js";
|
|
15
|
+
import { c as readDisplay, r as decodeValue } from "./readers-BG8g59qS.js";
|
|
16
|
+
import { a as clockCapability, d as timerCapability, i as calendarCapability, o as consoleCapability, t as encodeValue, u as musicalClockCapability } from "./encoding-B7MCQ4ii.js";
|
|
17
|
+
import { a as peerKind, i as peerCapability } from "./peer-capability-B8eKbljR.js";
|
|
18
|
+
import { a as sqliteCapability, c as talk, i as httpCapability, o as fromValue, r as handlersOf, s as toValue, t as inlineGrants } from "./inline-grants-DmOdgSoK.js";
|
|
19
|
+
import { o as decodeJson, s as encodeJson } from "./http-fetch--O27xjSW.js";
|
|
20
|
+
import { n as createCore, r as coreVersions, t as createGroup } from "./lean-BjhQvHyr.js";
|
|
21
|
+
import { n as localeCapability, t as userCapability } from "./user-capability-ClYd8Vln.js";
|
|
22
|
+
import { r as storeCapability, t as add } from "./store-capability-CxQJ_Huz.js";
|
|
23
23
|
//#region src/generated/stdlib.ts
|
|
24
24
|
/** Every stdlib Library. */
|
|
25
25
|
const allStdlib = [
|
|
@@ -37,4 +37,4 @@ const stdlibSources = Object.fromEntries(allStdlib.map((l) => [l.name, l.source]
|
|
|
37
37
|
//#region src/index.ts
|
|
38
38
|
registerStdlib(...allStdlib);
|
|
39
39
|
//#endregion
|
|
40
|
-
export { Script as CompiledScript, Decimal, HostError, Lexer, LimitReached, LoadError, LoweringError, MailboxFull, NotImplementedError, ParseError, Run, ScriptError, TsGroup, TsScript, UnitLoadError, Value, add, allStdlib, bool, builtins, bytes, calendarCapability, callFunction, canConvert, checkSource, checkSyntax, civilDate, clockCapability, codeIdentity, compileLibrary, compileSource, consoleCapability, coreVersions, createCore, createGroup, dec, declarationStart, decodeJson, decodeValue, defaultLimits, defineCapability, defineObjectKind, deliver, disassemble, encodeJson, encodeValue, exportManifest, exportsOf, formatInstant, fromValue, grammar, handlersOf, httpCapability, inlineGrants, instant, kindNames, list, loadScript, localeCapability, lowerTree, map, musicalClockCapability, newGroup, nothing, nowMicros, num, operationDeclarations, parseEntry, parseInstant, parseSource, parseSourceRecovering, peerCapability, peerKind, quantity, range, readDisplay, record, registerStdlib, restore, shape, shapeData, sqliteCapability, stdlibNames, stdlibSources, storeCapability, syntaxSelector, syntaxText, talk, text, timerCapability, toValue, units, userCapability, validMessageSelector, waitUs };
|
|
40
|
+
export { Script as CompiledScript, Decimal, HostError, Lexer, LimitReached, LoadError, LoweringError, MailboxFull, NotImplementedError, ParseError, Run, ScriptError, TsGroup, TsScript, UnitLoadError, Value, add, allStdlib, bool, builtins, bytes, calendarCapability, callFunction, canConvert, checkSource, checkSyntax, civilDate, clockCapability, codeIdentity, compileLibrary, compileSource, conforms, consoleCapability, coreVersions, createCore, createGroup, dec, declarationStart, decodeJson, decodeValue, defaultLimits, defineCapability, defineObjectKind, deliver, disassemble, encodeJson, encodeValue, explain, exportManifest, exportsOf, formatInstant, fromValue, grammar, handlersOf, httpCapability, inlineGrants, instant, kindNames, list, loadScript, localeCapability, lowerTree, map, musicalClockCapability, newGroup, nothing, nowMicros, num, operationDeclarations, parseEntry, parseInstant, parseSource, parseSourceRecovering, peerCapability, peerKind, quantity, range, readDisplay, record, registerStdlib, restore, shape, shapeData, sqliteCapability, stdlibNames, stdlibSources, storeCapability, syntaxSelector, syntaxText, talk, text, timerCapability, toValue, units, userCapability, validMessageSelector, waitUs };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-
|
|
5
|
-
import { n as duplicateHeaderNames, r as fetchAnswerOk, s as encodeJson, t as checkFetch } from "./http-fetch
|
|
2
|
+
import { Dt as integerOf, H as num, L as map, Ot as isInteger, P as listValues, V as nothing, Y as record, Z as requireValue, b as dec, d as bytes, i as ScriptError, it as text, k as isDecimal, l as Value, o as invalidValue, t as HostError, u as bool, x as decimalParts } from "./errors-VuwK669R.js";
|
|
3
|
+
import { Ct as expectedOf, Dt as shape, bt as defineCapability, jt as validStaticMessageName, kt as validComputedMessageName, n as ScriptError$1, xt as defineValueCapability } from "./operations-BAELnqwf.js";
|
|
4
|
+
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-B7MCQ4ii.js";
|
|
5
|
+
import { n as duplicateHeaderNames, r as fetchAnswerOk, s as encodeJson, t as checkFetch } from "./http-fetch--O27xjSW.js";
|
|
6
6
|
import { asyncDispose, newDrivenGroup } from "./driver.js";
|
|
7
7
|
//#region src/talk.ts
|
|
8
8
|
const blank = /^[\t ]*$/;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { i as restore, l as compileLibrary, r as newGroup, s as stateFingerprint } from "./group-
|
|
4
|
-
import { t as defineObjectKind } from "./objects-
|
|
5
|
-
import {
|
|
6
|
-
import { a as clockCapability, d as timerCapability, i as calendarCapability, o as consoleCapability, u as musicalClockCapability } from "./encoding-
|
|
7
|
-
import { a as peerKind, i as peerCapability } from "./peer-capability-
|
|
8
|
-
import { a as sqliteCapability, i as httpCapability, n as createGroup$1 } from "./inline-grants-
|
|
9
|
-
import { n as localeCapability, t as userCapability } from "./user-capability-
|
|
10
|
-
import { r as storeCapability } from "./store-capability-
|
|
2
|
+
import { fn as unicodeVersion } from "./errors-VuwK669R.js";
|
|
3
|
+
import { i as restore, l as compileLibrary, r as newGroup, s as stateFingerprint } from "./group-Ccuqwq12.js";
|
|
4
|
+
import { t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
5
|
+
import { bt as defineCapability, dt as costModel, pt as languageVersion } from "./operations-BAELnqwf.js";
|
|
6
|
+
import { a as clockCapability, d as timerCapability, i as calendarCapability, o as consoleCapability, u as musicalClockCapability } from "./encoding-B7MCQ4ii.js";
|
|
7
|
+
import { a as peerKind, i as peerCapability } from "./peer-capability-B8eKbljR.js";
|
|
8
|
+
import { a as sqliteCapability, i as httpCapability, n as createGroup$1 } from "./inline-grants-DmOdgSoK.js";
|
|
9
|
+
import { n as localeCapability, t as userCapability } from "./user-capability-ClYd8Vln.js";
|
|
10
|
+
import { r as storeCapability } from "./store-capability-CxQJ_Huz.js";
|
|
11
11
|
//#region src/versions.ts
|
|
12
12
|
const coreVersions = Object.freeze({
|
|
13
13
|
language: languageVersion,
|
|
14
14
|
costModel: String(costModel.version),
|
|
15
15
|
unicode: unicodeVersion,
|
|
16
|
-
core: "ts/0.
|
|
16
|
+
core: "ts/0.8.0",
|
|
17
17
|
saveFormat: String(1)
|
|
18
18
|
});
|
|
19
19
|
//#endregion
|