mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 00:36:16 -04:00
Export cyberchef error types to be used in consuming applications
This commit is contained in:
parent
b4ae4c5a00
commit
5148b16246
3 changed files with 24 additions and 30 deletions
|
@ -41,6 +41,7 @@ let code = `/**
|
|||
import NodeDish from "./NodeDish.mjs";
|
||||
import { _wrap, help, bake, _explainExludedFunction } from "./api.mjs";
|
||||
import File from "./File.mjs";
|
||||
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index";
|
||||
import {
|
||||
// import as core_ to avoid name clashes after wrap.
|
||||
`;
|
||||
|
@ -115,6 +116,9 @@ Object.keys(operations).forEach((op) => {
|
|||
code += " NodeDish as Dish,\n";
|
||||
code += " prebaked as bake,\n";
|
||||
code += " help,\n";
|
||||
code += " OperationError,\n";
|
||||
code += " ExcludedOperationError,\n";
|
||||
code += " DishError,\n";
|
||||
code += "};\n";
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue