Move plugins folder from electron to root folder (#366)
* Move plugins folder from electron to root folder * Add CICD for plugins * Fix error electron import plugin after change plugin name * Add remove app cache on CI test pipeline --------- Co-authored-by: Hien To <>
This commit is contained in:
parent
e5f636c0f1
commit
e1e6fddcdf
3
.github/workflows/linter-and-test.yml
vendored
3
.github/workflows/linter-and-test.yml
vendored
@ -32,6 +32,7 @@ jobs:
|
|||||||
rm -rf ./* || true
|
rm -rf ./* || true
|
||||||
rm -rf ./.??* || true
|
rm -rf ./.??* || true
|
||||||
ls -la ./
|
ls -la ./
|
||||||
|
rm -rf ~/Library/Application\ Support/jan
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ jobs:
|
|||||||
- name: Clean workspace
|
- name: Clean workspace
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path .\* -Force -Recurse
|
Remove-Item -Path .\* -Force -Recurse
|
||||||
|
Remove-Item -Path "$Env:APPDATA\jan" -Force -Recurse
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ jobs:
|
|||||||
rm -rf ./* || true
|
rm -rf ./* || true
|
||||||
rm -rf ./.??* || true
|
rm -rf ./.??* || true
|
||||||
ls -la ./
|
ls -la ./
|
||||||
|
rm -rf ~/.config/jan
|
||||||
- name: Getting the repo
|
- name: Getting the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
91
.github/workflows/publish-plugins.yml
vendored
Normal file
91
.github/workflows/publish-plugins.yml
vendored
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
name: Publish plugins/$dir Package to npmjs
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "plugins/**"
|
||||||
|
- ".github/workflows/publish-plugins.yml"
|
||||||
|
- "!plugins/*/package.json"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: "0"
|
||||||
|
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
|
||||||
|
|
||||||
|
- name: Install jq
|
||||||
|
uses: dcarbone/install-jq-action@v2.0.1
|
||||||
|
|
||||||
|
- name: Check Path Change
|
||||||
|
run: |
|
||||||
|
git config --global user.email "service@jan.ai"
|
||||||
|
git config --global user.name "Service Account"
|
||||||
|
echo "Changes in these directories trigger the build:"
|
||||||
|
changed_dirs=$(git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.GITHUB_TOKEN }}" diff --name-only HEAD HEAD~1 | grep 'plugins/' | awk -F/ '{print $2}' | uniq)
|
||||||
|
echo $changed_dirs > /tmp/change_dir.txt
|
||||||
|
|
||||||
|
- name: "Auto Increase package Version"
|
||||||
|
run: |
|
||||||
|
cd plugins
|
||||||
|
for dir in $(cat /tmp/change_dir.txt)
|
||||||
|
do
|
||||||
|
echo "$dir"
|
||||||
|
# Extract current version
|
||||||
|
current_version=$(jq -r '.version' $dir/package.json)
|
||||||
|
|
||||||
|
# Break the version into its components
|
||||||
|
major_version=$(echo $current_version | cut -d "." -f 1)
|
||||||
|
minor_version=$(echo $current_version | cut -d "." -f 2)
|
||||||
|
patch_version=$(echo $current_version | cut -d "." -f 3)
|
||||||
|
|
||||||
|
# Increment the patch version by one
|
||||||
|
new_patch_version=$((patch_version+1))
|
||||||
|
|
||||||
|
# Construct the new version
|
||||||
|
new_version="$major_version.$minor_version.$new_patch_version"
|
||||||
|
|
||||||
|
# Replace the old version with the new version in package.json
|
||||||
|
jq --arg version "$new_version" '.version = $version' $dir/package.json > /tmp/package.json && mv /tmp/package.json $dir/package.json
|
||||||
|
|
||||||
|
# Print the new version
|
||||||
|
echo "Updated $dir package.json version to: $new_version"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Setup .npmrc file to publish to npm
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "20.x"
|
||||||
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
|
- name: Publish npm packages
|
||||||
|
run: |
|
||||||
|
cd plugins
|
||||||
|
for dir in $(cat /tmp/change_dir.txt)
|
||||||
|
do
|
||||||
|
echo $dir
|
||||||
|
cd $dir
|
||||||
|
npm install && npm run build
|
||||||
|
npm publish --access public
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Commit new version to main and create tag"
|
||||||
|
run: |
|
||||||
|
for dir in $(cat /tmp/change_dir.txt)
|
||||||
|
do
|
||||||
|
echo "$dir"
|
||||||
|
version=$(jq -r '.version' plugins/$dir/package.json)
|
||||||
|
git config --global user.email "service@jan.ai"
|
||||||
|
git config --global user.name "Service Account"
|
||||||
|
git add plugins/$dir/package.json
|
||||||
|
git commit -m "${GITHUB_REPOSITORY}: Update tag build $version for $dir"
|
||||||
|
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
|
||||||
|
git tag -a $dir-$version -m "${GITHUB_REPOSITORY}: Update tag build $version for $dir"
|
||||||
|
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin $dir-$version
|
||||||
|
done
|
||||||
@ -22,8 +22,8 @@
|
|||||||
"build:core": "cd plugin-core && yarn install && yarn run build",
|
"build:core": "cd plugin-core && yarn install && yarn run build",
|
||||||
"build:web": "yarn workspace jan-web build && cpx \"web/out/**\" \"electron/renderer/\"",
|
"build:web": "yarn workspace jan-web build && cpx \"web/out/**\" \"electron/renderer/\"",
|
||||||
"build:electron": "yarn workspace jan build",
|
"build:electron": "yarn workspace jan build",
|
||||||
"build:plugins": "rimraf ./electron/core/pre-install/*.tgz && concurrently --kill-others-on-fail \"cd ./electron/core/plugins/data-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/monitoring-plugin && npm install && npm run postinstall\" && concurrently --kill-others-on-fail \"cd ./electron/core/plugins/data-plugin && npm run build:publish\" \"cd ./electron/core/plugins/inference-plugin && npm run build:publish\" \"cd ./electron/core/plugins/model-management-plugin && npm run build:publish\" \"cd ./electron/core/plugins/monitoring-plugin && npm run build:publish\"",
|
"build:plugins": "rimraf ./electron/core/pre-install/*.tgz && concurrently --kill-others-on-fail \"cd ./plugins/data-plugin && npm install && npm run postinstall\" \"cd ./plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./plugins/monitoring-plugin && npm install && npm run postinstall\" && concurrently --kill-others-on-fail \"cd ./plugins/data-plugin && npm run build:publish\" \"cd ./plugins/inference-plugin && npm run build:publish\" \"cd ./plugins/model-management-plugin && npm run build:publish\" \"cd ./plugins/monitoring-plugin && npm run build:publish\"",
|
||||||
"build:plugins-darwin": "rimraf ./electron/core/pre-install/*.tgz && concurrently \"cd ./electron/core/plugins/data-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./electron/core/plugins/monitoring-plugin && npm install && npm run postinstall\" && chmod +x ./electron/auto-sign.sh && ./electron/auto-sign.sh && concurrently \"cd ./electron/core/plugins/data-plugin && npm run build:publish\" \"cd ./electron/core/plugins/inference-plugin && npm run build:publish\" \"cd ./electron/core/plugins/model-management-plugin && npm run build:publish\" \"cd ./electron/core/plugins/monitoring-plugin && npm run build:publish\"",
|
"build:plugins-darwin": "rimraf ./electron/core/pre-install/*.tgz && concurrently \"cd ./plugins/data-plugin && npm install && npm run postinstall\" \"cd ./plugins/inference-plugin && npm install && npm run postinstall\" \"cd ./plugins/model-management-plugin && npm install && npm run postinstall\" \"cd ./plugins/monitoring-plugin && npm install && npm run postinstall\" && chmod +x ./electron/auto-sign.sh && ./electron/auto-sign.sh && concurrently \"cd ./plugins/data-plugin && npm run build:publish\" \"cd ./plugins/inference-plugin && npm run build:publish\" \"cd ./plugins/model-management-plugin && npm run build:publish\" \"cd ./plugins/monitoring-plugin && npm run build:publish\"",
|
||||||
"build": "yarn build:web && yarn build:electron",
|
"build": "yarn build:web && yarn build:electron",
|
||||||
"build:darwin": "yarn build:web && yarn workspace jan build:darwin",
|
"build:darwin": "yarn build:web && yarn workspace jan build:darwin",
|
||||||
"build:win32": "yarn build:web && yarn workspace jan build:win32",
|
"build:win32": "yarn build:web && yarn workspace jan build:win32",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { core, store, RegisterExtensionPoint, StoreService, DataService, PluginService } from "@janhq/plugin-core";
|
import { core, store, RegisterExtensionPoint, StoreService, DataService, PluginService } from "@janhq/plugin-core";
|
||||||
|
|
||||||
const PluginName = "data-plugin";
|
const PluginName = "@janhq/data-plugin";
|
||||||
const MODULE_PATH = "data-plugin/dist/cjs/module.js";
|
const MODULE_PATH = "@janhq/data-plugin/dist/cjs/module.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a collection on data store
|
* Create a collection on data store
|
||||||
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "data-plugin",
|
"name": "@janhq/data-plugin",
|
||||||
"version": "1.0.4",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "data-plugin",
|
"name": "@janhq/data-plugin",
|
||||||
"version": "1.0.4",
|
"version": "1.0.0",
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"pouchdb-node",
|
"pouchdb-node",
|
||||||
"pouchdb-find"
|
"pouchdb-find"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/plugin-core": "^0.1.5",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"pouchdb-find": "^8.0.1",
|
"pouchdb-find": "^8.0.1",
|
||||||
"pouchdb-node": "^8.0.1"
|
"pouchdb-node": "^8.0.1"
|
||||||
},
|
},
|
||||||
@ -29,15 +29,6 @@
|
|||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../../../../plugin-core": {
|
|
||||||
"name": "@janhq/plugin-core",
|
|
||||||
"version": "0.1.6",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^12.0.2",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@cspotcode/source-map-support": {
|
"node_modules/@cspotcode/source-map-support": {
|
||||||
"version": "0.8.1",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||||
@ -60,8 +51,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@janhq/plugin-core": {
|
"node_modules/@janhq/plugin-core": {
|
||||||
"resolved": "../../../../plugin-core",
|
"version": "0.1.8",
|
||||||
"link": true
|
"resolved": "https://registry.npmjs.org/@janhq/plugin-core/-/plugin-core-0.1.8.tgz",
|
||||||
|
"integrity": "sha512-wJe+8ndMQLGLSV36Jt1V3s5lmH+nQw87ol2NMhHuVWXfwf+DAO1GTdTeHfemHWdcB/oUY1HVRvsNh8DvBgbh/w=="
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "data-plugin",
|
"name": "@janhq/data-plugin",
|
||||||
"version": "1.0.4",
|
"version": "1.0.0",
|
||||||
"description": "The Data Connector provides easy access to a data API using the PouchDB engine. It offers accessible data management capabilities.",
|
"description": "The Data Connector provides easy access to a data API using the PouchDB engine. It offers accessible data management capabilities.",
|
||||||
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/circle-stack.svg",
|
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/circle-stack.svg",
|
||||||
"main": "dist/esm/index.js",
|
"main": "dist/esm/index.js",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --project ./config/tsconfig.esm.json && tsc --project ./config/tsconfig.cjs.json && webpack --config webpack.config.js",
|
"build": "tsc --project ./config/tsconfig.esm.json && tsc --project ./config/tsconfig.cjs.json && webpack --config webpack.config.js",
|
||||||
"postinstall": "rimraf ./data-plugin*.tgz && npm run build",
|
"postinstall": "rimraf ./data-plugin*.tgz && npm run build",
|
||||||
"build:publish": "npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"import": "./dist/esm/index.js",
|
"import": "./dist/esm/index.js",
|
||||||
@ -39,7 +39,7 @@
|
|||||||
"node_modules"
|
"node_modules"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/plugin-core": "^0.1.7",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"pouchdb-find": "^8.0.1",
|
"pouchdb-find": "^8.0.1",
|
||||||
"pouchdb-node": "^8.0.1"
|
"pouchdb-node": "^8.0.1"
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { EventName, InferenceService, NewMessageRequest, PluginService, core, events, store } from "@janhq/plugin-core";
|
import { EventName, InferenceService, NewMessageRequest, PluginService, core, events, store } from "@janhq/plugin-core";
|
||||||
|
|
||||||
const PluginName = "inference-plugin";
|
const PluginName = "@janhq/inference-plugin";
|
||||||
const MODULE_PATH = `${PluginName}/dist/module.js`;
|
const MODULE_PATH = `${PluginName}/dist/module.js`;
|
||||||
const inferenceUrl = "http://localhost:3928/llama/chat_completion";
|
const inferenceUrl = "http://localhost:3928/llama/chat_completion";
|
||||||
|
|
||||||
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "inference-plugin",
|
"name": "@janhq/inference-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "inference-plugin",
|
"name": "@janhq/inference-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"tcp-port-used",
|
"tcp-port-used",
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/plugin-core": "^0.1.5",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"kill-port-process": "^3.2.0",
|
"kill-port-process": "^3.2.0",
|
||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
"ts-loader": "^9.5.0"
|
"ts-loader": "^9.5.0"
|
||||||
@ -29,15 +29,6 @@
|
|||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../../../../plugin-core": {
|
|
||||||
"name": "@janhq/plugin-core",
|
|
||||||
"version": "0.1.6",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^12.0.2",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discoveryjs/json-ext": {
|
"node_modules/@discoveryjs/json-ext": {
|
||||||
"version": "0.5.7",
|
"version": "0.5.7",
|
||||||
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||||
@ -48,8 +39,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@janhq/plugin-core": {
|
"node_modules/@janhq/plugin-core": {
|
||||||
"resolved": "../../../../plugin-core",
|
"version": "0.1.8",
|
||||||
"link": true
|
"resolved": "https://registry.npmjs.org/@janhq/plugin-core/-/plugin-core-0.1.8.tgz",
|
||||||
|
"integrity": "sha512-wJe+8ndMQLGLSV36Jt1V3s5lmH+nQw87ol2NMhHuVWXfwf+DAO1GTdTeHfemHWdcB/oUY1HVRvsNh8DvBgbh/w=="
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "inference-plugin",
|
"name": "@janhq/inference-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Inference Plugin, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.",
|
"description": "Inference Plugin, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.",
|
||||||
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/command-line.svg",
|
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/command-line.svg",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"postinstall": "rimraf ./*.tgz && npm run build && rimraf dist/nitro/* && cpx \"nitro/**\" \"dist/nitro\"",
|
"postinstall": "rimraf ./*.tgz && npm run build && rimraf dist/nitro/* && cpx \"nitro/**\" \"dist/nitro\"",
|
||||||
"build:publish": "npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/plugin-core": "^0.1.7",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"kill-port-process": "^3.2.0",
|
"kill-port-process": "^3.2.0",
|
||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
"ts-loader": "^9.5.0"
|
"ts-loader": "^9.5.0"
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { ModelManagementService, PluginService, RegisterExtensionPoint, core, store } from "@janhq/plugin-core";
|
import { ModelManagementService, PluginService, RegisterExtensionPoint, core, store } from "@janhq/plugin-core";
|
||||||
|
|
||||||
const PluginName = "model-management-plugin";
|
const PluginName = "@janhq/model-management-plugin";
|
||||||
const MODULE_PATH = "model-management-plugin/dist/module.js";
|
const MODULE_PATH = "@janhq/model-management-plugin/dist/module.js";
|
||||||
|
|
||||||
const getDownloadedModels = () => core.invokePluginFunc(MODULE_PATH, "getDownloadedModels");
|
const getDownloadedModels = () => core.invokePluginFunc(MODULE_PATH, "getDownloadedModels");
|
||||||
|
|
||||||
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "model-management-plugin",
|
"name": "@janhq/model-management-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "model-management-plugin",
|
"name": "@janhq/model-management-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"@huggingface/hub"
|
"@huggingface/hub"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@huggingface/hub": "^0.8.5",
|
"@huggingface/hub": "^0.8.5",
|
||||||
"@janhq/plugin-core": "^0.1.5",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"ts-loader": "^9.5.0"
|
"ts-loader": "^9.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -24,15 +24,6 @@
|
|||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../../../../plugin-core": {
|
|
||||||
"name": "@janhq/plugin-core",
|
|
||||||
"version": "0.1.6",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^12.0.2",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discoveryjs/json-ext": {
|
"node_modules/@discoveryjs/json-ext": {
|
||||||
"version": "0.5.7",
|
"version": "0.5.7",
|
||||||
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||||
@ -55,8 +46,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@janhq/plugin-core": {
|
"node_modules/@janhq/plugin-core": {
|
||||||
"resolved": "../../../../plugin-core",
|
"version": "0.1.8",
|
||||||
"link": true
|
"resolved": "https://registry.npmjs.org/@janhq/plugin-core/-/plugin-core-0.1.8.tgz",
|
||||||
|
"integrity": "sha512-wJe+8ndMQLGLSV36Jt1V3s5lmH+nQw87ol2NMhHuVWXfwf+DAO1GTdTeHfemHWdcB/oUY1HVRvsNh8DvBgbh/w=="
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "model-management-plugin",
|
"name": "@janhq/model-management-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Model Management Plugin provides model exploration and seamless downloads",
|
"description": "Model Management Plugin provides model exploration and seamless downloads",
|
||||||
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/queue-list.svg",
|
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/queue-list.svg",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"postinstall": "rimraf ./*.tgz && npm run build",
|
"postinstall": "rimraf ./*.tgz && npm run build",
|
||||||
"build:publish": "npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0",
|
"cpx": "^1.5.0",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@huggingface/hub": "^0.8.5",
|
"@huggingface/hub": "^0.8.5",
|
||||||
"@janhq/plugin-core": "^0.1.7",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"ts-loader": "^9.5.0"
|
"ts-loader": "^9.5.0"
|
||||||
},
|
},
|
||||||
"bundledDependencies": [
|
"bundledDependencies": [
|
||||||
@ -1,5 +1,5 @@
|
|||||||
// Provide an async method to manipulate the price provided by the extension point
|
// Provide an async method to manipulate the price provided by the extension point
|
||||||
const PLUGIN_NAME = "monitoring-plugin/dist/module.js";
|
const PLUGIN_NAME = "@janhq/monitoring-plugin/dist/module.js";
|
||||||
|
|
||||||
const getResourcesInfo = () => {
|
const getResourcesInfo = () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "monitoring-plugin",
|
"name": "@janhq/monitoring-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "monitoring-plugin",
|
"name": "@janhq/monitoring-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundleDependencies": [
|
"bundleDependencies": [
|
||||||
"systeminformation"
|
"systeminformation"
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "monitoring-plugin",
|
"name": "@janhq/monitoring-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Utilizing systeminformation, it provides essential System and OS information retrieval",
|
"description": "Utilizing systeminformation, it provides essential System and OS information retrieval",
|
||||||
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/cpu-chip.svg",
|
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/cpu-chip.svg",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --config webpack.config.js",
|
"build": "webpack --config webpack.config.js",
|
||||||
"postinstall": "rimraf ./*.tgz && npm run build && cpx \"module.js\" \"dist\"",
|
"postinstall": "rimraf ./*.tgz && npm run build && cpx \"module.js\" \"dist\"",
|
||||||
"build:publish": "npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
} from "@janhq/plugin-core";
|
} from "@janhq/plugin-core";
|
||||||
import { Configuration, OpenAIApi } from "azure-openai";
|
import { Configuration, OpenAIApi } from "azure-openai";
|
||||||
|
|
||||||
const PluginName = "openai-plugin";
|
const PluginName = "@janhq/openai-plugin";
|
||||||
|
|
||||||
const setRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
const setRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
||||||
XMLHttpRequest.prototype.setRequestHeader = function newSetRequestHeader(key: string, val: string) {
|
XMLHttpRequest.prototype.setRequestHeader = function newSetRequestHeader(key: string, val: string) {
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "azure-openai-plugin",
|
"name": "@janhq/azure-openai-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Inference plugin for Azure OpenAI",
|
"description": "Inference plugin for Azure OpenAI",
|
||||||
"icon": "https://static-assets.jan.ai/openai-icon.jpg",
|
"icon": "https://static-assets.jan.ai/openai-icon.jpg",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||||
"postinstall": "rimraf ./*.tgz && npm run build && rimraf dist/nitro/* && cpx \"nitro/**\" \"dist/nitro\"",
|
"postinstall": "rimraf ./*.tgz && npm run build && rimraf dist/nitro/* && cpx \"nitro/**\" \"dist/nitro\"",
|
||||||
"build:publish": "npm pack && cpx *.tgz ../../pre-install"
|
"build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@janhq/plugin-core": "^0.1.7",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"azure-openai": "^0.9.4",
|
"azure-openai": "^0.9.4",
|
||||||
"kill-port-process": "^3.2.0",
|
"kill-port-process": "^3.2.0",
|
||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
@ -13,7 +13,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.7.15",
|
"@headlessui/react": "^1.7.15",
|
||||||
"@heroicons/react": "^2.0.18",
|
"@heroicons/react": "^2.0.18",
|
||||||
"@janhq/plugin-core": "file:../plugin-core",
|
"@janhq/plugin-core": "^0.1.8",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/react": "18.2.15",
|
"@types/react": "18.2.15",
|
||||||
"@types/react-dom": "18.2.7",
|
"@types/react-dom": "18.2.7",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user