toilscript 0.1.42 → 0.1.43
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/dist/cli.generated.d.ts +27 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/importmap.json +2 -2
- package/dist/toilscript.generated.d.ts +27 -1
- package/dist/toilscript.js +87 -74
- package/dist/toilscript.js.map +3 -3
- package/dist/web.js +3 -3
- package/package.json +3 -2
- package/std/assembly/toilscript.d.ts +7 -6
package/dist/importmap.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"imports": {
|
|
3
|
-
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
4
|
-
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
3
|
+
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.43/dist/toilscript.js",
|
|
4
|
+
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.43/dist/cli.js",
|
|
5
5
|
"binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
|
|
6
6
|
"long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
|
|
7
7
|
}
|
|
@@ -607,7 +607,8 @@ declare module "types:toilscript/src/diagnosticMessages.generated" {
|
|
|
607
607
|
Scheduled_requires_a_single_string_schedule_argument = 9010,
|
|
608
608
|
Scheduled_spec_0_is_not_a_valid_interval_or_cron_expression = 9011,
|
|
609
609
|
Scheduled_handler_0_must_take_no_arguments_and_return_void = 9012,
|
|
610
|
-
Stream_scope_must_be_a_StreamScope_enum_member = 9013
|
|
610
|
+
Stream_scope_must_be_a_StreamScope_enum_member = 9013,
|
|
611
|
+
Stream_connect_handler_0_has_an_invalid_signature = 9014
|
|
611
612
|
}
|
|
612
613
|
/** Translates a diagnostic code to its respective string. */
|
|
613
614
|
export function diagnosticCodeToString(code: DiagnosticCode): string;
|
|
@@ -2989,6 +2990,8 @@ declare module "types:toilscript/src/parser" {
|
|
|
2989
2990
|
toildbCodecClasses: Map<string, ClassDeclaration>;
|
|
2990
2991
|
/** Guards `weaveDataMigrations` so it runs exactly once (before element creation). */
|
|
2991
2992
|
toildbWoven: boolean;
|
|
2993
|
+
/** Guards `weaveDeriveHandlers` so the module-level `derive_run` export is emitted once. */
|
|
2994
|
+
toildbDerivesWoven: boolean;
|
|
2992
2995
|
/** Current overridden module name. */
|
|
2993
2996
|
currentModuleName: string | null;
|
|
2994
2997
|
/** Compiler options. */
|
|
@@ -3011,6 +3014,12 @@ declare module "types:toilscript/src/parser" {
|
|
|
3011
3014
|
getDependee(dependent: string): string | null;
|
|
3012
3015
|
/** Finishes parsing. */
|
|
3013
3016
|
finish(): void;
|
|
3017
|
+
/** Synthesize the hot/default module-level `derive_run(derive_id)` export for
|
|
3018
|
+
* `@database` classes with `@derive` methods. Runs before element creation
|
|
3019
|
+
* from `initializeProgram`, so generated members/exports are compiled as
|
|
3020
|
+
* ordinary program symbols. Cold artifacts intentionally do not export
|
|
3021
|
+
* request-path derive runners and do not emit `toildb.derives`. */
|
|
3022
|
+
weaveDeriveHandlers(): void;
|
|
3014
3023
|
weaveDataMigrations(): void;
|
|
3015
3024
|
/** Enforce the migration-file convention (folder AND extension): every `@migrate`
|
|
3016
3025
|
* must live in a `*.migration.ts` file under a `migrations/` directory. Keeping
|
|
@@ -4593,6 +4602,23 @@ declare module "types:toilscript/src/dbcatalog" {
|
|
|
4593
4602
|
* missing/non-string arg or an unparseable spec.
|
|
4594
4603
|
*/
|
|
4595
4604
|
export function buildToilDaemonCatalog(program: Program): Uint8Array | null;
|
|
4605
|
+
/** Build the `toildb.derives` section bytes, or `null` if no `@database` class
|
|
4606
|
+
* declares a `@derive` materializer. The section wires each `@derive` method to
|
|
4607
|
+
* the database class that owns it, so the host runner can, after a write to one
|
|
4608
|
+
* of a database's source collections, re-run that database's derives (each
|
|
4609
|
+
* recomputes + `view.publish`es its materialized view). `derive_id` is assigned
|
|
4610
|
+
* globally in source-declaration order across every `@database` class, matching
|
|
4611
|
+
* the single module-level `derive_run(derive_id)` dispatcher synthesized by the
|
|
4612
|
+
* parser 1:1. Format (LE):
|
|
4613
|
+
*
|
|
4614
|
+
* u16 format_version = 1
|
|
4615
|
+
* u16 n_derives
|
|
4616
|
+
* per derive:
|
|
4617
|
+
* u16 derive_id (global declaration order in the hot/default module)
|
|
4618
|
+
* str db_name (the @database class name; the write -> derive key)
|
|
4619
|
+
* str method_name (the @derive method, for diagnostics)
|
|
4620
|
+
*/
|
|
4621
|
+
export function buildToilDbDerives(program: Program): Uint8Array | null;
|
|
4596
4622
|
/** Build the `toil.surface` section bytes (always emitted per artifact). Per
|
|
4597
4623
|
* Part 5 (LE):
|
|
4598
4624
|
*
|