From 626e465d8ccb54ad7f5d61e543c9f1e9a99a02f1 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 12 Jun 2023 23:07:03 -0500 Subject: [PATCH] update --- .vscode/settings.json | 3 +- apps/calendar/meta.yml | 18 + apps/todos/Todos.ts | 9 - apps/todos/meta.json | 11 - docs/src/dev/meta_json.md | 13 - docs/src/dev/permissions.md | 16 + docs/src/dev/types.md | 42 + package-lock.json | 79 + package.json | 2 + src-tauri/.cargo/config.toml | 5 +- src-tauri/.gitignore | 1 + src-tauri/Cargo.lock | 2116 +++++++++++++++-- src-tauri/Cargo.toml | 13 +- .../migrations/20230612192057_initial.sql | 1 + src-tauri/prisma-cli/Cargo.toml | 10 + src-tauri/prisma-cli/src/main.rs | 3 + {prisma => src-tauri/prisma}/schema.prisma | 14 +- src-tauri/src/apps/meta.rs | 50 + src-tauri/src/{apps.rs => apps/mod.rs} | 22 +- src-tauri/src/main.rs | 44 +- src/App.tsx | 127 +- src/main.tsx | 19 +- src/styles.css | 2 + 23 files changed, 2346 insertions(+), 274 deletions(-) create mode 100644 apps/calendar/meta.yml delete mode 100644 apps/todos/Todos.ts delete mode 100644 apps/todos/meta.json delete mode 100644 docs/src/dev/meta_json.md create mode 100644 docs/src/dev/permissions.md create mode 100644 docs/src/dev/types.md create mode 100644 src-tauri/prisma-cli/Cargo.toml create mode 100644 src-tauri/prisma-cli/src/main.rs rename {prisma => src-tauri/prisma}/schema.prisma (85%) create mode 100644 src-tauri/src/apps/meta.rs rename src-tauri/src/{apps.rs => apps/mod.rs} (73%) diff --git a/.vscode/settings.json b/.vscode/settings.json index faa8f17..fb76ff4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "[prisma]": { "editor.defaultFormatter": "Prisma.prisma" - } + }, + "editor.formatOnSave": true } diff --git a/apps/calendar/meta.yml b/apps/calendar/meta.yml new file mode 100644 index 0000000..b4233d6 --- /dev/null +++ b/apps/calendar/meta.yml @@ -0,0 +1,18 @@ +name: calendar +version: 0.1.0-rc1 + +namespaces: + panorama.calendar: + event-start-timestamp: + description: The exact timestamp the event starts + type: DateTimeTz + + event-end-timestamp: + description: The exact timestamp the event ends + type: DateTimeTz + + event-location: + description: + + event-location: + description: diff --git a/apps/todos/Todos.ts b/apps/todos/Todos.ts deleted file mode 100644 index 5a33173..0000000 --- a/apps/todos/Todos.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { HookContext } from "../../src/api"; - -export default class { - constructor() {} - - static registerHooks(ct: HookContext) { - ct.addSensitivePattern(/ /); - } -} diff --git a/apps/todos/meta.json b/apps/todos/meta.json deleted file mode 100644 index cdb57a0..0000000 --- a/apps/todos/meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../generated/spec/meta.schema.json", - "title": "Todos", - "license": "MIT", - - "depends": {}, - - "interfaces": { - "Todos": "./Todos.js" - } -} diff --git a/docs/src/dev/meta_json.md b/docs/src/dev/meta_json.md deleted file mode 100644 index ff8e57c..0000000 --- a/docs/src/dev/meta_json.md +++ /dev/null @@ -1,13 +0,0 @@ -# `meta.json` - -`meta.json` is the entrypoint for installing an application. You can also use -[JSON5], since it supports comments and trailing commas and a lot of nice -features. - -[json5]: https://json5.org - -## API Reference - -This is a rendered schema for how to write `meta.json` files. - -[Documentation](./generated/spec) diff --git a/docs/src/dev/permissions.md b/docs/src/dev/permissions.md new file mode 100644 index 0000000..11d05ce --- /dev/null +++ b/docs/src/dev/permissions.md @@ -0,0 +1,16 @@ +# Permission Model + +Permissions are: + +- compose + - This is a read/write/create permission for nodes created by the current app. + - NOTE: Unlike most operating systems, this permission does _not_ grant the + ability to create new nodes or write to nodes not created by the current app. + See `overwrite` below for that. +- overread + - This grants the ability to query for nodes outside of ones created by the + current app. +- overwrite + - This grants the ability to write into nodes outside of ones created by the + current app. + - (is it even worth it to eventually move this to being script-dependent?) diff --git a/docs/src/dev/types.md b/docs/src/dev/types.md new file mode 100644 index 0000000..0b7df58 --- /dev/null +++ b/docs/src/dev/types.md @@ -0,0 +1,42 @@ +# Data types + +close to javascript types? i guess + +## Primitives + +- number + - Arbitrary precision number + - End with \_u8, \_u32, \_u64 or \_f- or \_i-equivalents to _suggest_ a + particular container size +- boolean + - literally true or false +- string + +## Special primitives + +- DateTimeTz + - Timezone-aware date (internally stored as ISO8601) + - There is no non-timezone-aware date. Please use a string type for that + +## Type constructors + +- Option +- Either +- Heterogeneous list +- Heterogeneous map +- Array +- Record +- Enum + +## Complex type constructors + +- JSON schema + +# Interfaces + +Interfaces approximately match traits in rust, comprised of + +- Associated types +- Functions + +TODO: Generics? diff --git a/package-lock.json b/package-lock.json index 7fe3999..b575219 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@chakra-ui/react": "^2.7.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", + "@prisma/client": "^4.8.0", "@tauri-apps/api": "^1.3.0", "classnames": "^2.3.2", "framer-motion": "^10.12.16", @@ -27,6 +28,7 @@ "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^3.0.0", + "prisma": "^4.8.0", "sass": "^1.63.3", "typescript": "^4.9.5", "vite": "^4.2.1" @@ -1863,6 +1865,38 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@prisma/client": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.8.0.tgz", + "integrity": "sha512-Y1riB0p2W52kh3zgssP/YAhln3RjBFcJy3uwEiyjmU+TQYh6QTZDRFBo3JtBWuq2FyMOl1Rye8jxzUP+n0l5Cg==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/engines": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.8.0.tgz", + "integrity": "sha512-A1Asn2rxZMlLAj1HTyfaCv0VQrLUv034jVay05QlqZg1qiHPeA3/pGTfNMijbsMYCsGVxfWEJuaZZuNxXGMCrA==", + "devOptional": true, + "hasInstallScript": true + }, + "node_modules/@prisma/engines-version": { + "version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe.tgz", + "integrity": "sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==" + }, "node_modules/@react-dnd/asap": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", @@ -3230,6 +3264,23 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prisma": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.8.0.tgz", + "integrity": "sha512-DWIhxvxt8f4h6MDd35mz7BJff+fu7HItW3WPDIEpCR3RzcOWyiHBbLQW5/DOgmf+pRLTjwXQob7kuTZVYUAw5w==", + "devOptional": true, + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "4.8.0" + }, + "bin": { + "prisma": "build/index.js", + "prisma2": "build/index.js" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -5256,6 +5307,25 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" }, + "@prisma/client": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.8.0.tgz", + "integrity": "sha512-Y1riB0p2W52kh3zgssP/YAhln3RjBFcJy3uwEiyjmU+TQYh6QTZDRFBo3JtBWuq2FyMOl1Rye8jxzUP+n0l5Cg==", + "requires": { + "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" + } + }, + "@prisma/engines": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.8.0.tgz", + "integrity": "sha512-A1Asn2rxZMlLAj1HTyfaCv0VQrLUv034jVay05QlqZg1qiHPeA3/pGTfNMijbsMYCsGVxfWEJuaZZuNxXGMCrA==", + "devOptional": true + }, + "@prisma/engines-version": { + "version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe.tgz", + "integrity": "sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==" + }, "@react-dnd/asap": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", @@ -6213,6 +6283,15 @@ "source-map-js": "^1.0.2" } }, + "prisma": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.8.0.tgz", + "integrity": "sha512-DWIhxvxt8f4h6MDd35mz7BJff+fu7HItW3WPDIEpCR3RzcOWyiHBbLQW5/DOgmf+pRLTjwXQob7kuTZVYUAw5w==", + "devOptional": true, + "requires": { + "@prisma/engines": "4.8.0" + } + }, "prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index 58792d8..806c8ba 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@chakra-ui/react": "^2.7.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", + "@prisma/client": "^4.8.0", "@tauri-apps/api": "^1.3.0", "classnames": "^2.3.2", "framer-motion": "^10.12.16", @@ -29,6 +30,7 @@ "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^3.0.0", + "prisma": "^4.8.0", "sass": "^1.63.3", "typescript": "^4.9.5", "vite": "^4.2.1" diff --git a/src-tauri/.cargo/config.toml b/src-tauri/.cargo/config.toml index b23105b..c72a5d5 100644 --- a/src-tauri/.cargo/config.toml +++ b/src-tauri/.cargo/config.toml @@ -1,2 +1,5 @@ [registries.crates-io] -protocol = "sparse" \ No newline at end of file +protocol = "sparse" + +[alias] +prisma = "run -p prisma-cli --" \ No newline at end of file diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore index f4dfb82..7cbf02c 100644 --- a/src-tauri/.gitignore +++ b/src-tauri/.gitignore @@ -2,3 +2,4 @@ # will have compiled files and executables /target/ +src/prisma.rs \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index f8f73d4..cbb6428 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -19,17 +28,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", -] - [[package]] name = "aho-corasick" version = "0.7.20" @@ -63,12 +61,6 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f263788a35611fba42eb41ff811c5d0360c58b97402570312a350736e2542e" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -90,6 +82,23 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "async-trait" +version = "0.1.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "atk" version = "0.15.1" @@ -116,19 +125,76 @@ dependencies = [ [[package]] name = "atoi" -version = "1.0.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" +checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" dependencies = [ "num-traits", ] +[[package]] +name = "atomic-shim" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cd4b51d303cf3501c301e8125df442128d3c6d7c69f71b27833d253de47e77" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide 0.6.2", + "object", + "rustc-demangle", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base36" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c26bddc1271f7112e5ec797e8eeba6de2de211c1488e506b9500196dbf77c5" +dependencies = [ + "base-x", + "failure", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "base64" version = "0.13.1" @@ -141,6 +207,43 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +[[package]] +name = "bigdecimal" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "bigint" +version = "4.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def" +dependencies = [ + "byteorder", + "crunchy", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -153,6 +256,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -193,6 +305,21 @@ dependencies = [ "serde", ] +[[package]] +name = "builtin-psl-connectors" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "connection-string", + "either", + "enumflags2", + "indoc", + "lsp-types", + "once_cell", + "psl-core", + "regex", +] + [[package]] name = "bumpalo" version = "3.13.0" @@ -307,8 +434,11 @@ checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", "serde", + "time 0.1.43", + "wasm-bindgen", "winapi", ] @@ -349,6 +479,30 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + [[package]] name = "combine" version = "4.6.6" @@ -359,12 +513,37 @@ dependencies = [ "memchr", ] +[[package]] +name = "connection-string" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4ecb0dc8c35d2c626e45ae70bbfcb1050b302f42bcdf025d913cc0c5a0b443" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -417,18 +596,18 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" [[package]] name = "crc32fast" @@ -449,6 +628,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + [[package]] name = "crossbeam-queue" version = "0.3.8" @@ -468,6 +660,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" + [[package]] name = "crypto-common" version = "0.1.6" @@ -521,6 +719,33 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +[[package]] +name = "cuid" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5d03ac594f5f9cc680b142fff46f3ad9f197e19272042ebf1a40b383fee6fb" +dependencies = [ + "base36", + "bigint", + "cuid2", + "hostname", + "num", + "once_cell", + "rand 0.8.5", +] + +[[package]] +name = "cuid2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1debbff0c0f0b54e681296c6f064a78f8ecec8e89e7fcc472443d9f85b98ca9a" +dependencies = [ + "num", + "proptest", + "rand 0.8.5", + "sha3", +] + [[package]] name = "darling" version = "0.20.1" @@ -556,36 +781,75 @@ dependencies = [ "syn 2.0.18", ] +[[package]] +name = "datamodel-renderer" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "base64 0.13.1", + "once_cell", + "psl", + "regex", +] + [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", "syn 1.0.109", ] +[[package]] +name = "diagnostics" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "colored", + "indoc", + "pest", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "crypto-common", ] +[[package]] +name = "directories" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +dependencies = [ + "dirs-sys 0.3.7", +] + [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys", + "dirs-sys 0.4.1", ] [[package]] @@ -598,6 +862,17 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dirs-sys" version = "0.4.1" @@ -628,10 +903,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] -name = "dotenvy" -version = "0.15.7" +name = "dml" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "chrono", + "cuid", + "either", + "enumflags2", + "indoc", + "prisma-value", + "psl-core", + "schema-ast", + "serde", + "serde_json", + "uuid", +] + +[[package]] +name = "dmmf" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "bigdecimal", + "indexmap", + "prisma-models", + "psl", + "schema", + "schema-builder", + "serde", + "serde_json", +] + +[[package]] +name = "dotenv" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "dtoa" @@ -670,7 +978,7 @@ dependencies = [ "rustc_version", "toml 0.7.3", "vswhom", - "winreg", + "winreg 0.11.0", ] [[package]] @@ -688,6 +996,32 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "enumflags2" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "errno" version = "0.3.1" @@ -710,10 +1044,38 @@ dependencies = [ ] [[package]] -name = "event-listener" -version = "2.5.3" +name = "failure" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" @@ -755,6 +1117,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "fixedbitset" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" + [[package]] name = "flate2" version = "1.0.26" @@ -762,19 +1130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project", - "spin 0.9.8", + "miniz_oxide 0.7.1", ] [[package]] @@ -817,6 +1173,21 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.28" @@ -884,16 +1255,25 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + [[package]] name = "futures-util" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ + "futures-channel", "futures-core", + "futures-io", "futures-macro", "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", "slab", @@ -1039,6 +1419,12 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" + [[package]] name = "gio" version = "0.15.12" @@ -1144,6 +1530,16 @@ dependencies = [ "system-deps 6.1.0", ] +[[package]] +name = "graphql-parser" +version = "0.3.0" +source = "git+https://github.com/prisma/graphql-parser#6a3f58bd879065588e710cb02b5bd30c1ce182c3" +dependencies = [ + "combine 3.8.1", + "indexmap", + "thiserror", +] + [[package]] name = "gtk" version = "0.15.5" @@ -1199,29 +1595,50 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "h2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ - "ahash 0.8.3", - "allocator-api2", + "ahash", ] [[package]] name = "hashlink" -version = "0.8.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.11.2", ] [[package]] @@ -1238,8 +1655,14 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "unicode-segmentation", + "libc", ] [[package]] @@ -1263,6 +1686,17 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + [[package]] name = "html5ever" version = "0.25.2" @@ -1288,12 +1722,72 @@ dependencies = [ "itoa 1.0.6", ] +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + [[package]] name = "http-range" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 1.0.6", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.57" @@ -1385,6 +1879,12 @@ dependencies = [ "serde", ] +[[package]] +name = "indoc" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" + [[package]] name = "infer" version = "0.12.0" @@ -1403,6 +1903,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "introspection-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "anyhow", + "async-trait", + "enumflags2", + "psl", + "serde", + "serde_json", + "thiserror", + "user-facing-errors", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -1414,6 +1929,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipnet" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" + [[package]] name = "itertools" version = "0.10.5" @@ -1465,7 +1986,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" dependencies = [ "cesu8", - "combine", + "combine 4.6.6", "jni-sys", "log", "thiserror", @@ -1480,9 +2001,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" dependencies = [ "wasm-bindgen", ] @@ -1499,6 +2020,41 @@ dependencies = [ "treediff", ] +[[package]] +name = "json-rpc-api-build" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "backtrace", + "heck 0.3.3", + "serde", + "toml 0.5.11", +] + +[[package]] +name = "jsonrpc-core" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + [[package]] name = "kuchiki" version = "0.8.1" @@ -1524,10 +2080,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] -name = "libsqlite3-sys" -version = "0.24.2" +name = "libm" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "libsqlite3-sys" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" dependencies = [ "cc", "pkg-config", @@ -1580,12 +2142,43 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lsp-types" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2368312c59425dd133cb9a327afee65be0a633a8ce471d248e2202a48f8f68ae" +dependencies = [ + "bitflags", + "serde", + "serde_json", + "serde_repr", + "url", +] + [[package]] name = "mac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -1609,6 +2202,12 @@ dependencies = [ "tendril", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.1.0" @@ -1639,12 +2238,152 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metrics" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e52eb6380b6d2a10eb3434aec0885374490f5b82c8aaf5cd487a183c98be834" +dependencies = [ + "ahash", + "metrics-macros", +] + +[[package]] +name = "metrics" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142c53885123b68d94108295a09d4afe1a1388ed95b54d5dacd9a454753030f2" +dependencies = [ + "ahash", + "metrics-macros", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953cbbb6f9ba4b9304f4df79b98cdc9d14071ed93065a9fca11c00c5d9181b66" +dependencies = [ + "hyper", + "indexmap", + "ipnet", + "metrics 0.19.0", + "metrics-util 0.13.0", + "parking_lot 0.11.2", + "quanta", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e30813093f757be5cf21e50389a24dc7dbb22c49f23b7e8f51d69b508a5ffa" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "metrics-util" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65a9e83b833e1d2e07010a386b197c13aa199bbd0fca5cf69bfa147972db890a" +dependencies = [ + "aho-corasick 0.7.20", + "atomic-shim", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.11.2", + "indexmap", + "metrics 0.18.1", + "num_cpus", + "ordered-float", + "parking_lot 0.11.2", + "quanta", + "radix_trie", + "sketches-ddsketch", +] + +[[package]] +name = "metrics-util" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1f4b69bef1e2b392b2d4a12902f2af90bb438ba4a66aa222d1023fa6561b50" +dependencies = [ + "atomic-shim", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.11.2", + "metrics 0.19.0", + "num_cpus", + "parking_lot 0.11.2", + "quanta", + "sketches-ddsketch", +] + +[[package]] +name = "migration-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "chrono", + "enumflags2", + "introspection-connector", + "psl", + "sha2 0.9.9", + "tracing", + "tracing-error", + "user-facing-errors", +] + +[[package]] +name = "migration-core" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "async-trait", + "chrono", + "enumflags2", + "json-rpc-api-build", + "jsonrpc-core", + "migration-connector", + "psl", + "serde", + "serde_json", + "sql-migration-connector", + "tokio", + "tracing", + "tracing-futures", + "tracing-subscriber", + "url", + "user-facing-errors", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1666,6 +2405,42 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mobc" +version = "0.7.3" +source = "git+https://github.com/prisma/mobc?tag=1.0.6#80462c4870a2bf6aab49da15c88c021bae531da8" +dependencies = [ + "async-trait", + "futures-channel", + "futures-core", + "futures-timer", + "futures-util", + "log", + "metrics 0.18.1", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.6.0" @@ -1700,6 +2475,15 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -1726,6 +2510,40 @@ dependencies = [ "winapi", ] +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +dependencies = [ + "num-traits", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1736,6 +2554,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-rational" version = "0.4.1" @@ -1743,6 +2572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", "num-integer", "num-traits", ] @@ -1754,6 +2584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -1824,12 +2655,27 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + [[package]] name = "open" version = "3.2.0" @@ -1840,12 +2686,91 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "openssl" +version = "0.10.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", + "tokio", +] + [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-float" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordermap" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" + [[package]] name = "overload" version = "0.1.1" @@ -1883,6 +2808,7 @@ version = "0.0.0" dependencies = [ "anyhow", "dirs", + "prisma-client-rust", "serde", "serde_json", "sqlx", @@ -1939,6 +2865,18 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "parser-database" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "diagnostics", + "either", + "enumflags2", + "indexmap", + "schema-ast", +] + [[package]] name = "paste" version = "1.0.12" @@ -1957,6 +2895,60 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +[[package]] +name = "pest" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "pest_meta" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.6", +] + +[[package]] +name = "petgraph" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" +dependencies = [ + "fixedbitset", + "ordermap", +] + [[package]] name = "phf" version = "0.8.0" @@ -2104,7 +3096,7 @@ dependencies = [ "line-wrap", "quick-xml", "serde", - "time", + "time 0.3.15", ] [[package]] @@ -2117,7 +3109,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] @@ -2132,6 +3124,126 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prisma-cli" +version = "0.1.0" +dependencies = [ + "prisma-client-rust-cli", +] + +[[package]] +name = "prisma-client-rust" +version = "0.6.8" +source = "git+https://github.com/Brendonovich/prisma-client-rust?tag=0.6.8#51f0473b642b16bb78fe0f5f3235aeb56f89300d" +dependencies = [ + "base64 0.13.1", + "bigdecimal", + "chrono", + "diagnostics", + "dml", + "dmmf", + "dotenv", + "futures", + "indexmap", + "migration-core", + "paste", + "prisma-client-rust-macros", + "prisma-models", + "psl", + "query-connector", + "query-core", + "schema", + "serde", + "serde-value", + "serde_json", + "thiserror", + "user-facing-errors", + "uuid", +] + +[[package]] +name = "prisma-client-rust-cli" +version = "0.6.8" +source = "git+https://github.com/Brendonovich/prisma-client-rust?tag=0.6.8#51f0473b642b16bb78fe0f5f3235aeb56f89300d" +dependencies = [ + "directories", + "flate2", + "http", + "prisma-client-rust-sdk", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "serde_path_to_error", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "prisma-client-rust-macros" +version = "0.6.8" +source = "git+https://github.com/Brendonovich/prisma-client-rust?tag=0.6.8#51f0473b642b16bb78fe0f5f3235aeb56f89300d" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prisma-client-rust-sdk" +version = "0.6.8" +source = "git+https://github.com/Brendonovich/prisma-client-rust?tag=0.6.8#51f0473b642b16bb78fe0f5f3235aeb56f89300d" +dependencies = [ + "convert_case 0.5.0", + "dml", + "dmmf", + "prisma-models", + "proc-macro2", + "psl", + "query-core", + "quote", + "request-handlers", + "serde", + "serde_json", + "serde_path_to_error", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "prisma-models" +version = "0.0.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "bigdecimal", + "chrono", + "itertools", + "once_cell", + "prisma-value", + "psl", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "prisma-value" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "base64 0.12.3", + "bigdecimal", + "chrono", + "once_cell", + "regex", + "serde", + "serde_json", + "uuid", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -2181,6 +3293,189 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proptest" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.6.29", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "psl" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "builtin-psl-connectors", + "dml", + "psl-core", +] + +[[package]] +name = "psl-core" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "bigdecimal", + "chrono", + "diagnostics", + "enumflags2", + "indoc", + "itertools", + "lsp-types", + "once_cell", + "parser-database", + "prisma-value", + "regex", + "schema-ast", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "quaint" +version = "0.2.0-alpha.13" +source = "git+https://github.com/Brendonovich/quaint?tag=0.6.5#2bf0c3620f76d83982c17e567b71da6fc9d65d14" +dependencies = [ + "async-trait", + "base64 0.12.3", + "bigdecimal", + "chrono", + "connection-string", + "futures", + "hex", + "libsqlite3-sys", + "metrics 0.18.1", + "mobc", + "num_cpus", + "percent-encoding", + "rusqlite", + "serde_json", + "sqlformat 0.2.1", + "thiserror", + "tokio", + "tracing", + "tracing-core", + "url", + "uuid", +] + +[[package]] +name = "quanta" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20afe714292d5e879d8b12740aa223c6a88f118af41870e8b6196e39a02238a8" +dependencies = [ + "crossbeam-utils", + "libc", + "mach", + "once_cell", + "raw-cpuid", + "wasi 0.10.2+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + +[[package]] +name = "query-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "anyhow", + "async-trait", + "chrono", + "futures", + "indexmap", + "itertools", + "prisma-models", + "prisma-value", + "serde", + "serde_json", + "thiserror", + "user-facing-errors", + "uuid", +] + +[[package]] +name = "query-core" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "async-trait", + "base64 0.12.3", + "bigdecimal", + "chrono", + "connection-string", + "crossbeam-queue", + "cuid", + "enumflags2", + "futures", + "indexmap", + "itertools", + "lazy_static", + "lru", + "once_cell", + "opentelemetry", + "parking_lot 0.12.1", + "petgraph", + "pin-utils", + "prisma-models", + "prisma-value", + "psl", + "query-connector", + "query-engine-metrics", + "schema", + "schema-builder", + "serde", + "serde_json", + "sql-query-connector", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "tracing-opentelemetry", + "tracing-subscriber", + "url", + "user-facing-errors", + "uuid", +] + +[[package]] +name = "query-engine-metrics" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "metrics 0.18.1", + "metrics-exporter-prometheus", + "metrics-util 0.12.1", + "once_cell", + "parking_lot 0.12.1", + "serde", + "serde_json", + "tracing", + "tracing-futures", + "tracing-subscriber", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quick-xml" version = "0.28.2" @@ -2199,6 +3494,16 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + [[package]] name = "rand" version = "0.7.3" @@ -2280,6 +3585,24 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags", +] + [[package]] name = "raw-window-handle" version = "0.5.0" @@ -2350,6 +3673,65 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +[[package]] +name = "request-handlers" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "bigdecimal", + "connection-string", + "dmmf", + "futures", + "graphql-parser", + "indexmap", + "itertools", + "psl", + "query-core", + "serde", + "serde_json", + "thiserror", + "tracing", + "url", + "user-facing-errors", +] + +[[package]] +name = "reqwest" +version = "0.11.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +dependencies = [ + "base64 0.21.2", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.10.1", +] + [[package]] name = "ring" version = "0.16.20" @@ -2359,12 +3741,34 @@ dependencies = [ "cc", "libc", "once_cell", - "spin 0.5.2", + "spin", "untrusted", "web-sys", "winapi", ] +[[package]] +name = "rusqlite" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152" +dependencies = [ + "bitflags", + "chrono", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "memchr", + "smallvec", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -2390,31 +3794,35 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ + "base64 0.13.1", "log", "ring", "sct", "webpki", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" -dependencies = [ - "base64 0.21.2", -] - [[package]] name = "rustversion" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "ryu" version = "1.0.13" @@ -2436,6 +3844,48 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys 0.42.0", +] + +[[package]] +name = "schema" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "once_cell", + "prisma-models", + "psl", +] + +[[package]] +name = "schema-ast" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "diagnostics", + "pest", + "pest_derive", +] + +[[package]] +name = "schema-builder" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "itertools", + "lazy_static", + "once_cell", + "prisma-models", + "psl", + "schema", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -2450,14 +3900,37 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" -version = "0.7.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ "ring", "untrusted", ] +[[package]] +name = "security-framework" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "selectors" version = "0.22.0" @@ -2496,6 +3969,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + [[package]] name = "serde_derive" version = "1.0.164" @@ -2513,11 +3996,21 @@ version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ + "indexmap", "itoa 1.0.6", "ryu", "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +dependencies = [ + "serde", +] + [[package]] name = "serde_repr" version = "0.1.12" @@ -2538,6 +4031,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.6", + "ryu", + "serde", +] + [[package]] name = "serde_with" version = "2.3.3" @@ -2551,7 +4056,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time", + "time 0.3.15", ] [[package]] @@ -2598,6 +4103,19 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.6" @@ -2606,7 +4124,17 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", ] [[package]] @@ -2639,6 +4167,12 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +[[package]] +name = "sketches-ddsketch" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d2ecae5fcf33b122e2e6bd520a57ccf152d2dde3b38c71039df1a6867264ee" + [[package]] name = "slab" version = "0.4.8" @@ -2699,12 +4233,121 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +name = "sql-ddl" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" + +[[package]] +name = "sql-introspection-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" dependencies = [ - "lock_api", + "anyhow", + "async-trait", + "bigdecimal", + "datamodel-renderer", + "enumflags2", + "introspection-connector", + "once_cell", + "psl", + "quaint", + "regex", + "serde", + "serde_json", + "sql-schema-describer", + "thiserror", + "tracing", + "tracing-futures", + "user-facing-errors", +] + +[[package]] +name = "sql-migration-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "chrono", + "connection-string", + "either", + "enumflags2", + "indoc", + "migration-connector", + "once_cell", + "psl", + "quaint", + "regex", + "serde_json", + "sql-ddl", + "sql-introspection-connector", + "sql-schema-describer", + "tokio", + "tracing", + "tracing-futures", + "url", + "user-facing-errors", + "uuid", +] + +[[package]] +name = "sql-query-connector" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "anyhow", + "async-trait", + "bigdecimal", + "chrono", + "cuid", + "futures", + "itertools", + "once_cell", + "opentelemetry", + "prisma-models", + "prisma-value", + "psl", + "quaint", + "query-connector", + "rand 0.7.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "tracing-opentelemetry", + "user-facing-errors", + "uuid", +] + +[[package]] +name = "sql-schema-describer" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "async-trait", + "bigdecimal", + "enumflags2", + "indexmap", + "indoc", + "once_cell", + "psl", + "quaint", + "regex", + "serde", + "tracing", + "tracing-error", + "tracing-futures", +] + +[[package]] +name = "sqlformat" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +dependencies = [ + "itertools", + "nom", + "unicode_categories", ] [[package]] @@ -2720,9 +4363,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.3" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" +checksum = "7911b0031a0247af40095838002999c7a52fba29d9739e93326e71a5a1bc9d43" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2730,63 +4373,62 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.6.3" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" +checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1" dependencies = [ - "ahash 0.7.6", + "ahash", "atoi", "bitflags", "byteorder", "bytes", "crc", + "crossbeam-channel", "crossbeam-queue", - "dotenvy", + "crossbeam-utils", "either", - "event-listener", - "flume", "futures-channel", "futures-core", - "futures-executor", "futures-intrusive", "futures-util", "hashlink", "hex", "indexmap", - "itoa 1.0.6", + "itoa 0.4.8", "libc", "libsqlite3-sys", "log", "memchr", "once_cell", - "paste", + "parking_lot 0.11.2", "percent-encoding", "rustls", - "rustls-pemfile", - "sha2", + "sha2 0.9.9", "smallvec", - "sqlformat", + "sqlformat 0.1.8", "sqlx-rt", "stringprep", "thiserror", "tokio-stream", "url", + "webpki", "webpki-roots", + "whoami", ] [[package]] name = "sqlx-macros" -version = "0.6.3" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" +checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" dependencies = [ - "dotenvy", + "dotenv", "either", - "heck 0.4.1", + "heck 0.3.3", "once_cell", "proc-macro2", "quote", - "sha2", + "sha2 0.9.9", "sqlx-core", "sqlx-rt", "syn 1.0.109", @@ -2795,9 +4437,9 @@ dependencies = [ [[package]] name = "sqlx-rt" -version = "0.6.3" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" +checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" dependencies = [ "once_cell", "tokio", @@ -2883,6 +4525,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "system-deps" version = "5.0.0" @@ -3067,10 +4721,10 @@ dependencies = [ "semver", "serde", "serde_json", - "sha2", + "sha2 0.10.6", "tauri-utils", "thiserror", - "time", + "time 0.3.15", "uuid", "walkdir", ] @@ -3229,6 +4883,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "time" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "time" version = "0.3.15" @@ -3287,10 +4951,20 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.23.4" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ "rustls", "tokio", @@ -3308,6 +4982,20 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.11" @@ -3351,6 +5039,12 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" version = "0.1.37" @@ -3384,6 +5078,26 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.1.3" @@ -3395,6 +5109,20 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-log", + "tracing-subscriber", +] + [[package]] name = "tracing-subscriber" version = "0.3.17" @@ -3422,12 +5150,30 @@ dependencies = [ "serde_json", ] +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +[[package]] +name = "ucd-trie" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -3455,12 +5201,27 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unicode_categories" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + [[package]] name = "untrusted" version = "0.7.1" @@ -3479,6 +5240,30 @@ dependencies = [ "serde", ] +[[package]] +name = "user-facing-error-macros" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "user-facing-errors" +version = "0.1.0" +source = "git+https://github.com/Brendonovich/prisma-engines?tag=pcr-0.6.5#7cc20cc54a7ab0b5e38c81901826939a91a17ba0" +dependencies = [ + "backtrace", + "indoc", + "quaint", + "serde", + "serde_json", + "tracing", + "user-facing-error-macros", +] + [[package]] name = "utf-8" version = "0.7.6" @@ -3492,6 +5277,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ "getrandom 0.2.10", + "serde", ] [[package]] @@ -3524,6 +5310,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "vswhom" version = "0.1.0" @@ -3544,6 +5336,15 @@ dependencies = [ "libc", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.3.3" @@ -3554,12 +5355,28 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3568,9 +5385,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3578,24 +5395,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" dependencies = [ "bumpalo", + "lazy_static", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.86" +name = "wasm-bindgen-futures" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3603,28 +5432,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3679,9 +5508,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", @@ -3689,9 +5518,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ "webpki", ] @@ -3734,6 +5563,16 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "whoami" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3982,6 +5821,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + [[package]] name = "winreg" version = "0.11.0" @@ -4018,7 +5866,7 @@ dependencies = [ "once_cell", "serde", "serde_json", - "sha2", + "sha2 0.10.6", "soup2", "tao", "thiserror", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index fd7f8f0..2c0f4f2 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -7,7 +7,9 @@ license = "" repository = "" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[workspace] +members = ["prisma-cli"] +resolver = "2" [build-dependencies] tauri-build = { version = "1.3", features = [] } @@ -16,11 +18,18 @@ tauri-build = { version = "1.3", features = [] } tauri = { version = "1.3", features = ["shell-open"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -sqlx = { version = "0.6.3", features = ["runtime-tokio-rustls", "sqlite"] } +# TODO: L @ prisma-client-rust not updating to 0.25.x of the sqlite lib +sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "sqlite"] } tokio = { version = "1.28.2", features = ["full"] } anyhow = "1.0.71" dirs = "5.0.1" +[dependencies.prisma-client-rust] +git = "https://github.com/Brendonovich/prisma-client-rust" +tag = "0.6.8" +default-features = false +features = ["sqlite"] + [features] # this feature is used for production builds or when `devPath` points to the filesystem # DO NOT REMOVE!! diff --git a/src-tauri/migrations/20230612192057_initial.sql b/src-tauri/migrations/20230612192057_initial.sql index e59b1a4..11a5704 100644 --- a/src-tauri/migrations/20230612192057_initial.sql +++ b/src-tauri/migrations/20230612192057_initial.sql @@ -19,6 +19,7 @@ CREATE TABLE "Graph" ( "label" TEXT, "fromId" TEXT NOT NULL, "toId" TEXT NOT NULL, + "directional" BOOLEAN NOT NULL, PRIMARY KEY ("fromId", "toId"), CONSTRAINT "Graph_fromId_fkey" FOREIGN KEY ("fromId") REFERENCES "Node" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, diff --git a/src-tauri/prisma-cli/Cargo.toml b/src-tauri/prisma-cli/Cargo.toml new file mode 100644 index 0000000..639455d --- /dev/null +++ b/src-tauri/prisma-cli/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "prisma-cli" +version = "0.1.0" +edition = "2021" + +[dependencies.prisma-client-rust-cli] +git = "https://github.com/Brendonovich/prisma-client-rust" +tag = "0.6.8" +default-features = false +features = ["sqlite"] \ No newline at end of file diff --git a/src-tauri/prisma-cli/src/main.rs b/src-tauri/prisma-cli/src/main.rs new file mode 100644 index 0000000..b873b53 --- /dev/null +++ b/src-tauri/prisma-cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + prisma_client_rust_cli::run(); +} diff --git a/prisma/schema.prisma b/src-tauri/prisma/schema.prisma similarity index 85% rename from prisma/schema.prisma rename to src-tauri/prisma/schema.prisma index 3f15d55..c3460eb 100644 --- a/prisma/schema.prisma +++ b/src-tauri/prisma/schema.prisma @@ -1,6 +1,6 @@ generator client { - provider = "prisma-client-js" - binaryTargets = ["native"] + provider = "cargo prisma" + output = "../src/prisma.rs" } datasource db { @@ -40,6 +40,8 @@ model Edge { toId String toNode Node @relation(name: "toNode", fields: [toId], references: [id]) + directional Boolean + @@unique([fromId, toId]) @@index([appId, appKey]) } @@ -97,3 +99,11 @@ model Patterns { functionName String } + +/// Index table, for keeping track of indexes to build and take down when the database first starts +model Indices { + id String @id @default(uuid()) + command String + + // TODO: Does sqlite avoid making duplicate indexes automatically? +} diff --git a/src-tauri/src/apps/meta.rs b/src-tauri/src/apps/meta.rs new file mode 100644 index 0000000..ba0213d --- /dev/null +++ b/src-tauri/src/apps/meta.rs @@ -0,0 +1,50 @@ +use std::collections::{HashMap, HashSet}; + +/// Metadata describing the app +#[derive(Debug, Serialize, Deserialize)] +pub struct AppMetadata { + /// The name of the app + pub name: String, + + /// Version ([semantic versioning]) + /// + /// [semantic versioning]: https://semver.org/ + #[serde(default = "default_version")] + pub version: String, + + /// Namespaces requested + /// + /// A namespace is an app-specific [FQN] and cannot be used by other apps + /// unless permission is explicitly granted by the user. + /// + /// [FQN]: https://en.wikipedia.org/wiki/Fully_qualified_name + /// + /// Namespaces are used in metadata keys. For example, a calendar app may + /// request the namespace `org.somebody.calendar`. Then, it may use the keys: + /// + /// - `org.somebody.calendar / event-timestamp` + /// - `org.somebody.calendar / event-location` + /// + /// Notably, the `/` is purely syntactic here; the system keeps the two parts + /// completely isolated, so there is no possible namespace "leakage" based on + /// carefully crafted keys. + pub namespaces: HashMap, +} + +/// Name-to-description mapping of keys +#[derive(Debug, Serialize, Deserialize)] +#[serde(transparent)] +pub struct NamespaceConfig(HashMap); + +/// Name-to-description mapping of keys +#[derive(Debug, Serialize, Deserialize)] +pub struct KeyDescriptionConfig { + pub description: String, + + #[serde(rename = "type")] + pub ty: String, +} + +fn default_version() -> String { + "0.0.0".to_owned() +} diff --git a/src-tauri/src/apps.rs b/src-tauri/src/apps/mod.rs similarity index 73% rename from src-tauri/src/apps.rs rename to src-tauri/src/apps/mod.rs index 5d0d3ec..a695b39 100644 --- a/src-tauri/src/apps.rs +++ b/src-tauri/src/apps/mod.rs @@ -1,8 +1,12 @@ +pub mod meta; + use std::{collections::HashMap, env, path::PathBuf}; use anyhow::Result; use sqlx::SqlitePool; +use crate::prisma::PrismaClient; + pub struct Handler {} pub enum Event { @@ -12,21 +16,20 @@ pub enum Event { } pub struct AppManager { - pool: SqlitePool, + prisma: PrismaClient, apps: Vec, - key_handlers: HashMap<(String, Event), Handler>, } impl AppManager { - pub fn new(pool: &SqlitePool) -> Self { - let pool = pool.clone(); + pub async fn new() -> Result { + let prisma = PrismaClient::_builder().build().await?; let apps = vec![]; - Self { - pool, + Ok(Self { + prisma, apps, key_handlers: HashMap::default(), - } + }) } /// Register apps into the pool @@ -46,6 +49,11 @@ impl AppManager { Ok(()) } + + /// Figure out which indices are required by the set of known apps + pub async fn compute_indices(&self) -> Result<()> { + Ok(()) + } } pub struct App { diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ef2d824..659d092 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -6,53 +6,35 @@ extern crate serde; pub mod apps; pub mod dal; +pub mod prisma; use anyhow::Result; -use apps::AppManager; -use sqlx::{ - sqlite::{SqliteConnectOptions, SqlitePoolOptions}, - SqlitePool, -}; -use tokio::fs; +use prisma::PrismaClient; -use crate::dal::Db; +use crate::apps::AppManager; -// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command -#[tauri::command] -fn greet(name: &str) -> String { - format!("Hello, {}! You've been greeted from Rust!", name) -} +pub use crate::apps::meta::AppMetadata; #[tokio::main] async fn main() -> Result<()> { // Open database - let pool = open_database().await?; + let client = PrismaClient::_builder().build().await?; // Register apps - let mut app_manager = AppManager::new(&pool); + let mut app_manager = AppManager::new().await?; app_manager.register().await?; + // Read indexes + let indexes_from_apps = app_manager.compute_indices().await?; + let indexes_from_db = client.indices().find_many(vec![]).exec().await?; + println!("indexes: {:?}", indexes_from_db); + tauri::Builder::default() - .manage(Db(pool)) .manage(app_manager) - .invoke_handler(tauri::generate_handler![greet]) + .manage(client) + .invoke_handler(tauri::generate_handler![dal::query]) .run(tauri::generate_context!()) .expect("error while running tauri application"); Ok(()) } - -async fn open_database() -> Result { - let app_dir = dirs::data_dir().unwrap().join("panorama"); - fs::create_dir_all(&app_dir).await?; - - let db_path = app_dir.join("vault.sqlite"); - let db_options = SqliteConnectOptions::new() - .filename(&db_path) - .create_if_missing(true); - let pool = SqlitePoolOptions::new().connect_with(db_options).await?; - println!("Running migrations..."); - sqlx::migrate!().run(&pool).await?; - - Ok(pool) -} diff --git a/src/App.tsx b/src/App.tsx index b821341..1a62211 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,9 +11,10 @@ import { Image, MenuList, CloseButton, + useColorMode, } from "@chakra-ui/react"; import { AddIcon, ChevronDownIcon, SearchIcon } from "@chakra-ui/icons"; -import { Mosaic, MosaicWindow, RemoveButton } from "react-mosaic-component"; +import { Mosaic, MosaicWindow } from "react-mosaic-component"; import classNames from "classnames"; import "react-mosaic-component/react-mosaic-component.css"; @@ -27,76 +28,78 @@ function App() { c:
Bottom Right Window
, }; + const { colorMode, toggleColorMode } = useColorMode(); + return ( - -
- + + + className={classNames(styles.container, "mosaic-blueprint-theme")} + renderTile={(id, path) => ( + + )} + blueprintNamespace="bp3" + initialValue={{ + direction: "row", + first: "Journal", + second: { direction: "row", - first: "Journal", - second: { - direction: "row", - first: { - direction: "column", - first: "Calendar", - second: "Email", - }, - second: "Chat", - splitPercentage: 66.66, + first: { + direction: "column", + first: "Calendar", + second: "Email", }, - splitPercentage: 25, - }} - /> -
-
+ second: "Chat", + splitPercentage: 66.66, + }, + splitPercentage: 25, + }} + /> + ); } diff --git a/src/main.tsx b/src/main.tsx index fa1b97e..da4f6f6 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2,9 +2,26 @@ import React from "react"; import ReactDOM from "react-dom/client"; import App from "./App"; import "./styles.css"; +import { + ChakraProvider, + ColorModeProvider, + ThemeConfig, + ThemeProvider, + extendBaseTheme, + extendTheme, +} from "@chakra-ui/react"; + +const config: ThemeConfig = { + initialColorMode: "system", + useSystemColorMode: true, +}; + +const theme = extendBaseTheme({ config }); ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( - + + + ); diff --git a/src/styles.css b/src/styles.css index 44469ef..d806470 100644 --- a/src/styles.css +++ b/src/styles.css @@ -5,4 +5,6 @@ body, padding: 0; width: 100%; height: 100%; + + background-color: var(--chakra-colors-chakra-body-bg); }