bun-memory 1.1.7 → 1.1.8

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.
@@ -1,7 +1,7 @@
1
- import { FFIType, dlopen } from 'bun:ffi';
1
+ import { CString, FFIType, dlopen, ptr } from 'bun:ffi';
2
2
  import { sleep } from 'bun';
3
3
 
4
- import Memory from 'bun-memory';
4
+ import Memory from '../index.ts';
5
5
 
6
6
  // Get the latest client_dll.json and offsets.json from:
7
7
  // https://github.com/a2x/cs2-dumper/tree/main/output
@@ -9,6 +9,10 @@ import Memory from 'bun-memory';
9
9
  import ClientDLLJSON from './offsets/client_dll.json';
10
10
  import OffsetsJSON from './offsets/offsets.json';
11
11
 
12
+ // !
13
+
14
+ // !
15
+
12
16
  const Delay = 2.5;
13
17
 
14
18
  const { random } = Math;
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "url": "git://github.com/obscuritysrl/bun-memory.git"
23
23
  },
24
24
  "type": "module",
25
- "version": "1.1.7",
25
+ "version": "1.1.8",
26
26
  "main": "./index.ts",
27
27
  "keywords": [
28
28
  "bun",
@@ -74,7 +74,7 @@
74
74
  * ```
75
75
  */
76
76
 
77
- import { ptr, type Pointer } from 'bun:ffi';
77
+ import { type Pointer, ptr } from 'bun:ffi';
78
78
 
79
79
  /**
80
80
  * List of binary view constructor functions whose prototypes will be extended
@@ -236,3 +236,5 @@ constructors.forEach(({ prototype }) => {
236
236
  });
237
237
  }
238
238
  });
239
+
240
+ export {};
package/structs/Memory.ts CHANGED
@@ -439,6 +439,7 @@ class Memory {
439
439
  * @param lengthOrValue - Number of bytes to read (when reading), or `CString` to write (when writing)
440
440
  * @returns `CString` when reading, or this `Memory` instance when writing
441
441
  *
442
+ * @todo Investigate odd behavior when reading strings longer than `lengthOrValue`.
442
443
  * @todo Research and consider alternatives that do not require so many new allocations.
443
444
  *
444
445
  * @example