Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wix/metro-runtime

Package Overview
Dependencies
Maintainers
0
Versions
440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/metro-runtime - npm Package Compare versions

Comparing version 1.1878.0 to 1.1879.0

2

dist/cjs/flatten-params.js

@@ -30,3 +30,3 @@ "use strict";

keyParams.forEach(param => {
if (param === undefined || param === null) {
if (param === undefined || param === null || isComplexRequest && typeof param === 'object') {
return;

@@ -33,0 +33,0 @@ }

@@ -27,3 +27,3 @@ import { encode } from 'js-base64';

keyParams.forEach((param) => {
if (param === undefined || param === null) {
if (param === undefined || param === null || (isComplexRequest && typeof param === 'object')) {
return;

@@ -30,0 +30,0 @@ }

{
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/8d3b9a7fc7a11246df7701568aed35d89913cd70218866972794cc25/metro-runtime.umd.js"
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/31623414545e9bd16b9009c62a6e6f277c22f0bb4e6bea0ba23d1d42/metro-runtime.umd.js"
}
{
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/8d3b9a7fc7a11246df7701568aed35d89913cd70218866972794cc25/metro-runtime.umd.min.js"
"metro-runtime.js": "https://static.parastorage.com/services/metro-runtime/31623414545e9bd16b9009c62a6e6f277c22f0bb4e6bea0ba23d1d42/metro-runtime.umd.min.js"
}

@@ -374,3 +374,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

function flattenParams(data,path){if(path===void 0){path='';}const params={};Object.entries(data).forEach(_ref=>{let[key,value]=_ref;const isObject=value!==null&&typeof value==='object'&&!Array.isArray(value);const fieldPath=flatten_params_resolvePath(path,key);if(isObject){const serializedObject=flattenParams(value,fieldPath);Object.assign(params,serializedObject);}else{params[fieldPath]=value;}});return params;}function flatten_params_resolvePath(path,key){return`${path}${path?'.':''}${key}`;}function toURLSearchParams(params,isComplexRequest){const flatten=flattenParams(params);const searchParams=Object.entries(flatten).reduce((urlSearchParams,_ref2)=>{let[key,value]=_ref2;// inorder to make `foo: [1,2]` turn into `foo=1&foo=2` and not `foo[]=1&foo[]=2`
const keyParams=Array.isArray(value)?value:[value];keyParams.forEach(param=>{if(param===undefined||param===null){return;}urlSearchParams.append(key,param);});return urlSearchParams;},new URLSearchParams());// https://github.com/wix-private/server-infra/tree/master/framework/grpc/rest#complex-requests-messages-with-get-mappings
const keyParams=Array.isArray(value)?value:[value];keyParams.forEach(param=>{if(param===undefined||param===null||isComplexRequest&&typeof param==='object'){return;}urlSearchParams.append(key,param);});return urlSearchParams;},new URLSearchParams());// https://github.com/wix-private/server-infra/tree/master/framework/grpc/rest#complex-requests-messages-with-get-mappings
if(isComplexRequest){searchParams.append('.r',encode(JSON.stringify(params),true));}return searchParams;}

@@ -377,0 +377,0 @@ ;// CONCATENATED MODULE: ./index.ts

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("counter",[],t):"object"==typeof exports?exports.counter=t():e.counter=t()}("undefined"!=typeof self?self:this,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){void 0===e&&(e="");const[t,r]=n(e);return r?{schemaName:r,schemaType:t}:{schemaName:t}}e.r(t),e.d(t,{parseLeanSchemaRef:()=>r,resolveUrl:()=>u,toURLSearchParams:()=>T});const n=e=>e.split("#");const o="_",c=/{(.*)}/,a=new RegExp(`\\.(${["wix.com","editorx.com"].join("|")})$`),i=new RegExp(`\\.(${["42.wixprod.net","uw2-edt-1.wixprod.net"].join("|")})$`),f=new RegExp(".*\\.dev.wix-code.com$");function u(e){const t=function(e,t){const r=t[e]||t[o];if(!r&&function(e){return!!e.match(/\._base_domain_$/)}(e))return t[s];return r}(function(e){return e.replace("create.editorx.com","editor.editorx.com")}(e.host).replace(a,"._base_domain_").replace(i,"._api_base_domain_").replace(f,"*.dev.wix-code.com"),e.domainToMappings);var r,n;return function(e,t){const r=null==t?void 0:t.find((t=>e.startsWith(t.destPath)));if(!r)return e;return r.srcPath+e.slice(r.destPath.length)}((r=e.protoPath,n=e.data||{},r.split("/").map((e=>function(e,t){const r=e.match(c)||[],n=r[1];if(n){const o=e.replace(r[0],"");return function(e,t,r,n){let o=e;for(const e of t.split(".")){if(!o)return r;o=o[e]}return`${o}${n}`}(t,n,e,o)}return e}(e,n))).join("/")),t)}const s="www._base_domain_",d="function"==typeof Buffer,l=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),p=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),h=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(p),m=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,y=String.fromCharCode.bind(String),b=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_"))),g=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),A=e=>{let t,r,n,o,c="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|o,c+=p[t>>18&63]+p[t>>12&63]+p[t>>6&63]+p[63&t]}return a?c.slice(0,a-3)+"===".substring(a):c},x="function"==typeof btoa?e=>btoa(e):d?e=>Buffer.from(e,"binary").toString("base64"):A,w=d?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(y.apply(null,e.subarray(r,r+4096)));return x(t.join(""))},_=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?y(192|t>>>6)+y(128|63&t):y(224|t>>>12&15)+y(128|t>>>6&63)+y(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return y(240|t>>>18&7)+y(128|t>>>12&63)+y(128|t>>>6&63)+y(128|63&t)},j=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=e=>e.replace(j,_),S=d?e=>Buffer.from(e,"utf8").toString("base64"):l?e=>w(l.encode(e)):e=>x(v(e)),$=(e,t=!1)=>t?b(S(e)):S(e),E=e=>{if(e=e.replace(/\s+/g,""),!m.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let c=0;c<e.length;)t=h[e.charAt(c++)]<<18|h[e.charAt(c++)]<<12|(r=h[e.charAt(c++)])<<6|(n=h[e.charAt(c++)]),o+=64===r?y(t>>16&255):64===n?y(t>>16&255,t>>8&255):y(t>>16&255,t>>8&255,255&t);return o};function P(e,t){void 0===t&&(t="");const r={};return Object.entries(e).forEach((e=>{let[n,o]=e;const c=null!==o&&"object"==typeof o&&!Array.isArray(o),a=function(e,t){return`${e}${e?".":""}${t}`}(t,n);if(c){const e=P(o,a);Object.assign(r,e)}else r[a]=o})),r}function T(e,t){const r=P(e),n=Object.entries(r).reduce(((e,t)=>{let[r,n]=t;return(Array.isArray(n)?n:[n]).forEach((t=>{null!=t&&e.append(r,t)})),e}),new URLSearchParams);return t&&n.append(".r",$(JSON.stringify(e),!0)),n}return t})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("counter",[],t):"object"==typeof exports?exports.counter=t():e.counter=t()}("undefined"!=typeof self?self:this,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){void 0===e&&(e="");const[t,r]=o(e);return r?{schemaName:r,schemaType:t}:{schemaName:t}}e.r(t),e.d(t,{parseLeanSchemaRef:()=>r,resolveUrl:()=>u,toURLSearchParams:()=>T});const o=e=>e.split("#");const n="_",c=/{(.*)}/,a=new RegExp(`\\.(${["wix.com","editorx.com"].join("|")})$`),i=new RegExp(`\\.(${["42.wixprod.net","uw2-edt-1.wixprod.net"].join("|")})$`),f=new RegExp(".*\\.dev.wix-code.com$");function u(e){const t=function(e,t){const r=t[e]||t[n];if(!r&&function(e){return!!e.match(/\._base_domain_$/)}(e))return t[s];return r}(function(e){return e.replace("create.editorx.com","editor.editorx.com")}(e.host).replace(a,"._base_domain_").replace(i,"._api_base_domain_").replace(f,"*.dev.wix-code.com"),e.domainToMappings);var r,o;return function(e,t){const r=null==t?void 0:t.find((t=>e.startsWith(t.destPath)));if(!r)return e;return r.srcPath+e.slice(r.destPath.length)}((r=e.protoPath,o=e.data||{},r.split("/").map((e=>function(e,t){const r=e.match(c)||[],o=r[1];if(o){const n=e.replace(r[0],"");return function(e,t,r,o){let n=e;for(const e of t.split(".")){if(!n)return r;n=n[e]}return`${n}${o}`}(t,o,e,n)}return e}(e,o))).join("/")),t)}const s="www._base_domain_",d="function"==typeof Buffer,l=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),p=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),h=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(p),m=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,y=String.fromCharCode.bind(String),b=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_"))),g=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),A=e=>{let t,r,o,n,c="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,c+=p[t>>18&63]+p[t>>12&63]+p[t>>6&63]+p[63&t]}return a?c.slice(0,a-3)+"===".substring(a):c},x="function"==typeof btoa?e=>btoa(e):d?e=>Buffer.from(e,"binary").toString("base64"):A,w=d?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;r<o;r+=4096)t.push(y.apply(null,e.subarray(r,r+4096)));return x(t.join(""))},j=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?y(192|t>>>6)+y(128|63&t):y(224|t>>>12&15)+y(128|t>>>6&63)+y(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return y(240|t>>>18&7)+y(128|t>>>12&63)+y(128|t>>>6&63)+y(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=e=>e.replace(_,j),S=d?e=>Buffer.from(e,"utf8").toString("base64"):l?e=>w(l.encode(e)):e=>x(v(e)),$=(e,t=!1)=>t?b(S(e)):S(e),E=e=>{if(e=e.replace(/\s+/g,""),!m.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let c=0;c<e.length;)t=h[e.charAt(c++)]<<18|h[e.charAt(c++)]<<12|(r=h[e.charAt(c++)])<<6|(o=h[e.charAt(c++)]),n+=64===r?y(t>>16&255):64===o?y(t>>16&255,t>>8&255):y(t>>16&255,t>>8&255,255&t);return n};function P(e,t){void 0===t&&(t="");const r={};return Object.entries(e).forEach((e=>{let[o,n]=e;const c=null!==n&&"object"==typeof n&&!Array.isArray(n),a=function(e,t){return`${e}${e?".":""}${t}`}(t,o);if(c){const e=P(n,a);Object.assign(r,e)}else r[a]=n})),r}function T(e,t){const r=P(e),o=Object.entries(r).reduce(((e,r)=>{let[o,n]=r;return(Array.isArray(n)?n:[n]).forEach((r=>{null==r||t&&"object"==typeof r||e.append(o,r)})),e}),new URLSearchParams);return t&&o.append(".r",$(JSON.stringify(e),!0)),o}return t})()));
//# sourceMappingURL=metro-runtime.umd.min.js.map
{
"name": "@wix/metro-runtime",
"version": "1.1878.0",
"version": "1.1879.0",
"license": "UNLICENSED",

@@ -117,3 +117,3 @@ "author": {

},
"falconPackageHash": "1eb9aca9a17f78e4245551ac37cc6aa85cd6b0ec5f774c9c2c839ce5"
"falconPackageHash": "4ad8c0681f3533f907ce21ac81f8242a0963b4757849ed01f714b9c9"
}

@@ -36,3 +36,3 @@ import { encode } from 'js-base64';

keyParams.forEach((param: any) => {
if (param === undefined || param === null) {
if (param === undefined || param === null || (isComplexRequest && typeof param === 'object')) {
return;

@@ -39,0 +39,0 @@ }

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc