From 0d1b8b90e1b3362e7d6a85f88f715abc70a9593c Mon Sep 17 00:00:00 2001 From: Arthur de Moulins Date: Thu, 23 Nov 2023 10:55:56 +0100 Subject: [PATCH] WIP --- databox/indexer/Dockerfile | 3 ++- databox/indexer/package.json | 6 +++--- databox/indexer/src/lib/axios.ts | 2 +- databox/indexer/yarn.lock | 36 +++++++++++++++++++++++--------- docker-compose.yml | 3 ++- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/databox/indexer/Dockerfile b/databox/indexer/Dockerfile index 9e07f65b1..1ebff28fc 100644 --- a/databox/indexer/Dockerfile +++ b/databox/indexer/Dockerfile @@ -10,7 +10,8 @@ ENV SERVER_PORT=3000 EXPOSE 3000 -COPY --chown=node:node . . +COPY --chown=node:node ./lib/js /lib/js +COPY --chown=node:node ./databox/indexer . RUN yarn install \ && yarn build diff --git a/databox/indexer/package.json b/databox/indexer/package.json index 20b925bb6..fca7fa0a5 100644 --- a/databox/indexer/package.json +++ b/databox/indexer/package.json @@ -22,17 +22,17 @@ "build": "rimraf ./dist && tsc", "start:dev": "nodemon", "test": "jest", - "postinstall": "cd ../../lib/js/auth && yarn install && yarn build-commonjs && rm -rf node_modules", + "postinstall": "cd ../../lib/js/auth && yarn install && yarn build-commonjs", "sync-databox-types": "generate-api-platform-client --generator typescript http://databox-api src/" }, "dependencies": { + "@alchemy/auth": "link:../../lib/js/auth", "amqplib": "^0.8.0", - "axios": "^0.24.0", + "axios": "1.2.1", "axios-retry": "^3.2.4", "chokidar": "^3.5.3", "commander": "^9.0.0", "express": "^4.17.1", - "@alchemy/auth": "link:../../lib/js/auth", "minio": "^7.0.26", "winston": "^3.5.1" } diff --git a/databox/indexer/src/lib/axios.ts b/databox/indexer/src/lib/axios.ts index a6885aa0d..e1b2ebc0f 100644 --- a/databox/indexer/src/lib/axios.ts +++ b/databox/indexer/src/lib/axios.ts @@ -58,7 +58,7 @@ export function createHttpClient({ (error: AxiosError) => { logger.error(error.message); if (error.response) { - let filtered = error.response.data; + let filtered: any = error.response.data; if (typeof filtered === 'object' && filtered.trace) { filtered = { diff --git a/databox/indexer/yarn.lock b/databox/indexer/yarn.lock index 649870d4b..db2de6131 100644 --- a/databox/indexer/yarn.lock +++ b/databox/indexer/yarn.lock @@ -636,12 +636,14 @@ axios-retry@^3.2.4: "@babel/runtime" "^7.15.4" is-retry-allowed "^2.2.0" -axios@^0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" - integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== +axios@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a" + integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A== dependencies: - follow-redirects "^1.14.4" + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" balanced-match@^1.0.0: version "1.0.2" @@ -1021,7 +1023,7 @@ colorspace@1.1.x: color "^3.1.3" text-hex "1.0.x" -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -1592,10 +1594,10 @@ fn.name@1.x.x: resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== -follow-redirects@^1.14.4: - version "1.14.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" - integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" @@ -1619,6 +1621,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -3069,6 +3080,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" diff --git a/docker-compose.yml b/docker-compose.yml index ea6540a4a..cbfe8b2aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -742,7 +742,8 @@ services: image: ${REGISTRY_NAMESPACE}databox-indexer:${DOCKER_TAG} command: [ "/bin/sh", "-c", "exit" ] build: - context: ./databox/indexer + context: ./ + dockerfile: ./databox/indexer/Dockerfile profiles: - indexer networks: