feat: add list-method opt and its query
parent
0517bda98d
commit
8a96cb321c
7
s3si.ts
7
s3si.ts
|
|
@ -4,7 +4,7 @@ import { flags } from "./deps.ts";
|
|||
|
||||
const parseArgs = (args: string[]) => {
|
||||
const parsed = flags.parse(args, {
|
||||
string: ["profilePath", "exporter", "skipMode"],
|
||||
string: ["profilePath", "exporter", "skipMode", "listMethod"],
|
||||
boolean: ["help", "noProgress", "monitor", "withSummary"],
|
||||
alias: {
|
||||
"help": "h",
|
||||
|
|
@ -14,6 +14,7 @@ const parseArgs = (args: string[]) => {
|
|||
"monitor": ["m"],
|
||||
"skipMode": ["s", "skip-mode"],
|
||||
"withSummary": "with-summary",
|
||||
"listMethod": "list-method",
|
||||
},
|
||||
});
|
||||
return parsed;
|
||||
|
|
@ -29,6 +30,10 @@ Options:
|
|||
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
||||
Multiple exporters can be separated by commas
|
||||
(e.g. "stat.ink,file")
|
||||
--list-method When set to "latest", the latest 50 matches will be obtained.
|
||||
When set to "all", matches of all modes will be obtained with a maximum of 250 matches (5 modes x 50 matches).
|
||||
When set to "auto", the latest 50 matches will be obtained. If 50 matches have not been uploaded yet, matches will be obtained from the list of all modes.
|
||||
"auto" is the default setting.
|
||||
--no-progress, -n Disable progress bar
|
||||
--monitor, -m Monitor mode
|
||||
--skip-mode <mode>, -s Skip mode (default: null)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import { delay, showError } from "./utils.ts";
|
|||
import { GameFetcher } from "./GameFetcher.ts";
|
||||
import { DEFAULT_ENV, Env } from "./env.ts";
|
||||
|
||||
export type ListMethod = "latest" | "all" | "auto";
|
||||
|
||||
export type Opts = {
|
||||
profilePath: string;
|
||||
exporter: string;
|
||||
|
|
@ -17,6 +19,7 @@ export type Opts = {
|
|||
monitor: boolean;
|
||||
withSummary: boolean;
|
||||
skipMode?: string;
|
||||
listMethod: string;
|
||||
cache?: Cache;
|
||||
stateBackend?: StateBackend;
|
||||
env: Env;
|
||||
|
|
@ -28,6 +31,7 @@ export const DEFAULT_OPTS: Opts = {
|
|||
noProgress: false,
|
||||
monitor: false,
|
||||
withSummary: false,
|
||||
listMethod: "auto",
|
||||
env: DEFAULT_ENV,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export enum Queries {
|
|||
RegularBattleHistoriesQuery = "3baef04b095ad8975ea679d722bc17de",
|
||||
BankaraBattleHistoriesQuery = "0438ea6978ae8bd77c5d1250f4f84803",
|
||||
XBattleHistoriesQuery = "6796e3cd5dc3ebd51864dc709d899fc5",
|
||||
EventBattleHistoriesQuery = "9744fcf676441873c7c8a51285b6aa4d",
|
||||
PrivateBattleHistoriesQuery = "8e5ae78b194264a6c230e262d069bd28",
|
||||
VsHistoryDetailQuery = "9ee0099fbe3d8db2a838a75cf42856dd",
|
||||
CoopHistoryQuery = "91b917becd2fa415890f5b47e15ffb15",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ export type VarsMap = {
|
|||
[Queries.RegularBattleHistoriesQuery]: [];
|
||||
[Queries.BankaraBattleHistoriesQuery]: [];
|
||||
[Queries.XBattleHistoriesQuery]: [];
|
||||
[Queries.EventBattleHistoriesQuery]: [];
|
||||
[Queries.PrivateBattleHistoriesQuery]: [];
|
||||
[Queries.VsHistoryDetailQuery]: [{
|
||||
vsResultId: string;
|
||||
|
|
@ -415,6 +416,11 @@ export type RespMap = {
|
|||
};
|
||||
[Queries.BankaraBattleHistoriesQuery]: BankaraBattleHistories;
|
||||
[Queries.XBattleHistoriesQuery]: XBattleHistories;
|
||||
[Queries.EventBattleHistoriesQuery]: {
|
||||
eventBattleHistories: {
|
||||
historyGroups: HistoryGroups<BattleListNode>;
|
||||
};
|
||||
};
|
||||
[Queries.PrivateBattleHistoriesQuery]: {
|
||||
privateBattleHistories: {
|
||||
historyGroups: HistoryGroups<BattleListNode>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue