diff --git a/dist/cjs/index.cjs b/dist/cjs/index.cjs index 8fe2c23..e249349 100644 --- a/dist/cjs/index.cjs +++ b/dist/cjs/index.cjs @@ -17,7 +17,7 @@ exports.default = { if (initParams === null || initParams === void 0 ? void 0 : initParams.relayProxyUrl) { try { var constructedUrl = new URL('/recorder.js', initParams.relayProxyUrl); - initParams.host = constructedUrl.host; + initParams.host = constructedUrl.origin; src = constructedUrl.toString(); } catch (e) { diff --git a/dist/cjs/index.js.map b/dist/cjs/index.js.map index 593d94a..2ba3d4a 100644 --- a/dist/cjs/index.js.map +++ b/dist/cjs/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;AACA,IAAM,kBAAkB,GAAG,sCAAsC,CAAA;AA+EjE,kBAAe;IAQd,IAAI,EAAE,UAAU,GAAW,EAAE,MAAmB;QAC/C,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,IAAI,CAAC,CAAC,SAAS,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAA;YACxD,OAAO,KAAK,CAAA;SACZ;QACD,CAAC,CAAC,SAAS,GAAG;YACb,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAChC,CAAC,CAAA;QAED,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAA;QAEpB,IAAM,UAAU,GAA+C,MAAM,CAAA;QACrE,IAAI,GAAG,GAAG,2CAA2C,CAAA;QAErD,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,EAAE;YAC9B,IAAI;gBACH,IAAM,cAAc,GAAG,IAAI,GAAG,CAAC,cAAc,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;gBACxE,UAAU,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAA;gBACrC,GAAG,GAAG,cAAc,CAAC,QAAQ,EAAE,CAAA;aAC/B;YAAC,OAAO,C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C,CAAC,CAAC,SAAS,CAAA;IACrB,CAAC;IACD,IAAI,OAAO;QACV,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAA;IAC3B,CAAC;IACD,IAAI,SAAS;QACZ,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,SAAS,CAAA;IAC7B,CAAC;IACD,IAAI,SAAS;QACZ,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,SAAS,CAAA;IAC7B,CAAC;IACD,IAAI,QAAQ;QACX,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAA;IAC5B,CAAC;IACD,IAAI,GAAG;QACN,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,CAAA;IACvB,CAAC;IACD,IAAI,OAAO;QACV,IAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAA;IAC3B,CAAC;CACD,CAAA"} \ No newline at end of file diff --git a/dist/esm/index.js.map b/dist/esm/index.js.map index 1482bc9..a465315 100644 --- a/dist/esm/index.js.map +++ b/dist/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AACA,MAAM,kBAAkB,GAAG,sCAAsC,CAAA;AA+EjE,eAAe;IAQd,IAAI,EAAE,UAAU,GAAW,EAAE,MAAmB;QAC/C,MAAM,CAAC,GAAG,MAAyB,CAAA;QACnC,IAAI,CAAC,CAAC,SAAS,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAA;YACxD,OAAO,KAAK,CAAA;SACZ;QACD,CAAC,CAAC,SAAS,GAAG;YACb,CAAC,CAAC,SAAS,CAAC,GAAG,CA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mjs b/dist/esm/index.mjs index e530de8..75d5aec 100644 --- a/dist/esm/index.mjs +++ b/dist/esm/index.mjs @@ -15,7 +15,7 @@ export default { if (initParams === null || initParams === void 0 ? void 0 : initParams.relayProxyUrl) { try { const constructedUrl = new URL('/recorder.js', initParams.relayProxyUrl); - initParams.host = constructedUrl.host; + initParams.host = constructedUrl.origin; src = constructedUrl.toString(); } catch (e) { diff --git a/index.ts b/index.ts index 14e742f..df700ca 100644 --- a/index.ts +++ b/index.ts @@ -104,7 +104,7 @@ export default { if (initParams?.relayProxyUrl) { try { const constructedUrl = new URL('/recorder.js', initParams.relayProxyUrl) - initParams.host = constructedUrl.host + initParams.host = constructedUrl.origin src = constructedUrl.toString() } catch (e) { console.error('Smartlook init param `relayProxyUrl` is not valid. Please provide full url like `https://my-proxy-domain.com/`.') diff --git a/package.json b/package.json index 0fc1b5c..9264f04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smartlook-client", - "version": "9.0.0", + "version": "10.0.0", "description": "Official Smartlook client for easy frontend integration.", "main": "./dist/esm/index.mjs", "types": "./dist/esm/index.d.ts",