* feat: local engine management * chore: move remote engine into engine page instead extension page * chore: set default engine from extension * chore: update endpoint update engine * chore: update event onEngineUpdate * chore: filter out engine download * chore: update version env * chore: select default engine variant base on user device specs * chore: symlink engine variants * chore: rolldown.config in mjs format * chore: binary codesign * fix: download state in footer bar and variant status * chore: update yarn.lock * fix: rimraf failure * fix: setup-node@v3 for built-in cache * fix: cov pipeline * fix: build syntax * chore: fix build step * fix: create engines folder on launch * chore: update ui delete engine variant with modal confirmation * chore: fix linter * chore: add installing progress for Local Engine download * chore: wording --------- Co-authored-by: Louis <louis@jan.ai>
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
import { defineConfig } from 'rolldown'
|
|
import replace from '@rollup/plugin-replace'
|
|
import pkgJson from './package.json' with { type: 'json' }
|
|
|
|
export default defineConfig([
|
|
{
|
|
input: 'src/index.ts',
|
|
output: {
|
|
format: 'esm',
|
|
file: 'dist/index.js',
|
|
},
|
|
plugins: [
|
|
replace({
|
|
NODE: JSON.stringify(`${pkgJson.name}/${pkgJson.node}`),
|
|
API_URL: JSON.stringify('http://127.0.0.1:39291'),
|
|
SOCKET_URL: JSON.stringify('ws://127.0.0.1:39291'),
|
|
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.42'),
|
|
}),
|
|
],
|
|
},
|
|
{
|
|
input: 'src/node/index.ts',
|
|
external: ['@janhq/core/node'],
|
|
output: {
|
|
format: 'cjs',
|
|
file: 'dist/node/index.cjs.js',
|
|
},
|
|
plugins: [
|
|
replace({
|
|
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.42'),
|
|
}),
|
|
],
|
|
},
|
|
{
|
|
input: 'src/node/cpuInfo.ts',
|
|
output: {
|
|
format: 'cjs',
|
|
file: 'dist/node/cpuInfo.js',
|
|
},
|
|
external: ['cpu-instructions'],
|
|
resolve: {
|
|
extensions: ['.ts', '.js', '.svg'],
|
|
},
|
|
},
|
|
])
|