diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 diff --git a/Makefile b/Makefile index 44c1e400..f0a640fb 100755 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ gen-schema-single: python3 -c "import json; f=open('schemas/${OUT}', 'r'); j=json.load(f); f.close(); f=open('schemas/${OUT}', 'w'); json.dump(j, f, separators=(',', ':'));" gen-schema: - bun --bun tsc + cd schemas && bun --bun tsc make IN=config/config.ts \ CLASS=Config \ OUT=config.schema.json \ @@ -120,6 +120,10 @@ gen-schema: CLASS=DockerRoutes \ OUT=docker_routes.schema.json \ gen-schema-single + cd .. + +publish-schema: + cd schemas && bun publish && cd .. update-schema-generator: pnpm up -g typescript-json-schema diff --git a/bun.lock b/schemas/bun.lock similarity index 100% rename from bun.lock rename to schemas/bun.lock diff --git a/package.json b/schemas/package.json similarity index 82% rename from package.json rename to schemas/package.json index 79ad1490..5a34c4f6 100644 --- a/package.json +++ b/schemas/package.json @@ -13,12 +13,12 @@ "LICENSE" ], "type": "module", - "main": "./schemas/index.ts", + "main": "./index.ts", "exports": { ".": { - "types": "./schemas/index.d.ts", - "import": "./schemas/index.ts", - "require": "./schemas/index.js" + "types": "./index.d.ts", + "import": "./index.ts", + "require": "./index.js" } }, "devDependencies": { diff --git a/tsconfig.json b/schemas/tsconfig.json similarity index 93% rename from tsconfig.json rename to schemas/tsconfig.json index d355b747..3a87871c 100644 --- a/tsconfig.json +++ b/schemas/tsconfig.json @@ -12,5 +12,5 @@ "resolveJsonModule": true, "declaration": true }, - "include": ["schemas"] + "include": ["."] }