Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Update node to 18.16.1 and cypress test runner (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldingAustin authored Aug 24, 2023
1 parent 0d40339 commit 61cc6f7
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.19.0]
node-version: [18.16.1]

steps:
- uses: actions/checkout@v3
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16.19.0
node-version: 18.16.1
cache: 'yarn'
- run: CYPRESS_INSTALL_BINARY=0 yarn install --immutable --inline-builds
- run: CYPRESS_INSTALL_BINARY=0 yarn moon ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
CYPRESS_INSTALL_BINARY: 0
strategy:
matrix:
node-version: [16.19.0]
node-version: [18.16.1]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
install:
needs: ['prepare']
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/included:cypress-12.17.3-node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16.20.0]
node-version: [18.16.1]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Cache
uses: actions/setup-node@v3
with:
node-version: 16.20.0
node-version: 18.16.1
cache: 'yarn'

- run: yarn install --immutable --inline-builds
Expand All @@ -59,14 +59,14 @@ jobs:
RedTeamChrome:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/included:cypress-12.17.3-node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
containers: [1, 2]
node-version: [16.20.0]
node-version: [18.16.1]

steps:
- name: Checkout
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Cache
uses: actions/setup-node@v3
with:
node-version: 16.20.0
node-version: 18.16.1
cache: 'yarn'

- name: Download the build folders
Expand Down Expand Up @@ -108,14 +108,14 @@ jobs:
BlueTeamChrome:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/included:cypress-12.17.3-node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
containers: [1, 2]
node-version: [16.20.0]
node-version: [18.16.1]

steps:
- name: Checkout
Expand All @@ -126,7 +126,7 @@ jobs:
- name: Cache
uses: actions/setup-node@v3
with:
node-version: 16.20.0
node-version: 18.16.1
cache: 'yarn'

- name: Download the build folders
Expand Down
12 changes: 6 additions & 6 deletions .moon/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ tasks:
mergeOutputs: 'replace'
runInCI: false
release-mac:
command: 'yarn pkg $projectRoot/package.json -t node16-mac -o @out(0)'
command: 'yarn pkg $projectRoot/package.json -t node18-mac -o @out(0)'
deps:
- ~:fetch-pkg-mac
- ~:build
Expand All @@ -260,7 +260,7 @@ tasks:
runInCI: false
runFromWorkspaceRoot: true
release-linux:
command: 'yarn pkg $projectRoot/package.json -t node16-linux -o @out(0)'
command: 'yarn pkg $projectRoot/package.json -t node18-linux -o @out(0)'
deps:
- ~:fetch-pkg-linux
- ~:build
Expand All @@ -272,7 +272,7 @@ tasks:
runInCI: false
runFromWorkspaceRoot: true
release-windows:
command: 'yarn pkg $projectRoot/package.json -t node16-win -o @out(0)'
command: 'yarn pkg $projectRoot/package.json -t node18-win -o @out(0)'
deps:
- ~:fetch-pkg-windows
- ~:build
Expand All @@ -286,21 +286,21 @@ tasks:

## Fetch pkg commands
fetch-pkg-mac:
command: 'yarn pkg-fetch --platform mac --node-range node16'
command: 'yarn pkg-fetch --platform mac --node-range node18'
platform: system
options:
runInCI: false
retryCount: 2
runFromWorkspaceRoot: true
fetch-pkg-linux:
command: 'yarn pkg-fetch --platform linux --node-range node16'
command: 'yarn pkg-fetch --platform linux --node-range node18'
platform: system
options:
runInCI: false
retryCount: 2
runFromWorkspaceRoot: true
fetch-pkg-windows:
command: 'yarn pkg-fetch --platform win --node-range node16'
command: 'yarn pkg-fetch --platform win --node-range node18'
platform: system
options:
runInCI: false
Expand Down
2 changes: 1 addition & 1 deletion .moon/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $schema: 'https://moonrepo.dev/schemas/toolchain.json'
node:
# The version to use. Must be a semantic version that includes major, minor, and patch.
# We suggest using the latest active LTS version: https://nodejs.org/en/about/releases
version: '16.20.0'
version: '18.16.1'

