@biuxiu/codegen 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/gen-type.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/gen-type.js
CHANGED
@@ -48,7 +48,7 @@ const genLuaTypes = async (path) => {
|
|
48
48
|
if (content.length > 0) {
|
49
49
|
const settionObj = JSON.parse(content);
|
50
50
|
settionObj["Lua.workspace.library"] = types.map(
|
51
|
-
(t) =>
|
51
|
+
(t) => `.vscode/${t}-type.lua`
|
52
52
|
);
|
53
53
|
(0, import_util.writeFormatFile)(settingPath, JSON.stringify(settionObj), true);
|
54
54
|
}
|
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<
|
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
|
-
|
37
|
+
return Promise.reject(error);
|
38
38
|
}
|
39
39
|
} else {
|
40
|
-
|
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:
|