@northtalk/ts 0.5.0 → 0.6.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/README.md +11 -0
- package/base64-CDO-a06R.js +29 -0
- package/{binary-value-B3knLdHD.d.ts → binary-value-C4ZiXVjv.d.ts} +1 -1
- package/{checker-DMI4LiRm.js → checker-CUhn2XaM.js} +4 -4
- package/{core-D_9OuTRE.d.ts → core-egHbNmve.d.ts} +1 -1
- package/{debug-nN5tQ_p4.d.ts → debug--Of4MSLw.d.ts} +35 -11
- package/debug.d.ts +1 -1
- package/debug.js +1 -1
- package/{driver-Bf-7Roq6.d.ts → driver-BIm1mL77.d.ts} +1 -1
- package/driver.d.ts +1 -1
- package/driver.js +1 -1
- package/{encoding-C3Q7pIC9.js → encoding-RUuES_e4.js} +2 -2
- package/{engine-BpdGfAND.js → engine-CXf5FCwi.js} +6 -6
- package/{engine-CQqt4rTB.d.ts → engine-DbDcopGM.d.ts} +2 -2
- package/{errors-BKJES3Zu.js → errors-D11zizZg.js} +1580 -1481
- package/{group-Bz2wh72R.js → group-BpzTo0k4.js} +84 -40
- package/http-fetch-DFwVIOQg.js +517 -0
- package/http.d.ts +39 -2
- package/http.js +190 -7
- package/index.d.ts +10 -660
- package/index.js +36 -49
- package/{inline-grants-Cx0Z9XAt.js → inline-grants-XbX9HL_w.js} +72 -304
- package/lean-DiS9rUcn.d.ts +741 -0
- package/lean-aCvN6y52.js +47 -0
- package/lean.d.ts +8 -0
- package/lean.js +15 -0
- package/{manifest-Dw-8Unmf.js → manifest-CCfpn0kC.js} +3 -4
- package/{manifest-DYAbIyQm.d.ts → manifest-mpivREn-.d.ts} +2 -2
- 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-BRcpeXwZ.d.ts → objects-DYq_YvaQ.d.ts} +5 -1
- package/{objects-BC4fS0vq.js → objects-DmUc0lha.js} +1 -1
- package/{base64-Dtqaz_0A.js → operations-DnCcztkZ.js} +1632 -32
- package/package.json +36 -2
- package/{readers-L90Hoa97.d.ts → readers-8WCimMop.d.ts} +1 -1
- package/{readers-B5e5bBrY.js → readers-CsvlahLi.js} +2 -2
- package/{request-pump-binary-BjnyqXV5.js → request-pump-binary-oqjWFqZA.js} +5 -4
- package/{router-CBuMIl6i.d.ts → router-BQsO8aPV.d.ts} +2 -2
- package/{router-BCHEfs4x.js → router-BZ-aYeXA.js} +4 -4
- package/session.d.ts +2 -2
- package/session.js +55 -16
- package/setup.d.ts +1 -1
- package/setup.js +4 -4
- package/sqlite.d.ts +2 -2
- package/sqlite.js +5 -5
- package/stdlib/bytes.d.ts +6 -0
- package/stdlib/bytes.js +11 -0
- package/stdlib/date.d.ts +6 -0
- package/stdlib/date.js +11 -0
- package/stdlib/json.d.ts +6 -0
- package/stdlib/json.js +11 -0
- package/stdlib/list.d.ts +6 -0
- package/stdlib/list.js +10 -0
- package/stdlib/map.d.ts +6 -0
- package/stdlib/map.js +10 -0
- package/stdlib/text.d.ts +6 -0
- package/stdlib/text.js +10 -0
- package/stdlib/units.d.ts +6 -0
- package/stdlib/units.js +10 -0
- package/stdlib-registry-BwitI3Ox.d.ts +18 -0
- package/{store-DTQa0lyE.js → store-DHlo6fP5.js} +2 -2
- package/{store-capability-BxXgiRM7.js → store-capability-BrUUAwVS.js} +3 -4
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-5-IvCeZI.js → user-capability-BcRQyyEw.js} +4 -5
- package/wasm.d.ts +8 -6
- package/wasm.js +19 -15
- package/capabilities-Bi5Qm6Fr.js +0 -1320
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference lib="esnext.disposable" />
|
|
2
|
+
import { t as StdlibLibrary } from "../stdlib-registry-BwitI3Ox.js";
|
|
3
|
+
//#region src/generated/stdlib/units.d.ts
|
|
4
|
+
/** The `units` stdlib Library, which `registerStdlib` registers. */
|
|
5
|
+
export declare const units: StdlibLibrary;
|
|
6
|
+
//#endregion
|
package/stdlib/units.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/generated/stdlib/units.ts
|
|
3
|
+
/** The `units` stdlib Library, which `registerStdlib` registers. */
|
|
4
|
+
const units = {
|
|
5
|
+
name: "units",
|
|
6
|
+
source: "-- The `units` Library. Chapter 7 says what each export does, and this source\n-- does exactly that (ADR 0021). It is normative Spec text: its private\n-- helpers, its Fuel and the order of its calls are fixed here.\n--\n-- Temperature Units are differences only (ADR 0022), so an absolute\n-- temperature is a plain number. Each function computes exactly its entry's\n-- expression, left to right.\n\n--| `c * 9 / 5 + 32`\nfunction celsiusToFahrenheit c\n needNumber(c)\n return c * 9 / 5 + 32\nend celsiusToFahrenheit\n\n--| `(f - 32) * 5 / 9`\nfunction fahrenheitToCelsius f\n needNumber(f)\n return (f - 32) * 5 / 9\nend fahrenheitToCelsius\n\n--| `c + 273.15`\nfunction celsiusToKelvin c\n needNumber(c)\n return c + 273.15\nend celsiusToKelvin\n\n--| `k - 273.15`\nfunction kelvinToCelsius k\n needNumber(k)\n return k - 273.15\nend kelvinToCelsius\n\n--| `(f - 32) * 5 / 9 + 273.15`\nfunction fahrenheitToKelvin f\n needNumber(f)\n return (f - 32) * 5 / 9 + 273.15\nend fahrenheitToKelvin\n\n--| `(k - 273.15) * 9 / 5 + 32`\nfunction kelvinToFahrenheit k\n needNumber(k)\n return (k - 273.15) * 9 / 5 + 32\nend kelvinToFahrenheit\n\n-- The helpers below are the same in every stdlib Library. They raise the\n-- catalogue errors of chapter 6. The Core adds each one's `message` and\n-- points its `at` at the Script's call (ADR 0037).\n\nprivate function wrongKind expected, v\n put kindOf(v) into got\n throw {code: \"wrong kind\", expected: expected, got: got, value: v}\nend wrongKind\n\nprivate function outOfDomain fn, v\n throw {code: \"out of domain\", function: fn, value: v}\nend outOfDomain\n\nprivate function needText v\n if v is not a text then wrongKind(\"text\", v)\nend needText\n\nprivate function needNumber v\n if v is not a number then wrongKind(\"number\", v)\nend needNumber\n\nprivate function needInteger v\n if v is not a number then wrongKind(\"number\", v)\n if v is not an integer then wrongKind(\"integer\", v)\nend needInteger\n\nprivate function needList v\n if v is not a list then wrongKind(\"list\", v)\nend needList\n\nprivate function needMap v\n if v is not a map then wrongKind(\"map\", v)\nend needMap\n\nprivate function needFunction v\n if v is not a function then wrongKind(\"function\", v)\nend needFunction\n",
|
|
7
|
+
requires: []
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { units };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference lib="esnext.disposable" />
|
|
2
|
+
//#region src/stdlib-registry.d.ts
|
|
3
|
+
/** A stdlib Library's normative source, from `@northtalk/ts/stdlib/<name>`. */
|
|
4
|
+
type StdlibLibrary = {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
/** The stdlib Libraries its `use` lines name. */
|
|
7
|
+
readonly requires: readonly StdlibLibrary[];
|
|
8
|
+
readonly source: string;
|
|
9
|
+
};
|
|
10
|
+
/** The seven stdlib Library names, which a Host may not register. */
|
|
11
|
+
declare const stdlibNames: ReadonlySet<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Make stdlib Libraries available to every Group in the process, with the
|
|
14
|
+
* stdlib Libraries they import. Registering one twice does nothing.
|
|
15
|
+
*/
|
|
16
|
+
declare const registerStdlib: (...libraries: readonly StdlibLibrary[]) => void;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { registerStdlib as n, stdlibNames as r, StdlibLibrary as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-
|
|
2
|
+
import { lt as compareText } from "./operations-DnCcztkZ.js";
|
|
3
|
+
import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-CXf5FCwi.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,8 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { L as nothing, N as map, Q as text, T as instant, i as ScriptError, t as HostError, u as bool } from "./errors-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as registerStandardChecks } from "./encoding-C3Q7pIC9.js";
|
|
2
|
+
import { L as nothing, N as map, Q as text, T as instant, i as ScriptError, t as HostError, u as bool } from "./errors-D11zizZg.js";
|
|
3
|
+
import { St as validComputedMessageName, dt as errorMessages, i as arithmetic, n as ScriptError$1, vt as defineValueCapability, xt as shape } from "./operations-DnCcztkZ.js";
|
|
4
|
+
import { r as registerStandardChecks } from "./encoding-RUuES_e4.js";
|
|
6
5
|
//#region src/standard-capabilities.ts
|
|
7
6
|
const costOf = (costs, name) => {
|
|
8
7
|
const cost = costs && Object.hasOwn(costs, name) ? costs[name] : void 0;
|
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-BQsO8aPV.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-DbDcopGM.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-CXf5FCwi.js";
|
|
3
|
+
import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-DHlo6fP5.js";
|
|
4
4
|
export { StoreContentsError, StoreStateUnknownError, Stores, decodeContents, encodeContents, memoryBackend, memoryStores, sessionQuotas, sessionWatchLimits, webStorageBackend, webStorageStores };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as fixed, s as costOf } from "./store-capability-BxXgiRM7.js";
|
|
2
|
+
import { N as map, Q as text, bt as integerOf, t as HostError, u as bool, xt as isInteger, y as decimalParts } from "./errors-D11zizZg.js";
|
|
3
|
+
import { n as ScriptError, vt as defineValueCapability, xt as shape } from "./operations-DnCcztkZ.js";
|
|
4
|
+
import { r as registerStandardChecks } from "./encoding-RUuES_e4.js";
|
|
5
|
+
import { c as fixed, s as costOf } from "./store-capability-BrUUAwVS.js";
|
|
7
6
|
//#region src/locale-tag.ts
|
|
8
7
|
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;
|
|
9
8
|
const alpha = /^[a-z]+$/i;
|
package/wasm.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { $ as instant, $t as Script, At as FireOp, Bt as ReleaseHook, C as Report, Ct as ChargeRequest, Dn as
|
|
3
|
-
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, l as createGroup, m as encodeJson, n as MessageDecl, o as inlineGrants, p as decodeJson, r as exportManifest, s as CreateGroupOptions, t as ManifestSpec, u as Handlers, v as ToValueOptions, x as talk, y as fromValue } from "./manifest-
|
|
4
|
-
import { a as decodeValue, n as Json, o as readDisplay } from "./readers-
|
|
5
|
-
import { t as BinaryValueOptions } from "./binary-value-
|
|
2
|
+
import { $ as instant, $n as ScriptError, $t as Script, An as OperationRef, At as FireOp, Bt as ReleaseHook, C as Report, Ct as ChargeRequest, Dn as Library, Dt as EffectResult, E as RestoreResult, Et as Cost, Fn as Limits, Ft as Metering, G as RunStarted, Gt as SegmentGrant, H as RunAccounting, Ht as ScopeDecl, In as Outcome, It as Operation, J as Value, Jn as HostError, Jt as SuspendingOp, K as Decimal, Kt as SegmentLifecycle, Lt as Operations, Mt as GrantContext, N as Settlement, Nt as ImmediateOp, Ot as ErrorDecl, Pn as LimitName, Pt as LimitReached, Q as dec, Qn as MailboxFull, Qt as Group, R as Verdict, Rt as PlainArg, S as PumpedRequest, Sn as TimerImpl, St as CapabilityDefiner, T as RestoreOptions, Tt as CoordinatedLifecycle, U as RunAncestry, Ut as SegmentContext, V as CausalWork, Vt as ReleaseReason, W as RunDiscarded, Wt as SegmentCoordinator, X as bytes, Xn as LoadDiagnostic, Xt as shape, Y as bool, Yn as HostErrorCode, Yt as defineCapability, Z as civilDate, Zn as LoadError, Zt as Core, _ as LoadOptions, _n as LocaleImpl, _t as PropDef, at as quantity, b as PumpOptions, bn as ConsoleImpl, bt as Call, cn as StoreImpl, d as Counters, dn as SqlParams, dt as nowMicros, en as Versions, er as SendFailedReason, f as Decided, fn as SqlRows, ft as parseInstant, g as Inspection, gt as ObjectKindDef, h as GroupOptions, hn as SqliteImpl, ht as ObjectKind, in as HttpServerImpl, it as num, jt as Grant, kn as LibrarySource, kt as FieldShape, l as CancellationOptions, ln as add, lt as text, m as EffectFailure, mn as SqliteBinding, mt as ObjectElements, nn as HttpClientImpl, nt as map, on as UserImpl, ot as range, p as Deciding, pn as SqlValue, pt as HostObject, q as Kind, qt as Shape, rn as HttpImpl, rt as nothing, st as record, tt as list, u as CarryOver, ut as formatInstant, v as Message, w as Requested, wt as ChargeResult, x as PumpResult, xn as Costs, xt as CapabilityDef, y as PendingCall, yn as CalendarImpl, yt as GrantDecls, zt as PlainResult } from "./debug--Of4MSLw.js";
|
|
3
|
+
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, l as createGroup, m as encodeJson, n as MessageDecl, o as inlineGrants, p as decodeJson, r as exportManifest, s as CreateGroupOptions, t as ManifestSpec, u as Handlers, v as ToValueOptions, x as talk, y as fromValue } from "./manifest-mpivREn-.js";
|
|
4
|
+
import { a as decodeValue, n as Json, o as readDisplay } from "./readers-8WCimMop.js";
|
|
5
|
+
import { t as BinaryValueOptions } from "./binary-value-C4ZiXVjv.js";
|
|
6
6
|
//#region src/wasm/reactor.d.ts
|
|
7
7
|
/** Text the reactor writes to stdout or stderr, such as a fatal error. */
|
|
8
8
|
type Diagnostics = (line: string) => void;
|
|
@@ -152,7 +152,9 @@ export declare class WasmGroup implements Group {
|
|
|
152
152
|
replaceLibrary(l: Library, carry: CarryOver): Report[];
|
|
153
153
|
/** @internal Reload and Library replacement end Runs and settle their futures. */
|
|
154
154
|
lifecycle(m: string, fields: Record<string, Frame | undefined>): Report[];
|
|
155
|
-
object<N>(kind: ObjectKind<N>, id: string, native: N
|
|
155
|
+
object<N>(kind: ObjectKind<N>, id: string, native: N, o?: {
|
|
156
|
+
parent?: HostObject;
|
|
157
|
+
}): HostObject<N>;
|
|
156
158
|
objectById(kind: string, id: string): HostObject | undefined;
|
|
157
159
|
setParent(o: HostObject, parent: HostObject | undefined): void;
|
|
158
160
|
dispose(o: HostObject): void;
|
|
@@ -244,4 +246,4 @@ export declare const defaultLimits: Readonly<{
|
|
|
244
246
|
cleanupBudget: number;
|
|
245
247
|
}>;
|
|
246
248
|
//#endregion
|
|
247
|
-
export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type ConsoleImpl, type CoordinatedLifecycle, type Core, type CoreOptions, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type DrivenGroup, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type FromValueOptions, type Grant, type GrantContext, type GrantDecls, type Group, type GroupOptions, type Handlers, HostError, type HostErrorCode, type HostObject, type HttpImpl, type ImmediateOp, type InlineFunction, type InlineOperation, type Inspection, type Kind, type Library, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type Operations, type Outcome, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, type RunAccounting, type RunAncestry, type RunDiscarded, type RunStarted, type ScopeDecl, type Script, ScriptError, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SendFailedReason, type Settlement, type Shape, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StoreImpl, type SuspendingOp, type TimerImpl, type ToValueOptions, type UserImpl, Value, type Verdict, type Versions, type WasmSource, add, bool, bytes, civilDate, createGroup, dec, decodeJson, decodeValue, encodeJson, encodeValue, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue };
|
|
249
|
+
export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type ConsoleImpl, type CoordinatedLifecycle, type Core, type CoreOptions, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type DrivenGroup, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type FromValueOptions, 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 Kind, type Library, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type Operations, type Outcome, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, type RunAccounting, type RunAncestry, type RunDiscarded, type RunStarted, type ScopeDecl, type Script, ScriptError, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SendFailedReason, type Settlement, type Shape, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StoreImpl, type SuspendingOp, type TimerImpl, type ToValueOptions, type UserImpl, Value, type Verdict, type Versions, type WasmSource, add, bool, bytes, civilDate, createGroup, dec, decodeJson, decodeValue, encodeJson, encodeValue, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue };
|
package/wasm.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
import { G as record,
|
|
3
|
-
import { a as rebindObject, n as makeObject, t as defineObjectKind } from "./objects-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as CallMeter, i as operationData, n as exportManifest, o as shapeData, s as invoke } from "./manifest-Dw-8Unmf.js";
|
|
2
|
+
import { Bt as formatInstant, G as record, Gt as parseInstant, H as quantity, K as requireArgs, L as nothing, N as map, Q as text, R as num, S as functionValue, T as instant, Ut as nowMicros, V as patternValue, W as range, c as Decimal, d as bytes, i as ScriptError, k as list, l as Value, m as civilDate, n as LoadError, o as invalidValue, q as requireValue, r as MailboxFull, s as sendFailed, t as HostError, u as bool, v as dec, z as objectValue } from "./errors-D11zizZg.js";
|
|
3
|
+
import { a as rebindObject, n as makeObject, t as defineObjectKind } from "./objects-DmUc0lha.js";
|
|
4
|
+
import { _t as defineCapability, ht as LimitReached, pt as limitDefaults, xt as shape } from "./operations-DnCcztkZ.js";
|
|
5
|
+
import { c as CallMeter, i as operationData, n as exportManifest, o as shapeData, s as invoke } from "./manifest-CCfpn0kC.js";
|
|
7
6
|
import { n as trackOperation } from "./operation-promises-ClA1BTaS.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
7
|
+
import { n as toBase64, t as fromBase64 } from "./base64-CDO-a06R.js";
|
|
8
|
+
import { a as fromJson, c as readDisplay, l as readOrderedJSON, n as JsonObject, o as isJsonNumber, r as decodeValue, s as isJsonObject, t as JsonNumber } from "./readers-CsvlahLi.js";
|
|
9
|
+
import { i as standardChecks, n as quoteJSON, t as encodeValue } from "./encoding-RUuES_e4.js";
|
|
10
|
+
import { a as sqliteCapability, c as talk, i as httpCapability, n as createGroup, o as fromValue, r as handlersOf, s as toValue, t as inlineGrants } from "./inline-grants-XbX9HL_w.js";
|
|
11
|
+
import { o as decodeJson, s as encodeJson } from "./http-fetch-DFwVIOQg.js";
|
|
12
|
+
import { n as localeCapability, t as userCapability } from "./user-capability-BcRQyyEw.js";
|
|
13
|
+
import { a as clockCapability, i as calendarCapability, l as timerCapability, o as consoleCapability, r as storeCapability, t as add } from "./store-capability-BrUUAwVS.js";
|
|
14
|
+
import { a as encodeResult, c as isRequestPumpBinary, d as valueNode, i as encodeBinaryFrame, l as placeholderValues, n as decodeBinaryFrame, o as heldValue, r as decodeNeed, s as isBinaryNeed, t as callbacksFeature, u as requestPumpFeature } from "./request-pump-binary-oqjWFqZA.js";
|
|
14
15
|
//#region src/wasm/wire.ts
|
|
15
16
|
const raw = Symbol("raw JSON");
|
|
16
17
|
const sep = Symbol("separator");
|
|
@@ -849,6 +850,7 @@ var WasmGroup = class {
|
|
|
849
850
|
break;
|
|
850
851
|
}
|
|
851
852
|
case "unhandled": {
|
|
853
|
+
if (!r.delivery) delete r.delivery;
|
|
852
854
|
const message = field(j, "message");
|
|
853
855
|
r.message = {
|
|
854
856
|
name: textOf(field(message, "name")),
|
|
@@ -884,7 +886,7 @@ var WasmGroup = class {
|
|
|
884
886
|
#reports(ok) {
|
|
885
887
|
const rows = listOf(field(ok, "reports")).map((j) => this.#report(j));
|
|
886
888
|
for (const id of textsOf(field(ok, "gone"))) this.#settle(id, void 0, sendFailed("function gone"));
|
|
887
|
-
const unhandled = new Set(rows.flatMap((r) => r.kind === "unhandled" ? [r.delivery] : []));
|
|
889
|
+
const unhandled = new Set(rows.flatMap((r) => r.kind === "unhandled" && r.delivery ? [r.delivery] : []));
|
|
888
890
|
for (const r of rows) {
|
|
889
891
|
switch (r.kind) {
|
|
890
892
|
case "charge result":
|
|
@@ -909,7 +911,7 @@ var WasmGroup = class {
|
|
|
909
911
|
this.#runs.delete(r.run);
|
|
910
912
|
break;
|
|
911
913
|
case "unhandled":
|
|
912
|
-
this.#settle(r.delivery, void 0, sendFailed("unhandled"));
|
|
914
|
+
if (r.delivery) this.#settle(r.delivery, void 0, sendFailed("unhandled"));
|
|
913
915
|
break;
|
|
914
916
|
case "stop":
|
|
915
917
|
for (const id of r.droppedMessages) this.#settle(id, void 0, sendFailed("stopped"));
|
|
@@ -1070,12 +1072,14 @@ var WasmGroup = class {
|
|
|
1070
1072
|
this.#ready();
|
|
1071
1073
|
return reports;
|
|
1072
1074
|
}
|
|
1073
|
-
object(kind, id, native) {
|
|
1075
|
+
object(kind, id, native, o) {
|
|
1074
1076
|
if (this.#objects.has(key(kind.name, id))) throw new HostError("duplicate object id", `${kind.name} ${id}`);
|
|
1077
|
+
const parent = o?.parent ? this.#held(o.parent) : void 0;
|
|
1075
1078
|
this.#session.syncKinds();
|
|
1076
1079
|
this.send("object", {
|
|
1077
1080
|
kind: kind.name,
|
|
1078
|
-
id
|
|
1081
|
+
id,
|
|
1082
|
+
...parent ? { parent } : {}
|
|
1079
1083
|
});
|
|
1080
1084
|
const state = makeObject(kind, id, native);
|
|
1081
1085
|
this.#objects.set(key(kind.name, id), state);
|