Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.18.0
22.22.0
201 changes: 29 additions & 172 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/cli-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Prerequisites

- Have `mitmproxy` installed and its binary in your path[^1]
- Have `pipx` installed and its binary in your path[^1]
- Chrome.

## How to run the tests?
Expand All @@ -21,4 +21,4 @@

3. ☕. Tests are long, if all goes well 10-12' on a good machine, 20-25' on a decent one, 30-40' if they fail.

[^1]: mitmdump is the one of interest
[^1]: Will be used for `mitmdump` from `mitmproxy`
17 changes: 12 additions & 5 deletions packages/cli-e2e/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
FROM node:lts-buster
# The chrome repository only provides amd64 images, so we need to specify the platform to be able to install it.
FROM --platform=linux/amd64 node:lts-buster

# Debian buster is oldstable and thus moved to archive.debian.org, so we need to update the sources.list to be able to install packages.
# TODO: Update to a newer Debian version once the latest LTS image is updated to it.
RUN sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list && \
sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list && \
sed -i '/buster-updates/d' /etc/apt/sources.list

RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

RUN apt-get update

RUN apt-get install -y google-chrome-stable
RUN update-alternatives --set x-www-browser /usr/bin/google-chrome-stable

# Brew, used for mitmproxy
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

RUN apt-get install git
RUN apt-get install -y git

# Keyring deps
RUN apt-get install -y dbus-x11
Expand All @@ -21,6 +26,8 @@ RUN apt-get install -y make build-essential libssl-dev zlib1g-dev
RUN apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
RUN apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev

RUN apt-get install -y pipx python3-venv && pipx run mitmdump --version

# For headless without headless.
RUN apt-get install xvfb -y

Expand Down
3 changes: 0 additions & 3 deletions packages/cli-e2e/mitmproxy/main.py

This file was deleted.

1 change: 0 additions & 1 deletion packages/cli-e2e/mitmproxy/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions packages/cli-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "git+https://github.com/coveo/cli.git"
},
"scripts": {
"postinstall": "pip install -r mitmproxy/requirements.txt --user",
"postinstall": "pipx run mitmdump --version",
"lint": "eslint .",
"test-e2e": "npm run test:headless",
"test:headless": "node ./entrypoints/entry.js",
Expand Down Expand Up @@ -61,7 +61,7 @@
"@babel/core": "7.21.5",
"@babel/preset-env": "7.21.5",
"@babel/preset-typescript": "7.21.5",
"@coveo/cli": "3.2.13",
"@coveo/cli": "3.2.14",
"@coveo/platform-client": "58.5.0",
"abortcontroller-polyfill": "1.7.5",
"async-retry": "1.3.3",
Expand Down
7 changes: 3 additions & 4 deletions packages/cli-e2e/utils/mitmproxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export const startMitmProxy = (
processManager: ProcessManager,
terminalDebugName = 'mitmproxy'
) => {
const mitmScript = join(__dirname, '..', 'mitmproxy', 'main.py');
const serverTerminal = new Terminal(
'python',
'pipx',
[
'-u',
mitmScript,
'run',
'mitmdump',
'-p',
'8080',
'--listen-host',
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@coveo/cli-commons": "2.9.11",
"@coveo/platform-client": "58.5.0",
"@coveo/push-api-client": "4.0.1",
"@coveo/push-api-client": "4.0.24",
"@oclif/core": "1.24.0",
"@oclif/plugin-help": "5.1.23",
"@oclif/plugin-plugins": "2.1.12",
Expand Down Expand Up @@ -75,7 +75,7 @@
"prepublishOnly": "rimraf lib && npm run build && oclif manifest"
},
"engines": {
"node": "^18.18.1 || ^20.9.0"
"node": "^18.18.1 || ^20.9.0 || >=22"
},
"bugs": "https://github.com/coveo/cli/issues",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/cra-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"license": "Apache-2.0",
"engines": {
"node": "^18.18.1 || ^20.9.0"
"node": "^18.18.1 || ^20.9.0 || >=22"
},
"files": [
"template",
Expand Down
Loading