@sailfish-ai/recorder 1.8.10 → 1.8.12
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/README.md +2 -0
- package/dist/index.js +5 -1
- package/dist/recorder.cjs +806 -788
- package/dist/recorder.js +812 -792
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +806 -788
- package/dist/recording.js +2 -2
- package/dist/session.js +42 -5
- package/dist/types/index.d.ts +1 -0
- package/dist/types/recording.d.ts +1 -1
- package/dist/types/websocket.d.ts +1 -1
- package/dist/websocket.js +12 -6
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -788,6 +788,7 @@ export async function startRecording({ apiKey, backendApi = "https://api-service
|
|
|
788
788
|
g.sessionId = sessionId;
|
|
789
789
|
g.apiKey = apiKey;
|
|
790
790
|
g.backendApi = backendApi;
|
|
791
|
+
g.serviceAdditionalMetadata = serviceAdditionalMetadata;
|
|
791
792
|
// Already fully initialized for this session with an open socket? No-op.
|
|
792
793
|
if (g.initialized &&
|
|
793
794
|
g.sessionId === sessionId &&
|
|
@@ -842,7 +843,9 @@ export async function startRecording({ apiKey, backendApi = "https://api-service
|
|
|
842
843
|
// Create/ensure a server-side recording session once per browser session
|
|
843
844
|
const sessionResponse = await startRecordingSession(apiKey, sessionId, backendApi, effectiveServiceIdentifier, effectiveServiceVersion, effectiveMapUuid, effectiveGitSha, effectiveLibrary, metadataWithAppUrl);
|
|
844
845
|
if (sessionResponse.data?.startRecordingSession) {
|
|
845
|
-
|
|
846
|
+
// Extract env value from serviceAdditionalMetadata
|
|
847
|
+
const envValue = serviceAdditionalMetadata?.env || serviceAdditionalMetadata?.environment;
|
|
848
|
+
const websocket = await initializeRecording(captureSettings, backendApi, apiKey, sessionId, envValue);
|
|
846
849
|
g.ws = websocket;
|
|
847
850
|
g.initialized = true;
|
|
848
851
|
if (!g.sentMapUuidOnce) {
|
|
@@ -909,6 +912,7 @@ export * from "./graphql";
|
|
|
909
912
|
export { openReportIssueModal } from "./inAppReportIssueModal";
|
|
910
913
|
export * from "./recording";
|
|
911
914
|
export * from "./sendSailfishMessages";
|
|
915
|
+
export { getOrSetSessionId } from "./session";
|
|
912
916
|
export * from "./types";
|
|
913
917
|
export * from "./utils";
|
|
914
918
|
export * from "./websocket";
|