@serverbench/js 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFIJDSJKBcjs = require('./chunk-FIJDSJKB.cjs');require('./chunk-EYEXIIFR.cjs');require('./chunk-UZVZQL4F.cjs');require('./chunk-3YNQTTHI.cjs');require('./chunk-LUTKTZJQ.cjs');require('./chunk-T4XJ6ERT.cjs');require('./chunk-5EFJ4GIY.cjs');require('./chunk-FXVJCHR6.cjs');require('./chunk-VX4LKECW.cjs');exports.default = _chunkFIJDSJKBcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2X5NRDCEcjs = require('./chunk-2X5NRDCE.cjs');require('./chunk-3YNQTTHI.cjs');require('./chunk-LUTKTZJQ.cjs');require('./chunk-T4XJ6ERT.cjs');require('./chunk-5EFJ4GIY.cjs');require('./chunk-EYEXIIFR.cjs');require('./chunk-UZVZQL4F.cjs');require('./chunk-FXVJCHR6.cjs');require('./chunk-VX4LKECW.cjs');exports.default = _chunk2X5NRDCEcjs.a;
2
2
  //# sourceMappingURL=Serverbench.cjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-2MSBHHK5.js";import"./chunk-HBGU3S3O.js";import"./chunk-UTQPTYIQ.js";import"./chunk-CTMUE5H3.js";import"./chunk-4GCQV2YR.js";import"./chunk-G27KF7G3.js";import"./chunk-4PA7GD6K.js";import"./chunk-GLEWOHG7.js";import"./chunk-4NMPBSP3.js";export{a as default};
1
+ import{a}from"./chunk-EUZSI35S.js";import"./chunk-CTMUE5H3.js";import"./chunk-4GCQV2YR.js";import"./chunk-G27KF7G3.js";import"./chunk-4PA7GD6K.js";import"./chunk-HBGU3S3O.js";import"./chunk-UTQPTYIQ.js";import"./chunk-GLEWOHG7.js";import"./chunk-4NMPBSP3.js";export{a as default};
2
2
  //# sourceMappingURL=Serverbench.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEYEXIIFRcjs = require('./chunk-EYEXIIFR.cjs');var _chunk3YNQTTHIcjs = require('./chunk-3YNQTTHI.cjs');var _chunkFXVJCHR6cjs = require('./chunk-FXVJCHR6.cjs');var _nonsecure = require('nanoid/non-secure');var n=class n{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!n.instance||n.instance.clientId!==t||n.instance.clientSecret!==e||n.instance.test!==s)&&(n.instance=new n(t,e,s)),n.instance}get store(){return new (0, _chunkEYEXIIFRcjs.a)(this)}get voting(){return new (0, _chunk3YNQTTHIcjs.a)(this)}async member(t){return _chunkFXVJCHR6cjs.a.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",i=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&i.set("Content-Type","application/json");let a=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:i,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(a.status<200||a.status>=300)throw new Error(a.statusText);return a.json()}rid(){return _nonsecure.nanoid.call(void 0, )}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://live.beta.serverbench.io",i=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),a=0,c=this.rid();return i.onopen=()=>{a=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`,rid:c}))},i.onmessage=p=>{let r=JSON.parse(p.data);if(r.result!=null&&(Array.isArray(r.result)&&r.result.length||Object.keys(r.result).length>0)&&r.rid==c)e(r.result);else{let l=[r.realm];r.realm=="community"&&l.push(this.clientId),l.push(r.action),c=this.rid(),i.send(JSON.stringify({action:l.join("."),rid:c}))}},s||(i.onclose=()=>{a++,setTimeout(()=>{i=this.socket(t,e,!0).ws},Math.min(1e3*a*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};n.instance=null;var h=n;exports.a = h;
