mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Moved postinstall script to a Grunt task to fix relative calls. npm scripts now use local grunt install.
This commit is contained in:
parent
83f119f7e4
commit
6b10f61e11
6 changed files with 21 additions and 17 deletions
|
@ -63,7 +63,8 @@
|
||||||
}],
|
}],
|
||||||
"linebreak-style": ["error", "unix"],
|
"linebreak-style": ["error", "unix"],
|
||||||
"quotes": ["error", "double", {
|
"quotes": ["error", "double", {
|
||||||
"avoidEscape": true
|
"avoidEscape": true,
|
||||||
|
"allowTemplateLiterals": true
|
||||||
}],
|
}],
|
||||||
"camelcase": ["error", {
|
"camelcase": ["error", {
|
||||||
"properties": "always"
|
"properties": "always"
|
||||||
|
|
1
.github/workflows/releases.yml
vendored
1
.github/workflows/releases.yml
vendored
|
@ -47,6 +47,7 @@ jobs:
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
file_glob: true
|
file_glob: true
|
||||||
|
body: "See the [CHANGELOG](https://github.com/gchq/CyberChef/blob/master/CHANGELOG.md) and [commit messages](https://github.com/gchq/CyberChef/commits/master) for details."
|
||||||
|
|
||||||
- name: Publish to NPM
|
- name: Publish to NPM
|
||||||
if: success()
|
if: success()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
CyberChef uses the [semver](https://semver.org/) system to manage versioning: MAJOR.MINOR.PATCH.
|
CyberChef uses the [semver](https://semver.org/) system to manage versioning: `<MAJOR>.<MINOR>.<PATCH>`.
|
||||||
|
|
||||||
- MAJOR version changes represent a significant change to the fundamental architecture of CyberChef and may (but don't always) make breaking changes that are not backwards compatible.
|
- MAJOR version changes represent a significant change to the fundamental architecture of CyberChef and may (but don't always) make breaking changes that are not backwards compatible.
|
||||||
- MINOR version changes usually mean the addition of new operations or reasonably significant new features.
|
- MINOR version changes usually mean the addition of new operations or reasonably significant new features.
|
||||||
|
|
10
Gruntfile.js
10
Gruntfile.js
|
@ -411,6 +411,16 @@ module.exports = function (grunt) {
|
||||||
]),
|
]),
|
||||||
stdout: false,
|
stdout: false,
|
||||||
},
|
},
|
||||||
|
fixCryptoApiImports: {
|
||||||
|
command: [
|
||||||
|
`[[ "$OSTYPE" == "darwin"* ]]`,
|
||||||
|
"&&",
|
||||||
|
`find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`,
|
||||||
|
"||",
|
||||||
|
`find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`
|
||||||
|
].join(" "),
|
||||||
|
stdout: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
14
package.json
14
package.json
|
@ -164,15 +164,15 @@
|
||||||
"zlibjs": "^0.3.1"
|
"zlibjs": "^0.3.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "grunt dev",
|
"start": "npx grunt dev",
|
||||||
"build": "grunt prod",
|
"build": "npx grunt prod",
|
||||||
"repl": "node src/node/repl.js",
|
"repl": "node src/node/repl.js",
|
||||||
"test": "grunt configTests && node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs",
|
"test": "npx grunt configTests && node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs",
|
||||||
"test-node-consumer": "grunt testnodeconsumer",
|
"test-node-consumer": "npx grunt testnodeconsumer",
|
||||||
"testui": "grunt testui",
|
"testui": "npx grunt testui",
|
||||||
"testuidev": "npx nightwatch --env=dev",
|
"testuidev": "npx nightwatch --env=dev",
|
||||||
"lint": "grunt lint",
|
"lint": "npx grunt lint",
|
||||||
"postinstall": "bash postinstall.sh",
|
"postinstall": "npx grunt exec:fixCryptoApiImports",
|
||||||
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Add file extensions to Crypto-Api imports
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
||||||
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i '' -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
|
||||||
else
|
|
||||||
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
|
||||||
fi
|
|
Loading…
Add table
Add a link
Reference in a new issue