Skip to content

Commit b9ea4ba

Browse files
authored
Merge pull request #4468 from janhq/dev
release: Jan 0.5.14 release cut
2 parents e3d44c9 + 9213649 commit b9ea4ba

File tree

507 files changed

+44147
-8558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+44147
-8558
lines changed

.github/scripts/rename-uninstaller.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if [ ! -f "$FILE_PATH" ]; then
1818
fi
1919

2020
# Perform the replacements
21+
sed -i -e "s#Jan#Jan-$CHANNEL#g" "$FILE_PATH"
2122
sed -i -e "s#jan#jan-$CHANNEL#g" "$FILE_PATH"
2223

2324
# Notify completion

.github/workflows/jan-electron-linter-and-test.yml

Lines changed: 36 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ jobs:
4444
- uses: actions/checkout@v3
4545
with:
4646
ref: ${{ github.base_ref }}
47-
- name: Use Node.js v20.9.0
47+
- name: Use Node.js 20.x
4848
uses: actions/setup-node@v3
4949
with:
50-
node-version: v20.9.0
50+
node-version: 20
5151

5252
- name: Install dependencies
5353
run: |
54+
make config-yarn
5455
yarn
55-
yarn build:core
5656
yarn build:joi
57+
yarn build:core
5758
5859
- name: Run test coverage
5960
run: yarn test:coverage
@@ -66,7 +67,7 @@ jobs:
6667

6768
test-on-macos:
6869
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'
69-
runs-on: [self-hosted, macOS, macos-desktop]
70+
runs-on: macos-latest
7071
steps:
7172
- name: Getting the repo
7273
uses: actions/checkout@v3
@@ -78,6 +79,10 @@ jobs:
7879
with:
7980
node-version: 20
8081

82+
- name: Set IS_TEST environment variable
83+
run: |
84+
echo "IS_TEST=true" >> $GITHUB_ENV
85+
8186
- name: 'Cleanup cache'
8287
continue-on-error: true
8388
run: |
@@ -94,24 +99,19 @@ jobs:
9499
run: |
95100
echo "REPORT_PORTAL_DESCRIPTION=${{github.sha}})" >> $GITHUB_ENV
96101
97-
- name: 'Config report portal'
98-
run: |
99-
make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App macos" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
102+
# - name: 'Config report portal'
103+
# run: |
104+
# make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App macos" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
100105

101106
- name: Linter and test
102107
run: |
103-
npm config set registry ${{ secrets.NPM_PROXY }} --global
104-
yarn config set registry ${{ secrets.NPM_PROXY }} --global
105108
make test
106109
env:
107110
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
108-
# TURBO_API: '${{ secrets.TURBO_API }}'
109-
# TURBO_TEAM: 'macos'
110-
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
111111

112112
test-on-macos-pr-target:
113113
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
114-
runs-on: [self-hosted, macOS, macos-desktop]
114+
runs-on: macos-latest
115115
steps:
116116
- name: Getting the repo
117117
uses: actions/checkout@v3
@@ -131,8 +131,6 @@ jobs:
131131
132132
- name: Linter and test
133133
run: |
134-
npm config set registry https://registry.npmjs.org --global
135-
yarn config set registry https://registry.npmjs.org --global
136134
make test
137135
env:
138136
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
@@ -174,32 +172,27 @@ jobs:
174172
run: |
175173
echo "REPORT_PORTAL_DESCRIPTION=${{github.sha}}" >> $GITHUB_ENV
176174
177-
- name: 'Config report portal'
178-
shell: bash
179-
run: |
180-
make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Windows ${{ matrix.antivirus-tools }}" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
175+
# - name: 'Config report portal'
176+
# shell: bash
177+
# run: |
178+
# make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Windows ${{ matrix.antivirus-tools }}" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
181179

