chore: upgrade to turbo v2 and reduce ci quality gate runtime (#4324)
* chore: upgrade to turbo v2 and reduce ci quality gate runtime * chore: upgrade to yarn v4 and deprecate turborepo * chore: reconfigure modules and fix tests * chore: switch to github-hosted runner * fix: dependency resolving * chore: clean redundant step * chore: headless test * chore: remove headed param * fix: resolve dependency version * fix: ubuntu no-sandbox test --------- Co-authored-by: Hien To <tominhhien97@gmail.com> Co-authored-by: Louis <louis@jan.ai>
This commit is contained in:
parent
da4336cc49
commit
bd0e525d66
@ -66,7 +66,7 @@ jobs:
|
|||||||
|
|
||||||
test-on-macos:
|
test-on-macos:
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
runs-on: [self-hosted, macOS, macos-desktop]
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -100,18 +100,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
run: |
|
run: |
|
||||||
npm config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
yarn config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
make test
|
make test
|
||||||
env:
|
env:
|
||||||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||||||
# TURBO_API: '${{ secrets.TURBO_API }}'
|
|
||||||
# TURBO_TEAM: 'macos'
|
|
||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
|
||||||
|
|
||||||
test-on-macos-pr-target:
|
test-on-macos-pr-target:
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
||||||
runs-on: [self-hosted, macOS, macos-desktop]
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -131,8 +126,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
run: |
|
run: |
|
||||||
npm config set registry https://registry.npmjs.org --global
|
|
||||||
yarn config set registry https://registry.npmjs.org --global
|
|
||||||
make test
|
make test
|
||||||
env:
|
env:
|
||||||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||||||
@ -182,13 +175,8 @@ jobs:
|
|||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
npm config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
yarn config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
make test
|
make test
|
||||||
# env:
|
|
||||||
# TURBO_API: '${{ secrets.TURBO_API }}'
|
|
||||||
# TURBO_TEAM: 'windows'
|
|
||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
|
||||||
test-on-windows-pr:
|
test-on-windows-pr:
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||||
runs-on: windows-desktop-default-windows-security
|
runs-on: windows-desktop-default-windows-security
|
||||||
@ -230,17 +218,11 @@ jobs:
|
|||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
npm config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
yarn config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
make test
|
make test
|
||||||
# env:
|
|
||||||
# TURBO_API: '${{ secrets.TURBO_API }}'
|
|
||||||
# TURBO_TEAM: 'windows'
|
|
||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
|
||||||
|
|
||||||
test-on-windows-pr-target:
|
test-on-windows-pr-target:
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
||||||
runs-on: windows-desktop-default-windows-security
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -268,12 +250,10 @@ jobs:
|
|||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
npm config set registry https://registry.npmjs.org --global
|
|
||||||
yarn config set registry https://registry.npmjs.org --global
|
|
||||||
make test
|
make test
|
||||||
|
|
||||||
test-on-ubuntu:
|
test-on-ubuntu:
|
||||||
runs-on: [self-hosted, Linux, ubuntu-desktop]
|
runs-on: ubuntu-latest
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
steps:
|
steps:
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
@ -311,13 +291,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
||||||
echo -e "Display ID: $DISPLAY"
|
echo -e "Display ID: $DISPLAY"
|
||||||
npm config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
yarn config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
make test
|
make test
|
||||||
# env:
|
|
||||||
# TURBO_API: '${{ secrets.TURBO_API }}'
|
|
||||||
# TURBO_TEAM: 'linux'
|
|
||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
@ -327,7 +301,7 @@ jobs:
|
|||||||
retention-days: 2
|
retention-days: 2
|
||||||
|
|
||||||
coverage-check:
|
coverage-check:
|
||||||
runs-on: [self-hosted, Linux, ubuntu-desktop]
|
runs-on: ubuntu-latest
|
||||||
needs: base_branch_cov
|
needs: base_branch_cov
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
steps:
|
steps:
|
||||||
@ -341,6 +315,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install yarn
|
||||||
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: 'Cleanup cache'
|
- name: 'Cleanup cache'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
@ -356,15 +333,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
||||||
echo -e "Display ID: $DISPLAY"
|
echo -e "Display ID: $DISPLAY"
|
||||||
npm config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
yarn config set registry ${{ secrets.NPM_PROXY }} --global
|
|
||||||
make lint
|
make lint
|
||||||
yarn build:test
|
yarn build:test
|
||||||
yarn test:coverage
|
yarn test:coverage
|
||||||
# env:
|
|
||||||
# TURBO_API: '${{ secrets.TURBO_API }}'
|
|
||||||
# TURBO_TEAM: 'linux'
|
|
||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
|
||||||
|
|
||||||
- name: Generate Code Coverage report
|
- name: Generate Code Coverage report
|
||||||
id: code-coverage
|
id: code-coverage
|
||||||
@ -377,7 +348,7 @@ jobs:
|
|||||||
show-annotations: 'warning'
|
show-annotations: 'warning'
|
||||||
|
|
||||||
test-on-ubuntu-pr-target:
|
test-on-ubuntu-pr-target:
|
||||||
runs-on: [self-hosted, Linux, ubuntu-desktop]
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
||||||
steps:
|
steps:
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
@ -400,6 +371,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
||||||
echo -e "Display ID: $DISPLAY"
|
echo -e "Display ID: $DISPLAY"
|
||||||
npm config set registry https://registry.npmjs.org --global
|
|
||||||
yarn config set registry https://registry.npmjs.org --global
|
|
||||||
make test
|
make test
|
||||||
|
|||||||
4
.github/workflows/publish-npm-core.yml
vendored
4
.github/workflows/publish-npm-core.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Publish plugin models Package to npmjs
|
name: Publish core Package to npmjs
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+-core"]
|
tags: ["v[0-9]+.[0-9]+.[0-9]+-core"]
|
||||||
@ -45,7 +45,7 @@ jobs:
|
|||||||
node-version: "20.x"
|
node-version: "20.x"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- run: cd core && yarn install && yarn build
|
- run: cd core && corepack enable && corepack prepare yarn@4.5.3 --activate && yarn --version && yarn install && yarn build
|
||||||
|
|
||||||
- run: cd core && yarn publish --access public
|
- run: cd core && yarn publish --access public
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|||||||
4
.github/workflows/publish-npm-joi.yml
vendored
4
.github/workflows/publish-npm-joi.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Publish plugin models Package to npmjs
|
name: Publish joi Package to npmjs
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+-joi"]
|
tags: ["v[0-9]+.[0-9]+.[0-9]+-joi"]
|
||||||
@ -45,7 +45,7 @@ jobs:
|
|||||||
node-version: "20.x"
|
node-version: "20.x"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- run: cd joi && yarn install && yarn build
|
- run: cd joi && corepack enable && corepack prepare yarn@4.5.3 --activate && yarn --version && yarn install && yarn build
|
||||||
|
|
||||||
- run: cd joi && yarn publish --access public
|
- run: cd joi && yarn publish --access public
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -8,7 +8,6 @@ error.log
|
|||||||
node_modules
|
node_modules
|
||||||
*.tgz
|
*.tgz
|
||||||
!charts/server/charts/*.tgz
|
!charts/server/charts/*.tgz
|
||||||
yarn.lock
|
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@ -48,3 +47,6 @@ coverage
|
|||||||
test_results.html
|
test_results.html
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
electron/shared/**
|
electron/shared/**
|
||||||
|
|
||||||
|
# docs
|
||||||
|
docs/yarn.lock
|
||||||
3
.yarnrc.yml
Normal file
3
.yarnrc.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
nmHoistingLimits: workspaces
|
||||||
|
nodeLinker: node-modules
|
||||||
|
checksumBehavior: update
|
||||||
26
Makefile
26
Makefile
@ -10,20 +10,23 @@ REPORT_PORTAL_DESCRIPTION ?= "Jan App report"
|
|||||||
all:
|
all:
|
||||||
@echo "Specify a target to run"
|
@echo "Specify a target to run"
|
||||||
|
|
||||||
|
# Config yarn version
|
||||||
|
|
||||||
|
config-yarn:
|
||||||
|
corepack enable
|
||||||
|
corepack prepare yarn@4.5.3 --activate
|
||||||
|
yarn --version
|
||||||
|
yarn config set -H enableImmutableInstalls false
|
||||||
|
|
||||||
# Builds the UI kit
|
# Builds the UI kit
|
||||||
build-joi:
|
build-joi: config-yarn
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
cd joi && yarn config set network-timeout 300000 && yarn install && yarn build
|
|
||||||
else
|
|
||||||
cd joi && yarn install && yarn build
|
cd joi && yarn install && yarn build
|
||||||
endif
|
|
||||||
|
|
||||||
# Installs yarn dependencies and builds core and extensions
|
# Installs yarn dependencies and builds core and extensions
|
||||||
install-and-build: build-joi
|
install-and-build: build-joi
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
yarn config set network-timeout 300000
|
echo "skip"
|
||||||
endif
|
endif
|
||||||
yarn global add turbo@1.13.2
|
|
||||||
yarn build:core
|
yarn build:core
|
||||||
yarn build:server
|
yarn build:server
|
||||||
yarn install
|
yarn install
|
||||||
@ -117,9 +120,8 @@ build: check-file-counts
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
-powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out, .turbo -Recurse -Directory | Remove-Item -Recurse -Force"
|
-powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out, .turbo, .yarn -Recurse -Directory | Remove-Item -Recurse -Force"
|
||||||
-powershell -Command "Get-ChildItem -Path . -Include package-lock.json -Recurse -File | Remove-Item -Recurse -Force"
|
-powershell -Command "Get-ChildItem -Path . -Include package-lock.json, tsconfig.tsbuildinfo -Recurse -File | Remove-Item -Recurse -Force"
|
||||||
-powershell -Command "Get-ChildItem -Path . -Include yarn.lock -Recurse -File | Remove-Item -Recurse -Force"
|
|
||||||
-powershell -Command "Remove-Item -Recurse -Force ./pre-install/*.tgz"
|
-powershell -Command "Remove-Item -Recurse -Force ./pre-install/*.tgz"
|
||||||
-powershell -Command "Remove-Item -Recurse -Force ./extensions/*/*.tgz"
|
-powershell -Command "Remove-Item -Recurse -Force ./extensions/*/*.tgz"
|
||||||
-powershell -Command "Remove-Item -Recurse -Force ./electron/pre-install/*.tgz"
|
-powershell -Command "Remove-Item -Recurse -Force ./electron/pre-install/*.tgz"
|
||||||
@ -131,8 +133,8 @@ else ifeq ($(shell uname -s),Linux)
|
|||||||
find . -name "build" -type d -exec rm -rf '{}' +
|
find . -name "build" -type d -exec rm -rf '{}' +
|
||||||
find . -name "out" -type d -exec rm -rf '{}' +
|
find . -name "out" -type d -exec rm -rf '{}' +
|
||||||
find . -name ".turbo" -type d -exec rm -rf '{}' +
|
find . -name ".turbo" -type d -exec rm -rf '{}' +
|
||||||
|
find . -name ".yarn" -type d -exec rm -rf '{}' +
|
||||||
find . -name "packake-lock.json" -type f -exec rm -rf '{}' +
|
find . -name "packake-lock.json" -type f -exec rm -rf '{}' +
|
||||||
find . -name "yarn.lock" -type f -exec rm -rf '{}' +
|
|
||||||
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
|
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
|
||||||
rm -rf ./pre-install/*.tgz
|
rm -rf ./pre-install/*.tgz
|
||||||
rm -rf ./extensions/*/*.tgz
|
rm -rf ./extensions/*/*.tgz
|
||||||
@ -146,8 +148,8 @@ else
|
|||||||
find . -name "build" -type d -exec rm -rf '{}' +
|
find . -name "build" -type d -exec rm -rf '{}' +
|
||||||
find . -name "out" -type d -exec rm -rf '{}' +
|
find . -name "out" -type d -exec rm -rf '{}' +
|
||||||
find . -name ".turbo" -type d -exec rm -rf '{}' +
|
find . -name ".turbo" -type d -exec rm -rf '{}' +
|
||||||
|
find . -name ".yarn" -type d -exec rm -rf '{}' +
|
||||||
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
|
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
|
||||||
find . -name "yarn.lock" -type f -exec rm -rf '{}' +
|
|
||||||
rm -rf ./pre-install/*.tgz
|
rm -rf ./pre-install/*.tgz
|
||||||
rm -rf ./extensions/*/*.tgz
|
rm -rf ./extensions/*/*.tgz
|
||||||
rm -rf ./electron/pre-install/*.tgz
|
rm -rf ./electron/pre-install/*.tgz
|
||||||
|
|||||||
@ -8,8 +8,9 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://jan.ai",
|
"homepage": "https://jan.ai",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
"browser": "dist/core.es5.js",
|
||||||
"main": "dist/core.es5.js",
|
"main": "dist/core.es5.js",
|
||||||
"module": "dist/core.cjs.js",
|
"module": "dist/index.cjs.js",
|
||||||
"typings": "dist/types/index.d.ts",
|
"typings": "dist/types/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
@ -36,18 +37,24 @@
|
|||||||
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prebuild": "rimraf dist",
|
"prebuild": "rimraf dist",
|
||||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
"build": "rollup -c rollup.config.ts"
|
||||||
"start": "rollup -c rollup.config.ts -w"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@npmcli/arborist": "^9.0.0",
|
||||||
"@rollup/plugin-replace": "^5.0.5",
|
"@rollup/plugin-replace": "^5.0.5",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^20.11.4",
|
"@types/node": "^22.10.0",
|
||||||
|
"@types/pacote": "^11.1.8",
|
||||||
|
"@types/request": "^2.48.12",
|
||||||
|
"electron": "33.2.1",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.0",
|
||||||
"eslint-plugin-jest": "^27.9.0",
|
"eslint-plugin-jest": "^27.9.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-junit": "^16.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"jest-runner": "^29.7.0",
|
"jest-runner": "^29.7.0",
|
||||||
|
"pacote": "^21.0.0",
|
||||||
|
"request": "^2.88.2",
|
||||||
|
"request-progress": "^3.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.38.5",
|
"rollup": "^2.38.5",
|
||||||
"rollup-plugin-commonjs": "^9.1.8",
|
"rollup-plugin-commonjs": "^9.1.8",
|
||||||
@ -62,5 +69,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,9 +23,12 @@ export default [
|
|||||||
// Allow json resolution
|
// Allow json resolution
|
||||||
json(),
|
json(),
|
||||||
// Compile TypeScript files
|
// Compile TypeScript files
|
||||||
typescript({ useTsconfigDeclarationDir: true }),
|
typescript({
|
||||||
|
useTsconfigDeclarationDir: true,
|
||||||
|
exclude: ['**/*.test.ts', 'src/node/**'],
|
||||||
|
}),
|
||||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||||
commonjs(),
|
// commonjs(),
|
||||||
// Allow node_modules resolution, so you can use 'external' to control
|
// Allow node_modules resolution, so you can use 'external' to control
|
||||||
// which external modules to include in the bundle
|
// which external modules to include in the bundle
|
||||||
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||||
@ -44,7 +47,9 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: `src/node/index.ts`,
|
input: `src/node/index.ts`,
|
||||||
output: [{ file: 'dist/node/index.cjs.js', format: 'cjs', sourcemap: true }],
|
output: [
|
||||||
|
{ file: 'dist/node/index.cjs.js', format: 'cjs', sourcemap: true },
|
||||||
|
],
|
||||||
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
||||||
external: [
|
external: [
|
||||||
'fs/promises',
|
'fs/promises',
|
||||||
@ -70,7 +75,10 @@ export default [
|
|||||||
// Allow json resolution
|
// Allow json resolution
|
||||||
json(),
|
json(),
|
||||||
// Compile TypeScript files
|
// Compile TypeScript files
|
||||||
typescript({ useTsconfigDeclarationDir: true }),
|
typescript({
|
||||||
|
useTsconfigDeclarationDir: true,
|
||||||
|
exclude: ['**/*.test.ts', 'src/browser/**'],
|
||||||
|
}),
|
||||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||||
commonjs(),
|
commonjs(),
|
||||||
// Allow node_modules resolution, so you can use 'external' to control
|
// Allow node_modules resolution, so you can use 'external' to control
|
||||||
|
|||||||
@ -4,16 +4,6 @@ jest.mock('../../helper', () => ({
|
|||||||
}))
|
}))
|
||||||
import { App } from './app'
|
import { App } from './app'
|
||||||
|
|
||||||
it('should call stopServer', () => {
|
|
||||||
const app = new App()
|
|
||||||
const stopServerMock = jest.fn().mockResolvedValue('Server stopped')
|
|
||||||
jest.mock('@janhq/server', () => ({
|
|
||||||
stopServer: stopServerMock,
|
|
||||||
}))
|
|
||||||
app.stopServer()
|
|
||||||
expect(stopServerMock).toHaveBeenCalled()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should correctly retrieve basename', () => {
|
it('should correctly retrieve basename', () => {
|
||||||
const app = new App()
|
const app = new App()
|
||||||
const result = app.baseName('/path/to/file.txt')
|
const result = app.baseName('/path/to/file.txt')
|
||||||
@ -23,7 +13,8 @@ it('should correctly retrieve basename', () => {
|
|||||||
it('should correctly identify subdirectories', () => {
|
it('should correctly identify subdirectories', () => {
|
||||||
const app = new App()
|
const app = new App()
|
||||||
const basePath = process.platform === 'win32' ? 'C:\\path\\to' : '/path/to'
|
const basePath = process.platform === 'win32' ? 'C:\\path\\to' : '/path/to'
|
||||||
const subPath = process.platform === 'win32' ? 'C:\\path\\to\\subdir' : '/path/to/subdir'
|
const subPath =
|
||||||
|
process.platform === 'win32' ? 'C:\\path\\to\\subdir' : '/path/to/subdir'
|
||||||
const result = app.isSubdirectory(basePath, subPath)
|
const result = app.isSubdirectory(basePath, subPath)
|
||||||
expect(result).toBe(true)
|
expect(result).toBe(true)
|
||||||
})
|
})
|
||||||
@ -31,7 +22,8 @@ it('should correctly identify subdirectories', () => {
|
|||||||
it('should correctly join multiple paths', () => {
|
it('should correctly join multiple paths', () => {
|
||||||
const app = new App()
|
const app = new App()
|
||||||
const result = app.joinPath(['path', 'to', 'file'])
|
const result = app.joinPath(['path', 'to', 'file'])
|
||||||
const expectedPath = process.platform === 'win32' ? 'path\\to\\file' : 'path/to/file'
|
const expectedPath =
|
||||||
|
process.platform === 'win32' ? 'path\\to\\file' : 'path/to/file'
|
||||||
expect(result).toBe(expectedPath)
|
expect(result).toBe(expectedPath)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -52,5 +44,7 @@ it('should retrieve the directory name from a file path (Unix/Windows)', async (
|
|||||||
it('should retrieve the directory name when using file protocol', async () => {
|
it('should retrieve the directory name when using file protocol', async () => {
|
||||||
const app = new App()
|
const app = new App()
|
||||||
const path = 'file:/models/file.txt'
|
const path = 'file:/models/file.txt'
|
||||||
expect(await app.dirName(path)).toBe(process.platform === 'win32' ? 'app\\models' : 'app/models')
|
expect(await app.dirName(path)).toBe(
|
||||||
|
process.platform === 'win32' ? 'app\\models' : 'app/models'
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -13,9 +13,8 @@
|
|||||||
"declarationDir": "dist/types",
|
"declarationDir": "dist/types",
|
||||||
"outDir": "dist/lib",
|
"outDir": "dist/lib",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"types": ["@types/jest"],
|
"types": ["jest", "node"]
|
||||||
"resolveJsonModule": true
|
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["**/*.test.ts"]
|
"exclude": ["*.test.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,5 +58,5 @@
|
|||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
"packageManager": "yarn@1.22.22"
|
||||||
}
|
}
|
||||||
|
|||||||
0
docs/yarn.lock
Normal file
0
docs/yarn.lock
Normal file
@ -78,7 +78,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
"lint": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
||||||
"test:e2e": "playwright test --workers=1",
|
"test:e2e": "DEBUG=pw:browser xvfb-maybe -- playwright test --workers=1",
|
||||||
"copy:assets": "rimraf --glob \"./pre-install/*.tgz\" && cpx \"../pre-install/*.tgz\" \"./pre-install\"",
|
"copy:assets": "rimraf --glob \"./pre-install/*.tgz\" && cpx \"../pre-install/*.tgz\" \"./pre-install\"",
|
||||||
"dev": "yarn copy:assets && tsc -p . && electron .",
|
"dev": "yarn copy:assets && tsc -p . && electron .",
|
||||||
"compile": "tsc -p .",
|
"compile": "tsc -p .",
|
||||||
@ -98,8 +98,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alumna/reflect": "^1.1.3",
|
"@alumna/reflect": "^1.1.3",
|
||||||
"@janhq/core": "link:./core",
|
"@janhq/core": "link:../core",
|
||||||
"@janhq/server": "link:./server",
|
"@janhq/server": "link:../server",
|
||||||
|
"@kirillvakalov/nut-tree__nut-js": "4.2.1-2",
|
||||||
"@npmcli/arborist": "^7.1.0",
|
"@npmcli/arborist": "^7.1.0",
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
"electron-updater": "^6.1.7",
|
"electron-updater": "^6.1.7",
|
||||||
@ -108,12 +109,12 @@
|
|||||||
"pacote": "^17.0.4",
|
"pacote": "^17.0.4",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
"request-progress": "^3.0.0",
|
"request-progress": "^3.0.0",
|
||||||
"ulidx": "^2.3.0",
|
"ulidx": "^2.3.0"
|
||||||
"@kirillvakalov/nut-tree__nut-js": "4.2.1-2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/notarize": "^2.5.0",
|
"@electron/notarize": "^2.5.0",
|
||||||
"@playwright/test": "^1.38.1",
|
"@playwright/test": "^1.38.1",
|
||||||
|
"@reportportal/agent-js-playwright": "^5.1.7",
|
||||||
"@types/npmcli__arborist": "^5.6.4",
|
"@types/npmcli__arborist": "^5.6.4",
|
||||||
"@types/pacote": "^11.1.7",
|
"@types/pacote": "^11.1.7",
|
||||||
"@types/request": "^2.48.12",
|
"@types/request": "^2.48.12",
|
||||||
@ -129,9 +130,10 @@
|
|||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"@reportportal/agent-js-playwright": "^5.1.7"
|
"xvfb-maybe": "^0.2.1"
|
||||||
},
|
},
|
||||||
"installConfig": {
|
"installConfig": {
|
||||||
"hoistingLimits": "workspaces"
|
"hoistingLimits": "workspaces"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export async function setupElectron() {
|
|||||||
expect(appInfo).toBeTruthy()
|
expect(appInfo).toBeTruthy()
|
||||||
|
|
||||||
electronApp = await electron.launch({
|
electronApp = await electron.launch({
|
||||||
args: [appInfo.main], // main file from package.json
|
args: [appInfo.main, '--no-sandbox'], // main file from package.json
|
||||||
executablePath: appInfo.executable, // path to the Electron executable
|
executablePath: appInfo.executable, // path to the Electron executable
|
||||||
// recordVideo: { dir: Constants.VIDEO_DIR }, // Specify the directory for video recordings
|
// recordVideo: { dir: Constants.VIDEO_DIR }, // Specify the directory for video recordings
|
||||||
})
|
})
|
||||||
|
|||||||
3
extensions/.yarnrc.yml
Normal file
3
extensions/.yarnrc.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
nmHoistingLimits: workspaces
|
||||||
|
nodeLinker: node-modules
|
||||||
|
checksumBehavior: update
|
||||||
@ -11,9 +11,9 @@
|
|||||||
"clean:modules": "rimraf node_modules/pdf-parse/test && cd node_modules/pdf-parse/lib/pdf.js && rimraf v1.9.426 v1.10.88 v2.0.550",
|
"clean:modules": "rimraf node_modules/pdf-parse/test && cd node_modules/pdf-parse/lib/pdf.js && rimraf v1.9.426 v1.10.88 v2.0.550",
|
||||||
"build-universal-hnswlib": "cd node_modules/hnswlib-node && arch -x86_64 npx node-gyp rebuild --arch=x64 && mv build/Release/addon.node ./addon-amd64.node && node-gyp rebuild --arch=arm64 && mv build/Release/addon.node ./addon-arm64.node && lipo -create -output build/Release/addon.node ./addon-arm64.node ./addon-amd64.node && rm ./addon-arm64.node && rm ./addon-amd64.node",
|
"build-universal-hnswlib": "cd node_modules/hnswlib-node && arch -x86_64 npx node-gyp rebuild --arch=x64 && mv build/Release/addon.node ./addon-amd64.node && node-gyp rebuild --arch=arm64 && mv build/Release/addon.node ./addon-arm64.node && lipo -create -output build/Release/addon.node ./addon-arm64.node ./addon-amd64.node && rm ./addon-arm64.node && rm ./addon-amd64.node",
|
||||||
"build": "yarn clean:modules && tsc --module commonjs && rollup -c rollup.config.ts",
|
"build": "yarn clean:modules && tsc --module commonjs && rollup -c rollup.config.ts",
|
||||||
"build:publish:linux": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:linux": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"build:publish:darwin": "rimraf *.tgz --glob && yarn build-universal-hnswlib && yarn build && ../../.github/scripts/auto-sign.sh && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:darwin": "rimraf *.tgz --glob || true && yarn build-universal-hnswlib && yarn build && ../../.github/scripts/auto-sign.sh && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"build:publish:win32": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:win32": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"build:publish": "run-script-os"
|
"build:publish": "run-script-os"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -28,14 +28,15 @@
|
|||||||
"rollup-plugin-define": "^1.0.1",
|
"rollup-plugin-define": "^1.0.1",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-typescript2": "^0.36.0",
|
"rollup-plugin-typescript2": "^0.36.0",
|
||||||
"typescript": "^5.3.3",
|
"run-script-os": "^1.1.6",
|
||||||
"run-script-os": "^1.1.6"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"@langchain/community": "0.0.13",
|
"@langchain/community": "0.0.13",
|
||||||
"hnswlib-node": "^1.4.2",
|
"hnswlib-node": "^1.4.2",
|
||||||
"langchain": "^0.0.214",
|
"langchain": "^0.0.214",
|
||||||
|
"node-gyp": "^11.0.0",
|
||||||
"pdf-parse": "^1.1.1",
|
"pdf-parse": "^1.1.1",
|
||||||
"ts-loader": "^9.5.0"
|
"ts-loader": "^9.5.0"
|
||||||
},
|
},
|
||||||
@ -47,5 +48,9 @@
|
|||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"@janhq/core",
|
"@janhq/core",
|
||||||
"hnswlib-node"
|
"hnswlib-node"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,11 +19,12 @@
|
|||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-loader": "^9.5.0",
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"ky": "^1.7.2",
|
"ky": "^1.7.2",
|
||||||
"p-queue": "^8.0.1"
|
"p-queue": "^8.0.1"
|
||||||
},
|
},
|
||||||
@ -35,5 +36,9 @@
|
|||||||
"package.json",
|
"package.json",
|
||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
"bundleDependencies": []
|
"bundleDependencies": [],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest test",
|
"test": "jest test",
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-anthropic-extension && yarn && yarn build:publish"
|
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-anthropic-extension && yarn && yarn build:publish"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -21,12 +21,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -40,5 +41,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-cohere-extension && yarn && yarn build:publish"
|
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-cohere-extension && yarn && yarn build:publish"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -20,12 +20,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -39,5 +40,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,8 +13,8 @@
|
|||||||
"downloadcortex:linux:darwin": "./download.sh",
|
"downloadcortex:linux:darwin": "./download.sh",
|
||||||
"downloadcortex:win32": "download.bat",
|
"downloadcortex:win32": "download.bat",
|
||||||
"downloadcortex": "run-script-os",
|
"downloadcortex": "run-script-os",
|
||||||
"build:publish:darwin": "rimraf *.tgz --glob && yarn build && npm run downloadcortex && ../../.github/scripts/auto-sign.sh && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:darwin": "rimraf *.tgz --glob || true && yarn build && yarn downloadcortex && ../../.github/scripts/auto-sign.sh && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"build:publish:win32:linux": "rimraf *.tgz --glob && yarn build && npm run downloadcortex && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish:win32:linux": "rimraf *.tgz --glob || true && yarn build && yarn downloadcortex && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"build:publish": "run-script-os"
|
"build:publish": "run-script-os"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"cpu-instructions": "^0.0.13",
|
"cpu-instructions": "^0.0.13",
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
@ -71,5 +71,9 @@
|
|||||||
"@janhq/core",
|
"@janhq/core",
|
||||||
"decompress",
|
"decompress",
|
||||||
"cpu-instructions"
|
"cpu-instructions"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && npm run build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -18,12 +18,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -37,5 +38,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,12 +19,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -38,5 +39,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,12 +19,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
@ -39,5 +40,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,12 +19,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
@ -39,5 +40,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,12 +19,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -38,5 +39,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install",
|
||||||
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-openrouter-extension && yarn && yarn build:publish"
|
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-openrouter-extension && yarn && yarn build:publish"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -20,12 +20,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-loader": "^9.5.0",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"ts-loader": "^9.5.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
},
|
},
|
||||||
@ -39,5 +40,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -19,12 +19,12 @@
|
|||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-loader": "^9.5.0",
|
"ts-loader": "^9.5.0",
|
||||||
"typescript": "5.3.3",
|
"typescript": "^5.7.2",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"ulidx": "^2.3.0"
|
"ulidx": "^2.3.0"
|
||||||
@ -39,5 +39,9 @@
|
|||||||
],
|
],
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"fetch-retry"
|
"fetch-retry"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs",
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
@ -35,9 +35,13 @@
|
|||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"ky": "^1.7.2",
|
"ky": "^1.7.2",
|
||||||
"p-queue": "^8.0.1"
|
"p-queue": "^8.0.1"
|
||||||
},
|
},
|
||||||
"bundleDependencies": []
|
"bundleDependencies": [],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
"author": "Jan <service@jan.ai>",
|
"author": "Jan <service@jan.ai>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts && npm run download-artifacts",
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts && yarn download-artifacts",
|
||||||
"download-artifacts": "run-script-os && cpx \"bin/**\" \"dist/bin\"",
|
"download-artifacts": "run-script-os && cpx \"bin/**\" \"dist/bin\"",
|
||||||
"download-artifacts:darwin": "echo 'No artifacts to download for darwin'",
|
"download-artifacts:darwin": "echo 'No artifacts to download for darwin'",
|
||||||
"download-artifacts:win32": "download.bat",
|
"download-artifacts:win32": "download.bat",
|
||||||
"download-artifacts:linux": "download https://catalog.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo",
|
"download-artifacts:linux": "download https://catalog.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo",
|
||||||
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && npm pack && cpx *.tgz ../../pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -25,18 +25,18 @@
|
|||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/node": "^20.11.4",
|
"@types/node": "^20.11.4",
|
||||||
"@types/node-os-utils": "^1.3.4",
|
"@types/node-os-utils": "^1.3.4",
|
||||||
"run-script-os": "^1.1.6",
|
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
|
"download-cli": "^1.1.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.38.5",
|
"rollup": "^2.38.5",
|
||||||
"rollup-plugin-define": "^1.0.1",
|
"rollup-plugin-define": "^1.0.1",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-typescript2": "^0.36.0",
|
"rollup-plugin-typescript2": "^0.36.0",
|
||||||
"typescript": "^5.3.3",
|
"run-script-os": "^1.1.6",
|
||||||
"download-cli": "^1.1.1"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"@rollup/plugin-replace": "^5.0.5",
|
"@rollup/plugin-replace": "^5.0.5",
|
||||||
"node-os-utils": "^1.3.7"
|
"node-os-utils": "^1.3.7"
|
||||||
},
|
},
|
||||||
@ -48,5 +48,9 @@
|
|||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"node-os-utils",
|
"node-os-utils",
|
||||||
"@janhq/core"
|
"@janhq/core"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,10 @@
|
|||||||
"workspaces": {
|
"workspaces": {
|
||||||
"packages": [
|
"packages": [
|
||||||
"**"
|
"**"
|
||||||
],
|
|
||||||
"nohoist": [
|
|
||||||
"**"
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,10 +24,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||||
"build:publish:win32": "rimraf *.tgz --glob && yarn build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
"build:publish": "rimraf *.tgz --glob || true && yarn build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install"
|
||||||
"build:publish:linux": "rimraf *.tgz --glob && yarn build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
|
||||||
"build:publish:darwin": "rimraf *.tgz --glob && yarn build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
|
||||||
"build:publish": "run-script-os"
|
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -39,26 +36,26 @@
|
|||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-replace": "^5.0.5",
|
"@rollup/plugin-replace": "^5.0.5",
|
||||||
"@types/decompress": "4.2.7",
|
"@types/decompress": "4.2.7",
|
||||||
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^20.11.4",
|
"@types/node": "^20.11.4",
|
||||||
"@types/os-utils": "^0.0.4",
|
"@types/os-utils": "^0.0.4",
|
||||||
"@types/tcp-port-used": "^1.0.4",
|
"@types/tcp-port-used": "^1.0.4",
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"download-cli": "^1.1.1",
|
"download-cli": "^1.1.1",
|
||||||
|
"jest": "^29.7.0",
|
||||||
|
"jest-junit": "^16.0.0",
|
||||||
|
"jest-runner": "^29.7.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.38.5",
|
"rollup": "^2.38.5",
|
||||||
"rollup-plugin-define": "^1.0.1",
|
"rollup-plugin-define": "^1.0.1",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-typescript2": "^0.36.0",
|
"rollup-plugin-typescript2": "^0.36.0",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"typescript": "^5.2.2",
|
"ts-jest": "^29.2.5",
|
||||||
"@types/jest": "^29.5.12",
|
"typescript": "^5.2.2"
|
||||||
"jest": "^29.7.0",
|
|
||||||
"jest-junit": "^16.0.0",
|
|
||||||
"jest-runner": "^29.7.0",
|
|
||||||
"ts-jest": "^29.2.5"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "file:../../core",
|
"@janhq/core": "../../core/package.tgz",
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
"fetch-retry": "^5.0.6",
|
"fetch-retry": "^5.0.6",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
@ -80,5 +77,9 @@
|
|||||||
"decompress",
|
"decompress",
|
||||||
"@janhq/core",
|
"@janhq/core",
|
||||||
"terminate"
|
"terminate"
|
||||||
]
|
],
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://turbo.build/schema.json",
|
|
||||||
"pipeline": {
|
|
||||||
"build": {
|
|
||||||
"dependsOn": ["^build"],
|
|
||||||
"outputs": ["dist/**"]
|
|
||||||
},
|
|
||||||
"build:publish": {
|
|
||||||
"dependsOn": ["build"],
|
|
||||||
"outputs": ["**.tgz"]
|
|
||||||
},
|
|
||||||
"dev": {
|
|
||||||
"cache": false
|
|
||||||
},
|
|
||||||
"type-check": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
9384
extensions/yarn.lock
Normal file
9384
extensions/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@janhq/joi",
|
"name": "@janhq/joi",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/esm/index.js",
|
||||||
"module": "dist/esm/index.js",
|
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"description": "A collection of UI component",
|
"description": "A collection of UI component",
|
||||||
"files": [
|
"files": [
|
||||||
@ -20,7 +19,7 @@
|
|||||||
"bugs": "https://github.com/codecentrum/piksel/issues",
|
"bugs": "https://github.com/codecentrum/piksel/issues",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "rollup -c -w",
|
"dev": "rollup -c -w",
|
||||||
"build": "rimraf ./dist && rollup -c",
|
"build": "rimraf ./dist || true && rollup -c",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@ -41,29 +40,38 @@
|
|||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"autoprefixer": "10.4.16",
|
"autoprefixer": "10.4.16",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
|
"rollup-plugin-sass": "^1.14.0",
|
||||||
"tailwind-merge": "^2.2.0",
|
"tailwind-merge": "^2.2.0",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"ts-jest": "^29.2.5"
|
"ts-jest": "^29.2.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "0.4.4",
|
||||||
"@testing-library/dom": "^10.4.0",
|
"@testing-library/dom": "10.4.0",
|
||||||
"@testing-library/jest-dom": "^6.5.0",
|
"@testing-library/jest-dom": "^6.5.0",
|
||||||
"@testing-library/react": "^16.0.1",
|
"@testing-library/react": "^16.0.1",
|
||||||
"@testing-library/user-event": "^14.5.2",
|
"@testing-library/user-event": "^14.5.2",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
|
"@types/react": "^18.3.12",
|
||||||
|
"@types/react-dom": "^19",
|
||||||
|
"class-variance-authority": "^0.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"jest-transform-css": "^6.0.1",
|
"jest-transform-css": "^6.0.1",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.6",
|
"prettier-plugin-tailwindcss": "^0.5.6",
|
||||||
"rollup": "^4.12.0",
|
"react": "^19.0.0",
|
||||||
"rollup-plugin-bundle-size": "^1.0.3",
|
"react-dom": "^19.0.0",
|
||||||
"rollup-plugin-commonjs": "^10.1.0",
|
"rimraf": "^6.0.1",
|
||||||
"rollup-plugin-copy": "^3.5.0",
|
"rollup": "4.12.0",
|
||||||
"rollup-plugin-dts": "^6.1.0",
|
"rollup-plugin-bundle-size": "1.0.3",
|
||||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
"rollup-plugin-commonjs": "10.1.0",
|
||||||
"rollup-plugin-postcss": "^4.0.2",
|
"rollup-plugin-copy": "3.5.0",
|
||||||
"rollup-plugin-typescript2": "^0.36.0"
|
"rollup-plugin-dts": "6.1.0",
|
||||||
}
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
||||||
|
"rollup-plugin-postcss": "4.0.2",
|
||||||
|
"rollup-plugin-typescript2": "0.36.0",
|
||||||
|
"typescript": "^5.7.2"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import tailwindcss from 'tailwindcss'
|
|||||||
import typescriptEngine from 'typescript'
|
import typescriptEngine from 'typescript'
|
||||||
import resolve from '@rollup/plugin-node-resolve'
|
import resolve from '@rollup/plugin-node-resolve'
|
||||||
import copy from 'rollup-plugin-copy'
|
import copy from 'rollup-plugin-copy'
|
||||||
|
import sass from 'rollup-plugin-sass'
|
||||||
|
|
||||||
const packageJson = JSON.parse(readFileSync('./package.json'))
|
const packageJson = JSON.parse(readFileSync('./package.json'))
|
||||||
|
|
||||||
@ -22,18 +23,12 @@ export default [
|
|||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
file: packageJson.main,
|
file: packageJson.main,
|
||||||
format: 'cjs',
|
|
||||||
sourcemap: false,
|
|
||||||
exports: 'named',
|
|
||||||
name: packageJson.name,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
file: packageJson.module,
|
|
||||||
format: 'es',
|
format: 'es',
|
||||||
exports: 'named',
|
exports: 'named',
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
external: ['react', 'typescript', 'class-variance-authority'],
|
||||||
plugins: [
|
plugins: [
|
||||||
postcss({
|
postcss({
|
||||||
plugins: [autoprefixer(), tailwindcss(tailwindConfig)],
|
plugins: [autoprefixer(), tailwindcss(tailwindConfig)],
|
||||||
@ -46,16 +41,24 @@ export default [
|
|||||||
minimize: true,
|
minimize: true,
|
||||||
extract: 'main.css',
|
extract: 'main.css',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
peerDepsExternal({ includeDependencies: true }),
|
peerDepsExternal({ includeDependencies: true }),
|
||||||
resolve(),
|
|
||||||
commonjs(),
|
commonjs(),
|
||||||
|
resolve(),
|
||||||
typescript({
|
typescript({
|
||||||
tsconfig: './tsconfig.json',
|
tsconfig: './tsconfig.json',
|
||||||
typescript: typescriptEngine,
|
typescript: typescriptEngine,
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
exclude: ['docs', 'dist', 'node_modules/**'],
|
exclude: [
|
||||||
|
'docs',
|
||||||
|
'dist',
|
||||||
|
'node_modules/**',
|
||||||
|
'**/*.test.ts',
|
||||||
|
'**/*.test.tsx',
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
terser(),
|
terser(),
|
||||||
|
sass(),
|
||||||
],
|
],
|
||||||
watch: {
|
watch: {
|
||||||
clearScreen: false,
|
clearScreen: false,
|
||||||
|
|||||||
@ -13,5 +13,5 @@
|
|||||||
"esModuleInterop": true
|
"esModuleInterop": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules", "*.test.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
32
package.json
32
package.json
@ -8,13 +8,6 @@
|
|||||||
"electron",
|
"electron",
|
||||||
"web",
|
"web",
|
||||||
"server"
|
"server"
|
||||||
],
|
|
||||||
"nohoist": [
|
|
||||||
"joi",
|
|
||||||
"core",
|
|
||||||
"electron",
|
|
||||||
"web",
|
|
||||||
"server"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -23,22 +16,18 @@
|
|||||||
"test:coverage": "jest --coverage",
|
"test:coverage": "jest --coverage",
|
||||||
"test": "yarn workspace jan test:e2e",
|
"test": "yarn workspace jan test:e2e",
|
||||||
"test-local": "yarn lint && yarn build:test && yarn test",
|
"test-local": "yarn lint && yarn build:test && yarn test",
|
||||||
"pre-install:darwin": "find extensions -type f -path \"**/*.tgz\" -exec cp {} pre-install \\;",
|
|
||||||
"pre-install:linux": "find extensions -type f -path \"**/*.tgz\" -exec cp {} pre-install \\;",
|
|
||||||
"pre-install:win32": "powershell -Command \"Get-ChildItem -Path \"extensions\" -Recurse -File -Filter \"*.tgz\" | ForEach-Object { Copy-Item -Path $_.FullName -Destination \"pre-install\" }\"",
|
|
||||||
"pre-install": "run-script-os",
|
|
||||||
"copy:assets": "cpx \"pre-install/*.tgz\" \"electron/pre-install/\" && cpx \"themes/**\" \"electron/themes\"",
|
"copy:assets": "cpx \"pre-install/*.tgz\" \"electron/pre-install/\" && cpx \"themes/**\" \"electron/themes\"",
|
||||||
"dev:electron": "yarn copy:assets && yarn workspace jan dev",
|
"dev:electron": "yarn copy:assets && yarn workspace jan dev",
|
||||||
"dev:web": "yarn workspace @janhq/web dev",
|
"dev:web": "yarn workspace @janhq/web dev",
|
||||||
"dev:server": "yarn workspace @janhq/server dev",
|
"dev:server": "yarn workspace @janhq/server dev",
|
||||||
"dev": "turbo run dev --parallel --filter=!@janhq/server",
|
"dev": "concurrently \"yarn dev:web\" \"yarn dev:electron\"",
|
||||||
"build:server": "cd server && yarn install && yarn run build",
|
"build:server": "cd server && yarn install && yarn run build",
|
||||||
"build:core": "cd core && yarn install && yarn run build",
|
"build:core": "cd core && yarn install && yarn run build && yarn pack",
|
||||||
"build:web": "yarn workspace @janhq/web build && cpx \"web/out/**\" \"electron/renderer/\"",
|
"build:web": "yarn workspace @janhq/web build && cpx \"web/out/**\" \"electron/renderer/\"",
|
||||||
"build:electron": "yarn copy:assets && yarn workspace jan build",
|
"build:electron": "yarn copy:assets && yarn workspace jan build",
|
||||||
"build:electron:test": "yarn workspace jan build:test",
|
"build:electron:test": "yarn workspace jan build:test",
|
||||||
"build:extensions": "rimraf ./pre-install/*.tgz && turbo run @janhq/core#build && cd extensions && yarn install && turbo run build:publish && cd .. && yarn pre-install",
|
"build:extensions": "rimraf ./pre-install/*.tgz || true && yarn workspace @janhq/core build && cd extensions && yarn install && yarn workspaces foreach -Apt run build:publish",
|
||||||
"build:test": "yarn copy:assets && turbo run @janhq/web#build && cpx \"web/out/**\" \"electron/renderer/\" && turbo run build:test",
|
"build:test": "yarn copy:assets && yarn workspace @janhq/web build && cpx \"web/out/**\" \"electron/renderer/\" && yarn workspace jan build:test",
|
||||||
"build": "yarn build:web && yarn build:electron",
|
"build": "yarn build:web && yarn build:electron",
|
||||||
"build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish",
|
"build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish",
|
||||||
"dev:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi dev",
|
"dev:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi dev",
|
||||||
@ -46,12 +35,21 @@
|
|||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^8.2.1",
|
"concurrently": "^9.1.0",
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
"husky": "^9.1.5",
|
"husky": "^9.1.5",
|
||||||
|
"jest": "^29.7.0",
|
||||||
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"wait-on": "^7.0.1"
|
"wait-on": "^7.0.1"
|
||||||
},
|
},
|
||||||
"version": "0.0.0"
|
"version": "0.0.0",
|
||||||
|
"installConfig": {
|
||||||
|
"hoistingLimits": "workspaces"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"yallist": "4.0.0"
|
||||||
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
"@fastify/static": "^6.12.0",
|
"@fastify/static": "^6.12.0",
|
||||||
"@fastify/swagger": "^9.4.0",
|
"@fastify/swagger": "^9.4.0",
|
||||||
"@fastify/swagger-ui": "5.2.0",
|
"@fastify/swagger-ui": "5.2.0",
|
||||||
"@janhq/core": "link:./core",
|
"@janhq/core": "link:../core",
|
||||||
"@npmcli/arborist": "^7.3.1",
|
"@npmcli/arborist": "^7.3.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"fastify": "^5.2.0",
|
"fastify": "^5.2.0",
|
||||||
@ -44,5 +44,6 @@
|
|||||||
"eslint-plugin-react": "^7.34.0",
|
"eslint-plugin-react": "^7.34.0",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
50
turbo.json
50
turbo.json
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://turbo.build/schema.json",
|
|
||||||
"pipeline": {
|
|
||||||
"build": {
|
|
||||||
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
|
|
||||||
},
|
|
||||||
"dev": {
|
|
||||||
"cache": false
|
|
||||||
},
|
|
||||||
"@janhq/web#dev": {
|
|
||||||
"cache": false,
|
|
||||||
"persistent": true,
|
|
||||||
"dependsOn": ["@janhq/core#build", "@janhq/joi#build"]
|
|
||||||
},
|
|
||||||
"@janhq/server#build": {
|
|
||||||
"outputs": ["dist/**"],
|
|
||||||
"dependsOn": ["@janhq/core#build"]
|
|
||||||
},
|
|
||||||
"jan#dev": {
|
|
||||||
"cache": false,
|
|
||||||
"persistent": true,
|
|
||||||
"dependsOn": ["@janhq/core#build", "@janhq/server#build"]
|
|
||||||
},
|
|
||||||
"@janhq/core#build": {
|
|
||||||
"outputs": ["dist/**"]
|
|
||||||
},
|
|
||||||
"@janhq/web#build": {
|
|
||||||
"outputs": ["out/**"],
|
|
||||||
"dependsOn": ["@janhq/core#build", "@janhq/joi#build"]
|
|
||||||
},
|
|
||||||
"jan#build": {
|
|
||||||
"outputs": ["dist/**"],
|
|
||||||
"dependsOn": [
|
|
||||||
"@janhq/core#build",
|
|
||||||
"@janhq/server#build",
|
|
||||||
"@janhq/web#build"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"jan#build:test": {
|
|
||||||
"outputs": ["dist/**"],
|
|
||||||
"cache": false,
|
|
||||||
"dependsOn": [
|
|
||||||
"@janhq/core#build",
|
|
||||||
"@janhq/server#build",
|
|
||||||
"@janhq/web#build"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"type-check": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@ import CopyOverInstruction from './index'
|
|||||||
// Mock the `useAtom` hook from jotai
|
// Mock the `useAtom` hook from jotai
|
||||||
jest.mock('jotai', () => ({
|
jest.mock('jotai', () => ({
|
||||||
useAtom: jest.fn(),
|
useAtom: jest.fn(),
|
||||||
|
atom: jest.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
describe('CopyOverInstruction', () => {
|
describe('CopyOverInstruction', () => {
|
||||||
|
|||||||
@ -2,14 +2,8 @@ import { ChangeEvent, useCallback } from 'react'
|
|||||||
|
|
||||||
import { Switch } from '@janhq/joi'
|
import { Switch } from '@janhq/joi'
|
||||||
import { useAtom } from 'jotai'
|
import { useAtom } from 'jotai'
|
||||||
import { atomWithStorage } from 'jotai/utils'
|
|
||||||
|
|
||||||
const COPY_OVER_INSTRUCTION_ENABLED = 'copy_over_instruction_enabled'
|
import { copyOverInstructionEnabledAtom } from '@/helpers/atoms/App.atom'
|
||||||
|
|
||||||
export const copyOverInstructionEnabledAtom = atomWithStorage(
|
|
||||||
COPY_OVER_INSTRUCTION_ENABLED,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
const CopyOverInstruction: React.FC = () => {
|
const CopyOverInstruction: React.FC = () => {
|
||||||
const [copyOverInstructionEnabled, setCopyOverInstructionEnabled] = useAtom(
|
const [copyOverInstructionEnabled, setCopyOverInstructionEnabled] = useAtom(
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* @jest-environment jsdom
|
||||||
|
*/
|
||||||
import '@testing-library/jest-dom'
|
import '@testing-library/jest-dom'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render, screen, waitFor } from '@testing-library/react'
|
import { render, screen, waitFor } from '@testing-library/react'
|
||||||
|
|||||||
@ -23,3 +23,10 @@ export const showRightPanelAtom = atomWithStorage<boolean>(
|
|||||||
export const showSystemMonitorPanelAtom = atom<boolean>(false)
|
export const showSystemMonitorPanelAtom = atom<boolean>(false)
|
||||||
export const appDownloadProgressAtom = atom<number>(-1)
|
export const appDownloadProgressAtom = atom<number>(-1)
|
||||||
export const updateVersionErrorAtom = atom<string | undefined>(undefined)
|
export const updateVersionErrorAtom = atom<string | undefined>(undefined)
|
||||||
|
|
||||||
|
const COPY_OVER_INSTRUCTION_ENABLED = 'copy_over_instruction_enabled'
|
||||||
|
|
||||||
|
export const copyOverInstructionEnabledAtom = atomWithStorage(
|
||||||
|
COPY_OVER_INSTRUCTION_ENABLED,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { atom, useAtom, useAtomValue, useSetAtom } from 'jotai'
|
|||||||
|
|
||||||
import { useDebouncedCallback } from 'use-debounce'
|
import { useDebouncedCallback } from 'use-debounce'
|
||||||
|
|
||||||
import { copyOverInstructionEnabledAtom } from '@/containers/CopyInstruction'
|
|
||||||
import { fileUploadAtom } from '@/containers/Providers/Jotai'
|
import { fileUploadAtom } from '@/containers/Providers/Jotai'
|
||||||
|
|
||||||
import { toaster } from '@/containers/Toast'
|
import { toaster } from '@/containers/Toast'
|
||||||
@ -27,6 +26,7 @@ import useRecommendedModel from './useRecommendedModel'
|
|||||||
import useSetActiveThread from './useSetActiveThread'
|
import useSetActiveThread from './useSetActiveThread'
|
||||||
|
|
||||||
import { extensionManager } from '@/extension'
|
import { extensionManager } from '@/extension'
|
||||||
|
import { copyOverInstructionEnabledAtom } from '@/helpers/atoms/App.atom'
|
||||||
|
|
||||||
import { experimentalFeatureEnabledAtom } from '@/helpers/atoms/AppConfig.atom'
|
import { experimentalFeatureEnabledAtom } from '@/helpers/atoms/AppConfig.atom'
|
||||||
import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom'
|
import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom'
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* @jest-environment jsdom
|
||||||
|
*/
|
||||||
|
|
||||||
import { renderHook, act } from '@testing-library/react'
|
import { renderHook, act } from '@testing-library/react'
|
||||||
import { useAtom, useAtomValue, useSetAtom } from 'jotai'
|
import { useAtom, useAtomValue, useSetAtom } from 'jotai'
|
||||||
import useDeleteThread from './useDeleteThread'
|
import useDeleteThread from './useDeleteThread'
|
||||||
|
|||||||
@ -18,6 +18,9 @@ const config = {
|
|||||||
'rehype-katex': '<rootDir>/mock/empty-mock.tsx',
|
'rehype-katex': '<rootDir>/mock/empty-mock.tsx',
|
||||||
'rehype-raw': '<rootDir>/mock/empty-mock.tsx',
|
'rehype-raw': '<rootDir>/mock/empty-mock.tsx',
|
||||||
'remark-math': '<rootDir>/mock/empty-mock.tsx',
|
'remark-math': '<rootDir>/mock/empty-mock.tsx',
|
||||||
|
'^react$': '<rootDir>/node_modules/react',
|
||||||
|
'^react/jsx-runtime$': '<rootDir>/node_modules/react/jsx-runtime',
|
||||||
|
'^react-dom$': '<rootDir>/node_modules/react-dom',
|
||||||
},
|
},
|
||||||
// Add more setup options before each test is run
|
// Add more setup options before each test is run
|
||||||
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
||||||
|
|||||||
@ -14,8 +14,9 @@
|
|||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/core": "link:./core",
|
"@janhq/core": "link:../core",
|
||||||
"@janhq/joi": "link:./joi",
|
"@janhq/joi": "link:../joi",
|
||||||
|
"@radix-ui/react-icons": "^1.3.2",
|
||||||
"@tanstack/react-virtual": "^3.10.9",
|
"@tanstack/react-virtual": "^3.10.9",
|
||||||
"@uppy/core": "^4.3.0",
|
"@uppy/core": "^4.3.0",
|
||||||
"@uppy/react": "^4.0.4",
|
"@uppy/react": "^4.0.4",
|
||||||
@ -59,7 +60,10 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/eslint-plugin-next": "^14.0.1",
|
"@next/eslint-plugin-next": "^14.0.1",
|
||||||
|
"@testing-library/dom": "^10.4.0",
|
||||||
|
"@testing-library/jest-dom": "^6.6.3",
|
||||||
"@testing-library/react": "^16.0.1",
|
"@testing-library/react": "^16.0.1",
|
||||||
|
"@testing-library/user-event": "^14.5.2",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/lodash": "^4.14.200",
|
"@types/lodash": "^4.14.200",
|
||||||
"@types/node": "20.8.10",
|
"@types/node": "20.8.10",
|
||||||
@ -89,5 +93,6 @@
|
|||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"highlight.js": "11.10.0"
|
"highlight.js": "11.10.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@4.5.3"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user