@uniformdev/optimize-common
Advanced tools
Comparing version 14.0.0 to 14.0.1-alpha.94
@@ -1,2 +0,2 @@ | ||
var y=(r=>(r[r.Antimatter=0]="Antimatter",r[r.Tangential=5]="Tangential",r[r.Weak=25]="Weak",r[r.Normal=50]="Normal",r[r.Strong=75]="Strong",r[r.Strongest=100]="Strongest",r[r.Boost=1e3]="Boost",r))(y||{});function C(n){return(n==null?void 0:n.intents)?Object.keys(n==null?void 0:n.intents).reduce((e,t)=>{let i=n.intents[t];return(i==null?void 0:i.noBeh)||(e[t]=i),e},{}):{}}function V(n){return(n==null?void 0:n.intents)?Object.keys(n==null?void 0:n.intents).reduce((e,t)=>{let i=n.intents[t];return(i==null?void 0:i.noPn)||(e[t]=i),e},{}):{}}import x from"p-throttle";import h from"p-retry";function f({throttle:n={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let t=n?x(n):null;return function(a){let o=async()=>await a();if(t&&(o=t(o)),e){let s=o;o=()=>h(s,e)}return o()}}var u=class extends Error{constructor(e,t,i,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${t} ${i})`);this.errorMessage=e;this.fetchMethod=t;this.fetchUri=i;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,u.prototype)}};var m=class{constructor(e){var t,i,a,o,s,r;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(t=e.fetch)!=null?t:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(r=e.limitPolicy)!=null?r:f({})}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...i}});if(!a.ok){let s="";try{let r=await a.text();try{let g=JSON.parse(r);g.errorMessage?s=Array.isArray(g.errorMessage)?g.errorMessage.join(", "):g.errorMessage:s=r}catch(g){s=r}}catch(r){s="General error"}throw new u(s,(o=t==null?void 0:t.method)!=null?o:"GET",e.toString(),a.status)}return(t==null?void 0:t.expectNoContent)?null:await a.json()})}createUrl(e,t){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&i.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),i}};var d=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:t}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:t});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var p=(r=>(r.Cookie="CK",r.Event="EVT",r.Behavior="BEH",r.LandingPage="LP",r.PageViewCount="PVW",r.PageVisited="PVI",r.QueryString="QS",r))(p||{}),S=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(S||{}),P=(t=>(t.Visit="visit",t.Visitor="visitor",t))(P||{});function N(n){return n.type==p.Cookie}function H(n){return n.type==p.Event}function z(n){return n.type==p.Behavior}function X(n){return n.type==p.LandingPage}function ee(n){return n.type==p.PageViewCount}function re(n){return n.type==p.PageVisited}function pe(n){return n.type==p.QueryString}function le(n,e){var a,o,s,r;let t=n,i=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([t,i]=E(t,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return t===i;case"notexact":return t!==i;case"contains":return i&&(s=t==null?void 0:t.includes(i))!=null?s:!1;case"notcontains":return i?!((r=t==null?void 0:t.includes(i))!=null?r:!0):!0;case"exists":return n!==null&&typeof n!="undefined";case"notexists":return n===null||typeof n=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function E(...n){return n.map(e=>e==null?void 0:e.toUpperCase())}export{d as EnrichmentClient,y as IntentTagStrength,P as Scope,S as SignalFrequency,p as SignalType,C as getBehaviorIntents,V as getPersonalizationIntents,z as isBehaviorSignal,N as isCookieSignal,H as isEventSignal,X as isLandingPageSignal,ee as isPageViewCountSignal,re as isPageVisitedSignal,pe as isQueryStringSignal,le as isStringMatch}; | ||
var g=(n=>(n[n.Antimatter=0]="Antimatter",n[n.Tangential=5]="Tangential",n[n.Weak=25]="Weak",n[n.Normal=50]="Normal",n[n.Strong=75]="Strong",n[n.Strongest=100]="Strongest",n[n.Boost=1e3]="Boost",n))(g||{});function C(r){return(r==null?void 0:r.intents)?Object.keys(r==null?void 0:r.intents).reduce((e,t)=>{let i=r.intents[t];return(i==null?void 0:i.noBeh)||(e[t]=i),e},{}):{}}function b(r){return(r==null?void 0:r.intents)?Object.keys(r==null?void 0:r.intents).reduce((e,t)=>{let i=r.intents[t];return(i==null?void 0:i.noPn)||(e[t]=i),e},{}):{}}import y from"p-throttle";import x from"p-retry";function f({throttle:r={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let t=r?y(r):null;return function(a){let o=async()=>await a();if(t&&(o=t(o)),e){let s=o;o=()=>x(s,e)}return o()}}var u=class extends Error{constructor(e,t,i,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${t} ${i})`);this.errorMessage=e;this.fetchMethod=t;this.fetchUri=i;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,u.prototype)}};var m=class{constructor(e){var t,i,a,o,s,n;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(t=e.fetch)!=null?t:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(n=e.limitPolicy)!=null?n:f({})}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...i}});if(!a.ok){let s="";try{let n=await a.text();try{let l=JSON.parse(n);l.errorMessage?s=Array.isArray(l.errorMessage)?l.errorMessage.join(", "):l.errorMessage:s=n}catch(l){s=n}}catch(n){s="General error"}throw new u(s,(o=t==null?void 0:t.method)!=null?o:"GET",e.toString(),a.status)}return(t==null?void 0:t.expectNoContent)?null:await a.json()})}createUrl(e,t){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&i.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),i}};var d=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:t}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:t});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var h=(n=>(n.Cookie="CK",n.Event="EVT",n.Behavior="BEH",n.LandingPage="LP",n.PageViewCount="PVW",n.PageVisited="PVI",n.QueryString="QS",n))(h||{}),P=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(P||{}),S=(t=>(t.Visit="visit",t.Visitor="visitor",t))(S||{});function B(r){return r.type=="CK"}function A(r){return r.type=="EVT"}function D(r){return r.type=="BEH"}function K(r){return r.type=="LP"}function G(r){return r.type=="PVW"}function z(r){return r.type=="PVI"}function F(r){return r.type=="QS"}function X(r,e){var a,o,s,n;let t=r,i=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([t,i]=E(t,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return t===i;case"notexact":return t!==i;case"contains":return i&&(s=t==null?void 0:t.includes(i))!=null?s:!1;case"notcontains":return i?!((n=t==null?void 0:t.includes(i))!=null?n:!0):!0;case"exists":return r!==null&&typeof r!="undefined";case"notexists":return r===null||typeof r=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function E(...r){return r.map(e=>e==null?void 0:e.toUpperCase())}export{d as EnrichmentClient,g as IntentTagStrength,S as Scope,P as SignalFrequency,h as SignalType,C as getBehaviorIntents,b as getPersonalizationIntents,D as isBehaviorSignal,B as isCookieSignal,A as isEventSignal,K as isLandingPageSignal,G as isPageViewCountSignal,z as isPageVisitedSignal,F as isQueryStringSignal,X as isStringMatch}; |
@@ -1,2 +0,2 @@ | ||
var V=Object.create;var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var f=t=>u(t,"__esModule",{value:!0});var j=(t,e)=>{f(t);for(var n in e)u(t,n,{get:e[n],enumerable:!0})},M=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w(e))!T.call(t,i)&&i!=="default"&&u(t,i,{get:()=>e[i],enumerable:!(n=b(e,i))||n.enumerable});return t},y=t=>M(f(u(t!=null?V(k(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);j(exports,{EnrichmentClient:()=>P,IntentTagStrength:()=>x,Scope:()=>C,SignalFrequency:()=>E,SignalType:()=>p,getBehaviorIntents:()=>O,getPersonalizationIntents:()=>R,isBehaviorSignal:()=>I,isCookieSignal:()=>v,isEventSignal:()=>L,isLandingPageSignal:()=>U,isPageViewCountSignal:()=>B,isPageVisitedSignal:()=>A,isQueryStringSignal:()=>N,isStringMatch:()=>$});var x=(r=>(r[r.Antimatter=0]="Antimatter",r[r.Tangential=5]="Tangential",r[r.Weak=25]="Weak",r[r.Normal=50]="Normal",r[r.Strong=75]="Strong",r[r.Strongest=100]="Strongest",r[r.Boost=1e3]="Boost",r))(x||{});function O(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,n)=>{let i=t.intents[n];return(i==null?void 0:i.noBeh)||(e[n]=i),e},{}):{}}function R(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,n)=>{let i=t.intents[n];return(i==null?void 0:i.noPn)||(e[n]=i),e},{}):{}}var h=y(require("p-throttle")),d=y(require("p-retry"));function S({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let n=t?(0,h.default)(t):null;return function(a){let o=async()=>await a();if(n&&(o=n(o)),e){let s=o;o=()=>(0,d.default)(s,e)}return o()}}var g=class extends Error{constructor(e,n,i,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${n} ${i})`);this.errorMessage=e;this.fetchMethod=n;this.fetchUri=i;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,g.prototype)}};var m=class{constructor(e){var n,i,a,o,s,r;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(n=e.fetch)!=null?n:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(r=e.limitPolicy)!=null?r:S({})}}async apiClient(e,n){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...n,headers:{...n==null?void 0:n.headers,...i}});if(!a.ok){let s="";try{let r=await a.text();try{let l=JSON.parse(r);l.errorMessage?s=Array.isArray(l.errorMessage)?l.errorMessage.join(", "):l.errorMessage:s=r}catch(l){s=r}}catch(r){s="General error"}throw new g(s,(o=n==null?void 0:n.method)!=null?o:"GET",e.toString(),a.status)}return(n==null?void 0:n.expectNoContent)?null:await a.json()})}createUrl(e,n){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(n!=null?n:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&i.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),i}};var P=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:n}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:n});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let n=this.createUrl("/api/v1/enrichments");await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let n=this.createUrl("/api/v1/enrichments");await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let n=this.createUrl("/api/v1/enrichment-values");await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let n=this.createUrl("/api/v1/enrichment-values");await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var p=(r=>(r.Cookie="CK",r.Event="EVT",r.Behavior="BEH",r.LandingPage="LP",r.PageViewCount="PVW",r.PageVisited="PVI",r.QueryString="QS",r))(p||{}),E=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(E||{}),C=(n=>(n.Visit="visit",n.Visitor="visitor",n))(C||{});function v(t){return t.type==p.Cookie}function L(t){return t.type==p.Event}function I(t){return t.type==p.Behavior}function U(t){return t.type==p.LandingPage}function B(t){return t.type==p.PageViewCount}function A(t){return t.type==p.PageVisited}function N(t){return t.type==p.QueryString}function $(t,e){var a,o,s,r;let n=t,i=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([n,i]=Q(n,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return n===i;case"notexact":return n!==i;case"contains":return i&&(s=n==null?void 0:n.includes(i))!=null?s:!1;case"notcontains":return i?!((r=n==null?void 0:n.includes(i))!=null?r:!0):!0;case"exists":return t!==null&&typeof t!="undefined";case"notexists":return t===null||typeof t=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function Q(...t){return t.map(e=>e==null?void 0:e.toUpperCase())}0&&(module.exports={EnrichmentClient,IntentTagStrength,Scope,SignalFrequency,SignalType,getBehaviorIntents,getPersonalizationIntents,isBehaviorSignal,isCookieSignal,isEventSignal,isLandingPageSignal,isPageViewCountSignal,isPageVisitedSignal,isQueryStringSignal,isStringMatch}); | ||
var V=Object.create;var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var f=t=>u(t,"__esModule",{value:!0});var T=(t,e)=>{for(var r in e)u(t,r,{get:e[r],enumerable:!0})},g=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!O.call(t,s)&&(r||s!=="default")&&u(t,s,{get:()=>e[s],enumerable:!(i=w(e,s))||i.enumerable});return t},y=(t,e)=>g(f(u(t!=null?V(k(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),R=(t=>(e,r)=>t&&t.get(e)||(r=g(f({}),e,1),t&&t.set(e,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var K={};T(K,{EnrichmentClient:()=>S,IntentTagStrength:()=>x,Scope:()=>b,SignalFrequency:()=>C,SignalType:()=>E,getBehaviorIntents:()=>v,getPersonalizationIntents:()=>L,isBehaviorSignal:()=>I,isCookieSignal:()=>M,isEventSignal:()=>U,isLandingPageSignal:()=>B,isPageViewCountSignal:()=>N,isPageVisitedSignal:()=>A,isQueryStringSignal:()=>$,isStringMatch:()=>D});var x=(n=>(n[n.Antimatter=0]="Antimatter",n[n.Tangential=5]="Tangential",n[n.Weak=25]="Weak",n[n.Normal=50]="Normal",n[n.Strong=75]="Strong",n[n.Strongest=100]="Strongest",n[n.Boost=1e3]="Boost",n))(x||{});function v(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,r)=>{let i=t.intents[r];return(i==null?void 0:i.noBeh)||(e[r]=i),e},{}):{}}function L(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,r)=>{let i=t.intents[r];return(i==null?void 0:i.noPn)||(e[r]=i),e},{}):{}}var d=y(require("p-throttle")),h=y(require("p-retry"));function P({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let r=t?(0,d.default)(t):null;return function(s){let o=async()=>await s();if(r&&(o=r(o)),e){let a=o;o=()=>(0,h.default)(a,e)}return o()}}var l=class extends Error{constructor(e,r,i,s,o){super(`${e} | ||
${s}${o?" "+o:""} (${r} ${i})`);this.errorMessage=e;this.fetchMethod=r;this.fetchUri=i;this.statusCode=s;this.statusText=o;Object.setPrototypeOf(this,l.prototype)}};var m=class{constructor(e){var r,i,s,o,a,n;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(r=e.fetch)!=null?r:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(s=e.apiKey)!=null?s:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(a=e.bearerToken)!=null?a:null,limitPolicy:(n=e.limitPolicy)!=null?n:P({})}}async apiClient(e,r){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},s=await fetch(e.toString(),{...r,headers:{...r==null?void 0:r.headers,...i}});if(!s.ok){let a="";try{let n=await s.text();try{let c=JSON.parse(n);c.errorMessage?a=Array.isArray(c.errorMessage)?c.errorMessage.join(", "):c.errorMessage:a=n}catch(c){a=n}}catch(n){a="General error"}throw new l(a,(o=r==null?void 0:r.method)!=null?o:"GET",e.toString(),s.status)}return(r==null?void 0:r.expectNoContent)?null:await s.json()})}createUrl(e,r){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(r!=null?r:{}).forEach(([s,o])=>{var a;typeof o!==void 0&&o!==null&&i.searchParams.append(s,(a=o==null?void 0:o.toString())!=null?a:"")}),i}};var S=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:r}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:r});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let r=this.createUrl("/api/v1/enrichments");await this.apiClient(r,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let r=this.createUrl("/api/v1/enrichments");await this.apiClient(r,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let r=this.createUrl("/api/v1/enrichment-values");await this.apiClient(r,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let r=this.createUrl("/api/v1/enrichment-values");await this.apiClient(r,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var E=(n=>(n.Cookie="CK",n.Event="EVT",n.Behavior="BEH",n.LandingPage="LP",n.PageViewCount="PVW",n.PageVisited="PVI",n.QueryString="QS",n))(E||{}),C=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(C||{}),b=(r=>(r.Visit="visit",r.Visitor="visitor",r))(b||{});function M(t){return t.type=="CK"}function U(t){return t.type=="EVT"}function I(t){return t.type=="BEH"}function B(t){return t.type=="LP"}function N(t){return t.type=="PVW"}function A(t){return t.type=="PVI"}function $(t){return t.type=="QS"}function D(t,e){var s,o,a,n;let r=t,i=e==null?void 0:e.expr;switch(((s=e==null?void 0:e.cs)!=null?s:!1)||([r,i]=H(r,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return r===i;case"notexact":return r!==i;case"contains":return i&&(a=r==null?void 0:r.includes(i))!=null?a:!1;case"notcontains":return i?!((n=r==null?void 0:r.includes(i))!=null?n:!0):!0;case"exists":return t!==null&&typeof t!="undefined";case"notexists":return t===null||typeof t=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function H(...t){return t.map(e=>e==null?void 0:e.toUpperCase())}module.exports=R(K);0&&(module.exports={EnrichmentClient,IntentTagStrength,Scope,SignalFrequency,SignalType,getBehaviorIntents,getPersonalizationIntents,isBehaviorSignal,isCookieSignal,isEventSignal,isLandingPageSignal,isPageViewCountSignal,isPageVisitedSignal,isQueryStringSignal,isStringMatch}); |
{ | ||
"name": "@uniformdev/optimize-common", | ||
"version": "14.0.0", | ||
"version": "14.0.1-alpha.94+f04d6359", | ||
"description": "Common functionality and types for Uniform Optimize", | ||
@@ -29,12 +29,12 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"devDependencies": { | ||
"@types/jest": "27.0.3", | ||
"@types/node": "16.11.12", | ||
"eslint": "8.4.1", | ||
"eslint-plugin-react": "7.27.1", | ||
"@types/jest": "27.4.0", | ||
"@types/node": "16.11.21", | ||
"eslint": "8.7.0", | ||
"eslint-plugin-react": "7.28.0", | ||
"eslint-plugin-react-hooks": "4.3.0", | ||
"jest": "27.4.5", | ||
"jest": "27.4.7", | ||
"npm-run-all": "4.1.5", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "27.1.1", | ||
"tsup": "5.11.1" | ||
"ts-jest": "27.1.3", | ||
"tsup": "5.11.11" | ||
}, | ||
@@ -51,3 +51,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "5f7b1abf0fe161630b53bde4c5530f8b12a1c775" | ||
"gitHead": "f04d63590168a9c7dbbfbf2b2425c72c07f1ce84" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
708
44720
3
7