182180
- name: Linter and test
183181
shell: powershell
184182
run: |
185-
npm config set registry ${{ secrets.NPM_PROXY }} --global
186-
yarn config set registry ${{ secrets.NPM_PROXY }} --global
187183
make test
188-
# env:
189-
# TURBO_API: '${{ secrets.TURBO_API }}'
190-
# TURBO_TEAM: 'windows'
191-
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
184+
192185
test-on-windows-pr:
193-
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
194-
runs-on: windows-desktop-default-windows-security
186+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'workflow_dispatch'
187+
runs-on: windows-latest
195188
steps:
196189
- name: Getting the repo
197190
uses: actions/checkout@v3
198191
with:
199192
fetch-depth: 0
200193

201194
- name: Installing node
202-
uses: actions/setup-node@v1
195+
uses: actions/setup-node@v3
203196
with:
204197
node-version: 20
205198

@@ -222,25 +215,19 @@ jobs:
222215
run: |
223216
echo "REPORT_PORTAL_DESCRIPTION=${{github.event.after}}" >> $GITHUB_ENV
224217
225-
- name: 'Config report portal'
226-
shell: bash
227-
run: |
228-
make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Windows" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
218+
# - name: 'Config report portal'
219+
# shell: bash
220+
# run: |
221+
# make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Windows" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
229222

230223
- name: Linter and test
231224
shell: powershell
232225
run: |
233-
npm config set registry ${{ secrets.NPM_PROXY }} --global
234-
yarn config set registry ${{ secrets.NPM_PROXY }} --global
235226
make test
236-
# env:
237-
# TURBO_API: '${{ secrets.TURBO_API }}'
238-
# TURBO_TEAM: 'windows'
239-
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
240227
241228
test-on-windows-pr-target:
242229
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
243-
runs-on: windows-desktop-default-windows-security
230+
runs-on: windows-latest
244231
steps:
245232
- name: Getting the repo
246233
uses: actions/checkout@v3
@@ -268,12 +255,10 @@ jobs:
268255
- name: Linter and test
269256
shell: powershell
270257
run: |
271-
npm config set registry https://registry.npmjs.org --global
272-
yarn config set registry https://registry.npmjs.org --global
273258
make test
274259
275260
test-on-ubuntu:
276-
runs-on: [self-hosted, Linux, ubuntu-desktop]
261+
runs-on: ubuntu-latest
277262
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'
278263
steps:
279264
- name: Getting the repo
@@ -302,22 +287,16 @@ jobs:
302287
run: |
303288
echo "REPORT_PORTAL_DESCRIPTION=${{github.sha}}" >> $GITHUB_ENV
304289
305-
- name: 'Config report portal'
306-
shell: bash
307-
run: |
308-
make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Linux" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
290+
# - name: 'Config report portal'
291+
# shell: bash
292+
# run: |
293+
# make update-playwright-config REPORT_PORTAL_URL=${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_API_KEY=${{ secrets.REPORT_PORTAL_API_KEY }} REPORT_PORTAL_PROJECT_NAME=${{ secrets.REPORT_PORTAL_PROJECT_NAME }} REPORT_PORTAL_LAUNCH_NAME="Jan App Linux" REPORT_PORTAL_DESCRIPTION="${{env.REPORT_PORTAL_DESCRIPTION}}"
309294

310295
- name: Linter and test
311296
run: |
312297
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
313298
echo -e "Display ID: $DISPLAY"
314-
npm config set registry ${{ secrets.NPM_PROXY }} --global
315-
yarn config set registry ${{ secrets.NPM_PROXY }} --global
316299
make test
317-
# env:
318-
# TURBO_API: '${{ secrets.TURBO_API }}'
319-
# TURBO_TEAM: 'linux'
320-
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
321300
322301
- uses: actions/upload-artifact@v4
323302
if: always()
@@ -327,7 +306,7 @@ jobs:
327306
retention-days: 2
328307

329308
coverage-check:
330-
runs-on: [self-hosted, Linux, ubuntu-desktop]
309+
runs-on: ubuntu-latest
331310
needs: base_branch_cov
332311
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'
333312
steps:
@@ -341,6 +320,9 @@ jobs:
341320
with:
342321
node-version: 20
343322

