file-lane 2.0.6-beta.22 → 2.0.6-beta.24

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.
Files changed (2) hide show
  1. package/lib/FileLane.js +7 -2
  2. package/package.json +3 -3
package/lib/FileLane.js CHANGED
@@ -303,7 +303,11 @@ class FileLane {
303
303
  }
304
304
  const hasError = logs.find(item => item.level && [_sharedUtils.Loglevel.ERROR, _sharedUtils.Loglevel.THROW].includes(item.level));
305
305
  if (hasError) {
306
- onError?.();
306
+ if (onError) {
307
+ onError();
308
+ } else {
309
+ throw new Error('');
310
+ }
307
311
  }
308
312
  }
309
313
  async writeFiles(fileList) {
@@ -395,7 +399,8 @@ class FileLane {
395
399
  context: this.context,
396
400
  config: this.config,
397
401
  compilerOption: this.compilerOption,
398
- compilation: this.compilation
402
+ compilation: this.compilation,
403
+ onLog: logs => this.handlerLogs(logs)
399
404
  });
400
405
  }
401
406
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-lane",
3
- "version": "2.0.6-beta.22",
3
+ "version": "2.0.6-beta.24",
4
4
  "description": "File conversion tool, can be one-to-one, one to N, N to one",
5
5
  "keywords": [
6
6
  "file",
@@ -20,12 +20,12 @@
20
20
  "test": "node ./__tests__/file-lane.test.js"
21
21
  },
22
22
  "dependencies": {
23
- "@aiot-toolkit/shared-utils": "2.0.6-beta.22",
23
+ "@aiot-toolkit/shared-utils": "2.0.6-beta.24",
24
24
  "chokidar": "^3.6.0",
25
25
  "fs-extra": "^11.2.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/fs-extra": "^11.0.4"
29
29
  },
30
- "gitHead": "36e03348be739bca8665d981ce33d4d3f8cc4df5"
30
+ "gitHead": "1f581c8e2d25fd2bdc0cbf79970df196c8b38e26"
31
31
  }