@elaraai/east-node-cli 1.0.84 → 1.0.86

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/loader.js CHANGED
@@ -2,12 +2,12 @@
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 { closeSync, existsSync, fstatSync, openSync, readFileSync, readSync, statSync } from 'fs';
5
+ import { closeSync, existsSync, fstatSync, mkdirSync, openSync, readdirSync, readFileSync, readSync, realpathSync, writeFileSync } from 'fs';
6
6
  import { createRequire } from 'module';
7
7
  import * as path from 'path';
8
- import { extname } from 'path';
9
8
  import { fileURLToPath, pathToFileURL } from 'url';
10
- import { IRType, FETCH_SEGMENTS_ENV, decodeBeast2For, decodeBeast2, decodeEastFor, decodeJSONFor, decodeEastIR, decodeAsyncEastIR, readBeast2Extents, readBeast2Manifest, spliceBeast2, encodeBeast2SegmentsFor, openBeast2LazyFor, isBeast2LazySafe, EastIR, AsyncEastIR, } from '@elaraai/east';
9
+ import { IRType, FETCH_SEGMENTS_ENV, decodeBeast2For, decodeEastFor, decodeJSONFor, } from '@elaraai/east';
10
+ import { lazyInputBytesRead as lazyUnitInputBytesRead, loadUnitInput, loadUnitProgram, openUnitInputLazy, unitFileFormat, unitInputBytes, } from '@elaraai/east/internal';
11
11
  // Decoder for IR from beast2 format (self-describing)
12
12
  const decodeIRFromBeast2 = decodeBeast2For(IRType);
13
13
  // Decoder for IR from east text format
@@ -31,6 +31,13 @@ const decodeIRFromJSON = decodeJSONFor(IRType);
31
31
  * require root sits inside that package — i.e. at the project root.
32
32
  * 3. The process cwd (`process.cwd()`) — for a standalone `east-node run`
33
33
  * invoked from the project shell, where cwd IS the project root.
34
+ * 4. The REAL path of the CLI's own script (`realpath(process.argv[1])`'s
35
+ * dir) — for a global install. npm's global bin links into the install,
36
+ * and the walk up from the link's own directory reaches no `node_modules`;
37
+ * the walk up from the script's real path reaches the global
38
+ * `node_modules`, and the packages installed beside the CLI, with no
39
+ * `NODE_PATH`. Last, never first: under pnpm the real path is in the
40
+ * store, whose walk up misses the project's own packages.
34
41
  *
35
42
  * All roots are tried; the first that resolves wins. Stock platforms still
36
43
  * resolve via step 1 first, so existing behaviour is unchanged.
@@ -42,9 +49,25 @@ function platformRequireRoots() {
42
49
  if (fromE3)
43
50
  roots.push(...fromE3.split(path.delimiter).filter(Boolean));
44
51
  roots.push(process.cwd());
52
+ const real = realScript(cliEntry);
53
+ if (real !== undefined)
54
+ roots.push(path.dirname(real));
45
55
  // Dedupe so a CLI invoked from the project root doesn't probe twice.
46
56
  return [...new Set(roots)];
47
57
  }
