diff --git a/packages/engine/paima-standalone/src/utils/input.ts b/packages/engine/paima-standalone/src/utils/input.ts index 99c670107..eedb0984f 100644 --- a/packages/engine/paima-standalone/src/utils/input.ts +++ b/packages/engine/paima-standalone/src/utils/input.ts @@ -1,6 +1,6 @@ import { FunnelFactory } from '@paima/funnel'; import paimaRuntime, { registerDocs, registerValidationErrorHandler } from '@paima/runtime'; -import { ENV, GlobalConfig, doLog } from '@paima/utils'; +import { ENV, GlobalConfig, doLog, BaseConfigWithoutDefaults } from '@paima/utils'; import { exec } from 'child_process'; import { createInterface } from 'readline'; import { gameSM } from '../sm.js'; @@ -64,6 +64,10 @@ export const argumentRouter = async (): Promise => { batcherCommand(); break; + case 'gen-config-json-schema': + genConfigSchemaCommand(); + break; + default: helpCommand(); } @@ -167,6 +171,7 @@ export const helpCommand = (): void => { doLog(` help Shows list of commands currently available.`); doLog(` version Shows the version of used paima-engine.`); doLog(` batcher Saves the bundled batcher project to your local filesystem.`); + doLog(` gen-config-json-schema Prints the JSON Schema for the engine configuration.`); }; // Batcher command logic @@ -174,6 +179,10 @@ export const batcherCommand = (): void => { prepareBatcher(); }; +export const configJsonSchema = (): void => { + genConfigSchemaCommand(); +}; + // Build middleware for specific .env file and launch webserver: const startWebServer = (): Promise => new Promise((resolve, reject) => { @@ -249,3 +258,7 @@ const pickGameTemplate = async (templateArg: string): Promise