lark-docx2md 0.5.1 → 0.5.2
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/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as setLogLevel, t as convert } from "./converter-
|
|
2
|
+
import { r as setLogLevel, t as convert } from "./converter-vuRwWoA4.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { LoggerLevel } from "@larksuiteoapi/node-sdk";
|
|
5
5
|
//#region src/cli.ts
|
|
@@ -93,11 +93,8 @@ function createClient(appId, appSecret, loggerLevel = LoggerLevel.warn) {
|
|
|
93
93
|
await resp.writeFile(filename);
|
|
94
94
|
return filename;
|
|
95
95
|
} catch (error) {
|
|
96
|
-
if ([
|
|
97
|
-
|
|
98
|
-
401,
|
|
99
|
-
403
|
|
100
|
-
].includes(error.status)) throw new Error(`下载图片[${imgToken}]异常, 检查是否有接口 https://open.feishu.cn/document/server-docs/docs/drive-v1/media/download 的权限。`);
|
|
96
|
+
if (error.status === 401) throw new Error(`下载图片[${imgToken}]异常, 检查是否有接口 https://open.feishu.cn/document/server-docs/docs/drive-v1/media/download 的权限`);
|
|
97
|
+
if (error.status === 403) throw new Error(`下载图片[${imgToken}]异常, 应用的文档权限大于等于文档本身“谁可以创建副本、打印和下载”的权限`);
|
|
101
98
|
throw error;
|
|
102
99
|
}
|
|
103
100
|
}
|
|
@@ -3138,4 +3135,4 @@ async function convert(opts) {
|
|
|
3138
3135
|
//#endregion
|
|
3139
3136
|
export { parseWikiUrl as n, setLogLevel as r, convert as t };
|
|
3140
3137
|
|
|
3141
|
-
//# sourceMappingURL=converter-
|
|
3138
|
+
//# sourceMappingURL=converter-vuRwWoA4.js.map
|