58
+ /**
59
+ * The real path of the script node was started with, its links followed; or
60
+ * `undefined` when there is no such file (a `node -e` program's), and so no
61
+ * root to add.
62
+ */
63
+ function realScript(entry) {
64
+ try {
65
+ return realpathSync(entry);
66
+ }
67
+ catch {
68
+ return undefined;
69
+ }
70
+ }
48
71
  /**
49
72
  * Resolve a platform package's `./<subpath>` export across the candidate
50
73
  * require roots ({@link platformRequireRoots}). Returns the absolute resolved
@@ -80,9 +103,10 @@ export async function loadPlatform(packageName) {
80
103
  try {
81
104
  // Resolve the package's `./platform` export across the candidate require
82
105
  // roots — the linked CLI bin location for installed stock platforms, the
83
- // e3-provided project root(s) and cwd for a project's own package. See
106
+ // e3-provided project root(s) and cwd for a project's own package, and
107
+ // last the CLI script's real path for a global install. See
84
108
  // {@link platformRequireRoots} / {@link resolvePlatformSubpath} for why
85
- // each root is needed (and why `import.meta.url`'s realpath is not).
109
+ // each root is needed, and why the real path comes last.
86
110
  const resolvedPath = resolvePlatformSubpath(packageName, 'platform');
87
111
  const platformModule = await import(pathToFileURL(resolvedPath).href);
88
112
  const fns = platformModule.default;
@@ -176,24 +200,129 @@ function isValidPlatformFunction(value) {
176
200
  return false;
177
201
  return true;
178
202
  }
203
+ /** The longest a runner waits between looks for a segment it asked for. */
204
+ const FETCH_WAIT_MAX_MS = 50;
179
205
  /**
180
- * Determines the file format from extension.
206
+ * A staged manifest's segment file, present: asked of the host when it is
207
+ * absent and the host places segments as they are read (`fetch`), by creating
208
+ * `<file>.want` and waiting for the host to place the file or to write
209
+ * `<file>.error`, why it cannot — each whole, renamed into place, since this
210
+ * reads either the moment it is there. Without `fetch`, an absent file is
211
+ * returned as it is, for its read to fail as ever.
212
+ *
213
+ * @param file - the segment's file, `<input>.segments/<hash>.beast2`
214
+ * @param fetch - whether the unit's host places segments as they are read
215
+ * @returns the file
216
+ * @throws {Error} When the host writes why it cannot place the segment.
181
217
  */
