-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,949 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/dist/ | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## v0.6.0 (2023-10-27) | ||
|
||
### Added | ||
|
||
- Add a Docker image for advanced usage with host mocking ([#3](https://github.com/studiometa/cli-test-redirection/pull/3)) | ||
- Add `--replace-(from|to)-host` flags ([d738fc1](https://github.com/studiometa/cli-test-redirection/commit/d738fc1)) | ||
|
||
### Changed | ||
|
||
- Improve logging ([3bbbc1e](https://github.com/studiometa/cli-test-redirection/commit/3bbbc1e)) | ||
- ⚠️ Bump Node version to >=20 ([#3](https://github.com/studiometa/cli-test-redirection/pull/3)) | ||
|
||
### Deleted | ||
|
||
- ⚠️ Remove the `--password` parameter in favor of a single `--user user:pass` parameter ([#3](https://github.com/studiometa/cli-test-redirection/pull/3)) | ||
|
||
### Fixed | ||
|
||
- Decode output URL ([1de1585](https://github.com/studiometa/cli-test-redirection/commit/1de1585)) | ||
|
||
## v0.5.0 (2022-03-25) | ||
|
||
### Added | ||
|
||
- Add support for basic auth ([786a53e](https://github.com/studiometa/cli-test-redirection/commit/786a53e)) | ||
- Add support for host replacement from CSV file ([d78ab82](https://github.com/studiometa/cli-test-redirection/commit/d78ab82)) | ||
- Add support for CSV input file ([549f568](https://github.com/studiometa/cli-test-redirection/commit/549f568)) | ||
|
||
### Changed | ||
|
||
- Improve logging ([175e75e](https://github.com/studiometa/cli-test-redirection/commit/175e75e)) | ||
- Improve curl error logging ([14a183e](https://github.com/studiometa/cli-test-redirection/commit/14a183e)) | ||
- Update dependencies ([88ce93a](https://github.com/studiometa/cli-test-redirection/commit/88ce93a)) | ||
|
||
## v0.4.0 (2021-07-27) | ||
|
||
### Added | ||
|
||
- Add support for custom method (GET, POST, etc.) when testing a redirection | ||
|
||
## v0.3.0 (2021-07-27) | ||
|
||
### Added | ||
|
||
- Add support for ignoring query parameters | ||
- Globally with the `--ignore-query-parameters` CLI parameter | ||
- Per test with the `ignoreQueryParameters` property | ||
|
||
### Changed | ||
|
||
- Improve CLI documentation | ||
|
||
## v0.2.0 (2021-07-27) | ||
|
||
### Added | ||
|
||
- Add `--delay` CLI parameter | ||
- Add `--concurrency` CLI parameter | ||
|
||
### Fixed | ||
|
||
- Set minimum Node compatibility to 12 | ||
|
||
### Changed | ||
|
||
- Switch from CJS to ESM | ||
- Improve logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Install Node dependencies | ||
FROM node:20-alpine AS node_install | ||
|
||
WORKDIR /app | ||
COPY package.json . | ||
COPY package-lock.json . | ||
RUN npm install | ||
|
||
# Build cli tool | ||
FROM node:20-alpine AS node_builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
COPY --from=node_install /app/node_modules /app/node_modules | ||
RUN npm run build | ||
|
||
# Build mkcert | ||
FROM golang:alpine AS mkcert_builder | ||
|
||
RUN apk add --update git | ||
RUN cd \ | ||
&& git clone https://github.com/FiloSottile/mkcert \ | ||
&& cd mkcert \ | ||
&& go build -ldflags "-X main.Version=$(git describe --tags)" -o /usr/local/bin/mkcert | ||
|
||
# Final context | ||
FROM httpd:alpine | ||
RUN mkdir -p /app | ||
WORKDIR /app | ||
RUN echo "" > /app/index.html | ||
|
||
RUN apk add curl openssl | ||
|
||
COPY --from=node_builder /app/dist/test-redirection /usr/local/bin/test-redirection | ||
|
||
COPY ./docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
RUN chmod +x /usr/local/bin/docker-entrypoint | ||
|
||
COPY --from=mkcert_builder /usr/local/bin/mkcert /usr/local/bin/mkcert | ||
RUN mkcert -install | ||
|
||
ENV DOMAINS='test.dev' | ||
ENV DEBUG='false' | ||
|
||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.