Skip to content

Commit 56f7391

Browse files
committed
fix: fix import and multi-handler generation
1 parent a0c92eb commit 56f7391

File tree

3 files changed

+493
-350
lines changed

3 files changed

+493
-350
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@
4141
"*.{js,jsx,ts,tsx}": "yarn eslint src --cache --fix"
4242
},
4343
"devDependencies": {
44-
"@commitlint/cli": "^19.5.0",
45-
"@commitlint/config-conventional": "^19.5.0",
46-
"@openapi-typescript-infra/coconfig": "^4.6.0",
47-
"@semantic-release/github": "^11.0.0",
44+
"@commitlint/cli": "^19.8.0",
45+
"@commitlint/config-conventional": "^19.8.0",
46+
"@openapi-typescript-infra/coconfig": "^4.7.1",
47+
"@semantic-release/github": "^11.0.1",
4848
"@types/configstore": "^6.0.2",
4949
"@types/handlebars-helpers": "^0.5.6",
5050
"@types/minimist": "^1.2.5",
51-
"@types/node": "^22.8.4",
51+
"@types/node": "^22.14.1",
5252
"@types/parse-git-config": "^3.0.4",
5353
"@types/pascalcase": "^1.0.3",
5454
"@typescript-eslint/eslint-plugin": "^6.21.0",
5555
"@typescript-eslint/parser": "^6.21.0",
56-
"coconfig": "^1.6.1",
56+
"coconfig": "^2.0.0",
5757
"eslint": "^8.57.1",
5858
"eslint-config-prettier": "^9.1.0",
59-
"eslint-import-resolver-typescript": "^3.6.3",
59+
"eslint-import-resolver-typescript": "^4.3.2",
6060
"eslint-plugin-import": "^2.31.0",
6161
"pinst": "^3.0.0",
62-
"prettier": "^3.3.3",
63-
"typescript": "^5.6.3"
62+
"prettier": "^3.5.3",
63+
"typescript": "^5.8.3"
6464
},
6565
"packageManager": "[email protected]",
6666
"dependencies": {
67-
"@readme/openapi-parser": "^2.6.0",
67+
"@readme/openapi-parser": "^2.7.0",
6868
"boxen": "^8.0.1",
6969
"configstore": "^7.0.0",
7070
"handlebars-helpers": "^0.10.0",

src/handlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function writeMissing(
2222
mkdirpSync(path.dirname(handlerPath));
2323
fs.writeFileSync(
2424
handlerPath,
25-
`import type { ${apiName} } from '@/types';
25+
`import type { ${apiName} } from '#src/types/index.js';
2626
2727
${Object.keys(methods)
2828
.filter((f) => !['parameters'].includes(f))
@@ -33,7 +33,7 @@ ${Object.keys(methods)
3333
res.sendStatus(501);
3434
};
3535
`,
36-
)}`,
36+
).join('\n')}`,
3737
);
3838
}
3939
}

0 commit comments

Comments
 (0)