@@ -5,6 +5,7 @@ import chalk from 'chalk';
55import { stdin as input , stdout as output } from 'node:process' ;
66import { createInterface } from 'readline/promises' ;
77import { unitsToAmount } from '@oceanprotocol/lib' ;
8+ import { toBoolean } from './helpers.js' ;
89
910async function initializeSigner ( ) {
1011
@@ -194,15 +195,14 @@ export async function createCLI() {
194195 . option ( '--maxJobDuration <maxJobDuration>' , 'Compute maxJobDuration' )
195196 . option ( '-t, --token <paymentToken>' , 'Compute payment token' )
196197 . option ( '--resources <resources>' , 'Compute resources' )
197- . option ( '--accept [boolean]' , 'Automatically approve payment and start job without prompt ' , true )
198+ . option ( '--accept [boolean]' , 'Auto-confirm payment for compute job (true/false) ' , toBoolean )
198199 . action ( async ( datasetDids , algoDid , computeEnvId , maxJobDuration , paymentToken , resources , options ) => {
199200 const dsDids = options . datasets || datasetDids ;
200201 const aDid = options . algo || algoDid ;
201202 const envId = options . env || computeEnvId ;
202203 const jobDuration = options . maxJobDuration || maxJobDuration ;
203204 const token = options . token || paymentToken ;
204205 const res = options . resources || resources ;
205- console . log ( `proceed: ` , options . accept ) ;
206206 if ( ! dsDids || ! aDid || ! envId || ! jobDuration || ! token || ! res ) {
207207 console . error ( chalk . red ( 'Missing required arguments' ) ) ;
208208 // process.exit(1);
0 commit comments