# The package manager to use when managing dependencies.
# Accepts "npm" (default), "pnpm", or "yarn".
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.0
18.16.1
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-bullseye as redeye-builder
FROM node:18-bullseye as redeye-builder

WORKDIR /app
COPY ./ ./
Expand All @@ -7,26 +7,26 @@ RUN npm install -g pkg
RUN yarn install --immutable --inline-builds
RUN curl -fsSL https://moonrepo.dev/install/moon.sh | bash
RUN moon run server:build client:build cobalt-strike-parser:build
RUN pkg applications/server/package.json -t node16-mac-x64 -o release/mac/RedEye
RUN pkg applications/server/package.json -t node16-linux-x64 -o release/linux/RedEye
RUN pkg applications/server/package.json -t node16-windows-x64 -o release/windows/RedEye
RUN pkg parsers/cobalt-strike-parser/package.json -t node16-mac-x64 -o release/mac/parsers/cobalt-strike-parser
RUN pkg parsers/cobalt-strike-parser/package.json -t node16-linux-x64 -o release/linux/parsers/cobalt-strike-parser
RUN pkg parsers/cobalt-strike-parser/package.json -t node16-windows-x64 -o release/windows/parsers/cobalt-strike-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node16-mac-x64 -o release/mac/parsers/brute-ratel-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node16-linux-x64 -o release/linux/parsers/brute-ratel-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node16-windows-x64 -o release/windows/parsers/brute-ratel-parser
RUN pkg applications/server/package.json -t node18-mac-x64 -o release/mac/RedEye
RUN pkg applications/server/package.json -t node18-linux-x64 -o release/linux/RedEye
RUN pkg applications/server/package.json -t node18-windows-x64 -o release/windows/RedEye
RUN pkg parsers/cobalt-strike-parser/package.json -t node18-mac-x64 -o release/mac/parsers/cobalt-strike-parser
RUN pkg parsers/cobalt-strike-parser/package.json -t node18-linux-x64 -o release/linux/parsers/cobalt-strike-parser
RUN pkg parsers/cobalt-strike-parser/package.json -t node18-windows-x64 -o release/windows/parsers/cobalt-strike-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node18-mac-x64 -o release/mac/parsers/brute-ratel-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node18-linux-x64 -o release/linux/parsers/brute-ratel-parser
RUN pkg parsers/brute-ratel-parser/package.json -t node18-windows-x64 -o release/windows/parsers/brute-ratel-parser
RUN tar -zcvf release.tar.gz ./release/
RUN mkdir outputs
RUN cp release.tar.gz outputs/release.tar.gz

FROM node:16-bullseye as redeye-linux-builder
FROM node:18-bullseye as redeye-linux-builder

WORKDIR /app
COPY ./ ./
ENV CYPRESS_INSTALL_BINARY=0
RUN yarn install --immutable --inline-builds
RUN npx pkg-fetch --platform linux --node-range node16
RUN npx pkg-fetch --platform linux --node-range node18
RUN yarn release:linux

### CORE IMAGE ###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ type ParserUploadFormProps = ComponentProps<'form'> & {
parserInfo: ParserInfoModel;
};

const createDirectoryFile = (file: File): DirectoryFile => ({
...file,
webkitRelativePath: file.webkitRelativePath,
name: file.name,
blob: file.slice(),
});
const createDirectoryFile = (file: File) =>
({
...file,
webkitRelativePath: file.webkitRelativePath,
name: file.name,
blob: file.slice(),
} as DirectoryFile);

