@elaraai/east-node-std 1.0.69 โ†’ 1.0.70

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 CHANGED
@@ -9,14 +9,14 @@
9
9
 
10
10
  ## Features
11
11
 
12
- - **๐Ÿ“ File System** - Read/write files, manage directories
13
- - **๐Ÿ–ฅ๏ธ Console I/O** - stdout/stderr output, stdin input
14
- - **๐ŸŒ HTTP Client** - Modern Fetch API for HTTP requests
12
+ - **File System** - Read/write files, manage directories, open huge beast2 collection files lazily
13
+ - **Console I/O** - stdout/stderr output, stdin input
14
+ - **HTTP Client** - Modern Fetch API for HTTP requests
15
15
  - **Cryptography** - Random bytes, SHA-256, UUID generation
16
- - **๐ŸŽฒ Random** - Random number generation with 14 statistical distributions
17
- - **โฑ๏ธ Time Operations** - Timestamps and sleep
18
- - **๐Ÿ›ค๏ธ Path Utilities** - Cross-platform path manipulation
19
- - **๐Ÿงช Test Framework** - Built-in testing utilities
16
+ - **Random** - Random number generation with statistical distributions
17
+ - **Time Operations** - Timestamps and sleep
18
+ - **Path Utilities** - Cross-platform path manipulation
19
+ - **Test Framework** - Built-in testing utilities
20
20
  - **Type-Safe** - Full TypeScript support with EastError handling
21
21
 
22
22
  ## Installation
@@ -49,17 +49,17 @@ compiled("/path/to/input.txt");
49
49
 
50
50
  ## Platform Functions
51
51
 
52
- East Node provides seven platform modules:
52
+ East Node provides these platform modules:
53
53
 
54
54
  | Module | Functions | Description |
55
55
  |--------|-----------|-------------|
56
56
  | **Console** | `log`, `error`, `write` | Console I/O operations |
57
- | **FileSystem** | `readFile`, `writeFile`, `exists`, `createDirectory`, etc. | File system operations (11 functions) |
57
+ | **FileSystem** | `readFile`, `writeFile`, `exists`, `createDirectory`, `openBeast`, etc. | File system operations, including lazily paged beast2 collection files |
58
58
  | **Fetch** | `get`, `post`, `request` | HTTP client using Fetch API |
59
59
  | **Crypto** | `randomBytes`, `hashSha256`, `uuid` | Cryptographic operations |
60
60
  | **Time** | `now`, `sleep` | Time and delay operations |
61
61
  | **Path** | `join`, `resolve`, `dirname`, `basename`, `extname` | Path manipulation |
62
- | **Random** | `uniform`, `normal`, `range`, `exponential`, `bernoulli`, etc. | Random number generation with 14 distributions |
62
+ | **Random** | `uniform`, `normal`, `range`, `exponential`, `bernoulli`, etc. | Random number generation with statistical distributions |
63
63
 
64
64
  **Complete platform:**
65
65
  ```typescript
package/dist/src/fs.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
- import { StringType, NullType, BooleanType, ArrayType, BlobType } from "@elaraai/east";
5
+ import { StringType, NullType, BooleanType, ArrayType, BlobType, type SetType, type DictType, type SubtypeExprOrValue, type ExprType } from "@elaraai/east";
6
6
  import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * Reads a file as a UTF-8 string.
@@ -274,6 +274,50 @@ export declare const fs_read_file_bytes: import("@elaraai/east").PlatformDefinit
274
274
  * ```
275
275
  */
276
276
  export declare const fs_write_file_bytes: import("@elaraai/east").PlatformDefinition<[StringType, BlobType], NullType>;
