@antzsoft/chat-core 1.2.9 → 1.3.0
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 +1 -7
- 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 +1 -7
- package/dist/index.js.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/{storage-BgQYwWPH.d.cts → storage-C7amvVjk.d.cts} +12 -1
- package/dist/{storage-BgQYwWPH.d.ts → storage-C7amvVjk.d.ts} +12 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -152,13 +152,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
152
152
|
|
|
153
153
|
// src/config/types.ts
|
|
154
154
|
function resolveConfig(config) {
|
|
155
|
-
const socketUrl = config.socketUrl ?? (()
|
|
156
|
-
try {
|
|
157
|
-
return new URL(config.apiUrl).origin;
|
|
158
|
-
} catch {
|
|
159
|
-
return config.apiUrl;
|
|
160
|
-
}
|
|
161
|
-
})();
|
|
155
|
+
const socketUrl = config.socketUrl ?? config.apiUrl.replace(/\/api\/v\d+\/?$/, "").replace(/\/$/, "");
|
|
162
156
|
let socketOrigin = socketUrl;
|
|
163
157
|
let socketPath = "/socket.io";
|
|
164
158
|
try {
|