Skip to content

Commit

Permalink
feat: class-based plugin manager
Browse files Browse the repository at this point in the history
chore: add facades

refactor: core module export

refactor: inference plugin - deprecate function registering (janhq#537)

* refactor: revamp inference plugin as class - deprecate function registering

* refactor: monitoring plugin - deprecate service registering (janhq#538)

refactor: revamp inference plugin as class - deprecate function registering

chore: update import

refactor: plugin revamp - model management

chore: update build steps and remove experimental plugins

refactor: remove pluggable electron

chore: add sorting for conversations

chore: build plugins for testing

chore: consistent plugin directory name

chore: docs

chore: fix CI

chore: update conversation prefix
  • Loading branch information
louis-jan committed Nov 6, 2023
1 parent f4772fb commit 96dba26
Show file tree
Hide file tree
Showing 147 changed files with 1,800 additions and 3,670 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/jan-electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install yarn dependencies
run: |
yarn install
yarn build:pull-plugins
yarn build:plugins
env:
APP_PATH: "."
DEVELOPER_ID: ${{ secrets.DEVELOPER_ID }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
run: |
yarn config set network-timeout 300000
yarn install
yarn build:pull-plugins
yarn build:plugins
- name: Build and publish app
run: |
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
run: |
yarn config set network-timeout 300000
yarn install
yarn build:pull-plugins
yarn build:plugins
- name: Build and publish app
run: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ jobs:
- name: Linter and test
run: |
yarn config set network-timeout 300000
yarn build:core
yarn install
yarn lint
yarn build:pull-plugins
yarn build:plugins
yarn build:test
yarn test
env:
Expand Down Expand Up @@ -75,8 +76,9 @@ jobs:
- name: Linter and test
run: |
yarn config set network-timeout 300000
yarn build:core
yarn install
yarn build:pull-plugins
yarn build:plugins
yarn build:test-win32
yarn test
Expand All @@ -103,7 +105,8 @@ jobs:
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
echo -e "Display ID: $DISPLAY"
yarn config set network-timeout 300000
yarn build:core
yarn install
yarn build:pull-plugins
yarn build:plugins
yarn build:test-linux
yarn test
18 changes: 18 additions & 0 deletions .github/workflows/jan-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
for dir in $(cat /tmp/change_dir.txt)
do
echo "$dir"
if [ ! -d "$dir" ]; then
echo "Directory $dir does not exist, plugin might be removed, skipping..."
continue
fi
# Extract current version
current_version=$(jq -r '.version' $dir/package.json)
Expand All @@ -80,13 +85,22 @@ jobs:
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Build core module
run: |
cd core
npm install
npm run build
- name: Publish npm packages
run: |
cd plugins
for dir in $(cat /tmp/change_dir.txt)
do
echo $dir
if [ ! -d "$dir" ]; then
echo "Directory $dir does not exist, plugin might be removed, skipping..."
continue
fi
cd $dir
npm install
if [[ $dir == 'data-plugin' ]]; then
Expand All @@ -112,6 +126,10 @@ jobs:
for dir in $(cat /tmp/change_dir.txt)
do
echo "$dir"
if [ ! -d "$dir" ]; then
echo "Directory $dir does not exist, plugin might be removed, skipping..."
continue
fi
version=$(jq -r '.version' plugins/$dir/package.json)
git config --global user.email "[email protected]"
git config --global user.name "Service Account"
Expand Down
Loading

0 comments on commit 96dba26

Please sign in to comment.