From 1a478089343811e2d4345fc6df35cf913808e673 Mon Sep 17 00:00:00 2001 From: kiok46 Date: Fri, 23 Jan 2026 16:01:42 +0530 Subject: [PATCH] Fix: Issue with generate script due to type package changes --- package-lock.json | 30 +++++++++++++++++++----------- scripts/generate-schema.js | 6 ++++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index eeebc47..6c47ef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@xo-cash/utils", - "version": "0.0.1-development.1", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@xo-cash/utils", - "version": "0.0.1-development.1", + "version": "0.0.1", "license": "MIT", "dependencies": { "@bitauth/libauth": "^3.1.0-next.8", - "@xo-cash/types": "0.0.1-development.1" + "@xo-cash/types": "0.0.1" }, "devDependencies": { "@generalprotocols/eslint-config": "^1.0.1", @@ -32,20 +32,28 @@ }, "../types": { "name": "@xo-cash/types", - "version": "0.0.1-development.1", + "version": "0.0.1", "license": "MIT", "dependencies": { "@bitauth/libauth": "^3.1.0-next.8" }, "devDependencies": { - "@generalprotocols/eslint-config": "^1.0.1", - "@types/node": "^20.10.0", - "del-cli": "^5.0.0", - "eslint": "^8.57.1", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-prettier": "^5.5.4", + "@chalp/eslint-airbnb": "^1.3.0", + "@generalprotocols/cspell-dictionary": "^1.0.1", + "@stylistic/eslint-plugin": "^5.7.0", + "@typescript-eslint/eslint-plugin": "^8.53.1", + "@typescript-eslint/parser": "^8.53.1", + "@vitest/coverage-v8": "^4.0.17", + "@xo-cash/eslint-config": "1.0.0", + "cspell": "^9.6.0", + "eslint": "^9.39.2", "prettier": "^3.6.2", - "typescript": "^5.3.2" + "tsdown": "^0.20.0-beta.4", + "typedoc": "^0.28.16", + "typedoc-plugin-coverage": "^4.0.2", + "typescript": "^5.3.2", + "typescript-eslint": "^8.53.1", + "vitest": "^4.0.17" }, "engines": { "node": ">=18.0.0" diff --git a/scripts/generate-schema.js b/scripts/generate-schema.js index 1391a6d..6efa641 100644 --- a/scripts/generate-schema.js +++ b/scripts/generate-schema.js @@ -24,11 +24,13 @@ try { const schemaPath = join(rootDir, 'src/parser/xo-template.schema.json'); const validatorPath = join(rootDir, 'src/parser/ajv/validate-xo-template.js'); const tsconfigPath = join(rootDir, 'tsconfig.json'); - const templatePath = join(rootDir, 'node_modules/@xo-cash/types/build/template.d.ts'); + // Point directly to the dist file - the type is exported at the end via barrel export + const templatePath = join(rootDir, 'node_modules/@xo-cash/types/dist/index.d.mts'); // Generate schema JSON (write to file directly instead of shell redirection) + // Using --no-type-check to skip type checking and --expose all to find types exported via barrel exports const schemaContent = execSync( - `ts-json-schema-generator --no-ref-encode --tsconfig "${tsconfigPath}" --path "${templatePath}" --type "XOTemplate"`, + `ts-json-schema-generator --no-ref-encode --no-type-check --expose all --tsconfig "${tsconfigPath}" --path "${templatePath}" --type "XOTemplate"`, { encoding: 'utf8', cwd: rootDir }, ); writeFileSync(schemaPath, schemaContent, 'utf8');