277
+ /**
278
+ * Opens an indexed beast2 collection file as a frozen, lazily paged value.
279
+ *
280
+ * Generic over the collection type `T` (an `Array`, `Set` or `Dict` type),
281
+ * passed first at the call site as every generic platform call is spelled:
282
+ * `fs_open_beast([T], path)`. The result behaves exactly as `blob.openBeast`'s:
283
+ * `size`, `get`, `has` and a `$.for` loop decode one segment of the file at a
284
+ * time, the value is frozen (mutation is an error, copy first), and a file
285
+ * without a paging index (what `East.Blob.encodeBeast` writes) or whose element
286
+ * shape holds `Ref` or function values decodes whole, frozen. The file's header
287
+ * must carry exactly `T`.
288
+ *
289
+ * The file is paged from the file system on every runtime: east-c and east-py
290
+ * map it, Node reads each segment frame through positioned reads on an open
291
+ * descriptor โ€” the wire bytes never sit on the heap whole, and only the
292
+ * segments a program touches are ever resident (a Set or Dict file's first
293
+ * keyed read also probes every segment's fence once). The descriptor closes
294
+ * when the value is garbage collected, which is not prompt: a loop opening
295
+ * thousands of files can exhaust descriptors before any are released. Keep
296
+ * the file unchanged while the value is alive โ€” the other runtimes map it,
297
+ * and a truncated mapping faults. The same program produces the same values
298
+ * on all three.
299
+ *
300
+ * Prefer {@link FileSystem.openBeast}, which checks `T` when the expression is
301
+ * built.
302
+ *
303
+ * @param path - The file path to open (relative or absolute)
304
+ * @returns The frozen collection of type `T`
305
+ *
306
+ * @throws {EastError} When the file cannot be opened as `T`:
307
+ * - File doesn't exist: `Failed to open beast file <path>: ENOENT: no such file or directory`
308
+ * - Header carries another type: `Failed to open beast file <path>: beast2: cannot open a blob of type <wire> as <T>`
309
+ * - Not a beast2 container: `Failed to open beast file <path>: <decode error>`
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * const TableType = DictType(IntegerType, StructType({ id: IntegerType, name: StringType }));
314
+ * const lookup = East.function([StringType], StringType, ($, path) => {
315
+ * const table = $.let(fs_open_beast([TableType], path));
316
+ * return table.get(7n).name; // decodes the one segment holding key 7
317
+ * });
318
+ * ```
319
+ */
320
+ export declare const fs_open_beast: import("@elaraai/east").GenericPlatformDefinition<readonly ["T"], readonly [StringType], "T">;
277
321
  /**
278
322
  * Node.js implementation of file system platform functions.
279
323
  *
@@ -509,6 +553,42 @@ export declare const FileSystem: {
509
553
  * ```
510
554
  */
511
555
  readonly writeFileBytes: import("@elaraai/east").PlatformDefinition<[StringType, BlobType], NullType>;
