Skip to content

Commit

Permalink
feat: bump dependencies (#95)
Browse files Browse the repository at this point in the history
Upgraded Web SDK to 1021, reduced microservice size by not shipping npm/yarn in build and bump further dependencies
  • Loading branch information
reey authored Nov 25, 2024
1 parent 1cb69eb commit abef6fc
Show file tree
Hide file tree
Showing 18 changed files with 6,499 additions and 4,576 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
name: Main CI

env:
NODE_VERSION: "18"
NODE_VERSION: "20"

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:

env:
NODE_VERSION: ${{ '18' }}
NODE_VERSION: ${{ '20' }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -32,9 +32,9 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install Dependencies
- name: Install Node.js dependencies
run: |
npm i -g @semantic-release/changelog@^6.0.3 @semantic-release/exec@^6.0.3 @semantic-release/git@^10.0.1 semantic-release@^20.1.0
yarn install --frozen-lockfile --immutable --non-interactive --prefer-offline
- name: Release
env:
Expand Down
72 changes: 36 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,125 @@
# [2.8.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.7.0...v2.8.0) (2024-04-15)
# [2.8.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.7.0...v2.8.0) (2024-04-15)


### Features

* **frontend:** add support for sub paths ([#67](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/issues/67)) ([b0c7090](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/b0c70906a8a0f21b68bfe82fc583b990779c1d90))
* **frontend:** add support for sub paths ([#67](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/issues/67)) ([b0c7090](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/b0c70906a8a0f21b68bfe82fc583b990779c1d90))

# [2.7.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.6.0...v2.7.0) (2024-04-15)
# [2.7.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.6.0...v2.7.0) (2024-04-15)


### Features

* **frontend:** unlock passthrough feature even on environments where passthrough option is not set ([66c5214](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/66c52147982fa1ff167794ea32a7c389a533ee61))
* **frontend:** unlock passthrough feature even on environments where passthrough option is not set ([66c5214](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/66c52147982fa1ff167794ea32a7c389a533ee61))

# [2.6.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.5.0...v2.6.0) (2024-04-10)
# [2.6.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.5.0...v2.6.0) (2024-04-10)


### Features

* **frontend:** add UI dialog to configure http headers that will be added by the microserivce to requests going to the http servers ([f2ad509](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/f2ad509943f1129065aaafddd1eb7a925dbaf3d6))
* **frontend:** add UI dialog to configure http headers that will be added by the microserivce to requests going to the http servers ([f2ad509](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/f2ad509943f1129065aaafddd1eb7a925dbaf3d6))

# [2.5.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.3...v2.5.0) (2024-04-03)
# [2.5.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.3...v2.5.0) (2024-04-03)


### Features

* **microservice:** add support for dealing with cookies as a preparation for allowing to login into a c8y edge instance ([b789902](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/b78990293859481ea00cd93e7c1c03fd15aa943b))
* **microservice:** add support for dealing with cookies as a preparation for allowing to login into a c8y edge instance ([b789902](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/b78990293859481ea00cd93e7c1c03fd15aa943b))

## [2.4.3](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.2...v2.4.3) (2024-04-03)
## [2.4.3](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.2...v2.4.3) (2024-04-03)


### Bug Fixes

* **microservice:** disable timeouts as otherwise websocket connections were closed after ~60-90 seconds ([66b38d5](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/66b38d57ddb777549c5233fa566e8dba67cafd0b))
* **microservice:** disable timeouts as otherwise websocket connections were closed after ~60-90 seconds ([66b38d5](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/66b38d57ddb777549c5233fa566e8dba67cafd0b))

## [2.4.2](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.1...v2.4.2) (2024-03-22)
## [2.4.2](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.1...v2.4.2) (2024-03-22)


### Bug Fixes

* **microservice:** allow forwarding auth header if cookie for auth is also present ([97d66b9](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/97d66b9766d8cd4314502757155b55782d867f9f))
* **microservice:** allow forwarding auth header if cookie for auth is also present ([97d66b9](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/97d66b9766d8cd4314502757155b55782d867f9f))

## [2.4.1](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.0...v2.4.1) (2024-03-22)
## [2.4.1](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.4.0...v2.4.1) (2024-03-22)


### Bug Fixes

* **microservice:** prefer `authorization` cookie over bearer token in `authorization` header when trying to extract user and tenant information ([5b4058b](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/5b4058bda3b4bc186118f09e99d58d9ed5496bde))
* **microservice:** prefer `authorization` cookie over bearer token in `authorization` header when trying to extract user and tenant information ([5b4058b](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/5b4058bda3b4bc186118f09e99d58d9ed5496bde))

# [2.4.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.3...v2.4.0) (2024-03-21)
# [2.4.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.3...v2.4.0) (2024-03-21)


### Bug Fixes

* **Microservice:** enhance logging in error cases ([9357174](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/93571749c1c4dfc0b0c49f1371a43ab576bea65a))
* **Plugin:** add hint on console in case microservice was not found ([d7d0960](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/d7d0960d3f8df7a62d55725ce84d2a2c0849f91c))
* **Microservice:** enhance logging in error cases ([9357174](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/93571749c1c4dfc0b0c49f1371a43ab576bea65a))
* **Plugin:** add hint on console in case microservice was not found ([d7d0960](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/d7d0960d3f8df7a62d55725ce84d2a2c0849f91c))


### Features

* **microservice:** add custom user-agent header ([#45](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/issues/45)) ([52278e6](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/52278e63f813af1d776c43e0a99feb528f3f654d))
* **microservice:** add custom user-agent header ([#45](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/issues/45)) ([52278e6](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/52278e63f813af1d776c43e0a99feb528f3f654d))

## [2.3.3](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.2...v2.3.3) (2024-03-21)
## [2.3.3](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.2...v2.3.3) (2024-03-21)


### Bug Fixes

* **Plugin:** allow tabs to show up even if `pass-through.enabled` system option is not set ([ca4960b](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/ca4960b029d0af30adb9df1ab6dd9bb3c4842f46))
* **Plugin:** allow tabs to show up even if `pass-through.enabled` system option is not set ([ca4960b](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/ca4960b029d0af30adb9df1ab6dd9bb3c4842f46))

## [2.3.2](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.1...v2.3.2) (2024-03-05)
## [2.3.2](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.1...v2.3.2) (2024-03-05)


### Bug Fixes

* add gainsight events for tracking ([12b58d7](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/12b58d7b01899f9bcfb350044618fcf9dff5a893))
* make gainsight service optional ([645571f](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/645571f14c21321bf404699b5f7bee2228f10cb0))
* add gainsight events for tracking ([12b58d7](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/12b58d7b01899f9bcfb350044618fcf9dff5a893))
* make gainsight service optional ([645571f](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/645571f14c21321bf404699b5f7bee2228f10cb0))

## [2.3.1](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.0...v2.3.1) (2024-03-04)
## [2.3.1](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.3.0...v2.3.1) (2024-03-04)


### Bug Fixes

* add https statistics to logging and return details on health endpoint ([4f4199d](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/4f4199dd70bc01c0920c48b142a126479ca8018d))
* add https statistics to logging and return details on health endpoint ([4f4199d](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/4f4199dd70bc01c0920c48b142a126479ca8018d))

# [2.3.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.2.1...v2.3.0) (2024-03-04)
# [2.3.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.2.1...v2.3.0) (2024-03-04)


### Features

* add support for connections to https servers ([e55e308](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/e55e3081be42711c1551c0b5777e4752aa1b7f57))
* add support for connections to https servers ([e55e308](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/e55e3081be42711c1551c0b5777e4752aa1b7f57))

## [2.2.1](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.2.0...v2.2.1) (2024-02-04)
## [2.2.1](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.2.0...v2.2.1) (2024-02-04)


### Bug Fixes

* remove hint that only one session is possible at the same time ([744a0a3](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/744a0a394d55064cf027e513f96e3f809cf8b18d))
* remove hint that only one session is possible at the same time ([744a0a3](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/744a0a394d55064cf027e513f96e3f809cf8b18d))

# [2.2.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.1.0...v2.2.0) (2024-02-04)
# [2.2.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.1.0...v2.2.0) (2024-02-04)


### Features

* added socket pool which allows to reuse previously established connections. ([b44bc9b](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/b44bc9b2c924a07759783e2dabf6d6f95f45c975))
* added socket pool which allows to reuse previously established connections. ([b44bc9b](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/b44bc9b2c924a07759783e2dabf6d6f95f45c975))

# [2.1.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v2.0.0...v2.1.0) (2024-02-01)
# [2.1.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v2.0.0...v2.1.0) (2024-02-01)


### Features

* allow adding custom authorization headers per config to every request ([d06aba7](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/d06aba7ea6fb643b4eb8f54c7eaa0ec1e8d3e9db))
* allow adding custom authorization headers per config to every request ([d06aba7](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/d06aba7ea6fb643b4eb8f54c7eaa0ec1e8d3e9db))

# [2.0.0](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v1.0.5...v2.0.0) (2024-01-31)
# [2.0.0](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v1.0.5...v2.0.0) (2024-01-31)


### Features

* add proper http server via express to handle every request individually instead of per socket ([#2](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/issues/2)) ([8123bb2](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/commit/8123bb2591941ae06cf691d3afe4a21da757d6b8))
* add proper http server via express to handle every request individually instead of per socket ([#2](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/issues/2)) ([8123bb2](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/commit/8123bb2591941ae06cf691d3afe4a21da757d6b8))


### BREAKING CHANGES

* The device and config id for the remote access connect session are now provided as parameters in the path instead of cookies. This allows to have multiple sessions in parallel from the same browser. Please update both the UI plugin and the microservice.

## [1.0.5](https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/compare/v1.0.4...v1.0.5) (2024-01-29)
## [1.0.5](https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/compare/v1.0.4...v1.0.5) (2024-01-29)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This functionality is heavily relying on the [Cloud Remote Access feature of Cum

- The web server you are trying to access must be compatible with being served behind a reverse proxy with another path (which is in this case: `/service/cloud-http-proxy/<deviceId>/<remoteAccessConnectConfigId>/`). This might be something you can configure as part of your application, but not all applications support this.

In case you are reaching the limits of this tool, you can also give [remote-access-local-proxy](https://github.com/SoftwareAG/cumulocity-remote-access-local-proxy) a try. This requires an application be to executed locally, but is not limited to just the HTTP protocol.
In case you are reaching the limits of this tool, you can also give [remote-access-local-proxy](https://github.com/Cumulocity-IoT/cumulocity-remote-access-local-proxy) a try. This requires an application be to executed locally, but is not limited to just the HTTP protocol.

## Microservice

Expand Down
27 changes: 20 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
FROM node:18.20.3-alpine As development

FROM alpine:3.20.3 AS nodejs

# Install nodejs
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache nodejs

FROM nodejs AS nodejs-and-npm

# Install npm & yarn
RUN apk add --no-cache npm yarn

FROM nodejs-and-npm AS development

WORKDIR /usr/src/app

Expand All @@ -9,7 +22,7 @@ RUN yarn install --frozen-lockfile --immutable --non-interactive --prefer-offlin

USER node

FROM node:18.20.3-alpine As build
FROM nodejs-and-npm AS build

WORKDIR /usr/src/app

Expand All @@ -21,12 +34,12 @@ RUN yarn run build

USER node

FROM node:18.20.3-alpine As productionDeps
FROM nodejs-and-npm AS production-deps

WORKDIR /usr/src/app

ENV NODE_ENV production
ENV NO_COLOR true
ENV NODE_ENV=production
ENV NO_COLOR=true

COPY --chown=node:node backend/package.json ./
COPY --chown=node:node yarn.lock ./
Expand All @@ -35,10 +48,10 @@ RUN yarn install --frozen-lockfile --immutable --non-interactive --prefer-offlin

USER node

FROM node:18.20.3-alpine As production
FROM nodejs AS production

# Copy the bundled code from the build stage to the production image
COPY --chown=node:node --from=productionDeps /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=production-deps /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/dist ./dist

CMD [ "node", "dist/src/index.js" ]
Expand Down
4 changes: 2 additions & 2 deletions backend/cumulocity.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "2.8.0",
"provider": {
"name": "Tristan Bastian",
"domain": "https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy",
"support": "https://github.com/SoftwareAG/cumulocity-remote-access-cloud-http-proxy/issues"
"domain": "https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy",
"support": "https://github.com/Cumulocity-IoT/cumulocity-remote-access-cloud-http-proxy/issues"
},
"isolation": "MULTI_TENANT",
"roles": [],
Expand Down
25 changes: 12 additions & 13 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@
"author": "Tristan Bastian",
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "^4.17.21",
"@types/http-proxy": "^1.17.14",
"@types/uuid": "^9.0.7",
"@types/ws": "^8.5.10",
"@types/express": "^5.0.0",
"@types/http-proxy": "^1.17.15",
"@types/ws": "^8.5.13",
"ts-node": "^10.9.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3"
"tsx": "^4.19.2",
"typescript": "~5.5.2"
},
"dependencies": {
"@c8y/client": "^1019.21.1",
"@c8y/client": "1021.3.1",
"agentkeepalive": "^4.5.0",
"cookie-parse": "^0.4.0",
"cron": "^3.1.6",
"cron": "^3.2.1",
"dotenv": "^16.4.5",
"express": "^4.18.3",
"express": "^4.21.1",
"http-proxy": "^1.18.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1",
"winston": "^3.12.0",
"ws": "^8.17.1"
"tslib": "^2.8.1",
"uuid": "^11.0.3",
"winston": "^3.17.0",
"ws": "^8.18.0"
}
}
1 change: 1 addition & 0 deletions frontend/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ trim_trailing_whitespace = true

[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false

[*.md]
max_line_length = off
Expand Down
32 changes: 24 additions & 8 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,16 @@
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "less",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.less"],
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@c8y/style/main.less",
"src/styles.less"
],
"scripts": [],
"aot": false,
"allowedCommonJsDependencies": [
Expand All @@ -64,13 +72,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all",
Expand Down Expand Up @@ -108,8 +116,16 @@
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "less",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.less"],
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@c8y/style/main.less",
"src/styles.less"
],
"scripts": []
}
},
Expand Down
Loading

0 comments on commit abef6fc

Please sign in to comment.