-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1600 from hey-api/refactor/client-bundle-index
fix: bundle clients from compiled index file
- Loading branch information
Showing
61 changed files
with
2,046 additions
and
4,735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@hey-api/client-axios': patch | ||
'@hey-api/client-fetch': patch | ||
'@hey-api/client-nuxt': patch | ||
'@hey-api/openapi-ts': patch | ||
--- | ||
|
||
fix: bundle clients from compiled index file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import path from 'node:path'; | ||
|
||
import { defineConfig } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
|
||
const files = ['index.d.ts', 'index.d.cts']; | ||
|
||
export default files.map((file) => | ||
defineConfig({ | ||
external: (id) => { | ||
const normalizedId = id.split(path.sep).join('/'); | ||
if (normalizedId === '@hey-api/client-core') { | ||
return false; | ||
} | ||
return ( | ||
!normalizedId.startsWith('/') && !/^[a-zA-Z]:\//.test(normalizedId) | ||
); | ||
}, | ||
input: `./dist/${file}`, | ||
output: { | ||
file: `./dist/${file}`, | ||
format: 'es', | ||
}, | ||
plugins: [ | ||
dts({ | ||
respectExternal: true, | ||
}), | ||
], | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.