mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Moved files to link with the SDK
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
b36dd9046f
commit
ef866401a4
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -5,6 +5,3 @@
|
||||
[submodule "dist"]
|
||||
path = dist
|
||||
url = https://git.delta-wings.net/tcgdex/compiled.git
|
||||
[submodule "sdk"]
|
||||
path = sdk
|
||||
url = https://git.delta-wings.net/tcgdex/javascript-sdk.git
|
||||
|
2
db
2
db
@ -1 +1 @@
|
||||
Subproject commit be94e712b87623615025eb21c0d363f2ad89a423
|
||||
Subproject commit a284fcac640f66dda9e7a322c7865b3389bf0d32
|
@ -1,10 +1,11 @@
|
||||
import Rarity from "../db/interfaces/Rarity";
|
||||
import { Langs } from "../db/interfaces/LangList";
|
||||
import Rarity from "@tcgdex/sdk/interfaces/Rarity";
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import { raritySimple } from "./rarities/rarity";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function rarityToRaritySimple(rarity: Rarity, lang: Langs): raritySimple {
|
||||
return {
|
||||
id: rarity,
|
||||
name: Rarity.toLang(rarity, lang)
|
||||
name: TranslationUtil.translate("rarity", rarity, lang)
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import Tag from "../db/interfaces/Tag";
|
||||
import { Langs } from "../db/interfaces/LangList";
|
||||
import Tag from "@tcgdex/sdk/interfaces/Tag";
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import { tagSimple } from "./tags/tag";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function tagToTagSimple(tag: Tag, lang: Langs): tagSimple {
|
||||
return {
|
||||
id: tag,
|
||||
name: Tag.toLang(tag, lang)
|
||||
name: TranslationUtil.translate("tag", tag, lang)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import Ability from "../db/interfaces/Ability";
|
||||
import { Langs } from "../db/interfaces/LangList";
|
||||
import AbilityType from "../db/interfaces/AbilityType";
|
||||
import { AbilitySimple, AbilitySingle } from "../sdk/dist/types/interfaces/Ability";
|
||||
import Ability from "@tcgdex/sdk/interfaces/Ability";
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import AbilityType from "@tcgdex/sdk/interfaces/AbilityType";
|
||||
import { AbilitySimple, AbilitySingle } from "@tcgdex/sdk/interfaces/Ability";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function abilityToAbilitySimple(ability: Ability, lang: Langs): AbilitySimple {
|
||||
return {
|
||||
@ -15,7 +16,7 @@ export function abilityToAbilitySingle(ability: Ability, lang: Langs): AbilitySi
|
||||
text: ability.text[lang],
|
||||
type: {
|
||||
id: ability.type,
|
||||
name: AbilityType.toLang(ability.type, lang)
|
||||
name: TranslationUtil.translate("abilityType", ability.type, lang)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
import Attack from "../db/interfaces/Attack";
|
||||
import { Langs } from "../db/interfaces/LangList";
|
||||
import Type from "../db/interfaces/Type";
|
||||
import { AttackSingle } from "../sdk/dist/types/interfaces/Attack";
|
||||
import Attack from "@tcgdex/sdk/interfaces/Attack";
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import Type from "@tcgdex/sdk/interfaces/Type";
|
||||
import { AttackSingle } from "@tcgdex/sdk/interfaces/Attack";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function attackToAttackSingle(attack: Attack, lang: Langs): AttackSingle {
|
||||
return {
|
||||
name: attack.name[lang],
|
||||
cost: attack.cost && attack.cost.map(el => Type.toLang(el, lang)),
|
||||
cost: attack.cost && attack.cost.map(el => TranslationUtil.translate("type", el, lang)),
|
||||
text: attack.text && attack.text[lang],
|
||||
damage: attack.damage && attack.damage
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { CardSimple, CardSingle } from "../sdk/dist/types/interfaces/Card";
|
||||
import Card from "../db/interfaces/Card";
|
||||
import { Langs } from "../db/interfaces/LangList";
|
||||
import Card, { CardSimple, CardSingle } from "@tcgdex/sdk/interfaces/Card";
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import { typeToTypeSimple } from "./typeUtil";
|
||||
import { rarityToRaritySimple } from "./RarityUtil";
|
||||
import { tagToTagSimple } from "./TagUtil";
|
||||
import Category from "../db/interfaces/Category";
|
||||
import Category from "@tcgdex/sdk/interfaces/Category";
|
||||
import { attackToAttackSingle } from "./attackUtil";
|
||||
import { abilityToAbilitySingle } from "./abilityUtil";
|
||||
import { getExpansion } from "./expansionUtil";
|
||||
import { getSet } from "./setUtil";
|
||||
import Expansion from "../db/interfaces/Expansion";
|
||||
import Expansion from "@tcgdex/sdk/interfaces/Expansion";
|
||||
import { fetchIllustrators, fetchIllustratorsSync } from "./illustratorUtil";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function cardToCardSimple(card: Card, lang: Langs): CardSimple {
|
||||
return {
|
||||
@ -68,7 +68,7 @@ export function cardToCardSingle(card: Card, lang: Langs): CardSingle {
|
||||
|
||||
category: {
|
||||
id: card.category,
|
||||
name: Category.toLang(card.category, lang)
|
||||
name: TranslationUtil.translate("category", card.category, lang)
|
||||
},
|
||||
|
||||
set: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from 'fs'
|
||||
import { CardList, CardSimple } from "../../sdk/dist/types/interfaces/Card"
|
||||
import { CardList, CardSimple } from "@tcgdex/sdk/interfaces/Card"
|
||||
import { cardToCardSimple, isCardAvailable } from "../cardUtil"
|
||||
import { getBaseFolder, getAllCards2 } from "../util"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { getAllCards2, getBaseFolder } from "..//util"
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from 'fs'
|
||||
import { cardToCardSingle, isCardAvailable } from "../cardUtil"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import Expansion from "../db/interfaces/Expansion"
|
||||
import Set from "../db/interfaces/Set"
|
||||
import Expansion from "@tcgdex/sdk/interfaces/Expansion"
|
||||
import Set from "@tcgdex/sdk/interfaces/Set"
|
||||
import * as glob from 'glob'
|
||||
import { Langs } from "../db/interfaces/LangList"
|
||||
import { ExpansionSingle } from "../sdk/dist/types/interfaces/Expansion"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { ExpansionSingle } from "@tcgdex/sdk/interfaces/Expansion"
|
||||
import { getAllSets } from "./util"
|
||||
import { setToSetSimple, fetchSet } from "./setUtil"
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { getAllExpansions, expansionToExpansionSimple } from "../expansionUtil"
|
||||
import Expansion from "../../db/interfaces/Expansion"
|
||||
import Expansion from "@tcgdex/sdk/interfaces/Expansion"
|
||||
import { getAllSets, getBaseFolder } from "../util"
|
||||
import { fetchSet } from "../setUtil"
|
||||
import { promises as fs } from 'fs'
|
||||
import { ExpansionList } from '../../sdk/dist/types/interfaces/Expansion'
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { ExpansionList } from '@tcgdex/sdk/interfaces/Expansion'
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "expansions")
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getAllExpansions, fetchExpansion, expansionToExpansionSingle } from "../expansionUtil"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { getBaseFolder } from "../util"
|
||||
import { promises as fs } from 'fs'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { getAllCards, getBaseFolder } from "../util"
|
||||
import { fetchCard, isCardAvailable } from "../cardUtil"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { HpList } from "../../sdk/dist/types/interfaces/Hp"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { HpList } from "@tcgdex/sdk/interfaces/Hp"
|
||||
import { promises as fs } from 'fs'
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { getAllCards, getBaseFolder } from "../util"
|
||||
import { fetchCard, isCardAvailable, cardToCardSimple } from "../cardUtil"
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { HpSingle } from "../../sdk/dist/types/interfaces/Hp"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { HpSingle } from "@tcgdex/sdk/interfaces/Hp"
|
||||
import { promises as fs } from 'fs'
|
||||
|
||||
interface t {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { promises as fs} from "fs"
|
||||
import * as fsSync from 'fs'
|
||||
import { IllustratorSimple } from "../sdk/dist/types/interfaces/Illustrator"
|
||||
import { IllustratorSimple } from "@tcgdex/sdk/interfaces/Illustrator"
|
||||
|
||||
export const illustratorsFile = "./generated/illustrators.json"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { fetchIllustrators, illustratorToIllustratorSimple } from "../illustratorUtil"
|
||||
import { IllustratorsList } from "../../sdk/dist/types/interfaces/Illustrator"
|
||||
import { IllustratorsList } from "@tcgdex/sdk/interfaces/Illustrator"
|
||||
import { getBaseFolder } from "../util"
|
||||
import { promises as fs} from "fs"
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { fetchIllustrators } from "../illustratorUtil"
|
||||
import { IllustratorSingle } from "../../sdk/dist/types/interfaces/Illustrator"
|
||||
import { IllustratorSingle } from "@tcgdex/sdk/interfaces/Illustrator"
|
||||
import { getBaseFolder, getAllCards } from "../util"
|
||||
import { promises as fs} from "fs"
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { isCardAvailable, cardToCardSimple } from "../cardUtil"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "illustrators")
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getAllCards2 } from "../util"
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
|
||||
import { promises as fs} from "fs"
|
||||
import { illustratorsFile, fetchIllustrators } from "../illustratorUtil"
|
||||
|
@ -1,9 +1,9 @@
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { getAllCards2, getBaseFolder } from "../util"
|
||||
import { promises as fs } from 'fs'
|
||||
import { isCardAvailable } from "../cardUtil"
|
||||
import { RetreatList } from '../../sdk/dist/types/interfaces/Retreat'
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { RetreatList } from '@tcgdex/sdk/interfaces/Retreat'
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
|
||||
const lang = (process.env.CARDLANG || "en") as Langs
|
||||
const endpoint = getBaseFolder(lang, "retreat")
|
||||
|
@ -1,9 +1,9 @@
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { getAllCards2, getBaseFolder } from "../util"
|
||||
import { promises as fs } from 'fs'
|
||||
import { isCardAvailable, cardToCardSimple } from "../cardUtil"
|
||||
import { RetreatSingle } from '../../sdk/dist/types/interfaces/Retreat'
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import { RetreatSingle } from '@tcgdex/sdk/interfaces/Retreat'
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
|
||||
const lang = (process.env.CARDLANG || "en") as Langs
|
||||
const endpoint = getBaseFolder(lang, "retreat")
|
||||
|
@ -1,10 +1,10 @@
|
||||
import Set from "../db/interfaces/Set"
|
||||
import Card from "../db/interfaces/Card"
|
||||
import Set from "@tcgdex/sdk/interfaces/Set"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import * as glob from 'glob'
|
||||
import { Langs } from "../db/interfaces/LangList"
|
||||
import { SetSimple, SetSingle } from "../sdk/dist/types/interfaces/Set"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { SetSimple, SetSingle } from "@tcgdex/sdk/interfaces/Set"
|
||||
import { cardToCardSimple } from "./cardUtil"
|
||||
import { CardSimple } from "../sdk/dist/types/interfaces/Card"
|
||||
import { CardSimple } from "@tcgdex/sdk/interfaces/Card"
|
||||
import { getAllCards2 } from "./util"
|
||||
|
||||
interface t<T = Set> {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Set from "../../db/interfaces/Set"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import Set from "@tcgdex/sdk/interfaces/Set"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from 'fs'
|
||||
import { SetSimple, SetList } from "../../sdk/dist/types/interfaces/Set"
|
||||
import { SetSimple, SetList } from "@tcgdex/sdk/interfaces/Set"
|
||||
import { getAllSets, getBaseFolder } from "../util"
|
||||
import { isSetAvailable, setToSetSimple } from "../setUtil"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { getBaseFolder, getAllSets } from "../util"
|
||||
import Set from "../../db/interfaces/Set"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import Set from "@tcgdex/sdk/interfaces/Set"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from 'fs'
|
||||
import { isSetAvailable, setToSetSingle } from "../setUtil"
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { getBaseFolder, getAllSets } from "../util"
|
||||
import Set from "../../db/interfaces/Set"
|
||||
import { Langs } from "../../db/interfaces/LangList"
|
||||
import Set from "@tcgdex/sdk/interfaces/Set"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from 'fs'
|
||||
import { isSetAvailable } from "../setUtil"
|
||||
import { getAllCards2 } from "../util"
|
||||
import Card from "../../db/interfaces/Card"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { cardToCardSingle, isCardAvailable } from "../cardUtil"
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
|
@ -1,10 +1,10 @@
|
||||
import Type from "../db/interfaces/Type";
|
||||
import LangList, { Langs } from "../db/interfaces/LangList";
|
||||
import { typeSimple } from "./types/type";
|
||||
import Type, { TypeSimple } from "@tcgdex/sdk/interfaces/Type";
|
||||
import LangList, { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
||||
|
||||
export function typeToTypeSimple(type: Type, lang: Langs): typeSimple {
|
||||
export function typeToTypeSimple(type: Type, lang: Langs): TypeSimple {
|
||||
return {
|
||||
id: type,
|
||||
name: Type.toLang(type, lang)
|
||||
name: TranslationUtil.translate("type", type, lang)
|
||||
}
|
||||
}
|
||||
|
31
endpoints/types/index.ts
Normal file
31
endpoints/types/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import Type, { TypeSimple } from "@tcgdex/sdk/interfaces/Type"
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil"
|
||||
import { getBaseFolder } from "../util"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import { promises as fs } from "fs"
|
||||
import { List } from "@tcgdex/sdk/interfaces/General"
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "types")
|
||||
|
||||
const btsp = async () => {
|
||||
|
||||
const typeArr: Array<TypeSimple> = []
|
||||
for (const i of Object.values(Type)) {
|
||||
if (typeof i !== "number") continue
|
||||
typeArr.push({
|
||||
id: i,
|
||||
name: TranslationUtil.translate("type", i, lang)
|
||||
})
|
||||
}
|
||||
|
||||
const typeList: List<TypeSimple> = {
|
||||
count: typeArr.length,
|
||||
list: typeArr
|
||||
}
|
||||
|
||||
await fs.mkdir(endpoint, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(typeList))
|
||||
}
|
||||
|
||||
btsp()
|
53
endpoints/types/item.ts
Normal file
53
endpoints/types/item.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import { getAllCards, getBaseFolder, urlize } from "../util"
|
||||
import { fetchCard, isCardAvailable, cardToCardSimple } from "../cardUtil"
|
||||
import Type, { TypeSingle } from "@tcgdex/sdk/interfaces/Type"
|
||||
import Card from "@tcgdex/sdk/interfaces/Card"
|
||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil"
|
||||
import { promises } from "fs"
|
||||
|
||||
type typeCards = {
|
||||
[key in Type]?: Array<Card>
|
||||
}
|
||||
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "types")
|
||||
|
||||
|
||||
const btsp = async () => {
|
||||
const list = getAllCards()
|
||||
const arr: typeCards = {}
|
||||
for (const i of list) {
|
||||
const card = await fetchCard(i)
|
||||
|
||||
if (!isCardAvailable(card, lang) || !card.type) continue
|
||||
|
||||
for (const type of card.type) {
|
||||
if (!(type in arr)) arr[type] = []
|
||||
arr[type].push(card)
|
||||
}
|
||||
}
|
||||
|
||||
for (const type in arr) {
|
||||
if (arr.hasOwnProperty(type)) {
|
||||
const cards: Array<Card> = arr[type];
|
||||
const rType: Type = parseInt(type)
|
||||
const toSave: TypeSingle = {
|
||||
id: rType,
|
||||
name: TranslationUtil.translate("type", rType, lang),
|
||||
cards: cards.map(el => cardToCardSimple(el, lang))
|
||||
}
|
||||
|
||||
const index = `${endpoint}/${toSave.id}`
|
||||
const name = `${endpoint}/${urlize(toSave.name)}`
|
||||
|
||||
await promises.mkdir(index, {recursive: true})
|
||||
await promises.mkdir(name, {recursive: true})
|
||||
|
||||
await promises.writeFile(`${index}/index.json`, JSON.stringify(toSave))
|
||||
await promises.writeFile(`${name}/index.json`, JSON.stringify(toSave))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
btsp()
|
22
package.json
22
package.json
@ -7,23 +7,27 @@
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"gen:all": "yarn gen:types && yarn gen:illustrators && yarn gen:hp && yarn gen:tags && yarn gen:retreat && yarn gen:categories && yarn gen:rarities && yarn gen:cards && yarn gen:expansions",
|
||||
"gen:types": "ts-node web/types/generator.ts",
|
||||
"gen:illustrators": "ts-node web/illustrators/generator.ts",
|
||||
"db:compile": "cd db && tsc --project tsconfig.json",
|
||||
"db:test": "cd db && tsc --noEmit --project tsconfig.json",
|
||||
"gen:all": "yarn gen:types && yarn gen:illustrators && yarn gen:hp && yarn gen:sets && yarn gen:tags && yarn gen:retreat && yarn gen:categories && yarn gen:rarities && yarn gen:cards && yarn gen:expansions",
|
||||
"gen:types": "ts-node endpoints/types/index.ts && ts-node endpoints/types/item.ts",
|
||||
"gen:illustrators": "ts-node endpoints/illustrators/updateDB.ts && ts-node endpoints/illustrators/index.ts && ts-node endpoints/illustrators/item.ts",
|
||||
"gen:hp": "ts-node web/hp/generator.ts",
|
||||
"gen:sets": "ts-node endpoints/sets/index.ts && ts-node endpoints/sets/item.ts && ts-node endpoints/sets/subitem.ts",
|
||||
"gen:tags": "ts-node web/tags/generator.ts",
|
||||
"gen:retreat": "ts-node web/retreat/generator.ts",
|
||||
"gen:categories": "ts-node web/categories/generator.ts",
|
||||
"gen:rarities": "ts-node web/rarities/generator.ts",
|
||||
"gen:cards": "ts-node web/cards/generator.ts",
|
||||
"gen:expansions": "ts-node web/expansions/generator.ts",
|
||||
"cards:test": "tsc --noEmit --project tsconfig-cards.json",
|
||||
"cards:compile": "tsc --project tsconfig-cards.json"
|
||||
"gen:cards": "ts-node endpoints/cards/index.ts && ts-node endpoints/cards/item.ts",
|
||||
"gen:expansions": "ts-node endpoints/expansions/index.ts && ts-node endpoints/expansions/item.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tcgdex/sdk": "^1.0.2",
|
||||
"glob": "^7.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/glob": "^7.1.1",
|
||||
"@types/node": "^13.7.0",
|
||||
"glob": "^7.1.6",
|
||||
"@types/node": "^13.7.4",
|
||||
"ts-node": "^8.6.2",
|
||||
"typescript": "^3.7.5"
|
||||
}
|
||||
|
1
sdk
1
sdk
@ -1 +0,0 @@
|
||||
Subproject commit 02b6d5332a79f3e6d5fc446485e864ea8b7e54ec
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"include": ["db/cards/**/**/*.ts"],
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
45
yarn.lock
45
yarn.lock
@ -2,6 +2,13 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@tcgdex/sdk@^1.0.2":
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/@tcgdex/sdk/-/sdk-1.0.8.tgz#adeca1f69a5e32a7747678d566d1bd5f3f151b94"
|
||||
integrity sha512-zHeUk+T3CuxBj8p9o5ThzM2YTs5J6g07TK0DLfC/65KVWXNJ2JvuMMYPUryo8ShcVI/nXReJQDPGylN/NRxyUw==
|
||||
dependencies:
|
||||
isomorphic-unfetch "^3.0.0"
|
||||
|
||||
"@types/events@*":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
|
||||
@ -21,10 +28,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
|
||||
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
|
||||
|
||||
"@types/node@*", "@types/node@^13.7.0":
|
||||
version "13.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.1.tgz#238eb34a66431b71d2aaddeaa7db166f25971a0d"
|
||||
integrity sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==
|
||||
"@types/node@*", "@types/node@^13.7.4":
|
||||
version "13.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.0.tgz#5b6ee7a77faacddd7de719017d0bc12f52f81589"
|
||||
integrity sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==
|
||||
|
||||
arg@^4.1.0:
|
||||
version "4.1.3"
|
||||
@ -89,10 +96,18 @@ inherits@2:
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
isomorphic-unfetch@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.0.0.tgz#de6d80abde487b17de2c400a7ef9e5ecc2efb362"
|
||||
integrity sha512-V0tmJSYfkKokZ5mgl0cmfQMTb7MLHsBMngTkbLY0eXvKqiVRRoZP04Ly+KhKrJfKtzC9E6Pp15Jo+bwh7Vi2XQ==
|
||||
dependencies:
|
||||
node-fetch "^2.2.0"
|
||||
unfetch "^4.0.0"
|
||||
|
||||
make-error@^1.1.1:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
|
||||
integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
@ -101,6 +116,11 @@ minimatch@^3.0.4:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
node-fetch@^2.2.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
|
||||
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
@ -138,9 +158,14 @@ ts-node@^8.6.2:
|
||||
yn "3.1.1"
|
||||
|
||||
typescript@^3.7.5:
|
||||
version "3.7.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
|
||||
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
||||
|
||||
unfetch@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"
|
||||
integrity sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user