fix: fix imports
This commit is contained in:
parent
bd9569992b
commit
4f49599527
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// Core types
|
// Core types
|
||||||
export type { IGameContext } from './core/game';
|
export type { IGameContext } from './core/game';
|
||||||
export { createGameContext } from './core/game';
|
export { createGameContext, createGameCommandRegistry } from './core/game';
|
||||||
|
|
||||||
export type { Part } from './core/part';
|
export type { Part } from './core/part';
|
||||||
export { flip, flipTo, roll } from './core/part';
|
export { flip, flipTo, roll } from './core/part';
|
||||||
|
|
@ -21,7 +21,7 @@ export type { CommandRunner, CommandRunnerHandler, CommandRunnerContext, PromptE
|
||||||
export { createCommandRegistry, registerCommand, unregisterCommand, hasCommand, getCommand, runCommand, runCommandParsed, createCommandRunnerContext, type CommandRegistry, type CommandRunnerContextExport } from './utils/command';
|
export { createCommandRegistry, registerCommand, unregisterCommand, hasCommand, getCommand, runCommand, runCommandParsed, createCommandRunnerContext, type CommandRegistry, type CommandRunnerContextExport } from './utils/command';
|
||||||
|
|
||||||
export type { Entity } from './utils/entity';
|
export type { Entity } from './utils/entity';
|
||||||
export { createEntityCollection } from './utils/entity';
|
export { createEntityCollection, entity } from './utils/entity';
|
||||||
|
|
||||||
export type { RNG } from './utils/rng';
|
export type { RNG } from './utils/rng';
|
||||||
export { createRNG, Mulberry32RNG } from './utils/rng';
|
export { createRNG, Mulberry32RNG } from './utils/rng';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import {createGameCommandRegistry} from '../core/game';
|
import {createGameCommandRegistry} from '../';
|
||||||
import type { Part } from '../core/part';
|
import type { Part } from '../';
|
||||||
import {Entity, entity} from "../utils/entity";
|
import {Entity, entity} from "../";
|
||||||
import {Region} from "../core/region";
|
import {Region} from "../";
|
||||||
|
|
||||||
const BOARD_SIZE = 3;
|
const BOARD_SIZE = 3;
|
||||||
const MAX_TURNS = BOARD_SIZE * BOARD_SIZE;
|
const MAX_TURNS = BOARD_SIZE * BOARD_SIZE;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { type ParseError } from 'inline-schema';
|
import { type ParseError } from 'inline-schema';
|
||||||
import type { Command, CommandSchema } from './types.js';
|
import type { Command, CommandSchema } from './types';
|
||||||
|
|
||||||
function validateCommandCore(command: Command, schema: CommandSchema): string[] {
|
function validateCommandCore(command: Command, schema: CommandSchema): string[] {
|
||||||
const errors: string[] = [];
|
const errors: string[] = [];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { Command, CommandSchema } from './types.js';
|
import type { Command, CommandSchema } from './types';
|
||||||
import { applyCommandSchema } from './command-validate.js';
|
import { applyCommandSchema } from './command-validate';
|
||||||
|
|
||||||
export function parseCommand(input: string): Command;
|
export function parseCommand(input: string): Command;
|
||||||
export function parseCommand(input: string, schema: CommandSchema): Command;
|
export function parseCommand(input: string, schema: CommandSchema): Command;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import type { Command, CommandSchema } from './types.js';
|
import type { Command, CommandSchema } from './types';
|
||||||
import type {CommandResult, CommandRunner, CommandRunnerContext, PromptEvent} from './command-runner.js';
|
import type {CommandResult, CommandRunner, CommandRunnerContext, PromptEvent} from './command-runner';
|
||||||
import { parseCommand } from './command-parse.js';
|
import { parseCommand } from './command-parse';
|
||||||
import { applyCommandSchema } from './command-validate.js';
|
import { applyCommandSchema } from './command-validate';
|
||||||
import { parseCommandSchema } from './schema-parse.js';
|
import { parseCommandSchema } from './schema-parse';
|
||||||
import {AsyncQueue} from "../async-queue";
|
import {AsyncQueue} from "../async-queue";
|
||||||
|
|
||||||
export type CommandRegistry<TContext> = Map<string, CommandRunner<TContext, unknown>>;
|
export type CommandRegistry<TContext> = Map<string, CommandRunner<TContext, unknown>>;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Command, CommandSchema } from './types.js';
|
import type { Command, CommandSchema } from './types';
|
||||||
|
|
||||||
export type PromptEvent = {
|
export type PromptEvent = {
|
||||||
schema: CommandSchema;
|
schema: CommandSchema;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Command, CommandSchema } from './types.js';
|
import type { Command, CommandSchema } from './types';
|
||||||
import { parseCommand } from './command-parse.js';
|
import { parseCommand } from './command-parse';
|
||||||
import { parseCommandSchema } from './schema-parse.js';
|
import { parseCommandSchema } from './schema-parse';
|
||||||
import { applyCommandSchema as applyCommandSchemaCore } from './command-apply.js';
|
import { applyCommandSchema as applyCommandSchemaCore } from './command-apply';
|
||||||
|
|
||||||
export { applyCommandSchemaCore as applyCommandSchema };
|
export { applyCommandSchemaCore as applyCommandSchema };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineSchema, type ParsedSchema } from 'inline-schema';
|
import { defineSchema, type ParsedSchema } from 'inline-schema';
|
||||||
import type { CommandSchema, CommandParamSchema, CommandOptionSchema, CommandFlagSchema, ParsedOptionResult } from './types.js';
|
import type { CommandSchema, ParsedOptionResult } from './types';
|
||||||
|
|
||||||
export function parseCommandSchema(schemaStr: string, name?: string): CommandSchema {
|
export function parseCommandSchema(schemaStr: string, name?: string): CommandSchema {
|
||||||
const schema: CommandSchema = {
|
const schema: CommandSchema = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue