@alwaysmeticulous/recorder-loader
Advanced tools
Comparing version 2.153.0 to 2.154.0
import { NetworkResponseSanitizer } from "@alwaysmeticulous/sdk-bundles-api"; | ||
interface LoaderOptions { | ||
projectId: string; | ||
/** | ||
* @deprecated Renamed to recordingToken. Please use the same value but pass it as the recordingToken instead. | ||
*/ | ||
projectId?: string; | ||
recordingToken: string; | ||
uploadIntervalMs?: number; | ||
@@ -35,3 +39,3 @@ snapshotLinkedStylesheets?: boolean; | ||
*/ | ||
export const loadAndStartRecorder: ({ projectId, uploadIntervalMs, snapshotLinkedStylesheets, commitHash, maxMsToBlockFor: maxMsToBlockFor_, snippetsBaseUrl, forceRecording, responseSanitizers, isProduction, }: LoaderOptions) => Promise<void>; | ||
export const loadAndStartRecorder: ({ recordingToken, uploadIntervalMs, snapshotLinkedStylesheets, commitHash, maxMsToBlockFor: maxMsToBlockFor_, snippetsBaseUrl, forceRecording, responseSanitizers, isProduction, }: LoaderOptions) => Promise<void>; | ||
interface Interceptor { | ||
@@ -38,0 +42,0 @@ startRecordingSession: (options: LoaderOptions) => Promise<Recorder>; |
@@ -13,2 +13,6 @@ function $parcel$export(e, n, v, s) { | ||
const $c97024bcb09807fa$export$f80553af9d70f9fd = async (options)=>{ | ||
if (window.Meticulous?.isRunningAsTest) { | ||
console.debug("Running as part of a Meticulous test case, so skipping loading the Meticulous recorder."); | ||
return; | ||
} | ||
// Try to load the recorder and silence any initialisation error. | ||
@@ -19,3 +23,3 @@ await $c97024bcb09807fa$var$unsafeLoadAndStartRecorder(options).catch((error)=>{ | ||
}; | ||
const $c97024bcb09807fa$var$unsafeLoadAndStartRecorder = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , forceRecording: forceRecording , responseSanitizers: responseSanitizers , isProduction: isProduction })=>{ | ||
const $c97024bcb09807fa$var$unsafeLoadAndStartRecorder = ({ recordingToken: recordingToken , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , forceRecording: forceRecording , responseSanitizers: responseSanitizers , isProduction: isProduction })=>{ | ||
let abandoned = false; | ||
@@ -34,3 +38,3 @@ return new Promise((resolve, reject)=>{ | ||
const typedWindow = window; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = projectId; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = recordingToken; | ||
if (uploadIntervalMs !== undefined) typedWindow.METICULOUS_UPLOAD_INTERVAL_MS = uploadIntervalMs; | ||
@@ -37,0 +41,0 @@ if (commitHash !== undefined) typedWindow.METICULOUS_APP_COMMIT_HASH = commitHash; |
@@ -6,2 +6,6 @@ const $7d7683134fbb8fec$export$d16af6ab0c202bae = "https://snippet.meticulous.ai"; | ||
const $5d774bdb3a883001$export$f80553af9d70f9fd = async (options)=>{ | ||
if (window.Meticulous?.isRunningAsTest) { | ||
console.debug("Running as part of a Meticulous test case, so skipping loading the Meticulous recorder."); | ||
return; | ||
} | ||
// Try to load the recorder and silence any initialisation error. | ||
@@ -12,3 +16,3 @@ await $5d774bdb3a883001$var$unsafeLoadAndStartRecorder(options).catch((error)=>{ | ||
}; | ||
const $5d774bdb3a883001$var$unsafeLoadAndStartRecorder = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , forceRecording: forceRecording , responseSanitizers: responseSanitizers , isProduction: isProduction })=>{ | ||
const $5d774bdb3a883001$var$unsafeLoadAndStartRecorder = ({ recordingToken: recordingToken , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , forceRecording: forceRecording , responseSanitizers: responseSanitizers , isProduction: isProduction })=>{ | ||
let abandoned = false; | ||
@@ -27,3 +31,3 @@ return new Promise((resolve, reject)=>{ | ||
const typedWindow = window; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = projectId; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = recordingToken; | ||
if (uploadIntervalMs !== undefined) typedWindow.METICULOUS_UPLOAD_INTERVAL_MS = uploadIntervalMs; | ||
@@ -30,0 +34,0 @@ if (commitHash !== undefined) typedWindow.METICULOUS_APP_COMMIT_HASH = commitHash; |
{ | ||
"name": "@alwaysmeticulous/recorder-loader", | ||
"version": "2.153.0", | ||
"version": "2.154.0", | ||
"license": "ISC", | ||
@@ -40,3 +40,3 @@ "source": "src/index.ts", | ||
}, | ||
"gitHead": "97b550636b6c7bef9e68801cb8798e58f0089251" | ||
"gitHead": "33257b43e07f98b7eed8d966fd585ffaa43ab34e" | ||
} |
# Meticulous Recorder loader | ||
Utiliy package used to aid the injection of the Meticulous recorder snippet on web apps. | ||
Utility package used to aid the injection of the Meticulous recorder snippet on web apps. | ||
@@ -24,3 +24,3 @@ ## Installing | ||
await loadAndStartRecorder({ | ||
projectId: '<project ID>', | ||
recordingToken: '<recording token>', | ||
}) | ||
@@ -27,0 +27,0 @@ } catch (err) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41330
314