File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 getIndexingWaitSettings ,
1111 IndexerWaitParams ,
1212 isEthersFormat ,
13+ stringifyResources ,
1314} from "./helpers.js" ;
1415import {
1516 Aquarius ,
@@ -31,6 +32,7 @@ import { Asset } from '@oceanprotocol/ddo-js';
3132import { Signer , ethers } from "ethers" ;
3233import { interactiveFlow } from "./interactiveFlow.js" ;
3334import { publishAsset } from "./publishAsset.js" ;
35+ import { stringify } from "querystring" ;
3436
3537export class Commands {
3638 public signer : Signer ;
@@ -1068,7 +1070,13 @@ export class Commands {
10681070 ) ;
10691071 return ;
10701072 }
1071- console . log ( "Exiting compute environments: " , computeEnvs ) ;
1073+ const parsedComputeEnvs = [ ] ;
1074+ for ( const env of computeEnvs ) {
1075+ const stringified = stringifyResources ( env ) ;
1076+ parsedComputeEnvs . push ( stringified ) ;
1077+ }
1078+
1079+ console . log ( "Exiting compute environments: " , parsedComputeEnvs ) ;
10721080 }
10731081
10741082 public async computeStreamableLogs ( args : string [ ] ) {
Original file line number Diff line number Diff line change @@ -506,4 +506,16 @@ export function getIndexingWaitSettings(): IndexerWaitParams {
506506 }
507507
508508 return indexingParams
509+ }
510+
511+ export function stringifyResources ( obj ) {
512+ for ( const key in obj ) {
513+ if ( obj [ key ] && typeof obj [ key ] === 'object' ) {
514+ if ( key === 'resources' && Array . isArray ( obj [ key ] ) ) {
515+ obj [ key ] = obj [ key ] . map ( item => JSON . stringify ( item ) ) ;
516+ } else {
517+ stringifyResources ( obj [ key ] ) ;
518+ }
519+ }
520+ }
509521}
You can’t perform that action at this time.
0 commit comments