file-lane 2.0.5-beta.10 → 2.0.5-beta.13

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/lib/FileLane.js CHANGED
@@ -418,7 +418,10 @@ class FileLane {
418
418
  context: this.context,
419
419
  config: this.config,
420
420
  compilerOption: this.compilerOption,
421
- compalition: this.compilation
421
+ compalition: this.compilation,
422
+ onLog: logs => this.handlerLogs(logs, () => {
423
+ throw new Error(`${item.workerDescribe} error}`);
424
+ })
422
425
  });
423
426
  this.handlerLogs([{
424
427
  level: _sharedUtils.Loglevel.INFO,
@@ -1,4 +1,4 @@
1
- import { MatchType } from '@aiot-toolkit/shared-utils';
1
+ import { ILog, MatchType } from '@aiot-toolkit/shared-utils';
2
2
  import IFileLaneContext from './IFileLaneContext';
3
3
  import ILoader from './ILoader';
4
4
  import IPlugin from './IPlugin';
@@ -114,6 +114,7 @@ type CompileParam<O = any> = {
114
114
  config: IFileLaneConfig;
115
115
  compilerOption?: O;
116
116
  compalition?: FileLaneCompilation;
117
+ onLog?: (log: ILog[]) => void;
117
118
  };
118
119
  export type BeforeWork = (context: IFileLaneContext) => Promise<any>;
119
120
  export type PreWork<O = any> = (preWorkParams: CompileParam<O>) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-lane",
3
- "version": "2.0.5-beta.10",
3
+ "version": "2.0.5-beta.13",
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.5-beta.10",
23
+ "@aiot-toolkit/shared-utils": "2.0.5-beta.13",
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": "b2403dbd071d5a6ae33b27f49c6f47ba95861477"
30
+ "gitHead": "45bca4420e8a8708733eccea32bf928b4821f4d5"
31
31
  }