Skip to content

Commit 424648d

Browse files
authored
Merge branch 'master' into fix-step-2
2 parents aa0bf64 + 0cf7bca commit 424648d

288 files changed

Lines changed: 40541 additions & 19932 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cspell.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2",
3+
"language": "en,en-gb",
4+
"words": [],
5+
"dictionaries": [
6+
"npm",
7+
"softwareTerms",
8+
"node",
9+
"html",
10+
"css",
11+
"bash",
12+
"en-gb",
13+
"misc"
14+
],
15+
"ignorePaths": ["package.json", "package-lock.json", "node_modules"]
16+
}
17+

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
3+
{
4+
"name": "CyberChef",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bookworm",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/devcontainers/features/github-cli": "latest"
11+
},
12+
13+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14+
"forwardPorts": [8080],
15+
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
"postCreateCommand": {
18+
"npm": "bash -c \"sudo chown node node_modules && npm install\""
19+
},
20+
21+
"containerEnv": {
22+
"DISPLAY": ":99"
23+
},
24+
25+
"mounts": [
26+
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
27+
],
28+
29+
// Configure tool-specific properties.
30+
"customizations": {
31+
"vscode": {
32+
"extensions": [
33+
"dbaeumer.vscode-eslint",
34+
"GitHub.vscode-github-actions"
35+
]
36+
}
37+
}
38+
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
build

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ indent_size = 4
1212
[{package.json,.travis.yml,nightwatch.json}]
1313
indent_style = space
1414
indent_size = 2
15+
16+
[.github/**.yml]
17+
indent_style = space
18+
indent_size = 2

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/codeql.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/master.yml

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,64 @@
11
name: "Master Build, Test & Deploy"
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_dispatch:
58
push:
69
branches:
7-
- master
10+
- master
811

912
jobs:
1013
main:
14+
permissions:
15+
contents: write
1116
runs-on: ubuntu-latest
1217
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Set node version
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: '18.x'
19-
20-
- name: Install
21-
run: |
22-
npm install
23-
npm run setheapsize
24-
25-
- name: Lint
26-
run: npx grunt lint
27-
28-
- name: Unit Tests
29-
run: |
30-
npm test
31-
npm run testnodeconsumer
32-
33-
- name: Production Build
34-
if: success()
35-
run: npx grunt prod --msg="Version 10 is here! Read about the new features <a href='https://github.com/gchq/CyberChef/wiki/Character-encoding,-EOL-separators,-and-editor-features'>here</a>"
36-
37-
- name: Generate sitemap
38-
run: npx grunt exec:sitemap
39-
40-
- name: UI Tests
41-
if: success()
42-
run: |
43-
sudo apt-get install xvfb
44-
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
45-
46-
- name: Prepare for GitHub Pages
47-
if: success()
48-
run: npx grunt copy:ghPages
49-
50-
- name: Deploy to GitHub Pages
51-
if: success() && github.ref == 'refs/heads/master'
52-
uses: crazy-max/ghaction-github-pages@v3
53-
with:
54-
target_branch: gh-pages
55-
build_dir: ./build/prod
56-
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
- uses: actions/checkout@v6
19+
20+
- name: Set node version
21+
uses: actions/setup-node@v6
22+
with:
23+
node-version: 18
24+
registry-url: "https://registry.npmjs.org"
25+
26+
- name: Install
27+
run: |
28+
export DETECT_CHROMEDRIVER_VERSION=true
29+
npm install
30+
npm run setheapsize
31+
32+
- name: Lint
33+
run: npx grunt lint
34+
35+
- name: Unit Tests
36+
run: |
37+
npm test
38+
npm run testnodeconsumer
39+
40+
- name: Production Build
41+
if: success()
42+
run: npx grunt prod --msg=""
43+
44+
- name: Generate sitemap
45+
run: npx grunt exec:sitemap
46+
47+
- name: UI Tests
48+
if: success()
49+
run: |
50+
sudo apt-get install xvfb
51+
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
52+
53+
- name: Prepare for GitHub Pages
54+
if: success()
55+
run: npx grunt copy:ghPages
56+
57+
- name: Deploy to GitHub Pages
58+
if: success() && github.ref == 'refs/heads/master'
59+
uses: crazy-max/ghaction-github-pages@v3
60+
with:
61+
target_branch: gh-pages
62+
build_dir: ./build/prod
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)