-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 #4373 from janhq/chore/refactor-core-and-server-pa…
…ckages chore: refactor core and server packages
- Loading branch information
Showing
17 changed files
with
469 additions
and
1,998 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 |
---|---|---|
|
@@ -49,4 +49,5 @@ test_results.html | |
electron/shared/** | ||
|
||
# docs | ||
docs/yarn.lock | ||
docs/yarn.lock | ||
electron/.version.bak |
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,30 +1,30 @@ | ||
{ | ||
"name": "@janhq/core", | ||
"version": "0.1.10", | ||
"description": "Jan app core lib", | ||
"description": "Core library for the Jan AI application framework", | ||
"keywords": [ | ||
"jan", | ||
"core" | ||
], | ||
"homepage": "https://jan.ai", | ||
"license": "AGPL-3.0", | ||
"browser": "dist/core.es5.js", | ||
"main": "dist/core.es5.js", | ||
"module": "dist/index.cjs.js", | ||
"browser": "dist/index.js", | ||
"main": "dist/index.js", | ||
"module": "dist/node/index.cjs.js", | ||
"typings": "dist/types/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"types" | ||
], | ||
"author": "Jan <[email protected]>", | ||
"exports": { | ||
".": "./dist/core.es5.js", | ||
".": "./dist/index.js", | ||
"./node": "./dist/node/index.cjs.js" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
".": [ | ||
"./dist/core.es5.js.map", | ||
"./dist/index.js.map", | ||
"./dist/types/index.d.ts" | ||
], | ||
"node": [ | ||
|
@@ -37,14 +37,13 @@ | |
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", | ||
"test": "jest", | ||
"prebuild": "rimraf dist", | ||
"build": "rollup -c rollup.config.ts" | ||
"build": "tsc -p . && rolldown -c rolldown.config.mjs" | ||
}, | ||
"devDependencies": { | ||
"@npmcli/arborist": "^9.0.0", | ||
"@rollup/plugin-replace": "^5.0.5", | ||
"@npmcli/arborist": "^7.1.0", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^22.10.0", | ||
"@types/pacote": "^11.1.8", | ||
"@types/pacote": "^11.1.7", | ||
"@types/request": "^2.48.12", | ||
"electron": "33.2.1", | ||
"eslint": "8.57.0", | ||
|
@@ -56,12 +55,7 @@ | |
"request": "^2.88.2", | ||
"request-progress": "^3.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.38.5", | ||
"rollup-plugin-commonjs": "^9.1.8", | ||
"rollup-plugin-json": "^3.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.6.3", | ||
"rollup-plugin-typescript2": "^0.36.0", | ||
"rolldown": "1.0.0-beta.1", | ||
"ts-jest": "^29.2.5", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.3.3" | ||
|
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,51 @@ | ||
import { defineConfig } from 'rolldown' | ||
import pkgJson from './package.json' with { type: 'json' } | ||
|
||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: { | ||
format: 'esm', | ||
file: 'dist/index.js', | ||
sourcemap: true, | ||
}, | ||
platform: 'browser', | ||
external: ['path'], | ||
define: { | ||
NODE: JSON.stringify(`${pkgJson.name}/${pkgJson.node}`), | ||
VERSION: JSON.stringify(pkgJson.version), | ||
}, | ||
}, | ||
{ | ||
input: 'src/node/index.ts', | ||
external: [ | ||
'fs/promises', | ||
'path', | ||
'pacote', | ||
'@types/pacote', | ||
'@npmcli/arborist', | ||
'ulidx', | ||
'node-fetch', | ||
'fs', | ||
'request', | ||
'crypto', | ||
'url', | ||
'http', | ||
'os', | ||
'util', | ||
'child_process', | ||
'electron', | ||
'request-progress', | ||
], | ||
output: { | ||
format: 'cjs', | ||
file: 'dist/node/index.cjs.js', | ||
sourcemap: true, | ||
inlineDynamicImports: true, | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
platform: 'node', | ||
}, | ||
]) |
This file was deleted.
Oops, something went wrong.
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.