const defaultServer: Servers = {
name: '',
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"@types/istanbul-lib-coverage": "^2.0.3",
"@types/jest": "27.4.1",
"@types/js-yaml": "^4",
"@types/node": "16.11.7",
"@types/node": "18.16.1",
"@types/nodemon": "^1.19.0",
"@types/prettier": "^2",
"@types/react": "^18.2.14",
Expand All @@ -149,7 +149,7 @@
"builder-util": "^23.0.2",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"cypress": "^12.17.0",
"cypress": "12.17.3",
"cypress-map": "^1.19.1",
"cypress-multi-reporters": "^1.6.1",
"cypress-real-events": "^1.7.6",
Expand Down Expand Up @@ -224,7 +224,7 @@
]
},
"engines": {
"node": "16.20.0"
"node": "18.16.1"
},
"packageManager": "[email protected]"
}
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4011,10 +4011,10 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:16.11.7":
version: 16.11.7
resolution: "@types/node@npm:16.11.7"
checksum: 2706403e6efc4aa40fdce8f0b5d9884d5600c3c8610aedc7fa5e7e298d30366f7e8b7296028d52898dca3edef4c3e827b03bf20952c4780f13fa4e79864f7a86
"@types/node@npm:18.16.1":
version: 18.16.1
resolution: "@types/node@npm:18.16.1"
checksum: 799026b949a48993cba7c9b81b2eabfdfb34c880744cb44c1c990fbedc9e315f3634d126eb2cf9a6e0795577c01016e2326d98565bef695ada9d363fadeb6946
languageName: node
linkType: hard

Expand All @@ -4025,10 +4025,10 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^14.14.31":
version: 14.18.53
resolution: "@types/node@npm:14.18.53"
checksum: 3acbcf4e38cdc5999c824db5c6689ca8f4a185562aad5c0263d9859381d8590a16e6a72343aeb30d48ff9a7ac9b6ae259bcb8c2d594703a30d12277904524704
"@types/node@npm:^16.18.39":
version: 16.18.40
resolution: "@types/node@npm:16.18.40"
checksum: a683930491b4fd7cb2dc7684e32bbeedc4a83fb1949a7b15ea724fbfaa9988cec59091f169a3f1090cb91992caba8c1a7d50315b2c67c6e2579a3788bb09eec4
languageName: node
linkType: hard

Expand Down Expand Up @@ -6645,13 +6645,13 @@ __metadata:
languageName: node
linkType: hard

"cypress@npm:^12.17.0":
version: 12.17.1
resolution: "cypress@npm:12.17.1"
"cypress@npm:12.17.3":
version: 12.17.3
resolution: "cypress@npm:12.17.3"
dependencies:
"@cypress/request": ^2.88.11
"@cypress/xvfb": ^1.2.4
"@types/node": ^14.14.31
"@types/node": ^16.18.39
"@types/sinonjs__fake-timers": 8.1.1
"@types/sizzle": ^2.3.2
arch: ^2.2.0
Expand Down Expand Up @@ -6693,7 +6693,7 @@ __metadata:
yauzl: ^2.10.0
bin:
cypress: bin/cypress
checksum: 1f042e3e5931498bdf826cba09060939349e677fca8654c9695760acbec5a424cb69d3445ace57cf80deb496d770ffe571ef791dff72af24e7f560ee43986ee4
checksum: 1da3922cac45c35ee282116fe2af2278e92cc08bd2d8586e0f2346cbe5c9f62129cec567bc9274c585e8c2e887341fa4e5c8623cfaa41dba87331cfb5a023721
languageName: node
linkType: hard

Expand Down Expand Up @@ -14841,7 +14841,7 @@ __metadata:
"@types/istanbul-lib-coverage": ^2.0.3
"@types/jest": 27.4.1
"@types/js-yaml": ^4
"@types/node": 16.11.7
"@types/node": 18.16.1
"@types/nodemon": ^1.19.0
"@types/prettier": ^2
"@types/react": ^18.2.14
Expand Down Expand Up @@ -14871,7 +14871,7 @@ __metadata:
cors: ^2.8.5
cross-env: ^7.0.3
crypto-js: ^4.0.0
cypress: ^12.17.0
cypress: 12.17.3
cypress-map: ^1.19.1
cypress-multi-reporters: ^1.6.1
cypress-real-events: ^1.7.6
Expand Down

0 comments on commit 61cc6f7

Please sign in to comment.