* fix: update logic to pull llama-cpp engine * chore: bump cortex version * fix: chat macos * chore: bump llama.cpp * chore: download windows * chore: download linux * chore: bump cortex to 1.0.13-rc6 * fix: stop cortex before exit * chore: bum llama.cpp engine to b5350 --------- Co-authored-by: vansangpfiev <sang@jan.ai>
45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
import { defineConfig } from 'rolldown'
|
|
import packageJson from './package.json' with { type: 'json' }
|
|
import defaultSettingJson from './resources/default_settings.json' with { type: 'json' }
|
|
|
|
export default defineConfig([
|
|
{
|
|
input: 'src/index.ts',
|
|
output: {
|
|
format: 'esm',
|
|
file: 'dist/index.js',
|
|
},
|
|
platform: 'browser',
|
|
define: {
|
|
NODE: JSON.stringify(`${packageJson.name}/${packageJson.node}`),
|
|
SETTINGS: JSON.stringify(defaultSettingJson),
|
|
CORTEX_API_URL: JSON.stringify(
|
|
`http://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}`
|
|
),
|
|
CORTEX_SOCKET_URL: JSON.stringify(
|
|
`ws://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}`
|
|
),
|
|
CORTEX_ENGINE_VERSION: JSON.stringify('b5350'),
|
|
},
|
|
},
|
|
{
|
|
input: 'src/node/index.ts',
|
|
external: ['@janhq/core/node'],
|
|
output: {
|
|
format: 'cjs',
|
|
file: 'dist/node/index.cjs.js',
|
|
sourcemap: false,
|
|
inlineDynamicImports: true,
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.ts', '.json'],
|
|
},
|
|
define: {
|
|
CORTEX_API_URL: JSON.stringify(
|
|
`http://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}`
|
|
),
|
|
},
|
|
platform: 'node',
|
|
},
|
|
])
|