frida-fs 5.2.0 → 5.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,7 +16,8 @@ import process from "process";
16
16
  import stream from "stream";
17
17
  const getWindowsApi = memoize(_getWindowsApi);
18
18
  const getPosixApi = memoize(_getPosixApi);
19
- const { platform, pointerSize } = Process;
19
+ const platform = Process.platform;
20
+ const pointerSize = Process.pointerSize;
20
21
  const isWindows = platform === "windows";
21
22
  const S_IFMT = 0xf000;
22
23
  const S_IFREG = 0x8000;
@@ -96,7 +97,7 @@ const constants = {
96
97
  ...universalConstants,
97
98
  ...platformConstants[platform]
98
99
  };
99
- const INVALID_HANDLE_VALUE = ptr(-1);
100
+ const INVALID_HANDLE_VALUE = -1;
100
101
  const GENERIC_READ = 0x80000000;
101
102
  const GENERIC_WRITE = 0x40000000;
102
103
  const FILE_SHARE_READ = 0x1;
@@ -849,12 +850,12 @@ function callbackify(original) {
849
850
  });
850
851
  };
851
852
  }
852
- const SF = SystemFunction;
853
- const NF = NativeFunction;
854
853
  const ssizeType = (pointerSize === 8) ? "int64" : "int32";
855
854
  const sizeType = "u" + ssizeType;
856
855
  const offsetType = (platform === "darwin" || pointerSize === 8) ? "int64" : "int32";
857
856
  function _getWindowsApi() {
857
+ const SF = SystemFunction;
858
+ const NF = NativeFunction;
858
859
  return makeApi([
859
860
  ["CreateFileW", SF, "pointer", ["pointer", "uint", "uint", "pointer", "uint", "uint", "pointer"]],
860
861
  ["DeleteFileW", SF, "uint", ["pointer"]],
@@ -871,6 +872,8 @@ function _getWindowsApi() {
871
872
  ]);
872
873
  }
873
874
  function _getPosixApi() {
875
+ const SF = SystemFunction;
876
+ const NF = NativeFunction;
874
877
  return makeApi([
875
878
  ["open", SF, "int", ["pointer", "int", "...", "int"]],
876
879
  ["close", NF, "int", ["int"]],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida-fs",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "Create a stream from a filesystem resource",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",