cyberchef 9.46.4 → 9.46.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "9.46.4",
3
+ "version": "9.46.5",
4
4
  "description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
5
5
  "author": "n1474335 <n1474335@gmail.com>",
6
6
  "homepage": "https://gchq.github.io/CyberChef",
@@ -154,7 +154,7 @@
154
154
  "split.js": "^1.6.5",
155
155
  "ssdeep.js": "0.0.3",
156
156
  "stream-browserify": "^3.0.0",
157
- "tesseract.js": "2.1.5",
157
+ "tesseract.js": "3.0.2",
158
158
  "ua-parser-js": "^1.0.2",
159
159
  "unorm": "^1.6.0",
160
160
  "utf8": "^3.0.0",
@@ -12,10 +12,8 @@ import { isImage } from "../lib/FileType.mjs";
12
12
  import { toBase64 } from "../lib/Base64.mjs";
13
13
  import { isWorkerEnvironment } from "../Utils.mjs";
14
14
 
15
- import Tesseract from "tesseract.js";
16
- const { createWorker } = Tesseract;
17
-
18
15
  import process from "process";
16
+ import { createWorker } from "tesseract.js";
19
17
 
20
18
  /**
21
19
  * Optical Character Recognition operation
@@ -55,7 +53,7 @@ class OpticalCharacterRecognition extends Operation {
55
53
 
56
54
  const type = isImage(input);
57
55
  if (!type) {
58
- throw new OperationError("Invalid File Type");
56
+ throw new OperationError("Unsupported file type (supported: jpg,png,pbm,bmp) or no file provided");
59
57
  }
60
58
 
61
59
  const assetDir = isWorkerEnvironment() ? `${self.docURL}/assets/` : `${process.cwd()}/src/core/vendor/`;
@@ -74,7 +72,7 @@ class OpticalCharacterRecognition extends Operation {
74
72
  }
75
73
  });
76
74
  await worker.load();
77
- self.sendStatusMessage("Loading English language...");
75
+ self.sendStatusMessage(`Loading English language pack...`);
78
76
  await worker.loadLanguage("eng");
79
77
  self.sendStatusMessage("Intialising Tesseract API...");
80
78
  await worker.initialize("eng");