@orkestrel/scaffold 0.0.74 → 0.0.76

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.
@@ -837,7 +837,7 @@ export declare interface ManifestEntry {
837
837
  }
838
838
 
839
839
  /**
840
- * Tests whether a captured directory is still the same directory.
840
+ * Tests whether a path still holds the captured directory identity.
841
841
  *
842
842
  * @param anchor - The identity captured earlier.
843
843
  * @returns True if the path still holds a physical directory of that exact device and
@@ -1606,7 +1606,8 @@ export declare class Materializer implements MaterializerInterface {
1606
1606
  * @returns The anchor, or `undefined` when the path is not a physical directory.
1607
1607
  *
1608
1608
  * @remarks
1609
- * Device and inode rather than the path, because the path is the thing that can
1609
+ * Native bigint device and inode values preserve the filesystem identity without
1610
+ * numeric rounding. Device and inode rather than the path, because the path can
1610
1611
  * be swapped underneath a write. An anchor captured before a mutation and
1611
1612
  * checked again after it proves the directory written into sits where the
1612
1613
  * inspected one sat, not that it is the one that was inspected.
@@ -1615,7 +1616,8 @@ export declare class Materializer implements MaterializerInterface {
1615
1616
  * ```ts
1616
1617
  * import { readAnchor } from '@orkestrel/scaffold/server'
1617
1618
  *
1618
- * readAnchor('/tmp/project') // { path: '/tmp/project', device: 1, inode: 2 }
1619
+ * const anchor = readAnchor(process.cwd())
1620
+ * anchor !== undefined && typeof anchor.device === 'bigint' && typeof anchor.inode === 'bigint' // true for a physical directory
1619
1621
  * ```
1620
1622
  */
1621
1623
  export declare function readAnchor(path: string): WriteAnchor | undefined;
@@ -2463,14 +2465,14 @@ export declare class Materializer implements MaterializerInterface {
2463
2465
  * Represents one physical directory identity captured across a write transaction.
2464
2466
  *
2465
2467
  * @remarks
2466
- * Device and inode locate the directory and do not date it. Two directories
2467
- * occupying one slot at different times share an anchor, so an anchor proves
2468
+ * Native bigint device and inode values locate the directory and do not date it.
2469
+ * Two directories occupying one slot at different times share an anchor, so an anchor proves
2468
2470
  * where a write lands and never that the directory was left alone.
2469
2471
  */
2470
2472
  export declare interface WriteAnchor {
2471
2473
  readonly path: string;
2472
- readonly device: number;
2473
- readonly inode: number;
2474
+ readonly device: bigint;
2475
+ readonly inode: bigint;
2474
2476
  }
2475
2477
 
2476
2478
  /** Reports the final directory anchor of a write transaction and the subset one call created. */
@@ -837,7 +837,7 @@ export declare interface ManifestEntry {
837
837
  }
838
838
 
839
839
  /**
840
- * Tests whether a captured directory is still the same directory.
840
+ * Tests whether a path still holds the captured directory identity.
841
841
  *
842
842
  * @param anchor - The identity captured earlier.
843
843
  * @returns True if the path still holds a physical directory of that exact device and
@@ -1606,7 +1606,8 @@ export declare class Materializer implements MaterializerInterface {
1606
1606
  * @returns The anchor, or `undefined` when the path is not a physical directory.
1607
1607
  *
1608
1608
  * @remarks
1609
- * Device and inode rather than the path, because the path is the thing that can
1609
+ * Native bigint device and inode values preserve the filesystem identity without
1610
+ * numeric rounding. Device and inode rather than the path, because the path can
1610
1611
  * be swapped underneath a write. An anchor captured before a mutation and
1611
1612
  * checked again after it proves the directory written into sits where the
1612
1613
  * inspected one sat, not that it is the one that was inspected.
@@ -1615,7 +1616,8 @@ export declare class Materializer implements MaterializerInterface {
1615
1616
  * ```ts
1616
1617
  * import { readAnchor } from '@orkestrel/scaffold/server'
1617
1618
  *
1618
- * readAnchor('/tmp/project') // { path: '/tmp/project', device: 1, inode: 2 }
1619
+ * const anchor = readAnchor(process.cwd())
1620
+ * anchor !== undefined && typeof anchor.device === 'bigint' && typeof anchor.inode === 'bigint' // true for a physical directory
1619
1621
  * ```
1620
1622
  */
1621
1623
  export declare function readAnchor(path: string): WriteAnchor | undefined;
@@ -2463,14 +2465,14 @@ export declare class Materializer implements MaterializerInterface {
2463
2465
  * Represents one physical directory identity captured across a write transaction.
2464
2466
  *
2465
2467
  * @remarks
2466
- * Device and inode locate the directory and do not date it. Two directories
2467
- * occupying one slot at different times share an anchor, so an anchor proves
2468
+ * Native bigint device and inode values locate the directory and do not date it.
2469
+ * Two directories occupying one slot at different times share an anchor, so an anchor proves
2468
2470
  * where a write lands and never that the directory was left alone.
2469
2471
  */
2470
2472
  export declare interface WriteAnchor {
2471
2473
  readonly path: string;
2472
- readonly device: number;
2473
- readonly inode: number;
2474
+ readonly device: bigint;
2475
+ readonly inode: bigint;
2474
2476
  }
2475
2477
 
2476
2478
  /** Reports the final directory anchor of a write transaction and the subset one call created. */
@@ -1775,7 +1775,8 @@ function stageInventory(checkout, path = HOST_INVENTORY_PATH) {
1775
1775
  * @returns The anchor, or `undefined` when the path is not a physical directory.
1776
1776
  *
1777
1777
  * @remarks
1778
- * Device and inode rather than the path, because the path is the thing that can
1778
+ * Native bigint device and inode values preserve the filesystem identity without
1779
+ * numeric rounding. Device and inode rather than the path, because the path can
1779
1780
  * be swapped underneath a write. An anchor captured before a mutation and
1780
1781
  * checked again after it proves the directory written into sits where the
1781
1782
  * inspected one sat, not that it is the one that was inspected.
@@ -1784,11 +1785,12 @@ function stageInventory(checkout, path = HOST_INVENTORY_PATH) {
1784
1785
  * ```ts
1785
1786
  * import { readAnchor } from '@orkestrel/scaffold/server'
1786
1787
  *
1787
- * readAnchor('/tmp/project') // { path: '/tmp/project', device: 1, inode: 2 }
1788
+ * const anchor = readAnchor(process.cwd())
1789
+ * anchor !== undefined && typeof anchor.device === 'bigint' && typeof anchor.inode === 'bigint' // true for a physical directory
1788
1790
  * ```
1789
1791
  */
1790
1792
  function readAnchor(path) {
1791
- const status = attempt(() => lstatSync(path));
1793
+ const status = attempt(() => lstatSync(path, { bigint: true }));
1792
1794
  if (!status.success || !status.value.isDirectory() || status.value.isSymbolicLink()) return;
1793
1795
  return {
1794
1796
  path,
@@ -1797,7 +1799,7 @@ function readAnchor(path) {
1797
1799
  };
1798
1800
  }
1799
1801
  /**
1800
- * Tests whether a captured directory is still the same directory.
1802
+ * Tests whether a path still holds the captured directory identity.
1801
1803
  *
1802
1804
  * @param anchor - The identity captured earlier.
1803
1805
  * @returns True if the path still holds a physical directory of that exact device and