ic-mops 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Mops CLI Changelog
2
2
 
3
+ ## 1.6.0
4
+ - Add support for `.bash_profile` and `.zprofile` files to `mops toolchain init` command
5
+
3
6
  ## 1.5.1
4
7
  - Collapsible output of `mops bench` in a CI environment
5
8
  - Fix regression in `mops bench` without `dfx.json` file (by @rvanasa)
package/bundle/cli.tgz CHANGED
Binary file
@@ -79,13 +79,16 @@ async function init({reset = false, silent = false} = {}) {
79
79
 
80
80
  let zshrc = path.join(os.homedir(), '.zshrc');
81
81
  let bashrc = path.join(os.homedir(), '.bashrc');
82
+ let bashProfile = path.join(os.homedir(), '.bash_profile');
83
+ let zprofile = path.join(os.homedir(), '.zprofile');
82
84
 
83
- let shellConfigFiles = [bashrc, zshrc, process.env.GITHUB_ENV || ''].map(x => x).filter((file) => {
85
+ let shellConfigFiles = [bashrc, zshrc, bashProfile, zprofile, process.env.GITHUB_ENV || ''].map(x => x).filter((file) => {
84
86
  return fs.existsSync(file);
85
87
  });
86
88
 
87
89
  if (shellConfigFiles.length === 0) {
88
- console.error('Shell config files not found: ".bashrc" or ".zshrc"');
90
+ console.error('Shell config files not found: .bashrc, .zshrc, .bash_profile, .zprofile');
91
+ console.log('TIP: You can add "export DFX_MOC_PATH=moc-wrapper" to your shell config file manually to initialize Mops toolchain');
89
92
  process.exit(1);
90
93
  }
91
94
 
@@ -71,11 +71,14 @@ async function init({ reset = false, silent = false } = {}) {
71
71
  catch { }
72
72
  let zshrc = path.join(os.homedir(), '.zshrc');
73
73
  let bashrc = path.join(os.homedir(), '.bashrc');
74
- let shellConfigFiles = [bashrc, zshrc, process.env.GITHUB_ENV || ''].map(x => x).filter((file) => {
74
+ let bashProfile = path.join(os.homedir(), '.bash_profile');
75
+ let zprofile = path.join(os.homedir(), '.zprofile');
76
+ let shellConfigFiles = [bashrc, zshrc, bashProfile, zprofile, process.env.GITHUB_ENV || ''].map(x => x).filter((file) => {
75
77
  return fs.existsSync(file);
76
78
  });
77
79
  if (shellConfigFiles.length === 0) {
78
- console.error('Shell config files not found: ".bashrc" or ".zshrc"');
80
+ console.error('Shell config files not found: .bashrc, .zshrc, .bash_profile, .zprofile');
81
+ console.log('TIP: You can add "export DFX_MOC_PATH=moc-wrapper" to your shell config file manually to initialize Mops toolchain');
79
82
  process.exit(1);
80
83
  }
81
84
  // update all existing shell config files
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "bin/mops.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "dist/bin/mops.js",