-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix types in source_manager and llm_manager packages
We were generating types wrongly and when using these packages types were not recognized by the LSP (Language Server Protocol)
- Loading branch information
1 parent
1b22670
commit dca0275
Showing
10 changed files
with
79 additions
and
43 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,6 @@ | ||
--- | ||
"@latitude-data/source-manager": minor | ||
"@latitude-data/llm-manager": minor | ||
--- | ||
|
||
Fix types in Source Manager and LLManager |
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 |
---|---|---|
@@ -1,25 +1,43 @@ | ||
import * as path from 'path' | ||
import * as url from 'url' | ||
import typescript from '@rollup/plugin-typescript' | ||
import { dts } from 'rollup-plugin-dts' | ||
import alias from '@rollup/plugin-alias' | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/index.js', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ | ||
exclude: ['**/__tests__', '**/*.test.ts'], | ||
}) | ||
], | ||
external: [ | ||
'fs', | ||
'path', | ||
'yaml', | ||
'openai', | ||
'@latitude-data/source-manager', | ||
'@latitude-data/sql-compiler', | ||
'dotenv/config', | ||
], | ||
const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) | ||
const aliasEntries = { | ||
entries: [{ find: '$', replacement: path.resolve(__dirname, 'src') }], | ||
} | ||
|
||
/** @type {import('rollup').RollupOptions[]} */ | ||
export default [ | ||
{ | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/index.js', | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ | ||
noEmit: true, | ||
tsconfig: './tsconfig.json', | ||
exclude: ['**/__tests__', '**/*.test.ts'], | ||
}), | ||
], | ||
external: [ | ||
'fs', | ||
'path', | ||
'yaml', | ||
'openai', | ||
'@latitude-data/source-manager', | ||
'@latitude-data/sql-compiler', | ||
'dotenv/config', | ||
], | ||
}, | ||
{ | ||
input: 'src/index.ts', | ||
output: [{ file: 'dist/index.d.ts', format: 'es' }], | ||
plugins: [alias(aliasEntries), dts()], | ||
}, | ||
] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.