@asgard-js/core 0.2.20 → 0.2.21
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -11
- package/dist/index.mjs.map +1 -1
- package/dist/lib/client.d.ts +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1534,7 +1534,7 @@ class rr {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
/**
|
|
1536
1536
|
* 上傳檔案到 Blob API
|
|
1537
|
-
* 根據 API 文件:/
|
|
1537
|
+
* 根據 API 文件:/ns/{namespace}/bot-provider/{bot_provider_name}/blob
|
|
1538
1538
|
*/
|
|
1539
1539
|
async uploadFile(e, t) {
|
|
1540
1540
|
const n = this.deriveBlobEndpoint();
|
|
@@ -1567,16 +1567,7 @@ class rr {
|
|
|
1567
1567
|
if (!this.botProviderEndpoint && !this.endpoint)
|
|
1568
1568
|
return null;
|
|
1569
1569
|
let e = this.botProviderEndpoint;
|
|
1570
|
-
|
|
1571
|
-
return null;
|
|
1572
|
-
if (e = e.replace(/\/+$/, ""), !e.includes("/generic/")) {
|
|
1573
|
-
const t = e.match(/^(https?:\/\/[^/]+)(\/.*)/);
|
|
1574
|
-
if (t) {
|
|
1575
|
-
const [, n, o] = t;
|
|
1576
|
-
e = `${n}/generic${o}`;
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
return `${e}/blob`;
|
|
1570
|
+
return !e && this.endpoint && (e = this.endpoint.replace("/message/sse", "")), e ? (e = e.replace(/\/+$/, ""), `${e}/blob`) : null;
|
|
1580
1571
|
}
|
|
1581
1572
|
}
|
|
1582
1573
|
const b = [];
|