182
- function getFileFormat(filePath) {
183
- const ext = extname(filePath).toLowerCase();
184
- switch (ext) {
185
- case '.beast2':
186
- case '.beast':
187
- return 'beast2';
188
- case '.east':
189
- return 'east';
190
- case '.json':
191
- return 'json';
192
- default:
193
- throw new Error(`Unsupported file extension "${ext}". ` +
194
- `Supported extensions: .beast2, .beast, .east, .json`);
218
+ export function segmentFile(file, fetch) {
219
+ if (!fetch || existsSync(file))
220
+ return file;
221
+ const error = `${file}.error`;
222
+ closeSync(openSync(`${file}.want`, 'a'));
223
+ // The runner has nothing else to do while it waits: it sleeps between
224
+ // looks, a little longer each time.
225
+ const pause = new Int32Array(new SharedArrayBuffer(4));
226
+ for (let wait = 1; !existsSync(file); wait = Math.min(2 * wait, FETCH_WAIT_MAX_MS)) {
227
+ if (existsSync(error)) {
228
+ throw new Error(`beast2 v5: manifest segment ${file} cannot be placed: ${readFileSync(error, 'utf8')}`);
229
+ }
230
+ Atomics.wait(pause, 0, 0, wait);
195
231
  }
232
+ return file;
233
+ }
234
+ /**
235
+ * Whether this process's units' hosts place segments as they are read:
236
+ * {@link FETCH_SEGMENTS_ENV} is `1`, which `exec` sets from its unit's
237
+ * `fetch`, and which a host never sets for a runner.
238
+ *
239
+ * @returns whether an absent segment of a staged manifest is asked for
240
+ */
241
+ export function fetchingSegments() {
242
+ return process.env[FETCH_SEGMENTS_ENV] === '1';
243
+ }
244
+ /**
245
+ * The process's resident memory now, in bytes: the gauge a lazily opened
246
+ * input weighs a read of it whole by, and the verbose account weighs an input
247
+ * decoded whole by.
248
+ *
249
+ * @returns the resident set size
250
+ */
251
+ export function residentBytes() {
252
+ return process.memoryUsage.rss();
253
+ }
254
+ /** The variable east-c's pager reads its cache's budget from as it opens an
255
+ * input, which this runner reads for its own. */
256
+ export const PAGED_CACHE_BYTES_ENV = 'EAST_PAGED_CACHE_BYTES';
257
+ /**
258
+ * The decoded weight, in bytes, a lazily opened input's pager keeps of the
259
+ * segments its keyed and index reads decode (`v5/SPEC.md`, "The pager's
260
+ * cache"): {@link PAGED_CACHE_BYTES_ENV}, read as east-c's pager reads it, so a
261
+ * test runs all three runners in one mode — `1` keeps one segment.
262
+ *
263
+ * @returns the budget, or `undefined` — the pager's default, 256 MiB — when
264
+ * the variable is unset or not a whole number in decimal digits, which
265
+ * east-c ignores too
266
+ */
267
+ export function pagedCacheBytes() {
268
+ const text = process.env[PAGED_CACHE_BYTES_ENV];
269
+ return text !== undefined && /^\d+$/.test(text) ? Number(text) : undefined;
196
270
  }
271
+ /**
272
+ * The {@link UnitIO} over this machine's files, by the paths it is given — a
273
+ * relative one taken against the working directory, as every `fs` call takes
274
+ * it. `exec` hands it a unit whose paths it resolved against the unit file's
275
+ * directory first.
276
+ *
277
+ * @remarks
278
+ * A file's size and each ranged read open the file and close it after, so a
279
+ * lazily opened input holds no descriptor for its life, and a body that
280
+ * iterates every segment of a large manifest runs out of none. A missing file
281
+ * fails as opening it fails, and a directory is no file. A segment asked for
282
+ * is asked of the host through `<file>.want` ({@link segmentFile}).
283
+ */
284
+ export const nodeUnitIO = {
285
+ read: (file) => readFileSync(file),
286
+ size: (file) => {
287
+ const fd = openSync(file, 'r');
288
+ try {
289
+ const stat = fstatSync(fd);
290
+ if (!stat.isFile())
291
+ throw new Error(`${file} is not a file`);
292
+ return stat.size;
293
+ }
294
+ finally {
295
+ closeSync(fd);
296
+ }
297
+ },
298
+ readRange: (file, offset, length) => {
299
+ const fd = openSync(file, 'r');
300
+ try {
301
+ const out = new Uint8Array(length);
302
+ let done = 0;
303
+ while (done < length) {
304
+ const got = readSync(fd, out, done, length - done, offset + done);
305
+ if (got === 0)
306
+ break;
307
+ done += got;
308
+ }
309
+ return done === length ? out : out.subarray(0, done);
310
+ }
311
+ finally {
312
+ closeSync(fd);
313
+ }
314
+ },
315
+ segment: (file, fetch) => {
316
+ segmentFile(file, fetch);
317
+ },
318
+ list: (dir) => readdirSync(dir),
319
+ makeDirectory: (dir) => {
320
+ mkdirSync(dir, { recursive: true });
321
+ },
322
+ write: (file, bytes) => {
323
+ writeFileSync(file, bytes);
324
+ },
325
+ };
197
326
  /**
198
327
  * Loads an IR file and returns the parsed IR.
199
328
  *
@@ -209,7 +338,7 @@ function getFileFormat(filePath) {
209
338
  * @returns Parsed IR (FunctionIR or AsyncFunctionIR)
210
339
  */
211
340
  export function loadIR(filePath) {
212
- const format = getFileFormat(filePath);
341
+ const format = unitFileFormat(filePath);
213
342
  const data = readFileSync(filePath);
214
343
  let ir;
215
344
  switch (format) {
@@ -240,98 +369,29 @@ export function loadIR(filePath) {
240
369
  * map). Prefer this over {@link loadIR} when the caller will compile + run
241
370
  * the IR, so that error locations resolve end-to-end.
242
371
  *
243
- * Supports `.beast2` / `.beast` (source map read from the blob), `.json`
244
- * (source map read from the `{ir, source_map}` wrapper format), and `.east`
245
- * (no source map available — field stays null).
372
+ * Supports `.beast2` / `.beast` (source map read from the blob), `.json` and
373
+ * `.east` (no source map available — field stays null): east's
374
+ * `loadUnitProgram` over this machine's files.
246
375
  */
247
376
  export function loadEastIR(filePath) {
248
- const format = getFileFormat(filePath);
249
- const data = readFileSync(filePath);
250
- if (format === 'beast2') {
251
- // Peek at the root variant to pick sync/async decoder.
252
- const probe = decodeIRFromBeast2(data);
253
- if (probe.type === 'Function') {
254
- return decodeEastIR(data);
255
- }
256
- if (probe.type === 'AsyncFunction') {
257
- return decodeAsyncEastIR(data);
258
- }
259
- throw new Error(`IR file must contain a function or async function, got "${probe.type}"`);
260
- }
261
- // For east / json formats we fall back to the IR-only path (no source map).
262
- // JSON wrapper parsing for {ir, source_map} can be added here if needed.
263
- const ir = loadIR(filePath);
264
- if (ir.type === 'Function') {
265
- return new EastIR(ir);
266
- }
267
- return new AsyncEastIR(ir);
377
+ return loadUnitProgram(nodeUnitIO, filePath);
268
378
  }
269
379
  /**
270
- * Loads input data from a file.
271
- *
272
- * The type of the input must be provided to decode correctly.
380
+ * Loads input data from a file, decoded whole.
273
381
  *
274
382
  * Task inputs decode **frozen**: deeply immutable from construction, with
275
383
  * mutating builtins throwing the uniform runtime error naming the copy-first
276
- * remedy. Frozen collections compare by value under East `Is`.
384
+ * remedy. Frozen collections compare by value under East `Is`. A manifest is
385
+ * the collection it names, its segments spliced from the files beside it, each
386
+ * asked of the host when it places segments as they are read.
277
387
  *
278
388
  * @param filePath - Path to the input file
279
389
  * @param type - The expected East type of the input
280
390
  * @returns Decoded value
281
391
  */
282
392
  export function loadInput(filePath, type) {
283
- const format = getFileFormat(filePath);
284
- const data = readFileSync(filePath);
285
- switch (format) {
286
- case 'beast2': {
287
- // A manifest-rooted file is the collection it describes: splice
288
- // its segment files back under their shared header and decode
289
- // that, which is the same value the lazy opener serves.
290
- const manifest = readBeast2Manifest(data);
291
- if (manifest !== null) {
292
- return decodeBeast2(spliceManifestFiles(filePath, manifest), { frozen: true }).value;
293
- }
294
- // For inputs, we use decodeBeast2 which is self-describing
295
- // This allows loading data without knowing the exact type
296
- const result = decodeBeast2(data, { frozen: true });
297
- return result.value;
298
- }
299
- case 'east': {
300
- const decoder = decodeEastFor(type, true);
301
- return decoder(data);
302
- }
303
- case 'json': {
304
- const decoder = decodeJSONFor(type, true);
305
- return decoder(data);
306
- }
307
- }
308
- }
309
- /**
310
- * One blob out of a manifest-rooted input's segment files — the whole-value
311
- * form, for a decode that is not going to be lazy.
312
- *
313
- * @remarks
314
- * The segments are standalone blobs sharing one header, so the splice is a
315
- * concatenation of their frame bytes under it: nothing is decoded, and the
316
- * result is byte-identical to the blob the value was cut from.
317
- *
318
- * @param filePath - the manifest file
319
- * @param manifest - its decoded manifest
320
- * @returns the spliced blob
321
- * @throws {Error} When a segment the manifest names is missing.
322
- */
323
- function spliceManifestFiles(filePath, manifest) {
324
- const type = manifest.type;
325
- // An empty collection names no segment, so there is nothing to splice:
326
- // the writer's own empty blob is what it was cut from.
327
- if (manifest.entries.length === 0)
328
- return encodeBeast2SegmentsFor(type)([]);
329
- const dir = segmentDirFor(filePath);
330
- return spliceBeast2(manifest.entries.map((entry) => new Uint8Array(readFileSync(segmentFile(path.join(dir, `${entry.hash}.beast2`))))));
393
+ return loadUnitInput(nodeUnitIO, filePath, type, fetchingSegments());
331
394
  }
332
- /** Bytes each lazily opened input has read from its descriptor so far —
333
- * what "paged from the file" came to, for the runner's verbose summary. */
334
- const lazyInputReads = new WeakMap();
335
395
  /**
336
396
  * Bytes a value from {@link loadInputLazy} has read so far: the geometry
337
397
  * (tail and head), every fence probe, and each segment frame decoded, across
@@ -342,40 +402,22 @@ const lazyInputReads = new WeakMap();
342
402
  * @returns the byte count, or `undefined` when the value was not opened lazily
343
403
  */
344
404
  export function lazyInputBytesRead(value) {
345
- return typeof value === 'object' && value !== null ? lazyInputReads.get(value)?.() : undefined;
405
+ return lazyUnitInputBytesRead(value);
346
406
  }
347
- /** How an input opens lazily: frozen, like every task input, and weighing a
348
- * read of it whole — which an operation the pager cannot serve makes — by
349
- * the growth in the process's resident memory, for the runner's verbose
350
- * account (`beast2LazyStats`). */
351
- const LAZY_INPUT_OPTIONS = { frozen: true, resident: () => process.memoryUsage.rss() };
352
- /** The descriptors behind lazily opened inputs, closed when their value is
353
- * collected: the value reads segment frames from the descriptor for its
354
- * whole life. A runner holds one per lazy input. */
355
- const lazyInputFiles = new FinalizationRegistry((handles) => {
356
- for (const fd of handles) {
357
- try {
358
- closeSync(fd);
359
- }
360
- catch {
361
- // Already closed — nothing else to release.
362
- }
363
- }
364
- });
365
407
  /**
366
408
  * Opens an input file as a lazy pager-backed collection value, when it can
367
- * be: a beast2 v5 collection blob carrying a segment index. Size, iteration
368
- * and keyed reads are then served from the index with O(segment) decoded
369
- * memory; any other operation hydrates transparently to the eager value's
370
- * exact semantics, and what that added to the process's resident memory is
371
- * kept for the runner's verbose account.
409
+ * be: a beast2 v5 collection blob carrying a segment index, or a manifest over
410
+ * its segment files. Size, iteration and keyed reads are then served from the
411
+ * index with O(segment) decoded memory; any other operation hydrates
412
+ * transparently to the eager value's exact semantics, and what that added to
413
+ * the process's resident memory is kept for the runner's verbose account.
372
414
  *
373
- * The file is never buffered whole: the value pages segment frames from an
374
- * open descriptor through positioned reads (a Set or Dict input's first
375
- * keyed read probes every segment's fence once), so its residency is the
376
- * page cache and the process heap holds one decoded segment at a time — the
377
- * difference between an out-of-memory kill and graceful eviction for an
378
- * input near the runner's memory limit.
415
+ * The file is never buffered whole: the value pages segment frames from it
416
+ * through positioned reads (a Set or Dict input's first keyed read probes
417
+ * every segment's fence once), so its residency is the page cache and the
418
+ * process heap holds one decoded segment at a time — the difference between an
419
+ * out-of-memory kill and graceful eviction for an input near the runner's
420
+ * memory limit.
379
421
  *
380
422
  * Returns `undefined` when the file cannot be served lazily (a non-beast2
381
423
  * format, a v4 or index-less blob, a non-collection root, cross-segment
@@ -387,73 +429,20 @@ const lazyInputFiles = new FinalizationRegistry((handles) => {
387
429
  * mutated (no write through a freshly decoded element to drop) and frozen
388
430
  * collections compare by value. Only `Ref` (an identity cell even when
389
431
  * frozen) and function shapes fall back to the eager (frozen) decode.
390
- * {@link isBeast2LazySafe} is the gate.
432
+ *
433
+ * Its pager keeps the segments keyed and index reads decode, up to
434
+ * {@link pagedCacheBytes} of decoded weight.
391
435
  *
392
436
  * @param filePath - Path to the input file
393
437
  * @returns The lazy collection value, or `undefined` to fall back
394
438
  */
395
439
  export function loadInputLazy(filePath) {
396
- if (getFileFormat(filePath) !== 'beast2')
397
- return undefined;
398
- const open = openCounted();
399
- try {
400
- const reader = open.reader(filePath);
401
- // A file whose value is a manifest is the collection it describes,
402
- // its segments the sibling files it names — so the input was staged
403
- // by linking rather than by splicing, and nothing here reads a
404
- // segment the body does not touch.
405
- const manifest = readBeast2Manifest(reader);
406
- if (manifest !== null)
407
- return openManifestLazy(filePath, manifest, open);
408
- const extents = readBeast2Extents(reader);
409
- if (!extents.selfContained || !isBeast2LazySafe(extents.typeValue, { frozen: true })) {
410
- open.closeAll();
411
- return undefined;
412
- }
413
- const value = openBeast2LazyFor(extents.typeValue, LAZY_INPUT_OPTIONS)(reader);
414
- open.own(value);
415
- return value;
416
- }
417
- catch {
418
- open.closeAll();
419
- return undefined;
420
- }
421
- }
422
- /** The directory a manifest-rooted input's segment files sit in, beside the
423
- * file itself: `<input>.segments/<hash>.beast2`. The convention is shared
424
- * with e3-core's staging and with the other runtimes. */
425
- export function segmentDirFor(filePath) {
426
- return `${filePath}.segments`;
427
- }
428
- /** The longest a runner waits between looks for a segment it asked for. */
429
- const FETCH_WAIT_MAX_MS = 50;
430
- /**
431
- * A staged manifest's segment file, present: asked of the host when it is
432
- * absent and the host places segments as they are read ({@link
433
- * FETCH_SEGMENTS_ENV} is `1`), by creating `<file>.want` and waiting for the
434
- * host to place the file, whole, or to write `<file>.error`, why it cannot.
435
- * Without the variable, an absent file is returned as it is, for its read to
436
- * fail as ever.
437
- *
438
- * @param file - the segment's file, `<input>.segments/<hash>.beast2`
439
- * @returns the file
440
- * @throws {Error} When the host writes why it cannot place the segment.
441
- */
442
- export function segmentFile(file) {
443
- if (existsSync(file) || process.env[FETCH_SEGMENTS_ENV] !== '1')
444
- return file;
445
- const error = `${file}.error`;
446
- closeSync(openSync(`${file}.want`, 'a'));
447
- // The runner has nothing else to do while it waits: it sleeps between
448
- // looks, a little longer each time.
449
- const pause = new Int32Array(new SharedArrayBuffer(4));
450
- for (let wait = 1; !existsSync(file); wait = Math.min(2 * wait, FETCH_WAIT_MAX_MS)) {
451
- if (existsSync(error)) {
452
- throw new Error(`beast2 v5: manifest segment ${file} cannot be placed: ${readFileSync(error, 'utf8')}`);
453
- }
454
- Atomics.wait(pause, 0, 0, wait);
455
- }
456
- return file;
440
+ const cacheBytes = pagedCacheBytes();
441
+ return openUnitInputLazy(nodeUnitIO, filePath, {
442
+ fetch: fetchingSegments(),
443
+ resident: residentBytes,
444
+ ...(cacheBytes !== undefined && { cacheBytes }),
445
+ });
457
446
  }
458
447
  /**
459
448
  * The bytes an input stands for: the collection a manifest-rooted file names
@@ -470,120 +459,6 @@ export function segmentFile(file) {
470
459
  * @returns the byte count
471
460
  */
472
461
  export function inputBytes(filePath) {
473
- if (getFileFormat(filePath) !== 'beast2')
474
- return statSync(filePath).size;
475
- const open = openCounted();
476
- try {
477
- const reader = open.reader(filePath);
478
- const manifest = readBeast2Manifest(reader);
479
- if (manifest === null)
480
- return reader.size;
481
- return manifest.entries.reduce((sum, entry) => sum + Number(entry.bytes), reader.size);
482
- }
483
- catch {
484
- return statSync(filePath).size;
485
- }
486
- finally {
487
- open.closeAll();
488
- }
489
- }
490
- /** Opens a manifest-rooted input as a lazy collection over its segment files.
491
- * Returns `undefined` when the element shape is not lazy-safe or a segment
492
- * the manifest names is missing — the caller falls back to the eager load,
493
- * which splices the same files. A segment the host places as it is read is
494
- * asked for when it is first read, and not missed. */
495
- function openManifestLazy(filePath, manifest, open) {
496
- const typeValue = manifest.type;
497
- if (!isBeast2LazySafe(typeValue, { frozen: true })) {
498
- open.closeAll();
499
- return undefined;
500
- }
501
- const dir = segmentDirFor(filePath);
502
- const entries = manifest.entries;
503
- if (process.env[FETCH_SEGMENTS_ENV] !== '1') {
504
- for (const entry of entries) {
505
- if (!existsSync(path.join(dir, `${entry.hash}.beast2`))) {
506
- open.closeAll();
507
- return undefined;
508
- }
509
- }
510
- }
511
- const readers = new Array(entries.length);
512
- const source = {
513
- manifest,
514
- segment(i) {
515
- // A segment file is opened for each read and closed after it: a
516
- // body that iterates every segment of a large record would
517
- // otherwise hold a descriptor per segment for the value's life,
518
- // and run out of them.
519
- return readers[i] ??= open.segment(segmentFile(path.join(dir, `${entries[i].hash}.beast2`)));
520
- },
521
- };
522
- const value = openBeast2LazyFor(typeValue, LAZY_INPUT_OPTIONS)(source);
523
- open.own(value);
524
- return value;
525
- }
526
- /** Exactly `length` bytes of `handle` from `offset`. */
527
- function readRange(handle, offset, length) {
528
- const out = new Uint8Array(length);
529
- let done = 0;
530
- while (done < length) {
531
- const n = readSync(handle, out, done, length - done, offset + done);
532
- if (n === 0)
533
- throw new Error(`beast2: short read at offset ${offset + done}`);
534
- done += n;
535
- }
536
- return out;
537
- }
538
- /** The descriptors and the byte counter a lazy input shares across its
539
- * file and, for a manifest, every segment file it reads. */
540
- function openCounted() {
541
- const handles = [];
542
- let bytesRead = 0;
543
- return {
544
- reader(file) {
545
- const handle = openSync(file, 'r');
546
- handles.push(handle);
547
- return {
548
- size: fstatSync(handle).size,
549
- read(offset, length) {
550
- const out = readRange(handle, offset, length);
551
- bytesRead += length;
552
- return out;
553
- },
554
- };
555
- },
556
- segment(file) {
557
- return {
558
- size: statSync(file).size,
559
- read(offset, length) {
560
- const handle = openSync(file, 'r');
561
- try {
562
- const out = readRange(handle, offset, length);
563
- bytesRead += length;
564
- return out;
565
- }
566
- finally {
567
- closeSync(handle);
568
- }
569
- },
570
- };
571
- },
572
- own(value) {
573
- lazyInputFiles.register(value, handles);
574
- lazyInputReads.set(value, () => bytesRead);
575
- },
576
- closeAll() {
577
- for (const handle of handles) {
578
- try {
579
- closeSync(handle);
580
- }
581
- catch {
582
- // Already closed — nothing else to release.
583
- }
584
- }
585
- handles.length = 0;
586
- },
587
- };
462
+ return unitInputBytes(nodeUnitIO, filePath);
588
463
  }
589
464
  //# sourceMappingURL=loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAA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