Merge branch 'fix/generate-script' into 'development'
Fix: Issue with generate script due to type package changes See merge request GeneralProtocols/xo/utils!3
This commit is contained in:
30
package-lock.json
generated
30
package-lock.json
generated
@@ -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"
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user