sandboxedjs 0.1.55 → 0.1.57

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.
@@ -620,6 +620,8 @@ declare class HostAbiClient {
620
620
  rename(from: string, to: string): void;
621
621
  unlink(path: string, removeDirectory?: boolean): void;
622
622
  mkdir(path: string, mode?: number): void;
623
+ readlink(path: string): string;
624
+ symlink(target: string, path: string): void;
623
625
  readdir(fd: number, bufferSize?: number): string[];
624
626
  dup(fd: number, from?: number): number;
625
627
  dup2(fd: number, target: number): number;
@@ -620,6 +620,8 @@ declare class HostAbiClient {
620
620
  rename(from: string, to: string): void;
621
621
  unlink(path: string, removeDirectory?: boolean): void;
622
622
  mkdir(path: string, mode?: number): void;
623
+ readlink(path: string): string;
624
+ symlink(target: string, path: string): void;
623
625
  readdir(fd: number, bufferSize?: number): string[];
624
626
  dup(fd: number, from?: number): number;
625
627
  dup2(fd: number, target: number): number;
@@ -1763,6 +1763,12 @@ var HostAbiClient = class {
1763
1763
  mkdir(path, mode = 511) {
1764
1764
  this.call(Op.mkdirat, new Writer().string(path).u32(mode).finish());
1765
1765
  }
1766
+ readlink(path) {
1767
+ return new Reader(this.call(Op.readlinkat, new Writer().string(path).finish()).payload).string();
1768
+ }
1769
+ symlink(target, path) {
1770
+ this.call(Op.symlinkat, new Writer().string(target).string(path).finish());
1771
+ }
1766
1772
  readdir(fd, bufferSize = 4096) {
1767
1773
  const { payload } = this.call(Op.getdents, new Writer().i32(fd).u32(bufferSize).finish());
1768
1774
  const text = new TextDecoder().decode(payload);