@biuxiu/codegen 0.2.4 → 0.2.5

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { genLuaTypes } from './gen-type';
2
2
  import { ConfigType } from './config';
3
- declare function startRun(filePath: string, config?: ConfigType): Promise<void>;
3
+ declare function startRun(filePath: string, config?: ConfigType): Promise<undefined>;
4
4
  export { startRun, genLuaTypes };
package/dist/index.js CHANGED
@@ -34,10 +34,10 @@ async function startRun(filePath, config) {
34
34
  const data = await (0, import_compile.compileToByte)(filePath);
35
35
  (0, import_lua_codegen.run)(new Uint8Array(data), filePath);
36
36
  } catch (error) {
37
- console.error(error);
37
+ return Promise.reject(error);
38
38
  }
39
39
  } else {
40
- console.error(`${filePath}\u6587\u4EF6\u5B58\u5728`);
40
+ return Promise.reject(`${filePath}\u6587\u4EF6\u5B58\u5728`);
41
41
  }
42
42
  }
43
43
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biuxiu/codegen",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "代码生成工具",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {