feat: add TypeBox/Ajv config schema package to the workspace (E00-S04-T01)

Adds packages/config (@personal-blog/config) — the EPPP configuration
service foundation. The package defines the configuration schema with
TypeBox (configSchema: host, port, databaseUrl, sessionSecret — the
validated config fields, golden-tuple pins @sinclair/typebox@0.34.52 and
ajv@8.20.0) and compiles it with Ajv (validateConfig). The environment
adapter (T04), field-specific startup errors (T02) and secret redaction
(T03) build on this boundary in later tasks; nothing reads process.env yet.

Wiring for the new workspace package: lockfile importer + resolved
typebox/ajv tree, apps/server/Dockerfile manifest copy (frozen in-image
install must match the lockfile importers), config-schema CI job, package
set fixtures (workspace-layout, workspace-config, strict-tsconfig,
typescript-pin), probe-file gitignore entry.
This commit is contained in:
implementer
2026-08-30 02:29:52 +00:00
parent 6a65d4c789
commit bcea489391
13 changed files with 229 additions and 5 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..
const read = (relPath) => readFileSync(path.join(REPO_ROOT, relPath), 'utf8');
/** The workspace packages that must compile under the strict base config. */
const WORKSPACE_PACKAGES = ['apps/server', 'packages/core', 'packages/database-postgres', 'extensions/example'];
const WORKSPACE_PACKAGES = ['apps/server', 'packages/core', 'packages/config', 'packages/database-postgres', 'extensions/example'];
/** The strict-family flags the committed base config must set. */
const STRICT_FAMILY_FLAGS = [
+1 -1
View File
@@ -33,7 +33,7 @@ const read = (relPath) => readFileSync(path.join(REPO_ROOT, relPath), 'utf8');
const PINNED_TYPESCRIPT = '6.0.3';
/** Every workspace package that must resolve the pinned TypeScript version. */
const WORKSPACE_PACKAGES = ['apps/server', 'packages/core', 'packages/database-postgres', 'extensions/example'];
const WORKSPACE_PACKAGES = ['apps/server', 'packages/core', 'packages/config', 'packages/database-postgres', 'extensions/example'];
// ---------------------------------------------------------------------------
// Tests
+1 -1
View File
@@ -28,7 +28,7 @@ const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..
const read = (relPath) => readFileSync(path.join(REPO_ROOT, relPath), 'utf8');
const WORKSPACE_GROUPS = ['apps/*', 'packages/*', 'extensions/*'];
const WORKSPACE_PACKAGES = ['.', 'apps/server', 'packages/core', 'packages/database-postgres', 'extensions/example'];
const WORKSPACE_PACKAGES = ['.', 'apps/server', 'packages/core', 'packages/config', 'packages/database-postgres', 'extensions/example'];
const PINNED_PNPM = '11.23.0';
// ---------------------------------------------------------------------------
+1
View File
@@ -38,6 +38,7 @@ const TOP_LEVEL_GROUPS = ['apps', 'packages', 'extensions'];
const EXPECTED_PACKAGES = {
'@personal-blog/server': 'apps/server',
'@personal-blog/core': 'packages/core',
'@personal-blog/config': 'packages/config',
'@personal-blog/database-postgres': 'packages/database-postgres',
'@personal-blog/example-extension': 'extensions/example',
};