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

@rest-hooks/endpoint

Package Overview
Dependencies
Maintainers
2
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rest-hooks/endpoint - npm Package Compare versions

Comparing version 3.2.8 to 3.3.0

src/schemas/__tests__/__snapshots__/Query.test.ts.snap

3

dist/index.js

@@ -740,2 +740,5 @@ 'use strict';

CSP = true;
// TODO: figure out how to supress the error log instead of tell people it's okay
/* istanbul ignore next */
console.error('Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead');
}

@@ -742,0 +745,0 @@

2

dist/index.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={})}(this,(function(e){"use strict";function t(e){return!("function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function s(e,t,s){let i=!0,n=!1;return[Object.keys(e).reduce(((t,r)=>{const c=`${r}`,[a,o,h]=s(t.get(c),e[c]);return o||(i=!1),h&&(n=!0),t.has(c)?t.set(c,a):t}),t),i,n]}class i{constructor(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?e=>e[t]:t),this.define(e)}get isSingleSchema(){return!this._schemaAttribute}define(e){this.schema=e}getSchemaAttribute(e,t,s){return!this.isSingleSchema&&this._schemaAttribute(e,t,s)}inferSchema(e,t,s){if(this.isSingleSchema)return this.schema;const i=this.getSchemaAttribute(e,t,s);return this.schema[i]}normalizeValue(e,t,s,i,n,r){const c=this.inferSchema(e,t,s);if(!c)return e;const a=i(e,t,s,c,n,r);return this.isSingleSchema||null==a?a:{id:a,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const i=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!i)return[e,!0,!1];return s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[i])}}const n=([e,,t])=>void 0!==e&&!t;class r extends i{normalize(e,t,s,i,n,r){const c=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return c.map(((e,c)=>this.normalizeValue(e,t,s,i,n,r))).filter((e=>null!=e))}denormalize(e,t){return[e.map?e.map((e=>this.denormalizeValue(e,t))).filter(n).map((([e])=>e)):e,!0,!1]}infer(e,t,s,i){}toJSON(){return[this.schema]}}const c=Symbol("ENTITY WAS DELETED");var a=Object.freeze({__proto__:null,Union:class extends i{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,i,n,r){return this.normalizeValue(e,t,s,i,n,r)}denormalize(e,t){return this.denormalizeValue(e,t)}infer(e,t,s,i){if(!e[0])return;const n=this.getSchemaAttribute(e[0],void 0,""),r=this.schema[n];return void 0!==r?{id:s(r,e,t,i),schema:n}:void 0}},Values:class extends i{normalize(e,t,s,i,n,r){return Object.keys(e).reduce(((t,s,c)=>{const a=e[s];return null!=a?Object.assign({},t,{[s]:this.normalizeValue(a,e,s,i,n,r)}):t}),{})}denormalize(e,t){let s=!0,i=!1;return[Object.keys(e).reduce(((n,r)=>{const c=e[r],[a,o,h]=this.denormalizeValue(c,t);return o||(s=!1),h&&(i=!0),!o||h?n:Object.assign({},n,{[r]:a})}),{}),s,i]}infer(e,t,s){}},Array:r,All:class extends r{constructor(e,t){super(e,t)}normalize(e,t,s,i,n,r){super.normalize(e,t,s,i,n,r)}infer(e,t,s,i){if(this.isSingleSchema){const e=i[this.schema.key];if(void 0===e)return;return Object.values(e).map((e=>e&&this.schema.pk(e)))}let n=!1;const r=Object.values(this.schema).flatMap((e=>Object.hasOwn(i,e.key)&&i[e.key]?(n=!0,Object.values(i[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(n)return r}},Object:class{constructor(e){this.schema=void 0,this.define(e)}define(e){this.schema=Object.keys(e).reduce(((t,s)=>{const i=e[s];return Object.assign({},t,{[s]:i})}),this.schema||{})}normalize(...e){return((e,t,s,i,n,r,c)=>{const a=Object.assign({},t);return Object.keys(e).forEach((s=>{const i=e[s],o=n(t[s],t,s,i,r,c);null==o?delete a[s]:a[s]=o})),a})(this.schema,...e)}denormalize(...e){return((e,i,n)=>{if(t(i))return s(e,i,n);const r=Object.assign({},i);let c=!0,a=!1;return Object.keys(e).forEach((t=>{const[s,i,o]=n(r[t],e[t]);void 0!==r[t]&&(r[t]=s),o&&(a=!0),i||(c=!1)})),[r,c,a]})(this.schema,...e)}infer(e,t,s,i){return function(e,t,s,i,n){const r={};for(const c of Object.keys(e))r[c]=i(e[c],t,s,n);return r}(this.schema,e,t,s,i)}},Delete:class{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,i,n,r){const a=this._entity.process(e,t,s),o=this._entity.pk(a,t,s);return n(this,c,o),o}infer(e,t,s){}denormalize(e,t){return t(e,this._entity)}_denormalizeNullable(){return[]}_normalizeNullable(){return[]}merge(e,t){return t}useIncoming(e,t,s,i){return e.date<=t.date}}});class o{static toJSON(){return{name:this.name,schema:this.schema,key:this.key}}static get key(){return this.name}static pk(e,t,s){return this.prototype.pk.call(e,t,s)}static useIncoming(e,t,s,i){return e.fetchedAt<=t.fetchedAt}static merge(e,t){return Object.assign({},e,t)}static fromJS(e={}){const t=new this(e);return Object.assign(t,e),t}static process(e,t,s){return Object.assign({},e)}static normalize(e,t,s,i,n,r){const c=this.process(e,t,s),a=this.pk(c,t,s);if(void 0===a||""===a)return;const o=this.key;if(o in r||(r[o]={}),a in r[o]||(r[o][a]=[]),r[o][a].some((t=>t===e)))return a;const h=this.validate(c);if(h){const e=new Error(h);throw e.status=400,e}return r[o][a].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(c,e)){const t=this.schema[e];c[e]=i(c[e],c,e,t,n,r)}})),n(this,c,a),a}static validate(e){}static infer(e,t,s){if(!e[0])return;if(["string","number"].includes(typeof e[0]))return`${e[0]}`;const i=this.pk(e[0],void 0,"");if(void 0!==i&&""!==i)return i;const n=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(e[0],this.indexes);if(n&&t[this.key]){return t[this.key][n][e[0][n]]}}static expiresAt(e,t){return e.expiresAt}static denormalize(e,i){if("symbol"==typeof e)return[void 0,!0,!0];if(t(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==i.setLocal||i.setLocal(e);const[t,n,r]=s(this.schema,e,i);return[this.fromJS(t.toObject()),n,r]}if(this.validate(e))return[void 0,!1,!0];const n=this.fromJS(e);null==i.setLocal||i.setLocal(n);let r=!1;return Object.keys(this.schema).forEach((t=>{const s=this.schema[t],c=Object.hasOwn(e,t)?e[t]:void 0,[a,,o]=i(c,s);!o||Object.hasOwn(e,t)&&!this.defaults[t]||(r=!0),Object.hasOwn(e,t)&&e[t]!==a&&this.set(n,t,a)})),[n,!0,r]}static get defaults(){return Object.hasOwn(this,"__defaults")||(this.__defaults=new this),this.__defaults}static set(e,t,s){e[t]=s}}function h(e,t){e.type=e.sideEffect?"mutate":"read",e.options=Object.assign({},t),delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}o.schema={};let u=!1;try{Function()}catch(e){u=!0}class l extends Function{constructor(e,t){let s;return u?(s=(...e)=>s.fetch(...e),Object.setPrototypeOf(s,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),s=this),s.getFetchKey=e=>s.key(e),e&&(s.fetch=e),t&&"name"in t?(s.__name=t.name,delete t.name):e&&(s.__name=e.name),Object.assign(s,t),Object.defineProperty(s,"name",{get:function(){return this.__name}}),h(s,t),s}key(...e){return`${this.name} ${JSON.stringify(e)}`}bind(e,...t){const s=this.fetch,i=this.key;return this.extend({fetch(){return s.apply(null!=e?e:this,t)},key(){return i.apply(this,t)}})}extend(e){class t extends this.constructor{}Object.assign(t.prototype,this);const s=new t(e.fetch,e);return h(s,Object.assign({},this.options,e)),s}}const m=l;class d extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=d,e.DELETED=c,e.Endpoint=l,e.Entity=o,e.ExtendableEndpoint=m,e.Index=class{constructor(e,t){this.getFetchKey=e=>this.key(e),this.schema=e,t&&(this.key=t)}key(e){return JSON.stringify(e)}},e.Query=class{constructor(e,t){this.sideEffect=void 0,this.schema=this.createQuerySchema(e),t?this.process=t:this.process||(this.process=e=>e)}key(...e){return`QUERY ${JSON.stringify(e)}`}createQuerySchema(e){const t=Object.create(e);return t.denormalize=({args:t,input:s},i)=>{if(void 0===s)return[void 0,!1,!0];const[n,r,c]=e.denormalize(s,i);return[r?this.process(n,...t):void 0,r,c]},t.infer=(t,s,i,n)=>({args:t,input:i(e,t,s,n)}),t}},e.schema=a,e.validateRequired=function(e,t){let s="";if(Object.keys(t).some((t=>!Object.hasOwn(e,t)&&(s=t,!0))))return`Missing key ${s}`},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={})}(this,(function(e){"use strict";function t(e){return!("function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function s(e,t,s){let n=!0,i=!1;return[Object.keys(e).reduce(((t,r)=>{const c=`${r}`,[o,a,h]=s(t.get(c),e[c]);return a||(n=!1),h&&(i=!0),t.has(c)?t.set(c,o):t}),t),n,i]}class n{constructor(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?e=>e[t]:t),this.define(e)}get isSingleSchema(){return!this._schemaAttribute}define(e){this.schema=e}getSchemaAttribute(e,t,s){return!this.isSingleSchema&&this._schemaAttribute(e,t,s)}inferSchema(e,t,s){if(this.isSingleSchema)return this.schema;const n=this.getSchemaAttribute(e,t,s);return this.schema[n]}normalizeValue(e,t,s,n,i,r){const c=this.inferSchema(e,t,s);if(!c)return e;const o=n(e,t,s,c,i,r);return this.isSingleSchema||null==o?o:{id:o,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const n=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!n)return[e,!0,!1];return s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[n])}}const i=([e,,t])=>void 0!==e&&!t;class r extends n{normalize(e,t,s,n,i,r){const c=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return c.map(((e,c)=>this.normalizeValue(e,t,s,n,i,r))).filter((e=>null!=e))}denormalize(e,t){return[e.map?e.map((e=>this.denormalizeValue(e,t))).filter(i).map((([e])=>e)):e,!0,!1]}infer(e,t,s,n){}toJSON(){return[this.schema]}}const c=Symbol("ENTITY WAS DELETED");var o=Object.freeze({__proto__:null,Union:class extends n{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,n,i,r){return this.normalizeValue(e,t,s,n,i,r)}denormalize(e,t){return this.denormalizeValue(e,t)}infer(e,t,s,n){if(!e[0])return;const i=this.getSchemaAttribute(e[0],void 0,""),r=this.schema[i];return void 0!==r?{id:s(r,e,t,n),schema:i}:void 0}},Values:class extends n{normalize(e,t,s,n,i,r){return Object.keys(e).reduce(((t,s,c)=>{const o=e[s];return null!=o?Object.assign({},t,{[s]:this.normalizeValue(o,e,s,n,i,r)}):t}),{})}denormalize(e,t){let s=!0,n=!1;return[Object.keys(e).reduce(((i,r)=>{const c=e[r],[o,a,h]=this.denormalizeValue(c,t);return a||(s=!1),h&&(n=!0),!a||h?i:Object.assign({},i,{[r]:o})}),{}),s,n]}infer(e,t,s){}},Array:r,All:class extends r{constructor(e,t){super(e,t)}normalize(e,t,s,n,i,r){super.normalize(e,t,s,n,i,r)}infer(e,t,s,n){if(this.isSingleSchema){const e=n[this.schema.key];if(void 0===e)return;return Object.values(e).map((e=>e&&this.schema.pk(e)))}let i=!1;const r=Object.values(this.schema).flatMap((e=>Object.hasOwn(n,e.key)&&n[e.key]?(i=!0,Object.values(n[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(i)return r}},Object:class{constructor(e){this.schema=void 0,this.define(e)}define(e){this.schema=Object.keys(e).reduce(((t,s)=>{const n=e[s];return Object.assign({},t,{[s]:n})}),this.schema||{})}normalize(...e){return((e,t,s,n,i,r,c)=>{const o=Object.assign({},t);return Object.keys(e).forEach((s=>{const n=e[s],a=i(t[s],t,s,n,r,c);null==a?delete o[s]:o[s]=a})),o})(this.schema,...e)}denormalize(...e){return((e,n,i)=>{if(t(n))return s(e,n,i);const r=Object.assign({},n);let c=!0,o=!1;return Object.keys(e).forEach((t=>{const[s,n,a]=i(r[t],e[t]);void 0!==r[t]&&(r[t]=s),a&&(o=!0),n||(c=!1)})),[r,c,o]})(this.schema,...e)}infer(e,t,s,n){return function(e,t,s,n,i){const r={};for(const c of Object.keys(e))r[c]=n(e[c],t,s,i);return r}(this.schema,e,t,s,n)}},Delete:class{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,n,i,r){const o=this._entity.process(e,t,s),a=this._entity.pk(o,t,s);return i(this,c,a),a}infer(e,t,s){}denormalize(e,t){return t(e,this._entity)}_denormalizeNullable(){return[]}_normalizeNullable(){return[]}merge(e,t){return t}useIncoming(e,t,s,n){return e.date<=t.date}}});class a{static toJSON(){return{name:this.name,schema:this.schema,key:this.key}}static get key(){return this.name}static pk(e,t,s){return this.prototype.pk.call(e,t,s)}static useIncoming(e,t,s,n){return e.fetchedAt<=t.fetchedAt}static merge(e,t){return Object.assign({},e,t)}static fromJS(e={}){const t=new this(e);return Object.assign(t,e),t}static process(e,t,s){return Object.assign({},e)}static normalize(e,t,s,n,i,r){const c=this.process(e,t,s),o=this.pk(c,t,s);if(void 0===o||""===o)return;const a=this.key;if(a in r||(r[a]={}),o in r[a]||(r[a][o]=[]),r[a][o].some((t=>t===e)))return o;const h=this.validate(c);if(h){const e=new Error(h);throw e.status=400,e}return r[a][o].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(c,e)){const t=this.schema[e];c[e]=n(c[e],c,e,t,i,r)}})),i(this,c,o),o}static validate(e){}static infer(e,t,s){if(!e[0])return;if(["string","number"].includes(typeof e[0]))return`${e[0]}`;const n=this.pk(e[0],void 0,"");if(void 0!==n&&""!==n)return n;const i=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(e[0],this.indexes);if(i&&t[this.key]){return t[this.key][i][e[0][i]]}}static expiresAt(e,t){return e.expiresAt}static denormalize(e,n){if("symbol"==typeof e)return[void 0,!0,!0];if(t(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==n.setLocal||n.setLocal(e);const[t,i,r]=s(this.schema,e,n);return[this.fromJS(t.toObject()),i,r]}if(this.validate(e))return[void 0,!1,!0];const i=this.fromJS(e);null==n.setLocal||n.setLocal(i);let r=!1;return Object.keys(this.schema).forEach((t=>{const s=this.schema[t],c=Object.hasOwn(e,t)?e[t]:void 0,[o,,a]=n(c,s);!a||Object.hasOwn(e,t)&&!this.defaults[t]||(r=!0),Object.hasOwn(e,t)&&e[t]!==o&&this.set(i,t,o)})),[i,!0,r]}static get defaults(){return Object.hasOwn(this,"__defaults")||(this.__defaults=new this),this.__defaults}static set(e,t,s){e[t]=s}}function h(e,t){e.type=e.sideEffect?"mutate":"read",e.options=Object.assign({},t),delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}a.schema={};let u=!1;try{Function()}catch(e){u=!0,console.error("Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead")}class l extends Function{constructor(e,t){let s;return u?(s=(...e)=>s.fetch(...e),Object.setPrototypeOf(s,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),s=this),s.getFetchKey=e=>s.key(e),e&&(s.fetch=e),t&&"name"in t?(s.__name=t.name,delete t.name):e&&(s.__name=e.name),Object.assign(s,t),Object.defineProperty(s,"name",{get:function(){return this.__name}}),h(s,t),s}key(...e){return`${this.name} ${JSON.stringify(e)}`}bind(e,...t){const s=this.fetch,n=this.key;return this.extend({fetch(){return s.apply(null!=e?e:this,t)},key(){return n.apply(this,t)}})}extend(e){class t extends this.constructor{}Object.assign(t.prototype,this);const s=new t(e.fetch,e);return h(s,Object.assign({},this.options,e)),s}}const m=l;class d extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=d,e.DELETED=c,e.Endpoint=l,e.Entity=a,e.ExtendableEndpoint=m,e.Index=class{constructor(e,t){this.getFetchKey=e=>this.key(e),this.schema=e,t&&(this.key=t)}key(e){return JSON.stringify(e)}},e.Query=class{constructor(e,t){this.sideEffect=void 0,this.schema=this.createQuerySchema(e),t?this.process=t:this.process||(this.process=e=>e)}key(...e){return`QUERY ${JSON.stringify(e)}`}createQuerySchema(e){const t=Object.create(e);return t.denormalize=({args:t,input:s},n)=>{if(void 0===s)return[void 0,!1,!0];const[i,r,c]=e.denormalize(s,n);return[r?this.process(i,...t):void 0,r,c]},t.infer=(t,s,n,i)=>({args:t,input:n(e,t,s,i)}),t}},e.schema=o,e.validateRequired=function(e,t){let s="";if(Object.keys(t).some((t=>!Object.hasOwn(e,t)&&(s=t,!0))))return`Missing key ${s}`},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -21,2 +21,5 @@ function runCompat(endpoint, options) {

CSP = true;
// TODO: figure out how to supress the error log instead of tell people it's okay
/* istanbul ignore next */
console.error('Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead');
}

@@ -89,2 +92,2 @@

export const ExtendableEndpoint = Endpoint;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJydW5Db21wYXQiLCJlbmRwb2ludCIsIm9wdGlvbnMiLCJ0eXBlIiwic2lkZUVmZmVjdCIsImtleSIsInNjaGVtYSIsImZldGNoIiwiZ2V0RmV0Y2hLZXkiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiQ1NQIiwiRnVuY3Rpb24iLCJlIiwiRW5kcG9pbnQiLCJjb25zdHJ1Y3RvciIsImZldGNoRnVuY3Rpb24iLCJzZWxmIiwiYXJncyIsInNldFByb3RvdHlwZU9mIiwibmV3IiwidGFyZ2V0IiwicHJvdG90eXBlIiwicGFyYW1zIiwiX19uYW1lIiwibmFtZSIsImFzc2lnbiIsImRlZmluZVByb3BlcnR5IiwiZ2V0IiwiSlNPTiIsInN0cmluZ2lmeSIsImJpbmQiLCJ0aGlzQXJnIiwiZmV0Y2hGdW5jIiwia2V5RnVuYyIsImV4dGVuZCIsImFwcGx5IiwiRSIsImluc3RhbmNlIiwiRXh0ZW5kYWJsZUVuZHBvaW50Il0sInNvdXJjZXMiOlsiLi4vc3JjL2VuZHBvaW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIHJ1bkNvbXBhdChlbmRwb2ludCwgb3B0aW9ucykge1xuICBlbmRwb2ludC50eXBlID0gZW5kcG9pbnQuc2lkZUVmZmVjdCA/ICdtdXRhdGUnIDogJ3JlYWQnO1xuICBlbmRwb2ludC5vcHRpb25zID0geyAuLi5vcHRpb25zIH07XG4gIGRlbGV0ZSBlbmRwb2ludC5vcHRpb25zLmtleTtcbiAgZGVsZX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UVPLElBQUksRUFBRWEsT0FBTyxFQUFFRSxRQUFRO01BQUUsQ0FBQztJQUNsRSxDQUFDO0lBQ0QsT0FBT1osS0FBSztFQUNkO0FBQ0YifQ==

@@ -23,2 +23,5 @@ function runCompat(endpoint, options) {

CSP = true;
// TODO: figure out how to supress the error log instead of tell people it's okay
/* istanbul ignore next */
console.error('Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead');
}

@@ -94,2 +97,2 @@

export const ExtendableEndpoint = Endpoint;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJydW5Db21wYXQiLCJlbmRwb2ludCIsIm9wdGlvbnMiLCJ0eXBlIiwic2lkZUVmZmVjdCIsImtleSIsInNjaGVtYSIsImZldGNoIiwiZ2V0RmV0Y2hLZXkiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiQ1NQIiwiRnVuY3Rpb24iLCJlIiwiRW5kcG9pbnQiLCJjb25zdHJ1Y3RvciIsImZldGNoRnVuY3Rpb24iLCJzZWxmIiwiYXJncyIsInNldFByb3RvdHlwZU9mIiwibmV3IiwidGFyZ2V0IiwicHJvdG90eXBlIiwicGFyYW1zIiwiX19uYW1lIiwibmFtZSIsImFzc2lnbiIsImRlZmluZVByb3BlcnR5IiwiZ2V0IiwiSlNPTiIsInN0cmluZ2lmeSIsImJpbmQiLCJ0aGlzQXJnIiwiZmV0Y2hGdW5jIiwia2V5RnVuYyIsImV4dGVuZCIsImFwcGx5IiwiRSIsImluc3RhbmNlIiwiRXh0ZW5kYWJsZUVuZHBvaW50Il0sInNvdXJjZXMiOlsiLi4vc3JjL2VuZHBvaW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIHJ1bkNvbXBhdChlbmRwb2ludCwgb3B0aW9ucykge1xuICBlbmRwb2ludC50eXBlID0gZW5kcG9pbnQuc2lkZUVmZmVjdCA/ICd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QUFDakMsR0FBRztJQUN4QixPQUFPLElBQUksQ0FBQ2tDLE1BQU0sQ0FBQztNQUNqQmhDLEtBQUssR0FBRztRQUNOLE9BQU84QixTQUFTLENBQUNHLEtBQUssQ0FBQ0osT0FBTyxXQUFQQSxPQUFPLEdBQUksSUFBSSxFQUFFZCxJQUFJLENBQUM7TUFDL0MsQ0FBQztNQUNEakIsR0FBRyxHQUFHO1FBQ0osT0FBT2lDLE9BQU8sQ0FBQ0UsS0FBSyxDQUFDLElBQUksRUFBRWxCLElBQUksQ0FBQztNQUNsQztJQUNGLENBQUMsQ0FBQztFQUNKO0VBRUFpQixNQUFNLENBQUNyQyxPQUFPLEVBQUU7SUFDZDtJQUNBO0lBQ0EsTUFBTXVDLENBQUMsU0FBUyxJQUFJLENBQUN0QixXQUFXLENBQUM7SUFFakNWLE1BQU0sQ0FBQ3FCLE1BQU0sQ0FBQ1csQ0FBQyxDQUFDZixTQUFTLEVBQUUsSUFBSSxDQUFDO0lBQ2hDLE1BQU1nQixRQUFRLEdBQUcsSUFBSUQsQ0FBQyxDQUFDdkMsT0FBTyxDQUFDSyxLQUFLLEVBQUVMLE9BQU8sQ0FBQzs7SUFFOUM7SUFDQUYsU0FBUyxDQUFDMEMsUUFBUSxFQUFFO01BQUUsR0FBRyxJQUFJLENBQUN4QyxPQUFPO01BQUUsR0FBR0E7SUFBUSxDQUFDLENBQUM7SUFFcEQsT0FBT3dDLFFBQVE7RUFDakI7QUFDRjtBQUNBLE9BQU8sTUFBTUMsa0JBQWtCLEdBQUd6QixRQUFRIn0=

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

import type { SchemaSimple } from './interface.js';
import type { SchemaSimple, UnvisitFunction } from './interface.js';
import type { Denormalize } from './normal.js';

@@ -7,10 +7,15 @@ /**

*/
export declare class Query<S extends SchemaSimple, P extends any[] = []> {
schema: S;
process: (entries: Denormalize<S>, ...args: P) => Denormalize<S>;
export declare class Query<S extends SchemaSimple, P extends any[] = [], R = Denormalize<S>> {
schema: QuerySchema<S, R>;
process: (entries: Denormalize<S>, ...args: P) => R;
readonly sideEffect: undefined;
constructor(schema: S, process?: (entries: Denormalize<S>, ...args: P) => Denormalize<S>);
constructor(schema: S, process?: (entries: Denormalize<S>, ...args: P) => R);
key(...args: P): string;
protected createQuerySchema(schema: SchemaSimple): any;
}
type QuerySchema<Schema, R> = Exclude<Schema, 'denormalize' | '_denormalizeNullable'> & {
denormalize(input: {}, unvisit: UnvisitFunction): [denormalized: R, found: boolean, suspend: boolean];
_denormalizeNullable(input: {}, unvisit: UnvisitFunction): [denormalized: R | undefined, found: boolean, suspend: boolean];
};
export {};
//# sourceMappingURL=queryEndpoint.d.ts.map

@@ -37,2 +37,2 @@ /**

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJRdWVyeSIsImNvbnN0cnVjdG9yIiwic2NoZW1hIiwicHJvY2VzcyIsInNpZGVFZmZlY3QiLCJ1bmRlZmluZWQiLCJjcmVhdGVRdWVyeVNjaGVtYSIsImVudHJpZXMiLCJrZXkiLCJhcmdzIiwiSlNPTiIsInN0cmluZ2lmeSIsInF1ZXJ5IiwiT2JqZWN0IiwiY3JlYXRlIiwiZGVub3JtYWxpemUiLCJpbnB1dCIsInVudmlzaXQiLCJ2YWx1ZSIsImZvdW5kIiwiZGVsZXRlZCIsImluZmVyIiwiaW5kZXhlcyIsInJlY3Vyc2UiLCJlbnRpdGllcyJdLCJzb3VyY2VzIjpbIi4uL3NyYy9xdWVyeUVuZHBvaW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHtcbiAgRW50aXR5VGFibGUsXG4gIE5vcm1hbGl6ZWRJbmRleCxcbiAgU2NoZW1hU2ltcGxlLFxufSBmcm9tICcuL2ludGVyZmFjZS5qcyc7XG5pbXBvcnQgdHlwZSB7IERlbm9ybWFsaXplIH0gZnJvbSAnLi9ub3JtYWwuanMnO1xuXG4vKipcbiAqIFByb2dyYW1tYXRpYyBj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QU1VLEtBQUssR0FBR0MsTUFBTSxDQUFDQyxNQUFNLENBQUNaLE1BQU0sQ0FBQztJQUNuQ1UsS0FBSyxDQUFDRyxXQUFXLEdBQUcsQ0FDbEI7TUFBRU4sSUFBSTtNQUFFTztJQUErQixDQUFDLEVBQ3hDQyxPQUFZLEtBQ1Q7TUFDSCxJQUFJRCxLQUFLLEtBQUtYLFNBQVMsRUFBRSxPQUFPLENBQUNBLFNBQVMsRUFBRSxLQUFLLEVBQUUsSUFBSSxDQUFDO01BQ3hELE1BQU0sQ0FBQ2EsS0FBSyxFQUFFQyxLQUFLLEVBQUVDLE9BQU8sQ0FBQyxHQUFHbEIsTUFBTSxDQUFDYSxXQUFXLENBQUNDLEtBQUssRUFBRUMsT0FBTyxDQUFDO01BQ2xFLE9BQU8sQ0FBQ0UsS0FBSyxHQUFHLElBQUksQ0FBQ2hCLE9BQU8sQ0FBQ2UsS0FBSyxFQUFFLEdBQUdULElBQUksQ0FBQyxHQUFHSixTQUFTLEVBQUVjLEtBQUssRUFBRUMsT0FBTyxDQUFDO0lBQzNFLENBQUM7SUFDRFIsS0FBSyxDQUFDUyxLQUFLLEdBQUcsQ0FDWlosSUFBUyxFQUNUYSxPQUFZLEVBQ1pDLE9BS1EsRUFDUkMsUUFBcUIsS0FDbEI7TUFDSCxPQUFPO1FBQUVmLElBQUk7UUFBRU8sS0FBSyxFQUFFTyxPQUFPLENBQUNyQixNQUFNLEVBQUVPLElBQUksRUFBRWEsT0FBTyxFQUFFRSxRQUFRO01BQUUsQ0FBQztJQUNsRSxDQUFDO0lBQ0QsT0FBT1osS0FBSztFQUNkO0FBQ0YifQ==
{
"name": "@rest-hooks/endpoint",
"version": "3.2.8",
"version": "3.3.0",
"description": "Declarative Network Interface Definitions",

@@ -120,3 +120,3 @@ "sideEffects": false,

},
"gitHead": "365bf04cc2dcef81a87d4c830c0a6c689eb32044"
"gitHead": "86c630b4b313679c7a441cc7fa060dfb9005d1da"
}

@@ -22,2 +22,7 @@ function runCompat(endpoint, options) {

CSP = true;
// TODO: figure out how to supress the error log instead of tell people it's okay
/* istanbul ignore next */
console.error(
'Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead',
);
}

@@ -24,0 +29,0 @@

@@ -5,2 +5,3 @@ import type {

SchemaSimple,
UnvisitFunction,
} from './interface.js';

@@ -13,13 +14,14 @@ import type { Denormalize } from './normal.js';

*/
export class Query<S extends SchemaSimple, P extends any[] = []> {
declare schema: S;
export class Query<
S extends SchemaSimple,
P extends any[] = [],
R = Denormalize<S>,
> {
declare schema: QuerySchema<S, R>;
// TODO: allow arbitrary return types then inferring it from
declare process: (entries: Denormalize<S>, ...args: P) => Denormalize<S>;
declare process: (entries: Denormalize<S>, ...args: P) => R;
readonly sideEffect = undefined;
constructor(
schema: S,
process?: (entries: Denormalize<S>, ...args: P) => Denormalize<S>,
) {
constructor(schema: S, process?: (entries: Denormalize<S>, ...args: P) => R) {
this.schema = this.createQuerySchema(schema);

@@ -62,1 +64,15 @@ if (process) this.process = process;

}
type QuerySchema<Schema, R> = Exclude<
Schema,
'denormalize' | '_denormalizeNullable'
> & {
denormalize(
input: {},
unvisit: UnvisitFunction,
): [denormalized: R, found: boolean, suspend: boolean];
_denormalizeNullable(
input: {},
unvisit: UnvisitFunction,
): [denormalized: R | undefined, found: boolean, suspend: boolean];
};

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

import { SchemaSimple } from './interface.js';
import { SchemaSimple, UnvisitFunction } from './interface.js';
import { Denormalize } from './normal.js';

@@ -8,10 +8,23 @@ /**

export declare class Query<S extends SchemaSimple, P extends any[] = [
]> {
schema: S;
process: (entries: Denormalize<S>, ...args: P) => Denormalize<S>;
], R = Denormalize<S>> {
schema: QuerySchema<S, R>;
process: (entries: Denormalize<S>, ...args: P) => R;
readonly sideEffect: undefined;
constructor(schema: S, process?: (entries: Denormalize<S>, ...args: P) => Denormalize<S>);
constructor(schema: S, process?: (entries: Denormalize<S>, ...args: P) => R);
key(...args: P): string;
protected createQuerySchema(schema: SchemaSimple): any;
}
type QuerySchema<Schema, R> = Exclude<Schema, 'denormalize' | '_denormalizeNullable'> & {
denormalize(input: {}, unvisit: UnvisitFunction): [
/*denormalized*/ R,
/*found*/ boolean,
/*suspend*/ boolean
];
_denormalizeNullable(input: {}, unvisit: UnvisitFunction): [
/*denormalized*/ R | undefined,
/*found*/ boolean,
/*suspend*/ boolean
];
};
export {};
//# sourceMappingURL=queryEndpoint.d.ts.map

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