19 Commits

Author SHA1 Message Date
Huakun
bb9a46935c
Feature: add drizzle (#264)
* feat: add drizzle orm

* feat: update drizzle configuration and schema management

- Added a check for DB_FILE_NAME in drizzle.config.ts to ensure it's set.
- Updated package.json to change the package name to @kksh/drizzle and added exports for schema and relations.
- Enhanced README.md with instructions for using the schema generation.
- Refactored schema.ts for improved readability and organization of imports.

* add tauri-plugin-sql

* feat: add database select and execute commands

- Introduced `select` and `execute` functions in the database module to facilitate querying and executing SQL commands.
- Updated the Tauri plugin to expose these commands, allowing for database interactions from the frontend.
- Added corresponding permissions for the new commands in the permissions configuration.
- Enhanced the database library with JSON value handling for query parameters.

* fix: sqlite select command

* drizzle ORM verified working

* refactor: clean up database module by removing unused SelectQueryResult type and disabling eslint for explicit any usage

* pnpm lock update

* Update enum definition for type safety

- Changed enum to use 'as const' for better type inference
- Ensured more robust handling of extension publish sources

* reimplemented most db command functions with ORM (migrate from tauri command invoke

* fixed searchExtensionData orm function

* Refactor ORM commands and searchExtensionData function for improved readability and consistency

- Reformatted import statements for better organization.
- Cleaned up whitespace and indentation in searchExtensionData function.
- Enhanced readability of SQL conditions and query building logic.
- Disabled eslint for explicit any usage in the troubleshooters page.

* Fix test assertions in database module to use array indexing for results

format rust code

* update deno lock

* move drizzle from desktop to drizzle package

* update pnpm version and lock

* refactor: migrate db tauri commands to drizzle

* refactor: remove unused extension and command CRUD operations from db module
2025-04-01 06:15:10 -04:00
Huakun
48e2e47f96
Remove supabase (#263)
* remove supabase package

* upgrade valibot

* removed supabase package

Migration not complete yet

* update submodule

* fixed some supabase errors

* Add new fields to extension models

- Added `id` field to `ExtPublish`
- Expanded `DBExtension` with multiple new properties:
  - `api_version`, `author_id`, `created_at`,
  - `downloads`, `icon`, `identifier`,
  - `long_description`, `name`,
  - `readme`, `short_description`,
  - and `tarball_size`

* Refactor: clean up unused Supabase imports

- Removed commented-out Supabase imports from various files to streamline the codebase.
- Updated `created_at` type in `ExtPublish` model from `date` to `string` for consistency.

* update icon enum to union

* fix type errors after removing supabase

* format

* more types fixed

* feat: enhance command handling and update SDK version
2025-03-26 08:50:55 -04:00
Huakun
0bca6739a7
[feat] New sysinfo api, update dep (#251)
* update tauri-plugin-system-info submodule to latest commit cb32fe8

* Update dependencies to latest versions, including valibot to 1.0.0-rc.4 and kkrpc to 0.2.1 across multiple packages. Bump api package version to 0.1.6.

* Update desktop and API package versions; change development server port and URL
2025-03-18 08:42:39 -04:00
Huakun
90ba943fb6
fix: windows app detect (#231)
* fix: applications-rs upgrade submodule

* chore(desktop): bump package version to 0.1.33
2025-03-03 08:41:05 -05:00
Huakun
2cbe45f6d1
feat(desktop): improve app icon handling for cross-platform support (#230)
- Add platform-specific icon path selection for Windows
- Enhance app command item rendering with dynamic icon resolution
- Modify icon loading to use applications-rs for Windows icon extraction
- Update Rust icon loading utility to provide more robust error handling
2025-03-03 05:22:08 -05:00
Huakun Shen
6df1c9865a
chore: upgrade applications-rs submodule 2025-03-01 08:12:06 -05:00
Huakun Shen
6555ebcfcb
chore: upgrade applications-rs submodule 2025-03-01 03:47:19 -05:00
Huakun
8a9f6bcb09
UI Update (#179)
* feat: add publisher link to extension detail

* fix: improve IconMultiplexer and StoreExtDetail component rendering

* feat: add published date to extension details view

* chore: add moment.js and clean up imports in StoreExtDetail

* fix: support cloudflare worker

Otherwise cloudflare worker gets html instead of json

* refactor: move AppsCmds component to desktop app

* bump: version to 0.1.1

* fix: package.json fetching cors error

* fix: improve files field validation in verify command

* feat: make dropdown width in main search input dynamic

* feat(ui): add install button for web extension store

* update submodules

* format

* feat(desktop): disable clipboard auto paste for windows and linux

They are not implemented yet, current code only works for mac
2025-02-21 05:59:09 -05:00
Huakun Shen
63403b6118
fix(apps): windows app loading (#114)
upgrade applications submodule
2025-02-14 01:59:47 -05:00
Huakun Shen
7b6c0934ab
Feature: add helper api (#95)
* feat: add helper API for installation guides and update UI components

- Implement helperAPI with methods to navigate to installation guides for Deno, FFmpeg, and Homebrew
- Update extension and help page components to use new helper API
- Modify command filtering in builtin commands
- Adjust page navigation in help pages to use goHome instead of goBack
- Remove unused imports and clean up components

* chore: bump @kksh/api to 0.1.2 and update dependent packages
2025-02-07 02:41:50 -05:00
Huakun Shen
e21bef154e
Feature: install extension from JSR (#53)
* chore: upgrade many dependencies

* fix: @kksh/svelte, migrate 5

* refactor: move dialog plugin code out of ui package

* chore: disable check-types in api build.ts

Causing build error in kunkun-services

* feat: add jsr package

* feat: implement jsr package with API and parsers for jsr

* feat: modify API, add function to extract linked github repo from html

* perf: improve jsr package API with @hk/jsr-client

* feat: add jsr package version table for publishing extension

* fix: dependency and type incompatibility in ui package

* feat: add validateJsrPackageAsKunkunExtension function in jsr package

* feat: improve jsr table

* feat: add a ElementAlert component

* feat: update ElementAlert UI

* chore: update deno.lock

* chore: enable submodule support in jsr-publish workflow

* chore: bump version to 0.0.48 in jsr.json

* feat: regenerate supabase types, add author_id

* Move @kksh/jsr package to @kksh/api

* update deno.lock

* chore: change @tauri-plugin/plugin-upload version from git url to version

* feat: add rounded corner for ElementAlert

* chore: update deno.lock

* chore: bump version to 0.0.51 in jsr.json and update import paths for ExtPackageJson

* feat: add publishExtJSR API to SupabaseAPI

* refactor: replace "@hk/jsr-client" from jsr with @huakunshen/jsr-client from npm

* chore: update  deno.lock

* feat: update validateJsrPackageAsKunkunExtension return type

* refactor: improve error message

* feat: add metadata to ext_publish, update database.types.ts

* feat: add models module for Supabase with ExtPublishMetadata and source type enumeration

* feat: support installing JSR package as extension

Since JSR overwrites package.json with its own code to be compatible with npm, causing manifest parsing to be impossible. I add metadata field to ext_publish.
When extension comes from jsr, kunkun app will fetch the original package.json from jsr and overwrite the one modified by jsr.

* fix: add missing dep @tauri-apps/plugin-upload to @kksh/extension

* chore: update version to 0.0.52 in version.ts
2025-01-10 08:23:18 -05:00
Huakun Shen
943f52d929
Ci: fix desktop release CI (#50) 2025-01-07 05:16:11 -05:00
Huakun Shen
01bc0ea932
API Docs Update (#47)
* bump: valibot to ^1.0.0-beta.10

* refactor: re-export some API interfaces in root index.ts
2025-01-06 14:11:23 -05:00
Huakun Shen
41d9c72277
[feat] key display (#40)
* chore: add tauri-plugin-user-input submodule

* feat: add key display extension

There is delay, affecting key combination from being detected. I guess it's due to rdev grab, I have to remove grab and use listen directly.

* chore: upgrade tauri-plugin-user-input submodule

The user-input plugin improves mac's listen feature

* chore: upgrade user-input submodule

* fix: a platform-specific window command

* ci: add libxdo-dev dep for ubuntu

* chore: update tauri-plugin-user-input submodule to latest commit 5766c04
2025-01-04 22:31:20 -05:00
Huakun Shen
6995e0b8d9
feat: integrate keyring and stronghold plugin (#39)
* feat: add keyring plugin to handle DB encryption

* feat: integrate stronghold plugin

* feat: use new get_or_set APIs added to keyring plugin

* chore: update keyring submodule

* feat: add stronghold integration

Stronghold loading is too slow for now, waiting for a fix https://github.com/tauri-apps/plugins-workspace/issues/2048
2025-01-04 13:00:16 -05:00
Huakun Shen
80ad705f7c
Feature: clipboard history extension (#35)
* feat: implement clipboard history preview

* feat: clipboard history pagination

* refactor: format code

* fix: sql schema

* feat: add json metadata to unit test

* upgrade: js dependencies

* upgrade: desktop rust dependencies

* fix: clipboard history duplicate key bug when searchTerm clears

* upgrade: tauri-plugin-network submodule solve pnpm lock file

* fix: grpc package CI

* chore: update turbo.json outputs to include dist and build directories

* fix: try to fix template-ext-vue tailwind module.export

* ci: prevent error when protoc is not installed in CF pages

* fix: update writeFile function to accept ReadableStream as data type
2024-12-19 09:31:56 -05:00
Huakun Shen
99b940b03b
File Transfer (Local Network) (#34)
* feat: implement a file streamer for file share

Only server with hardcoded file path

* bump valibot version

* feat: add server-info gRPC module to serve server info

* feat: add ssl cert and public key to peers state

When peer is online, KK always have know its cert and pub key for future secure communication

* feat: add grpc ts package

* Enable "/refresh-worker-extension" rest API, grpc version isn't ready  yet

* update pnpm lock

* ci: fix CI by moving protobuf install order

* ci: fix

* upgrade api due to valibot incompatibility

* fix: use fs instead of bun shell to be compatible with windows

* skip grpc pkg build on windows

* feat: local network file transfer prototype working

* fix: grpc build.ts

* download next to 14

* ci: add ci env try to fix next

* fix: hideRefreshBtn and a few other btns' hide API in iframe ext page

* feat: disable NODE_TLS_REJECT_UNAUTHORIZED for extension HMR refresh

* fix: manifest json schema with objectWithRest to allow any other fields in package.json

* chore: update valibot and related dependencies to version 1.0.0-beta.9 in pnpm-lock.yaml

* ci: add protobuf compiler installation to manifest-schema-upload workflow

* refactor: move grpc code from jarvis to a separate grpc crate

for easier testing

* feat(file-transfer): POC multi file + directory file transfer

* feat(file-transfer): replace file transfer recursive download in ts with rust

* feat(file-transfer): implement on_progress event for file transfer

* feat(file-transfer): report progress every 1MB instead of 100 iterations

* feat(file-transfer): add progress bar

* feat(file-transfer): UI

* feat(file-transfer): add file transfer bucket info preview

Show total size and number of files

* feat(file-transfer): improve UX

Show bucket info during confirm; improve progress bar UI, prevent inconsistent width

* feat(grpc): skip build in Cloudflare Pages due to missing protoc

* refactor: with cargo fix, unused imports removed

* ci: debug cloudflare pages env var

* fix(grpc): update environment variable access for Cloudflare Pages build check

* fix(grpc): add error handling for protoc command in build script

* chore: update kkrpc version to 0.0.13, remove kkrpc submodule, and enhance grpc build script logging

- Updated kkrpc dependency version from 0.0.12 to 0.0.13 in package.json.
- Removed the kkrpc submodule from the project.
- Enhanced logging in the grpc build script to include additional Cloudflare Pages environment variables for better debugging.

* fix(api): typescript error, remove base.json from tsconfig

* chore: update pnpm lock

* fix(api): update TypeScript configuration to extend base.json and clean up unused options

* refactor(api): update TypeScript configuration to extend path-alias.json and enhance compiler options

* fix(api): restore KunkunManifestPermission in PermissionUnion and update valibot import in schema tests

* fix: missing trait error

* fix: js require replaced with import

* test: fix a unit test with a more robust method

---------

Co-authored-by: Huakun Shen <huaukun.shen@huakunshen.com>
2024-12-11 08:14:40 -05:00
Huakun Shen
da8e37c4a1
Security with cryptography (#32)
* Add some experiment code for crypto crate

* feat: add crypto crate with ssl, rsa, ed25519 for https, encryption, signing

* Implement aes encryption helper in crypto crate

* ci: add dep for CI rust test (protobuf)

* fix: try to fix window CI with next

* fix: CI

* ci: add dep for ubuntu

* ci: fix

* fix: openssl lib path in CI

* fix: CI

* update applications-rs, disable some tests

* fix: CI

* feat: add file transfer grpc proto and server setup

* CI: try to fix CI

* fix: missing proto in build.rs

* ci: add cargo build before cargo test

* fix: grpc file descriptor

* ci: fix CI by removing a redundant main.rs

* fix: disable local windows test in applications-rs which fails CI

* ci: run CI rust test only on ubuntu, windows is failing. will be handled in another PR

* fix: vue template

* fix: allow unused variable

* fix: remove node:buffer type from api shell.ts to avoid frontend build error

* try to fix test in create-kunkun

* upgrade api to 0.0.44, remove node:buffer

* upgrade next template to 15

* feat: turn the default server into a https server

* feat: make SSL certificate loadable from env

* feat: add conditional SSL cert

in debug mode, use local default cert, in production generate new self-signed cert every time app starts

* chore: add vscode debug config

* feat: add server public key

* feat: setup sqlite db encryption

* fix: settings hotkey

* chore: add .gitkeep

* ci: add node-fetch to dep for api package
2024-11-24 00:45:36 -05:00
Huakun Shen
ed87fc6c12
App Setup (#2)
* chore: add vendor submodules

* feat: add packages for db,ci,schema,api,jarvis cmds

* feat: add tauri-jarvis-plugin

* feat: implement extension commands list

* fix(desktop): import path errors after packages refactor

* chore: add self signed cert

* fix: prevent prerender for desktop

* fix(desktop): desktop sveltekit static build, use csr for dynamic route

* feat: add error handling page and components

* refactor: component lib

* refactor: move more types, functions and components out of desktop

* refactor(ui): more refactor

* refactor(ui): move store components to @kksh/ui

* ci: add CI for build & test

* refactor: rename @kksh/extensions to @kksh/extension

* ci: add 2 more ci

* ci: fix

* fix: CI env var

* chore: add changeset

* feat: implement extension store item detail view

* feat: implement extension store install, uninstall, upgrade

* format

* revert: upgradable logic, the new one doesn't work yet

* refactor: make @kksh/ui dependent only on @kksh/api

Reason: @kksh/ui may be published later for building website, all its dependency packages must be also published. To avoid trouble it should be standalone, depend only on packages already published

* refactor: cleanup

* fixed: some typescript error

* chore: got typedoc working on @kksh/api

* ci: disable manifest schema upload CI on push
2024-11-03 13:54:44 -05:00