🎨 Add global prettier settings / workflow
This commit is contained in:
parent
4df652b11c
commit
d07610403e
86 changed files with 1047 additions and 266 deletions
1
.github/workflows/engine-test.yml
vendored
1
.github/workflows/engine-test.yml
vendored
|
|
@ -27,5 +27,4 @@ jobs:
|
|||
- run: pnpm install
|
||||
- run: yarn build
|
||||
- run: yarn lint
|
||||
- run: yarn prettier-check
|
||||
- run: yarn test
|
||||
|
|
|
|||
14
.github/workflows/prettier.yml
vendored
Normal file
14
.github/workflows/prettier.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
name: All
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: pnpm/action-setup@v1.2.1
|
||||
with:
|
||||
version: 5.17.1
|
||||
- run: pnpm install
|
||||
- run: pnpm run prettier-check
|
||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
_
|
||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
pnpm-lock.yaml
|
||||
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
|
|
@ -6,9 +6,7 @@
|
|||
{
|
||||
"type": "npm",
|
||||
"script": "watch-front",
|
||||
"problemMatcher": [
|
||||
"$tsc"
|
||||
]
|
||||
"problemMatcher": ["$tsc"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<template></template>
|
||||
<script lang="ts">
|
||||
import {Vue, Component, Prop, Watch} from "vue-property-decorator";
|
||||
|
||||
|
|
@ -8,5 +6,4 @@ import {Vue, Component, Prop, Watch} from "vue-property-decorator";
|
|||
export default class $0 extends Vue {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
/dist
|
||||
pnpm-lock.yaml
|
||||
/dist
|
||||
|
|
@ -1,48 +1,45 @@
|
|||
import AvailableCommand from "./src/available-command";
|
||||
import Engine from "./src/engine";
|
||||
import Event, { EventSource } from "./src/events";
|
||||
import factionBoards from "./src/faction-boards";
|
||||
import factions from "./src/factions";
|
||||
import SpaceMap from "./src/map";
|
||||
import Player from "./src/player";
|
||||
import PlayerData from "./src/player-data";
|
||||
import factions from "./src/factions";
|
||||
import Event, { EventSource } from "./src/events";
|
||||
import AvailableCommand from "./src/available-command";
|
||||
import tiles from "./src/tiles";
|
||||
import Reward from "./src/reward";
|
||||
import factionBoards from "./src/faction-boards";
|
||||
import SpaceMap from "./src/map";
|
||||
import researchTracks from "./src/research-tracks";
|
||||
import Reward from "./src/reward";
|
||||
import tiles from "./src/tiles";
|
||||
|
||||
export {
|
||||
Condition,
|
||||
Planet,
|
||||
Resource,
|
||||
Operator,
|
||||
ResearchField,
|
||||
Faction,
|
||||
Command,
|
||||
Building,
|
||||
Booster,
|
||||
Federation,
|
||||
BoardAction,
|
||||
} from "./src/enums";
|
||||
export {
|
||||
TechTile,
|
||||
AdvTechTile,
|
||||
ScoringTile,
|
||||
FinalTile,
|
||||
TechTilePos,
|
||||
AdvTechTilePos,
|
||||
Phase,
|
||||
Round,
|
||||
Player as PlayerEnum,
|
||||
Expansion,
|
||||
} from "./src/enums";
|
||||
export { BrainstoneArea } from "./src/enums";
|
||||
export { GaiaHexData, GaiaHex } from "./src/gaia-hex";
|
||||
export { terraformingStepsRequired, planetNames } from "./src/planets";
|
||||
export { boardActions } from "./src/actions";
|
||||
export { EngineOptions, LogEntry } from "./src/engine";
|
||||
export {
|
||||
AdvTechTile,
|
||||
AdvTechTilePos,
|
||||
BoardAction,
|
||||
Booster,
|
||||
BrainstoneArea,
|
||||
Building,
|
||||
Command,
|
||||
Condition,
|
||||
Expansion,
|
||||
Faction,
|
||||
Federation,
|
||||
FinalTile,
|
||||
Operator,
|
||||
Phase,
|
||||
Planet,
|
||||
Player as PlayerEnum,
|
||||
ResearchField,
|
||||
Resource,
|
||||
Round,
|
||||
ScoringTile,
|
||||
TechTile,
|
||||
TechTilePos,
|
||||
} from "./src/enums";
|
||||
export { FactionBoard, factionBoard } from "./src/faction-boards";
|
||||
export { roundScorings, finalScorings } from "./src/tiles/scoring";
|
||||
export { LogEntry, EngineOptions } from "./src/engine";
|
||||
|
||||
export { GaiaHex, GaiaHexData } from "./src/gaia-hex";
|
||||
export { planetNames, terraformingStepsRequired } from "./src/planets";
|
||||
export { finalScorings, roundScorings } from "./src/tiles/scoring";
|
||||
export {
|
||||
Player,
|
||||
PlayerData,
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
"build": "npm run clean && tsc",
|
||||
"clean": "rm -Rf dist",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"prettier": "npx --yes -- prettier --write .",
|
||||
"prettier-check": "npx --yes -- prettier --check .",
|
||||
"test": "mocha -r ts-node/register src/**/*.spec.ts src/*.spec.ts *.spec.ts"
|
||||
},
|
||||
"contributors": [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Hex, CubeCoordinates } from "hexagrid";
|
||||
import { CubeCoordinates, Hex } from "hexagrid";
|
||||
import { flatten } from "lodash";
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Hex, Grid } from "hexagrid";
|
||||
import { flatten, difference } from "lodash";
|
||||
import { Grid, Hex } from "hexagrid";
|
||||
import { difference, flatten } from "lodash";
|
||||
|
||||
export default function shortestPath<T>(
|
||||
starts: Hex<T>[],
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { inRange, minBy, maxBy, uniq, difference, sumBy } from "lodash";
|
||||
import { Grid, Hex } from "hexagrid";
|
||||
import shortestPath from "./shortest-path";
|
||||
import assert from "assert";
|
||||
import { Grid, Hex } from "hexagrid";
|
||||
import { difference, inRange, maxBy, minBy, sumBy, uniq } from "lodash";
|
||||
import minimumPathLength from "./minimum-path-length";
|
||||
import shortestPath from "./shortest-path";
|
||||
|
||||
type algorithms = "exhaustive" | "heuristic";
|
||||
export default function spanningTree<T>(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Player from "./player";
|
||||
import { IncomeSelection } from "./income";
|
||||
import { Faction, Resource } from "./enums";
|
||||
import { Offer } from "./available-command";
|
||||
import { Faction, Resource } from "./enums";
|
||||
import { IncomeSelection } from "./income";
|
||||
import Player from "./player";
|
||||
import Reward from "./reward";
|
||||
|
||||
export enum ChargeDecision {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
import { difference, range } from "lodash";
|
||||
import { boardActions, freeActions, freeActionsItars, freeActionsTerrans } from "./actions";
|
||||
import { upgradedBuildings } from "./buildings";
|
||||
import Engine from "./engine";
|
||||
import {
|
||||
AdvTechTilePos,
|
||||
BoardAction,
|
||||
|
|
@ -15,13 +19,9 @@ import {
|
|||
SubPhase,
|
||||
TechTilePos,
|
||||
} from "./enums";
|
||||
import Engine from "./engine";
|
||||
import { difference, range } from "lodash";
|
||||
import factions from "./factions";
|
||||
import { upgradedBuildings } from "./buildings";
|
||||
import Reward from "./reward";
|
||||
import { boardActions, freeActions, freeActionsItars, freeActionsTerrans } from "./actions";
|
||||
import * as researchTracks from "./research-tracks";
|
||||
import Reward from "./reward";
|
||||
import { isAdvanced } from "./tiles/techs";
|
||||
|
||||
const ISOLATED_DISTANCE = 3;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "./engine";
|
||||
import { AssertionError } from "assert";
|
||||
import { BrainstoneArea, Command, Condition, Faction, Operator, Phase, Planet, Player } from "./enums";
|
||||
import { expect } from "chai";
|
||||
import { PlayerEnum } from "..";
|
||||
import Engine from "./engine";
|
||||
import { Command, Condition, Operator, Phase, Planet, Player } from "./enums";
|
||||
|
||||
describe("Engine", () => {
|
||||
it("should throw when trying to build on the wrong place", () => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import SpaceMap, { MapConfiguration } from "./map";
|
||||
import assert from "assert";
|
||||
import { isEqual, range, set, sortBy, sum, uniq } from "lodash";
|
||||
import Player from "./player";
|
||||
import shuffleSeed from "shuffle-seed";
|
||||
import { boardActions } from "./actions";
|
||||
import { ChargeDecision, ChargeRequest, decideChargeRequest } from "./auto-charge";
|
||||
import AvailableCommand, { generate as generateAvailableCommands } from "./available-command";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import {
|
||||
AdvTechTile,
|
||||
AdvTechTilePos,
|
||||
|
|
@ -28,15 +30,13 @@ import {
|
|||
TechTilePos,
|
||||
} from "./enums";
|
||||
import Event, { EventSource, RoundScoring } from "./events";
|
||||
import SpaceMap, { MapConfiguration } from "./map";
|
||||
import Player from "./player";
|
||||
import * as researchTracks from "./research-tracks";
|
||||
import Reward from "./reward";
|
||||
import federations from "./tiles/federations";
|
||||
import { finalScorings, roundScorings } from "./tiles/scoring";
|
||||
import * as researchTracks from "./research-tracks";
|
||||
import AvailableCommand, { generate as generateAvailableCommands } from "./available-command";
|
||||
import Reward from "./reward";
|
||||
import { boardActions } from "./actions";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import { isAdvanced } from "./tiles/techs";
|
||||
import { ChargeDecision, ChargeRequest, decideChargeRequest } from "./auto-charge";
|
||||
|
||||
// const ISOLATED_DISTANCE = 3;
|
||||
const LEECHING_DISTANCE = 2;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Event from "./events";
|
||||
import { Condition, Operator, Resource } from "./enums";
|
||||
import Event from "./events";
|
||||
import Reward from "./reward";
|
||||
|
||||
describe("Events", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Condition, Operator, Booster, AdvTechTilePos, Command, ResearchField, BoardAction, Faction } from "./enums";
|
||||
import { AdvTechTilePos, BoardAction, Booster, Command, Condition, Faction, Operator, ResearchField } from "./enums";
|
||||
import Reward from "./reward";
|
||||
|
||||
function findCondition(spec: string): [Condition, string] {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Building, Faction } from "../enums";
|
||||
import { FactionBoardRaw } from ".";
|
||||
import { Building, Faction } from "../enums";
|
||||
|
||||
const ambas: FactionBoardRaw = {
|
||||
faction: Faction.Ambas,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FactionBoardRaw } from ".";
|
||||
import { freeActionsBaltaks } from "../actions";
|
||||
import { Building, Faction } from "../enums";
|
||||
import Player from "../player";
|
||||
import { freeActionsBaltaks } from "../actions";
|
||||
|
||||
const baltaks: FactionBoardRaw = {
|
||||
faction: Faction.BalTaks,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, Federation } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, Federation } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, Federation } from "../enums";
|
||||
import { Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { FactionBoardRaw } from ".";
|
||||
import Player from "../player";
|
||||
import { GaiaHex } from "../gaia-hex";
|
||||
import Reward from "../reward";
|
||||
import { Building, Faction } from "../enums";
|
||||
import { GaiaHex } from "../gaia-hex";
|
||||
import Player from "../player";
|
||||
import Reward from "../reward";
|
||||
|
||||
const geodens: FactionBoardRaw = {
|
||||
faction: Faction.Geodens,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine, { EngineOptions } from "../engine";
|
||||
import { Player, Federation } from "../enums";
|
||||
import { Federation, Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FactionBoardRaw } from ".";
|
||||
import { Building, Federation, Faction, Planet } from "../enums";
|
||||
import Player from "../player";
|
||||
import { Building, Faction, Federation, Planet } from "../enums";
|
||||
import { GaiaHex } from "../gaia-hex";
|
||||
import Player from "../player";
|
||||
import Reward from "../reward";
|
||||
|
||||
const gleens: FactionBoardRaw = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FactionBoardRaw } from ".";
|
||||
import Player from "../player";
|
||||
import { freeActionsHadschHallas } from "../actions";
|
||||
import { Faction } from "../enums";
|
||||
import Player from "../player";
|
||||
|
||||
const hadschHallas: FactionBoardRaw = {
|
||||
faction: Faction.HadschHallas,
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { Faction } from "../enums";
|
||||
import Terrans from "./terrans";
|
||||
import Lantids from "./lantids";
|
||||
import Xenos from "./xenos";
|
||||
import Gleens from "./gleens";
|
||||
import Taklons from "./taklons";
|
||||
import Ambas from "./ambas";
|
||||
import HadschHallas from "./hadsch-hallas";
|
||||
import Ivits from "./ivits";
|
||||
import Geodens from "./geodens";
|
||||
import BalTaks from "./baltaks";
|
||||
import Firaks from "./firaks";
|
||||
import Bescods from "./bescods";
|
||||
import Nevlas from "./nevlas";
|
||||
import Firaks from "./firaks";
|
||||
import Geodens from "./geodens";
|
||||
import Gleens from "./gleens";
|
||||
import HadschHallas from "./hadsch-hallas";
|
||||
import Itars from "./itars";
|
||||
import Ivits from "./ivits";
|
||||
import Lantids from "./lantids";
|
||||
import Nevlas from "./nevlas";
|
||||
import Taklons from "./taklons";
|
||||
import Terrans from "./terrans";
|
||||
import { FactionBoard, FactionBoardRaw } from "./types";
|
||||
import Xenos from "./xenos";
|
||||
export { FactionBoard, FactionBoardRaw } from "./types";
|
||||
|
||||
const factionBoards: { [key in Faction]: FactionBoardRaw } = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, Command } from "../enums";
|
||||
import { Command, Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, Building, Command, Planet, Operator } from "../enums";
|
||||
import { Building, Command, Operator, Planet, Player } from "../enums";
|
||||
|
||||
const parseMoves = Engine.parseMoves;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Building, Faction } from "../enums";
|
||||
import { FactionBoardRaw } from ".";
|
||||
import { Building, Faction } from "../enums";
|
||||
|
||||
const lantids: FactionBoardRaw = {
|
||||
faction: Faction.Lantids,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FactionBoardRaw } from ".";
|
||||
import { freeActionsNevlas, freeActionsNevlasPI } from "../actions";
|
||||
import { Building, Faction } from "../enums";
|
||||
import Player from "../player";
|
||||
import { freeActionsNevlas, freeActionsNevlasPI } from "../actions";
|
||||
|
||||
const nevlas: FactionBoardRaw = {
|
||||
faction: Faction.Nevlas,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, BrainstoneArea } from "../enums";
|
||||
import { BrainstoneArea, Player } from "../enums";
|
||||
|
||||
describe("Taklons", () => {
|
||||
it("should allow charge with +t freeIncome", () => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import Reward from "../reward";
|
||||
import { get, set } from "lodash";
|
||||
import { BrainstoneArea, Building, Command, Faction, Planet } from "../enums";
|
||||
import Event from "../events";
|
||||
import { Building, Planet, BrainstoneArea, Faction, Command } from "../enums";
|
||||
import Player from "../player";
|
||||
import Reward from "../reward";
|
||||
import { merge } from "../utils";
|
||||
|
||||
export interface FactionBoardRaw {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import factions from "./factions";
|
||||
import { Faction } from "./enums";
|
||||
import factions from "./factions";
|
||||
|
||||
describe("Factions", () => {
|
||||
it("lantids should be opposite terrans", () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { GaiaHex } from "./gaia-hex";
|
||||
import { difference } from "lodash";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
|
||||
export interface FederationInfo {
|
||||
hexes: GaiaHex[];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Hex } from "hexagrid";
|
||||
import { Planet, Building, Player } from "./enums";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import assert from "assert";
|
||||
import { Hex } from "hexagrid";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import { Building, Planet, Player } from "./enums";
|
||||
|
||||
export interface GaiaHexData {
|
||||
planet: Planet;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { expect } from "chai";
|
||||
import { BrainstoneArea } from "./enums";
|
||||
import Event from "./events";
|
||||
import Player from "./player";
|
||||
import { expect } from "chai";
|
||||
import { Power } from "./player-data";
|
||||
import { BrainstoneArea } from "./enums";
|
||||
|
||||
describe("IncomeSelection", () => {
|
||||
describe("remainingChargesAfterIncome", () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import assert from "assert";
|
||||
import { Resource } from "./enums";
|
||||
import Event from "./events";
|
||||
import { Settings } from "./player";
|
||||
import PlayerData, { Power } from "./player-data";
|
||||
import Reward from "./reward";
|
||||
import { Resource } from "./enums";
|
||||
import { Settings } from "./player";
|
||||
import { combinations } from "./utils";
|
||||
import assert from "assert";
|
||||
|
||||
export class IncomeSelection {
|
||||
private constructor(
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import SpaceMap, { MapConfiguration } from "./map";
|
||||
import Engine from "./engine";
|
||||
import { Hex } from "hexagrid";
|
||||
import { expect } from "chai";
|
||||
import { Hex } from "hexagrid";
|
||||
import Engine from "./engine";
|
||||
import { Planet } from "./enums";
|
||||
import SpaceMap, { MapConfiguration } from "./map";
|
||||
|
||||
describe("Map", () => {
|
||||
it("should have the appropriate number of hexagons", () => {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Grid, Hex, CubeCoordinates } from "hexagrid";
|
||||
import assert from "assert";
|
||||
import { CubeCoordinates, Grid, Hex } from "hexagrid";
|
||||
import { keyBy } from "lodash";
|
||||
import seedrandom from "seedrandom";
|
||||
import shuffleSeed from "shuffle-seed";
|
||||
import assert from "assert";
|
||||
import { keyBy } from "lodash";
|
||||
import Sector from "./sector";
|
||||
import { Player, Planet, Faction } from "./enums";
|
||||
import { GaiaHex, reverseSuffixes } from "./gaia-hex";
|
||||
import { EngineOptions } from "./engine";
|
||||
import { Faction, Planet, Player } from "./enums";
|
||||
import { GaiaHex, reverseSuffixes } from "./gaia-hex";
|
||||
import Sector from "./sector";
|
||||
|
||||
// Data: from outer ring to inside ring, starting from top
|
||||
const s1 = { name: "1", map: "eeemevoeedee,ereees,e".replace(/,/g, "") };
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from "chai";
|
||||
import "mocha";
|
||||
import { BrainstoneArea } from "./enums";
|
||||
import PlayerData from "./player-data";
|
||||
import { Resource, BrainstoneArea } from "./enums";
|
||||
|
||||
describe("PlayerData", () => {
|
||||
it("should export to JSON", () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Reward from "./reward";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import { cloneDeep, fromPairs } from "lodash";
|
||||
import {
|
||||
AdvTechTile,
|
||||
AdvTechTilePos,
|
||||
|
|
@ -14,9 +14,9 @@ import {
|
|||
TechTile,
|
||||
TechTilePos,
|
||||
} from "./enums";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import { EventSource } from "./events";
|
||||
import { cloneDeep, fromPairs } from "lodash";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
import Reward from "./reward";
|
||||
|
||||
const MAX_ORE = 15;
|
||||
const MAX_CREDIT = 30;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { expect } from "chai";
|
||||
import "mocha";
|
||||
import Player from "./player";
|
||||
import { Building, Faction, Operator, Planet, Player as PlayerEnum, Resource } from "./enums";
|
||||
import Reward from "./reward";
|
||||
import Event from "./events";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
import Player from "./player";
|
||||
import Reward from "./reward";
|
||||
|
||||
describe("Player", () => {
|
||||
describe("canBuild", () => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
import assert from "assert";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import { Grid, Hex } from "hexagrid";
|
||||
import { countBy, difference, merge, sum, uniq, uniqWith, zipWith } from "lodash";
|
||||
import spanningTree from "./algorithms/spanning-tree";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import {
|
||||
AdvTechTile,
|
||||
AdvTechTilePos,
|
||||
|
|
@ -17,27 +23,21 @@ import {
|
|||
TechTile,
|
||||
TechTilePos,
|
||||
} from "./enums";
|
||||
import PlayerData from "./player-data";
|
||||
import Event, { EventSource, TechPos } from "./events";
|
||||
import { factionBoard, FactionBoard } from "./faction-boards";
|
||||
import { countBy, difference, merge, sum, uniq, uniqWith, zipWith } from "lodash";
|
||||
import factions from "./factions";
|
||||
import Reward from "./reward";
|
||||
import { Grid, Hex } from "hexagrid";
|
||||
import researchTracks, { keyNeeded, lastTile } from "./research-tracks";
|
||||
import { terraformingStepsRequired } from "./planets";
|
||||
import boosts from "./tiles/boosters";
|
||||
import { stdBuildingValue } from "./buildings";
|
||||
import SpaceMap from "./map";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
import spanningTree from "./algorithms/spanning-tree";
|
||||
import { FederationInfo, isOutclassedBy } from "./federation";
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
import { IncomeSelection } from "./income";
|
||||
import SpaceMap from "./map";
|
||||
import { terraformingStepsRequired } from "./planets";
|
||||
import PlayerData from "./player-data";
|
||||
import researchTracks, { keyNeeded, lastTile } from "./research-tracks";
|
||||
import Reward from "./reward";
|
||||
import boosts from "./tiles/boosters";
|
||||
import federationTiles, { isGreen } from "./tiles/federations";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import { finalScorings } from "./tiles/scoring";
|
||||
import techs, { isAdvanced } from "./tiles/techs";
|
||||
import assert from "assert";
|
||||
import { IncomeSelection } from "./income";
|
||||
|
||||
const TERRAFORMING_COST = 3;
|
||||
// 25 satellites total
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { expect } from "chai";
|
||||
import "mocha";
|
||||
import Reward from "./reward";
|
||||
import { Resource } from "./enums";
|
||||
import { AssertionError } from "assert";
|
||||
import Reward from "./reward";
|
||||
|
||||
describe("Reward", () => {
|
||||
it("should construct from strings", () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Resource } from "./enums";
|
||||
import assert from "assert";
|
||||
import { groupBy } from "lodash";
|
||||
import { Resource } from "./enums";
|
||||
|
||||
const resources = new Set(Object.values(Resource));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { Grid } from "hexagrid";
|
||||
import { Planet } from "./enums";
|
||||
|
||||
import { GaiaHex } from "./gaia-hex";
|
||||
|
||||
export default class Sector {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import techs from "./techs";
|
||||
import { roundScorings, finalScorings } from "./scoring";
|
||||
import boosters from "./boosters";
|
||||
import federations from "./federations";
|
||||
import { finalScorings, roundScorings } from "./scoring";
|
||||
import techs from "./techs";
|
||||
|
||||
export default {
|
||||
techs,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { ScoringTile, FinalTile, Condition } from "../enums";
|
||||
import { Condition, FinalTile, ScoringTile } from "../enums";
|
||||
|
||||
const roundScorings = {
|
||||
[ScoringTile.Score1]: ["step >> 2vp"],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import Engine from "../engine";
|
||||
import { Player, AdvTechTilePos, TechTilePos, Command } from "../enums";
|
||||
import { AdvTechTilePos, Command, Player, TechTilePos } from "../enums";
|
||||
|
||||
describe("Tech Tiles", () => {
|
||||
it("should prevent picking the same tech tile twice", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { TechTile, AdvTechTile, Operator, TechTilePos, AdvTechTilePos } from "../enums";
|
||||
import { AdvTechTile, AdvTechTilePos, Operator, TechTile, TechTilePos } from "../enums";
|
||||
|
||||
export default {
|
||||
[TechTile.Tech1]: ["o,q"],
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import axios from "axios";
|
||||
import Engine from "./src/engine";
|
||||
import crypto from "crypto";
|
||||
import { EngineOptions } from "./src/engine";
|
||||
import { Round } from "./src/enums";
|
||||
import assert from "assert";
|
||||
import axios from "axios";
|
||||
import crypto from "crypto";
|
||||
import { set } from "lodash";
|
||||
import Engine, { EngineOptions } from "./src/engine";
|
||||
import { Round } from "./src/enums";
|
||||
|
||||
export async function init(
|
||||
nbPlayers: number,
|
||||
|
|
|
|||
18
package.json
Normal file
18
package.json
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint-staged": "lint-staged",
|
||||
"postinstall": "husky install",
|
||||
"prettier-check": "prettier --plugin-search-dir=. --check ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^5.0.9",
|
||||
"lint-staged": "^10.5.4",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier-plugin-organize-imports": "^1.1.1",
|
||||
"typescript": "^4.1.5"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{css,scss,graphql,html,json,js,jsx,md,mdx,ts,tsx,vue,yaml,yml}": "prettier --plugin-search-dir=. --write"
|
||||
}
|
||||
}
|
||||
748
pnpm-lock.yaml
generated
Normal file
748
pnpm-lock.yaml
generated
Normal file
|
|
@ -0,0 +1,748 @@
|
|||
devDependencies:
|
||||
husky: 5.0.9
|
||||
lint-staged: 10.5.4
|
||||
prettier: 2.2.1
|
||||
prettier-plugin-organize-imports: 1.1.1_prettier@2.2.1+typescript@4.1.5
|
||||
typescript: 4.1.5
|
||||
lockfileVersion: 5.2
|
||||
packages:
|
||||
/@babel/code-frame/7.12.13:
|
||||
dependencies:
|
||||
'@babel/highlight': 7.12.13
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
|
||||
/@babel/helper-validator-identifier/7.12.11:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
|
||||
/@babel/highlight/7.12.13:
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.12.11
|
||||
chalk: 2.4.2
|
||||
js-tokens: 4.0.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==
|
||||
/@types/parse-json/4.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
|
||||
/aggregate-error/3.1.0:
|
||||
dependencies:
|
||||
clean-stack: 2.2.0
|
||||
indent-string: 4.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
|
||||
/ansi-colors/4.1.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
|
||||
/ansi-escapes/4.3.1:
|
||||
dependencies:
|
||||
type-fest: 0.11.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
|
||||
/ansi-regex/5.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||
/ansi-styles/3.2.1:
|
||||
dependencies:
|
||||
color-convert: 1.9.3
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
|
||||
/ansi-styles/4.3.0:
|
||||
dependencies:
|
||||
color-convert: 2.0.1
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
/astral-regex/2.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
|
||||
/braces/3.0.2:
|
||||
dependencies:
|
||||
fill-range: 7.0.1
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||
/callsites/3.1.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
|
||||
/chalk/2.4.2:
|
||||
dependencies:
|
||||
ansi-styles: 3.2.1
|
||||
escape-string-regexp: 1.0.5
|
||||
supports-color: 5.5.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
/chalk/4.1.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
||||
/clean-stack/2.2.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
|
||||
/cli-cursor/3.1.0:
|
||||
dependencies:
|
||||
restore-cursor: 3.1.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
|
||||
/cli-truncate/2.1.0:
|
||||
dependencies:
|
||||
slice-ansi: 3.0.0
|
||||
string-width: 4.2.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==
|
||||
/color-convert/1.9.3:
|
||||
dependencies:
|
||||
color-name: 1.1.3
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
|
||||
/color-convert/2.0.1:
|
||||
dependencies:
|
||||
color-name: 1.1.4
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=7.0.0'
|
||||
resolution:
|
||||
integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
/color-name/1.1.3:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||
/color-name/1.1.4:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
/commander/6.2.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
|
||||
/cosmiconfig/7.0.0:
|
||||
dependencies:
|
||||
'@types/parse-json': 4.0.0
|
||||
import-fresh: 3.3.0
|
||||
parse-json: 5.2.0
|
||||
path-type: 4.0.0
|
||||
yaml: 1.10.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
|
||||
/cross-spawn/7.0.3:
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
shebang-command: 2.0.0
|
||||
which: 2.0.2
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 8'
|
||||
resolution:
|
||||
integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
||||
/debug/4.3.1:
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6.0'
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
/dedent/0.7.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
|
||||
/emoji-regex/8.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
/end-of-stream/1.4.4:
|
||||
dependencies:
|
||||
once: 1.4.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||
/enquirer/2.3.6:
|
||||
dependencies:
|
||||
ansi-colors: 4.1.1
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8.6'
|
||||
resolution:
|
||||
integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
|
||||
/error-ex/1.3.2:
|
||||
dependencies:
|
||||
is-arrayish: 0.2.1
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
|
||||
/escape-string-regexp/1.0.5:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.8.0'
|
||||
resolution:
|
||||
integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
/execa/4.1.0:
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
get-stream: 5.2.0
|
||||
human-signals: 1.1.1
|
||||
is-stream: 2.0.0
|
||||
merge-stream: 2.0.0
|
||||
npm-run-path: 4.0.1
|
||||
onetime: 5.1.2
|
||||
signal-exit: 3.0.3
|
||||
strip-final-newline: 2.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
|
||||
/figures/3.2.0:
|
||||
dependencies:
|
||||
escape-string-regexp: 1.0.5
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
|
||||
/fill-range/7.0.1:
|
||||
dependencies:
|
||||
to-regex-range: 5.0.1
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
/get-own-enumerable-property-symbols/3.0.2:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==
|
||||
/get-stream/5.2.0:
|
||||
dependencies:
|
||||
pump: 3.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
|
||||
/has-flag/3.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
|
||||
/has-flag/4.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
||||
/human-signals/1.1.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8.12.0'
|
||||
resolution:
|
||||
integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
|
||||
/husky/5.0.9:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 10'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-0SjcaY21a+IRdx7p7r/X33Vc09UR2m8SbP8yfkhUX2/jAmwcz+GR7i9jXkp2pP3GfX23JhMkVP6SWwXB18uXtg==
|
||||
/import-fresh/3.3.0:
|
||||
dependencies:
|
||||
parent-module: 1.0.1
|
||||
resolve-from: 4.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
|
||||
/indent-string/4.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
|
||||
/is-arrayish/0.2.1:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
|
||||
/is-fullwidth-code-point/3.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
/is-number/7.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.12.0'
|
||||
resolution:
|
||||
integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
/is-obj/1.0.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
|
||||
/is-regexp/1.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
|
||||
/is-stream/2.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
|
||||
/isexe/2.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||
/js-tokens/4.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
/json-parse-even-better-errors/2.3.1:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
|
||||
/lines-and-columns/1.1.6:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
|
||||
/lint-staged/10.5.4:
|
||||
dependencies:
|
||||
chalk: 4.1.0
|
||||
cli-truncate: 2.1.0
|
||||
commander: 6.2.1
|
||||
cosmiconfig: 7.0.0
|
||||
debug: 4.3.1
|
||||
dedent: 0.7.0
|
||||
enquirer: 2.3.6
|
||||
execa: 4.1.0
|
||||
listr2: 3.3.1_enquirer@2.3.6
|
||||
log-symbols: 4.0.0
|
||||
micromatch: 4.0.2
|
||||
normalize-path: 3.0.0
|
||||
please-upgrade-node: 3.2.0
|
||||
string-argv: 0.3.1
|
||||
stringify-object: 3.3.0
|
||||
dev: true
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-EechC3DdFic/TdOPgj/RB3FicqE6932LTHCUm0Y2fsD9KGlLB+RwJl2q1IYBIvEsKzDOgn0D4gll+YxG5RsrKg==
|
||||
/listr2/3.3.1_enquirer@2.3.6:
|
||||
dependencies:
|
||||
chalk: 4.1.0
|
||||
cli-truncate: 2.1.0
|
||||
enquirer: 2.3.6
|
||||
figures: 3.2.0
|
||||
indent-string: 4.0.0
|
||||
log-update: 4.0.0
|
||||
p-map: 4.0.0
|
||||
rxjs: 6.6.3
|
||||
through: 2.3.8
|
||||
wrap-ansi: 7.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10.0.0'
|
||||
peerDependencies:
|
||||
enquirer: '>= 2.3.0 < 3'
|
||||
resolution:
|
||||
integrity: sha512-8Zoxe7s/8nNr4bJ8bdAduHD8uJce+exmMmUWTXlq0WuUdffnH3muisHPHPFtW2vvOfohIsq7FGCaguUxN/h3Iw==
|
||||
/log-symbols/4.0.0:
|
||||
dependencies:
|
||||
chalk: 4.1.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
|
||||
/log-update/4.0.0:
|
||||
dependencies:
|
||||
ansi-escapes: 4.3.1
|
||||
cli-cursor: 3.1.0
|
||||
slice-ansi: 4.0.0
|
||||
wrap-ansi: 6.2.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==
|
||||
/merge-stream/2.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
|
||||
/micromatch/4.0.2:
|
||||
dependencies:
|
||||
braces: 3.0.2
|
||||
picomatch: 2.2.2
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
|
||||
/mimic-fn/2.1.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
||||
/ms/2.1.2:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
/normalize-path/3.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
|
||||
/npm-run-path/4.0.1:
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
|
||||
/once/1.4.0:
|
||||
dependencies:
|
||||
wrappy: 1.0.2
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
/onetime/5.1.2:
|
||||
dependencies:
|
||||
mimic-fn: 2.1.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
|
||||
/p-map/4.0.0:
|
||||
dependencies:
|
||||
aggregate-error: 3.1.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
|
||||
/parent-module/1.0.1:
|
||||
dependencies:
|
||||
callsites: 3.1.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
|
||||
/parse-json/5.2.0:
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.12.13
|
||||
error-ex: 1.3.2
|
||||
json-parse-even-better-errors: 2.3.1
|
||||
lines-and-columns: 1.1.6
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
|
||||
/path-key/3.1.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
|
||||
/path-type/4.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
|
||||
/picomatch/2.2.2:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8.6'
|
||||
resolution:
|
||||
integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||
/please-upgrade-node/3.2.0:
|
||||
dependencies:
|
||||
semver-compare: 1.0.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
|
||||
/prettier-plugin-organize-imports/1.1.1_prettier@2.2.1+typescript@4.1.5:
|
||||
dependencies:
|
||||
prettier: 2.2.1
|
||||
typescript: 4.1.5
|
||||
dev: true
|
||||
peerDependencies:
|
||||
prettier: '>=1.10'
|
||||
typescript: '>=2.8.2'
|
||||
resolution:
|
||||
integrity: sha512-rFA1lnek1FYkMGthm4xBKME41qUKItTovuo24bCGZu/Vu1n3gW71UPLAkIdwewwkZCe29gRVweSOPXvAdckFuw==
|
||||
/prettier/2.2.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10.13.0'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
||||
/pump/3.0.0:
|
||||
dependencies:
|
||||
end-of-stream: 1.4.4
|
||||
once: 1.4.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
|
||||
/resolve-from/4.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||
/restore-cursor/3.1.0:
|
||||
dependencies:
|
||||
onetime: 5.1.2
|
||||
signal-exit: 3.0.3
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
|
||||
/rxjs/6.6.3:
|
||||
dependencies:
|
||||
tslib: 1.14.1
|
||||
dev: true
|
||||
engines:
|
||||
npm: '>=2.0.0'
|
||||
resolution:
|
||||
integrity: sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
|
||||
/semver-compare/1.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||
/shebang-command/2.0.0:
|
||||
dependencies:
|
||||
shebang-regex: 3.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
|
||||
/shebang-regex/3.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
/signal-exit/3.0.3:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
||||
/slice-ansi/3.0.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
astral-regex: 2.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==
|
||||
/slice-ansi/4.0.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
astral-regex: 2.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
|
||||
/string-argv/0.3.1:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.6.19'
|
||||
resolution:
|
||||
integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
|
||||
/string-width/4.2.0:
|
||||
dependencies:
|
||||
emoji-regex: 8.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
strip-ansi: 6.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
|
||||
/stringify-object/3.3.0:
|
||||
dependencies:
|
||||
get-own-enumerable-property-symbols: 3.0.2
|
||||
is-obj: 1.0.1
|
||||
is-regexp: 1.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
|
||||
/strip-ansi/6.0.0:
|
||||
dependencies:
|
||||
ansi-regex: 5.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
|
||||
/strip-final-newline/2.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
|
||||
/supports-color/5.5.0:
|
||||
dependencies:
|
||||
has-flag: 3.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
||||
/supports-color/7.2.0:
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
|
||||
/through/2.3.8:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
|
||||
/to-regex-range/5.0.1:
|
||||
dependencies:
|
||||
is-number: 7.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8.0'
|
||||
resolution:
|
||||
integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||
/tslib/1.14.1:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
/type-fest/0.11.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
||||
/typescript/4.1.5:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=4.2.0'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
|
||||
/which/2.0.2:
|
||||
dependencies:
|
||||
isexe: 2.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 8'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
|
||||
/wrap-ansi/6.2.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
string-width: 4.2.0
|
||||
strip-ansi: 6.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
|
||||
/wrap-ansi/7.0.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
string-width: 4.2.0
|
||||
strip-ansi: 6.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
/wrappy/1.0.2:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
/yaml/1.10.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
integrity: sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
|
||||
specifiers:
|
||||
husky: ^5.0.9
|
||||
lint-staged: ^10.5.4
|
||||
prettier: ^2.2.1
|
||||
prettier-plugin-organize-imports: ^1.1.1
|
||||
typescript: ^4.1.5
|
||||
|
|
@ -1,29 +1,25 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'@vue/standard',
|
||||
'@vue/typescript/recommended'
|
||||
],
|
||||
extends: ["plugin:vue/essential", "@vue/typescript/recommended"],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
semi: ['error', 'always'],
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/consistent-type-assertions': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'no-return-assign': 'off',
|
||||
'no-lone-blocks': 'off',
|
||||
'no-unmodified-loop-condition': 'off',
|
||||
'no-useless-return': 'off',
|
||||
quotes: 'off'
|
||||
}
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
semi: ["error", "always"],
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/consistent-type-assertions": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"no-return-assign": "off",
|
||||
"no-lone-blocks": "off",
|
||||
"no-unmodified-loop-condition": "off",
|
||||
"no-useless-return": "off",
|
||||
quotes: "off",
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import Game from './src/components/Game.vue';
|
||||
import Game from "./src/components/Game.vue";
|
||||
import launch from "./src/launcher";
|
||||
import launchSelfContained from "./src/self-contained";
|
||||
import { gaiaViewer, makeStore } from "./src/store";
|
||||
|
||||
import { gaiaViewer, makeStore } from './src/store';
|
||||
import launch from './src/launcher';
|
||||
import launchSelfContained from './src/self-contained';
|
||||
|
||||
export {Game, gaiaViewer, makeStore, launchSelfContained};
|
||||
export default launch;
|
||||
export { Game, gaiaViewer, makeStore, launchSelfContained };
|
||||
export default launch;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="shortcut icon" type="image/png" id="favicon-gp" href="/favicon.png">
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<link rel="shortcut icon" type="image/png" id="favicon-gp" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Gaia Project</title>
|
||||
</head>
|
||||
|
|
|
|||
4
viewer/shims.d.ts
vendored
4
viewer/shims.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
|||
declare module '*.vue' {
|
||||
import Vue from 'vue';
|
||||
declare module "*.vue" {
|
||||
import Vue from "vue";
|
||||
export default Vue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/academy.svg" :filter="faction ? `url(#color-${faction})` : ''" width=90 :height=771/641*90 x=-45 y=-53 />
|
||||
<image xlink:href="../../assets/buildings/academy.svg" :filter="faction ? `url(#color-${faction})` : ''" width=90
|
||||
:height=771/641*90 x=-45 y=-53 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class Academy extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/gaiaformer.svg" :filter="faction ? `url(#color-${faction})` : ''" width=80 :height=335/543*80 x=-40 y=-20 />
|
||||
<image xlink:href="../../assets/buildings/gaiaformer.svg" :filter="faction ? `url(#color-${faction})` : ''" width=80
|
||||
:height=335/543*80 x=-40 y=-20 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class GaiaFormer extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/mine.svg" :filter="faction ? `url(#color-${faction})` : ''" width=70 :height=463/400*70 x=-35 y=-35 />
|
||||
<image xlink:href="../../assets/buildings/mine.svg" :filter="faction ? `url(#color-${faction})` : ''" width=70
|
||||
:height=463/400*70 x=-35 y=-35 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class Mine extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/planetary-institute.svg" :filter="faction ? `url(#color-${faction})` : ''" :height=651/678*110 width=110 x=-55 y=-55 />
|
||||
<image xlink:href="../../assets/buildings/planetary-institute.svg" :filter="faction ? `url(#color-${faction})` : ''"
|
||||
:height=651/678*110 width=110 x=-55 y=-55 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class PlanetaryInstitute extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/research-lab.svg" :filter="faction ? `url(#color-${faction})` : ''" width=80 height=80 x=-40 y=-40 />
|
||||
<image
|
||||
xlink:href="../../assets/buildings/research-lab.svg"
|
||||
:filter="faction ? `url(#color-${faction})` : ''"
|
||||
width="80"
|
||||
height="80"
|
||||
x="-40"
|
||||
y="-40"
|
||||
/>
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +18,4 @@ export default class ResearchLab extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/space-station.svg" :filter="faction ? `url(#color-${faction})` : ''" width=90 :height=430/619*90 x=-45 y=-30 />
|
||||
<image xlink:href="../../assets/buildings/space-station.svg" :filter="faction ? `url(#color-${faction})` : ''"
|
||||
width=90 :height=430/619*90 x=-45 y=-30 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class SpaceStation extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/buildings/trading-station.svg" :filter="faction ? `url(#color-${faction})` : ''" :height=667/504*80 width=80 x=-40 y=-50 />
|
||||
<image xlink:href="../../assets/buildings/trading-station.svg" :filter="faction ? `url(#color-${faction})` : ''"
|
||||
:height=667/504*80 width=80 x=-40 y=-50 />
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -11,5 +12,4 @@ export default class TradingStation extends Vue {
|
|||
@Prop({ default: "" })
|
||||
faction: string;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/conditions/planet-type.svg" width=20 height=20 x=-10 y=-10 />
|
||||
<image xlink:href="../../assets/conditions/planet-type.svg" width="20" height="20" x="-10" y="-10" />
|
||||
</g>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/conditions/sector.svg" width=20 height=20 x=-10 y=-10 />
|
||||
<image xlink:href="../../assets/conditions/sector.svg" width="20" height="20" x="-10" y="-10" />
|
||||
</g>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<g>
|
||||
<image xlink:href="../../assets/resources/qic.svg" width=20 height=20 x=-10 y=-9 />
|
||||
<image xlink:href="../../assets/resources/qic.svg" width="20" height="20" x="-10" y="-9" />
|
||||
</g>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
<template>
|
||||
<svg width="429" height="429" viewBox="0 0 429 429" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M418.4 183.6V245.2C418.4 251.3 414.5 256.7 408.7 258.6L383.9 266.6C379.9 267.9 376.6 270.9 375.1 274.9C373.7 278.6 372.2 282.3 370.5 285.8C368.7 289.8 368.9 294.3 370.9 298.2L382.8 320.5C385.9 326.1 384.9 332.8 380.5 337.2L336.9 380.7C332.6 385 326 386.1 320.5 383.3L297.4 371.4C293.6 369.5 289.1 369.3 285.3 371.1C281.7 372.7 278.1 374.2 274.3 375.6C270.2 377.1 267.1 380.5 265.9 384.6L258.5 408.7C256.7 414.6 251.2 418.6 245.1 418.6H183.5C177.4 418.6 172 414.7 170.1 408.8L162.1 384.1C160.8 380.1 157.7 376.8 153.8 375.3C150.1 373.9 146.4 372.4 142.9 370.7C138.9 368.9 134.4 369.1 130.5 371.1L108.2 383C102.7 385.9 96 384.9 91.7 380.5L48.1 336.9C43.8 332.6 42.7 326 45.5 320.5L57.4 297.3C59.4 293.4 59.4 288.9 57.6 285C56.1 281.7 54.7 278.4 53.4 275C51.9 271 48.6 267.8 44.5 266.5L19.7 258.5C13.9 256.6 10 251.2 10 245.1V183.5C10 177.3 14 171.9 19.9 170.1L44 162.7C48.1 161.4 51.5 158.3 53 154.3C54.4 150.6 55.9 146.9 57.5 143.3C59.3 139.4 59.1 135 57.2 131.2L45.3 108C42.5 102.6 43.6 96 47.9 91.6L91.5 48.1C95.9 43.7 102.6 42.7 108 45.6L130.3 57.5C134.1 59.5 138.7 59.7 142.7 57.9C146.3 56.3 149.9 54.7 153.6 53.3C157.6 51.8 160.6 48.5 161.9 44.5L169.9 19.8C171.8 14 177.2 10 183.3 10H244.9C251.1 10 256.5 14 258.3 19.9L265.9 44.4C267.2 48.5 270.3 51.9 274.3 53.4C278 54.8 281.7 56.3 285.3 57.9C289.2 59.7 293.6 59.5 297.4 57.6L320.6 45.7C326 42.9 332.6 44 336.9 48.3L380.4 91.8C384.8 96.2 385.8 102.9 382.9 108.3L371 130.6C369 134.4 368.8 139 370.6 142.9C372.3 146.7 373.9 150.5 375.4 154.4C376.9 158.5 380.3 161.6 384.4 162.8L408.5 170.2C414.4 172 418.4 177.5 418.4 183.6Z" fill="#248A3D" stroke="#010101" stroke-width="20" stroke-miterlimit="10"/>
|
||||
</svg>
|
||||
<svg width="429" height="429" viewBox="0 0 429 429" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M418.4 183.6V245.2C418.4 251.3 414.5 256.7 408.7 258.6L383.9 266.6C379.9 267.9 376.6 270.9 375.1 274.9C373.7 278.6 372.2 282.3 370.5 285.8C368.7 289.8 368.9 294.3 370.9 298.2L382.8 320.5C385.9 326.1 384.9 332.8 380.5 337.2L336.9 380.7C332.6 385 326 386.1 320.5 383.3L297.4 371.4C293.6 369.5 289.1 369.3 285.3 371.1C281.7 372.7 278.1 374.2 274.3 375.6C270.2 377.1 267.1 380.5 265.9 384.6L258.5 408.7C256.7 414.6 251.2 418.6 245.1 418.6H183.5C177.4 418.6 172 414.7 170.1 408.8L162.1 384.1C160.8 380.1 157.7 376.8 153.8 375.3C150.1 373.9 146.4 372.4 142.9 370.7C138.9 368.9 134.4 369.1 130.5 371.1L108.2 383C102.7 385.9 96 384.9 91.7 380.5L48.1 336.9C43.8 332.6 42.7 326 45.5 320.5L57.4 297.3C59.4 293.4 59.4 288.9 57.6 285C56.1 281.7 54.7 278.4 53.4 275C51.9 271 48.6 267.8 44.5 266.5L19.7 258.5C13.9 256.6 10 251.2 10 245.1V183.5C10 177.3 14 171.9 19.9 170.1L44 162.7C48.1 161.4 51.5 158.3 53 154.3C54.4 150.6 55.9 146.9 57.5 143.3C59.3 139.4 59.1 135 57.2 131.2L45.3 108C42.5 102.6 43.6 96 47.9 91.6L91.5 48.1C95.9 43.7 102.6 42.7 108 45.6L130.3 57.5C134.1 59.5 138.7 59.7 142.7 57.9C146.3 56.3 149.9 54.7 153.6 53.3C157.6 51.8 160.6 48.5 161.9 44.5L169.9 19.8C171.8 14 177.2 10 183.3 10H244.9C251.1 10 256.5 14 258.3 19.9L265.9 44.4C267.2 48.5 270.3 51.9 274.3 53.4C278 54.8 281.7 56.3 285.3 57.9C289.2 59.7 293.6 59.5 297.4 57.6L320.6 45.7C326 42.9 332.6 44 336.9 48.3L380.4 91.8C384.8 96.2 385.8 102.9 382.9 108.3L371 130.6C369 134.4 368.8 139 370.6 142.9C372.3 146.7 373.9 150.5 375.4 154.4C376.9 158.5 380.3 161.6 384.4 162.8L408.5 170.2C414.4 172 418.4 177.5 418.4 183.6Z"
|
||||
fill="#248A3D"
|
||||
stroke="#010101"
|
||||
stroke-width="20"
|
||||
stroke-miterlimit="10"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
<template>
|
||||
<svg viewBox="0 0 80 400" v-if="$store.state.gaiaViewer.data.tiles && $store.state.gaiaViewer.data.tiles.scorings.final">
|
||||
<svg
|
||||
viewBox="0 0 80 400"
|
||||
v-if="$store.state.gaiaViewer.data.tiles && $store.state.gaiaViewer.data.tiles.scorings.final"
|
||||
>
|
||||
<FinalScoringTile :index="0" />
|
||||
<FinalScoringTile :index="1" transform="translate(0, 60)"/>
|
||||
<ScoringTile v-for="i in [0, 1, 2, 3, 4, 5]" :round="i+1" :transform="`translate(0, ${400 - (i+1)*45})`" :key="i" />
|
||||
<FinalScoringTile :index="1" transform="translate(0, 60)" />
|
||||
<ScoringTile
|
||||
v-for="i in [0, 1, 2, 3, 4, 5]"
|
||||
:round="i + 1"
|
||||
:transform="`translate(0, ${400 - (i + 1) * 45})`"
|
||||
:key="i"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
|
|
@ -22,6 +30,4 @@ export default class ScoringBoard extends Vue {
|
|||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,17 @@
|
|||
<div>
|
||||
<Game />
|
||||
<b-modal v-model="modalShow" size="lg" @ok="handleOK" title="Load from JSON">
|
||||
<b-textarea v-model="text" rows=6 />
|
||||
<b-textarea v-model="text" rows="6" />
|
||||
</b-modal>
|
||||
<b-avatar button style="position: fixed; left: 20px; bottom: 20px; z-index: 100" size=50 @click="modalShow = true">
|
||||
<b-avatar
|
||||
button
|
||||
style="position: fixed; left: 20px; bottom: 20px; z-index: 100"
|
||||
size="50"
|
||||
@click="modalShow = true"
|
||||
>
|
||||
LOAD
|
||||
</b-avatar>
|
||||
<b-avatar button style="position: fixed; left: 80px; bottom: 20px; z-index: 100" size=50 @click="openExport">
|
||||
<b-avatar button style="position: fixed; left: 80px; bottom: 20px; z-index: 100" size="50" @click="openExport">
|
||||
EXPORT
|
||||
</b-avatar>
|
||||
</div>
|
||||
|
|
@ -32,7 +37,6 @@ export default class Wrapper extends Vue {
|
|||
this.modalShow = true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.b-avatar-custom {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Condition, Event, Operator, Reward, Resource } from "@gaia-project/engine";
|
||||
import { Condition, Event, Operator, Resource, Reward } from "@gaia-project/engine";
|
||||
|
||||
const conditionsCount = {
|
||||
[Condition.Mine]: "mine",
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import {
|
||||
Faction,
|
||||
Operator,
|
||||
Building,
|
||||
Planet,
|
||||
factions,
|
||||
terraformingStepsRequired,
|
||||
Faction,
|
||||
factionBoard,
|
||||
factions,
|
||||
Operator,
|
||||
Planet,
|
||||
terraformingStepsRequired,
|
||||
} from "@gaia-project/engine";
|
||||
|
||||
const factionData: { [faction in Faction]: { ability: string; PI: string } } = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { TechTilePos, GaiaHex, AdvTechTilePos, Booster, Federation } from "@gaia-project/engine";
|
||||
import { AdvTechTilePos, Booster, Federation, GaiaHex, TechTilePos } from "@gaia-project/engine";
|
||||
|
||||
export interface ButtonData {
|
||||
label?: string;
|
||||
|
|
|
|||
|
|
@ -2,20 +2,20 @@ import { CubeCoordinatesPartial } from "hexagrid/src/cubecoordinates";
|
|||
|
||||
const vSpacing = Math.sqrt(3) / 2;
|
||||
|
||||
export function hexCenter (hex: CubeCoordinatesPartial, radius = 1) {
|
||||
export function hexCenter(hex: CubeCoordinatesPartial, radius = 1) {
|
||||
return {
|
||||
x: hex.r * 1.5 * radius,
|
||||
y: -(2 * hex.q + hex.r) * vSpacing * radius
|
||||
y: -(2 * hex.q + hex.r) * vSpacing * radius,
|
||||
};
|
||||
}
|
||||
|
||||
export function corners (radius = 1) {
|
||||
export function corners(radius = 1) {
|
||||
return [
|
||||
{ x: -radius, y: 0 },
|
||||
{ x: -radius / 2, y: -vSpacing * radius },
|
||||
{ x: radius / 2, y: -vSpacing * radius },
|
||||
{ x: radius, y: 0 },
|
||||
{ x: radius / 2, y: vSpacing * radius },
|
||||
{ x: -radius / 2, y: vSpacing * radius }
|
||||
{ x: -radius / 2, y: vSpacing * radius },
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,32 @@
|
|||
import BootstrapVue from "bootstrap-vue";
|
||||
import { EventEmitter } from "events";
|
||||
import Vue from "vue";
|
||||
import { Store } from "vuex";
|
||||
import BootstrapVue from 'bootstrap-vue';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { makeStore } from './store';
|
||||
import Game from './components/Game.vue';
|
||||
import Resource from './components/Resource.vue';
|
||||
import TechContent from './components/TechContent.vue';
|
||||
import Condition from './components/Condition.vue';
|
||||
import type { VueConstructor } from "vue/types/umd";
|
||||
import { Store } from "vuex";
|
||||
import Condition from "./components/Condition.vue";
|
||||
import Game from "./components/Game.vue";
|
||||
import Resource from "./components/Resource.vue";
|
||||
import TechContent from "./components/TechContent.vue";
|
||||
import { makeStore } from "./store";
|
||||
|
||||
Vue.use(BootstrapVue);
|
||||
Vue.component("Condition", Condition);
|
||||
Vue.component("TechContent", TechContent);
|
||||
Vue.component("Resource", Resource);
|
||||
|
||||
function launch (selector: string, component: VueConstructor<Vue> = Game) {
|
||||
function launch(selector: string, component: VueConstructor<Vue> = Game) {
|
||||
const store = makeStore();
|
||||
|
||||
const app = new Vue({
|
||||
store,
|
||||
render: (h) => h("div", { class: "container-fluid py-2" }, [h(component)])
|
||||
render: (h) => h("div", { class: "container-fluid py-2" }, [h(component)]),
|
||||
}).$mount(selector);
|
||||
|
||||
const item: EventEmitter & {store?: Store<unknown>; app?: Vue} = new EventEmitter();
|
||||
const item: EventEmitter & { store?: Store<unknown>; app?: Vue } = new EventEmitter();
|
||||
|
||||
let replaying = false;
|
||||
|
||||
item.addListener("state", data => {
|
||||
item.addListener("state", (data) => {
|
||||
store.dispatch("gaiaViewer/externalData", data);
|
||||
item.emit("replaceLog", data?.moveHistory);
|
||||
});
|
||||
|
|
@ -36,8 +35,8 @@ function launch (selector: string, component: VueConstructor<Vue> = Game) {
|
|||
item.emit("fetchState");
|
||||
}
|
||||
});
|
||||
item.addListener("preferences", data => store.commit("gaiaViewer/preferences", data));
|
||||
item.addListener("player", data => store.commit("gaiaViewer/player", data));
|
||||
item.addListener("preferences", (data) => store.commit("gaiaViewer/preferences", data));
|
||||
item.addListener("player", (data) => store.commit("gaiaViewer/player", data));
|
||||
item.addListener("replay:start", () => {
|
||||
store.dispatch("gaiaViewer/replayStart");
|
||||
replaying = true;
|
||||
|
|
@ -51,7 +50,7 @@ function launch (selector: string, component: VueConstructor<Vue> = Game) {
|
|||
replaying = false;
|
||||
item.emit("fetchState");
|
||||
});
|
||||
item.addListener("gamelog", logData => {
|
||||
item.addListener("gamelog", (logData) => {
|
||||
if (replaying) {
|
||||
//
|
||||
} else {
|
||||
|
|
@ -69,7 +68,11 @@ function launch (selector: string, component: VueConstructor<Vue> = Game) {
|
|||
}
|
||||
|
||||
if (type === "gaiaViewer/playerClick") {
|
||||
item.emit("player:clicked", { name: payload.name, auth: payload.auth, index: (store as Store<any>).state.gaiaViewer.data?.players?.findIndex(pl => pl === payload) });
|
||||
item.emit("player:clicked", {
|
||||
name: payload.name,
|
||||
auth: payload.auth,
|
||||
index: (store as Store<any>).state.gaiaViewer.data?.players?.findIndex((pl) => pl === payload),
|
||||
});
|
||||
}
|
||||
|
||||
if (type === "gaiaViewer/replayInfo") {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import launch from './launcher';
|
||||
import launchSelfContained from './self-contained';
|
||||
import launch from "./launcher";
|
||||
import launchSelfContained from "./self-contained";
|
||||
|
||||
console.log(process.env);
|
||||
|
||||
if (process.env.VUE_APP_BGIO) {
|
||||
launch("#app");
|
||||
} else /* if (process.env.VUE_APP_SelfContained || 1) */ {
|
||||
} /* if (process.env.VUE_APP_SelfContained || 1) */ else {
|
||||
launchSelfContained();
|
||||
} /* else {
|
||||
launch("#app");
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import launch from "./launcher";
|
||||
import Engine from "@gaia-project/engine";
|
||||
|
||||
import Wrapper from "./components/Wrapper.vue";
|
||||
import Game from "./components/Game.vue";
|
||||
import Wrapper from "./components/Wrapper.vue";
|
||||
import launch from "./launcher";
|
||||
|
||||
function launchSelfContained(selector = "#app", debug = true) {
|
||||
const emitter = launch(selector, debug ? Wrapper : Game);
|
||||
|
|
|
|||
4
viewer/src/shims.d.ts
vendored
4
viewer/src/shims.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
|||
declare module '*.vue' {
|
||||
import Vue from 'vue';
|
||||
declare module "*.vue" {
|
||||
import Vue from "vue";
|
||||
export default Vue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import { GameContext } from "./data";
|
||||
import Engine, {
|
||||
GaiaHex,
|
||||
ResearchField,
|
||||
TechTilePos,
|
||||
AdvTechTilePos,
|
||||
Booster,
|
||||
Federation,
|
||||
GaiaHex,
|
||||
Player,
|
||||
ResearchField,
|
||||
TechTilePos,
|
||||
} from "@gaia-project/engine";
|
||||
import { CubeCoordinates } from "hexagrid";
|
||||
import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import { GameContext } from "./data";
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@
|
|||
// $display6-size: 1.5rem;
|
||||
|
||||
@import "~bootstrap/scss/bootstrap.scss";
|
||||
@import '~bootstrap-vue';
|
||||
@import "~bootstrap-vue";
|
||||
|
||||
.tooltip {
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 400px;
|
||||
text-align: left;
|
||||
|
|
@ -67,6 +66,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
:focus{
|
||||
outline:none !important;
|
||||
:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
// Import vue component
|
||||
import launch from './launcher';
|
||||
import launchSelfContained from './self-contained';
|
||||
import launch from "./launcher";
|
||||
import launchSelfContained from "./self-contained";
|
||||
|
||||
let globalItem: any;
|
||||
if (typeof window !== 'undefined') {
|
||||
if (typeof window !== "undefined") {
|
||||
globalItem = window;
|
||||
} else if (typeof global !== 'undefined') {
|
||||
} else if (typeof global !== "undefined") {
|
||||
globalItem = global;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ if (process.argv.includes("lib")) {
|
|||
lintOnSave: false,
|
||||
outputDir: path.join(__dirname, "dist/package"),
|
||||
// css: {extract: false}
|
||||
chainWebpack: config => {
|
||||
chainWebpack: (config) => {
|
||||
config.externals({
|
||||
'bootstrap-vue': 'BootstrapVue'
|
||||
"bootstrap-vue": "BootstrapVue",
|
||||
});
|
||||
},
|
||||
publicPath: `//cdn.jsdelivr.net/npm/@gaia-project/viewer@${package.version}/dist/package/`
|
||||
publicPath: `//cdn.jsdelivr.net/npm/@gaia-project/viewer@${package.version}/dist/package/`,
|
||||
};
|
||||
} else {
|
||||
module.exports = {
|
||||
lintOnSave: false,
|
||||
outputDir: path.join(__dirname, "dist/app")
|
||||
outputDir: path.join(__dirname, "dist/app"),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue