diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index 78915f5cec..d6c8767da0 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -265,7 +265,7 @@ jobs: with: push: false platforms: ${{ matrix.platform.arch }} - file: packages/${{ matrix.package }}/Dockerfile + file: packages/${{ matrix.package }}/Dockerfile.prod tags: ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}:${{ needs.version-generator.outputs.version }} outputs: type=docker,dest=/tmp/${{ github.sha }}-${{ matrix.package }}-${{ matrix.platform.name }}-${{ needs.version-generator.outputs.version }}.tar - name: Save docker image to cache diff --git a/localenv/README.md b/localenv/README.md index f88d8c6989..85175a1f8f 100644 --- a/localenv/README.md +++ b/localenv/README.md @@ -139,6 +139,47 @@ Note that you have to go through an additional "login" step by providing you IPv After stopping the script it is necessary to clear the environment using the command described in [Shutting down](#Shutting-down). This is necessary as on a new run of the scripts (with autopeering or not) the wallet address url will differ. +### Debugging + +Debuggers for the services are exposed on the following ports: + +| IP and Port | Services | +| -------------- | ------------------------- | +| 127.0.0.1:9229 | Cloud Nine Wallet Backend | +| 127.0.0.1:9230 | Cloud Nine Auth | +| 127.0.0.1:9231 | Happy Life Bank Backend | +| 127.0.0.1:9232 | Happy Life Bank Auth | + +#### With a chromium browser: + +- go to `chrome://inspect` +- Click "Configure" and add the IP addresses and ports detailed above +- start docker containers +- click "inspect" on the service you want to debug to open the chromium debugger + +You can either trigger the debugger by adding `debugger` statements in code and restarting, or by adding breakpoints directly in the chromium debugger after starting the docker containers. + +#### With VS Code: + +For debugging with VS Code, you can add this configuration to your `.vscode/launch.json`): + +```json +{ + "name": "Attach to docker (cloud-nine-backend)", + "type": "node", + "request": "attach", + "port": 9229, + "address": "localhost", + "localRoot": "${workspaceFolder}", + "remoteRoot": "/home/rafiki/", + "restart": true +}, +``` + +`localRoot` will vary depending on the location of `launch.json` relative to rafiki's root directory. + +For more ways to connect debuggers, see the Node docs for debugging: https://nodejs.org/en/learn/getting-started/debugging + ### Shutting down ``` diff --git a/localenv/cloud-nine-wallet/docker-compose.yml b/localenv/cloud-nine-wallet/docker-compose.yml index b76438b67e..b6fce79379 100644 --- a/localenv/cloud-nine-wallet/docker-compose.yml +++ b/localenv/cloud-nine-wallet/docker-compose.yml @@ -32,13 +32,19 @@ services: image: rafiki-backend build: context: ../.. - dockerfile: ./packages/backend/Dockerfile + dockerfile: ./packages/backend/Dockerfile.dev + volumes: + - type: bind + source: ../../packages/backend/src + target: /home/rafiki/packages/backend/src + read_only: true restart: always privileged: true ports: - '3000:80' - '3001:3001' - '3002:3002' + - "9229:9229" networks: - rafiki environment: @@ -73,13 +79,19 @@ services: image: rafiki-auth build: context: ../.. - dockerfile: ./packages/auth/Dockerfile + dockerfile: ./packages/auth/Dockerfile.dev + volumes: + - type: bind + source: ../../packages/auth/src + target: /home/rafiki/packages/auth/src + read_only: true restart: always networks: - rafiki ports: - '3003:3003' - '3006:3006' + - "9230:9229" environment: NODE_ENV: ${NODE_ENV:-development} TRUST_PROXY: ${TRUST_PROXY} @@ -112,7 +124,7 @@ services: image: rafiki-frontend build: context: ../.. - dockerfile: ./packages/frontend/devDockerfile + dockerfile: ./packages/frontend/Dockerfile.dev volumes: - type: bind source: ../../packages/frontend/app diff --git a/localenv/happy-life-bank/docker-compose.yml b/localenv/happy-life-bank/docker-compose.yml index cb18070d7d..f0bcf71e42 100644 --- a/localenv/happy-life-bank/docker-compose.yml +++ b/localenv/happy-life-bank/docker-compose.yml @@ -28,11 +28,17 @@ services: hostname: happy-life-bank-backend image: rafiki-backend pull_policy: never + volumes: + - type: bind + source: ../../packages/backend/src + target: /home/rafiki/packages/backend/src + read_only: true restart: always privileged: true ports: - "4000:80" - "4001:3001" + - '9231:9229' networks: - rafiki environment: @@ -64,11 +70,17 @@ services: image: rafiki-auth pull_policy: never restart: always + volumes: + - type: bind + source: ../../packages/auth/src + target: /home/rafiki/packages/auth/src + read_only: true networks: - rafiki ports: - '4003:3003' - '4006:3006' + - '9232:9229' environment: NODE_ENV: development AUTH_DATABASE_URL: postgresql://happy_life_bank_auth:happy_life_bank_auth@shared-database/happy_life_bank_auth diff --git a/packages/auth/Dockerfile.dev b/packages/auth/Dockerfile.dev new file mode 100644 index 0000000000..cb45a051ca --- /dev/null +++ b/packages/auth/Dockerfile.dev @@ -0,0 +1,24 @@ +FROM node:20-alpine3.18 + +WORKDIR /home/rafiki + +RUN corepack enable +RUN corepack prepare pnpm@8.7.4 --activate + +COPY pnpm-lock.yaml package.json pnpm-workspace.yaml .npmrc tsconfig.json tsconfig.build.json ./ + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ + pnpm fetch \ + | grep -v "cross-device link not permitted\|Falling back to copying packages from store" + +COPY . ./ + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ + pnpm install \ + --recursive \ + --offline \ + --frozen-lockfile + +RUN pnpm --filter auth build:deps + +CMD pnpm --filter auth dev \ No newline at end of file diff --git a/packages/auth/Dockerfile b/packages/auth/Dockerfile.prod similarity index 100% rename from packages/auth/Dockerfile rename to packages/auth/Dockerfile.prod diff --git a/packages/auth/package.json b/packages/auth/package.json index cff457d167..5656fa5506 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -18,7 +18,8 @@ "prepack": "pnpm build", "postinstall": "pnpm copy-op-schemas", "copy-op-schemas": "cp ./node_modules/@interledger/open-payments/dist/openapi/specs/auth-server.yaml ./node_modules/@interledger/open-payments/dist/openapi/specs/schemas.yaml ./src/openapi/specs/", - "copy-files": "cp src/graphql/schema.graphql dist/graphql/ && cp -r ./src/openapi ./dist/" + "copy-files": "cp src/graphql/schema.graphql dist/graphql/ && cp -r ./src/openapi ./dist/", + "dev": "ts-node-dev --inspect=0.0.0.0:9229 --respawn --transpile-only src/index.ts" }, "dependencies": { "@adonisjs/fold": "^8.2.0", @@ -47,6 +48,7 @@ "pg": "^8.11.3", "pino": "^8.19.0", "token-introspection": "workspace:*", + "ts-node-dev": "^2.0.0", "uuid": "^9.0.1" }, "devDependencies": { diff --git a/packages/auth/tsconfig.json b/packages/auth/tsconfig.json index 0296e159f5..707ef5cc80 100644 --- a/packages/auth/tsconfig.json +++ b/packages/auth/tsconfig.json @@ -6,5 +6,8 @@ "rootDir": "./src", "declaration": true }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "ts-node": { + "swc": true + } } diff --git a/packages/backend/Dockerfile.dev b/packages/backend/Dockerfile.dev new file mode 100644 index 0000000000..6dc2f2dba9 --- /dev/null +++ b/packages/backend/Dockerfile.dev @@ -0,0 +1,24 @@ +FROM node:20-alpine3.18 + +WORKDIR /home/rafiki + +RUN corepack enable +RUN corepack prepare pnpm@8.7.4 --activate + +COPY pnpm-lock.yaml package.json pnpm-workspace.yaml .npmrc tsconfig.json tsconfig.build.json ./ + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ + pnpm fetch \ + | grep -v "cross-device link not permitted\|Falling back to copying packages from store" + +COPY . ./ + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ + pnpm install \ + --recursive \ + --offline \ + --frozen-lockfile + +RUN pnpm --filter backend build:deps + +CMD pnpm --filter backend dev \ No newline at end of file diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile.prod similarity index 100% rename from packages/backend/Dockerfile rename to packages/backend/Dockerfile.prod diff --git a/packages/backend/package.json b/packages/backend/package.json index 3818b6a15c..4fa23be0a8 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -14,7 +14,8 @@ "copy-files": "cp src/graphql/schema.graphql dist/graphql/ && cp -r ./src/openapi ./dist/", "copy-op-schemas": "cp ./node_modules/@interledger/open-payments/dist/openapi/specs/schemas.yaml ./src/openapi/specs/", "prepack": "pnpm build", - "postinstall": "pnpm copy-op-schemas" + "postinstall": "pnpm copy-op-schemas", + "dev": "ts-node-dev --inspect=0.0.0.0:9229 --respawn --transpile-only src/index.ts" }, "devDependencies": { "@apollo/client": "^3.9.9", @@ -42,7 +43,8 @@ "react": "~18.2.0", "rosie": "^2.1.1", "testcontainers": "^10.7.2", - "tmp": "^0.2.3" + "tmp": "^0.2.3", + "ts-node-dev": "^2.0.0" }, "dependencies": { "@adonisjs/fold": "^8.2.0", diff --git a/packages/backend/tsconfig.json b/packages/backend/tsconfig.json index a980bcb4f4..0ea2a8b22f 100644 --- a/packages/backend/tsconfig.json +++ b/packages/backend/tsconfig.json @@ -5,5 +5,8 @@ "outDir": "./dist", "rootDir": "./src" }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "ts-node": { + "swc": true + } } diff --git a/packages/documentation/src/content/docs/playground/overview.md b/packages/documentation/src/content/docs/playground/overview.md index f3c8356161..02d05c108d 100644 --- a/packages/documentation/src/content/docs/playground/overview.md +++ b/packages/documentation/src/content/docs/playground/overview.md @@ -114,6 +114,47 @@ The secondary Happy Life Bank docker compose file (`./happy-life-bank/docker-com data stores created by the primary Rafiki instance so it can't be run by itself. The `pnpm localenv:compose up` command starts both the primary instance and the secondary. +### Debugging + +Debuggers for the services are exposed on the following ports: + +| IP and Port | Services | +| -------------- | ----------------------- | +| 127.0.0.1:9229 | Cloud Nine Backend | +| 127.0.0.1:9230 | Cloud Nine Auth | +| 127.0.0.1:9231 | Happy Life Bank Backend | +| 127.0.0.1:9232 | Happy Life Bank Auth | + +#### With a chromium browser: + +- go to `chrome://inspect` +- Click "Configure" and add the IP addresses and ports detailed above +- start docker containers +- click "inspect" on the service you want to debug to open the chromium debugger + +You can either trigger the debugger by adding `debugger` statements in code and restarting, or by adding breakpoints directly in the chromium debugger after starting the docker containers. + +#### With Vscode: + +For debugging with Vscode, you can add this configuration to your `.vscode/launch.json`): + +```json +{ + "name": "Attach to docker (cloud-nine-backend)", + "type": "node", + "request": "attach", + "port": 9229, + "address": "localhost", + "localRoot": "${workspaceFolder}", + "remoteRoot": "/home/rafiki/", + "restart": true +}, +``` + +`localRoot` will vary depending on the location of `launch.json` relative to rafiki's root directory. + +For more ways to connect debuggers, see the Node docs for debugging: https://nodejs.org/en/learn/getting-started/debugging + ### Shutting down ``` diff --git a/packages/frontend/devDockerfile b/packages/frontend/Dockerfile.dev similarity index 100% rename from packages/frontend/devDockerfile rename to packages/frontend/Dockerfile.dev diff --git a/packages/frontend/Dockerfile b/packages/frontend/Dockerfile.prod similarity index 100% rename from packages/frontend/Dockerfile rename to packages/frontend/Dockerfile.prod diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 715f4d51ea..dd0f371ba9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,6 +198,9 @@ importers: token-introspection: specifier: workspace:* version: link:../token-introspection + ts-node-dev: + specifier: ^2.0.0 + version: 2.0.0(@swc/core@1.4.8)(@types/node@18.19.29)(typescript@5.4.3) uuid: specifier: ^9.0.1 version: 9.0.1 @@ -479,6 +482,9 @@ importers: tmp: specifier: ^0.2.3 version: 0.2.3 + ts-node-dev: + specifier: ^2.0.0 + version: 2.0.0(@swc/core@1.4.8)(@types/node@18.19.29)(typescript@5.4.3) packages/documentation: dependencies: @@ -2298,6 +2304,12 @@ packages: resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} dev: false + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + /@ctrl/tinycolor@4.1.0: resolution: {integrity: sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ==} engines: {node: '>=14'} @@ -4562,7 +4574,7 @@ packages: resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jridgewell/trace-mapping': 0.3.23 + '@jridgewell/trace-mapping': 0.3.25 callsites: 3.1.0 graceful-fs: 4.2.11 dev: true @@ -4704,6 +4716,12 @@ packages: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + /@jsdevtools/ono@7.1.3: resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} @@ -4914,7 +4932,7 @@ packages: resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.4 + semver: 7.6.0 dev: true /@npmcli/git@4.1.0: @@ -4927,7 +4945,7 @@ packages: proc-log: 3.0.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.5.4 + semver: 7.6.0 which: 3.0.1 transitivePeerDependencies: - bluebird @@ -4943,7 +4961,7 @@ packages: json-parse-even-better-errors: 3.0.1 normalize-package-data: 5.0.0 proc-log: 3.0.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - bluebird dev: true @@ -5784,7 +5802,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-darwin-x64@1.4.8: @@ -5793,7 +5810,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm-gnueabihf@1.4.8: @@ -5802,7 +5818,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-gnu@1.4.8: @@ -5811,7 +5826,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-musl@1.4.8: @@ -5820,7 +5834,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-gnu@1.4.8: @@ -5829,7 +5842,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-musl@1.4.8: @@ -5838,7 +5850,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-win32-arm64-msvc@1.4.8: @@ -5847,7 +5858,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-ia32-msvc@1.4.8: @@ -5856,7 +5866,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-x64-msvc@1.4.8: @@ -5865,7 +5874,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core@1.4.8: @@ -5891,11 +5899,9 @@ packages: '@swc/core-win32-arm64-msvc': 1.4.8 '@swc/core-win32-ia32-msvc': 1.4.8 '@swc/core-win32-x64-msvc': 1.4.8 - dev: true /@swc/counter@0.1.3: resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - dev: true /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} @@ -5917,7 +5923,6 @@ packages: /@swc/types@0.1.5: resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} - dev: true /@tailwindcss/forms@0.5.7(tailwindcss@3.4.1): resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==} @@ -5957,6 +5962,18 @@ packages: pretty-format: 27.5.1 dev: true + /@tsconfig/node10@1.0.11: + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + /@types/accepts@1.3.5: resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==} dependencies: @@ -6401,6 +6418,12 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true + /@types/strip-bom@3.0.0: + resolution: {integrity: sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==} + + /@types/strip-json-comments@0.0.30: + resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==} + /@types/superagent@4.1.15: resolution: {integrity: sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ==} dependencies: @@ -6471,7 +6494,7 @@ packages: grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 - semver: 7.5.4 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: @@ -6641,7 +6664,7 @@ packages: debug: 4.3.4(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: @@ -6662,7 +6685,7 @@ packages: debug: 4.3.4(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: @@ -6684,7 +6707,7 @@ packages: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.0.1(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: @@ -6705,7 +6728,7 @@ packages: '@typescript-eslint/typescript-estree': 5.60.1(typescript@5.4.3) eslint: 8.57.0 eslint-scope: 5.1.1 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -6725,7 +6748,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.3) eslint: 8.57.0 eslint-scope: 5.1.1 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -6744,7 +6767,7 @@ packages: '@typescript-eslint/types': 7.5.0 '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) eslint: 8.57.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -6974,7 +6997,10 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.11.3 - dev: false + + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} @@ -6986,7 +7012,6 @@ packages: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true - dev: false /agent-base@7.1.0: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} @@ -7121,6 +7146,9 @@ packages: zip-stream: 4.1.0 dev: true + /arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -7623,7 +7651,6 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true /bare-events@2.2.0: resolution: {integrity: sha512-Yyyqff4PIFfSuthCZqLlPISTWHmnQxoPuAvkmgzsJEmG3CesdIv6Xweayl0JkCZJSB2yYIdJyEz97tpxNhgjbg==} @@ -7769,7 +7796,6 @@ packages: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - dev: true /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} @@ -7833,7 +7859,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.4 + semver: 7.6.0 dev: true /busboy@1.6.0: @@ -8043,7 +8069,6 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 - dev: false /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -8308,7 +8333,6 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true /constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -8442,6 +8466,9 @@ packages: - ts-node dev: true + /create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + /cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} dependencies: @@ -9050,6 +9077,10 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + /diff@5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} @@ -9153,6 +9184,11 @@ packages: stream-shift: 1.0.1 dev: true + /dynamic-dedupe@0.3.0: + resolution: {integrity: sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==} + dependencies: + xtend: 4.0.2 + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -9552,7 +9588,7 @@ packages: dependencies: debug: 3.2.7 is-core-module: 2.13.0 - resolve: 1.22.6 + resolve: 1.22.8 transitivePeerDependencies: - supports-color dev: true @@ -9646,7 +9682,7 @@ packages: is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.1.6 - resolve: 1.22.6 + resolve: 1.22.8 semver: 6.3.1 tsconfig-paths: 3.14.1 transitivePeerDependencies: @@ -9725,7 +9761,7 @@ packages: eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 - resolve: 1.22.6 + resolve: 1.22.8 semver: 6.3.1 dev: true @@ -10475,7 +10511,6 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -10638,7 +10673,6 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -11400,7 +11434,6 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -11930,7 +11963,7 @@ packages: '@babel/parser': 7.23.9 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true @@ -12277,7 +12310,7 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) jest-util: 29.7.0 jest-validate: 29.7.0 - resolve: 1.22.6 + resolve: 1.22.8 resolve.exports: 2.0.2 slash: 3.0.0 dev: true @@ -12364,7 +12397,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true @@ -13039,6 +13072,9 @@ packages: semver: 6.3.1 dev: true + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} dependencies: @@ -13745,8 +13781,8 @@ packages: /micromark-extension-mdxjs@1.0.0: resolution: {integrity: sha512-TZZRZgeHvtgm+IhtgC2+uDMR7h8eTKF0QUX9YsgoL9+bADBpBY6SiLvWqnBlLbCEevITmTqmEuY3FoxMKVs1rQ==} dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) micromark-extension-mdx-expression: 1.0.3 micromark-extension-mdx-jsx: 1.0.3 micromark-extension-mdx-md: 1.0.0 @@ -14148,7 +14184,6 @@ packages: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 - dev: true /minimatch@4.2.3: resolution: {integrity: sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==} @@ -14231,7 +14266,6 @@ packages: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true - dev: true /mlly@1.2.0: resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==} @@ -14447,7 +14481,7 @@ packages: dependencies: hosted-git-info: 6.1.1 is-core-module: 2.13.0 - semver: 7.5.4 + semver: 7.6.0 validate-npm-package-license: 3.0.4 dev: true @@ -14474,7 +14508,7 @@ packages: resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.4 + semver: 7.6.0 dev: true /npm-normalize-package-bin@3.0.1: @@ -14488,7 +14522,7 @@ packages: dependencies: hosted-git-info: 6.1.1 proc-log: 3.0.0 - semver: 7.5.4 + semver: 7.6.0 validate-npm-package-name: 5.0.0 dev: true @@ -14499,7 +14533,7 @@ packages: npm-install-checks: 6.3.0 npm-normalize-package-bin: 3.0.1 npm-package-arg: 10.1.0 - semver: 7.5.4 + semver: 7.6.0 dev: true /npm-run-all2@6.1.2: @@ -15015,7 +15049,6 @@ packages: /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - dev: true /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} @@ -15271,7 +15304,7 @@ packages: postcss: 8.4.38 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.6 + resolve: 1.22.8 dev: true /postcss-js@4.0.1(postcss@8.4.38): @@ -16194,7 +16227,6 @@ packages: is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: false /resolve@2.0.0-next.5: resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} @@ -16278,6 +16310,12 @@ packages: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true + /rimraf@2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.3 + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -16461,7 +16499,6 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 - dev: false /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} @@ -17008,6 +17045,10 @@ packages: engines: {node: '>=12'} dev: false + /strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -17385,6 +17426,10 @@ packages: punycode: 2.3.1 dev: false + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + /trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -17422,6 +17467,64 @@ packages: /ts-log@2.2.5: resolution: {integrity: sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==} + /ts-node-dev@2.0.0(@swc/core@1.4.8)(@types/node@18.19.29)(typescript@5.4.3): + resolution: {integrity: sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==} + engines: {node: '>=0.8.0'} + hasBin: true + peerDependencies: + node-notifier: '*' + typescript: '*' + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + chokidar: 3.6.0 + dynamic-dedupe: 0.3.0 + minimist: 1.2.8 + mkdirp: 1.0.4 + resolve: 1.22.8 + rimraf: 2.7.1 + source-map-support: 0.5.21 + tree-kill: 1.2.2 + ts-node: 10.9.2(@swc/core@1.4.8)(@types/node@18.19.29)(typescript@5.4.3) + tsconfig: 7.0.0 + typescript: 5.4.3 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - '@types/node' + + /ts-node@10.9.2(@swc/core@1.4.8)(@types/node@18.19.29)(typescript@5.4.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.4.8 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.19.29 + acorn: 8.11.3 + acorn-walk: 8.3.2 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.4.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + /tsconfck@3.0.3(typescript@5.4.3): resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==} engines: {node: ^18 || >=20} @@ -17440,7 +17543,7 @@ packages: dependencies: '@types/json5': 0.0.29 json5: 1.0.1 - minimist: 1.2.6 + minimist: 1.2.8 strip-bom: 3.0.0 dev: true @@ -17453,6 +17556,14 @@ packages: strip-bom: 3.0.0 dev: true + /tsconfig@7.0.0: + resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} + dependencies: + '@types/strip-bom': 3.0.0 + '@types/strip-json-comments': 0.0.30 + strip-bom: 3.0.0 + strip-json-comments: 2.0.1 + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -17913,11 +18024,14 @@ packages: kleur: 4.1.5 sade: 1.8.1 + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + /v8-to-istanbul@9.0.1: resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.23 + '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.8.0 dev: true @@ -18560,6 +18674,10 @@ packages: resolution: {integrity: sha512-RXRJzMiK6U2ye0BlGGZnmpwJDPgakn6aNQ0A7gHRbD4I0uvK4TW6UqkK1V0pp9jskjJBAXd3dRrbzWkqJ+6cxA==} engines: {node: '>= 4.0.0'} + /yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} diff --git a/test/integration/testenv/cloud-nine-wallet/docker-compose.yml b/test/integration/testenv/cloud-nine-wallet/docker-compose.yml index 3c10c11d92..48a74c34ec 100644 --- a/test/integration/testenv/cloud-nine-wallet/docker-compose.yml +++ b/test/integration/testenv/cloud-nine-wallet/docker-compose.yml @@ -5,13 +5,14 @@ services: image: rafiki-backend build: context: ../../../.. - dockerfile: ./packages/backend/Dockerfile + dockerfile: ./packages/backend/Dockerfile.prod restart: always privileged: true ports: - '3100:3100' - '3101:3101' - '3102:3102' + - '9229:9229' networks: - rafiki-test extra_hosts: @@ -45,7 +46,7 @@ services: image: rafiki-auth build: context: ../../../.. - dockerfile: ./packages/auth/Dockerfile + dockerfile: ./packages/auth/Dockerfile.prod restart: always networks: - rafiki-test