@lark-apaas/client-toolkit-lite 1.1.15-alpha.0 → 1.1.15-alpha.10

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 CHANGED
@@ -2070,7 +2070,7 @@ var DOUBAO_PILL_MOBILE_PNG = `${CDN}/Frame%202147223991%20(3).png`;
2070
2070
 
2071
2071
  // src/components/AppContainer/Watermark.tsx
2072
2072
  var DOUBAO_SOURCE = "5";
2073
- var REPORT_ENABLED = true;
2073
+ var REPORT_ENABLED = false;
2074
2074
  var BRAND_TEXT = "\u8C46\u5305 AI \u751F\u6210";
2075
2075
  var POWERED_BY_TEXT = "\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301";
2076
2076
  var FONT_FAMILY2 = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
@@ -3139,41 +3139,12 @@ function getAxiosForBackend() {
3139
3139
  __name(getAxiosForBackend, "getAxiosForBackend");
3140
3140
  var axiosForBackend = getAxiosForBackend();
3141
3141
 
3142
- // src/utils/url.ts
3143
- function splitWorkspaceUrl(fullUrl) {
3144
- try {
3145
- const url = new URL(fullUrl);
3146
- const pathParts = url.pathname.split("/");
3147
- const workspacesIndex = pathParts.findIndex((part) => part === "workspaces");
3148
- if (workspacesIndex === -1) {
3149
- throw new Error("Invalid workspace URL format");
3150
- }
3151
- const basePathParts = pathParts.slice(0, workspacesIndex);
3152
- const workspace = pathParts[workspacesIndex + 1];
3153
- return {
3154
- baseUrl: `${url.origin}${basePathParts.join("/")}`,
3155
- workspace
3156
- };
3157
- } catch (error) {
3158
- console.error("Error splitting workspace URL:", error);
3159
- }
3160
- return {
3161
- baseUrl: fullUrl,
3162
- // 兜底给一个,不要给空字符串,不然 createClient 都直接挂了,页面会白屏,体感不太好
3163
- workspace: "workspace"
3164
- };
3165
- }
3166
- __name(splitWorkspaceUrl, "splitWorkspaceUrl");
3167
-
3168
3142
  // src/integrations/dataloom.ts
3169
3143
  var import_dataloom = require("@lark-apaas/dataloom");
3170
3144
  var import_auth_sdk3 = require("@lark-apaas/auth-sdk");
3171
- var createDataLoomClient = /* @__PURE__ */ __name((url, pat) => {
3172
- const { baseUrl } = url ? splitWorkspaceUrl(url) : {
3173
- baseUrl: ""
3174
- };
3145
+ var createDataLoomClient = /* @__PURE__ */ __name(() => {
3175
3146
  const appId = getAppId() ?? "";
3176
- return (0, import_dataloom.createClient)(baseUrl, pat ?? "", {
3147
+ return (0, import_dataloom.createClient)({
3177
3148
  global: {
3178
3149
  enableDataloomLog: process.env.NODE_ENV !== "production",
3179
3150
  requestRateLimit: process.env.NODE_ENV !== "production" ? 100 : void 0,
@@ -3195,10 +3166,8 @@ function getDataloom() {
3195
3166
  if (pendingPromise3) {
3196
3167
  return pendingPromise3;
3197
3168
  }
3198
- pendingPromise3 = getInitialInfo().then((info) => {
3199
- const DATALOOM_CLIENT_URL = info?.app_runtime_extra?.url;
3200
- const DATALOOM_PAT = info?.app_runtime_extra?.token;
3201
- dataloom = createDataLoomClient(DATALOOM_CLIENT_URL, DATALOOM_PAT);
3169
+ pendingPromise3 = getInitialInfo().then(() => {
3170
+ dataloom = createDataLoomClient();
3202
3171
  return dataloom;
3203
3172
  }).finally(() => {
3204
3173
  pendingPromise3 = null;