Add reproducible JSON server configs, Zod validator, and admin JSON import UI#7
Open
Spbd1 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
configs/:lowineq-stable.json,lowineq-uncertain.json,highineq-stable.json,highineq-uncertain.json, andpilot-8servers.json, each containing the requested top-level fields, defaults and arandomSeed.packages/shared/src/serverConfig.tsto parse/validate configs and map them to engine override keys viaserverConfigToEngineOverrides.@parcel-society/shared(packages/shared/src/index.ts) and addedzodtopackages/shared/package.jsondependencies.apps/web/app/admin/servers/new/ConfigJsonForm.tsxto paste or upload JSON, run local validation viasafeParseServerConfig, show validation messages, and enable create actions only when valid; wired the form into the admin create-server page and addedcreateServerFromConfigserver action to persist the server and optionally generate the configured map (apps/web/app/admin/servers/new/actions.ts,apps/web/app/admin/servers/new/page.tsx).Testing
configs/and asserted the expected keys and default values, which passed.git diff --check/ local whitespace checks, which passed.pnpm --filter @parcel-society/shared typecheck && pnpm --filter @parcel-society/web typecheck, but TypeScript checks could not complete becausenode_modulesare missing and the package install is blocked by registry access (TypeScript errors due to unresolvedzod).pnpm --filter @parcel-society/web lint, but ESLint could not run because dependencies are unavailable and@eslint/jscould not be resolved.Codex Task