Comparing version 0.4.0 to 0.4.1
@@ -18,12 +18,15 @@ import parseArgs from 'minimist'; | ||
const rimraf = file => pspawn('rm', ['-rf', file]); | ||
const subdirs = ['_agstate/agoric-servers', 'contract', 'api'].sort() | ||
if (opts.sdk) { | ||
const sdkNodeModules = path.resolve(__dirname, '../../../node_modules'); | ||
await Promise.all( | ||
['_agstate/agoric-servers', 'contract', 'api'].sort().map(subdir => { | ||
subdirs.map(subdir => { | ||
const nm = `${subdir}/node_modules`; | ||
log(chalk.bold.green(`link SDK ${nm}`)); | ||
return fs | ||
.unlink(nm) | ||
.catch(_ => {}) | ||
.then(_ => fs.symlink(sdkNodeModules, nm)); | ||
log(chalk.bold.green(`removing ${nm}`)); | ||
return rimraf(nm).then(_ => { | ||
log(chalk.bold.green(`link SDK ${nm}`)); | ||
return fs.symlink(sdkNodeModules, nm); | ||
}); | ||
}), | ||
@@ -33,17 +36,29 @@ ); | ||
log(chalk.bold.green(`link SDK _agstate/agoric-wallet`)); | ||
await fs.unlink(`_agstate/agoric-wallet`).catch(_ => {}); | ||
await rimraf('_agstate/agoric-wallet'); | ||
const agWallet = path.resolve(__dirname, '../agoric-wallet-build'); | ||
try { | ||
const agWallet = path.resolve(__dirname, '../../frontend-wallet/build'); | ||
await fs.stat(`${agWallet}/index.html`); | ||
await fs.symlink(agWallet, `_agstate/agoric-wallet`); | ||
} catch (e) { | ||
const agWallet = path.resolve(__dirname, '../agoric-wallet-build'); | ||
await fs.symlink(agWallet, `_agstate/agoric-wallet`); | ||
} | ||
} else if (await pspawn('yarn', ['install'], { stdio: 'inherit' })) { | ||
// Try to install via Yarn. | ||
log.error('Cannot yarn install'); | ||
return 1; | ||
} else { | ||
// Delete any symlinks. | ||
await Promise.all( | ||
subdirs.map(subdir => { | ||
const nm = `${subdir}/node_modules`; | ||
log(chalk.bold.green(`removing ${nm}`)); | ||
return fs.unlink(nm).catch(_ => {}); | ||
}), | ||
); | ||
if (await pspawn('yarn', ['install'], { stdio: 'inherit' })) { | ||
// Try to install via Yarn. | ||
log.error('Cannot yarn install'); | ||
return 1; | ||
} | ||
// FIXME: Copy the agoric-wallet-build more portably | ||
log(chalk.bold.green(`copy bundled _agstate/agoric-wallet`)); | ||
await rimraf('_agstate/agoric-wallet'); | ||
const agWallet = path.resolve(__dirname, '../agoric-wallet-build'); | ||
@@ -54,4 +69,4 @@ if (await pspawn('cp', ['-a', agWallet, '_agstate/agoric-wallet'])) { | ||
} | ||
log(chalk.bold.green('Done installing')); | ||
log.info(chalk.bold.green('Done installing')); | ||
return 0; | ||
} |
{ | ||
"name": "agoric", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Manage the Agoric Javascript smart contract platform", | ||
@@ -53,4 +53,3 @@ "main": "lib/main.js", | ||
}, | ||
"homepage": "https://github.com/Agoric/agoric-sdk#readme", | ||
"gitHead": "0528854d8b033fff0ab9328ab7df31e70cdc1d39" | ||
"homepage": "https://github.com/Agoric/agoric-sdk#readme" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36032
12
526
0