Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: new XIVAPI CLI query tool #41

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/PatchUpdateChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ in the console as the scripts are run.
It is recommended that you choose at least the 'Alert' level to ensure you are notified
of any problems that require manual intervetion before merging the file changes.

If you run into collisions or other data issues that require resolution before merge,
you can use the XIVAPI CLI helper utility to request and filter XIVAPI data --
and see it as JSON console output -- by running `npm run query`.
Use `npm run query -- -h` for info on how to use the utility.

#### effect_id data

As new status effects are added to the game, those names may conflict with existing names.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"find-translations": "npm run util -- findTranslations",
"translate-timeline": "npm run util -- translateTimeline",
"generate": "npm run util -- generate",
"query": "npm run util -- query",
"process-triggers": "node --loader=ts-node/esm util/process_triggers_folder.ts",
"generate-log-guide": "node --loader=ts-node/esm util/gen_log_guide.ts",
"validate-versions": "node --loader=ts-node/esm util/validate_versions.ts",
Expand Down
4 changes: 4 additions & 0 deletions util/console_logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ export class ConsoleLogger {
console.log(`ERROR: ${msg} Exiting...`);
process.exit(1);
}

printNoHeader(msg: string): void {
console.log(`${msg}`);
}
}
2 changes: 2 additions & 0 deletions util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import inquirerFuzzyPath, { FuzzyPathQuestionOptions } from 'inquirer-fuzzy-path

import { registerFindMissingTranslations } from './find_missing_translations_action';
import { registerGenerateDataFiles } from './generate_data_files';
import { registerQueryXivApi } from './query_xivapi';
import { registerTranslateTimeline } from './translate_timeline';

declare module 'inquirer' {
Expand Down Expand Up @@ -34,6 +35,7 @@ const subparsers = argumentParser.addSubparsers({
registerTranslateTimeline(actionChoices, subparsers);
registerGenerateDataFiles(actionChoices, subparsers);
registerFindMissingTranslations(actionChoices, subparsers);
registerQueryXivApi(actionChoices, subparsers);

inquirer.registerPrompt('fuzzypath', inquirerFuzzyPath);

Expand Down
Loading