ic-mops 0.12.1 → 0.12.3

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/commands/test.js CHANGED
@@ -105,7 +105,7 @@ export async function runAll(filter = '') {
105
105
  file !== files[0] && console.log('-'.repeat(50));
106
106
  console.log(`Running ${chalk.gray(absToRel(file))}`);
107
107
 
108
- let proc = spawn(mocPath, ['-r', '-wasi-system-api', '-ref-system-api', '--hide-warnings', '--error-detail=2', ...sourcesArr.join(' ').split(' '), file]);
108
+ let proc = spawn(mocPath, ['-r', '-wasi-system-api', '-ref-system-api', '--hide-warnings', '--error-detail=2', ...sourcesArr.join(' ').split(' '), file].filter(x => x));
109
109
 
110
110
  // stdout
111
111
  proc.stdout.on('data', (data) => {
package/mops.js CHANGED
@@ -125,7 +125,7 @@ export function checkConfigFile() {
125
125
 
126
126
  export function progressBar(step, total) {
127
127
  let done = Math.round(step / total * 10);
128
- return `[${':'.repeat(done)}${' '.repeat(10 - done)}]`;
128
+ return `[${':'.repeat(done)}${' '.repeat(Math.max(0, 10 - done))}]`;
129
129
  }
130
130
 
131
131
  export async function getHighestVersion(pkgName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "cli.js"
@@ -18,7 +18,7 @@ jobs:
18
18
  node-version: 18
19
19
  - uses: aviate-labs/setup-dfx@v0.2.3
20
20
  with:
21
- dfx-version: 0.13.1
21
+ dfx-version: 0.14.0
22
22
 
23
23
  - name: install dfx
24
24
  run: dfx cache install
package/vessel.js CHANGED
@@ -77,6 +77,9 @@ export const downloadFromGithub = async (repo, dest, onProgress = null) => {
77
77
  const readStream = got.stream(zipFile);
78
78
 
79
79
  const promise = new Promise((resolve, reject) => {
80
+ readStream.on('error', (err) => {
81
+ reject(err);
82
+ });
80
83
 
81
84
  readStream.on('downloadProgress', ({transferred, total}) => {
82
85
  onProgress?.(transferred, total || 2 * (1024 ** 2));
@@ -153,10 +156,14 @@ export const installFromGithub = async (name, repo, options = {}) => {
153
156
  };
154
157
 
155
158
  progress(0, 2 * (1024 ** 2));
156
- await downloadFromGithub(repo, dir, progress).catch((err) => {
159
+
160
+ try {
161
+ await downloadFromGithub(repo, dir, progress);
162
+ }
163
+ catch (err) {
157
164
  del.sync([dir]);
158
- console.log(chalk.red('Error: ') + err);
159
- });
165
+ throw err;
166
+ }
160
167
 
161
168
  // add to cache
162
169
  await addCache(cacheName, dir);