@bounded-sh/core 0.0.8 → 0.0.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/client/subscription-v2.d.ts +0 -5
- package/dist/client/subscription.d.ts +0 -5
- package/dist/index.js +4 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -18
- package/dist/index.mjs.map +1 -1
- package/dist/utils/api.d.ts +0 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4144,13 +4144,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
|
4144
4144
|
? await _overrides._getAuthHeaders()
|
|
4145
4145
|
: await createAuthHeader(config.isServer);
|
|
4146
4146
|
const headers = Object.assign({ "Content-Type": "application/json", "X-Public-App-Id": config.appId, "X-App-Id": config.appId }, authHeader);
|
|
4147
|
-
if (typeof window !== "undefined" &&
|
|
4148
|
-
window.CUSTOM_BOUNDED_APP_ID_HEADER) {
|
|
4149
|
-
const customAppId = window.CUSTOM_BOUNDED_APP_ID_HEADER;
|
|
4150
|
-
if (customAppId) {
|
|
4151
|
-
headers["X-App-Id"] = customAppId;
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
4147
|
// Apply custom headers from _overrides
|
|
4155
4148
|
if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
|
|
4156
4149
|
Object.assign(headers, _overrides.headers);
|
|
@@ -5863,17 +5856,10 @@ async function getOrCreateConnection(appId, isServer, routePath, authTokenProvid
|
|
|
5863
5856
|
const wsUrl = new URL(config.wsApiUrl);
|
|
5864
5857
|
// Always use v2 path
|
|
5865
5858
|
wsUrl.pathname = WS_V2_PATH;
|
|
5866
|
-
// Set appId
|
|
5867
|
-
//
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
}
|
|
5871
|
-
else if (typeof window !== 'undefined' && window.CUSTOM_BOUNDED_APP_ID_HEADER) {
|
|
5872
|
-
wsUrl.searchParams.append('appId', window.CUSTOM_BOUNDED_APP_ID_HEADER);
|
|
5873
|
-
}
|
|
5874
|
-
else {
|
|
5875
|
-
wsUrl.searchParams.append('appId', config.appId);
|
|
5876
|
-
}
|
|
5859
|
+
// Set appId from the configured SDK source, or an explicit per-call
|
|
5860
|
+
// override passed through subscribeV2. Do not consult ambient globals:
|
|
5861
|
+
// app identity must come from init({ appId }) or an explicit call option.
|
|
5862
|
+
wsUrl.searchParams.append('appId', appId || config.appId);
|
|
5877
5863
|
// Per-room connection: carry the room path so the worker routes this WS
|
|
5878
5864
|
// to the room DO (appId#room#roomId) where the live view fan-out lives.
|
|
5879
5865
|
if (connection.routePath) {
|