frida-screenshot 3.0.1 → 4.0.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # frida-screenshot
2
2
 
3
- Grab screenshots using [Frida](http://frida.re).
3
+ Grab screenshots using [Frida](https://www.frida.re).
4
4
 
5
5
  ## Example
6
6
 
package/index.js CHANGED
@@ -1,11 +1,9 @@
1
- 'use strict';
2
-
3
- const ios = require('./lib/ios');
1
+ import { ios } from './lib/ios.js';
4
2
 
5
3
  const IOS = Symbol('ios');
6
4
  const UNKNOWN = Symbol('unknown');
7
5
 
8
- module.exports = function (view) {
6
+ export default function screenshot(view) {
9
7
  if (getOS() === IOS) {
10
8
  return ios(view);
11
9
  } else {
package/lib/ios.js CHANGED
@@ -1,9 +1,7 @@
1
- 'use strict';
2
-
3
1
  const CGFloat = (Process.pointerSize === 4) ? 'float' : 'double';
4
2
  const CGSize = [CGFloat, CGFloat];
5
3
 
6
- module.exports = function (view) {
4
+ export function ios(view) {
7
5
  return performOnMainThread(function () {
8
6
  const api = getApi();
9
7
 
@@ -21,7 +19,7 @@ module.exports = function (view) {
21
19
  api.UIGraphicsEndImageContext();
22
20
 
23
21
  const png = new ObjC.Object(api.UIImagePNGRepresentation(image));
24
- return Memory.readByteArray(png.bytes(), png.length());
22
+ return png.bytes().readByteArray(png.length());
25
23
  });
26
24
  };
27
25
 
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "frida-screenshot",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "Grab screenshots using Frida",
5
5
  "main": "index.js",
6
+ "type": "module",
6
7
  "files": [
7
8
  "/index.js",
8
9
  "/lib/**/*.js"