Compare commits
57 Commits
developmen
...
fa3348a5ad
| Author | SHA1 | Date | |
|---|---|---|---|
| fa3348a5ad | |||
| c8c3a5c73f | |||
| 225835e5d1 | |||
| fc841f238b | |||
| fb577a8699 | |||
| 56e75977cd | |||
| f1daa6b576 | |||
| c7d29cb2be | |||
| b36b4e4280 | |||
| d025819888 | |||
| 2cfd6248bc | |||
| 1a40f9d2aa | |||
| d5670ca470 | |||
| 2809a8deb4 | |||
| 0a7de8b78b | |||
| 3975d26caa | |||
| 91db0475cd | |||
| 0c304d7900 | |||
| 41472e02ad | |||
| 63f6e2d32f | |||
| b7c330a2b5 | |||
| 3c954ac715 | |||
| b5114ac6fb | |||
| ca9d3b1d08 | |||
| f555dbad4f | |||
| 8b7a51c5bd | |||
| e6c66ab232 | |||
| fecbc81cd8 | |||
| 25f63d30be | |||
| 62ddc33290 | |||
| 78036f9aea | |||
| c4f902b469 | |||
| 70b25ed17b | |||
| e33fa804fa | |||
| f765d5bdf0 | |||
| b5af4ecf69 | |||
| 066b8171bf | |||
| 88493c959e | |||
| 4796dfc095 | |||
| 2972bb9e91 | |||
| 0b8f2c5532 | |||
| 18fee933ec | |||
| 0f09bf8436 | |||
| 091a2123bb | |||
| b6dd96cbad | |||
| 9bb88a253d | |||
| ceb5f43f15 | |||
| 4774d3fdc1 | |||
| 07ff15aba0 | |||
| ffc2184806 | |||
| 96fa1fb0e4 | |||
| 96fd11d3d6 | |||
| 2a69c07743 | |||
| 379db8da07 | |||
| 0699dbef31 | |||
| 6a1351752b | |||
| ad3aa4293a |
4
.gitignore
vendored
@ -22,6 +22,6 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
.nuxt
|
.nuxt
|
||||||
.output
|
src-tauri/target
|
||||||
|
nogit*
|
||||||
@ -1,10 +0,0 @@
|
|||||||
# .prettierrc.toml
|
|
||||||
|
|
||||||
useTabs = false
|
|
||||||
tabWidth = 2
|
|
||||||
printWidth = 100
|
|
||||||
endOfLine = "lf"
|
|
||||||
|
|
||||||
# Not supported yet
|
|
||||||
# trailingComma = "es5"
|
|
||||||
# embeddedLanguageFormatting = "auto"
|
|
||||||
29
README.md
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
Today, we undoubtedly find ourselves in the computer age. Almost everyone owns at least one computer, often even more. Most probably have at least a smartphone and a standard PC. On each of these devices (Desktop PC, Laptop, Tablet, Smartphone) and systems (Windows, macOS, Linux (all flavors), Android, iOS), there are various programs and data, which can be highly individual and sensitive. Unfortunately, interoperability between these devices and systems often proves difficult, sometimes even impossible, for a multitude of reasons. On one hand, there are the system providers themselves (like Microsoft, Apple, Google), who often design their systems to make it as easy as possible for users to enter their ecosystems, but place many hurdles in the way when users wish to leave again. The golden cage, as we say in Germany, or walled garden. However, it's not just the system providers per se who make cross-device and cross-system work difficult. Another problem lies with the software manufacturers/providers. Since it is already challenging and above all resource-intensive (time, money, and technical know-how) to provide a good and "secure" product for one device class and/or system, it's not uncommon for a program to be developed (initially) for only one platform. So, there might be a program for Windows or Apple, but not for Linux, or only in one distribution/package format. Or there might be an app for iOS and/or Android, but not for the PC. This is partly due to the fact that it would simply be too complex to develop and, especially, maintain a product for multiple systems and devices (simultaneously). This effort is almost insurmountable, particularly for startups, small businesses, and individual open-source developers working on their passion projects in their spare time.
|
Today, we undoubtedly find ourselves in the computer age. Almost everyone owns at least one computer, often even more. Most probably have at least a smartphone and a standard PC. On each of these devices (Desktop PC, Laptop, Tablet, Smartphone) and systems (Windows, macOS, Linux (all flavors), Android, iOS), there are various programs and data, which can be highly individual and sensitive. Unfortunately, interoperability between these devices and systems often proves difficult, sometimes even impossible, for a multitude of reasons. On one hand, there are the system providers themselves (like Microsoft, Apple, Google), who often design their systems to make it as easy as possible for users to enter their ecosystems, but place many hurdles in the way when users wish to leave again. The golden cage, as we say in Germany, or walled garden. However, it's not just the system providers per se who make cross-device and cross-system work difficult. Another problem lies with the software manufacturers/providers. Since it is already challenging and above all resource-intensive (time, money, and technical know-how) to provide a good and "secure" product for one device class and/or system, it's not uncommon for a program to be developed (initially) for only one platform. So, there might be a program for Windows or Apple, but not for Linux, or only in one distribution/package format. Or there might be an app for iOS and/or Android, but not for the PC. This is partly due to the fact that it would simply be too complex to develop and, especially, maintain a product for multiple systems and devices (simultaneously). This effort is almost insurmountable, particularly for startups, small businesses, and individual open-source developers working on their passion projects in their spare time.
|
||||||
Let's not even start talking about application distribution. For each platform, you end up with a separate build pipeline that builds, tests, signs, packages the application into the appropriate format (msi, exe, deb, flatpak, snap, AppImage, Apk, etc.), and delivers it to the corresponding store (AppStore, PlayStore, Windows Store, and the various repositories of Linux distributions). This is a huge cascade of tasks that especially causes problems for small companies (at least if you want to serve ALL platforms simultaneously).
|
Let's not even start talking about application distribution. For each platform, you end up with a separate build pipeline that builds, tests, signs, packages the application into the appropriate format (msi, exe, deb, flatpak, snap, AppImage, Apk, etc.), and delivers it to the corresponding store (AppStore, PlayStore, Windows Store, and the various repositories of Linux distributions). This is a huge cascade of tasks that especially causes problems for small companies (at least if you want to serve ALL platforms simultaneously).
|
||||||
Wouldn't it be nice if there were a simple way for developers to develop and build their application just once and then be able to serve ALL\* devices and systems? To have your "entire computer" on your USB stick, everywhere, at any time? And no matter which computer in the world you're currently using, you have everything with you? All programs, files, passwords, etc., on every device (Desktop PC, Laptop, Tablet, Smartphone), every system (Windows, macOS, Linux (all flavors), Android, iOS), anytime. Yes, this might sound confusing and unreal at first, but the idea is fantastic. It would give users back more digital self-empowerment. Only when users can no longer be held captive in golden cages can they emancipate themselves from the tech giants. Only when users can decide for themselves at any time which data they want to share with whom, for what purpose, and for what period, are they truly masters and not just commodities of their data.
|
Wouldn't it be nice if there were a simple(r) way for developers to develop and build their application just once and then be able to serve ALL\* devices and systems? PWAs were already on the right track, but there is often a lack of more in-depth access to system resources, such as file or console access.
|
||||||
|
HaexHub gives any web application/PWA superpowers.
|
||||||
And HaexHub would be the path to achieve this.
|
Extensions can be used to add any functions to HaexHub, whereby almost any access to the underlying system is possible, provided that the necessary authorizations have been granted by the user beforehand.
|
||||||
|
|
||||||
\*In principle, the approach presented here allows an application to run on all devices and systems. However, some applications might still only be usable on certain devices or systems. For example, if an application absolutely requires an NFC device, which is typically not found on a desktop PC, then this application will probably only work on mobile devices. Or if an application requires system-specific interfaces or programs, such as the Registry on Windows or systemd on Linux, then this application will naturally only work where these dependencies are found. However, developers who create their applications without such dependencies can immediately serve all devices and systems.
|
\*In principle, the approach presented here allows an application to run on all devices and systems. However, some applications might still only be usable on certain devices or systems. For example, if an application absolutely requires an NFC device, which is typically not found on a desktop PC, then this application will probably only work on mobile devices. Or if an application requires system-specific interfaces or programs, such as the Registry on Windows or systemd on Linux, then this application will naturally only work where these dependencies are found. However, developers who create their applications without such dependencies can immediately serve all devices and systems.
|
||||||
|
|
||||||
@ -68,9 +68,30 @@ Further examples of extensions include calendars, (collaborative) document manag
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
- [nodejs](https://nodejs.org/en/download)
|
- [nodejs/nvm](https://nodejs.org/en/download)
|
||||||
- [tauri](https://v2.tauri.app/start/prerequisites/)
|
- [tauri](https://v2.tauri.app/start/prerequisites/)
|
||||||
- [rust](https://v2.tauri.app/start/prerequisites/#rust)
|
- [rust](https://v2.tauri.app/start/prerequisites/#rust)
|
||||||
|
- [android-studio](https://developer.android.com/studio?hl=de)
|
||||||
|
- webkit2gtk + GTK3
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# debian/ubuntu
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
|
librsvg2-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# fedora
|
||||||
|
sudo dnf install \
|
||||||
|
webkit2gtk4.1-devel \
|
||||||
|
gtk3-devel \
|
||||||
|
libappindicator-gtk3 \
|
||||||
|
librsvg2-devel
|
||||||
|
```
|
||||||
|
|
||||||
- port 3003 needs to be open/free or you need to adjust it in `nuxt.config.ts` AND `src-tauri/tauri.conf.json`
|
- port 3003 needs to be open/free or you need to adjust it in `nuxt.config.ts` AND `src-tauri/tauri.conf.json`
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { defineConfig } from 'drizzle-kit';
|
import { defineConfig } from 'drizzle-kit'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
schema: './src-tauri/database/schemas/**.ts',
|
schema: './src-tauri/database/schemas/**.ts',
|
||||||
@ -7,4 +7,4 @@ export default defineConfig({
|
|||||||
dbCredentials: {
|
dbCredentials: {
|
||||||
url: './src-tauri/database/vault.db',
|
url: './src-tauri/database/vault.db',
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
|
|||||||
4
eslint.config.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||||
|
|
||||||
|
export default withNuxt()
|
||||||
|
// Your custom configs here
|
||||||
118
nuxt.config.ts
@ -1,81 +1,125 @@
|
|||||||
|
//import tailwindcss from '@tailwindcss/vite'
|
||||||
|
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: "2024-11-01",
|
compatibilityDate: '2025-07-15',
|
||||||
|
devtools: { enabled: true },
|
||||||
|
|
||||||
|
srcDir: './src',
|
||||||
|
|
||||||
|
alias: {
|
||||||
|
'@bindings': fileURLToPath(
|
||||||
|
new URL('./src-tauri/bindings', import.meta.url),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
|
app: {
|
||||||
|
pageTransition: {
|
||||||
|
name: 'fade',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
modules: [
|
modules: [
|
||||||
"nuxt-zod-i18n",
|
'nuxt-zod-i18n',
|
||||||
"@nuxtjs/i18n",
|
'@nuxtjs/i18n',
|
||||||
"@nuxtjs/tailwindcss",
|
'@pinia/nuxt',
|
||||||
"@pinia/nuxt",
|
'@vueuse/nuxt',
|
||||||
"@vueuse/nuxt",
|
'@nuxt/icon',
|
||||||
"@nuxt/icon",
|
'@nuxt/eslint',
|
||||||
"nuxt-snackbar",
|
//"@nuxt/image",
|
||||||
"@nuxt/image",
|
'@nuxt/fonts',
|
||||||
|
'@nuxt/ui',
|
||||||
],
|
],
|
||||||
|
|
||||||
imports: {
|
imports: {
|
||||||
dirs: ["composables/**", "stores/**", "components/**", "pages/**"],
|
dirs: [
|
||||||
|
'composables/**',
|
||||||
|
'stores/**',
|
||||||
|
'components/**',
|
||||||
|
'pages/**',
|
||||||
|
'types/**',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
css: ['./assets/css/main.css'],
|
||||||
|
|
||||||
|
icon: {
|
||||||
|
provider: 'server',
|
||||||
|
mode: 'svg',
|
||||||
|
clientBundle: {
|
||||||
|
icons: ['solar:global-outline', 'gg:extension', 'hugeicons:corporate'],
|
||||||
|
scan: true,
|
||||||
|
includeCustomCollections: true,
|
||||||
|
},
|
||||||
|
serverBundle: {
|
||||||
|
collections: ['mdi', 'line-md', 'solar', 'gg', 'emojione'],
|
||||||
|
},
|
||||||
|
|
||||||
|
customCollections: [
|
||||||
|
{
|
||||||
|
prefix: 'my-icon',
|
||||||
|
dir: './src/assets/icons/',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
i18n: {
|
i18n: {
|
||||||
strategy: "prefix_and_default",
|
strategy: 'prefix_and_default',
|
||||||
defaultLocale: "de",
|
defaultLocale: 'de',
|
||||||
vueI18n: "../src/i18n/i18n.config.ts",
|
|
||||||
|
|
||||||
locales: [
|
locales: [
|
||||||
{ code: "de", language: "de-DE", isCatchallLocale: true },
|
{ code: 'de', language: 'de-DE', isCatchallLocale: true },
|
||||||
{ code: "en", language: "en-EN" },
|
{ code: 'en', language: 'en-EN' },
|
||||||
],
|
],
|
||||||
|
|
||||||
detectBrowserLanguage: {
|
detectBrowserLanguage: {
|
||||||
useCookie: true,
|
useCookie: true,
|
||||||
cookieKey: "i18n_redirected",
|
cookieKey: 'i18n_redirected',
|
||||||
redirectOn: "root", // recommended
|
redirectOn: 'root', // recommended
|
||||||
},
|
|
||||||
types: "composition",
|
|
||||||
bundle: {
|
|
||||||
optimizeTranslationDirective: false,
|
|
||||||
},
|
},
|
||||||
|
types: 'composition',
|
||||||
|
|
||||||
|
vueI18n: './i18n.config.ts',
|
||||||
},
|
},
|
||||||
|
|
||||||
zodI18n: {
|
zodI18n: {
|
||||||
localeCodesMapping: {
|
localeCodesMapping: {
|
||||||
"en-GB": "en",
|
'en-GB': 'en',
|
||||||
"de-DE": "de",
|
'de-DE': 'de',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
haexVault: {
|
haexVault: {
|
||||||
lastVaultFileName: "lastVaults.json",
|
lastVaultFileName: 'lastVaults.json',
|
||||||
//defaultDatabase: 'src/database/default.db',
|
instanceFileName: 'instance.json',
|
||||||
|
defaultVaultName: 'HaexHub',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
devtools: { enabled: true },
|
|
||||||
srcDir: "./src",
|
|
||||||
// Enable SSG
|
|
||||||
ssr: false,
|
ssr: false,
|
||||||
// Enables the development server to be discoverable by other devices when running on iOS physical devices
|
// Enables the development server to be discoverable by other devices when running on iOS physical devices
|
||||||
devServer: { host: process.env.TAURI_DEV_HOST || "localhost", port: 3003 },
|
devServer: {
|
||||||
|
host: '0',
|
||||||
|
port: 3003,
|
||||||
|
},
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
|
//plugins: [tailwindcss()],
|
||||||
// Better support for Tauri CLI output
|
// Better support for Tauri CLI output
|
||||||
clearScreen: false,
|
clearScreen: false,
|
||||||
// Enable environment variables
|
// Enable environment variables
|
||||||
// Additional environment variables can be found at
|
// Additional environment variables can be found at
|
||||||
// https://v2.tauri.app/reference/environment-variables/
|
// https://v2.tauri.app/reference/environment-variables/
|
||||||
envPrefix: ["VITE_", "TAURI_"],
|
envPrefix: ['VITE_', 'TAURI_'],
|
||||||
server: {
|
server: {
|
||||||
// Tauri requires a consistent port
|
// Tauri requires a consistent port
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* plugins: [wasm(), topLevelAwait()],
|
|
||||||
worker: {
|
|
||||||
format: 'es',
|
|
||||||
plugins: () => [wasm(), topLevelAwait()],
|
|
||||||
}, */
|
|
||||||
},
|
},
|
||||||
});
|
ignore: ['**/src-tauri/**'],
|
||||||
|
})
|
||||||
|
|||||||
106
package.json
@ -1,60 +1,80 @@
|
|||||||
{
|
{
|
||||||
"name": "haex-hub",
|
"name": "tauri-app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
"generate": "nuxt generate",
|
|
||||||
"preview": "nuxt preview",
|
|
||||||
"postinstall": "nuxt prepare",
|
|
||||||
"tauri": "tauri",
|
|
||||||
"drizzle:generate": "drizzle-kit generate",
|
"drizzle:generate": "drizzle-kit generate",
|
||||||
"drizzle:migrate": "drizzle-kit migrate"
|
"drizzle:migrate": "drizzle-kit migrate",
|
||||||
|
"eslint:fix": "eslint --fix",
|
||||||
|
"generate:rust-types": "tsx ./src-tauri/database/generate-rust-types.ts",
|
||||||
|
"generate:ts-types": "cd src-tauri && cargo test",
|
||||||
|
"generate": "nuxt generate",
|
||||||
|
"postinstall": "nuxt prepare",
|
||||||
|
"preview": "nuxt preview",
|
||||||
|
"tauri:build:debug": "tauri build --debug",
|
||||||
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@libsql/client": "^0.15.4",
|
"@nuxt/eslint": "1.9.0",
|
||||||
"@nuxt/icon": "1.11.0",
|
"@nuxt/fonts": "0.11.4",
|
||||||
"@nuxt/image": "1.10.0",
|
"@nuxt/icon": "2.0.0",
|
||||||
"@nuxtjs/i18n": "^9.5.3",
|
"@nuxt/ui": "4.0.0",
|
||||||
"@pinia/nuxt": "^0.10.1",
|
"@nuxtjs/i18n": "10.0.6",
|
||||||
|
"@pinia/nuxt": "^0.11.1",
|
||||||
|
"@tailwindcss/vite": "^4.1.10",
|
||||||
"@tauri-apps/api": "^2.5.0",
|
"@tauri-apps/api": "^2.5.0",
|
||||||
"@tauri-apps/plugin-dialog": "^2.2.1",
|
"@tauri-apps/plugin-dialog": "^2.2.2",
|
||||||
"@tauri-apps/plugin-fs": "^2.2.1",
|
"@tauri-apps/plugin-fs": "^2.3.0",
|
||||||
"@tauri-apps/plugin-http": "~2.4.3",
|
"@tauri-apps/plugin-http": "2.5.2",
|
||||||
"@tauri-apps/plugin-opener": "^2.2.6",
|
"@tauri-apps/plugin-notification": "2.3.1",
|
||||||
"@tauri-apps/plugin-os": "^2.2.1",
|
"@tauri-apps/plugin-opener": "^2.3.0",
|
||||||
"@tauri-apps/plugin-sql": "~2.2.0",
|
"@tauri-apps/plugin-os": "^2.2.2",
|
||||||
"@tauri-apps/plugin-store": "^2.2.0",
|
"@tauri-apps/plugin-sql": "2.3.0",
|
||||||
"@vueuse/core": "^13.1.0",
|
"@tauri-apps/plugin-store": "^2.2.1",
|
||||||
"@vueuse/nuxt": "^13.1.0",
|
"@vueuse/components": "^13.9.0",
|
||||||
"drizzle-orm": "^0.41.0",
|
"@vueuse/core": "^13.4.0",
|
||||||
"nuxt": "^3.17.0",
|
"@vueuse/nuxt": "^13.4.0",
|
||||||
"nuxt-snackbar": "1.3.0",
|
"drizzle-orm": "^0.44.2",
|
||||||
"nuxt-zod-i18n": "^1.11.5",
|
"eslint": "^9.34.0",
|
||||||
"vue": "^3.5.13",
|
"fuse.js": "^7.1.0",
|
||||||
"zod": "^3.24.3"
|
"nuxt": "^4.0.3",
|
||||||
|
"nuxt-zod-i18n": "^1.12.0",
|
||||||
|
"tailwindcss": "^4.1.10",
|
||||||
|
"vue": "^3.5.20",
|
||||||
|
"vue-router": "^4.5.1",
|
||||||
|
"zod": "4.1.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@egoist/tailwindcss-icons": "^1.9.0",
|
"@iconify/json": "^2.2.351",
|
||||||
"@iconify/json": "^2.2.332",
|
"@iconify/tailwind4": "^1.0.6",
|
||||||
"@iconify/tailwind": "^1.2.0",
|
"@libsql/client": "^0.15.15",
|
||||||
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
||||||
"@tauri-apps/cli": "^2.5.0",
|
"@tauri-apps/cli": "^2.5.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.3",
|
"@types/node": "^24.6.2",
|
||||||
"drizzle-kit": "^0.30.6",
|
"@vitejs/plugin-vue": "6.0.1",
|
||||||
"flyonui": "^1.3.1",
|
"@vue/compiler-sfc": "^3.5.17",
|
||||||
"typescript": "~5.6.3",
|
"drizzle-kit": "^0.31.2",
|
||||||
"vite": "^6.3.3",
|
"globals": "^16.2.0",
|
||||||
"vue-tsc": "^2.2.10"
|
"prettier": "3.6.2",
|
||||||
|
"tsx": "^4.20.6",
|
||||||
|
"tw-animate-css": "^1.3.8",
|
||||||
|
"typescript": "^5.8.3",
|
||||||
|
"vite": "7.1.3",
|
||||||
|
"vue-tsc": "3.0.6"
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"trailingComma": "all",
|
||||||
|
"tabWidth": 2,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"singleAttributePerLine": true
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
|
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"ignoredBuiltDependencies": [
|
"overrides": {
|
||||||
"@parcel/watcher",
|
"zod": "^3.22.4"
|
||||||
"esbuild",
|
}
|
||||||
"vue-demi"
|
},
|
||||||
]
|
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
10281
pnpm-lock.yaml
generated
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
public/horn-fragend.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
9
src-tauri/.cargo/config.toml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Nur dieser Inhalt in src-tauri/.cargo/config.toml
|
||||||
|
|
||||||
|
[target.aarch64-linux-android]
|
||||||
|
# Ersetze die Pfade durch deine tatsächlichen NDK-Pfade
|
||||||
|
# Dein NDK-Basispfad: /home/haex/Android/Sdk/ndk/29.0.13113456
|
||||||
|
# Stelle sicher, dass der clang-Name (mit API-Level, z.B. ...24-clang) korrekt ist.
|
||||||
|
linker = "/home/haex/Android/Sdk/ndk/29.0.13113456/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang"
|
||||||
|
#ar = "/home/haex/Android/Sdk/ndk/29.0.13113456/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
|
||||||
|
#ranlib = "/home/haex/Android/Sdk/ndk/29.0.13113456/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib"
|
||||||
@ -1,2 +0,0 @@
|
|||||||
DATABASE_URL=sqlite:database/vault.db
|
|
||||||
SQLX_OFFLINE=true
|
|
||||||
7
src-tauri/.gitignore
vendored
@ -1,7 +0,0 @@
|
|||||||
# Generated by Cargo
|
|
||||||
# will have compiled files and executables
|
|
||||||
/target/
|
|
||||||
|
|
||||||
# Generated by Tauri
|
|
||||||
# will have schema files for capabilities auto-completion
|
|
||||||
/gen/schemas
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "\n SELECT id, extension_id, resource, operation, path \n FROM haex_extensions_permissions \n WHERE extension_id = ? AND resource = ? AND operation = ?\n ",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "extension_id",
|
|
||||||
"ordinal": 1,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "resource",
|
|
||||||
"ordinal": 2,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "operation",
|
|
||||||
"ordinal": 3,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "path",
|
|
||||||
"ordinal": 4,
|
|
||||||
"type_info": "Text"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 3
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "a73e92ff12dca9b046a6440b9a68b002662b594f7f569ee71de11e00c23ca625"
|
|
||||||
}
|
|
||||||
1185
src-tauri/Cargo.lock
generated
@ -15,28 +15,42 @@ name = "haex_hub_lib"
|
|||||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
serde_json = "1.0.145"
|
||||||
tauri-build = { version = "2.2", features = [] }
|
tauri-build = { version = "2.2", features = [] }
|
||||||
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rusqlite = { version = "0.35.0", features = [
|
rusqlite = { version = "0.37.0", features = [
|
||||||
"load_extension",
|
"load_extension",
|
||||||
"bundled-sqlcipher",
|
"bundled-sqlcipher-vendored-openssl",
|
||||||
|
"functions",
|
||||||
] }
|
] }
|
||||||
#libsqlite3-sys = { version = "0.28", features = ["bundled-sqlcipher"] }
|
|
||||||
|
#tauri-plugin-sql = { version = "2", features = ["sqlite"] }tokio = { version = "1.47.1", features = ["macros", "rt-multi-thread"] }#libsqlite3-sys = { version = "0.31", features = ["bundled-sqlcipher"] }
|
||||||
#sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite"] }
|
#sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite"] }
|
||||||
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }
|
|
||||||
serde = { version = "1", features = ["derive"] }
|
|
||||||
serde_json = "1"
|
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
mime_guess = "2.0"
|
ed25519-dalek = "2.1"
|
||||||
mime = "0.3"
|
|
||||||
fs_extra = "1.3.0"
|
fs_extra = "1.3.0"
|
||||||
sqlparser = { version = "0.56.0", features = [] }
|
hex = "0.4"
|
||||||
tauri = { version = "2.5", features = ["protocol-asset", "custom-protocol"] }
|
lazy_static = "1.5"
|
||||||
tauri-plugin-dialog = "2.2"
|
mime = "0.3"
|
||||||
tauri-plugin-fs = "2.2.0"
|
mime_guess = "2.0"
|
||||||
tauri-plugin-opener = "2.2"
|
serde = { version = "1", features = ["derive"] }
|
||||||
tauri-plugin-os = "2"
|
serde_json = "1.0.143"
|
||||||
tauri-plugin-store = "2"
|
sha2 = "0.10.9"
|
||||||
tauri-plugin-http = "2.4"
|
sqlparser = { version = "0.59.0", features = ["visitor"] }
|
||||||
#tauri-plugin-sql = { version = "2", features = ["sqlite"] }
|
tauri = { version = "2.8.5", features = ["protocol-asset", "devtools"] }
|
||||||
|
tauri-plugin-dialog = "2.4.0"
|
||||||
|
tauri-plugin-fs = "2.4.0"
|
||||||
|
tauri-plugin-http = "2.5.2"
|
||||||
|
tauri-plugin-notification = "2.3.1"
|
||||||
|
tauri-plugin-opener = "2.5.0"
|
||||||
|
tauri-plugin-os = "2.3"
|
||||||
|
tauri-plugin-persisted-scope = "2.3.2"
|
||||||
|
tauri-plugin-store = "2.4.0"
|
||||||
|
thiserror = "2.0.17"
|
||||||
|
ts-rs = { version = "11.0.1", features = ["serde-compat"] }
|
||||||
|
uhlc = "0.8.2"
|
||||||
|
uuid = { version = "1.18.1", features = ["v4"] }
|
||||||
|
zip = "5.1.1"
|
||||||
|
url = "2.5.7"
|
||||||
|
|||||||
10
src-tauri/bindings/Action.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { DbAction } from "./DbAction";
|
||||||
|
import type { FsAction } from "./FsAction";
|
||||||
|
import type { HttpAction } from "./HttpAction";
|
||||||
|
import type { ShellAction } from "./ShellAction";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ein typsicherer Container, der die spezifische Aktion für einen Ressourcentyp enthält.
|
||||||
|
*/
|
||||||
|
export type Action = { "Database": DbAction } | { "Filesystem": FsAction } | { "Http": HttpAction } | { "Shell": ShellAction };
|
||||||
3
src-tauri/bindings/DatabaseError.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type DatabaseError = { "type": "ParseError", "details": { reason: string, sql: string, } } | { "type": "ParameterMismatchError", "details": { expected: number, provided: number, sql: string, } } | { "type": "NoTableError", "details": { sql: string, } } | { "type": "StatementError", "details": { reason: string, } } | { "type": "PrepareError", "details": { reason: string, } } | { "type": "DatabaseError", "details": { reason: string, } } | { "type": "ExecutionError", "details": { sql: string, reason: string, table: string | null, } } | { "type": "TransactionError", "details": { reason: string, } } | { "type": "UnsupportedStatement", "details": { reason: string, sql: string, } } | { "type": "HlcError", "details": { reason: string, } } | { "type": "LockError", "details": { reason: string, } } | { "type": "ConnectionError", "details": { reason: string, } } | { "type": "SerializationError", "details": { reason: string, } } | { "type": "PermissionError", "details": { extension_id: string, operation: string | null, resource: string | null, reason: string, } } | { "type": "QueryError", "details": { reason: string, } } | { "type": "RowProcessingError", "details": { reason: string, } } | { "type": "MutexPoisoned", "details": { reason: string, } } | { "type": "ConnectionFailed", "details": { path: string, reason: string, } } | { "type": "PragmaError", "details": { pragma: string, reason: string, } } | { "type": "PathResolutionError", "details": { reason: string, } } | { "type": "IoError", "details": { path: string, reason: string, } } | { "type": "CrdtSetup", "details": string };
|
||||||
6
src-tauri/bindings/DbAction.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definiert Aktionen, die auf eine Datenbank angewendet werden können.
|
||||||
|
*/
|
||||||
|
export type DbAction = "read" | "readWrite" | "create" | "delete" | "alterDrop";
|
||||||
3
src-tauri/bindings/DbConstraints.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type DbConstraints = { where_clause: string | null, columns: Array<string> | null, limit: number | null, };
|
||||||
3
src-tauri/bindings/ExtensionInfoResponse.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type ExtensionInfoResponse = { keyHash: string, name: string, fullId: string, version: string, displayName: string | null, namespace: string | null, allowedOrigin: string, };
|
||||||
4
src-tauri/bindings/ExtensionManifest.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { ExtensionPermissions } from "./ExtensionPermissions";
|
||||||
|
|
||||||
|
export type ExtensionManifest = { id: string, name: string, version: string, author: string | null, entry: string, icon: string | null, public_key: string, signature: string, permissions: ExtensionPermissions, homepage: string | null, description: string | null, };
|
||||||
7
src-tauri/bindings/ExtensionPermissions.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { PermissionEntry } from "./PermissionEntry";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definiert die einheitliche Struktur für alle Berechtigungsarten im Manifest und UI.
|
||||||
|
*/
|
||||||
|
export type ExtensionPermissions = { database: Array<PermissionEntry> | null, filesystem: Array<PermissionEntry> | null, http: Array<PermissionEntry> | null, shell: Array<PermissionEntry> | null, };
|
||||||
5
src-tauri/bindings/ExtensionPreview.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { ExtensionManifest } from "./ExtensionManifest";
|
||||||
|
import type { ExtensionPermissions } from "./ExtensionPermissions";
|
||||||
|
|
||||||
|
export type ExtensionPreview = { manifest: ExtensionManifest, is_valid_signature: boolean, key_hash: string, editable_permissions: ExtensionPermissions, };
|
||||||
6
src-tauri/bindings/FsAction.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definiert Aktionen, die auf das Dateisystem angewendet werden können.
|
||||||
|
*/
|
||||||
|
export type FsAction = "read" | "readWrite";
|
||||||
3
src-tauri/bindings/FsConstraints.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type FsConstraints = { max_file_size: bigint | null, allowed_extensions: Array<string> | null, recursive: boolean | null, };
|
||||||
6
src-tauri/bindings/HttpAction.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definiert Aktionen (HTTP-Methoden), die auf HTTP-Anfragen angewendet werden können.
|
||||||
|
*/
|
||||||
|
export type HttpAction = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "*";
|
||||||
4
src-tauri/bindings/HttpConstraints.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { RateLimit } from "./RateLimit";
|
||||||
|
|
||||||
|
export type HttpConstraints = { methods: Array<string> | null, rate_limit: RateLimit | null, };
|
||||||
7
src-tauri/bindings/PermissionConstraints.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { DbConstraints } from "./DbConstraints";
|
||||||
|
import type { FsConstraints } from "./FsConstraints";
|
||||||
|
import type { HttpConstraints } from "./HttpConstraints";
|
||||||
|
import type { ShellConstraints } from "./ShellConstraints";
|
||||||
|
|
||||||
|
export type PermissionConstraints = DbConstraints | FsConstraints | HttpConstraints | ShellConstraints;
|
||||||
19
src-tauri/bindings/PermissionEntry.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { PermissionStatus } from "./PermissionStatus";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repräsentiert einen einzelnen Berechtigungseintrag im Manifest und im UI-Modell.
|
||||||
|
*/
|
||||||
|
export type PermissionEntry = { target: string,
|
||||||
|
/**
|
||||||
|
* Die auszuführende Aktion (z.B. "read", "read_write", "GET", "execute").
|
||||||
|
*/
|
||||||
|
operation?: string | null,
|
||||||
|
/**
|
||||||
|
* Optionale, spezifische Einschränkungen für diese Berechtigung.
|
||||||
|
*/
|
||||||
|
constraints?: Record<string, unknown>,
|
||||||
|
/**
|
||||||
|
* Der Status der Berechtigung (wird nur im UI-Modell verwendet).
|
||||||
|
*/
|
||||||
|
status?: PermissionStatus | null, };
|
||||||
3
src-tauri/bindings/PermissionStatus.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type PermissionStatus = "ask" | "granted" | "denied";
|
||||||
3
src-tauri/bindings/RateLimit.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type RateLimit = { requests: number, per_minutes: number, };
|
||||||
3
src-tauri/bindings/ResourceType.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type ResourceType = "fs" | "http" | "db" | "shell";
|
||||||
6
src-tauri/bindings/ShellAction.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definiert Aktionen, die auf Shell-Befehle angewendet werden können.
|
||||||
|
*/
|
||||||
|
export type ShellAction = "execute";
|
||||||
3
src-tauri/bindings/ShellConstraints.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type ShellConstraints = { allowed_subcommands: Array<string> | null, allowed_flags: Array<string> | null, forbidden_args: Array<string> | null, };
|
||||||
3
src-tauri/bindings/TriggerSetupResult.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type TriggerSetupResult = "Success" | "TableNotFound";
|
||||||
3
src-tauri/bindings/VaultInfo.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type VaultInfo = { name: string, lastAccess: bigint, path: string, };
|
||||||
@ -1,3 +1,7 @@
|
|||||||
|
mod generator;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tauri_build::build()
|
generator::table_names::generate_table_names();
|
||||||
|
generator::rust_types::generate_rust_types();
|
||||||
|
tauri_build::build();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,25 +5,41 @@
|
|||||||
"windows": ["main"],
|
"windows": ["main"],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
|
"core:webview:allow-create-webview-window",
|
||||||
|
"core:webview:allow-create-webview",
|
||||||
|
"core:webview:allow-webview-show",
|
||||||
|
"core:webview:default",
|
||||||
|
"core:window:allow-create",
|
||||||
|
"core:window:allow-get-all-windows",
|
||||||
|
"core:window:allow-show",
|
||||||
|
"core:window:default",
|
||||||
"dialog:default",
|
"dialog:default",
|
||||||
|
"fs:allow-appconfig-read-recursive",
|
||||||
|
"fs:allow-appconfig-write-recursive",
|
||||||
|
"fs:allow-appdata-read-recursive",
|
||||||
|
"fs:allow-appdata-write-recursive",
|
||||||
"fs:allow-read-file",
|
"fs:allow-read-file",
|
||||||
|
"fs:allow-read-dir",
|
||||||
"fs:allow-resource-read-recursive",
|
"fs:allow-resource-read-recursive",
|
||||||
"fs:default",
|
|
||||||
"fs:allow-resource-write-recursive",
|
"fs:allow-resource-write-recursive",
|
||||||
|
"fs:allow-download-read-recursive",
|
||||||
|
"fs:allow-download-write-recursive",
|
||||||
|
"fs:default",
|
||||||
|
{
|
||||||
|
"identifier": "fs:scope",
|
||||||
|
"allow": [{ "path": "**" }]
|
||||||
|
},
|
||||||
"http:allow-fetch-send",
|
"http:allow-fetch-send",
|
||||||
"http:allow-fetch",
|
"http:allow-fetch",
|
||||||
"http:default",
|
"http:default",
|
||||||
|
"notification:allow-create-channel",
|
||||||
|
"notification:allow-list-channels",
|
||||||
|
"notification:allow-notify",
|
||||||
|
"notification:default",
|
||||||
"opener:allow-open-url",
|
"opener:allow-open-url",
|
||||||
"opener:default",
|
"opener:default",
|
||||||
|
"os:allow-hostname",
|
||||||
"os:default",
|
"os:default",
|
||||||
"store:default",
|
"store:default"
|
||||||
"core:window:allow-create",
|
|
||||||
"core:window:default",
|
|
||||||
"core:window:allow-get-all-windows",
|
|
||||||
"core:window:allow-show",
|
|
||||||
"core:webview:allow-create-webview",
|
|
||||||
"core:webview:allow-create-webview-window",
|
|
||||||
"core:webview:default",
|
|
||||||
"core:webview:allow-webview-show"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
192
src-tauri/database/generate-rust-types.ts
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
import { writeFileSync, mkdirSync } from 'node:fs'
|
||||||
|
import { join, dirname } from 'node:path'
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
import tablesNames from './tableNames.json'
|
||||||
|
import { schema } from './index'
|
||||||
|
import { getTableColumns } from 'drizzle-orm'
|
||||||
|
import type { AnySQLiteColumn, SQLiteTable } from 'drizzle-orm/sqlite-core'
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
|
const __dirname = dirname(__filename)
|
||||||
|
|
||||||
|
interface Column {
|
||||||
|
name: string
|
||||||
|
rustType: string
|
||||||
|
isOptional: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
function drizzleToRustType(colDef: AnySQLiteColumn): {
|
||||||
|
rustType: string
|
||||||
|
isOptional: boolean
|
||||||
|
} {
|
||||||
|
let baseType = 'String'
|
||||||
|
let isOptional = !colDef.notNull
|
||||||
|
|
||||||
|
if (colDef.columnType === 'SQLiteText') {
|
||||||
|
if ('mode' in colDef && colDef.mode === 'json') {
|
||||||
|
baseType = 'serde_json::Value'
|
||||||
|
} else {
|
||||||
|
baseType = 'String'
|
||||||
|
}
|
||||||
|
} else if (colDef.columnType === 'SQLiteInteger') {
|
||||||
|
baseType = 'i64'
|
||||||
|
} else if (colDef.columnType === 'SQLiteBoolean') {
|
||||||
|
baseType = 'bool'
|
||||||
|
} else if (colDef.columnType === 'SQLiteReal') {
|
||||||
|
baseType = 'f64'
|
||||||
|
} else if (colDef.columnType === 'SQLiteBlob') {
|
||||||
|
baseType = 'Vec<u8>'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Drizzle verwendet 'primary' für den Primärschlüssel-Status
|
||||||
|
if (colDef.primary) {
|
||||||
|
isOptional = false
|
||||||
|
}
|
||||||
|
|
||||||
|
return { rustType: baseType, isOptional }
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractColumns(table: SQLiteTable): Column[] {
|
||||||
|
const columns: Column[] = []
|
||||||
|
|
||||||
|
// getTableColumns gibt ein Record<string, AnySQLiteColumn> zurück
|
||||||
|
const tableColumns = getTableColumns(table)
|
||||||
|
|
||||||
|
// Object.values gibt uns ein Array vom Typ AnySQLiteColumn[]
|
||||||
|
for (const colDef of Object.values(tableColumns)) {
|
||||||
|
// Die relevanten Infos stehen im 'config' Property der Spalte.
|
||||||
|
// TypeScript kennt den Typ von 'config' bereits!
|
||||||
|
const { rustType, isOptional } = drizzleToRustType(colDef)
|
||||||
|
|
||||||
|
columns.push({
|
||||||
|
name: colDef.name,
|
||||||
|
rustType: isOptional ? `Option<${rustType}>` : rustType,
|
||||||
|
isOptional,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return columns
|
||||||
|
}
|
||||||
|
|
||||||
|
function toSnakeCase(str: string): string {
|
||||||
|
return str.replace(/[A-Z]/g, (letter, index) =>
|
||||||
|
index === 0 ? letter.toLowerCase() : `_${letter.toLowerCase()}`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function toPascalCase(str: string): string {
|
||||||
|
console.log('toPascalCase:', str)
|
||||||
|
return str
|
||||||
|
.split('_')
|
||||||
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
||||||
|
.join('')
|
||||||
|
}
|
||||||
|
|
||||||
|
const RUST_KEYWORDS = new Set([
|
||||||
|
'type',
|
||||||
|
'struct',
|
||||||
|
'enum',
|
||||||
|
'pub',
|
||||||
|
'use',
|
||||||
|
'as',
|
||||||
|
'crate',
|
||||||
|
'super',
|
||||||
|
'self',
|
||||||
|
'let',
|
||||||
|
'mut',
|
||||||
|
])
|
||||||
|
|
||||||
|
function generateStruct(name: string, columns: Column[]): string {
|
||||||
|
let structName = toPascalCase(name)
|
||||||
|
|
||||||
|
if (RUST_KEYWORDS.has(structName.toLowerCase())) {
|
||||||
|
structName = `r#${structName}`
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Teil 1: Struct-Definition ---
|
||||||
|
let code = `#[derive(Debug, Clone, Serialize, Deserialize)]\n`
|
||||||
|
code += `#[serde(rename_all = "camelCase")]\n`
|
||||||
|
code += `pub struct ${structName} {\n`
|
||||||
|
|
||||||
|
for (const col of columns) {
|
||||||
|
let fieldName = toSnakeCase(col.name)
|
||||||
|
|
||||||
|
// Prüfen, ob der Name ein Keyword ist
|
||||||
|
if (RUST_KEYWORDS.has(fieldName)) {
|
||||||
|
fieldName = `r#${fieldName}`
|
||||||
|
}
|
||||||
|
|
||||||
|
if (col.isOptional) {
|
||||||
|
code += ` #[serde(skip_serializing_if = "Option::is_none")]\n`
|
||||||
|
}
|
||||||
|
// Wichtig: #[serde(rename = "...")] hinzufügen, falls der Feldname geändert wurde!
|
||||||
|
if (fieldName.startsWith('r#')) {
|
||||||
|
const originalName = fieldName.substring(2)
|
||||||
|
code += ` #[serde(rename = "${originalName}")]\n`
|
||||||
|
}
|
||||||
|
code += ` pub ${fieldName}: ${col.rustType},\n`
|
||||||
|
}
|
||||||
|
|
||||||
|
code += `}\n\n`
|
||||||
|
|
||||||
|
// --- Teil 2: Impl-Block ---
|
||||||
|
code += `impl ${structName} {\n`
|
||||||
|
code += ` pub fn from_row(row: &rusqlite::Row) -> rusqlite::Result<Self> {\n`
|
||||||
|
code += ` Ok(Self {\n`
|
||||||
|
|
||||||
|
columns.forEach((col, idx) => {
|
||||||
|
let fieldName = toSnakeCase(col.name)
|
||||||
|
if (RUST_KEYWORDS.has(fieldName)) {
|
||||||
|
fieldName = `r#${fieldName}`
|
||||||
|
}
|
||||||
|
code += ` ${fieldName}: row.get(${idx})?,\n`
|
||||||
|
})
|
||||||
|
|
||||||
|
code += ` })\n`
|
||||||
|
code += ` }\n`
|
||||||
|
code += `}\n\n`
|
||||||
|
|
||||||
|
return code
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
let output = `// Auto-generated from Drizzle schema
|
||||||
|
// DO NOT EDIT MANUALLY
|
||||||
|
// Run 'pnpm generate:rust-types' to regenerate
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
const schemas = [
|
||||||
|
{ name: tablesNames.haex.settings.name, table: schema.haexSettings },
|
||||||
|
{ name: tablesNames.haex.extensions.name, table: schema.haexExtensions },
|
||||||
|
{
|
||||||
|
name: tablesNames.haex.extension_permissions.name,
|
||||||
|
table: schema.haexExtensionPermissions,
|
||||||
|
},
|
||||||
|
{ name: tablesNames.haex.crdt.logs.name, table: schema.haexCrdtLogs },
|
||||||
|
{
|
||||||
|
name: tablesNames.haex.crdt.snapshots.name,
|
||||||
|
table: schema.haexCrdtSnapshots,
|
||||||
|
},
|
||||||
|
{ name: tablesNames.haex.crdt.configs.name, table: schema.haexCrdtConfigs },
|
||||||
|
]
|
||||||
|
|
||||||
|
for (const { name, table } of schemas) {
|
||||||
|
console.log(`\n=== Processing table: ${name} ===`)
|
||||||
|
const columns = extractColumns(table)
|
||||||
|
console.log(`Found ${columns.length} columns`)
|
||||||
|
|
||||||
|
if (columns.length > 0) {
|
||||||
|
output += generateStruct(name, columns)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const outputPath = join(__dirname, '../src/database/generated.rs')
|
||||||
|
mkdirSync(dirname(outputPath), { recursive: true })
|
||||||
|
writeFileSync(outputPath, output, 'utf-8')
|
||||||
|
|
||||||
|
console.log('\n✅ Rust types generated:', outputPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
@ -1,23 +1,23 @@
|
|||||||
import { drizzle } from "drizzle-orm/sqlite-proxy"; // Adapter für Query Building ohne direkte Verbindung
|
import { drizzle } from 'drizzle-orm/sqlite-proxy' // Adapter für Query Building ohne direkte Verbindung
|
||||||
import * as schema from "./schemas/vault"; // Importiere alles aus deiner Schema-Datei
|
import * as schema from './schemas' // Importiere alles aus deiner Schema-Datei
|
||||||
|
export * as schema from './schemas'
|
||||||
// sqlite-proxy benötigt eine (dummy) Ausführungsfunktion als Argument.
|
// sqlite-proxy benötigt eine (dummy) Ausführungsfunktion als Argument.
|
||||||
// Diese wird in unserem Tauri-Workflow nie aufgerufen, da wir nur .toSQL() verwenden.
|
// Diese wird in unserem Tauri-Workflow nie aufgerufen, da wir nur .toSQL() verwenden.
|
||||||
// Sie muss aber vorhanden sein, um drizzle() aufrufen zu können.
|
// Sie muss aber vorhanden sein, um drizzle() aufrufen zu können.
|
||||||
const dummyExecutor = async (
|
const dummyExecutor = async (
|
||||||
sql: string,
|
sql: string,
|
||||||
params: any[],
|
params: unknown[],
|
||||||
method: "all" | "run" | "get" | "values"
|
method: 'all' | 'run' | 'get' | 'values',
|
||||||
) => {
|
) => {
|
||||||
console.warn(
|
console.warn(
|
||||||
`Frontend Drizzle Executor wurde aufgerufen (Methode: ${method}). Das sollte im Tauri-Invoke-Workflow nicht passieren!`
|
`Frontend Drizzle Executor wurde aufgerufen (Methode: ${method}). Das sollte im Tauri-Invoke-Workflow nicht passieren!`,
|
||||||
);
|
)
|
||||||
// Wir geben leere Ergebnisse zurück, um die Typen zufriedenzustellen, falls es doch aufgerufen wird.
|
// Wir geben leere Ergebnisse zurück, um die Typen zufriedenzustellen, falls es doch aufgerufen wird.
|
||||||
return { rows: [] }; // Für 'run' (z.B. bei INSERT/UPDATE)
|
return { rows: [] } // Für 'run' (z.B. bei INSERT/UPDATE)
|
||||||
};
|
}
|
||||||
|
|
||||||
// Erstelle die Drizzle-Instanz für den SQLite-Dialekt
|
// Erstelle die Drizzle-Instanz für den SQLite-Dialekt
|
||||||
// Übergib den dummyExecutor und das importierte Schema
|
// Übergib den dummyExecutor und das importierte Schema
|
||||||
export const db = drizzle(dummyExecutor, { schema });
|
export const db = drizzle(dummyExecutor, { schema })
|
||||||
|
|
||||||
// Exportiere auch alle Schema-Definitionen weiter, damit man alles aus einer Datei importieren kann
|
// Exportiere auch alle Schema-Definitionen weiter, damit man alles aus einer Datei importieren kann
|
||||||
|
|||||||
139
src-tauri/database/migrations/0000_glamorous_hulk.sql
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
CREATE TABLE `haex_crdt_configs` (
|
||||||
|
`key` text PRIMARY KEY NOT NULL,
|
||||||
|
`value` text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_crdt_logs` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`haex_timestamp` text,
|
||||||
|
`table_name` text,
|
||||||
|
`row_pks` text,
|
||||||
|
`op_type` text,
|
||||||
|
`column_name` text,
|
||||||
|
`new_value` text,
|
||||||
|
`old_value` text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE INDEX `idx_haex_timestamp` ON `haex_crdt_logs` (`haex_timestamp`);--> statement-breakpoint
|
||||||
|
CREATE INDEX `idx_table_row` ON `haex_crdt_logs` (`table_name`,`row_pks`);--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_crdt_snapshots` (
|
||||||
|
`snapshot_id` text PRIMARY KEY NOT NULL,
|
||||||
|
`created` text,
|
||||||
|
`epoch_hlc` text,
|
||||||
|
`location_url` text,
|
||||||
|
`file_size_bytes` integer
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_extension_permissions` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`extension_id` text,
|
||||||
|
`resource_type` text,
|
||||||
|
`action` text,
|
||||||
|
`target` text,
|
||||||
|
`constraints` text,
|
||||||
|
`status` text DEFAULT 'denied' NOT NULL,
|
||||||
|
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
`updated_at` integer,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
`haex_timestamp` text,
|
||||||
|
FOREIGN KEY (`extension_id`) REFERENCES `haex_extensions`(`id`) ON UPDATE no action ON DELETE no action
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE UNIQUE INDEX `haex_extension_permissions_extension_id_resource_type_action_target_unique` ON `haex_extension_permissions` (`extension_id`,`resource_type`,`action`,`target`);--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_extensions` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`author` text,
|
||||||
|
`description` text,
|
||||||
|
`entry` text,
|
||||||
|
`homepage` text,
|
||||||
|
`enabled` integer,
|
||||||
|
`icon` text,
|
||||||
|
`name` text,
|
||||||
|
`public_key` text,
|
||||||
|
`signature` text,
|
||||||
|
`url` text,
|
||||||
|
`version` text,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
`haex_timestamp` text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_settings` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`key` text,
|
||||||
|
`type` text,
|
||||||
|
`value` text,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
`haex_timestamp` text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_notifications` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`alt` text,
|
||||||
|
`date` text,
|
||||||
|
`icon` text,
|
||||||
|
`image` text,
|
||||||
|
`read` integer,
|
||||||
|
`source` text,
|
||||||
|
`text` text,
|
||||||
|
`title` text,
|
||||||
|
`type` text NOT NULL,
|
||||||
|
`haex_tombstone` integer
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_passwords_group_items` (
|
||||||
|
`group_id` text,
|
||||||
|
`item_id` text,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
PRIMARY KEY(`item_id`, `group_id`),
|
||||||
|
FOREIGN KEY (`group_id`) REFERENCES `haex_passwords_groups`(`id`) ON UPDATE no action ON DELETE no action,
|
||||||
|
FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_item_details`(`id`) ON UPDATE no action ON DELETE no action
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_passwords_groups` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`name` text,
|
||||||
|
`description` text,
|
||||||
|
`icon` text,
|
||||||
|
`order` integer,
|
||||||
|
`color` text,
|
||||||
|
`parent_id` text,
|
||||||
|
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
`updated_at` integer,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
FOREIGN KEY (`parent_id`) REFERENCES `haex_passwords_groups`(`id`) ON UPDATE no action ON DELETE no action
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_passwords_item_details` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`title` text,
|
||||||
|
`username` text,
|
||||||
|
`password` text,
|
||||||
|
`note` text,
|
||||||
|
`icon` text,
|
||||||
|
`tags` text,
|
||||||
|
`url` text,
|
||||||
|
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
`updated_at` integer,
|
||||||
|
`haex_tombstone` integer
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_passwords_item_history` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`item_id` text,
|
||||||
|
`changed_property` text,
|
||||||
|
`old_value` text,
|
||||||
|
`new_value` text,
|
||||||
|
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_item_details`(`id`) ON UPDATE no action ON DELETE no action
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE `haex_passwords_item_key_values` (
|
||||||
|
`id` text PRIMARY KEY NOT NULL,
|
||||||
|
`item_id` text,
|
||||||
|
`key` text,
|
||||||
|
`value` text,
|
||||||
|
`updated_at` integer,
|
||||||
|
`haex_tombstone` integer,
|
||||||
|
FOREIGN KEY (`item_id`) REFERENCES `haex_passwords_item_details`(`id`) ON UPDATE no action ON DELETE no action
|
||||||
|
);
|
||||||
@ -1,26 +0,0 @@
|
|||||||
CREATE TABLE `haex_extensions` (
|
|
||||||
`id` text PRIMARY KEY NOT NULL,
|
|
||||||
`author` text,
|
|
||||||
`enabled` integer,
|
|
||||||
`name` text,
|
|
||||||
`url` text,
|
|
||||||
`version` text
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE `haex_extensions_permissions` (
|
|
||||||
`id` text PRIMARY KEY NOT NULL,
|
|
||||||
`extension_id` text,
|
|
||||||
`resource` text,
|
|
||||||
`operation` text,
|
|
||||||
`path` text,
|
|
||||||
FOREIGN KEY (`extension_id`) REFERENCES `haex_extensions`(`id`) ON UPDATE no action ON DELETE no action
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX `haex_extensions_permissions_extension_id_resource_operation_path_unique` ON `haex_extensions_permissions` (`extension_id`,`resource`,`operation`,`path`);--> statement-breakpoint
|
|
||||||
CREATE TABLE `haex_settings` (
|
|
||||||
`id` text PRIMARY KEY NOT NULL,
|
|
||||||
`key` text,
|
|
||||||
`value_text` text,
|
|
||||||
`value_json` text,
|
|
||||||
`value_number` numeric
|
|
||||||
);
|
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `haex_notifications` ADD `haex_timestamp` text;
|
||||||
@ -1,7 +0,0 @@
|
|||||||
CREATE TABLE `testTable` (
|
|
||||||
`id` text PRIMARY KEY NOT NULL,
|
|
||||||
`author` text,
|
|
||||||
`test` text
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE `haex_extensions` ADD `icon` text;
|
|
||||||
@ -1,9 +1,274 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"dialect": "sqlite",
|
"dialect": "sqlite",
|
||||||
"id": "fc5a7c9d-4846-4120-a762-cc2ea00504b9",
|
"id": "3bbe52b8-5933-4b21-8b24-de3927a2f9b0",
|
||||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||||
"tables": {
|
"tables": {
|
||||||
|
"haex_crdt_configs": {
|
||||||
|
"name": "haex_crdt_configs",
|
||||||
|
"columns": {
|
||||||
|
"key": {
|
||||||
|
"name": "key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"name": "value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_crdt_logs": {
|
||||||
|
"name": "haex_crdt_logs",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"table_name": {
|
||||||
|
"name": "table_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"row_pks": {
|
||||||
|
"name": "row_pks",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"op_type": {
|
||||||
|
"name": "op_type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"column_name": {
|
||||||
|
"name": "column_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"new_value": {
|
||||||
|
"name": "new_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"old_value": {
|
||||||
|
"name": "old_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {
|
||||||
|
"idx_haex_timestamp": {
|
||||||
|
"name": "idx_haex_timestamp",
|
||||||
|
"columns": [
|
||||||
|
"haex_timestamp"
|
||||||
|
],
|
||||||
|
"isUnique": false
|
||||||
|
},
|
||||||
|
"idx_table_row": {
|
||||||
|
"name": "idx_table_row",
|
||||||
|
"columns": [
|
||||||
|
"table_name",
|
||||||
|
"row_pks"
|
||||||
|
],
|
||||||
|
"isUnique": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_crdt_snapshots": {
|
||||||
|
"name": "haex_crdt_snapshots",
|
||||||
|
"columns": {
|
||||||
|
"snapshot_id": {
|
||||||
|
"name": "snapshot_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created": {
|
||||||
|
"name": "created",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"epoch_hlc": {
|
||||||
|
"name": "epoch_hlc",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"location_url": {
|
||||||
|
"name": "location_url",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"file_size_bytes": {
|
||||||
|
"name": "file_size_bytes",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_extension_permissions": {
|
||||||
|
"name": "haex_extension_permissions",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"extension_id": {
|
||||||
|
"name": "extension_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"resource_type": {
|
||||||
|
"name": "resource_type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"name": "action",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"target": {
|
||||||
|
"name": "target",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"constraints": {
|
||||||
|
"name": "constraints",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"name": "status",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "'denied'"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {
|
||||||
|
"haex_extension_permissions_extension_id_resource_type_action_target_unique": {
|
||||||
|
"name": "haex_extension_permissions_extension_id_resource_type_action_target_unique",
|
||||||
|
"columns": [
|
||||||
|
"extension_id",
|
||||||
|
"resource_type",
|
||||||
|
"action",
|
||||||
|
"target"
|
||||||
|
],
|
||||||
|
"isUnique": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_extension_permissions_extension_id_haex_extensions_id_fk": {
|
||||||
|
"name": "haex_extension_permissions_extension_id_haex_extensions_id_fk",
|
||||||
|
"tableFrom": "haex_extension_permissions",
|
||||||
|
"tableTo": "haex_extensions",
|
||||||
|
"columnsFrom": [
|
||||||
|
"extension_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
"haex_extensions": {
|
"haex_extensions": {
|
||||||
"name": "haex_extensions",
|
"name": "haex_extensions",
|
||||||
"columns": {
|
"columns": {
|
||||||
@ -21,6 +286,27 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"entry": {
|
||||||
|
"name": "entry",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"homepage": {
|
||||||
|
"name": "homepage",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"name": "enabled",
|
"name": "enabled",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -28,6 +314,13 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@ -35,6 +328,20 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
|
"public_key": {
|
||||||
|
"name": "public_key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"signature": {
|
||||||
|
"name": "signature",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"name": "url",
|
"name": "url",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@ -48,6 +355,20 @@
|
|||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {},
|
"indexes": {},
|
||||||
@ -56,76 +377,6 @@
|
|||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"haex_extensions_permissions": {
|
|
||||||
"name": "haex_extensions_permissions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"extension_id": {
|
|
||||||
"name": "extension_id",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"resource": {
|
|
||||||
"name": "resource",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"operation": {
|
|
||||||
"name": "operation",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"path": {
|
|
||||||
"name": "path",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"haex_extensions_permissions_extension_id_resource_operation_path_unique": {
|
|
||||||
"name": "haex_extensions_permissions_extension_id_resource_operation_path_unique",
|
|
||||||
"columns": [
|
|
||||||
"extension_id",
|
|
||||||
"resource",
|
|
||||||
"operation",
|
|
||||||
"path"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"haex_extensions_permissions_extension_id_haex_extensions_id_fk": {
|
|
||||||
"name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk",
|
|
||||||
"tableFrom": "haex_extensions_permissions",
|
|
||||||
"tableTo": "haex_extensions",
|
|
||||||
"columnsFrom": [
|
|
||||||
"extension_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "no action",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraints": {}
|
|
||||||
},
|
|
||||||
"haex_settings": {
|
"haex_settings": {
|
||||||
"name": "haex_settings",
|
"name": "haex_settings",
|
||||||
"columns": {
|
"columns": {
|
||||||
@ -143,23 +394,30 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_text": {
|
"type": {
|
||||||
"name": "value_text",
|
"name": "type",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_json": {
|
"value": {
|
||||||
"name": "value_json",
|
"name": "value",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_number": {
|
"haex_tombstone": {
|
||||||
"name": "value_number",
|
"name": "haex_tombstone",
|
||||||
"type": "numeric",
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
@ -170,6 +428,482 @@
|
|||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_notifications": {
|
||||||
|
"name": "haex_notifications",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"alt": {
|
||||||
|
"name": "alt",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"name": "date",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"name": "image",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"read": {
|
||||||
|
"name": "read",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"name": "source",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"name": "text",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"name": "type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_group_items": {
|
||||||
|
"name": "haex_passwords_group_items",
|
||||||
|
"columns": {
|
||||||
|
"group_id": {
|
||||||
|
"name": "group_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_group_items_group_id_haex_passwords_groups_id_fk": {
|
||||||
|
"name": "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_group_items",
|
||||||
|
"tableTo": "haex_passwords_groups",
|
||||||
|
"columnsFrom": [
|
||||||
|
"group_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"haex_passwords_group_items_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_group_items_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_group_items",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {
|
||||||
|
"haex_passwords_group_items_item_id_group_id_pk": {
|
||||||
|
"columns": [
|
||||||
|
"item_id",
|
||||||
|
"group_id"
|
||||||
|
],
|
||||||
|
"name": "haex_passwords_group_items_item_id_group_id_pk"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_groups": {
|
||||||
|
"name": "haex_passwords_groups",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"name": "order",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"name": "color",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"parent_id": {
|
||||||
|
"name": "parent_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_groups_parent_id_haex_passwords_groups_id_fk": {
|
||||||
|
"name": "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_groups",
|
||||||
|
"tableTo": "haex_passwords_groups",
|
||||||
|
"columnsFrom": [
|
||||||
|
"parent_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_details": {
|
||||||
|
"name": "haex_passwords_item_details",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"name": "username",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"name": "password",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"note": {
|
||||||
|
"name": "note",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"name": "tags",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"name": "url",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_history": {
|
||||||
|
"name": "haex_passwords_item_history",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"changed_property": {
|
||||||
|
"name": "changed_property",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"old_value": {
|
||||||
|
"name": "old_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"new_value": {
|
||||||
|
"name": "new_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_item_history_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_item_history_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_item_history",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_key_values": {
|
||||||
|
"name": "haex_passwords_item_key_values",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"name": "key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"name": "value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_item_key_values_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_item_key_values_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_item_key_values",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"views": {},
|
"views": {},
|
||||||
|
|||||||
@ -1,9 +1,274 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"dialect": "sqlite",
|
"dialect": "sqlite",
|
||||||
"id": "6fb5396b-9f87-4fb5-87a2-22d4eecaa11e",
|
"id": "862ac1d5-3065-4244-8652-2b6782254862",
|
||||||
"prevId": "fc5a7c9d-4846-4120-a762-cc2ea00504b9",
|
"prevId": "3bbe52b8-5933-4b21-8b24-de3927a2f9b0",
|
||||||
"tables": {
|
"tables": {
|
||||||
|
"haex_crdt_configs": {
|
||||||
|
"name": "haex_crdt_configs",
|
||||||
|
"columns": {
|
||||||
|
"key": {
|
||||||
|
"name": "key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"name": "value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_crdt_logs": {
|
||||||
|
"name": "haex_crdt_logs",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"table_name": {
|
||||||
|
"name": "table_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"row_pks": {
|
||||||
|
"name": "row_pks",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"op_type": {
|
||||||
|
"name": "op_type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"column_name": {
|
||||||
|
"name": "column_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"new_value": {
|
||||||
|
"name": "new_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"old_value": {
|
||||||
|
"name": "old_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {
|
||||||
|
"idx_haex_timestamp": {
|
||||||
|
"name": "idx_haex_timestamp",
|
||||||
|
"columns": [
|
||||||
|
"haex_timestamp"
|
||||||
|
],
|
||||||
|
"isUnique": false
|
||||||
|
},
|
||||||
|
"idx_table_row": {
|
||||||
|
"name": "idx_table_row",
|
||||||
|
"columns": [
|
||||||
|
"table_name",
|
||||||
|
"row_pks"
|
||||||
|
],
|
||||||
|
"isUnique": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_crdt_snapshots": {
|
||||||
|
"name": "haex_crdt_snapshots",
|
||||||
|
"columns": {
|
||||||
|
"snapshot_id": {
|
||||||
|
"name": "snapshot_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created": {
|
||||||
|
"name": "created",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"epoch_hlc": {
|
||||||
|
"name": "epoch_hlc",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"location_url": {
|
||||||
|
"name": "location_url",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"file_size_bytes": {
|
||||||
|
"name": "file_size_bytes",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_extension_permissions": {
|
||||||
|
"name": "haex_extension_permissions",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"extension_id": {
|
||||||
|
"name": "extension_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"resource_type": {
|
||||||
|
"name": "resource_type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"name": "action",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"target": {
|
||||||
|
"name": "target",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"constraints": {
|
||||||
|
"name": "constraints",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"name": "status",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "'denied'"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {
|
||||||
|
"haex_extension_permissions_extension_id_resource_type_action_target_unique": {
|
||||||
|
"name": "haex_extension_permissions_extension_id_resource_type_action_target_unique",
|
||||||
|
"columns": [
|
||||||
|
"extension_id",
|
||||||
|
"resource_type",
|
||||||
|
"action",
|
||||||
|
"target"
|
||||||
|
],
|
||||||
|
"isUnique": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_extension_permissions_extension_id_haex_extensions_id_fk": {
|
||||||
|
"name": "haex_extension_permissions_extension_id_haex_extensions_id_fk",
|
||||||
|
"tableFrom": "haex_extension_permissions",
|
||||||
|
"tableTo": "haex_extensions",
|
||||||
|
"columnsFrom": [
|
||||||
|
"extension_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
"haex_extensions": {
|
"haex_extensions": {
|
||||||
"name": "haex_extensions",
|
"name": "haex_extensions",
|
||||||
"columns": {
|
"columns": {
|
||||||
@ -21,6 +286,27 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"entry": {
|
||||||
|
"name": "entry",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"homepage": {
|
||||||
|
"name": "homepage",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"name": "enabled",
|
"name": "enabled",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -42,6 +328,20 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
|
"public_key": {
|
||||||
|
"name": "public_key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"signature": {
|
||||||
|
"name": "signature",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"name": "url",
|
"name": "url",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@ -55,6 +355,20 @@
|
|||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {},
|
"indexes": {},
|
||||||
@ -63,8 +377,8 @@
|
|||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"haex_extensions_permissions": {
|
"haex_notifications": {
|
||||||
"name": "haex_extensions_permissions",
|
"name": "haex_notifications",
|
||||||
"columns": {
|
"columns": {
|
||||||
"id": {
|
"id": {
|
||||||
"name": "id",
|
"name": "id",
|
||||||
@ -73,62 +387,86 @@
|
|||||||
"notNull": true,
|
"notNull": true,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"extension_id": {
|
"alt": {
|
||||||
"name": "extension_id",
|
"name": "alt",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"resource": {
|
"date": {
|
||||||
"name": "resource",
|
"name": "date",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"operation": {
|
"icon": {
|
||||||
"name": "operation",
|
"name": "icon",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"path": {
|
"image": {
|
||||||
"name": "path",
|
"name": "image",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"read": {
|
||||||
|
"name": "read",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"name": "source",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"name": "text",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"name": "type",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {
|
"indexes": {},
|
||||||
"haex_extensions_permissions_extension_id_resource_operation_path_unique": {
|
"foreignKeys": {},
|
||||||
"name": "haex_extensions_permissions_extension_id_resource_operation_path_unique",
|
|
||||||
"columns": [
|
|
||||||
"extension_id",
|
|
||||||
"resource",
|
|
||||||
"operation",
|
|
||||||
"path"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"haex_extensions_permissions_extension_id_haex_extensions_id_fk": {
|
|
||||||
"name": "haex_extensions_permissions_extension_id_haex_extensions_id_fk",
|
|
||||||
"tableFrom": "haex_extensions_permissions",
|
|
||||||
"tableTo": "haex_extensions",
|
|
||||||
"columnsFrom": [
|
|
||||||
"extension_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "no action",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
@ -150,23 +488,30 @@
|
|||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_text": {
|
"type": {
|
||||||
"name": "value_text",
|
"name": "type",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_json": {
|
"value": {
|
||||||
"name": "value_json",
|
"name": "value",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"value_number": {
|
"haex_tombstone": {
|
||||||
"name": "value_number",
|
"name": "haex_tombstone",
|
||||||
"type": "numeric",
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_timestamp": {
|
||||||
|
"name": "haex_timestamp",
|
||||||
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
@ -178,8 +523,74 @@
|
|||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"testTable": {
|
"haex_passwords_group_items": {
|
||||||
"name": "testTable",
|
"name": "haex_passwords_group_items",
|
||||||
|
"columns": {
|
||||||
|
"group_id": {
|
||||||
|
"name": "group_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_group_items_group_id_haex_passwords_groups_id_fk": {
|
||||||
|
"name": "haex_passwords_group_items_group_id_haex_passwords_groups_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_group_items",
|
||||||
|
"tableTo": "haex_passwords_groups",
|
||||||
|
"columnsFrom": [
|
||||||
|
"group_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"haex_passwords_group_items_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_group_items_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_group_items",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {
|
||||||
|
"haex_passwords_group_items_item_id_group_id_pk": {
|
||||||
|
"columns": [
|
||||||
|
"item_id",
|
||||||
|
"group_id"
|
||||||
|
],
|
||||||
|
"name": "haex_passwords_group_items_item_id_group_id_pk"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_groups": {
|
||||||
|
"name": "haex_passwords_groups",
|
||||||
"columns": {
|
"columns": {
|
||||||
"id": {
|
"id": {
|
||||||
"name": "id",
|
"name": "id",
|
||||||
@ -188,19 +599,171 @@
|
|||||||
"notNull": true,
|
"notNull": true,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"author": {
|
"name": {
|
||||||
"name": "author",
|
"name": "name",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
},
|
},
|
||||||
"test": {
|
"description": {
|
||||||
"name": "test",
|
"name": "description",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false,
|
"notNull": false,
|
||||||
"autoincrement": false
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"name": "order",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"name": "color",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"parent_id": {
|
||||||
|
"name": "parent_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_groups_parent_id_haex_passwords_groups_id_fk": {
|
||||||
|
"name": "haex_passwords_groups_parent_id_haex_passwords_groups_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_groups",
|
||||||
|
"tableTo": "haex_passwords_groups",
|
||||||
|
"columnsFrom": [
|
||||||
|
"parent_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_details": {
|
||||||
|
"name": "haex_passwords_item_details",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"name": "username",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"name": "password",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"note": {
|
||||||
|
"name": "note",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"name": "tags",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"name": "url",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {},
|
"indexes": {},
|
||||||
@ -208,6 +771,146 @@
|
|||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
"checkConstraints": {}
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_history": {
|
||||||
|
"name": "haex_passwords_item_history",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"changed_property": {
|
||||||
|
"name": "changed_property",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"old_value": {
|
||||||
|
"name": "old_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"new_value": {
|
||||||
|
"name": "new_value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"name": "created_at",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false,
|
||||||
|
"default": "(CURRENT_TIMESTAMP)"
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_item_history_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_item_history_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_item_history",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
|
},
|
||||||
|
"haex_passwords_item_key_values": {
|
||||||
|
"name": "haex_passwords_item_key_values",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"item_id": {
|
||||||
|
"name": "item_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"name": "key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"name": "value",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"name": "updated_at",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
},
|
||||||
|
"haex_tombstone": {
|
||||||
|
"name": "haex_tombstone",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"autoincrement": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"haex_passwords_item_key_values_item_id_haex_passwords_item_details_id_fk": {
|
||||||
|
"name": "haex_passwords_item_key_values_item_id_haex_passwords_item_details_id_fk",
|
||||||
|
"tableFrom": "haex_passwords_item_key_values",
|
||||||
|
"tableTo": "haex_passwords_item_details",
|
||||||
|
"columnsFrom": [
|
||||||
|
"item_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"views": {},
|
"views": {},
|
||||||
|
|||||||
@ -5,15 +5,15 @@
|
|||||||
{
|
{
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"when": 1742903332283,
|
"when": 1759402321133,
|
||||||
"tag": "0000_zippy_scourge",
|
"tag": "0000_glamorous_hulk",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"when": 1746281577722,
|
"when": 1759418087677,
|
||||||
"tag": "0001_wealthy_thaddeus_ross",
|
"tag": "0001_green_stark_industries",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
52
src-tauri/database/schemas/crdt.ts
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import { integer, sqliteTable, text, index } from 'drizzle-orm/sqlite-core'
|
||||||
|
import tableNames from '../tableNames.json'
|
||||||
|
|
||||||
|
export const haexCrdtLogs = sqliteTable(
|
||||||
|
tableNames.haex.crdt.logs.name,
|
||||||
|
{
|
||||||
|
id: text()
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
haexTimestamp: text(tableNames.haex.crdt.logs.columns.haexTimestamp),
|
||||||
|
tableName: text(tableNames.haex.crdt.logs.columns.tableName),
|
||||||
|
rowPks: text(tableNames.haex.crdt.logs.columns.rowPks, { mode: 'json' }),
|
||||||
|
opType: text(tableNames.haex.crdt.logs.columns.opType, {
|
||||||
|
enum: ['INSERT', 'UPDATE', 'DELETE'],
|
||||||
|
}),
|
||||||
|
columnName: text(tableNames.haex.crdt.logs.columns.columnName),
|
||||||
|
newValue: text(tableNames.haex.crdt.logs.columns.newValue, {
|
||||||
|
mode: 'json',
|
||||||
|
}),
|
||||||
|
oldValue: text(tableNames.haex.crdt.logs.columns.oldValue, {
|
||||||
|
mode: 'json',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
(table) => [
|
||||||
|
index('idx_haex_timestamp').on(table.haexTimestamp),
|
||||||
|
index('idx_table_row').on(table.tableName, table.rowPks),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
export type InsertHaexCrdtLogs = typeof haexCrdtLogs.$inferInsert
|
||||||
|
export type SelectHaexCrdtLogs = typeof haexCrdtLogs.$inferSelect
|
||||||
|
|
||||||
|
export const haexCrdtSnapshots = sqliteTable(
|
||||||
|
tableNames.haex.crdt.snapshots.name,
|
||||||
|
{
|
||||||
|
snapshotId: text(tableNames.haex.crdt.snapshots.columns.snapshotId)
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
created: text(),
|
||||||
|
epochHlc: text(tableNames.haex.crdt.snapshots.columns.epochHlc),
|
||||||
|
locationUrl: text(tableNames.haex.crdt.snapshots.columns.locationUrl),
|
||||||
|
fileSizeBytes: integer(
|
||||||
|
tableNames.haex.crdt.snapshots.columns.fileSizeBytes,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
export const haexCrdtConfigs = sqliteTable(tableNames.haex.crdt.configs.name, {
|
||||||
|
key: text()
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
value: text(),
|
||||||
|
})
|
||||||
116
src-tauri/database/schemas/haex.ts
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
import { sql } from 'drizzle-orm'
|
||||||
|
import {
|
||||||
|
integer,
|
||||||
|
sqliteTable,
|
||||||
|
text,
|
||||||
|
unique,
|
||||||
|
type AnySQLiteColumn,
|
||||||
|
} from 'drizzle-orm/sqlite-core'
|
||||||
|
import tableNames from '../tableNames.json'
|
||||||
|
|
||||||
|
export const haexSettings = sqliteTable(tableNames.haex.settings.name, {
|
||||||
|
id: text()
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
key: text(),
|
||||||
|
type: text(),
|
||||||
|
value: text(),
|
||||||
|
haexTombstone: integer(tableNames.haex.settings.columns.haexTombstone, {
|
||||||
|
mode: 'boolean',
|
||||||
|
}),
|
||||||
|
haexTimestamp: text(tableNames.haex.settings.columns.haexTimestamp),
|
||||||
|
})
|
||||||
|
export type InsertHaexSettings = typeof haexSettings.$inferInsert
|
||||||
|
export type SelectHaexSettings = typeof haexSettings.$inferSelect
|
||||||
|
|
||||||
|
export const haexExtensions = sqliteTable(tableNames.haex.extensions.name, {
|
||||||
|
id: text()
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
author: text(),
|
||||||
|
description: text(),
|
||||||
|
entry: text(),
|
||||||
|
homepage: text(),
|
||||||
|
enabled: integer({ mode: 'boolean' }),
|
||||||
|
icon: text(),
|
||||||
|
name: text(),
|
||||||
|
public_key: text(),
|
||||||
|
signature: text(),
|
||||||
|
url: text(),
|
||||||
|
version: text(),
|
||||||
|
haexTombstone: integer(tableNames.haex.extensions.columns.haexTombstone, {
|
||||||
|
mode: 'boolean',
|
||||||
|
}),
|
||||||
|
haexTimestamp: text(tableNames.haex.extensions.columns.haexTimestamp),
|
||||||
|
})
|
||||||
|
export type InsertHaexExtensions = typeof haexExtensions.$inferInsert
|
||||||
|
export type SelectHaexExtensions = typeof haexExtensions.$inferSelect
|
||||||
|
|
||||||
|
export const haexExtensionPermissions = sqliteTable(
|
||||||
|
tableNames.haex.extension_permissions.name,
|
||||||
|
{
|
||||||
|
id: text()
|
||||||
|
.primaryKey()
|
||||||
|
.$defaultFn(() => crypto.randomUUID()),
|
||||||
|
extensionId: text(
|
||||||
|
tableNames.haex.extension_permissions.columns.extensionId,
|
||||||
|
).references((): AnySQLiteColumn => haexExtensions.id),
|
||||||
|
resourceType: text('resource_type', {
|
||||||
|
enum: ['fs', 'http', 'db', 'shell'],
|
||||||
|
}),
|
||||||
|
action: text({ enum: ['read', 'write'] }),
|
||||||
|
target: text(),
|
||||||
|
constraints: text({ mode: 'json' }),
|
||||||
|
status: text({ enum: ['ask', 'granted', 'denied'] })
|
||||||
|
.notNull()
|
||||||
|
.default('denied'),
|
||||||
|
createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`),
|
||||||
|
updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate(
|
||||||
|
() => new Date(),
|
||||||
|
),
|
||||||
|
haexTombstone: integer(
|
||||||
|
tableNames.haex.extension_permissions.columns.haexTombstone,
|
||||||
|
{ mode: 'boolean' },
|
||||||
|
),
|
||||||
|
haexTimestamp: text(
|
||||||
|
tableNames.haex.extension_permissions.columns.haexTimestamp,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
(table) => [
|
||||||
|
unique().on(
|
||||||
|
table.extensionId,
|
||||||
|
table.resourceType,
|
||||||
|
table.action,
|
||||||
|
table.target,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
export type InserthaexExtensionPermissions =
|
||||||
|
typeof haexExtensionPermissions.$inferInsert
|
||||||
|
export type SelecthaexExtensionPermissions =
|
||||||
|
typeof haexExtensionPermissions.$inferSelect
|
||||||
|
|
||||||
|
export const haexNotifications = sqliteTable(
|
||||||
|
tableNames.haex.notifications.name,
|
||||||
|
{
|
||||||
|
id: text().primaryKey(),
|
||||||
|
alt: text(),
|
||||||
|
date: text(),
|
||||||
|
icon: text(),
|
||||||
|
image: text(),
|
||||||
|
read: integer({ mode: 'boolean' }),
|
||||||
|
source: text(),
|
||||||
|
text: text(),
|
||||||
|
title: text(),
|
||||||
|
type: text({
|
||||||
|
enum: ['error', 'success', 'warning', 'info', 'log'],
|
||||||
|
}).notNull(),
|
||||||
|
haexTombstone: integer(
|
||||||
|
tableNames.haex.notifications.columns.haexTombstone,
|
||||||
|
{ mode: 'boolean' },
|
||||||
|
),
|
||||||
|
haexTimestamp: text(tableNames.haex.notifications.columns.haexTimestamp),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
export type InsertHaexNotifications = typeof haexNotifications.$inferInsert
|
||||||
|
export type SelectHaexNotifications = typeof haexNotifications.$inferSelect
|
||||||
2
src-tauri/database/schemas/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from './crdt'
|
||||||
|
export * from './haex'
|
||||||
@ -1,53 +1,112 @@
|
|||||||
|
import { sql } from 'drizzle-orm'
|
||||||
import {
|
import {
|
||||||
integer,
|
integer,
|
||||||
numeric,
|
primaryKey,
|
||||||
sqliteTable,
|
sqliteTable,
|
||||||
text,
|
text,
|
||||||
type AnySQLiteColumn,
|
type AnySQLiteColumn,
|
||||||
unique,
|
} from 'drizzle-orm/sqlite-core'
|
||||||
} from "drizzle-orm/sqlite-core";
|
import tableNames from '../tableNames.json'
|
||||||
|
|
||||||
export const haexSettings = sqliteTable("haex_settings", {
|
export const haexPasswordsItemDetails = sqliteTable(
|
||||||
id: text().primaryKey(),
|
tableNames.haex.passwords.item_details,
|
||||||
key: text(),
|
|
||||||
value_text: text(),
|
|
||||||
value_json: text({ mode: "json" }),
|
|
||||||
value_number: numeric(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export const haexExtensions = sqliteTable("haex_extensions", {
|
|
||||||
id: text().primaryKey(),
|
|
||||||
author: text(),
|
|
||||||
enabled: integer({ mode: "boolean" }),
|
|
||||||
icon: text(),
|
|
||||||
name: text(),
|
|
||||||
url: text(),
|
|
||||||
version: text(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export const testTable = sqliteTable("testTable", {
|
|
||||||
id: text().primaryKey(),
|
|
||||||
author: text(),
|
|
||||||
test: text(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export const haexExtensionsPermissions = sqliteTable(
|
|
||||||
"haex_extensions_permissions",
|
|
||||||
{
|
{
|
||||||
id: text().primaryKey(),
|
id: text().primaryKey(),
|
||||||
extensionId: text("extension_id").references((): AnySQLiteColumn => haexExtensions.id),
|
title: text(),
|
||||||
resource: text({ enum: ["fs", "http", "database"] }),
|
username: text(),
|
||||||
operation: text({ enum: ["read", "write", "create"] }),
|
password: text(),
|
||||||
path: text(),
|
note: text(),
|
||||||
|
icon: text(),
|
||||||
|
tags: text(),
|
||||||
|
url: text(),
|
||||||
|
createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`),
|
||||||
|
updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate(
|
||||||
|
() => new Date(),
|
||||||
|
),
|
||||||
|
haex_tombstone: integer({ mode: 'boolean' }),
|
||||||
},
|
},
|
||||||
(table) => [unique().on(table.extensionId, table.resource, table.operation, table.path)]
|
)
|
||||||
);
|
export type InsertHaexPasswordsItemDetails =
|
||||||
|
typeof haexPasswordsItemDetails.$inferInsert
|
||||||
|
export type SelectHaexPasswordsItemDetails =
|
||||||
|
typeof haexPasswordsItemDetails.$inferSelect
|
||||||
|
|
||||||
export type InsertHaexSettings = typeof haexSettings.$inferInsert;
|
export const haexPasswordsItemKeyValues = sqliteTable(
|
||||||
export type SelectHaexSettings = typeof haexSettings.$inferSelect;
|
tableNames.haex.passwords.item_key_values,
|
||||||
|
{
|
||||||
|
id: text().primaryKey(),
|
||||||
|
itemId: text('item_id').references(
|
||||||
|
(): AnySQLiteColumn => haexPasswordsItemDetails.id,
|
||||||
|
),
|
||||||
|
key: text(),
|
||||||
|
value: text(),
|
||||||
|
updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate(
|
||||||
|
() => new Date(),
|
||||||
|
),
|
||||||
|
haex_tombstone: integer({ mode: 'boolean' }),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
export type InserthaexPasswordsItemKeyValues =
|
||||||
|
typeof haexPasswordsItemKeyValues.$inferInsert
|
||||||
|
export type SelectHaexPasswordsItemKeyValues =
|
||||||
|
typeof haexPasswordsItemKeyValues.$inferSelect
|
||||||
|
|
||||||
export type InsertHaexExtensions = typeof haexExtensions.$inferInsert;
|
export const haexPasswordsItemHistory = sqliteTable(
|
||||||
export type SelectHaexExtensions = typeof haexExtensions.$inferSelect;
|
tableNames.haex.passwords.item_histories,
|
||||||
|
{
|
||||||
|
id: text().primaryKey(),
|
||||||
|
itemId: text('item_id').references(
|
||||||
|
(): AnySQLiteColumn => haexPasswordsItemDetails.id,
|
||||||
|
),
|
||||||
|
changedProperty:
|
||||||
|
text('changed_property').$type<keyof typeof haexPasswordsItemDetails>(),
|
||||||
|
oldValue: text('old_value'),
|
||||||
|
newValue: text('new_value'),
|
||||||
|
createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`),
|
||||||
|
haex_tombstone: integer({ mode: 'boolean' }),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
export type InserthaexPasswordsItemHistory =
|
||||||
|
typeof haexPasswordsItemHistory.$inferInsert
|
||||||
|
export type SelectHaexPasswordsItemHistory =
|
||||||
|
typeof haexPasswordsItemHistory.$inferSelect
|
||||||
|
|
||||||
export type InsertHaexExtensionsPermissions = typeof haexExtensionsPermissions.$inferInsert;
|
export const haexPasswordsGroups = sqliteTable(
|
||||||
export type SelectHaexExtensionsPermissions = typeof haexExtensionsPermissions.$inferSelect;
|
tableNames.haex.passwords.groups,
|
||||||
|
{
|
||||||
|
id: text().primaryKey(),
|
||||||
|
name: text(),
|
||||||
|
description: text(),
|
||||||
|
icon: text(),
|
||||||
|
order: integer(),
|
||||||
|
color: text(),
|
||||||
|
parentId: text('parent_id').references(
|
||||||
|
(): AnySQLiteColumn => haexPasswordsGroups.id,
|
||||||
|
),
|
||||||
|
createdAt: text('created_at').default(sql`(CURRENT_TIMESTAMP)`),
|
||||||
|
updateAt: integer('updated_at', { mode: 'timestamp' }).$onUpdate(
|
||||||
|
() => new Date(),
|
||||||
|
),
|
||||||
|
haex_tombstone: integer({ mode: 'boolean' }),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
export type InsertHaexPasswordsGroups = typeof haexPasswordsGroups.$inferInsert
|
||||||
|
export type SelectHaexPasswordsGroups = typeof haexPasswordsGroups.$inferSelect
|
||||||
|
|
||||||
|
export const haexPasswordsGroupItems = sqliteTable(
|
||||||
|
tableNames.haex.passwords.group_items,
|
||||||
|
{
|
||||||
|
groupId: text('group_id').references(
|
||||||
|
(): AnySQLiteColumn => haexPasswordsGroups.id,
|
||||||
|
),
|
||||||
|
itemId: text('item_id').references(
|
||||||
|
(): AnySQLiteColumn => haexPasswordsItemDetails.id,
|
||||||
|
),
|
||||||
|
haex_tombstone: integer({ mode: 'boolean' }),
|
||||||
|
},
|
||||||
|
(table) => [primaryKey({ columns: [table.itemId, table.groupId] })],
|
||||||
|
)
|
||||||
|
export type InsertHaexPasswordsGroupItems =
|
||||||
|
typeof haexPasswordsGroupItems.$inferInsert
|
||||||
|
export type SelectHaexPasswordsGroupItems =
|
||||||
|
typeof haexPasswordsGroupItems.$inferSelect
|
||||||
|
|||||||
106
src-tauri/database/tableNames.json
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{
|
||||||
|
"haex": {
|
||||||
|
"settings": {
|
||||||
|
"name": "haex_settings",
|
||||||
|
"columns": {
|
||||||
|
"id": "id",
|
||||||
|
"key": "key",
|
||||||
|
"type": "type",
|
||||||
|
"value": "value",
|
||||||
|
"haexTombstone": "haex_tombstone",
|
||||||
|
"haexTimestamp": "haex_timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extensions": {
|
||||||
|
"name": "haex_extensions",
|
||||||
|
"columns": {
|
||||||
|
"id": "id",
|
||||||
|
"author": "author",
|
||||||
|
"description": "description",
|
||||||
|
"entry": "entry",
|
||||||
|
"homepage": "homepage",
|
||||||
|
"enabled": "enabled",
|
||||||
|
"icon": "icon",
|
||||||
|
"name": "name",
|
||||||
|
"public_key": "public_key",
|
||||||
|
"signature": "signature",
|
||||||
|
"url": "url",
|
||||||
|
"version": "version",
|
||||||
|
"haexTombstone": "haex_tombstone",
|
||||||
|
"haexTimestamp": "haex_timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extension_permissions": {
|
||||||
|
"name": "haex_extension_permissions",
|
||||||
|
"columns": {
|
||||||
|
"id": "id",
|
||||||
|
"extensionId": "extension_id",
|
||||||
|
"resourceType": "resource_type",
|
||||||
|
"action": "action",
|
||||||
|
"target": "target",
|
||||||
|
"constraints": "constraints",
|
||||||
|
"status": "status",
|
||||||
|
"createdAt": "created_at",
|
||||||
|
"updateAt": "updated_at",
|
||||||
|
"haexTombstone": "haex_tombstone",
|
||||||
|
"haexTimestamp": "haex_timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notifications": {
|
||||||
|
"name": "haex_notifications",
|
||||||
|
"columns": {
|
||||||
|
"id": "id",
|
||||||
|
"alt": "alt",
|
||||||
|
"date": "date",
|
||||||
|
"icon": "icon",
|
||||||
|
"image": "image",
|
||||||
|
"read": "read",
|
||||||
|
"source": "source",
|
||||||
|
"text": "text",
|
||||||
|
"title": "title",
|
||||||
|
"type": "type",
|
||||||
|
"haexTombstone": "haex_tombstone",
|
||||||
|
"haexTimestamp": "haex_timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"passwords": {
|
||||||
|
"groups": "haex_passwords_groups",
|
||||||
|
"group_items": "haex_passwords_group_items",
|
||||||
|
"item_details": "haex_passwords_item_details",
|
||||||
|
"item_key_values": "haex_passwords_item_key_values",
|
||||||
|
"item_histories": "haex_passwords_item_history"
|
||||||
|
},
|
||||||
|
"crdt": {
|
||||||
|
"logs": {
|
||||||
|
"name": "haex_crdt_logs",
|
||||||
|
"columns": {
|
||||||
|
"id": "id",
|
||||||
|
"haexTimestamp": "haex_timestamp",
|
||||||
|
"tableName": "table_name",
|
||||||
|
"rowPks": "row_pks",
|
||||||
|
"opType": "op_type",
|
||||||
|
"columnName": "column_name",
|
||||||
|
"newValue": "new_value",
|
||||||
|
"oldValue": "old_value"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"snapshots": {
|
||||||
|
"name": "haex_crdt_snapshots",
|
||||||
|
"columns": {
|
||||||
|
"snapshotId": "snapshot_id",
|
||||||
|
"created": "created",
|
||||||
|
"epochHlc": "epoch_hlc",
|
||||||
|
"locationUrl": "location_url",
|
||||||
|
"fileSizeBytes": "file_size_bytes"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"configs": {
|
||||||
|
"name": "haex_crdt_configs",
|
||||||
|
"columns": {
|
||||||
|
"key": "key",
|
||||||
|
"value": "value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
src-tauri/gen/android/.editorconfig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = false
|
||||||
19
src-tauri/gen/android/.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
||||||
|
key.properties
|
||||||
|
|
||||||
|
/.tauri
|
||||||
|
/tauri.settings.gradle
|
||||||
6
src-tauri/gen/android/app/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/src/main/java/space/haex/hub/generated
|
||||||
|
/src/main/jniLibs/**/*.so
|
||||||
|
/src/main/assets/tauri.conf.json
|
||||||
|
/tauri.build.gradle.kts
|
||||||
|
/proguard-tauri.pro
|
||||||
|
/tauri.properties
|
||||||
70
src-tauri/gen/android/app/build.gradle.kts
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
import java.util.Properties
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
id("rust")
|
||||||
|
}
|
||||||
|
|
||||||
|
val tauriProperties = Properties().apply {
|
||||||
|
val propFile = file("tauri.properties")
|
||||||
|
if (propFile.exists()) {
|
||||||
|
propFile.inputStream().use { load(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = 36
|
||||||
|
namespace = "space.haex.hub"
|
||||||
|
defaultConfig {
|
||||||
|
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||||
|
applicationId = "space.haex.hub"
|
||||||
|
minSdk = 24
|
||||||
|
targetSdk = 36
|
||||||
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||||
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
getByName("debug") {
|
||||||
|
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||||
|
isDebuggable = true
|
||||||
|
isJniDebuggable = true
|
||||||
|
isMinifyEnabled = false
|
||||||
|
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/x86/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
*fileTree(".") { include("**/*.pro") }
|
||||||
|
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||||
|
.toList().toTypedArray()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rust {
|
||||||
|
rootDirRel = "../../../"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("androidx.webkit:webkit:1.14.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||||
|
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||||
|
implementation("com.google.android.material:material:1.12.0")
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(from = "tauri.build.gradle.kts")
|
||||||
21
src-tauri/gen/android/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
37
src-tauri/gen/android/app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<!-- AndroidTV support -->
|
||||||
|
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/Theme.haex_hub"
|
||||||
|
android:usesCleartextTraffic="${usesCleartextTraffic}">
|
||||||
|
<activity
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:label="@string/main_activity_title"
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<!-- AndroidTV support -->
|
||||||
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
BIN
src-tauri/gen/android/app/src/main/assets/database/vault.db
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package space.haex.hub
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
|
||||||
|
class MainActivity : TauriActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
enableEdgeToEdge()
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hello World!"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.haex_hub" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
10
src-tauri/gen/android/app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
|
<color name="purple_500">#FF6200EE</color>
|
||||||
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
<color name="teal_200">#FF03DAC5</color>
|
||||||
|
<color name="teal_700">#FF018786</color>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
</resources>
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">haex-hub</string>
|
||||||
|
<string name="main_activity_title">haex-hub</string>
|
||||||
|
</resources>
|
||||||
6
src-tauri/gen/android/app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.haex_hub" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<external-path name="my_images" path="." />
|
||||||
|
<cache-path name="my_cache_images" path="." />
|
||||||
|
</paths>
|
||||||
22
src-tauri/gen/android/build.gradle.kts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:8.11.0")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("clean").configure {
|
||||||
|
delete("build")
|
||||||
|
}
|
||||||
|
|
||||||
23
src-tauri/gen/android/buildSrc/build.gradle.kts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
gradlePlugin {
|
||||||
|
plugins {
|
||||||
|
create("pluginsForCoolKids") {
|
||||||
|
id = "rust"
|
||||||
|
implementationClass = "RustPlugin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(gradleApi())
|
||||||
|
implementation("com.android.tools.build:gradle:8.11.0")
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
import java.io.File
|
||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
import org.gradle.api.DefaultTask
|
||||||
|
import org.gradle.api.GradleException
|
||||||
|
import org.gradle.api.logging.LogLevel
|
||||||
|
import org.gradle.api.tasks.Input
|
||||||
|
import org.gradle.api.tasks.TaskAction
|
||||||
|
|
||||||
|
open class BuildTask : DefaultTask() {
|
||||||
|
@Input
|
||||||
|
var rootDirRel: String? = null
|
||||||
|
@Input
|
||||||
|
var target: String? = null
|
||||||
|
@Input
|
||||||
|
var release: Boolean? = null
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun assemble() {
|
||||||
|
val executable = """pnpm""";
|
||||||
|
try {
|
||||||
|
runTauriCli(executable)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
|
runTauriCli("$executable.cmd")
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun runTauriCli(executable: String) {
|
||||||
|
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||||
|
val target = target ?: throw GradleException("target cannot be null")
|
||||||
|
val release = release ?: throw GradleException("release cannot be null")
|
||||||
|
val args = listOf("tauri", "android", "android-studio-script");
|
||||||
|
|
||||||
|
project.exec {
|
||||||
|
workingDir(File(project.projectDir, rootDirRel))
|
||||||
|
executable(executable)
|
||||||
|
args(args)
|
||||||
|
if (project.logger.isEnabled(LogLevel.DEBUG)) {
|
||||||
|
args("-vv")
|
||||||
|
} else if (project.logger.isEnabled(LogLevel.INFO)) {
|
||||||
|
args("-v")
|
||||||
|
}
|
||||||
|
if (release) {
|
||||||
|
args("--release")
|
||||||
|
}
|
||||||
|
args(listOf("--target", target))
|
||||||
|
}.assertNormalExitValue()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import org.gradle.api.DefaultTask
|
||||||
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.kotlin.dsl.configure
|
||||||
|
import org.gradle.kotlin.dsl.get
|
||||||
|
|
||||||
|
const val TASK_GROUP = "rust"
|
||||||
|
|
||||||
|
open class Config {
|
||||||
|
lateinit var rootDirRel: String
|
||||||
|
}
|
||||||
|
|
||||||
|
open class RustPlugin : Plugin<Project> {
|
||||||
|
private lateinit var config: Config
|
||||||
|
|
||||||
|
override fun apply(project: Project) = with(project) {
|
||||||
|
config = extensions.create("rust", Config::class.java)
|
||||||
|
|
||||||
|
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
|
||||||
|
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
|
||||||
|
|
||||||
|
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
|
||||||
|
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
|
||||||
|
|
||||||
|
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
|
||||||
|
|
||||||
|
extensions.configure<ApplicationExtension> {
|
||||||
|
@Suppress("UnstableApiUsage")
|
||||||
|
flavorDimensions.add("abi")
|
||||||
|
productFlavors {
|
||||||
|
create("universal") {
|
||||||
|
dimension = "abi"
|
||||||
|
ndk {
|
||||||
|
abiFilters += abiList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defaultArchList.forEachIndexed { index, arch ->
|
||||||
|
create(arch) {
|
||||||
|
dimension = "abi"
|
||||||
|
ndk {
|
||||||
|
abiFilters.add(defaultAbiList[index])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
for (profile in listOf("debug", "release")) {
|
||||||
|
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
|
||||||
|
val buildTask = tasks.maybeCreate(
|
||||||
|
"rustBuildUniversal$profileCapitalized",
|
||||||
|
DefaultTask::class.java
|
||||||
|
).apply {
|
||||||
|
group = TASK_GROUP
|
||||||
|
description = "Build dynamic library in $profile mode for all targets"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
|
||||||
|
|
||||||
|
for (targetPair in targetsList.withIndex()) {
|
||||||
|
val targetName = targetPair.value
|
||||||
|
val targetArch = archList[targetPair.index]
|
||||||
|
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
|
||||||
|
val targetBuildTask = project.tasks.maybeCreate(
|
||||||
|
"rustBuild$targetArchCapitalized$profileCapitalized",
|
||||||
|
BuildTask::class.java
|
||||||
|
).apply {
|
||||||
|
group = TASK_GROUP
|
||||||
|
description = "Build dynamic library in $profile mode for $targetArch"
|
||||||
|
rootDirRel = config.rootDirRel
|
||||||
|
target = targetName
|
||||||
|
release = profile == "release"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTask.dependsOn(targetBuildTask)
|
||||||
|
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
|
||||||
|
targetBuildTask
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src-tauri/gen/android/gradle.properties
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app"s APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
|
kotlin.code.style=official
|
||||||
|
# Enables namespacing of each library's R class so that its R class includes only the
|
||||||
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
|
# thereby reducing the size of the R class for that library
|
||||||
|
android.nonTransitiveRClass=true
|
||||||
|
android.nonFinalResIds=false
|
||||||
BIN
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#Tue May 10 19:22:52 CST 2022
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
185
src-tauri/gen/android/gradlew
vendored
Executable file
@ -0,0 +1,185 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
89
src-tauri/gen/android/gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
3
src-tauri/gen/android/settings.gradle
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include ':app'
|
||||||
|
|
||||||
|
apply from: 'tauri.settings.gradle'
|
||||||