@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,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { $
|
|
2
|
+
import { $ as smallCoefficient, $t as parseInstantText, At as multiply, B as mapWithEntry, Bt as checkInstant, C as extendList, Ct as digitsOf, D as instant, Dt as integerOf, Et as formatDec, F as listWithItem, Ft as withinLimits, G as patternValue, Gt as civilUs, H as num, I as literalDigits, It as DateRangeError, J as range, K as quantity, Kt as dayOfYear, L as map, Lt as US_PER_DAY, M as knownSize, Mt as powerInteger, N as list, Nt as roundRatio, O as instantOf, Ot as isInteger, P as listValues, Pt as subtract, Q as sliceText, Rt as US_PER_SECOND, S as displayText, St as digitCount$1, Tt as divide, Ut as civilOfDays, V as nothing, Vt as civilDays, W as ownedMapPairs, Wt as civilOfUs, Yt as isoWeek, Zt as parseCivil, _ as civilOf, _n as unitKinds, _t as unitText, an as isWhiteSpace, at as textStorage, b as dec, bt as compareDec, cn as scalarCount, ct as combine, d as bytes, dn as utf8Length, dt as ownUnit, en as weekday, et as smallDecimalNumber, f as bytesOf, ft as parseUnit, gt as unitEntry, h as canonicalNumber, hn as grammar, ht as toBase, in as generalCategory, it as text, j as knownContents, jt as negate, k as isDecimal, kt as mod, l as Value, ln as simpleFold, lt as fromBase, m as cacheSize, mt as sameDimension, nn as characterBoundaries, nt as smallInteger, o as invalidValue, on as lower, ot as trimWhiteSpace, p as cacheContents, pt as powerOf, q as quantityOf, rn as charactersAt, sn as normalizeNFC, st as UnitError, t as HostError, tn as assertScalarText, tt as smallExponent, u as bool, un as upper, ut as musicalKind, v as compareBytes, vt as ArithmeticError, wt as div, x as decimalParts, xt as decOf, y as concatText, yt as add, zt as addMonths } from "./errors-VuwK669R.js";
|
|
3
3
|
//#region src/tasks.ts
|
|
4
4
|
const runTask = (root) => {
|
|
5
5
|
const stack = [root];
|
|
@@ -625,6 +625,20 @@ const wrapperKeys = [
|
|
|
625
625
|
"map"
|
|
626
626
|
];
|
|
627
627
|
const scalarsOf = (s) => [...s].length;
|
|
628
|
+
const decodedShapes = /* @__PURE__ */ new WeakMap();
|
|
629
|
+
/**
|
|
630
|
+
* `decodeShape`, kept per Shape data value: values are immutable, and a
|
|
631
|
+
* Constant's Shape data is decoded once per load rather than per test.
|
|
632
|
+
* The scanned count is kept too, so the Fuel charged is unchanged.
|
|
633
|
+
*/
|
|
634
|
+
const decodeShapeCached = (data) => {
|
|
635
|
+
let decoded = decodedShapes.get(data);
|
|
636
|
+
if (!decoded) {
|
|
637
|
+
decoded = decodeShape(data);
|
|
638
|
+
decodedShapes.set(data, decoded);
|
|
639
|
+
}
|
|
640
|
+
return decoded;
|
|
641
|
+
};
|
|
628
642
|
/** Reads Shape data into a Shape, or gives the first definition error. */
|
|
629
643
|
const decodeShape = (data) => {
|
|
630
644
|
let scanned = 0;
|
|
@@ -821,22 +835,21 @@ const shapeDiagnostics = (v, s, first, scanned) => {
|
|
|
821
835
|
let halted = false;
|
|
822
836
|
const deepInfo = /* @__PURE__ */ new Map();
|
|
823
837
|
const infoOf = (rootValue) => {
|
|
824
|
-
const pending = [rootValue];
|
|
825
|
-
const order = [];
|
|
826
|
-
const seen = /* @__PURE__ */ new Set();
|
|
838
|
+
const pending = [{ v: rootValue }];
|
|
827
839
|
while (pending.length) {
|
|
828
|
-
const
|
|
829
|
-
if (deepInfo.has(
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
840
|
+
const { children, v: value } = pending.pop();
|
|
841
|
+
if (deepInfo.has(value)) continue;
|
|
842
|
+
if (!children) {
|
|
843
|
+
const parts = value.kind === "list" ? Array.from({ length: value.length }, (_, j) => value.index(j + 1)) : value.kind === "map" ? value.entries().map(([, item]) => item) : [];
|
|
844
|
+
pending.push({
|
|
845
|
+
children: parts,
|
|
846
|
+
v: value
|
|
847
|
+
});
|
|
848
|
+
for (let i = parts.length - 1; i >= 0; i--) pending.push({ v: parts[i] });
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
837
851
|
let clean = value.kind !== "function";
|
|
838
852
|
let nodes = 1;
|
|
839
|
-
const children = value.kind === "list" ? Array.from({ length: value.length }, (_, j) => value.index(j + 1)) : value.kind === "map" ? value.entries().map(([, item]) => item) : [];
|
|
840
853
|
for (const child of children) {
|
|
841
854
|
const info = deepInfo.get(child);
|
|
842
855
|
clean = clean && info.clean;
|
|
@@ -1332,6 +1345,10 @@ const operationDeclarations = (capabilities) => {
|
|
|
1332
1345
|
}]));
|
|
1333
1346
|
return declarations;
|
|
1334
1347
|
};
|
|
1348
|
+
/** True exactly when `v` fits `s`, with a Capability argument's acceptance (ADR 0176). */
|
|
1349
|
+
const conforms = (v, s) => shapeDiagnostics(v, s, true, 0).diags.length === 0;
|
|
1350
|
+
/** The `explain` Built-in's report for `v` against `s` (ADR 0176). */
|
|
1351
|
+
const explain = (v, s) => listValues(shapeDiagnostics(v, s, false, 0).diags.map(diagnosticRecord));
|
|
1335
1352
|
//#endregion
|
|
1336
1353
|
//#region src/generated/machine.ts
|
|
1337
1354
|
const instructions = [
|
|
@@ -5895,9 +5912,8 @@ const sizes = new Map(Object.entries(costModel.sizes));
|
|
|
5895
5912
|
const { constant: CONSTANT, size: SIZE, contents: CONTENTS, characters: CHARACTERS, scalars: SCALARS, utf8: UTF8, bytes: BYTES, items: ITEMS, entries: ENTRIES, digits: DIGITS, scanned: SCANNED, steps: STEPS, program: PROGRAM, frames: FRAMES, count: COUNT, declared: DECLARED } = costMeasure;
|
|
5896
5913
|
const { none: NONE, input: INPUT, result: RESULT, v: V, x1: X1 } = costSubject;
|
|
5897
5914
|
const noCounts = {};
|
|
5898
|
-
|
|
5899
|
-
const
|
|
5900
|
-
const knownContents = /* @__PURE__ */ new WeakMap();
|
|
5915
|
+
/** A map entry's contents besides its value: 16 plus its key's UTF-8 bytes. */
|
|
5916
|
+
const keySize = (key) => 16 + utf8Length(key);
|
|
5901
5917
|
/** The measures of one value that aren't sizes. */
|
|
5902
5918
|
const measureOf = (measure, v) => {
|
|
5903
5919
|
if (!v) return 0;
|
|
@@ -5961,18 +5977,19 @@ const countOf = (measure, counts) => {
|
|
|
5961
5977
|
const contentsOf = (v) => {
|
|
5962
5978
|
switch (v.kind) {
|
|
5963
5979
|
case "list": {
|
|
5964
|
-
const cached = knownContents
|
|
5965
|
-
if (cached
|
|
5980
|
+
const cached = knownContents(v);
|
|
5981
|
+
if (cached >= 0) return cached;
|
|
5966
5982
|
let total = 0;
|
|
5967
5983
|
for (let i = 1; i <= v.length; i++) total += sizeOf(v.index(i));
|
|
5968
|
-
|
|
5984
|
+
cacheContents(v, total);
|
|
5969
5985
|
return total;
|
|
5970
5986
|
}
|
|
5971
5987
|
case "map": {
|
|
5972
|
-
const cached = knownContents
|
|
5973
|
-
if (cached
|
|
5974
|
-
|
|
5975
|
-
|
|
5988
|
+
const cached = knownContents(v);
|
|
5989
|
+
if (cached >= 0) return cached;
|
|
5990
|
+
let total = 0;
|
|
5991
|
+
for (const [key, value] of ownedMapPairs(v)) total += keySize(key) + sizeOf(value);
|
|
5992
|
+
cacheContents(v, total);
|
|
5976
5993
|
return total;
|
|
5977
5994
|
}
|
|
5978
5995
|
case "range": {
|
|
@@ -5986,39 +6003,39 @@ const contentsOf = (v) => {
|
|
|
5986
6003
|
/** Seed a List's contents after growth, without walking its retained items. */
|
|
5987
6004
|
const cacheListExtension = (result, current, part, all) => {
|
|
5988
6005
|
const contents = contentsOf(current) + (all ? contentsOf(part) : sizeOf(part));
|
|
5989
|
-
|
|
5990
|
-
|
|
6006
|
+
cacheContents(result, contents);
|
|
6007
|
+
cacheSize(result, partSize("list", result.length, contents));
|
|
5991
6008
|
};
|
|
5992
6009
|
/** The part of a map's contents its keys add, one term per key. */
|
|
5993
|
-
const keysContents = (keys) => keys.reduce((sum, key) => sum +
|
|
6010
|
+
const keysContents = (keys) => keys.reduce((sum, key) => sum + keySize(key), 0);
|
|
5994
6011
|
/** Seed a newly built List's or map's size from the values it was built of. */
|
|
5995
6012
|
const cacheBuild = (result, items, keys) => {
|
|
5996
6013
|
let contents = keys;
|
|
5997
6014
|
for (const item of items) contents += sizeOf(item);
|
|
5998
|
-
|
|
5999
|
-
|
|
6015
|
+
cacheContents(result, contents);
|
|
6016
|
+
cacheSize(result, partSize(result.kind, result.kind === "map" ? result.mapSize : result.length, contents));
|
|
6000
6017
|
};
|
|
6001
6018
|
/** Seed the logical sizes of point edits from their retained collection. */
|
|
6002
6019
|
const cacheMapWrite = (result, current, key, part) => {
|
|
6003
6020
|
if (result === current) return;
|
|
6004
|
-
const previous = current.hasKey(key) ?
|
|
6005
|
-
const added = part === void 0 ? 0 :
|
|
6021
|
+
const previous = current.hasKey(key) ? keySize(key) + sizeOf(current.get(key)) : 0;
|
|
6022
|
+
const added = part === void 0 ? 0 : keySize(key) + sizeOf(part);
|
|
6006
6023
|
const contents = contentsOf(current) - previous + added;
|
|
6007
|
-
|
|
6008
|
-
|
|
6024
|
+
cacheContents(result, contents);
|
|
6025
|
+
cacheSize(result, partSize("map", result.mapSize, contents));
|
|
6009
6026
|
};
|
|
6010
6027
|
const cacheListEdit = (result, current, i, part) => {
|
|
6011
6028
|
const contents = contentsOf(current) - sizeOf(current.index(i + 1)) + (part === void 0 ? 0 : sizeOf(part));
|
|
6012
|
-
|
|
6013
|
-
|
|
6029
|
+
cacheContents(result, contents);
|
|
6030
|
+
cacheSize(result, partSize("list", result.length, contents));
|
|
6014
6031
|
};
|
|
6015
6032
|
/** A value's logical size (chapter 8, Logical sizes), as if nothing were shared. */
|
|
6016
6033
|
const sizeOf = (v) => {
|
|
6017
|
-
const cached =
|
|
6018
|
-
if (cached
|
|
6034
|
+
const cached = knownSize(v);
|
|
6035
|
+
if (cached >= 0) return cached;
|
|
6019
6036
|
const leaf = leafSize(v, measureOf);
|
|
6020
6037
|
if (leaf !== void 0) {
|
|
6021
|
-
|
|
6038
|
+
cacheSize(v, leaf);
|
|
6022
6039
|
return leaf;
|
|
6023
6040
|
}
|
|
6024
6041
|
const pending = [v];
|
|
@@ -6026,22 +6043,22 @@ const sizeOf = (v) => {
|
|
|
6026
6043
|
const seen = /* @__PURE__ */ new Set();
|
|
6027
6044
|
while (pending.length) {
|
|
6028
6045
|
const next = pending.pop();
|
|
6029
|
-
if (
|
|
6046
|
+
if (knownSize(next) >= 0 || seen.has(next)) continue;
|
|
6030
6047
|
const leaf = leafSize(next, measureOf);
|
|
6031
6048
|
if (leaf !== void 0) {
|
|
6032
|
-
|
|
6049
|
+
cacheSize(next, leaf);
|
|
6033
6050
|
continue;
|
|
6034
6051
|
}
|
|
6035
6052
|
seen.add(next);
|
|
6036
6053
|
order.push(next);
|
|
6037
|
-
for (const child of childrenOf(next)) if (
|
|
6054
|
+
for (const child of childrenOf(next)) if (knownSize(child) < 0 && !seen.has(child)) pending.push(child);
|
|
6038
6055
|
}
|
|
6039
6056
|
for (let i = order.length - 1; i >= 0; i--) {
|
|
6040
6057
|
const value = order[i];
|
|
6041
6058
|
const formula = sizes.get(value.kind);
|
|
6042
|
-
|
|
6059
|
+
cacheSize(value, evaluate(formula, noCounts, value));
|
|
6043
6060
|
}
|
|
6044
|
-
return
|
|
6061
|
+
return knownSize(v);
|
|
6045
6062
|
};
|
|
6046
6063
|
const childrenOf = (v) => {
|
|
6047
6064
|
switch (v.kind) {
|
|
@@ -8628,7 +8645,7 @@ const builtin = (name, args, measure = {}) => {
|
|
|
8628
8645
|
case "conforms":
|
|
8629
8646
|
case "check":
|
|
8630
8647
|
case "explain": {
|
|
8631
|
-
const decoded =
|
|
8648
|
+
const decoded = decodeShapeCached(y);
|
|
8632
8649
|
measure.scanned = decoded.scanned;
|
|
8633
8650
|
if (decoded.error) throw new ScriptError("invalid shape", [
|
|
8634
8651
|
["reason", text(decoded.error.reason)],
|
|
@@ -8747,4 +8764,4 @@ const builtinDefaults = {
|
|
|
8747
8764
|
toFloat32: [text("big")]
|
|
8748
8765
|
};
|
|
8749
8766
|
//#endregion
|
|
8750
|
-
export { arityOf as $, musicalCount as A,
|
|
8767
|
+
export { arityOf as $, musicalCount as A, validMessageSelector as At, splice as B, isKind as C, expectedOf as Ct, matchCaptures as D, shape as Dt, makeRange as E, operationDeclarations as Et, randomBound as F, cacheBuild as G, textForm as H, search as I, keysContents as J, charge as K, setKey as L, outOfRange as M, Lexer as Mt, prepareConversion as N, RESERVED as Nt, matchesOf as O, shapeDiagnostics as Ot, property as P, runTask as Pt, sizeOf as Q, smallArithmetic as R, isEmpty as S, diagnosticRecord as St, makePatternValue as T, mismatch as Tt, waitUs as U, subjectText as V, wrongKind as W, rateOf as X, partSize as Y, resetMeasured as Z, deleteKey as _, acceptsArgumentCount as _t, builtin as a, numberText as at, hasKey as b, defineCapability as bt, canConvert as c, splicesOf as ct, chunkSet as d, costModel as dt, disassemble as et, chunkThere as f, errorMessages as ft, decodeUtf8 as g, LimitReached as gt, convert as h, reservedErrorKeys as ht, arithmetic as i, capturesOf$1 as it, negated as j, validStaticMessageName as jt, member as k, validComputedMessageName as kt, chunkDelete as l, textDisplay as lt, concat as m, limitDefaults as mt, ScriptError as n, instructionSpec as nt, builtinDefaults as o, patternSource as ot, comparison as p, languageVersion as pt, fixedRates as q, appendTo as r, opcodes as rt, byteOf as s, quantityText as st, NotImplementedError as t, functionHead as tt, chunkGet as u, compareText as ut, equals as v, conforms as vt, keyText as w, explain as wt, integerValue as x, defineValueCapability as xt, getKey as y, decodeShape as yt, smallCoefficientOf as z };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { t as defineObjectKind } from "./objects-
|
|
4
|
-
import { Dt as
|
|
5
|
-
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-
|
|
2
|
+
import { P as listValues, V as nothing, b as dec, it as text, t as HostError } from "./errors-VuwK669R.js";
|
|
3
|
+
import { t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
4
|
+
import { Dt as shape, kt as validComputedMessageName, n as ScriptError, xt as defineValueCapability } from "./operations-BAELnqwf.js";
|
|
5
|
+
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-B7MCQ4ii.js";
|
|
6
6
|
//#region src/peer-capability.ts
|
|
7
7
|
/** The Core-fixed Object Kind of a Peer: no properties, no collection. */
|
|
8
8
|
const PEER_KIND = "peer";
|
|
@@ -65,6 +65,7 @@ const nonEmpty = (fn, v) => {
|
|
|
65
65
|
*/
|
|
66
66
|
const peerCapability = (impl, costs) => {
|
|
67
67
|
for (const name of OPERATIONS) if (!impl || typeof impl[name] !== "function") throw new HostError("invalid value", `Peer needs ${name}`);
|
|
68
|
+
if (impl.release !== void 0 && typeof impl.release !== "function") throw new HostError("invalid value", "Peer release must be a function");
|
|
68
69
|
const operations = {
|
|
69
70
|
expose: {
|
|
70
71
|
mode: "suspending",
|
|
@@ -143,7 +144,8 @@ const peerCapability = (impl, costs) => {
|
|
|
143
144
|
error: (code) => hostErrors[name]?.includes(code) ?? false,
|
|
144
145
|
...name === "expose" || name === "reach" || name === "unexpose" ? { arguments: (args) => nonEmpty(name, args[0]) } : name === "post" || name === "call" ? { arguments: checkRemoteSend } : {}
|
|
145
146
|
});
|
|
146
|
-
|
|
147
|
+
const release = impl.release === void 0 ? void 0 : (context) => impl.release(context);
|
|
148
|
+
return fixed(defineValueCapability("peer", operations, void 0, release));
|
|
147
149
|
};
|
|
148
150
|
//#endregion
|
|
149
151
|
export { peerKind as a, peerCapability as i, PEER_KIND as n, PEER_POST as r, PEER_CALL as t };
|
package/peer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { J as Value, P as TsGroup,
|
|
2
|
+
import { J as Value, P as TsGroup, an as PeerImpl } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/peer-message-port.d.ts
|
|
4
4
|
/** What the link needs of a `MessagePort`, a `Worker` or a worker's `self`. */
|
|
5
5
|
type PortEndpoint = {
|
|
@@ -156,6 +156,11 @@ export declare class PeerRouter {
|
|
|
156
156
|
connect(link: PeerLink): void;
|
|
157
157
|
/** Closes every link. */
|
|
158
158
|
close(): void;
|
|
159
|
+
/**
|
|
160
|
+
* The wire for a dialled link, or undefined when there is none: the dial
|
|
161
|
+
* found nothing, rejected, or gave a closed link. Only the dial's own
|
|
162
|
+
* rejection is caught, so a fault in what uses the wire still surfaces.
|
|
163
|
+
*/
|
|
159
164
|
private wireFor;
|
|
160
165
|
/** A link to the Host with this key, dialled if the Host knows its address. */
|
|
161
166
|
private wireTo;
|
|
@@ -165,6 +170,8 @@ export declare class PeerRouter {
|
|
|
165
170
|
private arrive;
|
|
166
171
|
/** The `peerCapability` implementation. */
|
|
167
172
|
readonly impl: PeerImpl;
|
|
173
|
+
private withdraw;
|
|
174
|
+
private release;
|
|
168
175
|
private expose;
|
|
169
176
|
private reach;
|
|
170
177
|
private send;
|
package/peer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { H as num, L as map, N as list, V as nothing, i as ScriptError, it as text } from "./errors-VuwK669R.js";
|
|
3
3
|
import { n as toBase64, t as fromBase64 } from "./base64-CDO-a06R.js";
|
|
4
|
-
import { r as decodeValue } from "./readers-
|
|
5
|
-
import { t as encodeValue } from "./encoding-
|
|
6
|
-
import { a as peerKind } from "./peer-capability-
|
|
4
|
+
import { r as decodeValue } from "./readers-BG8g59qS.js";
|
|
5
|
+
import { t as encodeValue } from "./encoding-B7MCQ4ii.js";
|
|
6
|
+
import { a as peerKind } from "./peer-capability-B8eKbljR.js";
|
|
7
7
|
//#region src/peer-message-port.ts
|
|
8
8
|
/** The largest frame a link sends or reads, in UTF-8 bytes. */
|
|
9
9
|
const MAX_FRAME$1 = 16777216;
|
|
@@ -316,6 +316,7 @@ var Wire = class {
|
|
|
316
316
|
for (const answer of waiting) answer(null);
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
|
+
const sameOwner = (a, b) => a.group === b.group && a.scriptName === b.scriptName && a.grantName === b.grantName;
|
|
319
320
|
/** A Host's side of `peer`: its exposures and the links to other Hosts. */
|
|
320
321
|
var PeerRouter = class PeerRouter {
|
|
321
322
|
o;
|
|
@@ -376,8 +377,13 @@ var PeerRouter = class PeerRouter {
|
|
|
376
377
|
close() {
|
|
377
378
|
for (const link of this.wires.keys()) link.close();
|
|
378
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* The wire for a dialled link, or undefined when there is none: the dial
|
|
382
|
+
* found nothing, rejected, or gave a closed link. Only the dial's own
|
|
383
|
+
* rejection is caught, so a fault in what uses the wire still surfaces.
|
|
384
|
+
*/
|
|
379
385
|
async wireFor(link) {
|
|
380
|
-
const got = await link;
|
|
386
|
+
const got = await link.catch(() => void 0);
|
|
381
387
|
if (!got || got.closed) return;
|
|
382
388
|
this.connect(got);
|
|
383
389
|
return this.wires.get(got);
|
|
@@ -400,7 +406,7 @@ var PeerRouter = class PeerRouter {
|
|
|
400
406
|
}
|
|
401
407
|
local(identity, secret, message, args, waits) {
|
|
402
408
|
const held = this.exposures.get(secret);
|
|
403
|
-
const script = held && this.group.script(held.
|
|
409
|
+
const script = held && this.group.script(held.owner.scriptName);
|
|
404
410
|
if (!script) return waits ? "not exposed" : void 0;
|
|
405
411
|
try {
|
|
406
412
|
if (!waits) {
|
|
@@ -466,26 +472,37 @@ var PeerRouter = class PeerRouter {
|
|
|
466
472
|
unexpose: (call, exposure) => {
|
|
467
473
|
const key = typeof exposure === "string" ? this.names.get(exposure) : split(exposure.id)?.[1];
|
|
468
474
|
const held = key === void 0 ? void 0 : this.exposures.get(key);
|
|
469
|
-
if (held && held.
|
|
470
|
-
this.exposures.delete(key);
|
|
471
|
-
if (held.name !== void 0) this.names.delete(held.name);
|
|
472
|
-
}
|
|
475
|
+
if (held && sameOwner(held.owner, call)) this.withdraw(key, held);
|
|
473
476
|
},
|
|
477
|
+
release: (context) => this.release(context),
|
|
474
478
|
reach: (call, address) => this.reach(call, address),
|
|
475
479
|
post: (call, peer, message, args) => this.send(call, peer, message, args, false),
|
|
476
480
|
call: (call, peer, message, args) => this.send(call, peer, message, args, true),
|
|
477
481
|
caller: (call) => (call.delivery === void 0 ? void 0 : this.callers.get(call.delivery)) ?? nothing
|
|
478
482
|
};
|
|
483
|
+
withdraw(key, held) {
|
|
484
|
+
this.exposures.delete(key);
|
|
485
|
+
if (held.name !== void 0 && this.names.get(held.name) === key) this.names.delete(held.name);
|
|
486
|
+
}
|
|
487
|
+
release(context) {
|
|
488
|
+
if (context.reason === "reload") return;
|
|
489
|
+
for (const [key, held] of this.exposures) if (sameOwner(held.owner, context)) this.withdraw(key, held);
|
|
490
|
+
}
|
|
479
491
|
expose(call, name) {
|
|
480
492
|
if (name !== void 0 && this.names.has(name)) {
|
|
481
493
|
const key = this.names.get(name);
|
|
482
|
-
if (this.exposures.get(key).
|
|
494
|
+
if (!sameOwner(this.exposures.get(key).owner, call)) return call.fail(failure("name in use"));
|
|
483
495
|
return call.answer(this.peerFor(`${this.key}/${key}`));
|
|
484
496
|
}
|
|
485
497
|
const key = secret();
|
|
498
|
+
const { grantName, group, scriptName } = call;
|
|
486
499
|
this.exposures.set(key, {
|
|
487
500
|
name,
|
|
488
|
-
|
|
501
|
+
owner: {
|
|
502
|
+
grantName,
|
|
503
|
+
group,
|
|
504
|
+
scriptName
|
|
505
|
+
}
|
|
489
506
|
});
|
|
490
507
|
if (name !== void 0) this.names.set(name, key);
|
|
491
508
|
call.answer(this.peerFor(`${this.key}/${key}`));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { J as Value } from "./debug-
|
|
2
|
+
import { J as Value } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/readers.d.ts
|
|
4
4
|
/** Finds the Host Object a reader names by its kind and id, or none. */
|
|
5
5
|
type ObjectResolver = (kind: string, id: string) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { D as instant, E as hiddenCodePoint, J as range, K as quantity, L as map, P as listValues, Qt as parseInstant, V as nothing, b as dec, f as bytesOf, g as civilDate, it as text, l as Value, o as invalidValue, tn as assertScalarText, u as bool } from "./errors-VuwK669R.js";
|
|
3
3
|
import { t as fromBase64 } from "./base64-CDO-a06R.js";
|
|
4
4
|
//#region src/readers.ts
|
|
5
5
|
var Reader = class {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { g as decodeUtf8, ot as patternSource } from "./operations-
|
|
4
|
-
import { _ as viewSource, t as checkSource } from "./checker-
|
|
2
|
+
import { D as instant, G as patternValue, H as num, J as range, K as quantity, L as map, P as listValues, Qt as parseInstant, U as objectValue, V as nothing, b as dec, d as bytes, g as civilDate, it as text, l as Value, o as invalidValue, qt as formatInstant, sn as normalizeNFC, u as bool, w as functionValue } from "./errors-VuwK669R.js";
|
|
3
|
+
import { g as decodeUtf8, ot as patternSource } from "./operations-BAELnqwf.js";
|
|
4
|
+
import { _ as viewSource, t as checkSource } from "./checker-Q4w7rLXk.js";
|
|
5
5
|
import { n as toBase64 } from "./base64-CDO-a06R.js";
|
|
6
|
-
import { a as fromJson, n as JsonObject, o as isJsonNumber, s as isJsonObject, t as JsonNumber } from "./readers-
|
|
6
|
+
import { a as fromJson, n as JsonObject, o as isJsonNumber, s as isJsonObject, t as JsonNumber } from "./readers-BG8g59qS.js";
|
|
7
7
|
//#region src/binary-value.ts
|
|
8
8
|
const coreErrors = /* @__PURE__ */ new WeakSet();
|
|
9
9
|
const max = 2n ** 64n;
|
|
@@ -799,6 +799,11 @@ const envelopeMessages = [
|
|
|
799
799
|
name: "refuseWorker",
|
|
800
800
|
kind: "bool",
|
|
801
801
|
required: false
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: "forbidSuspension",
|
|
805
|
+
kind: "bool",
|
|
806
|
+
required: false
|
|
802
807
|
}
|
|
803
808
|
]
|
|
804
809
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { Q as sizeOf, ut as compareText } from "./operations-
|
|
4
|
-
import { t as encodeValue } from "./encoding-
|
|
2
|
+
import { L as map, P as listValues, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-VuwK669R.js";
|
|
3
|
+
import { Q as sizeOf, ut as compareText } from "./operations-BAELnqwf.js";
|
|
4
|
+
import { t as encodeValue } from "./encoding-B7MCQ4ii.js";
|
|
5
5
|
import { n as sha256 } from "./sha256-9CGf5BS_.js";
|
|
6
|
-
import { n as hostScriptError } from "./store-capability-
|
|
6
|
+
import { n as hostScriptError } from "./store-capability-CxQJ_Huz.js";
|
|
7
7
|
//#region src/notify/router.ts
|
|
8
8
|
/**
|
|
9
9
|
* Whether a commit changed a key's value: compared by the bytes of the Value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
3
|
-
import { t as TsCore } from "./core-
|
|
2
|
+
import { E as RestoreResult, I as TsRestoreOptions, J as Value, Mt as GrantContext, O as SaveOptions, P as TsGroup, bt as Call, tn as Group } from "./debug-s6QIovKS.js";
|
|
3
|
+
import { t as TsCore } from "./core-BBPI6EhG.js";
|
|
4
4
|
//#region src/notify/router.d.ts
|
|
5
5
|
/** A Store's four limits on its watches (Store Notifications, Limits). */
|
|
6
6
|
type WatchLimits = {
|
package/session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { J as Value } from "./debug-
|
|
3
|
-
import { C as Setup, _ as UserPrompt, a as ReplayOptions, c as parseTranscript, d as DebugAction, f as MOCK_ARGUMENTS, g as SourcePlacement, h as SessionHost, i as parseEnvelope, l as replayTranscript, m as SessionEnvironment, n as ObjectReference, o as Replayed, p as Mock, r as SessionObjects, s as TranscriptItem, t as Envelope, u as writeTranscript, v as Waiting } from "./objects-
|
|
2
|
+
import { J as Value } from "./debug-s6QIovKS.js";
|
|
3
|
+
import { C as Setup, _ as UserPrompt, a as ReplayOptions, c as parseTranscript, d as DebugAction, f as MOCK_ARGUMENTS, g as SourcePlacement, h as SessionHost, i as parseEnvelope, l as replayTranscript, m as SessionEnvironment, n as ObjectReference, o as Replayed, p as Mock, r as SessionObjects, s as TranscriptItem, t as Envelope, u as writeTranscript, v as Waiting } from "./objects-q0lnCK-4.js";
|
|
4
4
|
//#region src/session/describe.d.ts
|
|
5
5
|
/** One declaration of the session source, as `:describe` reads it. */
|
|
6
6
|
type DeclaredName = {
|
package/session.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { C as registeredStdlib, T as stdlibSource, a as recordLine, h as defaultLimits, i as restore, l as compileLibrary, o as traceValue } from "./group-
|
|
4
|
-
import { o as stateOf, t as defineObjectKind } from "./objects-
|
|
5
|
-
import {
|
|
6
|
-
import { _ as viewSource, c as parseSource, f as declarationDocs, h as leadingDoc, m as functionDoc, s as parseEntry, t as checkSource } from "./checker-
|
|
7
|
-
import { n as exportManifest, o as shapeData, t as canonicalJSON } from "./manifest-
|
|
8
|
-
import { c as readDisplay, l as readOrderedJSON, r as decodeValue } from "./readers-
|
|
9
|
-
import { a as clockCapability, i as calendarCapability, n as quoteJSON, o as consoleCapability, t as encodeValue } from "./encoding-
|
|
10
|
-
import { n as localeCapability, t as userCapability } from "./user-capability-
|
|
11
|
-
import { r as storeCapability } from "./store-capability-
|
|
2
|
+
import { H as num, J as range, L as map, P as listValues, Qt as parseInstant, V as nothing, i as ScriptError, it as text, l as Value, n as LoadError, nn as characterBoundaries, on as lower, pn as builtins, qt as formatInstant, t as HostError, u as bool } from "./errors-VuwK669R.js";
|
|
3
|
+
import { C as registeredStdlib, T as stdlibSource, a as recordLine, h as defaultLimits, i as restore, l as compileLibrary, o as traceValue } from "./group-Ccuqwq12.js";
|
|
4
|
+
import { o as stateOf, t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
5
|
+
import { Dt as shape, Et as operationDeclarations, H as textForm$1, U as waitUs, jt as validStaticMessageName, tt as functionHead, ut as compareText, x as integerValue, xt as defineValueCapability } from "./operations-BAELnqwf.js";
|
|
6
|
+
import { _ as viewSource, c as parseSource, f as declarationDocs, h as leadingDoc, m as functionDoc, s as parseEntry, t as checkSource } from "./checker-Q4w7rLXk.js";
|
|
7
|
+
import { n as exportManifest, o as shapeData, t as canonicalJSON } from "./manifest-BeViDIoy.js";
|
|
8
|
+
import { c as readDisplay, l as readOrderedJSON, r as decodeValue } from "./readers-BG8g59qS.js";
|
|
9
|
+
import { a as clockCapability, i as calendarCapability, n as quoteJSON, o as consoleCapability, t as encodeValue } from "./encoding-B7MCQ4ii.js";
|
|
10
|
+
import { n as localeCapability, t as userCapability } from "./user-capability-ClYd8Vln.js";
|
|
11
|
+
import { r as storeCapability } from "./store-capability-CxQJ_Huz.js";
|
|
12
12
|
import { buildSetupGroup, capabilityOperations, immutableSetup, shapeOf } from "./setup.js";
|
|
13
|
-
import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-
|
|
14
|
-
import { i as memoryStores } from "./store-
|
|
13
|
+
import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-OL1BveVZ.js";
|
|
14
|
+
import { i as memoryStores } from "./store-DzpyWjt2.js";
|
|
15
15
|
//#region src/session/objects.ts
|
|
16
16
|
const externalCollection = () => {
|
|
17
17
|
throw new Error("external collection callback in replay");
|
package/setup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
3
|
-
import { A as shapeOf, C as Setup, D as capabilityOperations, E as buildSetupGroup, M as tsCore, O as immutableSetup, S as OperationSpec, T as ShapeSpec, b as MissingCapabilityError, j as shapeSpec, k as musicalClockOf, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-
|
|
2
|
+
import { Qt as operationDeclarations } from "./debug-s6QIovKS.js";
|
|
3
|
+
import { A as shapeOf, C as Setup, D as capabilityOperations, E as buildSetupGroup, M as tsCore, O as immutableSetup, S as OperationSpec, T as ShapeSpec, b as MissingCapabilityError, j as shapeSpec, k as musicalClockOf, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-q0lnCK-4.js";
|
|
4
4
|
export { CaseCore, MissingCapabilityError, ObjectRefSpec, OperationSpec, Setup, SetupGroup, ShapeSpec, buildSetupGroup, capabilityOperations, immutableSetup, musicalClockOf, operationDeclarations, shapeOf, shapeSpec, tsCore };
|
package/setup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as LoadError } from "./errors-
|
|
3
|
-
import { i as restore, l as compileLibrary, r as newGroup, u as replacementLibraries } from "./group-
|
|
4
|
-
import { t as defineObjectKind } from "./objects-
|
|
5
|
-
import {
|
|
6
|
-
import { r as MUSICAL_CLOCK } from "./encoding-
|
|
2
|
+
import { n as LoadError } from "./errors-VuwK669R.js";
|
|
3
|
+
import { i as restore, l as compileLibrary, r as newGroup, u as replacementLibraries } from "./group-Ccuqwq12.js";
|
|
4
|
+
import { t as defineObjectKind } from "./objects-TarIKBL8.js";
|
|
5
|
+
import { Dt as shape, Et as operationDeclarations } from "./operations-BAELnqwf.js";
|
|
6
|
+
import { r as MUSICAL_CLOCK } from "./encoding-B7MCQ4ii.js";
|
|
7
7
|
//#region src/setup.ts
|
|
8
8
|
const tsCore = {
|
|
9
9
|
compileLibrary,
|
|
@@ -131,6 +131,7 @@ const buildSetupGroup = (setup, capabilities, options) => {
|
|
|
131
131
|
return group.load({
|
|
132
132
|
grants,
|
|
133
133
|
grantsAsUsed: script.grantsAsUsed,
|
|
134
|
+
...script.forbidSuspension ? { forbidSuspension: true } : {},
|
|
134
135
|
name: script.name,
|
|
135
136
|
source: script.text ?? readSource(script.source),
|
|
136
137
|
limits: script.limits,
|
package/sqlite.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { Wt as SegmentCoordinator,
|
|
3
|
-
import { a as Stores, r as StoreQuotas } from "./engine-
|
|
2
|
+
import { Wt as SegmentCoordinator, _n as SqlParams, bn as SqliteBinding, bt as Call, mn as StoreImpl, vn as SqlRows, xn as SqliteImpl } from "./debug-s6QIovKS.js";
|
|
3
|
+
import { a as Stores, r as StoreQuotas } from "./engine-Dy-BCoiw.js";
|
|
4
4
|
//#region src/sqlite/database.d.ts
|
|
5
5
|
/** The table that keeps a database's Stores, which no `sqlite` Grant may use. */
|
|
6
6
|
export declare const STORE_TABLE = "store";
|
package/sqlite.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { r as decodeValue } from "./readers-
|
|
4
|
-
import { t as encodeValue } from "./encoding-
|
|
5
|
-
import { n as hostScriptError } from "./store-capability-
|
|
6
|
-
import { r as Stores, t as StoreContentsError } from "./engine-
|
|
2
|
+
import { b as dec, it as text, t as HostError } from "./errors-VuwK669R.js";
|
|
3
|
+
import { r as decodeValue } from "./readers-BG8g59qS.js";
|
|
4
|
+
import { t as encodeValue } from "./encoding-B7MCQ4ii.js";
|
|
5
|
+
import { n as hostScriptError } from "./store-capability-CxQJ_Huz.js";
|
|
6
|
+
import { r as Stores, t as StoreContentsError } from "./engine-OL1BveVZ.js";
|
|
7
7
|
import { DatabaseSync } from "node:sqlite";
|
|
8
8
|
//#region src/sqlite/scan.ts
|
|
9
9
|
const isWordChar = (c) => /[\w$]/.test(c) || c.charCodeAt(0) > 127;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { ut as compareText } from "./operations-
|
|
3
|
-
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-
|
|
2
|
+
import { ut as compareText } from "./operations-BAELnqwf.js";
|
|
3
|
+
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-OL1BveVZ.js";
|
|
4
4
|
//#region src/store/memory.ts
|
|
5
5
|
/** A backend that keeps nothing outside the engine's own copy. */
|
|
6
6
|
const memoryBackend = () => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { L as
|
|
3
|
-
import { Dt as
|
|
4
|
-
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-
|
|
2
|
+
import { L as map, V as nothing, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-VuwK669R.js";
|
|
3
|
+
import { Dt as shape, ft as errorMessages, i as arithmetic, 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
5
|
//#region src/store-capability.ts
|
|
6
6
|
/** A Core-raised error as the Host sees it, with its catalogue message. */
|
|
7
7
|
const hostScriptError = (code, fields) => {
|
package/store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { n as RouterOptions } from "./router-
|
|
3
|
-
import { a as Stores, c as sessionQuotas, i as StoreStateUnknownError, l as sessionWatchLimits, n as StoreContentsError, o as decodeContents, r as StoreQuotas, s as encodeContents, t as StoreBackend } from "./engine-
|
|
2
|
+
import { n as RouterOptions } from "./router-DXoJ_2Z4.js";
|
|
3
|
+
import { a as Stores, c as sessionQuotas, i as StoreStateUnknownError, l as sessionWatchLimits, n as StoreContentsError, o as decodeContents, r as StoreQuotas, s as encodeContents, t as StoreBackend } from "./engine-Dy-BCoiw.js";
|
|
4
4
|
//#region src/store/memory.d.ts
|
|
5
5
|
/** A backend that keeps nothing outside the engine's own copy. */
|
|
6
6
|
export declare const memoryBackend: () => StoreBackend;
|
package/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, o as sessionQuotas, r as Stores, s as sessionWatchLimits, t as StoreContentsError } from "./engine-
|
|
3
|
-
import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-
|
|
2
|
+
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, o as sessionQuotas, r as Stores, s as sessionWatchLimits, t as StoreContentsError } from "./engine-OL1BveVZ.js";
|
|
3
|
+
import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-DzpyWjt2.js";
|
|
4
4
|
export { StoreContentsError, StoreStateUnknownError, Stores, decodeContents, encodeContents, memoryBackend, memoryStores, sessionQuotas, sessionWatchLimits, webStorageBackend, webStorageStores };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-
|
|
2
|
+
import { Dt as integerOf, L as map, Ot as isInteger, it as text, t as HostError, u as bool, x as decimalParts } from "./errors-VuwK669R.js";
|
|
3
|
+
import { Dt as shape, n as ScriptError, xt as defineValueCapability } from "./operations-BAELnqwf.js";
|
|
4
|
+
import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-B7MCQ4ii.js";
|
|
5
5
|
//#region src/locale-tag.ts
|
|
6
6
|
const grandfathered = /^(?:en-gb-oed|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)|sgn-(?:be-fr|be-nl|ch-de))$/i;
|
|
7
7
|
const alpha = /^[a-z]+$/i;
|