diff --git a/package.json b/package.json index b559fcbca29..a586879d578 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test:watch": "vitest watch --coverage --no-isolate", "test:silent": "vitest run --silent --no-isolate", "test:create": "node scripts/create-test/create-test.js", - "eggMove:parse": "node scripts/parse-egg-moves/main.js", + "eggMoves:parse": "node scripts/parse-egg-moves/main.js", "typecheck": "tsc --noEmit", "eslint": "eslint --fix .", "eslint-ci": "eslint .", diff --git a/scripts/parse-egg-moves/help-message.js b/scripts/parse-egg-moves/help-message.js index 57d28c36132..6b5f1965a2b 100644 --- a/scripts/parse-egg-moves/help-message.js +++ b/scripts/parse-egg-moves/help-message.js @@ -2,7 +2,7 @@ import chalk from "chalk"; export function showHelpText() { console.log(` -Usage: ${chalk.cyan("pnpm eggMove:parse [options]")} +Usage: ${chalk.cyan("pnpm eggMoves:parse [options]")} If given no options, assumes ${chalk.blue("\`--interactive\`")}. If given only a file path, assumes ${chalk.blue("\`--file\`")}. diff --git a/scripts/parse-egg-moves/main.js b/scripts/parse-egg-moves/main.js index 1d0009a6fe9..1ab0e30bda0 100644 --- a/scripts/parse-egg-moves/main.js +++ b/scripts/parse-egg-moves/main.js @@ -2,7 +2,7 @@ * This script accepts a CSV value or file path as input, parses the egg moves, * and writes the output to a TypeScript file. * It can be run interactively or with command line arguments. - * Usage: `pnpm eggMove:parse` + * Usage: `pnpm eggMoves:parse` */ import fs from "node:fs"; @@ -13,7 +13,7 @@ import { showHelpText } from "./help-message.js"; import { runInteractive } from "./interactive.js"; import { parseEggMoves } from "./parse.js"; -const version = "0.0.0"; // Replace with actual version if needed +const version = "1.0.0"; // Get the directory name of the current module file const __filename = fileURLToPath(import.meta.url); @@ -24,7 +24,7 @@ const templatePath = path.join(__dirname, "egg-move-template.ts"); const eggMoveTargetPath = path.join(projectRoot, "src/data/balance/egg-moves.ts"); /** - * Runs the interactive eggMove:parse CLI. + * Runs the interactive eggMoves:parse CLI. * @returns {Promise} */ async function start() { @@ -41,7 +41,6 @@ async function start() { return; } - /** @type {string} */ let csv = ""; const inputType = await parseArguments(); if (process.exitCode) { @@ -93,7 +92,7 @@ async function parseArguments() { default: // If no arguments are found, check if it's a file path if (fs.existsSync(arg)) { - console.log(chalk.green(`Using file path: ${chalk.blue(arg)}`)); + console.log(chalk.green(`Using file path from stdin: ${chalk.blue(arg)}`)); return { type: "File", value: arg }; } badArgs(); diff --git a/scripts/parse-egg-moves/parse.js b/scripts/parse-egg-moves/parse.js index b6d41965bdc..209a350df42 100644 --- a/scripts/parse-egg-moves/parse.js +++ b/scripts/parse-egg-moves/parse.js @@ -44,7 +44,8 @@ export function parseEggMoves(csv) { } } - return output + "} satisfies Partial>;"; + // NB: We omit the semicolon as it is contained in the template string itself + return output + "} satisfies Partial>"; } /**