mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 00:36:16 -04:00
Converted the core to ES modules
This commit is contained in:
parent
c1bb93eec1
commit
9b4fc3d3aa
154 changed files with 1901 additions and 2223 deletions
|
@ -8,7 +8,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import Chef from "../src/core/Chef.js";
|
||||
import Chef from "../src/core/Chef";
|
||||
|
||||
(function() {
|
||||
/**
|
|
@ -12,30 +12,41 @@
|
|||
*/
|
||||
import "babel-polyfill";
|
||||
|
||||
import TestRegister from "./TestRegister.js";
|
||||
import "./tests/operations/Base58.js";
|
||||
import "./tests/operations/Base64.js";
|
||||
import "./tests/operations/BCD.js";
|
||||
import "./tests/operations/BitwiseOp.js";
|
||||
import "./tests/operations/BSON.js";
|
||||
import "./tests/operations/ByteRepr.js";
|
||||
import "./tests/operations/CharEnc.js";
|
||||
import "./tests/operations/Cipher.js";
|
||||
import "./tests/operations/Code.js";
|
||||
import "./tests/operations/Compress.js";
|
||||
import "./tests/operations/DateTime.js";
|
||||
import "./tests/operations/FlowControl.js";
|
||||
import "./tests/operations/Hash.js";
|
||||
import "./tests/operations/Hexdump.js";
|
||||
import "./tests/operations/Image.js";
|
||||
import "./tests/operations/MorseCode.js";
|
||||
import "./tests/operations/MS.js";
|
||||
import "./tests/operations/PHP.js";
|
||||
import "./tests/operations/NetBIOS.js";
|
||||
import "./tests/operations/OTP.js";
|
||||
import "./tests/operations/Regex.js";
|
||||
import "./tests/operations/StrUtils.js";
|
||||
import "./tests/operations/SeqUtils.js";
|
||||
// Define global environment functions
|
||||
global.ENVIRONMENT_IS_WORKER = function() {
|
||||
return typeof importScripts === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_NODE = function() {
|
||||
return typeof process === "object" && typeof require === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_WEB = function() {
|
||||
return typeof window === "object";
|
||||
};
|
||||
|
||||
import TestRegister from "./TestRegister";
|
||||
// import "./tests/operations/Base58.js";
|
||||
import "./tests/operations/Base64";
|
||||
// import "./tests/operations/BCD.js";
|
||||
// import "./tests/operations/BitwiseOp.js";
|
||||
// import "./tests/operations/BSON.js";
|
||||
// import "./tests/operations/ByteRepr.js";
|
||||
// import "./tests/operations/CharEnc.js";
|
||||
// import "./tests/operations/Cipher.js";
|
||||
// import "./tests/operations/Code.js";
|
||||
// import "./tests/operations/Compress.js";
|
||||
// import "./tests/operations/DateTime.js";
|
||||
// import "./tests/operations/FlowControl.js";
|
||||
// import "./tests/operations/Hash.js";
|
||||
// import "./tests/operations/Hexdump.js";
|
||||
// import "./tests/operations/Image.js";
|
||||
// import "./tests/operations/MorseCode.js";
|
||||
// import "./tests/operations/MS.js";
|
||||
// import "./tests/operations/PHP.js";
|
||||
// import "./tests/operations/NetBIOS.js";
|
||||
// import "./tests/operations/OTP.js";
|
||||
// import "./tests/operations/Regex.js";
|
||||
// import "./tests/operations/StrUtils.js";
|
||||
// import "./tests/operations/SeqUtils.js";
|
||||
|
||||
|
||||
let allTestsPassing = true;
|
0
test/tests/operations/BCD.js
Normal file → Executable file
0
test/tests/operations/BCD.js
Normal file → Executable file
0
test/tests/operations/Base58.js
Normal file → Executable file
0
test/tests/operations/Base58.js
Normal file → Executable file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
const ALL_BYTES = [
|
||||
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
|
0
test/tests/operations/BitwiseOp.js
Normal file → Executable file
0
test/tests/operations/BitwiseOp.js
Normal file → Executable file
0
test/tests/operations/CharEnc.js
Normal file → Executable file
0
test/tests/operations/CharEnc.js
Normal file → Executable file
0
test/tests/operations/Cipher.js
Normal file → Executable file
0
test/tests/operations/Cipher.js
Normal file → Executable file
0
test/tests/operations/Code.js
Normal file → Executable file
0
test/tests/operations/Code.js
Normal file → Executable file
0
test/tests/operations/Compress.js
Normal file → Executable file
0
test/tests/operations/Compress.js
Normal file → Executable file
0
test/tests/operations/DateTime.js
Normal file → Executable file
0
test/tests/operations/DateTime.js
Normal file → Executable file
0
test/tests/operations/Image.js
Normal file → Executable file
0
test/tests/operations/Image.js
Normal file → Executable file
0
test/tests/operations/MS.js
Normal file → Executable file
0
test/tests/operations/MS.js
Normal file → Executable file
0
test/tests/operations/MorseCode.js
Normal file → Executable file
0
test/tests/operations/MorseCode.js
Normal file → Executable file
0
test/tests/operations/NetBIOS.js
Normal file → Executable file
0
test/tests/operations/NetBIOS.js
Normal file → Executable file
0
test/tests/operations/OTP.js
Normal file → Executable file
0
test/tests/operations/OTP.js
Normal file → Executable file
0
test/tests/operations/PHP.js
Normal file → Executable file
0
test/tests/operations/PHP.js
Normal file → Executable file
0
test/tests/operations/Regex.js
Normal file → Executable file
0
test/tests/operations/Regex.js
Normal file → Executable file
0
test/tests/operations/SeqUtils.js
Normal file → Executable file
0
test/tests/operations/SeqUtils.js
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue