@lark-apaas/client-toolkit-lite 1.1.5 → 1.1.6
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.cjs +5 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -374,26 +374,18 @@ function splitWorkspaceUrl(fullUrl) {
|
|
|
374
374
|
__name(splitWorkspaceUrl, "splitWorkspaceUrl");
|
|
375
375
|
|
|
376
376
|
// src/integrations/dataloom.ts
|
|
377
|
-
var
|
|
377
|
+
var import_dataloom = require("@lark-apaas/dataloom");
|
|
378
378
|
var createDataLoomClient = /* @__PURE__ */ __name((url, pat) => {
|
|
379
|
-
const { baseUrl
|
|
380
|
-
baseUrl: ""
|
|
381
|
-
workspace: ""
|
|
379
|
+
const { baseUrl } = url ? splitWorkspaceUrl(url) : {
|
|
380
|
+
baseUrl: ""
|
|
382
381
|
};
|
|
383
382
|
const appId = getAppId() ?? "";
|
|
384
|
-
return (0,
|
|
383
|
+
return (0, import_dataloom.createClient)(baseUrl, pat ?? "", {
|
|
385
384
|
global: {
|
|
386
385
|
enableDataloomLog: process.env.NODE_ENV !== "production",
|
|
387
386
|
requestRateLimit: process.env.NODE_ENV !== "production" ? 100 : void 0,
|
|
388
387
|
brandName: "miaoda",
|
|
389
|
-
appId
|
|
390
|
-
onError: /* @__PURE__ */ __name((error, dataloomInstance) => {
|
|
391
|
-
if (error?.status === 401) {
|
|
392
|
-
if (error?.code === "k_ident_013001") {
|
|
393
|
-
dataloomInstance.service.session.redirectToLogin();
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}, "onError")
|
|
388
|
+
appId
|
|
397
389
|
}
|
|
398
390
|
});
|
|
399
391
|
}, "createDataLoomClient");
|