Ver código fonte

include crypto-api src into lib to get around mjs import issue. compiled node lib now requires successfully.

d98762625 7 anos atrás
pai
commit
20452fe3cb
4 arquivos alterados com 248 adições e 246 exclusões
  1. 4 3
      Gruntfile.js
  2. 241 241
      package-lock.json
  3. 1 0
      package.json
  4. 2 2
      webpack.config.js

+ 4 - 3
Gruntfile.js

@@ -255,7 +255,9 @@ module.exports = function (grunt) {
                 mode: "production",
                 target: "node",
                 entry: "./src/node/index.mjs",
-                externals: [NodeExternals()],
+                externals: [NodeExternals({
+                    whitelist: ["crypto-api/src/crypto-api"]
+                })],
                 output: {
                     filename: "CyberChef.js",
                     path: __dirname + "/build/node",
@@ -264,7 +266,7 @@ module.exports = function (grunt) {
                 },
                 plugins: [
                     new webpack.DefinePlugin(BUILD_CONSTANTS)
-                ]
+                ],
             }
         },
         "webpack-dev-server": {
@@ -390,7 +392,6 @@ module.exports = function (grunt) {
             generateNodeIndex: {
                 command: [
                     "echo '\n--- Regenerating node index ---'",
-
                     "echo 'Copying OperationConfig.json and wiping original'",
                     "cp src/core/config/OperationConfig.json src/node/config/OperationConfig.json",
                     "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs",

Diferenças do arquivo suprimidas por serem muito extensas
+ 241 - 241
package-lock.json


+ 1 - 0
package.json

@@ -28,6 +28,7 @@
     "url": "https://github.com/gchq/CyberChef/"
   },
   "main": "build/node/CyberChef.js",
+  "module": "src/node/index.mjs",
   "bugs": "https://github.com/gchq/CyberChef/issues",
   "devDependencies": {
     "babel-core": "^6.26.3",

+ 2 - 2
webpack.config.js

@@ -46,8 +46,8 @@ module.exports = {
     ],
     resolve: {
         alias: {
-            jquery: "jquery/src/jquery"
-        }
+            jquery: "jquery/src/jquery",
+        },
     },
     module: {
         rules: [

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff