@tenno-companion/core 0.1.5 → 0.2.0

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.
package/README.md CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  RailjackIntrinsicProvider,
33
33
  WarframeProvider,
34
34
  WeaponProvider,
35
- } from '@tenno-companion/core'
35
+ } from '@tenno-companion/core/server'
36
36
  import { sortByName } from '@tenno-companion/core/locales'
37
37
 
38
38
  async function buildMasteryData(locale = 'en') {
@@ -0,0 +1 @@
1
+ import{E as T,d as l,e as p,f as u,g as c,h as d,k as g}from"./chunk-SAP35QIC.mjs";import{b as m}from"./chunk-STFT6SKY.mjs";var s=class{constructor(t,e){this.items=t;this.locale=e}items;locale;getAll(){return Object.values(this.items)}getByUniqueName(t){return this.items[t]??null}filter(t){let e=[];for(let i of Object.values(this.items))t(i)&&e.push(i);return e}};function o(r){let t="partType"in r?r.partType:void 0,{uniqueName:e}=r;return!(t&&T.includes(t)||t==="LWPT_BLADE"&&e.includes("PvPVariant")||e.includes("TnDoppelgangerGrimoire")||e.includes("TnBayonetMeleeWeapon"))}var y=class extends s{},f=class extends s{},F=class extends s{},S=class extends s{},h=class extends s{},O=class extends s{getPrimes(){return this.filter(t=>t.variantType==="VT_PRIME")}},x=class extends s{},A=class extends s{},P=class extends s{getFiltered(t,e){return this.filter(i=>e(i)?t.masterable?o(i):!0:!1)}getPrimaries(t={}){return this.getFiltered(t,e=>e.productCategory==="LongGuns")}getSecondaries(t={}){return this.getFiltered(t,e=>e.productCategory==="Pistols"&&!("partType"in e))}getMelees(t={}){return this.getFiltered(t,e=>e.productCategory==="Melee")}getArchguns(t={}){return this.getFiltered(t,e=>e.productCategory==="SpaceGuns")}getArchmelees(t={}){return this.getFiltered(t,e=>e.productCategory==="SpaceMelee")}getAmps(t={}){return this.getFiltered(t,e=>{let i=e.productCategory==="OperatorAmps",n="partType"in e&&l.includes(e.partType);return i||n})}getRobotics(t={}){return this.getFiltered(t,e=>e.productCategory==="SentinelWeapons")}getKDrives(t={}){return this.getFiltered(t,e=>"partType"in e&&u.includes(e.partType))}getKitguns(t={}){return this.getFiltered(t,e=>"partType"in e&&c.includes(e.partType))}getZaws(t={}){return this.getFiltered(t,e=>"partType"in e&&g.includes(e.partType))}},b=class extends s{getFiltered(t,e){return this.filter(i=>e(i)?t.masterable?o(i):!0:!1)}getSentinels(t={}){return this.getFiltered(t,e=>e.productCategory==="Sentinels")}getMOAs(t={}){return this.getFiltered(t,e=>"partType"in e&&d.includes(e.partType))}getHounds(t={}){return this.getFiltered(t,e=>"partType"in e&&p.includes(e.partType))}getBeasts(t={}){let{includeSpecial:e=!1}=t,i=this.getFiltered(t,n=>n.productCategory==="KubrowPets");if(e){let n=this.getFiltered(t,a=>a.productCategory==="SpecialItems"&&"exalted"in a);return m([...i,...n],{locale:this.locale})}return i}getSentinelWeapons(t={}){return this.getFiltered(t,e=>e.productCategory==="SentinelWeapons")}};export{y as a,f as b,F as c,S as d,h as e,O as f,x as g,A as h,P as i,b as j};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-CAXAR7DE.mjs";import{getStandardLocale as u,SUPPORTED_LANGUAGES as p}from"@tenno-companion/shared/locales";import{getStandardLocale as L,SUPPORTED_LANGUAGES as x}from"@tenno-companion/shared/locales";var y=l({"../../data/dicts/de.json":()=>import("./de-ZRU7AN5G.mjs"),"../../data/dicts/en.json":()=>import("./en-YN6X3Q2N.mjs"),"../../data/dicts/es.json":()=>import("./es-3VG4626S.mjs"),"../../data/dicts/fr.json":()=>import("./fr-BL4MSUXR.mjs"),"../../data/dicts/it.json":()=>import("./it-5KYQQ6EK.mjs"),"../../data/dicts/ja.json":()=>import("./ja-D5AYFOTS.mjs"),"../../data/dicts/ko.json":()=>import("./ko-UV3QI7KK.mjs"),"../../data/dicts/pl.json":()=>import("./pl-EMRDV3G5.mjs"),"../../data/dicts/pt.json":()=>import("./pt-I2MUIREY.mjs"),"../../data/dicts/ru.json":()=>import("./ru-5AGW3OBP.mjs"),"../../data/dicts/tc.json":()=>import("./tc-2OU3GC62.mjs"),"../../data/dicts/th.json":()=>import("./th-BZER7RQS.mjs"),"../../data/dicts/tr.json":()=>import("./tr-WWZ5NHQZ.mjs"),"../../data/dicts/uk.json":()=>import("./uk-FQH5AZ4F.mjs"),"../../data/dicts/zh.json":()=>import("./zh-NIJQUYPC.mjs")});async function D(t="en"){let n=Object.keys(p).includes(t)?t:"en";try{return(await y(`../../data/dicts/${n}.json`)).default}catch{return(await import("./en-YN6X3Q2N.mjs")).default}}function g(t,n){let m=n?.locale?u(n.locale):void 0,s=new Intl.Collator(m,{numeric:!0,sensitivity:"base"});if(Array.isArray(t))return t.sort((a,e)=>{let o=a.name||"",r=e.name||"";return s.compare(o,r)});let c=Object.entries(t);c.sort(([,a],[,e])=>{let o=a.name||"",r=e.name||"";return s.compare(o,r)});let i={};for(let[a,e]of c)i[a]=e;return i}export{D as a,g as b,L as c,x as d};