@alwaysmeticulous/recorder-loader
Advanced tools
Comparing version 2.25.0 to 2.26.0
@@ -0,1 +1,2 @@ | ||
import { NetworkResponseSanitizer } from "@alwaysmeticulous/sdk-bundles-api"; | ||
interface LoaderOptions { | ||
@@ -8,2 +9,6 @@ projectId: string; | ||
snippetsBaseUrl?: string; | ||
/** | ||
* Optional. Allows sanitizing network responses before they are sent to Meticulous's servers. | ||
*/ | ||
responseSanitizers?: NetworkResponseSanitizer[]; | ||
} | ||
@@ -10,0 +15,0 @@ export const loadAndStartRecorder: (options: LoaderOptions) => Promise<void>; |
@@ -7,3 +7,3 @@ function $parcel$export(e, n, v, s) { | ||
const $c97024bcb09807fa$var$DEFAULT_MAX_MS_TO_BLOCK_FOR = 2000; | ||
const $c97024bcb09807fa$export$9da0cde53b499187 = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , })=>{ | ||
const $c97024bcb09807fa$export$9da0cde53b499187 = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , responseSanitizers: responseSanitizers , })=>{ | ||
let abandoned = false; | ||
@@ -21,6 +21,8 @@ return new Promise((resolve, reject)=>{ | ||
// Setup configuration | ||
window["METICULOUS_RECORDING_TOKEN"] = projectId; | ||
if (uploadIntervalMs !== undefined) window["METICULOUS_UPLOAD_INTERVAL_MS"] = uploadIntervalMs; | ||
if (commitHash !== undefined) window["METICULOUS_APP_COMMIT_HASH"] = commitHash; | ||
if (snapshotLinkedStylesheets !== undefined) window["METICULOUS_SNAPSHOT_LINKED_STYLESHEETS"] = snapshotLinkedStylesheets; | ||
const typedWindow = window; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = projectId; | ||
if (uploadIntervalMs !== undefined) typedWindow.METICULOUS_UPLOAD_INTERVAL_MS = uploadIntervalMs; | ||
if (commitHash !== undefined) typedWindow.METICULOUS_APP_COMMIT_HASH = commitHash; | ||
if (snapshotLinkedStylesheets !== undefined) typedWindow.METICULOUS_SNAPSHOT_LINKED_STYLESHEETS = snapshotLinkedStylesheets; | ||
if (responseSanitizers != null && responseSanitizers.length > 0) typedWindow.METICULOUS_NETWORK_RESPONSE_SANITIZERS = responseSanitizers; | ||
script.onload = function() { | ||
@@ -27,0 +29,0 @@ if (abandoned) { |
const $5d774bdb3a883001$var$DEFAULT_MAX_MS_TO_BLOCK_FOR = 2000; | ||
const $5d774bdb3a883001$export$9da0cde53b499187 = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , })=>{ | ||
const $5d774bdb3a883001$export$9da0cde53b499187 = ({ projectId: projectId , uploadIntervalMs: uploadIntervalMs , snapshotLinkedStylesheets: snapshotLinkedStylesheets , commitHash: commitHash , maxMsToBlockFor: maxMsToBlockFor_ , snippetsBaseUrl: snippetsBaseUrl , responseSanitizers: responseSanitizers , })=>{ | ||
let abandoned = false; | ||
@@ -15,6 +15,8 @@ return new Promise((resolve, reject)=>{ | ||
// Setup configuration | ||
window["METICULOUS_RECORDING_TOKEN"] = projectId; | ||
if (uploadIntervalMs !== undefined) window["METICULOUS_UPLOAD_INTERVAL_MS"] = uploadIntervalMs; | ||
if (commitHash !== undefined) window["METICULOUS_APP_COMMIT_HASH"] = commitHash; | ||
if (snapshotLinkedStylesheets !== undefined) window["METICULOUS_SNAPSHOT_LINKED_STYLESHEETS"] = snapshotLinkedStylesheets; | ||
const typedWindow = window; | ||
typedWindow.METICULOUS_RECORDING_TOKEN = projectId; | ||
if (uploadIntervalMs !== undefined) typedWindow.METICULOUS_UPLOAD_INTERVAL_MS = uploadIntervalMs; | ||
if (commitHash !== undefined) typedWindow.METICULOUS_APP_COMMIT_HASH = commitHash; | ||
if (snapshotLinkedStylesheets !== undefined) typedWindow.METICULOUS_SNAPSHOT_LINKED_STYLESHEETS = snapshotLinkedStylesheets; | ||
if (responseSanitizers != null && responseSanitizers.length > 0) typedWindow.METICULOUS_NETWORK_RESPONSE_SANITIZERS = responseSanitizers; | ||
script.onload = function() { | ||
@@ -21,0 +23,0 @@ if (abandoned) { |
{ | ||
"name": "@alwaysmeticulous/recorder-loader", | ||
"version": "2.25.0", | ||
"version": "2.26.0", | ||
"license": "ISC", | ||
@@ -22,3 +22,3 @@ "source": "src/index.ts", | ||
"devDependencies": { | ||
"@alwaysmeticulous/sdk-bundles-api": "^2.25.0" | ||
"@alwaysmeticulous/sdk-bundles-api": "^2.26.0" | ||
}, | ||
@@ -39,3 +39,3 @@ "author": { | ||
}, | ||
"gitHead": "26cdd6f9fe277d23b344cc88eb9da6123a88a3d9" | ||
"gitHead": "e2537377f68c00b3db4afa3708b93f44239980af" | ||
} |
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
17829
112