2
- //# sourceMappingURL=chunk-FIJDSJKB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3YNQTTHIcjs = require('./chunk-3YNQTTHI.cjs');var _chunkEYEXIIFRcjs = require('./chunk-EYEXIIFR.cjs');var _chunkFXVJCHR6cjs = require('./chunk-FXVJCHR6.cjs');var _nonsecure = require('nanoid/non-secure');var n=class n{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!n.instance||n.instance.clientId!==t||n.instance.clientSecret!==e||n.instance.test!==s)&&(n.instance=new n(t,e,s)),n.instance}get store(){return new (0, _chunkEYEXIIFRcjs.a)(this)}get voting(){return new (0, _chunk3YNQTTHIcjs.a)(this)}async member(t){return _chunkFXVJCHR6cjs.a.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",i=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&i.set("Content-Type","application/json");let a=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:i,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(a.status<200||a.status>=300)throw new Error(a.statusText);return a.json()}rid(){return _nonsecure.nanoid.call(void 0, )}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://live.beta.serverbench.io",i=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),a=0,c=this.rid();return i.onopen=()=>{a=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`,rid:c}))},i.onmessage=p=>{let r=JSON.parse(p.data);if(r.result!=null&&(Array.isArray(r.result)&&r.result.length||Object.keys(r.result).length>0)&&r.rid==c)e(r.result);else{let l=[r.realm];r.realm=="community"&&l.push(this.clientId),l.push(r.action),c=this.rid(),i.send(JSON.stringify({action:l.join("."),rid:c}))}},s||(i.onclose=()=>{a++,setTimeout(()=>{i=this.socket(t,e,!0).ws},Math.min(1e3*a*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};n.instance=null;var h=n;exports.a = h;
2
+ //# sourceMappingURL=chunk-2X5NRDCE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/quique/Documents/serverbench/js/dist/chunk-FIJDSJKB.cjs","../src/Serverbench.ts"],"names":["_Serverbench","clientId","clientSecret","test","Store","Voting","find","Member","realm","url","body","domain","headers"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,8CCAnG,IAKFA,CAAAA,CAArB,MAAqBA,CAAY,CAQrB,WAAA,CAAYC,CAAAA,CAAkBC,CAAAA,CAAsBC,CAAAA,CAAe,CACvE,IAAA,CAAK,QAAA,CAAWF,CAAAA,CAChB,IAAA,CAAK,YAAA,CAAeC,CAAAA,CACpB,IAAA,CAAK,IAAA,CAAOC,CAChB,CAEA,OAAO,GAAA,CAAIF,CAAAA,CAAkBC,CAAAA,CAAsBC,CAAAA,CAAgB,CAAA,CAAA,CAAO,CACtE,MAAA,CAAI,CAACH,CAAAA,CAAY,QAAA,EAAYA,CAAAA,CAAY,QAAA,CAAS,QAAA,GAAaC,CAAAA,EAAYD,CAAAA,CAAY,QAAA,CAAS,YAAA,GAAiBE,CAAAA,EAAgBF,CAAAA,CAAY,QAAA,CAAS,IAAA,GAASG,CAAAA,CAAAA,EAAAA,CAC3JH,CAAAA,CAAY,QAAA,CAAW,IAAIA,CAAAA,CAAYC,CAAAA,CAAUC,CAAAA,CAAcC,CAAI,CAAA,CAAA,CAEhEH,CAAAA,CAAY,QACvB,CAEA,IAAI,KAAA,CAAA,CAAQ,CACR,OAAO,IAAII,wBAAAA,CAAM,IAAI,CACzB,CAEA,IAAI,MAAA,CAAA,CAAS,CACT,OAAO,IAAIC,wBAAAA,CAAO,IAAI,CAC1B,CAEA,MAAa,MAAA,CAAOC,CAAAA,CAGjB,CACC,OAAOC,mBAAAA,CAAO,UAAA,CAAW,IAAA,CAAM,MAAM,IAAA,CAAK,IAAA,CAAK,WAAA,CAAa,gBAAA,CAAkBD,CAAI,CAAC,CACvF,CAEA,MAAc,KAAA,CAAME,CAAAA,CAAeC,CAAAA,CAAaC,CAAAA,CAAY,CACxD,IAAMC,CAAAA,CAAS,IAAA,CAAK,IAAA,CAAO,4BAAA,CAA+B,iCAAA,CACpDC,CAAAA,CAAU,IAAI,OAAA,CAAQ,CACxB,aAAA,CAAe,CAAA,OAAA,EAAU,IAAA,CAAK,YAAY,CAAA,CAAA","file":"/Users/quique/Documents/serverbench/js/dist/chunk-FIJDSJKB.cjs","sourcesContent":[null,"import { nanoid } from \"nanoid/non-secure\"\nimport Member from \"./Member.js\"\nimport Store from \"./store/Store.js\"\nimport Voting from \"./voting/Voting.js\"\n\nexport default class Serverbench {\n\n clientId: string\n clientSecret: string\n test: boolean\n\n private static instance: Serverbench | null = null\n\n private constructor(clientId: string, clientSecret: string, test: boolean) {\n this.clientId = clientId\n this.clientSecret = clientSecret\n this.test = test\n }\n\n static get(clientId: string, clientSecret: string, test: boolean = false) {\n if (!Serverbench.instance || Serverbench.instance.clientId !== clientId || Serverbench.instance.clientSecret !== clientSecret || Serverbench.instance.test !== test) {\n Serverbench.instance = new Serverbench(clientId, clientSecret, test)\n }\n return Serverbench.instance\n }\n\n get store() {\n return new Store(this)\n }\n\n get voting() {\n return new Voting(this)\n }\n\n public async member(find: {\n username?: string,\n eid?: string,\n }) {\n return Member.fromObject(this, await this.post('community', '/member/search', find))\n }\n\n private async fetch(realm: string, url: string, body?: any) {\n const domain = this.test ? 'https://dev.serverbench.io' : 'https://api.beta.serverbench.io'\n const headers = new Headers({\n authorization: `ApiKey ${this.clientSecret}`,\n })\n if (body) {\n headers.set('Content-Type', 'application/json')\n }\n const response = await fetch(`${domain}/${realm}/${this.clientId}${url}`, {\n headers,\n method: body ? 'POST' : 'GET',\n body: body ? JSON.stringify(body) : undefined\n })\n if (response.status < 200 || response.status >= 300) {\n throw new Error(response.statusText)\n }\n return response.json()\n }\n\n private rid() {\n return nanoid()\n }\n\n public socket(action: string, handleMessage = (data: any) => { }, ignoreClose = false) {\n const domain = this.test ? 'ws://localhost:3030' : 'wss://live.beta.serverbench.io'\n let ws = new WebSocket(`${domain}?${new URLSearchParams({\n key: this.clientSecret,\n })}`)\n let i = 0\n let expecting = this.rid()\n ws.onopen = () => {\n i = 0\n ws.send(JSON.stringify({\n action: `community.${this.clientId}.${action}`,\n rid: expecting\n }))\n }\n ws.onmessage = (event) => {\n const data = JSON.parse(event.data)\n if (data.result != null && ((Array.isArray(data.result) && data.result.length) || Object.keys(data.result).length > 0) && data.rid == expecting) {\n handleMessage(data.result)\n } else {\n let action = [data.realm]\n if (data.realm == 'community') {\n action.push(this.clientId)\n }\n action.push(data.action)\n expecting = this.rid()\n ws.send(JSON.stringify({\n action: action.join('.'),\n rid: expecting\n }))\n }\n }\n if (!ignoreClose) {\n ws.onclose = () => {\n i++\n setTimeout(() => {\n ws = this.socket(action, handleMessage, true).ws\n }, Math.min(1000 * (i) * 5, 30 * 1000));\n }\n }\n return {\n dispose: () => {\n ws.onclose = null\n ws.close()\n },\n ws\n }\n }\n\n async get(realm: string, url: string) {\n return this.fetch(realm, url)\n }\n\n async post(realm: string, url: string, body: any = {}) {\n return this.fetch(realm, url, body)\n }\n\n}"]}
1
+ {"version":3,"sources":["/Users/quique/Documents/serverbench/js/dist/chunk-2X5NRDCE.cjs","../src/Serverbench.ts"],"names":["_Serverbench","clientId","clientSecret","test","Store","Voting","find","Member","realm","url","body","domain","headers"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,8CCAnG,IAKFA,CAAAA,CAArB,MAAqBA,CAAY,CAQrB,WAAA,CAAYC,CAAAA,CAAkBC,CAAAA,CAAsBC,CAAAA,CAAe,CACvE,IAAA,CAAK,QAAA,CAAWF,CAAAA,CAChB,IAAA,CAAK,YAAA,CAAeC,CAAAA,CACpB,IAAA,CAAK,IAAA,CAAOC,CAChB,CAEA,OAAO,GAAA,CAAIF,CAAAA,CAAkBC,CAAAA,CAAsBC,CAAAA,CAAgB,CAAA,CAAA,CAAO,CACtE,MAAA,CAAI,CAACH,CAAAA,CAAY,QAAA,EAAYA,CAAAA,CAAY,QAAA,CAAS,QAAA,GAAaC,CAAAA,EAAYD,CAAAA,CAAY,QAAA,CAAS,YAAA,GAAiBE,CAAAA,EAAgBF,CAAAA,CAAY,QAAA,CAAS,IAAA,GAASG,CAAAA,CAAAA,EAAAA,CAC3JH,CAAAA,CAAY,QAAA,CAAW,IAAIA,CAAAA,CAAYC,CAAAA,CAAUC,CAAAA,CAAcC,CAAI,CAAA,CAAA,CAEhEH,CAAAA,CAAY,QACvB,CAEA,IAAI,KAAA,CAAA,CAAQ,CACR,OAAO,IAAII,wBAAAA,CAAM,IAAI,CACzB,CAEA,IAAI,MAAA,CAAA,CAAS,CACT,OAAO,IAAIC,wBAAAA,CAAO,IAAI,CAC1B,CAEA,MAAa,MAAA,CAAOC,CAAAA,CAGjB,CACC,OAAOC,mBAAAA,CAAO,UAAA,CAAW,IAAA,CAAM,MAAM,IAAA,CAAK,IAAA,CAAK,WAAA,CAAa,gBAAA,CAAkBD,CAAI,CAAC,CACvF,CAEA,MAAc,KAAA,CAAME,CAAAA,CAAeC,CAAAA,CAAaC,CAAAA,CAAY,CACxD,IAAMC,CAAAA,CAAS,IAAA,CAAK,IAAA,CAAO,4BAAA,CAA+B,iCAAA,CACpDC,CAAAA,CAAU,IAAI,OAAA,CAAQ,CACxB,aAAA,CAAe,CAAA,OAAA,EAAU,IAAA,CAAK,YAAY,CAAA,CAAA","file":"/Users/quique/Documents/serverbench/js/dist/chunk-2X5NRDCE.cjs","sourcesContent":[null,"import { nanoid } from \"nanoid/non-secure\"\nimport Member from \"./Member.js\"\nimport Store from \"./store/Store.js\"\nimport Voting from \"./voting/Voting.js\"\n\nexport default class Serverbench {\n\n clientId: string\n clientSecret: string\n test: boolean\n\n private static instance: Serverbench | null = null\n\n private constructor(clientId: string, clientSecret: string, test: boolean) {\n this.clientId = clientId\n this.clientSecret = clientSecret\n this.test = test\n }\n\n static get(clientId: string, clientSecret: string, test: boolean = false) {\n if (!Serverbench.instance || Serverbench.instance.clientId !== clientId || Serverbench.instance.clientSecret !== clientSecret || Serverbench.instance.test !== test) {\n Serverbench.instance = new Serverbench(clientId, clientSecret, test)\n }\n return Serverbench.instance\n }\n\n get store() {\n return new Store(this)\n }\n\n get voting() {\n return new Voting(this)\n }\n\n public async member(find: {\n username?: string,\n eid?: string,\n }) {\n return Member.fromObject(this, await this.post('community', '/member/search', find))\n }\n\n private async fetch(realm: string, url: string, body?: any) {\n const domain = this.test ? 'https://dev.serverbench.io' : 'https://api.beta.serverbench.io'\n const headers = new Headers({\n authorization: `ApiKey ${this.clientSecret}`,\n })\n if (body) {\n headers.set('Content-Type', 'application/json')\n }\n const response = await fetch(`${domain}/${realm}/${this.clientId}${url}`, {\n headers,\n method: body ? 'POST' : 'GET',\n body: body ? JSON.stringify(body) : undefined\n })\n if (response.status < 200 || response.status >= 300) {\n throw new Error(response.statusText)\n }\n return response.json()\n }\n\n private rid() {\n return nanoid()\n }\n\n public socket(action: string, handleMessage = (data: any) => { }, ignoreClose = false) {\n const domain = this.test ? 'ws://localhost:3030' : 'wss://live.beta.serverbench.io'\n let ws = new WebSocket(`${domain}?${new URLSearchParams({\n key: this.clientSecret,\n })}`)\n let i = 0\n let expecting = this.rid()\n ws.onopen = () => {\n i = 0\n ws.send(JSON.stringify({\n action: `community.${this.clientId}.${action}`,\n rid: expecting\n }))\n }\n ws.onmessage = (event) => {\n const data = JSON.parse(event.data)\n if (data.result != null && ((Array.isArray(data.result) && data.result.length) || Object.keys(data.result).length > 0) && data.rid == expecting) {\n handleMessage(data.result)\n } else {\n let action = [data.realm]\n if (data.realm == 'community') {\n action.push(this.clientId)\n }\n action.push(data.action)\n expecting = this.rid()\n ws.send(JSON.stringify({\n action: action.join('.'),\n rid: expecting\n }))\n }\n }\n if (!ignoreClose) {\n ws.onclose = () => {\n i++\n setTimeout(() => {\n ws = this.socket(action, handleMessage, true).ws\n }, Math.min(1000 * (i) * 5, 30 * 1000));\n }\n }\n return {\n dispose: () => {\n ws.onclose = null\n ws.close()\n },\n ws\n }\n }\n\n async get(realm: string, url: string) {\n return this.fetch(realm, url)\n }\n\n async post(realm: string, url: string, body: any = {}) {\n return this.fetch(realm, url, body)\n }\n\n}"]}
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-HBGU3S3O.js";import{a as g}from"./chunk-CTMUE5H3.js";import{a as u}from"./chunk-GLEWOHG7.js";import{nanoid as d}from"nanoid/non-secure";var n=class n{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!n.instance||n.instance.clientId!==t||n.instance.clientSecret!==e||n.instance.test!==s)&&(n.instance=new n(t,e,s)),n.instance}get store(){return new m(this)}get voting(){return new g(this)}async member(t){return u.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",i=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&i.set("Content-Type","application/json");let a=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:i,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(a.status<200||a.status>=300)throw new Error(a.statusText);return a.json()}rid(){return d()}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://live.beta.serverbench.io",i=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),a=0,c=this.rid();return i.onopen=()=>{a=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`,rid:c}))},i.onmessage=p=>{let r=JSON.parse(p.data);if(r.result!=null&&(Array.isArray(r.result)&&r.result.length||Object.keys(r.result).length>0)&&r.rid==c)e(r.result);else{let l=[r.realm];r.realm=="community"&&l.push(this.clientId),l.push(r.action),c=this.rid(),i.send(JSON.stringify({action:l.join("."),rid:c}))}},s||(i.onclose=()=>{a++,setTimeout(()=>{i=this.socket(t,e,!0).ws},Math.min(1e3*a*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};n.instance=null;var h=n;export{h as a};
2
- //# sourceMappingURL=chunk-2MSBHHK5.js.map
1
+ import{a as g}from"./chunk-CTMUE5H3.js";import{a as m}from"./chunk-HBGU3S3O.js";import{a as u}from"./chunk-GLEWOHG7.js";import{nanoid as d}from"nanoid/non-secure";var n=class n{constructor(t,e,s){this.clientId=t,this.clientSecret=e,this.test=s}static get(t,e,s=!1){return(!n.instance||n.instance.clientId!==t||n.instance.clientSecret!==e||n.instance.test!==s)&&(n.instance=new n(t,e,s)),n.instance}get store(){return new m(this)}get voting(){return new g(this)}async member(t){return u.fromObject(this,await this.post("community","/member/search",t))}async fetch(t,e,s){let o=this.test?"https://dev.serverbench.io":"https://api.beta.serverbench.io",i=new Headers({authorization:`ApiKey ${this.clientSecret}`});s&&i.set("Content-Type","application/json");let a=await fetch(`${o}/${t}/${this.clientId}${e}`,{headers:i,method:s?"POST":"GET",body:s?JSON.stringify(s):void 0});if(a.status<200||a.status>=300)throw new Error(a.statusText);return a.json()}rid(){return d()}socket(t,e=o=>{},s=!1){let o=this.test?"ws://localhost:3030":"wss://live.beta.serverbench.io",i=new WebSocket(`${o}?${new URLSearchParams({key:this.clientSecret})}`),a=0,c=this.rid();return i.onopen=()=>{a=0,i.send(JSON.stringify({action:`community.${this.clientId}.${t}`,rid:c}))},i.onmessage=p=>{let r=JSON.parse(p.data);if(r.result!=null&&(Array.isArray(r.result)&&r.result.length||Object.keys(r.result).length>0)&&r.rid==c)e(r.result);else{let l=[r.realm];r.realm=="community"&&l.push(this.clientId),l.push(r.action),c=this.rid(),i.send(JSON.stringify({action:l.join("."),rid:c}))}},s||(i.onclose=()=>{a++,setTimeout(()=>{i=this.socket(t,e,!0).ws},Math.min(1e3*a*5,30*1e3))}),{dispose:()=>{i.onclose=null,i.close()},ws:i}}async get(t,e){return this.fetch(t,e)}async post(t,e,s={}){return this.fetch(t,e,s)}};n.instance=null;var h=n;export{h as a};
2
+ //# sourceMappingURL=chunk-EUZSI35S.js.map
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-OW4YZ724.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');var _chunk7KV4THCIcjs = require('./chunk-7KV4THCI.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var _chunkFIJDSJKBcjs = require('./chunk-FIJDSJKB.cjs');require('./chunk-EYEXIIFR.cjs');var _chunkUZVZQL4Fcjs = require('./chunk-UZVZQL4F.cjs');require('./chunk-3YNQTTHI.cjs');var _chunkLUTKTZJQcjs = require('./chunk-LUTKTZJQ.cjs');var _chunkT4XJ6ERTcjs = require('./chunk-T4XJ6ERT.cjs');var _chunk5EFJ4GIYcjs = require('./chunk-5EFJ4GIY.cjs');var _chunkFXVJCHR6cjs = require('./chunk-FXVJCHR6.cjs');var _chunkVX4LKECWcjs = require('./chunk-VX4LKECW.cjs');require('./chunk-SYLAVD2D.cjs');require('./chunk-CJWXGEQN.cjs');require('./chunk-A63AYQ4G.cjs');var x=_chunkFIJDSJKBcjs.a;exports.Element = _chunkVX4LKECWcjs.a; exports.IStore = _chunkUZVZQL4Fcjs.a; exports.ListingDisplay = _chunkLUTKTZJQcjs.a; exports.ListingSiteDisplay = _chunkT4XJ6ERTcjs.a; exports.Member = _chunkFXVJCHR6cjs.a; exports.Store = _chunkUZVZQL4Fcjs.a; exports.UpsellType = _chunk7KV4THCIcjs.a; exports.Vote = _chunk5EFJ4GIYcjs.a; exports.default = x;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-CJWXGEQN.cjs');require('./chunk-A63AYQ4G.cjs');require('./chunk-OW4YZ724.cjs');require('./chunk-X4NW2R7G.cjs');require('./chunk-DSKIK7XF.cjs');var _chunk7KV4THCIcjs = require('./chunk-7KV4THCI.cjs');require('./chunk-SYLAVD2D.cjs');var _chunk2X5NRDCEcjs = require('./chunk-2X5NRDCE.cjs');require('./chunk-3YNQTTHI.cjs');var _chunkLUTKTZJQcjs = require('./chunk-LUTKTZJQ.cjs');var _chunkT4XJ6ERTcjs = require('./chunk-T4XJ6ERT.cjs');var _chunk5EFJ4GIYcjs = require('./chunk-5EFJ4GIY.cjs');require('./chunk-EYEXIIFR.cjs');var _chunkUZVZQL4Fcjs = require('./chunk-UZVZQL4F.cjs');var _chunkFXVJCHR6cjs = require('./chunk-FXVJCHR6.cjs');var _chunkVX4LKECWcjs = require('./chunk-VX4LKECW.cjs');require('./chunk-GOVZHEHO.cjs');require('./chunk-D22KLLON.cjs');require('./chunk-UHS7Z46V.cjs');require('./chunk-OVXIHLHV.cjs');var x=_chunk2X5NRDCEcjs.a;exports.Element = _chunkVX4LKECWcjs.a; exports.IStore = _chunkUZVZQL4Fcjs.a; exports.ListingDisplay = _chunkLUTKTZJQcjs.a; exports.ListingSiteDisplay = _chunkT4XJ6ERTcjs.a; exports.Member = _chunkFXVJCHR6cjs.a; exports.Store = _chunkUZVZQL4Fcjs.a; exports.UpsellType = _chunk7KV4THCIcjs.a; exports.Vote = _chunk5EFJ4GIYcjs.a; exports.default = x;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/quique/Documents/serverbench/js/dist/index.cjs","../src/index.ts"],"names":["src_default","Serverbench"],"mappings":"AAAA,yGAA4B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,ICmD5pBA,CAAAA,CAAQC,mBAAAA,CAAAA,0VAAAA","file":"/Users/quique/Documents/serverbench/js/dist/index.cjs","sourcesContent":[null,"import Member from \"./Member.js\";\nimport Serverbench from \"./Serverbench.js\";\nimport ICountryCurrency from \"./store/ICountryCurrency.js\";\nimport ISku from \"./store/ISku.js\";\nimport ISkuPerkUsage from \"./store/ISkuPerkUsage.js\";\nimport ISkuPrice from \"./store/ISkuPrice.js\";\nimport StoreDisplay from \"./store/StoreDisplay.js\";\nimport IStoreCategory from \"./store/IStoreCategory.js\";\nimport IStoreCategorySet from \"./store/IStoreCategorySet.js\";\nimport Store from \"./store/Store.js\";\nimport Element from \"./element/Element.js\"\nimport IDiscount from \"./store/IDiscount.js\";\nimport IListingAmountSettings from \"./voting/IListingAmountSettings.js\";\nimport ISite from \"./voting/ISite.js\";\nimport ISiteSetup from \"./voting/ISiteSetup.js\";\nimport Vote from \"./voting/Vote.js\";\nimport ListingDisplay from \"./voting/ListingDisplay.js\";\nimport ListingSiteDisplay from \"./voting/ListingSiteDisplay.js\";\nimport IUpsell, { UpsellType } from \"./store/IUpsell.js\";\n\nexport {\n StoreDisplay as Store,\n ICountryCurrency,\n IDiscount,\n ISku,\n ISkuPerkUsage,\n ISkuPrice,\n StoreDisplay as IStore,\n IStoreCategory,\n IStoreCategorySet,\n UpsellType,\n IUpsell\n}\n\nexport {\n ListingDisplay,\n ListingSiteDisplay,\n IListingAmountSettings,\n ISite,\n ISiteSetup,\n Vote\n}\n\nexport {\n Member\n}\n\nexport {\n Element\n}\n\nexport default Serverbench"]}
1
+ {"version":3,"sources":["/Users/quique/Documents/serverbench/js/dist/index.cjs","../src/index.ts"],"names":["src_default","Serverbench"],"mappings":"AAAA,yGAA4B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,wDAAyC,wDAAyC,gCAA6B,wDAAyC,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,ICmD5pBA,CAAAA,CAAQC,mBAAAA,CAAAA,0VAAAA","file":"/Users/quique/Documents/serverbench/js/dist/index.cjs","sourcesContent":[null,"import Member from \"./Member.js\";\nimport Serverbench from \"./Serverbench.js\";\nimport ICountryCurrency from \"./store/ICountryCurrency.js\";\nimport ISku from \"./store/ISku.js\";\nimport ISkuPerkUsage from \"./store/ISkuPerkUsage.js\";\nimport ISkuPrice from \"./store/ISkuPrice.js\";\nimport StoreDisplay from \"./store/StoreDisplay.js\";\nimport IStoreCategory from \"./store/IStoreCategory.js\";\nimport IStoreCategorySet from \"./store/IStoreCategorySet.js\";\nimport Store from \"./store/Store.js\";\nimport Element from \"./element/Element.js\"\nimport IDiscount from \"./store/IDiscount.js\";\nimport IListingAmountSettings from \"./voting/IListingAmountSettings.js\";\nimport ISite from \"./voting/ISite.js\";\nimport ISiteSetup from \"./voting/ISiteSetup.js\";\nimport Vote from \"./voting/Vote.js\";\nimport ListingDisplay from \"./voting/ListingDisplay.js\";\nimport ListingSiteDisplay from \"./voting/ListingSiteDisplay.js\";\nimport IUpsell, { UpsellType } from \"./store/IUpsell.js\";\n\nexport {\n StoreDisplay as Store,\n ICountryCurrency,\n IDiscount,\n ISku,\n ISkuPerkUsage,\n ISkuPrice,\n StoreDisplay as IStore,\n IStoreCategory,\n IStoreCategorySet,\n UpsellType,\n IUpsell\n}\n\nexport {\n ListingDisplay,\n ListingSiteDisplay,\n IListingAmountSettings,\n ISite,\n ISiteSetup,\n Vote\n}\n\nexport {\n Member\n}\n\nexport {\n Element\n}\n\nexport default Serverbench"]}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-FI7FAFLX.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import{a as f}from"./chunk-2HAOVSUI.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";import{a as r}from"./chunk-2MSBHHK5.js";import"./chunk-HBGU3S3O.js";import{a as m}from"./chunk-UTQPTYIQ.js";import"./chunk-CTMUE5H3.js";import{a as p}from"./chunk-4GCQV2YR.js";import{a as i}from"./chunk-G27KF7G3.js";import{a as e}from"./chunk-4PA7GD6K.js";import{a as o}from"./chunk-GLEWOHG7.js";import{a as t}from"./chunk-4NMPBSP3.js";import"./chunk-5YLG7KH6.js";import"./chunk-EMFCL4IX.js";import"./chunk-33DIW7ZK.js";var x=r;export{t as Element,m as IStore,p as ListingDisplay,i as ListingSiteDisplay,o as Member,m as Store,f as UpsellType,e as Vote,x as default};
1
+ import"./chunk-EMFCL4IX.js";import"./chunk-33DIW7ZK.js";import"./chunk-FI7FAFLX.js";import"./chunk-LBVHKFZO.js";import"./chunk-7KUMKL43.js";import{a as f}from"./chunk-2HAOVSUI.js";import"./chunk-5YLG7KH6.js";import{a as r}from"./chunk-EUZSI35S.js";import"./chunk-CTMUE5H3.js";import{a as p}from"./chunk-4GCQV2YR.js";import{a as i}from"./chunk-G27KF7G3.js";import{a as e}from"./chunk-4PA7GD6K.js";import"./chunk-HBGU3S3O.js";import{a as m}from"./chunk-UTQPTYIQ.js";import{a as o}from"./chunk-GLEWOHG7.js";import{a as t}from"./chunk-4NMPBSP3.js";import"./chunk-RY7QEHM4.js";import"./chunk-ZYLLOUW6.js";import"./chunk-AS4B37XA.js";import"./chunk-56HSL4MD.js";var x=r;export{t as Element,m as IStore,p as ListingDisplay,i as ListingSiteDisplay,o as Member,m as Store,f as UpsellType,e as Vote,x as default};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serverbench/js",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {