From e78c981a3bfab9d00d28968eff73886dba2db252 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 20 Mar 2025 15:24:36 +0200 Subject: [PATCH 01/32] add compute test file --- test/compute.test.ts | 105 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 test/compute.test.ts diff --git a/test/compute.test.ts b/test/compute.test.ts new file mode 100644 index 0000000..1a32a5c --- /dev/null +++ b/test/compute.test.ts @@ -0,0 +1,105 @@ +import { expect } from "chai"; +import { exec } from "child_process"; +import path from "path"; +import fs from "fs"; +import util from "util"; + +const execPromise = util.promisify(exec); + +describe("Ocean CLI Compute Flow", function () { + this.timeout(300000); // 5 min timeout + + const projectRoot = path.resolve(__dirname, ".."); + + let computeDatasetDid: string; + let algoDid: string; + const computeEnvId: string = "1"; + let jobId: string; + + const runCommand = async (command: string): Promise => { + console.log(`\n[CMD]: ${command}`); + try { + const { stdout } = await execPromise(command, { cwd: projectRoot }); + console.log(`[OUTPUT]:\n${stdout}`); + return stdout; + } catch (error: any) { + console.error(`[ERROR]:\n${error.stderr || error.message}`); + throw error; + } + }; + + before(async () => { + process.env.PRIVATE_KEY = "0xYOUR_PRIVATE_KEY"; + process.env.RPC = "http://127.0.0.1:8545"; + process.env.AQUARIUS_URL = "http://127.0.0.1:5000"; + process.env.PROVIDER_URL = "http://127.0.0.1:8030"; + }); + + it("should publish a compute dataset", async () => { + const metadataFile = path.resolve( + projectRoot, + "metadata/simpleComputeDataset.json" + ); + + if (!fs.existsSync(metadataFile)) { + throw new Error(`Metadata file not found: ${metadataFile}`); + } + + const output = await runCommand(`npm run cli publish ${metadataFile}`); + + const didMatch = output.match(/did:op:[a-f0-9]{64}/); + expect(didMatch, "No DID found in output").to.not.be.null; + + computeDatasetDid = didMatch![0]; + console.log(`Published Compute Dataset DID: ${computeDatasetDid}`); + }); + + it("should publish an algorithm", async () => { + const algoFile = path.resolve(projectRoot, "metadata/jsAlgo.json"); + + if (!fs.existsSync(algoFile)) { + throw new Error(`Algorithm metadata file not found: ${algoFile}`); + } + + const output = await runCommand(`npm run cli publishAlgo ${algoFile}`); + + const didMatch = output.match(/did:op:[a-f0-9]{64}/); + expect(didMatch, "No DID found in output").to.not.be.null; + + algoDid = didMatch![0]; + console.log(`Published Algorithm DID: ${algoDid}`); + }); + + it("should start a compute job", async () => { + const output = await runCommand( + `npm run cli startCompute -- --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` + ); + + const jobIdMatch = output.match( + /Job started successfully with ID: ([a-f0-9-]+)/i + ); + expect(jobIdMatch, "No Job ID found in output").to.not.be.null; + + jobId = jobIdMatch![1]; + console.log(`Started Compute Job ID: ${jobId}`); + }); + + it("should get the job status", async () => { + const output = await runCommand( + `npm run cli getJobStatus -- --dataset ${computeDatasetDid} --job ${jobId}` + ); + + expect(output).to.contain(jobId); + expect(output).to.match(/status/i); + console.log(`Job status output received for jobId: ${jobId}`); + }); + + it("should stop the compute job", async () => { + const output = await runCommand( + `npm run cli stopCompute -- --dataset ${computeDatasetDid} --job ${jobId}` + ); + + expect(output).to.contain("Compute job stopped successfully"); + console.log(`Stopped Compute Job ID: ${jobId}`); + }); +}); From edfcc35a76d5b4981e84563790d88717bee94d15 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 20 Mar 2025 15:28:31 +0200 Subject: [PATCH 02/32] update compute commands --- test/compute.test.ts | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 1a32a5c..6e51a69 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -6,14 +6,14 @@ import util from "util"; const execPromise = util.promisify(exec); -describe("Ocean CLI Compute Flow", function () { - this.timeout(300000); // 5 min timeout +describe("Ocean CLI Free Compute Flow", function () { + this.timeout(300000); const projectRoot = path.resolve(__dirname, ".."); let computeDatasetDid: string; let algoDid: string; - const computeEnvId: string = "1"; + let computeEnvId: string; let jobId: string; const runCommand = async (command: string): Promise => { @@ -70,9 +70,22 @@ describe("Ocean CLI Compute Flow", function () { console.log(`Published Algorithm DID: ${algoDid}`); }); - it("should start a compute job", async () => { + it("should get compute environments", async () => { + const output = await runCommand(`npm run cli getComputeEnvironments`); + + expect(output).to.contain("id"); + + const envMatch = output.match(/id: (0x[a-fA-F0-9]+)/); + if (!envMatch) + throw new Error("No environment ID found in environments output"); + + computeEnvId = envMatch[1]; + console.log(`Fetched Compute Env ID: ${computeEnvId}`); + }); + + it("should start a free compute job", async () => { const output = await runCommand( - `npm run cli startCompute -- --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` + `npm run cli startFreeCompute -- --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` ); const jobIdMatch = output.match( @@ -81,17 +94,26 @@ describe("Ocean CLI Compute Flow", function () { expect(jobIdMatch, "No Job ID found in output").to.not.be.null; jobId = jobIdMatch![1]; - console.log(`Started Compute Job ID: ${jobId}`); + console.log(`Started Free Compute Job ID: ${jobId}`); }); - it("should get the job status", async () => { + it("should get job status", async () => { const output = await runCommand( `npm run cli getJobStatus -- --dataset ${computeDatasetDid} --job ${jobId}` ); expect(output).to.contain(jobId); - expect(output).to.match(/status/i); - console.log(`Job status output received for jobId: ${jobId}`); + expect(output.toLowerCase()).to.match(/status/); + console.log(`Job status retrieved for jobId: ${jobId}`); + }); + + it("should fetch streamable logs", async () => { + const output = await runCommand( + `npm run cli computeStreamableLogs -- --job ${jobId}` + ); + + expect(output).to.contain(jobId); + console.log(`Streamable logs retrieved for jobId: ${jobId}`); }); it("should stop the compute job", async () => { @@ -100,6 +122,6 @@ describe("Ocean CLI Compute Flow", function () { ); expect(output).to.contain("Compute job stopped successfully"); - console.log(`Stopped Compute Job ID: ${jobId}`); + console.log(`Stopped compute job with ID: ${jobId}`); }); }); From d96c84112bb6a2f098bd69b71a7885e9653acba2 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 20 Mar 2025 15:31:07 +0200 Subject: [PATCH 03/32] update key --- test/compute.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 6e51a69..063acd2 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -29,7 +29,8 @@ describe("Ocean CLI Free Compute Flow", function () { }; before(async () => { - process.env.PRIVATE_KEY = "0xYOUR_PRIVATE_KEY"; + process.env.PRIVATE_KEY = + "0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc"; process.env.RPC = "http://127.0.0.1:8545"; process.env.AQUARIUS_URL = "http://127.0.0.1:5000"; process.env.PROVIDER_URL = "http://127.0.0.1:8030"; From 238216cabba16a64ff400dd544c169271182be43 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 13:21:44 +0200 Subject: [PATCH 04/32] small fixes --- test/compute.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 063acd2..8b7b186 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -4,8 +4,14 @@ import path from "path"; import fs from "fs"; import util from "util"; +import { dirname } from "path"; +import { fileURLToPath } from "url"; + const execPromise = util.promisify(exec); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + describe("Ocean CLI Free Compute Flow", function () { this.timeout(300000); @@ -32,8 +38,12 @@ describe("Ocean CLI Free Compute Flow", function () { process.env.PRIVATE_KEY = "0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc"; process.env.RPC = "http://127.0.0.1:8545"; - process.env.AQUARIUS_URL = "http://127.0.0.1:5000"; - process.env.PROVIDER_URL = "http://127.0.0.1:8030"; + // process.env.AQUARIUS_URL = "http://127.0.0.1:5000"; + // process.env.PROVIDER_URL = "http://127.0.0.1:8030"; + process.env.ADDRESS_FILE = path.join( + process.env.HOME || "", + ".ocean/ocean-contracts/artifacts/address.json" + ); }); it("should publish a compute dataset", async () => { From 261b4896dba4ccc5c1270d24d87a97bfcb2214b7 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 15:32:49 +0200 Subject: [PATCH 05/32] add log --- test/compute.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/compute.test.ts b/test/compute.test.ts index 8b7b186..3520759 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -44,6 +44,7 @@ describe("Ocean CLI Free Compute Flow", function () { process.env.HOME || "", ".ocean/ocean-contracts/artifacts/address.json" ); + console.log("Starting compute tests ... "); }); it("should publish a compute dataset", async () => { From 8035089cfc099fa7136d4b0612c253b64f814bc2 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 15:57:50 +0200 Subject: [PATCH 06/32] check ocean node issue --- .github/workflows/ci.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbdc587..688a679 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '18' + node-version: "18" - name: Install dependencies run: npm install @@ -34,7 +34,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '18' + node-version: "18" - name: Install dependencies run: npm install @@ -52,7 +52,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '18.19.0' + node-version: "18.19.0" - name: Cache node_modules uses: actions/cache@v3 @@ -69,8 +69,8 @@ jobs: - name: Checkout Barge uses: actions/checkout@v3 with: - repository: 'oceanprotocol/barge' - path: 'barge' + repository: "oceanprotocol/barge" + path: "barge" - name: Login to Docker Hub if: ${{ env.DOCKERHUB_PASSWORD && env.DOCKERHUB_USERNAME }} @@ -116,14 +116,14 @@ jobs: - name: Checkout Ocean Node uses: actions/checkout@v3 with: - repository: 'oceanprotocol/ocean-node' - path: 'ocean-node' - ref: 'main' + repository: "oceanprotocol/ocean-node" + path: "ocean-node" + ref: "main" - name: Start Ocean Node working-directory: ${{ github.workspace }}/ocean-node run: | - npm ci + npm i npm run build npm run start & env: @@ -133,8 +133,8 @@ jobs: P2P_ipV4BindTcpPort: 8000 HTTP_API_PORT: 8001 RPCS: '{ "8996": {"rpc": "http://127.0.0.1:8545", "chainId": 8996, "network": "development", "chunkSize": 100} }' - DB_URL: 'http://localhost:9200' - DB_TYPE: 'elasticsearch' + DB_URL: "http://localhost:9200" + DB_TYPE: "elasticsearch" FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }' FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }' AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]' @@ -153,10 +153,9 @@ jobs: done echo "Ocean Node did not start in time" exit 1 - - name: Run system tests + - name: Run system tests run: npm run test:system env: INDEXING_RETRY_INTERVAL: 4000 INDEXING_MAX_RETRIES: 120 - NODE_URL: 'http://127.0.0.1:8001' - + NODE_URL: "http://127.0.0.1:8001" From 73424dcee2a90c8047469dcb569fe16753cafc38 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 16:15:58 +0200 Subject: [PATCH 07/32] try legacy peers --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 688a679..cc8d56a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,9 @@ jobs: - name: Start Ocean Node working-directory: ${{ github.workspace }}/ocean-node run: | - npm i + npm cache clean --force + rm -rf node_modules package-lock.json + npm install --legacy-peer-deps npm run build npm run start & env: From 8bdc7127dcba55ccb022ee8439851b2c980d5d15 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 16:43:32 +0200 Subject: [PATCH 08/32] update node version --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc8d56a..3975ad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "18.19.0" + node-version: "20.16.0" - name: Cache node_modules uses: actions/cache@v3 @@ -123,9 +123,7 @@ jobs: - name: Start Ocean Node working-directory: ${{ github.workspace }}/ocean-node run: | - npm cache clean --force - rm -rf node_modules package-lock.json - npm install --legacy-peer-deps + npm ci npm run build npm run start & env: From 1c11caf25d4101762bac47a2fbc17c4b9a1be10a Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 21 Mar 2025 16:49:47 +0200 Subject: [PATCH 09/32] update get env test --- .github/workflows/ci.yml | 4 ++-- test/compute.test.ts | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3975ad6..89adc66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "18" + node-version: "20" - name: Install dependencies run: npm install @@ -34,7 +34,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "18" + node-version: "20" - name: Install dependencies run: npm install diff --git a/test/compute.test.ts b/test/compute.test.ts index 3520759..168f321 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -85,19 +85,26 @@ describe("Ocean CLI Free Compute Flow", function () { it("should get compute environments", async () => { const output = await runCommand(`npm run cli getComputeEnvironments`); - expect(output).to.contain("id"); + let environments; + try { + environments = JSON.parse(output); + } catch (error) { + throw new Error("Output is not valid JSON:\n" + output); + } + + expect(environments).to.be.an("array").that.is.not.empty; + + const firstEnv = environments[0]; - const envMatch = output.match(/id: (0x[a-fA-F0-9]+)/); - if (!envMatch) - throw new Error("No environment ID found in environments output"); + expect(firstEnv).to.have.property("id").that.is.a("string"); - computeEnvId = envMatch[1]; + computeEnvId = firstEnv.id; console.log(`Fetched Compute Env ID: ${computeEnvId}`); }); it("should start a free compute job", async () => { const output = await runCommand( - `npm run cli startFreeCompute -- --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` + `npm run cli startFreeCompute --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` ); const jobIdMatch = output.match( @@ -111,7 +118,7 @@ describe("Ocean CLI Free Compute Flow", function () { it("should get job status", async () => { const output = await runCommand( - `npm run cli getJobStatus -- --dataset ${computeDatasetDid} --job ${jobId}` + `npm run cli getJobStatus --dataset ${computeDatasetDid} --job ${jobId}` ); expect(output).to.contain(jobId); @@ -121,7 +128,7 @@ describe("Ocean CLI Free Compute Flow", function () { it("should fetch streamable logs", async () => { const output = await runCommand( - `npm run cli computeStreamableLogs -- --job ${jobId}` + `npm run cli computeStreamableLogs --job ${jobId}` ); expect(output).to.contain(jobId); @@ -130,7 +137,7 @@ describe("Ocean CLI Free Compute Flow", function () { it("should stop the compute job", async () => { const output = await runCommand( - `npm run cli stopCompute -- --dataset ${computeDatasetDid} --job ${jobId}` + `npm run cli stopCompute --dataset ${computeDatasetDid} --job ${jobId}` ); expect(output).to.contain("Compute job stopped successfully"); From 55c7860c3e024c13511cc1a157809ab7fd06bb94 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Sat, 22 Mar 2025 17:24:29 +0200 Subject: [PATCH 10/32] upgrade typescript-eslint --- package-lock.json | 400 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 171 insertions(+), 231 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3cc78e7..c77caf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "ocean-cli", "version": "2.0.0", "license": "Apache-2.0", "dependencies": { @@ -43,7 +42,7 @@ "pretty-quick": "^3.1.3", "tsx": "^4.19.2", "typescript": "^5.0.4", - "typescript-eslint": "^7.12.0" + "typescript-eslint": "^8.27.0" } }, "node_modules/@adraffy/ens-normalize": { @@ -2002,7 +2001,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2019,7 +2017,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2036,7 +2033,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2053,7 +2049,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2070,7 +2065,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2087,7 +2081,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2104,7 +2097,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2121,7 +2113,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2138,7 +2129,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2155,7 +2145,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2172,7 +2161,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2189,7 +2177,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2206,7 +2193,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2223,7 +2209,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2240,7 +2225,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2257,7 +2241,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2274,7 +2257,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2291,7 +2273,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2308,7 +2289,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2325,7 +2305,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2342,7 +2321,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2359,7 +2337,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2376,7 +2353,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2393,7 +2369,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2410,7 +2385,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -7594,7 +7568,6 @@ "version": "0.25.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -9144,7 +9117,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -9295,7 +9267,6 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", - "dev": true, "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -13798,7 +13769,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" @@ -15189,15 +15159,15 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/ts-node": { @@ -15285,7 +15255,6 @@ "version": "4.19.3", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", - "dev": true, "license": "MIT", "dependencies": { "esbuild": "~0.25.0", @@ -15465,103 +15434,91 @@ } }, "node_modules/typescript-eslint": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.14.1.tgz", - "integrity": "sha512-Eo1X+Y0JgGPspcANKjeR6nIqXl4VL5ldXLc15k4m9upq+eY5fhU2IueiEZL6jmHrKH8aCfbIvM/v3IrX5Hg99w==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.27.0.tgz", + "integrity": "sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/parser": "7.14.1", - "@typescript-eslint/utils": "7.14.1" + "@typescript-eslint/eslint-plugin": "8.27.0", + "@typescript-eslint/parser": "8.27.0", + "@typescript-eslint/utils": "8.27.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz", - "integrity": "sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.27.0.tgz", + "integrity": "sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/type-utils": "7.14.1", - "@typescript-eslint/utils": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/type-utils": "8.27.0", + "@typescript-eslint/utils": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.14.1.tgz", - "integrity": "sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.27.0.tgz", + "integrity": "sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/typescript-estree": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz", - "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.27.0.tgz", + "integrity": "sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1" + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -15569,39 +15526,35 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.14.1.tgz", - "integrity": "sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.27.0.tgz", + "integrity": "sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/typescript-estree": "8.27.0", + "@typescript-eslint/utils": "8.27.0", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz", - "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.27.0.tgz", + "integrity": "sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==", "dev": true, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -15609,66 +15562,65 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz", - "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.27.0.tgz", + "integrity": "sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz", - "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.27.0.tgz", + "integrity": "sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1" + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/typescript-estree": "8.27.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz", - "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.27.0.tgz", + "integrity": "sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.14.1", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.27.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -15685,12 +15637,12 @@ } }, "node_modules/typescript-eslint/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -15701,6 +15653,18 @@ } } }, + "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/typescript-eslint/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -15717,9 +15681,9 @@ } }, "node_modules/typescript-eslint/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/uint32": { @@ -17952,175 +17916,150 @@ "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", - "dev": true, "optional": true }, "@esbuild/android-arm": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", - "dev": true, "optional": true }, "@esbuild/android-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", - "dev": true, "optional": true }, "@esbuild/android-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", - "dev": true, "optional": true }, "@esbuild/darwin-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", - "dev": true, "optional": true }, "@esbuild/darwin-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", - "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", - "dev": true, "optional": true }, "@esbuild/freebsd-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", - "dev": true, "optional": true }, "@esbuild/linux-arm": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", - "dev": true, "optional": true }, "@esbuild/linux-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", - "dev": true, "optional": true }, "@esbuild/linux-ia32": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", - "dev": true, "optional": true }, "@esbuild/linux-loong64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", - "dev": true, "optional": true }, "@esbuild/linux-mips64el": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", - "dev": true, "optional": true }, "@esbuild/linux-ppc64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", - "dev": true, "optional": true }, "@esbuild/linux-riscv64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", - "dev": true, "optional": true }, "@esbuild/linux-s390x": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", - "dev": true, "optional": true }, "@esbuild/linux-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", - "dev": true, "optional": true }, "@esbuild/netbsd-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", - "dev": true, "optional": true }, "@esbuild/netbsd-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", - "dev": true, "optional": true }, "@esbuild/openbsd-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", - "dev": true, "optional": true }, "@esbuild/openbsd-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", - "dev": true, "optional": true }, "@esbuild/sunos-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", - "dev": true, "optional": true }, "@esbuild/win32-arm64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", - "dev": true, "optional": true }, "@esbuild/win32-ia32": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", - "dev": true, "optional": true }, "@esbuild/win32-x64": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", - "dev": true, "optional": true }, "@eslint-community/eslint-utils": { @@ -21885,7 +21824,6 @@ "version": "0.25.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", - "dev": true, "requires": { "@esbuild/aix-ppc64": "0.25.1", "@esbuild/android-arm": "0.25.1", @@ -23052,7 +22990,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "optional": true }, "function-bind": { @@ -23152,7 +23089,6 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", - "dev": true, "requires": { "resolve-pkg-maps": "^1.0.0" } @@ -26308,8 +26244,7 @@ "resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==" }, "responselike": { "version": "2.0.1", @@ -27321,9 +27256,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "requires": {} }, @@ -27386,7 +27321,6 @@ "version": "4.19.3", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", - "dev": true, "requires": { "esbuild": "~0.25.0", "fsevents": "~2.3.3", @@ -27511,110 +27445,110 @@ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==" }, "typescript-eslint": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.14.1.tgz", - "integrity": "sha512-Eo1X+Y0JgGPspcANKjeR6nIqXl4VL5ldXLc15k4m9upq+eY5fhU2IueiEZL6jmHrKH8aCfbIvM/v3IrX5Hg99w==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.27.0.tgz", + "integrity": "sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/parser": "7.14.1", - "@typescript-eslint/utils": "7.14.1" + "@typescript-eslint/eslint-plugin": "8.27.0", + "@typescript-eslint/parser": "8.27.0", + "@typescript-eslint/utils": "8.27.0" }, "dependencies": { "@typescript-eslint/eslint-plugin": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz", - "integrity": "sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.27.0.tgz", + "integrity": "sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/type-utils": "7.14.1", - "@typescript-eslint/utils": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/type-utils": "8.27.0", + "@typescript-eslint/utils": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/parser": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.14.1.tgz", - "integrity": "sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.27.0.tgz", + "integrity": "sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/typescript-estree": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz", - "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.27.0.tgz", + "integrity": "sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==", "dev": true, "requires": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1" + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0" } }, "@typescript-eslint/type-utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.14.1.tgz", - "integrity": "sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.27.0.tgz", + "integrity": "sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/typescript-estree": "8.27.0", + "@typescript-eslint/utils": "8.27.0", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz", - "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.27.0.tgz", + "integrity": "sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz", - "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.27.0.tgz", + "integrity": "sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==", "dev": true, "requires": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/visitor-keys": "8.27.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz", - "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.27.0.tgz", + "integrity": "sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1" + "@typescript-eslint/scope-manager": "8.27.0", + "@typescript-eslint/types": "8.27.0", + "@typescript-eslint/typescript-estree": "8.27.0" } }, "@typescript-eslint/visitor-keys": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz", - "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==", + "version": "8.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.27.0.tgz", + "integrity": "sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==", "dev": true, "requires": { - "@typescript-eslint/types": "7.14.1", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.27.0", + "eslint-visitor-keys": "^4.2.0" } }, "brace-expansion": { @@ -27627,14 +27561,20 @@ } }, "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.3" } }, + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + }, "minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -27645,9 +27585,9 @@ } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } diff --git a/package.json b/package.json index 13f6eff..886b9f6 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "pretty-quick": "^3.1.3", "tsx": "^4.19.2", "typescript": "^5.0.4", - "typescript-eslint": "^7.12.0" + "typescript-eslint": "^8.27.0" }, "dependencies": { "@oasisprotocol/sapphire-paratime": "^1.3.2", From c6055b3de49fb89b005b969cd5a8e71aada431f5 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Sun, 23 Mar 2025 10:57:06 +0200 Subject: [PATCH 11/32] revert changes --- .github/workflows/ci.yml | 8 +- package-lock.json | 309 +++++++++++++++++++-------------------- package.json | 2 +- 3 files changed, 159 insertions(+), 160 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89adc66..dc91161 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "20" + node-version: "18" - name: Install dependencies run: npm install @@ -34,7 +34,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "20" + node-version: "18" - name: Install dependencies run: npm install @@ -52,7 +52,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "20.16.0" + node-version: "18.19.0" - name: Cache node_modules uses: actions/cache@v3 @@ -118,7 +118,7 @@ jobs: with: repository: "oceanprotocol/ocean-node" path: "ocean-node" - ref: "main" + ref: "test-esbuild" - name: Start Ocean Node working-directory: ${{ github.workspace }}/ocean-node diff --git a/package-lock.json b/package-lock.json index c77caf4..36bbdb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "pretty-quick": "^3.1.3", "tsx": "^4.19.2", "typescript": "^5.0.4", - "typescript-eslint": "^8.27.0" + "typescript-eslint": "^7.12.0" } }, "node_modules/@adraffy/ens-normalize": { @@ -15159,15 +15159,15 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "engines": { - "node": ">=18.12" + "node": ">=16" }, "peerDependencies": { - "typescript": ">=4.8.4" + "typescript": ">=4.2.0" } }, "node_modules/ts-node": { @@ -15434,91 +15434,103 @@ } }, "node_modules/typescript-eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.27.0.tgz", - "integrity": "sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", + "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.27.0", - "@typescript-eslint/parser": "8.27.0", - "@typescript-eslint/utils": "8.27.0" + "@typescript-eslint/eslint-plugin": "7.18.0", + "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "7.18.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.27.0.tgz", - "integrity": "sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/type-utils": "8.27.0", - "@typescript-eslint/utils": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.27.0.tgz", - "integrity": "sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/typescript-estree": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.27.0.tgz", - "integrity": "sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -15526,35 +15538,39 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.27.0.tgz", - "integrity": "sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.27.0", - "@typescript-eslint/utils": "8.27.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.27.0.tgz", - "integrity": "sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -15562,65 +15578,66 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.27.0.tgz", - "integrity": "sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", - "fast-glob": "^3.3.2", + "globby": "^11.1.0", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.27.0.tgz", - "integrity": "sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/typescript-estree": "8.27.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "eslint": "^8.56.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.27.0.tgz", - "integrity": "sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.27.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -15653,18 +15670,6 @@ } } }, - "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/typescript-eslint/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -27256,9 +27261,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "requires": {} }, @@ -27445,110 +27450,110 @@ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==" }, "typescript-eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.27.0.tgz", - "integrity": "sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", + "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "8.27.0", - "@typescript-eslint/parser": "8.27.0", - "@typescript-eslint/utils": "8.27.0" + "@typescript-eslint/eslint-plugin": "7.18.0", + "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "7.18.0" }, "dependencies": { "@typescript-eslint/eslint-plugin": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.27.0.tgz", - "integrity": "sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/type-utils": "8.27.0", - "@typescript-eslint/utils": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/parser": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.27.0.tgz", - "integrity": "sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/typescript-estree": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.27.0.tgz", - "integrity": "sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "requires": { - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" } }, "@typescript-eslint/type-utils": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.27.0.tgz", - "integrity": "sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.27.0", - "@typescript-eslint/utils": "8.27.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.27.0.tgz", - "integrity": "sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.27.0.tgz", - "integrity": "sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "requires": { - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/visitor-keys": "8.27.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", - "fast-glob": "^3.3.2", + "globby": "^11.1.0", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/utils": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.27.0.tgz", - "integrity": "sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.27.0", - "@typescript-eslint/types": "8.27.0", - "@typescript-eslint/typescript-estree": "8.27.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" } }, "@typescript-eslint/visitor-keys": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.27.0.tgz", - "integrity": "sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.27.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" } }, "brace-expansion": { @@ -27569,12 +27574,6 @@ "ms": "^2.1.3" } }, - "eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true - }, "minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", diff --git a/package.json b/package.json index 886b9f6..13f6eff 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "pretty-quick": "^3.1.3", "tsx": "^4.19.2", "typescript": "^5.0.4", - "typescript-eslint": "^8.27.0" + "typescript-eslint": "^7.12.0" }, "dependencies": { "@oasisprotocol/sapphire-paratime": "^1.3.2", From 569a1e67449f30d766ea4696801afcc4f44e7894 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Sun, 23 Mar 2025 12:35:01 +0200 Subject: [PATCH 12/32] update compute test --- test/compute.test.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 168f321..ad02893 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -85,11 +85,20 @@ describe("Ocean CLI Free Compute Flow", function () { it("should get compute environments", async () => { const output = await runCommand(`npm run cli getComputeEnvironments`); + const jsonMatch = output.match( + /Exiting compute environments:\s*(\[[\s\S]*\])/ + ); + if (!jsonMatch) { + console.error("Raw output:", output); + throw new Error("Could not find JSON in the output"); + } + let environments; try { - environments = JSON.parse(output); + environments = JSON.parse(jsonMatch[1]); } catch (error) { - throw new Error("Output is not valid JSON:\n" + output); + console.error("Extracted JSON:", jsonMatch[1]); + throw new Error("Extracted output is not valid JSON:\n" + jsonMatch[1]); } expect(environments).to.be.an("array").that.is.not.empty; From 8770d2a750ff2b1789dab2c23e2f521135703134 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 24 Mar 2025 08:34:47 +0200 Subject: [PATCH 13/32] update check --- test/compute.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index ad02893..9f9df43 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -85,20 +85,18 @@ describe("Ocean CLI Free Compute Flow", function () { it("should get compute environments", async () => { const output = await runCommand(`npm run cli getComputeEnvironments`); - const jsonMatch = output.match( - /Exiting compute environments:\s*(\[[\s\S]*\])/ - ); + const jsonMatch = output.match(/Exiting compute environments:\s*([\s\S]*)/); if (!jsonMatch) { console.error("Raw output:", output); - throw new Error("Could not find JSON in the output"); + throw new Error("Could not find compute environments in the output"); } let environments; try { - environments = JSON.parse(jsonMatch[1]); + environments = eval(`(${jsonMatch[1]})`); } catch (error) { - console.error("Extracted JSON:", jsonMatch[1]); - throw new Error("Extracted output is not valid JSON:\n" + jsonMatch[1]); + console.error("Extracted output:", jsonMatch[1]); + throw new Error("Failed to parse the extracted output:\n" + error); } expect(environments).to.be.an("array").that.is.not.empty; @@ -106,6 +104,8 @@ describe("Ocean CLI Free Compute Flow", function () { const firstEnv = environments[0]; expect(firstEnv).to.have.property("id").that.is.a("string"); + expect(firstEnv).to.have.property("consumerAddress").that.is.a("string"); + expect(firstEnv).to.have.property("resources").that.is.an("array"); computeEnvId = firstEnv.id; console.log(`Fetched Compute Env ID: ${computeEnvId}`); From f98519a9f2bebfa159e8f772249ba01a54b4d2a5 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 24 Mar 2025 08:57:35 +0200 Subject: [PATCH 14/32] put back main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc91161..9d6f78f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,7 +118,7 @@ jobs: with: repository: "oceanprotocol/ocean-node" path: "ocean-node" - ref: "test-esbuild" + ref: "main" - name: Start Ocean Node working-directory: ${{ github.workspace }}/ocean-node From e7d44740072d645ffc828f7d720ef2106654c15c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 24 Mar 2025 09:32:32 +0200 Subject: [PATCH 15/32] update regular expression pattern --- test/compute.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 9f9df43..ccda1bc 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -117,7 +117,7 @@ describe("Ocean CLI Free Compute Flow", function () { ); const jobIdMatch = output.match( - /Job started successfully with ID: ([a-f0-9-]+)/i + /Compute started\.\s+JobID:\s+(0x[a-f0-9-]+)/i ); expect(jobIdMatch, "No Job ID found in output").to.not.be.null; From 757c3ff2edf754903424768bad66a559f1b43b2a Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 24 Mar 2025 09:55:18 +0200 Subject: [PATCH 16/32] final touch --- test/compute.test.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index ccda1bc..528a378 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -135,15 +135,6 @@ describe("Ocean CLI Free Compute Flow", function () { console.log(`Job status retrieved for jobId: ${jobId}`); }); - it("should fetch streamable logs", async () => { - const output = await runCommand( - `npm run cli computeStreamableLogs --job ${jobId}` - ); - - expect(output).to.contain(jobId); - console.log(`Streamable logs retrieved for jobId: ${jobId}`); - }); - it("should stop the compute job", async () => { const output = await runCommand( `npm run cli stopCompute --dataset ${computeDatasetDid} --job ${jobId}` From 10c91ee007fd556086d0ffe9d2cd07b682a3b4c7 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 24 Mar 2025 10:16:10 +0200 Subject: [PATCH 17/32] cleanup --- test/compute.test.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 528a378..eccd8ca 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -134,13 +134,4 @@ describe("Ocean CLI Free Compute Flow", function () { expect(output.toLowerCase()).to.match(/status/); console.log(`Job status retrieved for jobId: ${jobId}`); }); - - it("should stop the compute job", async () => { - const output = await runCommand( - `npm run cli stopCompute --dataset ${computeDatasetDid} --job ${jobId}` - ); - - expect(output).to.contain("Compute job stopped successfully"); - console.log(`Stopped compute job with ID: ${jobId}`); - }); }); From 01b6c1ac4ee68c2c13e293b99e60dd70d4edb766 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 15 Apr 2025 14:05:16 +0300 Subject: [PATCH 18/32] add get results --- test/compute.test.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/compute.test.ts b/test/compute.test.ts index eccd8ca..a6f4c43 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -134,4 +134,41 @@ describe("Ocean CLI Free Compute Flow", function () { expect(output.toLowerCase()).to.match(/status/); console.log(`Job status retrieved for jobId: ${jobId}`); }); + + const waitForJobCompletion = async ( + datasetDid, + jobId, + maxWaitMs = 120000, + pollIntervalMs = 5000 + ) => { + const start = Date.now(); + while (Date.now() - start < maxWaitMs) { + const output = await runCommand( + `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` + ); + console.log(`Job status cmd output : ${output}`); + if (/status:\s*Job finished/i.test(output)) { + return; + } + await new Promise((res) => setTimeout(res, pollIntervalMs)); + } + throw new Error( + `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` + ); + }; + + it("should download compute job results", async () => { + await waitForJobCompletion(computeDatasetDid, jobId, 180000, 7000); + + const destFolder = path.join(projectRoot, "test-results", jobId); + fs.mkdirSync(destFolder, { recursive: true }); + + const output = await runCommand( + `npm run cli downloadJobResults ${jobId} 0 ${destFolder}` + ); + + console.log(`Download job results cmd output: ${output}`); + + expect(output.toLowerCase()).to.match(/download(ed)?/); + }); }); From 98c1e0cf1ed7a1c7312fbaacc96e5693fd9eadf6 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 15 Apr 2025 14:22:50 +0300 Subject: [PATCH 19/32] update wait job to finish test --- test/compute.test.ts | 47 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index a6f4c43..3e88e80 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -147,9 +147,35 @@ describe("Ocean CLI Free Compute Flow", function () { `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); console.log(`Job status cmd output : ${output}`); - if (/status:\s*Job finished/i.test(output)) { - return; + + const jsonMatch = output.match(/\[\s*{[\s\S]*}\s*\]/); + if (!jsonMatch) { + console.warn("Could not find JSON array in output, will retry..."); + await new Promise((res) => setTimeout(res, pollIntervalMs)); + continue; + } + + let jobs; + try { + jobs = JSON.parse(jsonMatch[0]); + } catch (e) { + console.warn("Failed to parse job status JSON, will retry..."); + await new Promise((res) => setTimeout(res, pollIntervalMs)); + continue; + } + + if (Array.isArray(jobs) && jobs.length > 0) { + const job = jobs[0]; + if ( + (typeof job.statusText === "string" && + job.statusText.toLowerCase().includes("finished")) || + job.status === 70 + ) { + console.log("Job is finished!"); + return job; + } } + await new Promise((res) => setTimeout(res, pollIntervalMs)); } throw new Error( @@ -158,17 +184,26 @@ describe("Ocean CLI Free Compute Flow", function () { }; it("should download compute job results", async () => { - await waitForJobCompletion(computeDatasetDid, jobId, 180000, 7000); + // Wait for job to finish and get job details + const job = await waitForJobCompletion( + computeDatasetDid, + jobId, + 180000, + 7000 + ); + console.log("Job details:", job); const destFolder = path.join(projectRoot, "test-results", jobId); fs.mkdirSync(destFolder, { recursive: true }); const output = await runCommand( - `npm run cli downloadJobResults ${jobId} 0 ${destFolder}` + `npm run cli downloadJobResults ${jobId} 1 ${destFolder}` ); - console.log(`Download job results cmd output: ${output}`); - expect(output.toLowerCase()).to.match(/download(ed)?/); + + // const files = fs.readdirSync(destFolder); + // expect(files.length).to.be.greaterThan(0, "No result files downloaded"); + // console.log(`Downloaded results to: ${destFolder}`); }); }); From f8c93207093bd0be277b5fcab4fe8fce65cf93ac Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 15 Apr 2025 15:07:50 +0300 Subject: [PATCH 20/32] update regex --- test/compute.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 3e88e80..7577439 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -157,7 +157,11 @@ describe("Ocean CLI Free Compute Flow", function () { let jobs; try { - jobs = JSON.parse(jsonMatch[0]); + const jsonStr = jsonMatch[0] + .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') + .replace(/:\s*'([^']*?)'/g, ': "$1"'); + + jobs = JSON.parse(jsonStr); } catch (e) { console.warn("Failed to parse job status JSON, will retry..."); await new Promise((res) => setTimeout(res, pollIntervalMs)); @@ -182,9 +186,7 @@ describe("Ocean CLI Free Compute Flow", function () { `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` ); }; - it("should download compute job results", async () => { - // Wait for job to finish and get job details const job = await waitForJobCompletion( computeDatasetDid, jobId, From 25ca7acbe00baa58d87937b8594945c7f80fe4e3 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 12:56:41 +0300 Subject: [PATCH 21/32] debug logs --- test/compute.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 7577439..472b06e 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -115,6 +115,7 @@ describe("Ocean CLI Free Compute Flow", function () { const output = await runCommand( `npm run cli startFreeCompute --datasets ${computeDatasetDid} --algo ${algoDid} --env ${computeEnvId}` ); + console.log("Start Free Compute output:", output); const jobIdMatch = output.match( /Compute started\.\s+JobID:\s+(0x[a-f0-9-]+)/i @@ -162,6 +163,7 @@ describe("Ocean CLI Free Compute Flow", function () { .replace(/:\s*'([^']*?)'/g, ': "$1"'); jobs = JSON.parse(jsonStr); + console.log("Parsed job status JSON:", jobs); } catch (e) { console.warn("Failed to parse job status JSON, will retry..."); await new Promise((res) => setTimeout(res, pollIntervalMs)); @@ -170,14 +172,13 @@ describe("Ocean CLI Free Compute Flow", function () { if (Array.isArray(jobs) && jobs.length > 0) { const job = jobs[0]; - if ( - (typeof job.statusText === "string" && - job.statusText.toLowerCase().includes("finished")) || - job.status === 70 - ) { + console.log("jobs[0] :", jobs[0]); + if (job.status === 70) { console.log("Job is finished!"); return job; } + } else { + console.warn("No jobs found in the output, will retry..."); } await new Promise((res) => setTimeout(res, pollIntervalMs)); @@ -186,6 +187,7 @@ describe("Ocean CLI Free Compute Flow", function () { `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` ); }; + it("should download compute job results", async () => { const job = await waitForJobCompletion( computeDatasetDid, From 65a55a3c6b35e3c39d81e86dc3b2867c5454d8ad Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 14:24:07 +0300 Subject: [PATCH 22/32] debug logs --- test/compute.test.ts | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 472b06e..5d6ec3f 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -137,8 +137,8 @@ describe("Ocean CLI Free Compute Flow", function () { }); const waitForJobCompletion = async ( - datasetDid, - jobId, + datasetDid: string, + jobId: string, maxWaitMs = 120000, pollIntervalMs = 5000 ) => { @@ -147,40 +147,37 @@ describe("Ocean CLI Free Compute Flow", function () { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); - console.log(`Job status cmd output : ${output}`); - - const jsonMatch = output.match(/\[\s*{[\s\S]*}\s*\]/); - if (!jsonMatch) { - console.warn("Could not find JSON array in output, will retry..."); - await new Promise((res) => setTimeout(res, pollIntervalMs)); - continue; - } - + console.log(`Job status cmd output :\n${output}`); let jobs; try { - const jsonStr = jsonMatch[0] - .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') - .replace(/:\s*'([^']*?)'/g, ': "$1"'); - + const jsonStart = output.indexOf("[{"); + const jsonEnd = output.lastIndexOf("}]"); + if (jsonStart === -1 || jsonEnd === -1) { + console.warn("Could not locate JSON in output, retrying..."); + await new Promise((res) => setTimeout(res, pollIntervalMs)); + continue; + } + const jsonStr = output.slice(jsonStart, jsonEnd + 2); jobs = JSON.parse(jsonStr); console.log("Parsed job status JSON:", jobs); } catch (e) { - console.warn("Failed to parse job status JSON, will retry..."); + console.error("Failed to parse job status JSON, retrying...", e); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } if (Array.isArray(jobs) && jobs.length > 0) { const job = jobs[0]; - console.log("jobs[0] :", jobs[0]); + console.log("jobs[0]:", job); if (job.status === 70) { - console.log("Job is finished!"); + console.log("โœ… Job is finished!"); return job; + } else { + console.log(`Job status: ${job.status}, waiting...`); } } else { console.warn("No jobs found in the output, will retry..."); } - await new Promise((res) => setTimeout(res, pollIntervalMs)); } throw new Error( From 19f336bf7a7fd8ba57b1c9aae92e347c46d28e5a Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 15:53:14 +0300 Subject: [PATCH 23/32] update regex --- test/compute.test.ts | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 5d6ec3f..bdf8bb8 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -143,45 +143,51 @@ describe("Ocean CLI Free Compute Flow", function () { pollIntervalMs = 5000 ) => { const start = Date.now(); + while (Date.now() - start < maxWaitMs) { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); - console.log(`Job status cmd output :\n${output}`); + console.log(`Job status cmd output:\n${output}`); + let jobs; + try { - const jsonStart = output.indexOf("[{"); - const jsonEnd = output.lastIndexOf("}]"); - if (jsonStart === -1 || jsonEnd === -1) { - console.warn("Could not locate JSON in output, retrying..."); + const jsonMatch = output.match(/\[\s*{[\s\S]*?}\s*\]/); + + if (!jsonMatch || !jsonMatch[0]) { + console.warn("โŒ Could not locate JSON in output, retrying..."); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } - const jsonStr = output.slice(jsonStart, jsonEnd + 2); + + const jsonStr = jsonMatch[0]; jobs = JSON.parse(jsonStr); - console.log("Parsed job status JSON:", jobs); + console.log("โœ… Parsed job status JSON:", jobs); } catch (e) { - console.error("Failed to parse job status JSON, retrying...", e); + console.error("โŒ Failed to parse job status JSON, retrying...", e); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } if (Array.isArray(jobs) && jobs.length > 0) { const job = jobs[0]; - console.log("jobs[0]:", job); + console.log("๐Ÿงช jobs[0]:", job); if (job.status === 70) { console.log("โœ… Job is finished!"); return job; } else { - console.log(`Job status: ${job.status}, waiting...`); + console.log(`โณ Job not finished yet. Status: ${job.status}`); } } else { - console.warn("No jobs found in the output, will retry..."); + console.warn("โš ๏ธ No jobs found in the output, will retry..."); } + await new Promise((res) => setTimeout(res, pollIntervalMs)); } + throw new Error( - `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` + `โŒ Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` ); }; From 341d235a95590682faa422c7db8467c3361ae0ab Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 16:36:06 +0300 Subject: [PATCH 24/32] update parse logic --- test/compute.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index bdf8bb8..025c816 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -161,7 +161,15 @@ describe("Ocean CLI Free Compute Flow", function () { continue; } - const jsonStr = jsonMatch[0]; + const jsonStr = jsonMatch[0].trim(); + console.log("๐Ÿ•ต๏ธ Extracted JSON string before parsing:\n", jsonStr); + + if (!jsonStr.startsWith("[")) { + console.warn(`โŒ Extracted string is not a JSON array: ${jsonStr}`); + await new Promise((res) => setTimeout(res, pollIntervalMs)); + continue; + } + jobs = JSON.parse(jsonStr); console.log("โœ… Parsed job status JSON:", jobs); } catch (e) { From 33547eb2cbaa64b9acddeb5e984f63e6b2e7387a Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 17:00:50 +0300 Subject: [PATCH 25/32] more enhacemnts --- test/compute.test.ts | 49 ++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 025c816..24a5cb7 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -137,65 +137,52 @@ describe("Ocean CLI Free Compute Flow", function () { }); const waitForJobCompletion = async ( - datasetDid: string, - jobId: string, + datasetDid, + jobId, maxWaitMs = 120000, pollIntervalMs = 5000 ) => { const start = Date.now(); - while (Date.now() - start < maxWaitMs) { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); - console.log(`Job status cmd output:\n${output}`); + console.log(`Job status cmd output : ${output}`); + const arrayMatch = output.match(/\[[\s\S]*\]/); + if (!arrayMatch) { + console.warn("Could not find array in output, will retry..."); + await new Promise((res) => setTimeout(res, pollIntervalMs)); + continue; + } + console.log("Found array in output:", arrayMatch[0]); let jobs; - try { - const jsonMatch = output.match(/\[\s*{[\s\S]*?}\s*\]/); - - if (!jsonMatch || !jsonMatch[0]) { - console.warn("โŒ Could not locate JSON in output, retrying..."); - await new Promise((res) => setTimeout(res, pollIntervalMs)); - continue; - } - - const jsonStr = jsonMatch[0].trim(); - console.log("๐Ÿ•ต๏ธ Extracted JSON string before parsing:\n", jsonStr); - - if (!jsonStr.startsWith("[")) { - console.warn(`โŒ Extracted string is not a JSON array: ${jsonStr}`); - await new Promise((res) => setTimeout(res, pollIntervalMs)); - continue; - } - + let jsonStr = arrayMatch[0]; + jsonStr = jsonStr.replace(/([{,\[]\s*)([a-zA-Z0-9_]+)\s*:/g, '$1"$2":'); + jsonStr = jsonStr.replace(/'([^']*?)'/g, '"$1"'); jobs = JSON.parse(jsonStr); - console.log("โœ… Parsed job status JSON:", jobs); + console.log("Parsed job status JSON:", jobs); } catch (e) { - console.error("โŒ Failed to parse job status JSON, retrying...", e); + console.error("Failed to parse job status JSON, will retry...", e); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } if (Array.isArray(jobs) && jobs.length > 0) { const job = jobs[0]; - console.log("๐Ÿงช jobs[0]:", job); if (job.status === 70) { - console.log("โœ… Job is finished!"); + console.log("Job is finished!"); return job; - } else { - console.log(`โณ Job not finished yet. Status: ${job.status}`); } } else { - console.warn("โš ๏ธ No jobs found in the output, will retry..."); + console.warn("No jobs found in the output, will retry..."); } await new Promise((res) => setTimeout(res, pollIntervalMs)); } - throw new Error( - `โŒ Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` + `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` ); }; From 9c589778ee1d52c406b868a44fc944cd87559b0c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 16 Apr 2025 17:53:01 +0300 Subject: [PATCH 26/32] use strip ansi --- package-lock.json | 1 + package.json | 1 + test/compute.test.ts | 45 ++++++++++++++++++++++---------------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36bbdb9..bc7d9bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "mocha": "^10.2.0", "prettier": "^2.8.8", "pretty-quick": "^3.1.3", + "strip-ansi": "^6.0.1", "tsx": "^4.19.2", "typescript": "^5.0.4", "typescript-eslint": "^7.12.0" diff --git a/package.json b/package.json index 13f6eff..9b1715c 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "mocha": "^10.2.0", "prettier": "^2.8.8", "pretty-quick": "^3.1.3", + "strip-ansi": "^6.0.1", "tsx": "^4.19.2", "typescript": "^5.0.4", "typescript-eslint": "^7.12.0" diff --git a/test/compute.test.ts b/test/compute.test.ts index 24a5cb7..0ee5d4e 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -3,6 +3,7 @@ import { exec } from "child_process"; import path from "path"; import fs from "fs"; import util from "util"; +import stripAnsi from "strip-ansi"; import { dirname } from "path"; import { fileURLToPath } from "url"; @@ -147,38 +148,36 @@ describe("Ocean CLI Free Compute Flow", function () { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); - console.log(`Job status cmd output : ${output}`); + const cleanOutput = stripAnsi(output); + const jsonMatch = cleanOutput.match(/\[[\s\S]*\]/); - const arrayMatch = output.match(/\[[\s\S]*\]/); - if (!arrayMatch) { - console.warn("Could not find array in output, will retry..."); + if (!jsonMatch || !jsonMatch[0]) { + console.warn("โŒ Could not locate JSON in output, retrying..."); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } - console.log("Found array in output:", arrayMatch[0]); - let jobs; + + let jsonStr = jsonMatch[0].trim(); + console.log("๐Ÿ•ต๏ธ Cleaned JSON string:\n", jsonStr); + try { - let jsonStr = arrayMatch[0]; - jsonStr = jsonStr.replace(/([{,\[]\s*)([a-zA-Z0-9_]+)\s*:/g, '$1"$2":'); - jsonStr = jsonStr.replace(/'([^']*?)'/g, '"$1"'); - jobs = JSON.parse(jsonStr); - console.log("Parsed job status JSON:", jobs); + jsonStr = jsonStr + .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') // fix 'key': + .replace(/:\s*'([^']*?)'/g, ': "$1"') // fix : 'value' + .replace(/'/g, '"'); // fallback for single quotes + + const jobs = JSON.parse(jsonStr); + console.log("โœ… Parsed job status JSON:", jobs); + + if (Array.isArray(jobs) && jobs.length > 0 && jobs[0].status === 70) { + console.log("๐ŸŽ‰ Job is finished!"); + return jobs[0]; + } } catch (e) { - console.error("Failed to parse job status JSON, will retry...", e); + console.error("โŒ Failed to parse job status JSON, will retry...", e); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } - - if (Array.isArray(jobs) && jobs.length > 0) { - const job = jobs[0]; - if (job.status === 70) { - console.log("Job is finished!"); - return job; - } - } else { - console.warn("No jobs found in the output, will retry..."); - } - await new Promise((res) => setTimeout(res, pollIntervalMs)); } throw new Error( From 415d45281ada3c41437a8cbfefa4f4f67f98e772 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 17 Apr 2025 14:25:30 +0300 Subject: [PATCH 27/32] more regex --- test/compute.test.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 0ee5d4e..9abb6a3 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -148,8 +148,9 @@ describe("Ocean CLI Free Compute Flow", function () { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); + const cleanOutput = stripAnsi(output); - const jsonMatch = cleanOutput.match(/\[[\s\S]*\]/); + const jsonMatch = cleanOutput.match(/\[[\s\S]*?\}\s*\]/); if (!jsonMatch || !jsonMatch[0]) { console.warn("โŒ Could not locate JSON in output, retrying..."); @@ -157,15 +158,15 @@ describe("Ocean CLI Free Compute Flow", function () { continue; } - let jsonStr = jsonMatch[0].trim(); + const jsonStr = jsonMatch[0] + .trim() + .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') + .replace(/:\s*'([^']*?)'/g, ': "$1"') + .replace(/'/g, '"'); + console.log("๐Ÿ•ต๏ธ Cleaned JSON string:\n", jsonStr); try { - jsonStr = jsonStr - .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') // fix 'key': - .replace(/:\s*'([^']*?)'/g, ': "$1"') // fix : 'value' - .replace(/'/g, '"'); // fallback for single quotes - const jobs = JSON.parse(jsonStr); console.log("โœ… Parsed job status JSON:", jobs); @@ -174,7 +175,7 @@ describe("Ocean CLI Free Compute Flow", function () { return jobs[0]; } } catch (e) { - console.error("โŒ Failed to parse job status JSON, will retry...", e); + console.error("โŒ Still failed to parse JSON, will retry...", e); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } From 9059b1e5779148657339adc342f07cc4de9ba273 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 17 Apr 2025 14:46:48 +0300 Subject: [PATCH 28/32] debug --- test/compute.test.ts | 63 +++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 9abb6a3..5e0c341 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -137,50 +137,75 @@ describe("Ocean CLI Free Compute Flow", function () { console.log(`Job status retrieved for jobId: ${jobId}`); }); + import stripAnsi from "strip-ansi"; + const waitForJobCompletion = async ( - datasetDid, - jobId, + datasetDid: string, + jobId: string, maxWaitMs = 120000, pollIntervalMs = 5000 - ) => { + ): Promise => { const start = Date.now(); + + // Helper to extract full JSON array + function extractFullJsonArray(output: string): string | null { + const startIndex = output.indexOf("["); + if (startIndex === -1) return null; + + let bracketCount = 0; + for (let i = startIndex; i < output.length; i++) { + if (output[i] === "[") bracketCount++; + if (output[i] === "]") bracketCount--; + + if (bracketCount === 0) return output.slice(startIndex, i + 1); + } + + return null; + } + while (Date.now() - start < maxWaitMs) { const output = await runCommand( `npm run cli getJobStatus --dataset ${datasetDid} --job ${jobId}` ); + console.log("[CMD]: getJobStatus"); + console.log("[OUTPUT]:\n", output); const cleanOutput = stripAnsi(output); - const jsonMatch = cleanOutput.match(/\[[\s\S]*?\}\s*\]/); + const jsonStr = extractFullJsonArray(cleanOutput); - if (!jsonMatch || !jsonMatch[0]) { - console.warn("โŒ Could not locate JSON in output, retrying..."); + if (!jsonStr) { + console.warn("โŒ Could not locate full JSON in output, retrying..."); await new Promise((res) => setTimeout(res, pollIntervalMs)); continue; } - const jsonStr = jsonMatch[0] - .trim() - .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') - .replace(/:\s*'([^']*?)'/g, ': "$1"') - .replace(/'/g, '"'); + try { + const cleanedJson = jsonStr + .replace(/([{,]\s*)'([^']+?)'\s*:/g, '$1"$2":') + .replace(/:\s*'([^']*?)'/g, ': "$1"') + .replace(/'/g, '"'); - console.log("๐Ÿ•ต๏ธ Cleaned JSON string:\n", jsonStr); + console.log("๐Ÿ•ต๏ธ Cleaned JSON string:\n", cleanedJson); - try { - const jobs = JSON.parse(jsonStr); + const jobs = JSON.parse(cleanedJson); console.log("โœ… Parsed job status JSON:", jobs); - if (Array.isArray(jobs) && jobs.length > 0 && jobs[0].status === 70) { - console.log("๐ŸŽ‰ Job is finished!"); - return jobs[0]; + if (Array.isArray(jobs) && jobs.length > 0) { + const job = jobs[0]; + if (job.status === 70) { + console.log("๐ŸŽ‰ Job is finished!"); + return job; + } + } else { + console.warn("โš ๏ธ No jobs found in the parsed JSON, will retry..."); } } catch (e) { console.error("โŒ Still failed to parse JSON, will retry...", e); - await new Promise((res) => setTimeout(res, pollIntervalMs)); - continue; } + await new Promise((res) => setTimeout(res, pollIntervalMs)); } + throw new Error( `Job ${jobId} did not finish within ${maxWaitMs / 1000} seconds` ); From ed940f434ac8959f69a5126a6dcf814e82154b43 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 17 Apr 2025 14:53:56 +0300 Subject: [PATCH 29/32] cleanup --- test/compute.test.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/compute.test.ts b/test/compute.test.ts index 5e0c341..43c88f0 100644 --- a/test/compute.test.ts +++ b/test/compute.test.ts @@ -137,8 +137,6 @@ describe("Ocean CLI Free Compute Flow", function () { console.log(`Job status retrieved for jobId: ${jobId}`); }); - import stripAnsi from "strip-ansi"; - const waitForJobCompletion = async ( datasetDid: string, jobId: string, @@ -147,7 +145,6 @@ describe("Ocean CLI Free Compute Flow", function () { ): Promise => { const start = Date.now(); - // Helper to extract full JSON array function extractFullJsonArray(output: string): string | null { const startIndex = output.indexOf("["); if (startIndex === -1) return null; From b46ba69f5f6a73393ec8366ec65019206049d75c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 17 Apr 2025 15:31:33 +0300 Subject: [PATCH 30/32] print ocean logs --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3763482..eeaad9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,7 @@ jobs: run: | npm ci npm run build - npm run start & + npm run start > ocean-node.log 2>&1 & env: PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} IPFS_GATEWAY: http://172.15.0.16:8080/ @@ -161,3 +161,9 @@ jobs: INDEXING_MAX_RETRIES: 120 NODE_URL: "http://127.0.0.1:8001" AVOID_LOOP_RUN: true + + - name: Print Ocean Node Logs if tests fail + if: ${{ failure() }} + run: | + echo "========== Ocean Node Logs ==========" + tac ${{ github.workspace }}/ocean-node/ocean-node.log || echo "Log file not found" From 9b7ecec9507560fd672e2cb1c106dcd6b76ca695 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 23 Apr 2025 12:13:08 +0300 Subject: [PATCH 31/32] use node branch from barge --- .github/workflows/ci.yml | 61 ++++++---------------------------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eeaad9c..88e7f96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,6 +71,7 @@ jobs: with: repository: "oceanprotocol/barge" path: "barge" + ref: "feature/barge_with_node" - name: Login to Docker Hub if: ${{ env.DOCKERHUB_PASSWORD && env.DOCKERHUB_USERNAME }} @@ -81,10 +82,11 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Run Barge + - name: Run Barge (Ocean Node enabled) working-directory: ${{ github.workspace }}/barge run: | - bash -x start_ocean.sh --no-aquarius --no-provider --no-dashboard --with-c2d --with-typesense 2>&1 > start_ocean.log & + bash -x start_ocean.sh --with-node --no-aquarius --no-provider --no-dashboard --with-typesense 2>&1 > start_ocean.log & + - run: npm ci - run: npm run build - run: docker image ls @@ -101,59 +103,20 @@ jobs: docker image rm -f moby/buildkit:latest rm -rf /usr/share/swift/ - - name: Wait for contracts deployment and C2D cluster to be ready + - name: Wait for contracts deployment, C2D cluster, and Ocean Node to be ready working-directory: ${{ github.workspace }}/barge run: | for i in $(seq 1 250); do sleep 10 - [ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" -a -f "$HOME/.ocean/ocean-c2d/ready" ] && break + [ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && \ + docker ps | grep -q ocean_node_1 && \ + curl --output /dev/null --silent --head --fail "http://localhost:8001" && break done - name: docker logs - run: docker logs ocean_ocean-contracts_1 && docker logs ocean_kindcluster_1 && docker logs ocean_computetodata_1 && docker logs ocean_typesense_1 + run: docker logs ocean_ocean-contracts_1 && docker logs ocean_kindcluster_1 && docker logs ocean_computetodata_1 && docker logs ocean_typesense_1 && docker logs ocean_node_1 if: ${{ failure() }} - - name: Checkout Ocean Node - uses: actions/checkout@v3 - with: - repository: "oceanprotocol/ocean-node" - path: "ocean-node" - ref: "main" - - - name: Start Ocean Node - working-directory: ${{ github.workspace }}/ocean-node - run: | - npm ci - npm run build - npm run start > ocean-node.log 2>&1 & - env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - IPFS_GATEWAY: http://172.15.0.16:8080/ - ARWEAVE_GATEWAY: https://arweave.net/ - P2P_ipV4BindTcpPort: 8000 - HTTP_API_PORT: 8001 - RPCS: '{ "8996": {"rpc": "http://127.0.0.1:8545", "chainId": 8996, "network": "development", "chunkSize": 100} }' - DB_URL: "http://localhost:9200" - DB_TYPE: "elasticsearch" - FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }' - FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }' - AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]' - AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]' - ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' - MAX_REQ_PER_MINUTE: 320 - MAX_CONNECTIONS_PER_MINUTE: 500 - DOCKER_COMPUTE_ENVIRONMENTS: '[{"socketPath":"/var/run/docker.sock","resources":[{"id":"disk","total":1000000000}],"storageExpiry":604800,"maxJobDuration":3600,"fees":{"1":[{"feeToken":"0x123","prices":[{"id":"cpu","price":1}]}]},"free":{"maxJobDuration":60,"maxJobs":3,"resources":[{"id":"cpu","max":1},{"id":"ram","max":1000000000},{"id":"disk","max":1000000000}]}}]' - - name: Check Ocean Node is running - run: | - for i in $(seq 1 30); do - if curl --output /dev/null --silent --head --fail "http://localhost:8001"; then - echo "Ocean Node is up" - exit 0 - fi - sleep 10 - done - echo "Ocean Node did not start in time" - exit 1 - name: Run system tests run: npm run test:system env: @@ -161,9 +124,3 @@ jobs: INDEXING_MAX_RETRIES: 120 NODE_URL: "http://127.0.0.1:8001" AVOID_LOOP_RUN: true - - - name: Print Ocean Node Logs if tests fail - if: ${{ failure() }} - run: | - echo "========== Ocean Node Logs ==========" - tac ${{ github.workspace }}/ocean-node/ocean-node.log || echo "Log file not found" From 020c9bf04545a16b2b3c73b9d82a8186bc8fd3dd Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 23 Apr 2025 15:51:26 +0300 Subject: [PATCH 32/32] add more logs and details --- .github/workflows/ci.yml | 68 +++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88e7f96..1632535 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: - name: Run Barge (Ocean Node enabled) working-directory: ${{ github.workspace }}/barge run: | - bash -x start_ocean.sh --with-node --no-aquarius --no-provider --no-dashboard --with-typesense 2>&1 > start_ocean.log & + bash -x start_ocean.sh --no-aquarius --no-provider --no-dashboard --with-typesense 2>&1 > start_ocean.log & - run: npm ci - run: npm run build @@ -103,19 +103,71 @@ jobs: docker image rm -f moby/buildkit:latest rm -rf /usr/share/swift/ - - name: Wait for contracts deployment, C2D cluster, and Ocean Node to be ready + - name: Wait for services with detailed logging working-directory: ${{ github.workspace }}/barge run: | - for i in $(seq 1 250); do + # Start log tail in background + tail -f start_ocean.log & + TAIL_PID=$! + + # Wait for services with status reporting + for i in {1..50}; do + echo "=== Check attempt $i/50 ===" + + # Check contract deployment + CONTRACTS_READY=$([ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && echo "yes" || echo "no") + + # Check Node container status + NODE_CONTAINER=$(docker ps -q --filter "name=ocean_node") + NODE_RUNNING=$([ -n "$NODE_CONTAINER" ] && echo "yes" || echo "no") + + # Check Node health endpoint + NODE_HEALTH=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8001/health || true) + + echo "Contracts ready: $CONTRACTS_READY" + echo "Node container running: $NODE_RUNNING" + echo "Node health status: $NODE_HEALTH" + + # If container exists but isn't healthy, show logs immediately + if [ "$NODE_RUNNING" = "yes" ] && [ "$NODE_HEALTH" != "200" ]; then + echo "Node container found but unhealthy. Current logs:" + docker logs ocean_node_1 --tail 50 || true + exit 1 + fi + + # Exit condition + if [ "$CONTRACTS_READY" = "yes" ] && [ "$NODE_RUNNING" = "yes" ] && [ "$NODE_HEALTH" = "200" ]; then + echo "All services operational!" + kill $TAIL_PID + exit 0 + fi + sleep 10 - [ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && \ - docker ps | grep -q ocean_node_1 && \ - curl --output /dev/null --silent --head --fail "http://localhost:8001" && break done - - name: docker logs - run: docker logs ocean_ocean-contracts_1 && docker logs ocean_kindcluster_1 && docker logs ocean_computetodata_1 && docker logs ocean_typesense_1 && docker logs ocean_node_1 + # Timeout handling + echo "!!! Service startup timed out !!!" + echo "=== Barge startup log ===" + cat start_ocean.log + echo "\n=== Node container logs ===" + docker logs ocean_node_1 --tail 1000 || echo "No node container found" + echo "\n=== Docker compose status ===" + docker compose -f docker-compose.yml ps + exit 1 + + - name: Capture failure logs if: ${{ failure() }} + run: | + echo "=== Full Docker Container List ===" + docker ps -a + echo "\n=== Barge Docker Compose Logs ===" + docker compose -f ${{ github.workspace }}/barge/docker-compose.yml logs --no-color --tail=1000 + echo "\n=== Node Container Logs ===" + docker logs ocean_node_1 --tail 1000 2>&1 || echo "No node container logs available" + echo "\n=== Contracts Container Logs ===" + docker logs ocean_ocean-contracts_1 --tail 1000 2>&1 || echo "No contracts container logs available" + echo "\n=== C2D Container Logs ===" + docker logs ocean_computetodata_1 --tail 1000 2>&1 || echo "No C2D container logs available" - name: Run system tests run: npm run test:system