556
+ /**
557
+ * Opens an indexed beast2 collection file as a frozen, lazily paged value.
558
+ *
559
+ * The file-backed twin of `blob.openBeast`: `size`, `get`, `has` and a
560
+ * `$.for` loop decode one segment of the file at a time, the value is
561
+ * frozen, and a file without a paging index (or whose element shape holds
562
+ * `Ref` or function values) decodes whole, frozen. The file's header must
563
+ * carry exactly `type`. Only `Array`, `Set` and `Dict` types are accepted,
564
+ * checked when the expression is built; the same program produces the
565
+ * same values on the east-node, east-c and east-py runners.
566
+ *
567
+ * @typeParam T - The collection type the file was written with
568
+ * @param type - The `Array`, `Set` or `Dict` type to open the file as
569
+ * @param path - The file path to open (relative or absolute)
570
+ * @returns The frozen collection of type `T`
571
+ * @throws {Error} When `type` is not an Array, Set or Dict type (at build time)
572
+ * @throws {EastError} When the file cannot be opened as `type`
573
+ * (`Failed to open beast file <path>: ...`, naming both types on a mismatch)
574
+ *
575
+ * @example
576
+ * ```ts
577
+ * const TableType = DictType(IntegerType, StructType({ id: IntegerType, name: StringType }));
578
+ * const total = East.function([StringType], IntegerType, ($, path) => {
579
+ * const table = $.let(FileSystem.openBeast(TableType, path));
580
+ * const sum = $.let(0n);
581
+ * $.for(table, ($, row) => {
582
+ * $.assign(sum, sum.add(row.id)); // one segment decoded at a time
583
+ * });
584
+ * return sum;
585
+ * });
586
+ *
587
+ * const compiled = East.compile(total, FileSystem.Implementation);
588
+ * compiled("rows.beast2");
589
+ * ```
590
+ */
591
+ readonly openBeast: <T extends ArrayType | SetType | DictType>(type: T, path: SubtypeExprOrValue<StringType>) => ExprType<T>;
512
592
  /**
513
593
  * Node.js implementation of file system platform functions.
514
594
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAa/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,sEAA0D,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,gFAAqE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,gFAAsE,CAAC;AAElG;;;;;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;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,gBAAgB,EAqKrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU;IACnB;;;;;;;;;;;;;;;;;;;;OAoBG;;IAGH;;;;;;;;;;;;;;;;;;;;OAoBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;;;;;;OAqBG;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;yBACO,CAAC,SAAS,SAAS,GAAG,OAAO,GAAG,QAAQ,QAAQ,CAAC,QAAQ,kBAAkB,CAAC,UAAU,CAAC,KAAG,QAAQ,CAAC,CAAC,CAAC;IAO/G;;;;OAIG;;CAEG,CAAC;AAGX,OAAO,EAAE,cAAc,EAAE,CAAC"}
package/dist/src/fs.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
- import { East, StringType, NullType, BooleanType, ArrayType, BlobType } from "@elaraai/east";
5
+ import { East, StringType, NullType, BooleanType, ArrayType, BlobType, isTypeValueEqual, printTypeValue, readBeast2Type, readBeast2Extents, isBeast2LazySafe, openBeast2LazyFor, decodeBeast2For, } from "@elaraai/east";
6
6
  import { EastError } from "@elaraai/east/internal";
7
- import { readFileSync, writeFileSync, appendFileSync, unlinkSync, existsSync, statSync, mkdirSync, readdirSync, } from "node:fs";
7
+ import { readFileSync, writeFileSync, appendFileSync, unlinkSync, existsSync, statSync, mkdirSync, readdirSync, openSync, closeSync, fstatSync, readSync, } from "node:fs";
8
8
  /**
9
9
  * Reads a file as a UTF-8 string.
10
10
  *
@@ -275,6 +275,61 @@ export const fs_read_file_bytes = East.platform("fs_read_file_bytes", [StringTyp
275
275
  * ```
276
276
  */
277
277
  export const fs_write_file_bytes = East.platform("fs_write_file_bytes", [StringType, BlobType], NullType);
278
+ /**
279
+ * Opens an indexed beast2 collection file as a frozen, lazily paged value.
280
+ *
281
+ * Generic over the collection type `T` (an `Array`, `Set` or `Dict` type),
282
+ * passed first at the call site as every generic platform call is spelled:
283
+ * `fs_open_beast([T], path)`. The result behaves exactly as `blob.openBeast`'s:
284
+ * `size`, `get`, `has` and a `$.for` loop decode one segment of the file at a
285
+ * time, the value is frozen (mutation is an error, copy first), and a file
286
+ * without a paging index (what `East.Blob.encodeBeast` writes) or whose element
287
+ * shape holds `Ref` or function values decodes whole, frozen. The file's header
288
+ * must carry exactly `T`.
289
+ *
290
+ * The file is paged from the file system on every runtime: east-c and east-py
291
+ * map it, Node reads each segment frame through positioned reads on an open
292
+ * descriptor โ€” the wire bytes never sit on the heap whole, and only the
293
+ * segments a program touches are ever resident (a Set or Dict file's first
294
+ * keyed read also probes every segment's fence once). The descriptor closes
295
+ * when the value is garbage collected, which is not prompt: a loop opening
296
+ * thousands of files can exhaust descriptors before any are released. Keep
297
+ * the file unchanged while the value is alive โ€” the other runtimes map it,
298
+ * and a truncated mapping faults. The same program produces the same values
299
+ * on all three.
300
+ *
301
+ * Prefer {@link FileSystem.openBeast}, which checks `T` when the expression is
302
+ * built.
303
+ *
304
+ * @param path - The file path to open (relative or absolute)
305
+ * @returns The frozen collection of type `T`
306
+ *
307
+ * @throws {EastError} When the file cannot be opened as `T`:
308
+ * - File doesn't exist: `Failed to open beast file <path>: ENOENT: no such file or directory`
309
+ * - Header carries another type: `Failed to open beast file <path>: beast2: cannot open a blob of type <wire> as <T>`
310
+ * - Not a beast2 container: `Failed to open beast file <path>: <decode error>`
311
+ *
312
+ * @example
313
+ * ```ts
314
+ * const TableType = DictType(IntegerType, StructType({ id: IntegerType, name: StringType }));
315
+ * const lookup = East.function([StringType], StringType, ($, path) => {
316
+ * const table = $.let(fs_open_beast([TableType], path));
317
+ * return table.get(7n).name; // decodes the one segment holding key 7
318
+ * });
319
+ * ```
320
+ */
321
+ export const fs_open_beast = East.genericPlatform("fs_open_beast", ["T"], [StringType], "T");
322
+ /** The descriptors behind lazily opened beast files, closed when their
323
+ * value is collected: the value reads segment frames from the descriptor
324
+ * for its whole life, so nothing shorter-lived may own it. */
325
+ const openBeastFiles = new FinalizationRegistry((fd) => {
326
+ try {
327
+ closeSync(fd);
328
+ }
329
+ catch {
330
+ // Already closed โ€” nothing else to release.
331
+ }
332
+ });
278
333
  /**
279
334
  * Node.js implementation of file system platform functions.
280
335
  *
@@ -389,6 +444,77 @@ const FileSystemImpl = [
389
444
  });
390
445
  }
391
446
  }),
447
+ fs_open_beast.implement((T) => {
448
+ // The decoders are built once per type argument, the whole one on
449
+ // first use (a paged file never needs it). The lazy open is reserved
450
+ // for the element shapes it can serve frozen; anything else takes
451
+ // the whole frozen decode, as blob.openBeast does.
452
+ let whole = null;
453
+ const lazy = isBeast2LazySafe(T, { frozen: true }) ? openBeast2LazyFor(T, { frozen: true }) : null;
454
+ return (path) => {
455
+ const file = path;
456
+ let fd = -1;
457
+ try {
458
+ fd = openSync(file, "r");
459
+ const handle = fd;
460
+ const reader = {
461
+ size: fstatSync(handle).size,
462
+ read(offset, length) {
463
+ const out = new Uint8Array(length);
464
+ let done = 0;
465
+ while (done < length) {
466
+ const n = readSync(handle, out, done, length - done, offset + done);
467
+ if (n === 0)
468
+ throw new Error(`beast2: short read at offset ${offset + done}`);
469
+ done += n;
470
+ }
471
+ return out;
472
+ },
473
+ };
474
+ // An indexed collection file pages from the descriptor: the
475
+ // open reads its tail and head, and a program's reads fetch
476
+ // the segment frames they decode.
477
+ let extents = null;
478
+ try {
479
+ extents = readBeast2Extents(reader);
480
+ }
481
+ catch {
482
+ extents = null;
483
+ }
484
+ if (extents !== null) {
485
+ if (!isTypeValueEqual(extents.typeValue, T)) {
486
+ throw new Error(`beast2: cannot open a blob of type ${printTypeValue(extents.typeValue)} as ${printTypeValue(T)}`);
487
+ }
488
+ if (lazy !== null && extents.selfContained) {
489
+ const value = lazy(reader);
490
+ openBeastFiles.register(value, handle);
491
+ fd = -1; // the value owns the descriptor from here
492
+ return value;
493
+ }
494
+ }
495
+ // Not pageable (index-less, or a gated element shape): the
496
+ // whole frozen decode from one read of the file. Both
497
+ // container versions name their type in the header.
498
+ const data = reader.read(0, reader.size);
499
+ const wire = readBeast2Type(data);
500
+ if (!isTypeValueEqual(wire, T)) {
501
+ throw new Error(`beast2: cannot open a blob of type ${printTypeValue(wire)} as ${printTypeValue(T)}`);
502
+ }
503
+ whole ??= decodeBeast2For(T, { frozen: true });
504
+ return whole(data);
505
+ }
506
+ catch (err) {
507
+ throw new EastError(`Failed to open beast file ${file}: ${err.message}`, {
508
+ location: [{ filename: "fs_open_beast", line: 0n, column: 0n }],
509
+ cause: err
510
+ });
511
+ }
512
+ finally {
513
+ if (fd >= 0)
514
+ closeSync(fd);
515
+ }
516
+ };
517
+ }),
392
518
  ];
393
519
  /**
394
520
  * Grouped file system platform functions.
@@ -619,6 +745,47 @@ export const FileSystem = {
619
745
  * ```
620
746
  */
621
747
  writeFileBytes: fs_write_file_bytes,
748
+ /**
749
+ * Opens an indexed beast2 collection file as a frozen, lazily paged value.
750
+ *
751
+ * The file-backed twin of `blob.openBeast`: `size`, `get`, `has` and a
752
+ * `$.for` loop decode one segment of the file at a time, the value is
753
+ * frozen, and a file without a paging index (or whose element shape holds
754
+ * `Ref` or function values) decodes whole, frozen. The file's header must
755
+ * carry exactly `type`. Only `Array`, `Set` and `Dict` types are accepted,
756
+ * checked when the expression is built; the same program produces the
757
+ * same values on the east-node, east-c and east-py runners.
758
+ *
759
+ * @typeParam T - The collection type the file was written with
760
+ * @param type - The `Array`, `Set` or `Dict` type to open the file as
761
+ * @param path - The file path to open (relative or absolute)
762
+ * @returns The frozen collection of type `T`
763
+ * @throws {Error} When `type` is not an Array, Set or Dict type (at build time)
764
+ * @throws {EastError} When the file cannot be opened as `type`
765
+ * (`Failed to open beast file <path>: ...`, naming both types on a mismatch)
766
+ *
767
+ * @example
768
+ * ```ts
769
+ * const TableType = DictType(IntegerType, StructType({ id: IntegerType, name: StringType }));
770
+ * const total = East.function([StringType], IntegerType, ($, path) => {
771
+ * const table = $.let(FileSystem.openBeast(TableType, path));
772
+ * const sum = $.let(0n);
773
+ * $.for(table, ($, row) => {
774
+ * $.assign(sum, sum.add(row.id)); // one segment decoded at a time
775
+ * });
776
+ * return sum;
777
+ * });
778
+ *
779
+ * const compiled = East.compile(total, FileSystem.Implementation);
780
+ * compiled("rows.beast2");
781
+ * ```
782
+ */
783
+ openBeast(type, path) {
784
+ if (type.type !== "Array" && type.type !== "Set" && type.type !== "Dict") {
785
+ throw new Error(`FileSystem.openBeast opens Array, Set or Dict files, not ${type.type} โ€” read the bytes with FileSystem.readFileBytes and decodeBeast for other types`);
786
+ }
787
+ return fs_open_beast([type], path);
788
+ },
622
789
  /**
623
790
  * Node.js implementation of file system platform functions.
624
791
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACH,YAAY,EACZ,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,GACd,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC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;;;;;;;;;;;;;OAqBG;IACH,cAAc,EAAE,mBAAmB;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,SAAS,CAA2C,IAAO,EAAE,IAAoC;QAC7F,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,4DAA6D,IAAiB,CAAC,IAAI,iFAAiF,CAAC,CAAC;QAC1L,CAAC;QACD,OAAO,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAgB,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACH,cAAc,EAAE,cAAc;CACxB,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/east-node-std",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "East Node - Node.js platform integration for East language",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  "typescript": "~5.9.2"
51
51
  },
52
52
  "peerDependencies": {
53
- "@elaraai/east": "1.0.69"
53
+ "@elaraai/east": "1.0.70"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "rm -rf dist && tsc",