323+
- name: Install yarn
324+
run: npm install -g yarn
325+
344326
- name: 'Cleanup cache'
345327
continue-on-error: true
346328
run: |
@@ -356,15 +338,9 @@ jobs:
356338
run: |
357339
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
358340
echo -e "Display ID: $DISPLAY"
359-
npm config set registry ${{ secrets.NPM_PROXY }} --global
360-
yarn config set registry ${{ secrets.NPM_PROXY }} --global
361341
make lint
362342
yarn build:test
363343
yarn test:coverage
364-
# env:
365-
# TURBO_API: '${{ secrets.TURBO_API }}'
366-
# TURBO_TEAM: 'linux'
367-
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
368344
369345
- name: Generate Code Coverage report
370346
id: code-coverage
@@ -377,7 +353,7 @@ jobs:
377353
show-annotations: 'warning'
378354

379355
test-on-ubuntu-pr-target:
380-
runs-on: [self-hosted, Linux, ubuntu-desktop]
356+
runs-on: ubuntu-latest
381357
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
382358
steps:
383359
- name: Getting the repo
@@ -400,6 +376,4 @@ jobs:
400376
run: |
401377
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
402378
echo -e "Display ID: $DISPLAY"
403-
npm config set registry https://registry.npmjs.org --global
404-
yarn config set registry https://registry.npmjs.org --global
405379
make test

.github/workflows/publish-npm-core.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Publish plugin models Package to npmjs
1+
name: Publish core Package to npmjs
22
on:
33
push:
44
tags: ["v[0-9]+.[0-9]+.[0-9]+-core"]
5-
paths: ["core/**"]
5+
paths: ["core/**", ".github/workflows/publish-npm-core.yml"]
66
pull_request:
7-
paths: ["core/**"]
7+
paths: ["core/**", ".github/workflows/publish-npm-core.yml"]
88
jobs:
99
build-and-publish-plugins:
1010
environment: production
@@ -45,7 +45,7 @@ jobs:
4545
node-version: "20.x"
4646
registry-url: "https://registry.npmjs.org"
4747

48-
- run: cd core && yarn install && yarn build
48+
- run: cd core && corepack enable && corepack prepare [email protected] --activate && yarn --version && yarn config set -H enableImmutableInstalls false && yarn install && yarn build
4949

5050
- run: cd core && yarn publish --access public
5151
if: github.event_name == 'push'

.github/workflows/publish-npm-joi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Publish plugin models Package to npmjs
1+
name: Publish joi Package to npmjs
22
on:
33
push:
44
tags: ["v[0-9]+.[0-9]+.[0-9]+-joi"]
5-
paths: ["joi/**"]
5+
paths: ["joi/**", ".github/workflows/publish-npm-joi.yml"]
66
pull_request:
7-
paths: ["joi/**"]
7+
paths: ["joi/**", ".github/workflows/publish-npm-joi.yml"]
88
jobs:
99
build-and-publish-plugins:
1010
environment: production
@@ -45,7 +45,7 @@ jobs:
4545
node-version: "20.x"
4646
registry-url: "https://registry.npmjs.org"
4747

48-
- run: cd joi && yarn install && yarn build
48+
- run: cd joi && corepack enable && corepack prepare [email protected] --activate && yarn --version && yarn config set -H enableImmutableInstalls false && yarn install && yarn build
4949

