mirror of
https://github.com/gchq/CyberChef
synced 2025-01-06 01:28:48 +00:00
re-add translateTo call to chef export
This commit is contained in:
parent
336810cbf4
commit
6db9521419
2 changed files with 5 additions and 14 deletions
10
Gruntfile.js
10
Gruntfile.js
|
@ -388,16 +388,6 @@ module.exports = function (grunt) {
|
|||
"echo '--- Config scripts finished. ---\n'"
|
||||
].join(";")
|
||||
},
|
||||
generateNodeIndex: {
|
||||
command: [
|
||||
"echo '\n--- Regenerating node index ---'",
|
||||
"mkdir -p src/core/config/modules",
|
||||
"echo 'export default {};\n' > src/core/config/modules/OpModules.mjs",
|
||||
"echo '[]\n' > src/core/config/OperationConfig.json",
|
||||
"node --experimental-modules src/core/config/scripts/generateNodeIndex.mjs",
|
||||
"echo '--- Node index finished. ---\n'"
|
||||
].join(";"),
|
||||
},
|
||||
tests: {
|
||||
command: "node --experimental-modules test/index.mjs"
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
/*eslint no-console: ["off"] */
|
||||
|
||||
/*eslint no-console: 0 */
|
||||
/* eslint camelcase: 0 */
|
||||
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
@ -34,7 +34,7 @@ let code = `/**
|
|||
*/
|
||||
|
||||
import "babel-polyfill";
|
||||
import { wrap } from "./apiUtils";
|
||||
import { wrap, translateTo } from "./apiUtils";
|
||||
import {
|
||||
`;
|
||||
|
||||
|
@ -74,7 +74,7 @@ code += ` };
|
|||
}
|
||||
|
||||
const chef = generateChef();
|
||||
|
||||
chef.translateTo = translateTo;
|
||||
`;
|
||||
|
||||
Object.keys(operations).forEach((op) => {
|
||||
|
@ -82,6 +82,7 @@ Object.keys(operations).forEach((op) => {
|
|||
});
|
||||
|
||||
code +=`
|
||||
|
||||
export default chef;
|
||||
export {
|
||||
`;
|
||||
|
|
Loading…
Reference in a new issue