From 60622eac50c812befd91e737ffa760381ce25566 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 17 Mar 2026 08:10:45 +0200 Subject: [PATCH 1/3] use latest ocean.js --- package-lock.json | 8 ++++---- package.json | 2 +- src/commands.ts | 4 +--- test/consumeFlow.test.ts | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2d2d56..7dd4fd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@oasisprotocol/sapphire-paratime": "^1.3.2", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", - "@oceanprotocol/lib": "^6.0.0", + "@oceanprotocol/lib": "^6.1.0", "commander": "^13.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -3256,9 +3256,9 @@ } }, "node_modules/@oceanprotocol/lib": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-6.0.0.tgz", - "integrity": "sha512-nXlZe/Ka6oyRDVcgwfG+grtDXGB3xLzPOXdh3LS5xE7EwsNcPj+0HXFsQUuPhofyCojpueQbpSLIkeXEvGulsw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-6.1.0.tgz", + "integrity": "sha512-3hRK6bYdYDjrDsi41kgQEhIVFPhD6I2KcDZ9rvuAqJugq7hzDeC7CCzXu4g4KbIiOR9LftV7AcJeJ/5i+xKbXg==", "license": "Apache-2.0", "dependencies": { "@oasisprotocol/sapphire-paratime": "^1.3.2", diff --git a/package.json b/package.json index cef0aeb..9848768 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@oasisprotocol/sapphire-paratime": "^1.3.2", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", - "@oceanprotocol/lib": "^6.0.0", + "@oceanprotocol/lib": "^6.1.0", "commander": "^13.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", diff --git a/src/commands.ts b/src/commands.ts index d5e972b..ce64146 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -6,7 +6,6 @@ import { updateAssetMetadata, downloadFile, isOrderable, - getMetadataURI, getIndexingWaitSettings, IndexerWaitParams, fixAndParseProviderFees, @@ -16,7 +15,6 @@ import { Aquarius, ComputeAlgorithm, ComputeJob, - ComputeOutput, Config, ConfigHelper, Datatoken, @@ -86,7 +84,7 @@ export class Commands { asset.indexedMetadata.nft.name, asset.indexedMetadata.nft.symbol, this.signer, - asset.services[0].files, + asset.services[0].files.files, asset, this.oceanNodeUrl, this.config, diff --git a/test/consumeFlow.test.ts b/test/consumeFlow.test.ts index 94545c5..0f7e25d 100644 --- a/test/consumeFlow.test.ts +++ b/test/consumeFlow.test.ts @@ -53,8 +53,7 @@ describe("Ocean CLI Publishing", function() { process.env.ADDRESS_FILE = path.join(process.env.HOME || "", ".ocean/ocean-contracts/artifacts/address.json"); const output = await runCommand(`npm run cli publish ${metadataFile}`); - - const jsonMatch = output.match(/did:op:[a-f0-9]{64}/); + const jsonMatch = output.match(/did:op:[a-f0-9]{64}/); if (!jsonMatch) { console.error("Raw output:", output); throw new Error("Could not find did in the output"); From 545961f76feb621373a60ea11a6391b79d9eec56 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 17 Mar 2026 08:26:26 +0200 Subject: [PATCH 2/3] fix algo publish --- src/commands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.ts b/src/commands.ts index ce64146..4f987ae 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -100,7 +100,7 @@ export class Commands { } public async publishAlgo(args: string[]) { - let algoAsset: Asset; + let algoAsset; try { algoAsset = JSON.parse(fs.readFileSync(args[1], "utf8")); } catch (e) { @@ -115,7 +115,7 @@ export class Commands { algoAsset.indexedMetadata.nft.name, algoAsset.indexedMetadata.nft.symbol, this.signer, - algoAsset.services[0].files, + algoAsset.services[0].files.files, algoAsset, this.oceanNodeUrl, this.config, From c6184fe9c699e0edab3b015331e70ff4da2d406b Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 17 Mar 2026 08:28:00 +0200 Subject: [PATCH 3/3] fix lint --- src/commands.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/commands.ts b/src/commands.ts index 4f987ae..7a1ee00 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -29,7 +29,6 @@ import { AccesslistFactory, AccessListContract, } from "@oceanprotocol/lib"; -import { Asset } from "@oceanprotocol/ddo-js"; import { Signer, ethers, getAddress } from "ethers"; import { interactiveFlow } from "./interactiveFlow.js"; import { publishAsset } from "./publishAsset.js";