5050
- run: cd joi && yarn publish --access public
5151
if: github.event_name == 'push'

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error.log
88
node_modules
99
*.tgz
1010
!charts/server/charts/*.tgz
11-
yarn.lock
1211
dist
1312
build
1413
.DS_Store
@@ -48,3 +47,7 @@ coverage
4847
test_results.html
4948
*.tsbuildinfo
5049
electron/shared/**
50+
51+
# docs
52+
docs/yarn.lock
53+
electron/.version.bak

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nmHoistingLimits: workspaces
2+
nodeLinker: node-modules
3+
checksumBehavior: update

Makefile

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ REPORT_PORTAL_DESCRIPTION ?= "Jan App report"
1010
all:
1111
@echo "Specify a target to run"
1212

13-
# Builds the UI kit
14-
build-joi:
15-
ifeq ($(OS),Windows_NT)
16-
cd joi && yarn config set network-timeout 300000 && yarn install && yarn build
17-
else
18-
cd joi && yarn install && yarn build
19-
endif
13+
# Config yarn version
14+
15+
config-yarn:
16+
corepack enable
17+
corepack prepare [email protected] --activate
18+
yarn --version
19+
yarn config set -H enableImmutableInstalls false
2020

2121
# Installs yarn dependencies and builds core and extensions
22-
install-and-build: build-joi
22+
install-and-build: config-yarn
2323
ifeq ($(OS),Windows_NT)
24-
yarn config set network-timeout 300000
24+
echo "skip"
2525
endif
26-
yarn global add [email protected]
26+
yarn install
27+
yarn build:joi
2728
yarn build:core
2829
yarn build:server
29-
yarn install
3030
yarn build:extensions
3131

3232
check-file-counts: install-and-build
@@ -117,9 +117,8 @@ build: check-file-counts
117117

118118
clean:
119119
ifeq ($(OS),Windows_NT)
120-
-powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out, .turbo -Recurse -Directory | Remove-Item -Recurse -Force"
121-
-powershell -Command "Get-ChildItem -Path . -Include package-lock.json -Recurse -File | Remove-Item -Recurse -Force"
122-
-powershell -Command "Get-ChildItem -Path . -Include yarn.lock -Recurse -File | Remove-Item -Recurse -Force"
120+
-powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out, .turbo, .yarn -Recurse -Directory | Remove-Item -Recurse -Force"
121+
-powershell -Command "Get-ChildItem -Path . -Include package-lock.json, tsconfig.tsbuildinfo -Recurse -File | Remove-Item -Recurse -Force"
123122
-powershell -Command "Remove-Item -Recurse -Force ./pre-install/*.tgz"
124123
-powershell -Command "Remove-Item -Recurse -Force ./extensions/*/*.tgz"
125124
-powershell -Command "Remove-Item -Recurse -Force ./electron/pre-install/*.tgz"
@@ -131,8 +130,8 @@ else ifeq ($(shell uname -s),Linux)
131130
find . -name "build" -type d -exec rm -rf '{}' +
132131
find . -name "out" -type d -exec rm -rf '{}' +
133132
find . -name ".turbo" -type d -exec rm -rf '{}' +
133+
find . -name ".yarn" -type d -exec rm -rf '{}' +
134134
find . -name "packake-lock.json" -type f -exec rm -rf '{}' +
135-
find . -name "yarn.lock" -type f -exec rm -rf '{}' +
136135
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
137136
rm -rf ./pre-install/*.tgz
138137
rm -rf ./extensions/*/*.tgz
@@ -146,8 +145,8 @@ else
146145
find . -name "build" -type d -exec rm -rf '{}' +
147146
find . -name "out" -type d -exec rm -rf '{}' +
148147
find . -name ".turbo" -type d -exec rm -rf '{}' +
148+
find . -name ".yarn" -type d -exec rm -rf '{}' +
149149
find . -name "package-lock.json" -type f -exec rm -rf '{}' +
150-
find . -name "yarn.lock" -type f -exec rm -rf '{}' +
151150
rm -rf ./pre-install/*.tgz
152151
rm -rf ./extensions/*/*.tgz
153152
rm -rf ./electron/pre-install/*.tgz

ai.menlo.jan.desktop

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Name=Jan
3+
Comment=Local AI Assistant that runs 100% offline
4+
Exec=run.sh
5+
Icon=ai.menlo.jan
6+
Type=Application
7+
Categories=Development;
8+
Keywords=AI;Assistant;LLM;ChatGPT;Local;Offline;
9+
StartupNotify=true

0 commit comments

Comments
 (0)