Socket
Socket
Sign inDemoInstall

@uniformdev/context

Package Overview
Dependencies
Maintainers
11
Versions
591
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniformdev/context - npm Package Compare versions

Comparing version 16.2.1-nuxt.274 to 16.2.1-nuxt.338

2

dist/api/api.js
"use strict";var S=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var ie=(r,e,t)=>e in r?S(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var oe=(r,e)=>{for(var t in e)S(r,t,{get:e[t],enumerable:!0})},ne=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of re(e))!se.call(r,o)&&o!==t&&S(r,o,{get:()=>e[o],enumerable:!(s=te(e,o))||s.enumerable});return r};var ae=r=>ne(S({},"__esModule",{value:!0}),r);var m=(r,e,t)=>(ie(r,typeof e!="symbol"?e+"":e,t),t),pe=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var i=(r,e,t)=>(pe(r,e,"read from private field"),t?t.call(r):e.get(r)),c=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var me={};oe(me,{AggregateClient:()=>y,ApiClientError:()=>P,CachedAggregateClient:()=>J,CachedContextClient:()=>Z,CachedDimensionClient:()=>V,CachedEnrichmentClient:()=>H,CachedManifestClient:()=>q,CachedQuirkClient:()=>B,CachedSignalClient:()=>W,ContextClient:()=>N,DimensionClient:()=>f,EnrichmentClient:()=>u,ManifestClient:()=>x,QuirkClient:()=>g,SignalClient:()=>d,UncachedAggregateClient:()=>L,UncachedContextClient:()=>X,UncachedDimensionClient:()=>$,UncachedEnrichmentClient:()=>Q,UncachedManifestClient:()=>K,UncachedQuirkClient:()=>Y,UncachedSignalClient:()=>F,computeDimensionDefinitionDisplayData:()=>ee,computeDimensionDisplayData:()=>ce,computeDimensionDisplayName:()=>le,nullLimitPolicy:()=>v});module.exports=ae(me);var v=async r=>await r(),P=class extends Error{constructor(t,s,o,a,p,l){super(`${t}
${a}${p?" "+p:""} (${s} ${o}${l?` Request ID: ${l}`:""})`);this.errorMessage=t;this.fetchMethod=s;this.fetchUri=o;this.statusCode=a;this.statusText=p;this.requestId=l;Object.setPrototypeOf(this,P.prototype)}};var n=class{constructor(e){m(this,"options");var s,o,a,p,l,h;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let t=e.fetch;if(!t)if(typeof window!="undefined")t=window.fetch.bind(window);else if(typeof fetch!="undefined")t=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:t,apiHost:(s=e.apiHost)!=null?s:"https://uniform.app",apiKey:(o=e.apiKey)!=null?o:null,projectId:(a=e.projectId)!=null?a:null,bearerToken:(p=e.bearerToken)!=null?p:null,limitPolicy:(l=e.limitPolicy)!=null?l:v,bypassCache:(h=e.bypassCache)!=null?h:!1}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var a;let s=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},o=await this.options.fetch(e.toString(),{...t,headers:{"x-bypass-cache":this.options.bypassCache.toString(),...t==null?void 0:t.headers,...s}});if(!o.ok){let p="";try{let l=await o.text();try{let h=JSON.parse(l);h.errorMessage?p=Array.isArray(h.errorMessage)?h.errorMessage.join(", "):h.errorMessage:p=l}catch(h){p=l}}catch(l){p="General error"}throw new P(p,(a=t==null?void 0:t.method)!=null?a:"GET",e.toString(),o.status,o.statusText,n.getRequestId(o))}return t!=null&&t.expectNoContent?null:await o.json()})}createUrl(e,t){let s=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([o,a])=>{var p;typeof a!="undefined"&&a!==null&&s.searchParams.append(o,(p=a==null?void 0:a.toString())!=null?p:"")}),s}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};var b,U=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(U,b),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},y=U;b=new WeakMap,c(y,b,"/api/v2/aggregate");var L=class extends y{constructor(e){super({...e,bypassCache:!0})}},J=class extends y{constructor(e){super({...e,bypassCache:!1})}};var A,M=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(M,A),{...e,projectId:t});return await this.apiClient(s)}},f=M;A=new WeakMap,c(f,A,"/api/v2/dimension");var $=class extends f{constructor(e){super({...e,bypassCache:!0})}},V=class extends f{constructor(e){super({...e,bypassCache:!1})}};var O,R,C=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(C,O),{...e,projectId:t});return await this.apiClient(s)}async upsertCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(i(C,R));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(i(C,R));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},u=C;O=new WeakMap,R=new WeakMap,c(u,O,"/api/v1/enrichments"),c(u,R,"/api/v1/enrichment-values");var Q=class extends u{constructor(e){super({...e,bypassCache:!0})}},H=class extends u{constructor(e){super({...e,bypassCache:!1})}};var k,z=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(z,k),{...e,projectId:t});return await this.apiClient(s)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}},x=z;k=new WeakMap,c(x,k,"/api/v2/manifest");var K=class extends x{constructor(e){super({...e,bypassCache:!0})}},q=class extends x{constructor(e){super({...e,bypassCache:!1})}};var j,w=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(w,j),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(w,j));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(w,j));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},g=w;j=new WeakMap,c(g,j,"/api/v2/quirk");var Y=class extends g{constructor(e){super({...e,bypassCache:!0})}},B=class extends g{constructor(e){super({...e,bypassCache:!1})}};var E,I=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(I,E),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},d=I;E=new WeakMap,c(d,E,"/api/v2/signal");var F=class extends d{constructor(e){super({...e,bypassCache:!0})}},W=class extends d{constructor(e){super({...e,bypassCache:!1})}};var D,G=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(G,D),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},T=G;D=new WeakMap,c(T,D,"/api/v2/test");var N=class{constructor(e){m(this,"enrichments");m(this,"aggregates");m(this,"dimensions");m(this,"manifest");m(this,"quirks");m(this,"signals");m(this,"tests");this.enrichments=new u(e),this.aggregates=new y(e),this.dimensions=new f(e),this.manifest=new x(e),this.quirks=new g(e),this.signals=new d(e),this.tests=new T(e)}},X=class extends N{constructor(e){super({...e,bypassCache:!0})}},Z=class extends N{constructor(e){super({...e,bypassCache:!1})}};var _="_";function ee(r){let e=r.category==="ENR"?"Enrichment":r.category==="SIG"?"Signal":r.subcategory==="1"?"Intent":r.subcategory==="0"?"Audience":"Aggregate";return{dim:r.dim,name:r.name,type:e,category:r.category==="ENR"?r.subcategory:void 0}}function ce(r,e){var t,s,o,a;if((s=(t=e.project.pz)==null?void 0:t.agg)!=null&&s[r])return{dim:r,name:r,type:"Aggregate"};if((a=(o=e.project.pz)==null?void 0:o.sig)!=null&&a[r])return{dim:r,name:r,type:"Signal"};if(r.indexOf(_)>=0){let[p,l]=r.split(_);return{dim:r,name:l,type:"Enrichment",category:p}}}function le(r){let{type:e,name:t}=ee(r);return`${e}: ${t}`}0&&(module.exports={AggregateClient,ApiClientError,CachedAggregateClient,CachedContextClient,CachedDimensionClient,CachedEnrichmentClient,CachedManifestClient,CachedQuirkClient,CachedSignalClient,ContextClient,DimensionClient,EnrichmentClient,ManifestClient,QuirkClient,SignalClient,UncachedAggregateClient,UncachedContextClient,UncachedDimensionClient,UncachedEnrichmentClient,UncachedManifestClient,UncachedQuirkClient,UncachedSignalClient,computeDimensionDefinitionDisplayData,computeDimensionDisplayData,computeDimensionDisplayName,nullLimitPolicy});
${a}${p?" "+p:""} (${s} ${o}${l?` Request ID: ${l}`:""})`);this.errorMessage=t;this.fetchMethod=s;this.fetchUri=o;this.statusCode=a;this.statusText=p;this.requestId=l;Object.setPrototypeOf(this,P.prototype)}};var n=class{constructor(e){m(this,"options");var s,o,a,p,l,h;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let t=e.fetch;if(!t)if(typeof window!="undefined")t=window.fetch.bind(window);else if(typeof fetch!="undefined")t=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:t,apiHost:(s=e.apiHost)!=null?s:"https://uniform.app",apiKey:(o=e.apiKey)!=null?o:null,projectId:(a=e.projectId)!=null?a:null,bearerToken:(p=e.bearerToken)!=null?p:null,limitPolicy:(l=e.limitPolicy)!=null?l:v,bypassCache:(h=e.bypassCache)!=null?h:!1}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var a;let s=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(s["x-bypass-cache"]="true");let o=await this.options.fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...s}});if(!o.ok){let p="";try{let l=await o.text();try{let h=JSON.parse(l);h.errorMessage?p=Array.isArray(h.errorMessage)?h.errorMessage.join(", "):h.errorMessage:p=l}catch(h){p=l}}catch(l){p="General error"}throw new P(p,(a=t==null?void 0:t.method)!=null?a:"GET",e.toString(),o.status,o.statusText,n.getRequestId(o))}return t!=null&&t.expectNoContent?null:await o.json()})}createUrl(e,t){let s=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([o,a])=>{var p;typeof a!="undefined"&&a!==null&&s.searchParams.append(o,(p=a==null?void 0:a.toString())!=null?p:"")}),s}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};var b,U=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(U,b),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},y=U;b=new WeakMap,c(y,b,"/api/v2/aggregate");var L=class extends y{constructor(e){super({...e,bypassCache:!0})}},J=class extends y{constructor(e){super({...e,bypassCache:!1})}};var A,M=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(M,A),{...e,projectId:t});return await this.apiClient(s)}},f=M;A=new WeakMap,c(f,A,"/api/v2/dimension");var $=class extends f{constructor(e){super({...e,bypassCache:!0})}},V=class extends f{constructor(e){super({...e,bypassCache:!1})}};var O,R,C=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(C,O),{...e,projectId:t});return await this.apiClient(s)}async upsertCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(i(C,R));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(i(C,R));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},u=C;O=new WeakMap,R=new WeakMap,c(u,O,"/api/v1/enrichments"),c(u,R,"/api/v1/enrichment-values");var Q=class extends u{constructor(e){super({...e,bypassCache:!0})}},H=class extends u{constructor(e){super({...e,bypassCache:!1})}};var k,z=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(z,k),{...e,projectId:t});return await this.apiClient(s)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}},x=z;k=new WeakMap,c(x,k,"/api/v2/manifest");var K=class extends x{constructor(e){super({...e,bypassCache:!0})}},q=class extends x{constructor(e){super({...e,bypassCache:!1})}};var j,w=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(w,j),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(w,j));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(w,j));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},g=w;j=new WeakMap,c(g,j,"/api/v2/quirk");var Y=class extends g{constructor(e){super({...e,bypassCache:!0})}},B=class extends g{constructor(e){super({...e,bypassCache:!1})}};var E,I=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(I,E),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},d=I;E=new WeakMap,c(d,E,"/api/v2/signal");var F=class extends d{constructor(e){super({...e,bypassCache:!0})}},W=class extends d{constructor(e){super({...e,bypassCache:!1})}};var D,G=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(G,D),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},T=G;D=new WeakMap,c(T,D,"/api/v2/test");var N=class{constructor(e){m(this,"enrichments");m(this,"aggregates");m(this,"dimensions");m(this,"manifest");m(this,"quirks");m(this,"signals");m(this,"tests");this.enrichments=new u(e),this.aggregates=new y(e),this.dimensions=new f(e),this.manifest=new x(e),this.quirks=new g(e),this.signals=new d(e),this.tests=new T(e)}},X=class extends N{constructor(e){super({...e,bypassCache:!0})}},Z=class extends N{constructor(e){super({...e,bypassCache:!1})}};var _="_";function ee(r){let e=r.category==="ENR"?"Enrichment":r.category==="SIG"?"Signal":r.subcategory==="1"?"Intent":r.subcategory==="0"?"Audience":"Aggregate";return{dim:r.dim,name:r.name,type:e,category:r.category==="ENR"?r.subcategory:void 0}}function ce(r,e){var t,s,o,a;if((s=(t=e.project.pz)==null?void 0:t.agg)!=null&&s[r])return{dim:r,name:r,type:"Aggregate"};if((a=(o=e.project.pz)==null?void 0:o.sig)!=null&&a[r])return{dim:r,name:r,type:"Signal"};if(r.indexOf(_)>=0){let[p,l]=r.split(_);return{dim:r,name:l,type:"Enrichment",category:p}}}function le(r){let{type:e,name:t}=ee(r);return`${e}: ${t}`}0&&(module.exports={AggregateClient,ApiClientError,CachedAggregateClient,CachedContextClient,CachedDimensionClient,CachedEnrichmentClient,CachedManifestClient,CachedQuirkClient,CachedSignalClient,ContextClient,DimensionClient,EnrichmentClient,ManifestClient,QuirkClient,SignalClient,UncachedAggregateClient,UncachedContextClient,UncachedDimensionClient,UncachedEnrichmentClient,UncachedManifestClient,UncachedQuirkClient,UncachedSignalClient,computeDimensionDefinitionDisplayData,computeDimensionDisplayData,computeDimensionDisplayName,nullLimitPolicy});
{
"name": "@uniformdev/context",
"version": "16.2.1-nuxt.274+0a8a48855",
"version": "16.2.1-nuxt.338+40296dcbc",
"description": "Uniform Context core package",

@@ -62,3 +62,3 @@ "license": "SEE LICENSE IN LICENSE.txt",

"@types/yargs": "17.0.10",
"@uniformdev/cli": "^16.2.1-nuxt.274+0a8a48855",
"@uniformdev/cli": "^16.2.1-nuxt.338+40296dcbc",
"benny": "3.7.1",

@@ -80,3 +80,3 @@ "yargs": "17.5.1"

},
"gitHead": "0a8a48855ef532336761a3872c3d515ab6b9113e"
"gitHead": "40296dcbc100c48896e99b1fab83117d580dd1e6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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