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..7a1ee00 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, @@ -31,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"; @@ -86,7 +83,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, @@ -102,7 +99,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) { @@ -117,7 +114,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, 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");