Comparing version 0.0.42 to 0.0.43
@@ -18,3 +18,3 @@ let doExecSync = null; | ||
class SuiCliCommands { | ||
static async spawn(command, envVars = {}) { | ||
static async spawn(command, params = [], envVars = {}) { | ||
if (!doSpawn) { | ||
@@ -27,3 +27,3 @@ throw new Error('can not spawn a proccess in this env'); | ||
let e = null; | ||
const proc = doSpawn(command, [], { | ||
const proc = doSpawn(command, params, { | ||
env: { | ||
@@ -30,0 +30,0 @@ ...process.env, |
@@ -20,2 +20,4 @@ // const { spawn } = require('child_process'); | ||
this._epochDuration = params.epochDuration || null; | ||
this._providerName = 'sui:localnet'; | ||
@@ -64,3 +66,8 @@ } | ||
try { | ||
this._child = await SuiCliCommands.spawn('sui-test-validator', { RUST_LOG: 'consensus=off' }); | ||
const params = []; | ||
if (this._epochDuration) { | ||
params.push('--epoch-duration-ms'); | ||
params.push(this._epochDuration); | ||
} | ||
this._child = await SuiCliCommands.spawn('sui-test-validator', params, { RUST_LOG: 'consensus=off' }); | ||
} catch (e) { | ||
@@ -67,0 +74,0 @@ if (this._testFallbackEnabled) { |
{ | ||
"name": "suidouble", | ||
"version": "0.0.42", | ||
"version": "0.0.43", | ||
"description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -324,3 +324,3 @@ # suidouble | ||
const provider = 'local';// or await SuiLocalTestValidator.launch({debug: true}); | ||
const provider = 'local';// or await SuiLocalTestValidator.launch({debug: true, epochDuration: 30000}); | ||
@@ -327,0 +327,0 @@ const suiMaster = new SuiMaster({ debug: true, as: 'admin', provider: provider, }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212212
3286
68
6
21
1