@wix/metro-runtime
Advanced tools
Comparing version 1.1486.0 to 1.1487.0
@@ -8,3 +8,3 @@ "use strict"; | ||
const DOMAINS = ['wix.com', 'editorx.com']; | ||
const WIX_API_DOMAINS = ['42.wixprod.net']; | ||
const WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net']; | ||
const REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/; | ||
@@ -11,0 +11,0 @@ const REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join('|')})$`); |
import { findByPath } from './utils'; | ||
var USER_DOMAIN = '_'; | ||
var DOMAINS = ['wix.com', 'editorx.com']; | ||
var WIX_API_DOMAINS = ['42.wixprod.net']; | ||
var WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net']; | ||
var REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/; | ||
@@ -6,0 +6,0 @@ var REGEX_CAPTURE_DOMAINS = new RegExp("\\.(".concat(DOMAINS.join('|'), ")$")); |
{ | ||
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/ba24b8a5c1642f742e6ba7a21c29b0a692c7435a36029cf1a3e34f8e/metro-runtime.umd.js" | ||
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/61df138eb2ab1aa5edb97ecc4fcaee866834779b8b9703513b2537bc/metro-runtime.umd.js" | ||
} |
{ | ||
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/ba24b8a5c1642f742e6ba7a21c29b0a692c7435a36029cf1a3e34f8e/metro-runtime.umd.min.js" | ||
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/61df138eb2ab1aa5edb97ecc4fcaee866834779b8b9703513b2537bc/metro-runtime.umd.min.js" | ||
} |
@@ -68,3 +68,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
;// CONCATENATED MODULE: ./url-resolver.ts | ||
var USER_DOMAIN='_';var DOMAINS=['wix.com','editorx.com'];var WIX_API_DOMAINS=['42.wixprod.net'];var REGEX_CAPTURE_PROTO_FIELD=/{(.*)}/;var REGEX_CAPTURE_DOMAINS=new RegExp("\\.("+DOMAINS.join('|')+")$");var REGEX_CAPTURE_API_DOMAINS=new RegExp("\\.("+WIX_API_DOMAINS.join('|')+")$");function resolveUrl(opts){var domain=resolveDomain(opts.host);var mappings=resolveMappingsByDomain(domain,opts.domainToMappings);var path=injectDataIntoProtoPath(opts.protoPath,opts.data||{});return resolvePath(path,mappings);}function injectDataIntoProtoPath(protoPath,data){return protoPath.split('/').map(function(path){return maybeProtoPathToData(path,data);}).join('/');}function maybeProtoPathToData(protoPath,data){var protoRegExpMatch=protoPath.match(REGEX_CAPTURE_PROTO_FIELD)||[];var field=protoRegExpMatch[1];if(field){var suffix=protoPath.replace(protoRegExpMatch[0],'');return findByPath(data,field,protoPath,suffix);}return protoPath;}function resolveDomain(host){var resolvedHost=fixHostExceptions(host);return resolvedHost.replace(REGEX_CAPTURE_DOMAINS,'._base_domain_').replace(REGEX_CAPTURE_API_DOMAINS,'._api_base_domain_');}// hosts which standard string replacing doesn't apply to them, will be fixed here. | ||
var USER_DOMAIN='_';var DOMAINS=['wix.com','editorx.com'];var WIX_API_DOMAINS=['42.wixprod.net','uw2-edt-1.wixprod.net'];var REGEX_CAPTURE_PROTO_FIELD=/{(.*)}/;var REGEX_CAPTURE_DOMAINS=new RegExp("\\.("+DOMAINS.join('|')+")$");var REGEX_CAPTURE_API_DOMAINS=new RegExp("\\.("+WIX_API_DOMAINS.join('|')+")$");function resolveUrl(opts){var domain=resolveDomain(opts.host);var mappings=resolveMappingsByDomain(domain,opts.domainToMappings);var path=injectDataIntoProtoPath(opts.protoPath,opts.data||{});return resolvePath(path,mappings);}function injectDataIntoProtoPath(protoPath,data){return protoPath.split('/').map(function(path){return maybeProtoPathToData(path,data);}).join('/');}function maybeProtoPathToData(protoPath,data){var protoRegExpMatch=protoPath.match(REGEX_CAPTURE_PROTO_FIELD)||[];var field=protoRegExpMatch[1];if(field){var suffix=protoPath.replace(protoRegExpMatch[0],'');return findByPath(data,field,protoPath,suffix);}return protoPath;}function resolveDomain(host){var resolvedHost=fixHostExceptions(host);return resolvedHost.replace(REGEX_CAPTURE_DOMAINS,'._base_domain_').replace(REGEX_CAPTURE_API_DOMAINS,'._api_base_domain_');}// hosts which standard string replacing doesn't apply to them, will be fixed here. | ||
function fixHostExceptions(host){// https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom | ||
@@ -71,0 +71,0 @@ return host.replace('create.editorx.com','editor.editorx.com');}function resolveMappingsByDomain(domain,domainToMappings){var mappings=domainToMappings[domain]||domainToMappings[USER_DOMAIN];if(!mappings){if(isBaseDomain(domain)){// fallback <lang>.wix.com sub domains to www.wix.com |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("counter",[],r):"object"==typeof exports?exports.counter=r():e.counter=r()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(r,t){for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function t(e){void 0===e&&(e="");var r=n(e),t=r[0],o=r[1];return o?{schemaName:o,schemaType:t}:{schemaName:t}}e.r(r),e.d(r,{parseLeanSchemaRef:function(){return t},resolveUrl:function(){return f},toURLSearchParams:function(){return d}});var n=function(e){return e.split("#")};function o(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=/{(.*)}/,u=new RegExp("\\.("+["wix.com","editorx.com"].join("|")+")$"),c=new RegExp("\\.("+["42.wixprod.net"].join("|")+")$");function f(e){var r,t,n=function(e,r){var t=r[e]||r._;if(!t&&function(e){return!!e.match(/\._base_domain_$/)}(e))return r[l];return t}(function(e){return e.replace("create.editorx.com","editor.editorx.com")}(e.host).replace(u,"._base_domain_").replace(c,"._api_base_domain_"),e.domainToMappings);return function(e,r){var t=null==r?void 0:r.find((function(r){return e.startsWith(r.destPath)}));if(!t)return e;return t.srcPath+e.slice(t.destPath.length)}((r=e.protoPath,t=e.data||{},r.split("/").map((function(e){return function(e,r){var t=e.match(i)||[],n=t[1];if(n){var a=e.replace(t[0],"");return function(e,r,t,n){for(var a,i=e,u=o(r.split("."));!(a=u()).done;){var c=a.value;if(!i)return t;i=i[c]}return""+i+n}(r,n,e,a)}return e}(e,t)})).join("/")),n)}var l="www._base_domain_";function s(e,r){void 0===r&&(r="");var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1],a=null!==o&&"object"==typeof o&&!Array.isArray(o),i=function(e,r){return e+(e?".":"")+r}(r,n);if(a){var u=s(o,i);Object.assign(t,u)}else t[i]=o})),t}function d(e){var r=s(e);return Object.entries(r).reduce((function(e,r){var t=r[0],n=r[1];return(Array.isArray(n)?n:[n]).forEach((function(r){null!=r&&e.append(t,r)})),e}),new URLSearchParams)}return r}()})); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("counter",[],r):"object"==typeof exports?exports.counter=r():e.counter=r()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(r,t){for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function t(e){void 0===e&&(e="");var r=n(e),t=r[0],o=r[1];return o?{schemaName:o,schemaType:t}:{schemaName:t}}e.r(r),e.d(r,{parseLeanSchemaRef:function(){return t},resolveUrl:function(){return f},toURLSearchParams:function(){return d}});var n=function(e){return e.split("#")};function o(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=/{(.*)}/,u=new RegExp("\\.("+["wix.com","editorx.com"].join("|")+")$"),c=new RegExp("\\.("+["42.wixprod.net","uw2-edt-1.wixprod.net"].join("|")+")$");function f(e){var r,t,n=function(e,r){var t=r[e]||r._;if(!t&&function(e){return!!e.match(/\._base_domain_$/)}(e))return r[l];return t}(function(e){return e.replace("create.editorx.com","editor.editorx.com")}(e.host).replace(u,"._base_domain_").replace(c,"._api_base_domain_"),e.domainToMappings);return function(e,r){var t=null==r?void 0:r.find((function(r){return e.startsWith(r.destPath)}));if(!t)return e;return t.srcPath+e.slice(t.destPath.length)}((r=e.protoPath,t=e.data||{},r.split("/").map((function(e){return function(e,r){var t=e.match(i)||[],n=t[1];if(n){var a=e.replace(t[0],"");return function(e,r,t,n){for(var a,i=e,u=o(r.split("."));!(a=u()).done;){var c=a.value;if(!i)return t;i=i[c]}return""+i+n}(r,n,e,a)}return e}(e,t)})).join("/")),n)}var l="www._base_domain_";function s(e,r){void 0===r&&(r="");var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1],a=null!==o&&"object"==typeof o&&!Array.isArray(o),i=function(e,r){return e+(e?".":"")+r}(r,n);if(a){var u=s(o,i);Object.assign(t,u)}else t[i]=o})),t}function d(e){var r=s(e);return Object.entries(r).reduce((function(e,r){var t=r[0],n=r[1];return(Array.isArray(n)?n:[n]).forEach((function(r){null!=r&&e.append(t,r)})),e}),new URLSearchParams)}return r}()})); | ||
//# sourceMappingURL=metro-runtime.umd.min.js.map |
{ | ||
"name": "@wix/metro-runtime", | ||
"version": "1.1486.0", | ||
"version": "1.1487.0", | ||
"license": "UNLICENSED", | ||
@@ -82,3 +82,3 @@ "author": { | ||
}, | ||
"falconPackageHash": "91efa3dcfd9918498af3b4703164575ef3a593e4d02d7bb86d0c4a46" | ||
"falconPackageHash": "93a3335fbc4b44a373a70af1da827dbf453911c48a57cace64402360" | ||
} |
@@ -7,3 +7,3 @@ import { findByPath } from './utils'; | ||
const WIX_API_DOMAINS = ['42.wixprod.net']; | ||
const WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net']; | ||
@@ -10,0 +10,0 @@ const REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/; |
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
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
4208955