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",
|
"name": "@xo-cash/utils",
|
||||||
"version": "0.0.1-development.1",
|
"version": "0.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@xo-cash/utils",
|
"name": "@xo-cash/utils",
|
||||||
"version": "0.0.1-development.1",
|
"version": "0.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bitauth/libauth": "^3.1.0-next.8",
|
"@bitauth/libauth": "^3.1.0-next.8",
|
||||||
"@xo-cash/types": "0.0.1-development.1"
|
"@xo-cash/types": "0.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@generalprotocols/eslint-config": "^1.0.1",
|
"@generalprotocols/eslint-config": "^1.0.1",
|
||||||
@@ -32,20 +32,28 @@
|
|||||||
},
|
},
|
||||||
"../types": {
|
"../types": {
|
||||||
"name": "@xo-cash/types",
|
"name": "@xo-cash/types",
|
||||||
"version": "0.0.1-development.1",
|
"version": "0.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bitauth/libauth": "^3.1.0-next.8"
|
"@bitauth/libauth": "^3.1.0-next.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@generalprotocols/eslint-config": "^1.0.1",
|
"@chalp/eslint-airbnb": "^1.3.0",
|
||||||
"@types/node": "^20.10.0",
|
"@generalprotocols/cspell-dictionary": "^1.0.1",
|
||||||
"del-cli": "^5.0.0",
|
"@stylistic/eslint-plugin": "^5.7.0",
|
||||||
"eslint": "^8.57.1",
|
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"@typescript-eslint/parser": "^8.53.1",
|
||||||
"eslint-plugin-prettier": "^5.5.4",
|
"@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",
|
"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": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ try {
|
|||||||
const schemaPath = join(rootDir, 'src/parser/xo-template.schema.json');
|
const schemaPath = join(rootDir, 'src/parser/xo-template.schema.json');
|
||||||
const validatorPath = join(rootDir, 'src/parser/ajv/validate-xo-template.js');
|
const validatorPath = join(rootDir, 'src/parser/ajv/validate-xo-template.js');
|
||||||
const tsconfigPath = join(rootDir, 'tsconfig.json');
|
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)
|
// 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(
|
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 },
|
{ encoding: 'utf8', cwd: rootDir },
|
||||||
);
|
);
|
||||||
writeFileSync(schemaPath, schemaContent, 'utf8');
|
writeFileSync(schemaPath, schemaContent, 'utf8');
|
||||||
|
|||||||
Reference in New Issue
Block a user