From eb2db29c3ea49109d88ed63cd66e766b6b46b43b Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Fri, 25 Oct 2024 09:05:21 +0300 Subject: [PATCH 01/39] update: replace wit with codegen interface --- Cargo.lock | 1 - Cargo.toml | 4 - src/typegraph/core/Cargo.toml | 5 - src/typegraph/core/src/conversion/params.rs | 22 +- src/typegraph/core/src/conversion/policies.rs | 4 +- src/typegraph/core/src/conversion/runtimes.rs | 50 +- src/typegraph/core/src/errors.rs | 18 +- src/typegraph/core/src/global_store.rs | 10 +- src/typegraph/core/src/lib.rs | 42 +- src/typegraph/core/src/logger.rs | 32 +- src/typegraph/core/src/params/apply.rs | 2 +- src/typegraph/core/src/runtimes/aws/mod.rs | 22 +- src/typegraph/core/src/runtimes/deno.rs | 8 +- src/typegraph/core/src/runtimes/graphql.rs | 11 +- src/typegraph/core/src/runtimes/grpc/mod.rs | 8 +- src/typegraph/core/src/runtimes/mod.rs | 304 ++++---- .../core/src/runtimes/prisma/context.rs | 4 +- .../core/src/runtimes/prisma/errors.rs | 2 +- .../core/src/runtimes/prisma/migration.rs | 4 +- src/typegraph/core/src/runtimes/prisma/mod.rs | 7 +- .../core/src/runtimes/prisma/model.rs | 2 +- src/typegraph/core/src/runtimes/python.rs | 10 +- src/typegraph/core/src/runtimes/random.rs | 4 +- .../core/src/runtimes/substantial.rs | 24 +- src/typegraph/core/src/runtimes/temporal.rs | 14 +- src/typegraph/core/src/runtimes/typegate.rs | 4 +- src/typegraph/core/src/runtimes/typegraph.rs | 4 +- src/typegraph/core/src/runtimes/wasm.rs | 6 +- src/typegraph/core/src/t.rs | 8 +- src/typegraph/core/src/test_utils.rs | 6 +- src/typegraph/core/src/typedef/either.rs | 2 +- src/typegraph/core/src/typedef/file.rs | 2 +- src/typegraph/core/src/typedef/float.rs | 2 +- src/typegraph/core/src/typedef/func.rs | 2 +- src/typegraph/core/src/typedef/integer.rs | 2 +- src/typegraph/core/src/typedef/list.rs | 2 +- src/typegraph/core/src/typedef/optional.rs | 2 +- src/typegraph/core/src/typedef/string.rs | 2 +- src/typegraph/core/src/typedef/struct_.rs | 2 +- src/typegraph/core/src/typedef/union.rs | 2 +- src/typegraph/core/src/typegraph.rs | 8 +- src/typegraph/core/src/types/mod.rs | 1 + src/typegraph/core/src/types/sdk/aws.rs | 33 + src/typegraph/core/src/types/sdk/core.rs | 249 +++++++ src/typegraph/core/src/types/sdk/mod.rs | 4 + src/typegraph/core/src/types/sdk/runtimes.rs | 343 +++++++++ src/typegraph/core/src/types/sdk/utils.rs | 59 ++ src/typegraph/core/src/types/type_def.rs | 6 +- src/typegraph/core/src/types/type_id.rs | 2 +- .../core/src/types/type_ref/injection.rs | 4 +- .../core/src/types/type_ref/policy.rs | 8 +- src/typegraph/core/src/utils/fs.rs | 69 +- src/typegraph/core/src/utils/mod.rs | 10 +- src/typegraph/core/src/utils/oauth2/mod.rs | 6 +- .../core/src/utils/postprocess/mod.rs | 2 +- .../core/src/utils/postprocess/prisma_rt.rs | 14 +- src/typegraph/core/src/validation/errors.rs | 2 +- .../core/src/validation/materializers.rs | 2 +- src/typegraph/core/src/validation/types.rs | 2 +- src/typegraph/core/wit/typegraph.wit | 674 ------------------ src/typegraph/specs/.gitignore | 2 + src/typegraph/specs/codegen/deno.json | 14 + src/typegraph/specs/codegen/deno.lock | 99 +++ .../specs/codegen/rpc/python/__init__.py | 0 .../specs/codegen/rpc/python/client.py | 31 + .../specs/codegen/rpc/python/client_mock.py | 9 + .../specs/codegen/rpc/tests/client.test.ts | 71 ++ .../specs/codegen/rpc/tests/utils.ts | 18 + .../specs/codegen/rpc/typescript/client.ts | 52 ++ .../codegen/rpc/typescript/client_mock.ts | 6 + src/typegraph/specs/codegen/src/cmd/main.ts | 31 + src/typegraph/specs/codegen/src/cmd/utils.ts | 40 ++ src/typegraph/specs/codegen/src/lib/base.ts | 254 +++++++ src/typegraph/specs/codegen/src/lib/python.ts | 130 ++++ .../specs/codegen/src/lib/rust_lib.ts | 110 +++ .../specs/codegen/src/lib/treesitter.ts | 64 ++ .../specs/codegen/src/lib/typescript.ts | 90 +++ .../specs/codegen/tests/python.test.ts | 83 +++ .../specs/codegen/tests/rust_lib.test.ts | 75 ++ .../specs/codegen/tests/treesitter.test.ts | 25 + .../specs/codegen/tests/typescript.test.ts | 71 ++ src/typegraph/specs/codegen/tests/utils.ts | 31 + src/typegraph/specs/codegen/tg-codegen | 13 + src/typegraph/specs/types/aws.d.ts | 51 ++ src/typegraph/specs/types/core.d.ts | 300 ++++++++ src/typegraph/specs/types/primitives.d.ts | 8 + src/typegraph/specs/types/runtimes.d.ts | 473 ++++++++++++ src/typegraph/specs/types/utils.d.ts | 86 +++ 88 files changed, 3314 insertions(+), 1083 deletions(-) create mode 100644 src/typegraph/core/src/types/sdk/aws.rs create mode 100644 src/typegraph/core/src/types/sdk/core.rs create mode 100644 src/typegraph/core/src/types/sdk/mod.rs create mode 100644 src/typegraph/core/src/types/sdk/runtimes.rs create mode 100644 src/typegraph/core/src/types/sdk/utils.rs delete mode 100644 src/typegraph/core/wit/typegraph.wit create mode 100644 src/typegraph/specs/.gitignore create mode 100644 src/typegraph/specs/codegen/deno.json create mode 100644 src/typegraph/specs/codegen/deno.lock create mode 100644 src/typegraph/specs/codegen/rpc/python/__init__.py create mode 100644 src/typegraph/specs/codegen/rpc/python/client.py create mode 100644 src/typegraph/specs/codegen/rpc/python/client_mock.py create mode 100644 src/typegraph/specs/codegen/rpc/tests/client.test.ts create mode 100644 src/typegraph/specs/codegen/rpc/tests/utils.ts create mode 100644 src/typegraph/specs/codegen/rpc/typescript/client.ts create mode 100644 src/typegraph/specs/codegen/rpc/typescript/client_mock.ts create mode 100644 src/typegraph/specs/codegen/src/cmd/main.ts create mode 100644 src/typegraph/specs/codegen/src/cmd/utils.ts create mode 100644 src/typegraph/specs/codegen/src/lib/base.ts create mode 100644 src/typegraph/specs/codegen/src/lib/python.ts create mode 100644 src/typegraph/specs/codegen/src/lib/rust_lib.ts create mode 100644 src/typegraph/specs/codegen/src/lib/treesitter.ts create mode 100644 src/typegraph/specs/codegen/src/lib/typescript.ts create mode 100644 src/typegraph/specs/codegen/tests/python.test.ts create mode 100644 src/typegraph/specs/codegen/tests/rust_lib.test.ts create mode 100644 src/typegraph/specs/codegen/tests/treesitter.test.ts create mode 100644 src/typegraph/specs/codegen/tests/typescript.test.ts create mode 100644 src/typegraph/specs/codegen/tests/utils.ts create mode 100755 src/typegraph/specs/codegen/tg-codegen create mode 100644 src/typegraph/specs/types/aws.d.ts create mode 100644 src/typegraph/specs/types/core.d.ts create mode 100644 src/typegraph/specs/types/primitives.d.ts create mode 100644 src/typegraph/specs/types/runtimes.d.ts create mode 100644 src/typegraph/specs/types/utils.d.ts diff --git a/Cargo.lock b/Cargo.lock index 78a09ccaca..44fccc390b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12835,7 +12835,6 @@ dependencies = [ "serde_json", "sha2 0.10.8", "unindent", - "wit-bindgen", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 92024645b7..89e993ee2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,6 @@ seahash = "4.1.0" # patterns anyhow = "1.0.89" # FIXME: replace anyhow with eyre color-eyre = "0.6.3" -eyre = "0.6.12" # NOTE: keep in sync with verison used by color-eyre thiserror = "1.0.64" indoc = "2.0.5" unindent = "0.2.3" @@ -124,7 +123,6 @@ uuid = "1.10.0" # wasm wasmtime = "25.0.2" wasmtime-wasi = "25.0.2" -wit-bindgen = "0.34.0" # deno # deno = { path = "../deno/cli" } @@ -145,8 +143,6 @@ tracing-subscriber = { version = "0.3.18", features = [ tracing-error = "0.2" # `unwrap` that also logs tracing-unwrap = { version = "1.0.1", features = ["log-location"] } -# collect traces to file -tracing-appender = "0.2.3" # async futures = "=0.3.30" # pinned due to bug with .31 with zeromq (deno) diff --git a/src/typegraph/core/Cargo.toml b/src/typegraph/core/Cargo.toml index 569df10d32..7ded255dd7 100644 --- a/src/typegraph/core/Cargo.toml +++ b/src/typegraph/core/Cargo.toml @@ -3,9 +3,6 @@ name = "typegraph_core" version = "0.5.0-rc.2" edition = "2021" -[lib] -crate-type = ["cdylib", "rlib"] - [dependencies] common.workspace = true metagen.workspace = true @@ -20,8 +17,6 @@ serde_json.workspace = true indoc.workspace = true unindent.workspace = true -wit-bindgen.workspace = true - once_cell.workspace = true regex.workspace = true indexmap.workspace = true diff --git a/src/typegraph/core/src/conversion/params.rs b/src/typegraph/core/src/conversion/params.rs index f11b391357..55f79a8b47 100644 --- a/src/typegraph/core/src/conversion/params.rs +++ b/src/typegraph/core/src/conversion/params.rs @@ -5,8 +5,8 @@ use crate::errors::Result; use common::typegraph::{Auth, AuthProtocol, Cors, Rate}; use indexmap::IndexMap; -impl From for Cors { - fn from(value: crate::wit::core::Cors) -> Self { +impl From for Cors { + fn from(value: crate::sdk::core::Cors) -> Self { Cors { allow_origin: value.allow_origin, allow_headers: value.allow_headers, @@ -18,8 +18,8 @@ impl From for Cors { } } -impl From for Rate { - fn from(value: crate::wit::core::Rate) -> Self { +impl From for Rate { + fn from(value: crate::sdk::core::Rate) -> Self { Rate { window_limit: value.window_limit, window_sec: value.window_sec, @@ -30,17 +30,17 @@ impl From for Rate { } } -impl From for AuthProtocol { - fn from(value: crate::wit::utils::AuthProtocol) -> Self { +impl From for AuthProtocol { + fn from(value: crate::sdk::utils::AuthProtocol) -> Self { match value { - crate::wit::utils::AuthProtocol::Oauth2 => AuthProtocol::OAuth2, - crate::wit::utils::AuthProtocol::Jwt => AuthProtocol::Jwt, - crate::wit::utils::AuthProtocol::Basic => AuthProtocol::Basic, + crate::sdk::utils::AuthProtocol::Oauth2 => AuthProtocol::OAuth2, + crate::sdk::utils::AuthProtocol::Jwt => AuthProtocol::Jwt, + crate::sdk::utils::AuthProtocol::Basic => AuthProtocol::Basic, } } } -impl crate::wit::utils::Auth { +impl crate::sdk::utils::Auth { pub fn convert(&self) -> Result { let mut auth_data = IndexMap::new(); for (k, v) in self.auth_data.iter() { @@ -51,7 +51,7 @@ impl crate::wit::utils::Auth { } Ok(Auth { name: self.name.clone(), - protocol: self.protocol.into(), + protocol: self.protocol.clone().into(), auth_data, }) } diff --git a/src/typegraph/core/src/conversion/policies.rs b/src/typegraph/core/src/conversion/policies.rs index 1c2747fc91..7fea4a84f5 100644 --- a/src/typegraph/core/src/conversion/policies.rs +++ b/src/typegraph/core/src/conversion/policies.rs @@ -4,14 +4,14 @@ use common::typegraph::Policy; use crate::errors::Result; +use crate::sdk::core::PolicySpec; use crate::typegraph::TypegraphContext; -use crate::wit::core::PolicySpec; use std::hash::Hash as _; use super::hash::Hashable; -impl crate::wit::core::Policy { +impl crate::sdk::core::Policy { pub fn convert(&self, ctx: &mut TypegraphContext) -> Result { let mat_id = ctx.register_materializer(self.materializer)?; Ok(Policy { diff --git a/src/typegraph/core/src/conversion/runtimes.rs b/src/typegraph/core/src/conversion/runtimes.rs index 76c7dc89ef..b8655e06da 100644 --- a/src/typegraph/core/src/conversion/runtimes.rs +++ b/src/typegraph/core/src/conversion/runtimes.rs @@ -7,11 +7,11 @@ use crate::runtimes::{ DenoMaterializer, Materializer as RawMaterializer, PythonMaterializer, RandomMaterializer, Runtime, TemporalMaterializer, WasmMaterializer, }; -use crate::wit::core::{Artifact as WitArtifact, RuntimeId}; -use crate::wit::runtimes::{ +use crate::sdk::core::{Artifact as SdkArtifact, RuntimeId}; +use crate::sdk::runtimes::{ HttpMethod, KvMaterializer, MaterializerHttpRequest, SubstantialBackend, }; -use crate::{typegraph::TypegraphContext, wit::runtimes::Effect as WitEffect}; +use crate::{sdk::runtimes::Effect as SdkEffect, typegraph::TypegraphContext}; use common::typegraph::runtimes::deno::DenoRuntimeData; use common::typegraph::runtimes::graphql::GraphQLRuntimeData; use common::typegraph::runtimes::grpc::GrpcRuntimeData; @@ -45,13 +45,13 @@ fn effect(typ: EffectType, idempotent: bool) -> Effect { } } -impl From for Effect { - fn from(eff: WitEffect) -> Self { +impl From for Effect { + fn from(eff: SdkEffect) -> Self { match eff { - WitEffect::Read => effect(EffectType::Read, true), - WitEffect::Create(idemp) => effect(EffectType::Create, idemp), - WitEffect::Update(idemp) => effect(EffectType::Update, idemp), - WitEffect::Delete(idemp) => effect(EffectType::Delete, idemp), + SdkEffect::Read => effect(EffectType::Read, true), + SdkEffect::Create(idemp) => effect(EffectType::Create, idemp), + SdkEffect::Update(idemp) => effect(EffectType::Update, idemp), + SdkEffect::Delete(idemp) => effect(EffectType::Delete, idemp), } } } @@ -62,7 +62,7 @@ pub trait MaterializerConverter { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result; } @@ -71,7 +71,7 @@ impl MaterializerConverter for Rc { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { (**self).convert(c, runtime_id, effect) } @@ -82,7 +82,7 @@ impl MaterializerConverter for DenoMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { use crate::runtimes::DenoMaterializer::*; let runtime = c.register_runtime(runtime_id)?; @@ -159,12 +159,12 @@ impl MaterializerConverter for MaterializerHttpRequest { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let mut data: IndexMap = serde_json::from_value(json!({ - "verb": http_method(self.method), + "verb": http_method(self.method.clone()), "path": self.path, "content_type": self.content_type.as_deref().unwrap_or("application/json"), "header_prefix": self.header_prefix.as_deref().unwrap_or("header#"), @@ -212,7 +212,7 @@ impl MaterializerConverter for PythonMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { use crate::runtimes::PythonMaterializer::*; let runtime = c.register_runtime(runtime_id)?; @@ -272,7 +272,7 @@ impl MaterializerConverter for RandomMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let RandomMaterializer::Runtime(ret) = self; @@ -291,8 +291,8 @@ impl MaterializerConverter for RandomMaterializer { } } -impl From for Artifact { - fn from(artifact: WitArtifact) -> Self { +impl From for Artifact { + fn from(artifact: SdkArtifact) -> Self { Artifact { path: artifact.path.into(), hash: artifact.hash, @@ -301,9 +301,9 @@ impl From for Artifact { } } -impl From for WitArtifact { +impl From for SdkArtifact { fn from(artifact: Artifact) -> Self { - WitArtifact { + SdkArtifact { path: artifact.path.as_os_str().to_str().unwrap().to_string(), hash: artifact.hash, size: artifact.size, @@ -316,7 +316,7 @@ impl MaterializerConverter for WasmMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let (name, func_name) = match &self { @@ -344,7 +344,7 @@ impl MaterializerConverter for TemporalMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { use crate::runtimes::TemporalMaterializer::*; let runtime = c.register_runtime(runtime_id)?; @@ -390,7 +390,7 @@ impl MaterializerConverter for KvMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: SdkEffect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let data = serde_json::from_value(json!({})).map_err(|e| e.to_string())?; @@ -518,10 +518,10 @@ pub fn convert_runtime(_c: &mut TypegraphContext, runtime: Runtime) -> Result { + crate::sdk::runtimes::WorkflowKind::Python => { substantial::WorkflowKind::Python } - crate::wit::runtimes::WorkflowKind::Deno => { + crate::sdk::runtimes::WorkflowKind::Deno => { substantial::WorkflowKind::Deno } }, diff --git a/src/typegraph/core/src/errors.rs b/src/typegraph/core/src/errors.rs index ef33a1421c..7ca65001ed 100644 --- a/src/typegraph/core/src/errors.rs +++ b/src/typegraph/core/src/errors.rs @@ -3,10 +3,18 @@ use std::convert::Infallible; -pub use crate::wit::core::Error as TgError; +pub use crate::sdk::core::Error as TgError; pub type Result = std::result::Result; +impl std::fmt::Display for TgError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.stack.join("\n")) + } +} + +impl std::error::Error for TgError {} + impl From for TgError { fn from(_: Infallible) -> Self { unreachable!() @@ -33,6 +41,14 @@ impl From for TgError { } } +impl From for TgError { + fn from(e: std::io::Error) -> Self { + Self { + stack: vec![e.to_string()], + } + } +} + impl TgError { pub fn from_std(e: impl std::error::Error) -> Self { Self { diff --git a/src/typegraph/core/src/global_store.rs b/src/typegraph/core/src/global_store.rs index f46a194e3d..2ddc4390e5 100644 --- a/src/typegraph/core/src/global_store.rs +++ b/src/typegraph/core/src/global_store.rs @@ -5,15 +5,15 @@ use crate::errors::{self, Result, TgError}; use crate::runtimes::{ DenoMaterializer, Materializer, MaterializerData, MaterializerDenoModule, Runtime, }; +use crate::sdk::core::{MaterializerId, Policy as CorePolicy, PolicyId, RuntimeId}; +use crate::sdk::utils::Auth as SdkAuth; use crate::types::type_ref::TypeRef; use crate::types::{ AsTypeDefEx as _, NamedTypeRef, Type, TypeDef, TypeDefExt, TypeId, TypeRefBuilder, }; -use crate::wit::core::{Policy as CorePolicy, PolicyId, RuntimeId}; -use crate::wit::utils::Auth as WitAuth; #[allow(unused)] -use crate::wit::runtimes::{Effect, MaterializerDenoPredefined, MaterializerId}; +use crate::sdk::runtimes::{Effect, MaterializerDenoPredefined}; use graphql_parser::parse_query; use indexmap::IndexMap; use std::rc::Rc; @@ -86,7 +86,7 @@ impl Store { runtime_id: deno_runtime, effect: Effect::Read, data: MaterializerData::Deno(Rc::new(DenoMaterializer::Predefined( - crate::wit::runtimes::MaterializerDenoPredefined { + crate::sdk::runtimes::MaterializerDenoPredefined { name: "true".to_string(), }, ))), @@ -423,7 +423,7 @@ impl Store { with_store(|s| s.graphql_endpoints.clone()) } - pub fn add_auth(auth: WitAuth) -> Result { + pub fn add_auth(auth: SdkAuth) -> Result { with_store_mut(|s| { let auth = auth.convert()?; s.auths.push(auth); diff --git a/src/typegraph/core/src/lib.rs b/src/typegraph/core/src/lib.rs index f44c45e921..d20de26179 100644 --- a/src/typegraph/core/src/lib.rs +++ b/src/typegraph/core/src/lib.rs @@ -1,8 +1,10 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 +pub mod errors; +pub use types::sdk; + mod conversion; -mod errors; mod global_store; mod logger; mod params; @@ -26,6 +28,12 @@ use indoc::formatdoc; use params::apply; use regex::Regex; use runtimes::{DenoMaterializer, Materializer}; +use sdk::core::{ + Artifact, ContextCheck, Policy, PolicyId, PolicySpec, SerializeParams, TransformData, + TypeEither, TypeFile, TypeFloat, TypeFunc, TypeId as CoreTypeId, TypeInteger, TypeList, + TypeOptional, TypeString, TypeStruct, TypeUnion, TypegraphInitParams, +}; +use sdk::runtimes::{Handler, MaterializerDenoFunc}; use types::type_ref::AsId; use types::{ AsTypeDefEx as _, Boolean, Either, File, Float, Func, Integer, List, Named, Optional, StringT, @@ -33,25 +41,9 @@ use types::{ WithRuntimeConfig as _, }; -use wit::core::{ - Artifact, ContextCheck, Policy, PolicyId, PolicySpec, SerializeParams, TransformData, - TypeEither, TypeFile, TypeFloat, TypeFunc, TypeId as CoreTypeId, TypeInteger, TypeList, - TypeOptional, TypeString, TypeStruct, TypeUnion, TypegraphInitParams, -}; -use wit::runtimes::{Guest, MaterializerDenoFunc}; - -pub mod wit { - wit_bindgen::generate!({ - world: "typegraph" - }); - use crate::Lib; - pub use exports::metatype::typegraph::{aws, core, runtimes, utils}; - export!(Lib); -} - pub struct Lib {} -impl wit::core::Guest for Lib { +impl sdk::core::Handler for Lib { fn init_typegraph(params: TypegraphInitParams) -> Result<()> { typegraph::init(params) } @@ -255,10 +247,10 @@ impl wit::core::Guest for Lib { } fn get_internal_policy() -> Result<(PolicyId, String)> { - let deno_mat = DenoMaterializer::Predefined(wit::runtimes::MaterializerDenoPredefined { + let deno_mat = DenoMaterializer::Predefined(sdk::runtimes::MaterializerDenoPredefined { name: "internal_policy".to_string(), }); - let mat = Materializer::deno(deno_mat, crate::wit::runtimes::Effect::Read); + let mat = Materializer::deno(deno_mat, crate::sdk::runtimes::Effect::Read); let policy_id = Store::register_policy( Policy { materializer: Store::register_materializer(mat), @@ -314,7 +306,7 @@ impl wit::core::Guest for Lib { code, secrets: vec![], }, - wit::runtimes::Effect::Read, + sdk::runtimes::Effect::Read, )?; Lib::register_policy(Policy { @@ -324,7 +316,7 @@ impl wit::core::Guest for Lib { .map(|id| (id, name)) } - fn rename_type(type_id: CoreTypeId, new_name: String) -> Result { + fn rename_type(type_id: CoreTypeId, new_name: String) -> Result { TypeId(type_id).named(new_name).map(|t| t.id().0) } @@ -358,10 +350,12 @@ macro_rules! log { mod tests { use crate::errors::{self, Result}; use crate::global_store::Store; + use crate::sdk::core::{ + Cors, Handler, MigrationAction, PrismaMigrationConfig, SerializeParams, + }; + use crate::sdk::runtimes::{Effect, Handler as GuestRuntimes, MaterializerDenoFunc}; use crate::t::{self, TypeBuilder}; use crate::test_utils::setup; - use crate::wit::core::{Cors, Guest, MigrationAction, PrismaMigrationConfig, SerializeParams}; - use crate::wit::runtimes::{Effect, Guest as GuestRuntimes, MaterializerDenoFunc}; use crate::Lib; use crate::TypegraphInitParams; diff --git a/src/typegraph/core/src/logger.rs b/src/typegraph/core/src/logger.rs index 6f7a397a20..655ef2d7e3 100644 --- a/src/typegraph/core/src/logger.rs +++ b/src/typegraph/core/src/logger.rs @@ -4,52 +4,28 @@ #[allow(unused)] macro_rules! debug { ( $($arg:tt)* ) => { - { - use std::fmt::Write as _; - - let mut msg = "debug: ".to_string(); - write!(&mut msg, $($arg)*).unwrap(); - $crate::wit::metatype::typegraph::host::print(&msg); - } + println!("debug: {}", format!($($arg)*)); }; } #[allow(unused)] macro_rules! info { ( $($arg:tt)* ) => { - { - use std::fmt::Write as _; - - let mut msg = "info: ".to_string(); - write!(&mut msg, $($arg)*).unwrap(); - $crate::wit::metatype::typegraph::host::print(&msg); - } + println!("info: {}", format!($($arg)*)); }; } #[allow(unused)] macro_rules! warning { ( $($arg:tt)* ) => { - { - use std::fmt::Write as _; - - let mut msg = "warn: ".to_string(); - write!(&mut msg, $($arg)*).unwrap(); - $crate::wit::metatype::typegraph::host::print(&msg); - } + eprintln!("warning: {}", format!($($arg)*)); }; } #[allow(unused)] macro_rules! error { ( $($arg:tt)* ) => { - { - use std::fmt::Write as _; - - let mut msg = "error: ".to_string(); - write!(&mut msg, $($arg)*).unwrap(); - $crate::wit::metatype::typegraph::host::print(&msg); - } + eprintln!("error: {}", format!($($arg)*)); }; } diff --git a/src/typegraph/core/src/params/apply.rs b/src/typegraph/core/src/params/apply.rs index e90f31b45a..7a5eb8439d 100644 --- a/src/typegraph/core/src/params/apply.rs +++ b/src/typegraph/core/src/params/apply.rs @@ -2,9 +2,9 @@ // SPDX-License-Identifier: MPL-2.0 use crate::errors::{ErrorContext, Result, TgError}; +use crate::sdk::core::{ParameterTransform, TransformData}; use crate::t::{self, TypeBuilder}; use crate::types::{Type, TypeDef, TypeId}; -use crate::wit::core::{ParameterTransform, TransformData}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt::Write; diff --git a/src/typegraph/core/src/runtimes/aws/mod.rs b/src/typegraph/core/src/runtimes/aws/mod.rs index 6d9474b310..8cc8cf0fc2 100644 --- a/src/typegraph/core/src/runtimes/aws/mod.rs +++ b/src/typegraph/core/src/runtimes/aws/mod.rs @@ -6,12 +6,10 @@ use std::rc::Rc; use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; use crate::global_store::Store; +use crate::sdk::aws::{S3PresignGetParams, S3PresignPutParams, S3RuntimeData}; +use crate::sdk::core::{MaterializerId, RuntimeId}; +use crate::sdk::runtimes::Effect; use crate::typegraph::TypegraphContext; -use crate::wit::aws::{ - MaterializerId, RuntimeId, S3PresignGetParams, S3PresignPutParams, S3RuntimeData, -}; -use crate::wit::runtimes::Effect as WitEffect; -use crate::wit::runtimes::Effect; use serde::Serialize; use super::{Materializer, Runtime}; @@ -49,7 +47,7 @@ impl From for S3PresignPutMat { } impl Materializer { - fn s3(runtime_id: RuntimeId, data: S3Materializer, effect: WitEffect) -> Self { + fn s3(runtime_id: RuntimeId, data: S3Materializer, effect: Effect) -> Self { Self { runtime_id, data: Rc::new(data).into(), @@ -120,7 +118,7 @@ impl MaterializerConverter for S3Materializer { } } -impl crate::wit::aws::Guest for crate::Lib { +impl crate::sdk::aws::Handler for crate::Lib { fn register_s3_runtime(data: S3RuntimeData) -> Result { Ok(Store::register_runtime(Runtime::S3(data.into()))) } @@ -129,7 +127,7 @@ impl crate::wit::aws::Guest for crate::Lib { let mat = Materializer::s3( runtime, S3Materializer::PresignGet(params.into()), - WitEffect::Read, + Effect::Read, ); Ok(Store::register_materializer(mat)) } @@ -138,7 +136,7 @@ impl crate::wit::aws::Guest for crate::Lib { let mat = Materializer::s3( runtime, S3Materializer::PresignPut(params.into()), - WitEffect::Read, + Effect::Read, ); Ok(Store::register_materializer(mat)) } @@ -147,7 +145,7 @@ impl crate::wit::aws::Guest for crate::Lib { let mat = Materializer::s3( runtime, S3Materializer::List(S3ListItemsMat { bucket }), - WitEffect::Read, + Effect::Read, ); Ok(Store::register_materializer(mat)) } @@ -156,7 +154,7 @@ impl crate::wit::aws::Guest for crate::Lib { let mat = Materializer::s3( runtime, S3Materializer::Upload(S3UploadMat { bucket }), - WitEffect::Create(true), + Effect::Create(true), ); Ok(Store::register_materializer(mat)) } @@ -165,7 +163,7 @@ impl crate::wit::aws::Guest for crate::Lib { let mat = Materializer::s3( runtime, S3Materializer::UploadAll(S3UploadMat { bucket }), - WitEffect::Create(true), + Effect::Create(true), ); Ok(Store::register_materializer(mat)) } diff --git a/src/typegraph/core/src/runtimes/deno.rs b/src/typegraph/core/src/runtimes/deno.rs index fe34beae5c..edc413fa8a 100644 --- a/src/typegraph/core/src/runtimes/deno.rs +++ b/src/typegraph/core/src/runtimes/deno.rs @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::wit::runtimes as wit; +use crate::sdk::{core::MaterializerId, runtimes as sdk}; #[derive(Debug)] pub struct MaterializerDenoModule { @@ -12,7 +12,7 @@ pub struct MaterializerDenoModule { #[derive(Debug)] pub struct MaterializerDenoImport { pub func_name: String, - pub module: wit::MaterializerId, + pub module: MaterializerId, pub secrets: Vec, } @@ -24,8 +24,8 @@ pub struct MaterializerDenoStatic { #[derive(Debug)] pub enum DenoMaterializer { Static(MaterializerDenoStatic), - Inline(wit::MaterializerDenoFunc), - Predefined(wit::MaterializerDenoPredefined), + Inline(sdk::MaterializerDenoFunc), + Predefined(sdk::MaterializerDenoPredefined), Module(MaterializerDenoModule), Import(MaterializerDenoImport), } diff --git a/src/typegraph/core/src/runtimes/graphql.rs b/src/typegraph/core/src/runtimes/graphql.rs index 57d3e33933..551410302c 100644 --- a/src/typegraph/core/src/runtimes/graphql.rs +++ b/src/typegraph/core/src/runtimes/graphql.rs @@ -6,13 +6,16 @@ use indexmap::IndexMap; use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; +use crate::sdk::{ + core::RuntimeId, + runtimes::{self as sdk}, +}; use crate::typegraph::TypegraphContext; -use crate::wit::runtimes::{self as wit, RuntimeId}; #[derive(Debug)] pub enum GraphqlMaterializer { - Query(wit::MaterializerGraphqlQuery), - Mutation(wit::MaterializerGraphqlQuery), + Query(sdk::MaterializerGraphqlQuery), + Mutation(sdk::MaterializerGraphqlQuery), } impl MaterializerConverter for GraphqlMaterializer { @@ -20,7 +23,7 @@ impl MaterializerConverter for GraphqlMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: wit::Effect, + effect: sdk::Effect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let (name, data) = match self { diff --git a/src/typegraph/core/src/runtimes/grpc/mod.rs b/src/typegraph/core/src/runtimes/grpc/mod.rs index 2a821c03da..022bab5663 100644 --- a/src/typegraph/core/src/runtimes/grpc/mod.rs +++ b/src/typegraph/core/src/runtimes/grpc/mod.rs @@ -7,8 +7,8 @@ use std::rc::Rc; use super::Runtime; use crate::global_store::Store; -use crate::wit::core::{FuncParams, RuntimeId}; -use crate::wit::runtimes::{Effect as WitEffect, GrpcData, GrpcRuntimeData}; +use crate::sdk::core::{FuncParams, RuntimeId}; +use crate::sdk::runtimes::{Effect, GrpcData, GrpcRuntimeData}; use crate::{ conversion::runtimes::MaterializerConverter, errors::Result, typegraph::TypegraphContext, }; @@ -27,7 +27,7 @@ impl MaterializerConverter for GrpcMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: Effect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let data = from_value(json!({"method": self.method})).map_err(|e| e.to_string())?; @@ -55,7 +55,7 @@ pub fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result = std::result::Result; +use crate::errors::Result; #[derive(Debug, Clone)] pub enum Runtime { @@ -81,12 +81,12 @@ pub enum Runtime { #[derive(Debug, Clone)] pub struct Materializer { pub runtime_id: RuntimeId, - pub effect: wit::Effect, + pub effect: Effect, pub data: MaterializerData, } impl Materializer { - pub fn deno(data: DenoMaterializer, effect: wit::Effect) -> Self { + pub fn deno(data: DenoMaterializer, effect: Effect) -> Self { Self { runtime_id: Store::get_deno_runtime(), effect, @@ -94,7 +94,7 @@ impl Materializer { } } - fn graphql(runtime_id: RuntimeId, data: GraphqlMaterializer, effect: wit::Effect) -> Self { + fn graphql(runtime_id: RuntimeId, data: GraphqlMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -102,7 +102,7 @@ impl Materializer { } } - fn http(runtime_id: RuntimeId, data: MaterializerHttpRequest, effect: wit::Effect) -> Self { + fn http(runtime_id: RuntimeId, data: MaterializerHttpRequest, effect: Effect) -> Self { Self { runtime_id, effect, @@ -110,7 +110,7 @@ impl Materializer { } } - fn python(runtime_id: RuntimeId, data: PythonMaterializer, effect: wit::Effect) -> Self { + fn python(runtime_id: RuntimeId, data: PythonMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -118,7 +118,7 @@ impl Materializer { } } - fn random(runtime_id: RuntimeId, data: RandomMaterializer, effect: wit::Effect) -> Self { + fn random(runtime_id: RuntimeId, data: RandomMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -126,7 +126,7 @@ impl Materializer { } } - fn wasm(runtime_id: RuntimeId, data: WasmMaterializer, effect: wit::Effect) -> Self { + fn wasm(runtime_id: RuntimeId, data: WasmMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -134,7 +134,7 @@ impl Materializer { } } - fn prisma(runtime_id: RuntimeId, data: PrismaMaterializer, effect: wit::Effect) -> Self { + fn prisma(runtime_id: RuntimeId, data: PrismaMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -145,7 +145,7 @@ impl Materializer { fn prisma_migrate( runtime_id: RuntimeId, data: PrismaMigrationOperation, - effect: wit::Effect, + effect: Effect, ) -> Self { Self { runtime_id, @@ -154,7 +154,7 @@ impl Materializer { } } - fn temporal(runtime_id: RuntimeId, data: TemporalMaterializer, effect: wit::Effect) -> Self { + fn temporal(runtime_id: RuntimeId, data: TemporalMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -162,7 +162,7 @@ impl Materializer { } } - fn typegate(runtime_id: RuntimeId, data: TypegateOperation, effect: wit::Effect) -> Self { + fn typegate(runtime_id: RuntimeId, data: TypegateOperation, effect: Effect) -> Self { Self { runtime_id, effect, @@ -170,7 +170,7 @@ impl Materializer { } } - fn typegraph(runtime_id: RuntimeId, data: TypegraphOperation, effect: wit::Effect) -> Self { + fn typegraph(runtime_id: RuntimeId, data: TypegraphOperation, effect: Effect) -> Self { Self { runtime_id, effect, @@ -178,11 +178,7 @@ impl Materializer { } } - fn substantial( - runtime_id: RuntimeId, - data: SubstantialMaterializer, - effect: wit::Effect, - ) -> Self { + fn substantial(runtime_id: RuntimeId, data: SubstantialMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -190,7 +186,7 @@ impl Materializer { } } - fn kv(runtime_id: RuntimeId, data: KvMaterializer, effect: wit::Effect) -> Self { + fn kv(runtime_id: RuntimeId, data: KvMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -198,7 +194,7 @@ impl Materializer { } } - fn grpc(runtime_id: RuntimeId, data: GrpcMaterializer, effect: wit::Effect) -> Self { + fn grpc(runtime_id: RuntimeId, data: GrpcMaterializer, effect: Effect) -> Self { Self { runtime_id, effect, @@ -256,28 +252,28 @@ macro_rules! prisma_op { }}; ( $rt:expr, $model:expr, $fn:ident, $name:expr ) => { - prisma_op!($rt, $model, $fn, $name, WitEffect::Read) + prisma_op!($rt, $model, $fn, $name, Effect::Read) }; } -impl crate::wit::runtimes::Guest for crate::Lib { - fn get_deno_runtime() -> RuntimeId { - Store::get_deno_runtime() +impl crate::sdk::runtimes::Handler for crate::Lib { + fn get_deno_runtime() -> Result { + Ok(Store::get_deno_runtime()) } fn register_deno_func( - data: wit::MaterializerDenoFunc, - effect: wit::Effect, - ) -> Result { + data: rt::MaterializerDenoFunc, + effect: Effect, + ) -> Result { // TODO: check code is valid function? let mat = Materializer::deno(DenoMaterializer::Inline(data), effect); Ok(Store::register_materializer(mat)) } fn register_deno_static( - data: wit::MaterializerDenoStatic, + data: rt::MaterializerDenoStatic, type_id: CoreTypeId, - ) -> Result { + ) -> Result { validate_value( &serde_json::from_str::(&data.value).map_err(|e| e.to_string())?, type_id.into(), @@ -288,20 +284,18 @@ impl crate::wit::runtimes::Guest for crate::Lib { DenoMaterializer::Static(deno::MaterializerDenoStatic { value: serde_json::from_str(&data.value).map_err(|e| e.to_string())?, }), - wit::Effect::Read, + Effect::Read, ))) } - fn get_predefined_deno_func( - data: wit::MaterializerDenoPredefined, - ) -> Result { + fn get_predefined_deno_func(data: rt::MaterializerDenoPredefined) -> Result { Store::get_predefined_deno_function(data.name) } fn import_deno_function( - data: wit::MaterializerDenoImport, - effect: wit::Effect, - ) -> Result { + data: rt::MaterializerDenoImport, + effect: Effect, + ) -> Result { let module = Store::get_deno_module(data.module, data.deps); let data = MaterializerDenoImport { func_name: data.func_name, @@ -319,8 +313,8 @@ impl crate::wit::runtimes::Guest for crate::Lib { fn graphql_query( base: BaseMaterializer, - data: wit::MaterializerGraphqlQuery, - ) -> Result { + data: rt::MaterializerGraphqlQuery, + ) -> Result { let data = GraphqlMaterializer::Query(data); let mat = Materializer::graphql(base.runtime, data, base.effect); Ok(Store::register_materializer(mat)) @@ -328,92 +322,86 @@ impl crate::wit::runtimes::Guest for crate::Lib { fn graphql_mutation( base: BaseMaterializer, - data: wit::MaterializerGraphqlQuery, - ) -> Result { + data: rt::MaterializerGraphqlQuery, + ) -> Result { let data = GraphqlMaterializer::Mutation(data); let mat = Materializer::graphql(base.runtime, data, base.effect); Ok(Store::register_materializer(mat)) } - fn register_http_runtime(data: wit::HttpRuntimeData) -> Result { + fn register_http_runtime(data: rt::HttpRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Http(data.into()))) } fn http_request( - base: wit::BaseMaterializer, - data: wit::MaterializerHttpRequest, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerHttpRequest, + ) -> Result { let mat = Materializer::http(base.runtime, data, base.effect); Ok(Store::register_materializer(mat)) } - fn register_python_runtime() -> Result { + fn register_python_runtime() -> Result { Ok(Store::register_runtime(Runtime::Python)) } fn from_python_lambda( - base: wit::BaseMaterializer, - data: wit::MaterializerPythonLambda, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerPythonLambda, + ) -> Result { let mat = Materializer::python(base.runtime, PythonMaterializer::Lambda(data), base.effect); Ok(Store::register_materializer(mat)) } fn from_python_def( - base: wit::BaseMaterializer, - data: wit::MaterializerPythonDef, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerPythonDef, + ) -> Result { let mat = Materializer::python(base.runtime, PythonMaterializer::Def(data), base.effect); Ok(Store::register_materializer(mat)) } fn from_python_module( - base: wit::BaseMaterializer, - data: wit::MaterializerPythonModule, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerPythonModule, + ) -> Result { let mat = Materializer::python(base.runtime, PythonMaterializer::Module(data), base.effect); Ok(Store::register_materializer(mat)) } fn from_python_import( - base: wit::BaseMaterializer, - data: wit::MaterializerPythonImport, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerPythonImport, + ) -> Result { let mat = Materializer::python(base.runtime, PythonMaterializer::Import(data), base.effect); Ok(Store::register_materializer(mat)) } - fn register_random_runtime( - data: wit::RandomRuntimeData, - ) -> Result { + fn register_random_runtime(data: rt::RandomRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Random(data.into()))) } fn create_random_mat( - base: wit::BaseMaterializer, - data: wit::MaterializerRandom, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerRandom, + ) -> Result { let mat = Materializer::random(base.runtime, RandomMaterializer::Runtime(data), base.effect); Ok(Store::register_materializer(mat)) } - fn register_wasm_reflected_runtime( - data: wit::WasmRuntimeData, - ) -> Result { + fn register_wasm_reflected_runtime(data: rt::WasmRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::WasmReflected(data.into()))) } - fn register_wasm_wire_runtime( - data: wit::WasmRuntimeData, - ) -> Result { + fn register_wasm_wire_runtime(data: rt::WasmRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::WasmWire(data.into()))) } fn from_wasm_reflected_func( - base: wit::BaseMaterializer, - data: wit::MaterializerWasmReflectedFunc, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerWasmReflectedFunc, + ) -> Result { let mat = Materializer::wasm( base.runtime, WasmMaterializer::ReflectedFunc(data), @@ -423,9 +411,9 @@ impl crate::wit::runtimes::Guest for crate::Lib { } fn from_wasm_wire_handler( - base: wit::BaseMaterializer, - data: wit::MaterializerWasmWireHandler, - ) -> Result { + base: rt::BaseMaterializer, + data: rt::MaterializerWasmWireHandler, + ) -> Result { let mat = Materializer::wasm( base.runtime, WasmMaterializer::WireHandler(data), @@ -434,104 +422,92 @@ impl crate::wit::runtimes::Guest for crate::Lib { Ok(Store::register_materializer(mat)) } - fn register_prisma_runtime(data: wit::PrismaRuntimeData) -> Result { + fn register_prisma_runtime(data: rt::PrismaRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Prisma( data.into(), Default::default(), ))) } - fn prisma_find_unique(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_find_unique(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, FindUnique, "findUnique") } - fn prisma_find_many(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_find_many(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, FindMany, "findMany") } - fn prisma_find_first(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_find_first(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, FindFirst, "findFirst") } - fn prisma_aggregate(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_aggregate(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, Aggregate, "aggregate") } - fn prisma_count(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_count(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, Count, "count") } - fn prisma_group_by(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_group_by(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!(runtime, model, GroupBy, "groupBy") } - fn prisma_create_one(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_create_one(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!( runtime, model, CreateOne, "createOne", - WitEffect::Create(false) + Effect::Create(false) ) } - fn prisma_create_many(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_create_many(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!( runtime, model, CreateMany, "createMany", - WitEffect::Create(false) + Effect::Create(false) ) } - fn prisma_update_one(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_update_one(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!( runtime, model, UpdateOne, "updateOne", - WitEffect::Update(false) + Effect::Update(false) ) } - fn prisma_update_many(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_update_many(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!( runtime, model, UpdateMany, "updateMany", - WitEffect::Update(false) + Effect::Update(false) ) } - fn prisma_upsert_one(runtime: RuntimeId, model: CoreTypeId) -> Result { - prisma_op!( - runtime, - model, - UpsertOne, - "upsertOne", - WitEffect::Update(true) - ) + fn prisma_upsert_one(runtime: RuntimeId, model: CoreTypeId) -> Result { + prisma_op!(runtime, model, UpsertOne, "upsertOne", Effect::Update(true)) } - fn prisma_delete_one(runtime: RuntimeId, model: CoreTypeId) -> Result { - prisma_op!( - runtime, - model, - DeleteOne, - "deleteOne", - WitEffect::Delete(true) - ) + fn prisma_delete_one(runtime: RuntimeId, model: CoreTypeId) -> Result { + prisma_op!(runtime, model, DeleteOne, "deleteOne", Effect::Delete(true)) } - fn prisma_delete_many(runtime: RuntimeId, model: CoreTypeId) -> Result { + fn prisma_delete_many(runtime: RuntimeId, model: CoreTypeId) -> Result { prisma_op!( runtime, model, DeleteMany, "deleteMany", - WitEffect::Delete(true) + Effect::Delete(true) ) } @@ -539,8 +515,8 @@ impl crate::wit::runtimes::Guest for crate::Lib { runtime: RuntimeId, query: String, param: CoreTypeId, - effect: WitEffect, - ) -> Result { + effect: Effect, + ) -> Result { let types = { let ctx = get_prisma_context(runtime); let mut ctx = ctx.borrow_mut(); @@ -563,9 +539,9 @@ impl crate::wit::runtimes::Guest for crate::Lib { fn prisma_query_raw( runtime: RuntimeId, query: String, - param: Option, out: CoreTypeId, - ) -> Result { + param: Option, + ) -> Result { let types = { let ctx = get_prisma_context(runtime); let mut ctx = ctx.borrow_mut(); @@ -577,8 +553,7 @@ impl crate::wit::runtimes::Guest for crate::Lib { operation: "queryRaw".to_string(), ordered_keys: Some(proc.ordered_keys), }; - let mat_id = - Store::register_materializer(Materializer::prisma(runtime, mat, WitEffect::Read)); + let mat_id = Store::register_materializer(Materializer::prisma(runtime, mat, Effect::Read)); Ok(FuncParams { inp: types.input.into(), out: types.output.into(), @@ -586,7 +561,7 @@ impl crate::wit::runtimes::Guest for crate::Lib { }) } - fn prisma_link(data: PrismaLinkData) -> Result { + fn prisma_link(data: PrismaLinkData) -> Result { let mut builder = prisma_link(data.target_type.into())?; if let Some(name) = data.relationship_name { builder = builder.name(name); @@ -603,15 +578,15 @@ impl crate::wit::runtimes::Guest for crate::Lib { Ok(builder.build()?.into()) } - fn prisma_migration(operation: PrismaMigrationOperation) -> Result { + fn prisma_migration(operation: PrismaMigrationOperation) -> Result { use PrismaMigrationOperation as Op; let (effect, (inp, out)) = match operation { - Op::Diff => (WitEffect::Read, prisma_diff()?), - Op::Create => (WitEffect::Create(false), prisma_create()?), - Op::Apply => (WitEffect::Update(false), prisma_apply()?), - Op::Deploy => (WitEffect::Update(true), prisma_deploy()?), - Op::Reset => (WitEffect::Delete(true), prisma_reset()?), + Op::Diff => (Effect::Read, prisma_diff()?), + Op::Create => (Effect::Create(false), prisma_create()?), + Op::Apply => (Effect::Update(false), prisma_apply()?), + Op::Deploy => (Effect::Update(true), prisma_deploy()?), + Op::Reset => (Effect::Delete(true), prisma_reset()?), }; let mat_id = Store::register_materializer(Materializer::prisma_migrate( @@ -627,37 +602,35 @@ impl crate::wit::runtimes::Guest for crate::Lib { }) } - fn register_temporal_runtime(data: TemporalRuntimeData) -> Result { + fn register_temporal_runtime(data: TemporalRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Temporal(data.into()))) } fn generate_temporal_operation( runtime: RuntimeId, data: TemporalOperationData, - ) -> Result { + ) -> Result { temporal_operation(runtime, data) } - fn register_typegate_materializer( - operation: wit::TypegateOperation, - ) -> Result { - use wit::TypegateOperation as WitOp; + fn register_typegate_materializer(operation: rt::TypegateOperation) -> Result { + use rt::TypegateOperation as SdkOP; use TypegateOperation as Op; let (effect, op) = match operation { - WitOp::ListTypegraphs => (WitEffect::Read, Op::ListTypegraphs), - WitOp::FindTypegraph => (WitEffect::Read, Op::FindTypegraph), - WitOp::AddTypegraph => (WitEffect::Create(true), Op::AddTypegraph), - WitOp::RemoveTypegraphs => (WitEffect::Delete(true), Op::RemoveTypegraphs), - WitOp::GetSerializedTypegraph => (WitEffect::Read, Op::GetSerializedTypegraph), - WitOp::GetArgInfoByPath => (WitEffect::Read, Op::GetArgInfoByPath), - WitOp::FindAvailableOperations => (WitEffect::Read, Op::FindAvailableOperations), - WitOp::FindPrismaModels => (WitEffect::Read, Op::FindPrismaModels), - WitOp::RawPrismaRead => (WitEffect::Read, Op::RawPrismaQuery), - WitOp::RawPrismaCreate => (WitEffect::Create(false), Op::RawPrismaQuery), - WitOp::RawPrismaUpdate => (WitEffect::Update(false), Op::RawPrismaQuery), - WitOp::RawPrismaDelete => (WitEffect::Delete(true), Op::RawPrismaQuery), - WitOp::QueryPrismaModel => (WitEffect::Read, Op::QueryPrismaModel), + SdkOP::ListTypegraphs => (Effect::Read, Op::ListTypegraphs), + SdkOP::FindTypegraph => (Effect::Read, Op::FindTypegraph), + SdkOP::AddTypegraph => (Effect::Create(true), Op::AddTypegraph), + SdkOP::RemoveTypegraphs => (Effect::Delete(true), Op::RemoveTypegraphs), + SdkOP::GetSerializedTypegraph => (Effect::Read, Op::GetSerializedTypegraph), + SdkOP::GetArgInfoByPath => (Effect::Read, Op::GetArgInfoByPath), + SdkOP::FindAvailableOperations => (Effect::Read, Op::FindAvailableOperations), + SdkOP::FindPrismaModels => (Effect::Read, Op::FindPrismaModels), + SdkOP::RawPrismaRead => (Effect::Read, Op::RawPrismaQuery), + SdkOP::RawPrismaCreate => (Effect::Create(false), Op::RawPrismaQuery), + SdkOP::RawPrismaUpdate => (Effect::Update(false), Op::RawPrismaQuery), + SdkOP::RawPrismaDelete => (Effect::Delete(true), Op::RawPrismaQuery), + SdkOP::QueryPrismaModel => (Effect::Read, Op::QueryPrismaModel), }; Ok(Store::register_materializer(Materializer::typegate( @@ -668,15 +641,15 @@ impl crate::wit::runtimes::Guest for crate::Lib { } fn register_typegraph_materializer( - operation: wit::TypegraphOperation, - ) -> Result { - use wit::TypegraphOperation as WitOp; + operation: rt::TypegraphOperation, + ) -> Result { + use rt::TypegraphOperation as SdkOP; use TypegraphOperation as Op; let (effect, op) = match operation { - WitOp::Resolver => (WitEffect::Read, Op::Resolver), - WitOp::GetType => (WitEffect::Read, Op::GetType), - WitOp::GetSchema => (WitEffect::Read, Op::GetSchema), + SdkOP::Resolver => (Effect::Read, Op::Resolver), + SdkOP::GetType => (Effect::Read, Op::GetType), + SdkOP::GetSchema => (Effect::Read, Op::GetSchema), }; Ok(Store::register_materializer(Materializer::typegraph( @@ -686,32 +659,27 @@ impl crate::wit::runtimes::Guest for crate::Lib { ))) } - fn register_substantial_runtime( - data: wit::SubstantialRuntimeData, - ) -> Result { + fn register_substantial_runtime(data: rt::SubstantialRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Substantial(data.into()))) } fn generate_substantial_operation( runtime: RuntimeId, - data: wit::SubstantialOperationData, - ) -> Result { + data: rt::SubstantialOperationData, + ) -> Result { substantial_operation(runtime, data) } - fn register_kv_runtime(data: KvRuntimeData) -> Result { + fn register_kv_runtime(data: KvRuntimeData) -> Result { Ok(Store::register_runtime(Runtime::Kv(data.into()))) } - fn kv_operation( - base: BaseMaterializer, - data: KvMaterializer, - ) -> Result { + fn kv_operation(base: BaseMaterializer, data: KvMaterializer) -> Result { let mat = Materializer::kv(base.runtime, data, base.effect); Ok(Store::register_materializer(mat)) } - fn register_grpc_runtime(data: GrpcRuntimeData) -> Result { + fn register_grpc_runtime(data: GrpcRuntimeData) -> Result { let fs_ctx = FsContext::new(current_typegraph_dir()?); let proto_file = fs_ctx.read_text_file(Path::new(&data.proto_file))?; let data = GrpcRuntimeData { proto_file, ..data }; @@ -719,7 +687,7 @@ impl crate::wit::runtimes::Guest for crate::Lib { Ok(Store::register_runtime(Runtime::Grpc(data.into()))) } - fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result { + fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result { call_grpc_method(runtime, data) } } diff --git a/src/typegraph/core/src/runtimes/prisma/context.rs b/src/typegraph/core/src/runtimes/prisma/context.rs index 6b55be95e3..faba46aafe 100644 --- a/src/typegraph/core/src/runtimes/prisma/context.rs +++ b/src/typegraph/core/src/runtimes/prisma/context.rs @@ -10,7 +10,7 @@ use super::{ }; use crate::errors::Result; use crate::types::TypeId; -use crate::{typegraph::TypegraphContext, wit::runtimes as wit}; +use crate::{sdk::runtimes as sdk, typegraph::TypegraphContext}; use common::typegraph::runtimes::prisma as cm; use indexmap::{map::Entry, IndexMap, IndexSet}; use std::{ @@ -331,7 +331,7 @@ impl PrismaContext { pub fn convert( &self, ctx: &mut TypegraphContext, - data: Rc, + data: Rc, ) -> Result { Ok(cm::PrismaRuntimeData { name: data.name.clone(), diff --git a/src/typegraph/core/src/runtimes/prisma/errors.rs b/src/typegraph/core/src/runtimes/prisma/errors.rs index c7ae676d40..1424598050 100644 --- a/src/typegraph/core/src/runtimes/prisma/errors.rs +++ b/src/typegraph/core/src/runtimes/prisma/errors.rs @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::{types::TypeId, wit::core::Error}; +use crate::{sdk::core::Error, types::TypeId}; // pub fn relationship_not_found(source_model: &str, field: &str) -> Error { // format!("relationship target not found for {source_model}::{field}") diff --git a/src/typegraph/core/src/runtimes/prisma/migration.rs b/src/typegraph/core/src/runtimes/prisma/migration.rs index 5268b99373..3c96765fed 100644 --- a/src/typegraph/core/src/runtimes/prisma/migration.rs +++ b/src/typegraph/core/src/runtimes/prisma/migration.rs @@ -6,11 +6,11 @@ use indexmap::IndexMap; use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; +use crate::sdk::core::RuntimeId; +use crate::sdk::runtimes::{Effect, PrismaMigrationOperation}; use crate::t::{self, StructBuilder, TypeBuilder}; use crate::typegraph::TypegraphContext; use crate::types::TypeId; -use crate::wit::core::RuntimeId; -use crate::wit::runtimes::{Effect, PrismaMigrationOperation}; impl MaterializerConverter for PrismaMigrationOperation { fn convert( diff --git a/src/typegraph/core/src/runtimes/prisma/mod.rs b/src/typegraph/core/src/runtimes/prisma/mod.rs index 91c3d0870f..4d1a3695f5 100644 --- a/src/typegraph/core/src/runtimes/prisma/mod.rs +++ b/src/typegraph/core/src/runtimes/prisma/mod.rs @@ -21,8 +21,11 @@ use indexmap::IndexMap; use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; use crate::global_store::Store; +use crate::sdk::{ + core::RuntimeId, + runtimes::{self as sdk}, +}; use crate::typegraph::TypegraphContext; -use crate::wit::runtimes::{self as wit, RuntimeId}; use self::context::PrismaContext; use self::relationship::Cardinality; @@ -48,7 +51,7 @@ impl MaterializerConverter for PrismaMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: wit::Effect, + effect: sdk::Effect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; let mut data = IndexMap::new(); diff --git a/src/typegraph/core/src/runtimes/prisma/model.rs b/src/typegraph/core/src/runtimes/prisma/model.rs index 84b2bdf6e6..f7e72b5a03 100644 --- a/src/typegraph/core/src/runtimes/prisma/model.rs +++ b/src/typegraph/core/src/runtimes/prisma/model.rs @@ -132,7 +132,7 @@ pub struct Model { } impl TryFrom for Model { - type Error = crate::wit::core::Error; + type Error = crate::sdk::core::Error; fn try_from(type_id: TypeId) -> Result { let model_type = ModelType::try_from(type_id)?; diff --git a/src/typegraph/core/src/runtimes/python.rs b/src/typegraph/core/src/runtimes/python.rs index 79819d3e51..c1985d68a3 100644 --- a/src/typegraph/core/src/runtimes/python.rs +++ b/src/typegraph/core/src/runtimes/python.rs @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::wit::runtimes::{self as wit}; +use crate::sdk::runtimes::{self as sdk}; #[derive(Debug)] pub enum PythonMaterializer { - Lambda(wit::MaterializerPythonLambda), - Def(wit::MaterializerPythonDef), - Module(wit::MaterializerPythonModule), - Import(wit::MaterializerPythonImport), + Lambda(sdk::MaterializerPythonLambda), + Def(sdk::MaterializerPythonDef), + Module(sdk::MaterializerPythonModule), + Import(sdk::MaterializerPythonImport), } diff --git a/src/typegraph/core/src/runtimes/random.rs b/src/typegraph/core/src/runtimes/random.rs index 89598ff589..6c03bed43d 100644 --- a/src/typegraph/core/src/runtimes/random.rs +++ b/src/typegraph/core/src/runtimes/random.rs @@ -3,15 +3,15 @@ use crate::{ errors::Result, + sdk::runtimes as sdk, types::{AsTypeDefEx as _, FindAttribute as _, TypeDef, TypeId}, - wit::runtimes as wit, }; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; #[derive(Debug)] pub enum RandomMaterializer { - Runtime(wit::MaterializerRandom), + Runtime(sdk::MaterializerRandom), } #[derive(Debug, Serialize)] diff --git a/src/typegraph/core/src/runtimes/substantial.rs b/src/typegraph/core/src/runtimes/substantial.rs index 552cd78f85..7e378700ab 100644 --- a/src/typegraph/core/src/runtimes/substantial.rs +++ b/src/typegraph/core/src/runtimes/substantial.rs @@ -4,14 +4,14 @@ use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; use crate::global_store::Store; +use crate::sdk::core::FuncParams; +use crate::sdk::{ + core::RuntimeId, runtimes::Effect, runtimes::SubstantialOperationData, + runtimes::SubstantialOperationType, +}; use crate::t::{self, TypeBuilder}; use crate::typegraph::TypegraphContext; use crate::types::WithRuntimeConfig; -use crate::wit::core::FuncParams; -use crate::wit::{ - core::RuntimeId, runtimes::Effect as WitEffect, runtimes::SubstantialOperationData, - runtimes::SubstantialOperationType, -}; use common::typegraph::Materializer; use serde_json::json; @@ -33,7 +33,7 @@ impl MaterializerConverter for SubstantialMaterializer { &self, c: &mut TypegraphContext, runtime_id: RuntimeId, - effect: WitEffect, + effect: Effect, ) -> Result { let runtime = c.register_runtime(runtime_id)?; @@ -79,13 +79,13 @@ pub fn substantial_operation( use_arg_or_json_string(data.func_arg, flag)?.into(), ); - (WitEffect::Create(true), mat, t::string().build()?) + (Effect::Create(true), mat, t::string().build()?) } SubstantialOperationType::Stop => { inp.prop("run_id", t::string().build()?); ( - WitEffect::Create(false), + Effect::Create(false), SubstantialMaterializer::Stop, t::list(t::string().build()?).build()?, ) @@ -108,7 +108,7 @@ pub fn substantial_operation( inp.prop("run_id", t::string().build()?); inp.prop("event", event); - (WitEffect::Create(false), mat, t::string().build()?) + (Effect::Create(false), mat, t::string().build()?) } SubstantialOperationType::Resources => { inp.prop("name", t::string().build()?); @@ -127,7 +127,7 @@ pub fn substantial_operation( .prop("running", t::list(row).build()?) .build()?; - (WitEffect::Read, SubstantialMaterializer::Resources, out) + (Effect::Read, SubstantialMaterializer::Resources, out) } SubstantialOperationType::Results | SubstantialOperationType::ResultsRaw => { let (mat, flag) = match data.operation { @@ -167,7 +167,7 @@ pub fn substantial_operation( .build()?; ( - WitEffect::Read, + Effect::Read, mat, t::struct_() .prop( @@ -192,7 +192,7 @@ pub fn substantial_operation( inp.prop("child_run_id", t::string().build()?); ( - WitEffect::Create(true), + Effect::Create(true), SubstantialMaterializer::InternalLinkParentChild, t::boolean().build()?, ) diff --git a/src/typegraph/core/src/runtimes/temporal.rs b/src/typegraph/core/src/runtimes/temporal.rs index bba6e65a1a..8054714b5a 100644 --- a/src/typegraph/core/src/runtimes/temporal.rs +++ b/src/typegraph/core/src/runtimes/temporal.rs @@ -4,11 +4,11 @@ use super::Materializer; use crate::errors::Result; use crate::global_store::Store; +use crate::sdk::core::{FuncParams, RuntimeId}; +use crate::sdk::runtimes::Effect; +use crate::sdk::runtimes::{TemporalOperationData, TemporalOperationType}; use crate::t; use crate::t::TypeBuilder; -use crate::wit::core::FuncParams; -use crate::wit::runtimes::Effect as WitEffect; -use crate::wit::runtimes::{RuntimeId, TemporalOperationData, TemporalOperationType}; #[derive(Debug)] pub enum TemporalMaterializer { @@ -32,7 +32,7 @@ pub fn temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Re inp.prop("task_queue", t::string().build()?); inp.prop("args", t::list(arg.into()).build()?); ( - WitEffect::Create(false), + Effect::Create(false), TemporalMaterializer::Start { workflow_type: mat_arg, }, @@ -50,7 +50,7 @@ pub fn temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Re inp.prop("run_id", t::string().build()?); inp.prop("args", t::list(arg.into()).build()?); ( - WitEffect::Update(false), + Effect::Update(false), TemporalMaterializer::Signal { signal_name: mat_arg, }, @@ -68,7 +68,7 @@ pub fn temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Re inp.prop("run_id", t::string().build()?); inp.prop("args", t::list(arg.into()).build()?); ( - WitEffect::Read, + Effect::Read, TemporalMaterializer::Query { query_type: mat_arg, }, @@ -94,7 +94,7 @@ pub fn temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Re ), ]); ( - WitEffect::Read, + Effect::Read, TemporalMaterializer::Describe, out_ty.build()?, ) diff --git a/src/typegraph/core/src/runtimes/typegate.rs b/src/typegraph/core/src/runtimes/typegate.rs index 61d3518825..a12408b421 100644 --- a/src/typegraph/core/src/runtimes/typegate.rs +++ b/src/typegraph/core/src/runtimes/typegate.rs @@ -5,8 +5,8 @@ use common::typegraph::Materializer; use indexmap::IndexMap; use crate::{ - conversion::runtimes::MaterializerConverter, errors::Result, typegraph::TypegraphContext, - wit::runtimes::Effect, + conversion::runtimes::MaterializerConverter, errors::Result, sdk::runtimes::Effect, + typegraph::TypegraphContext, }; #[derive(Clone, Debug)] diff --git a/src/typegraph/core/src/runtimes/typegraph.rs b/src/typegraph/core/src/runtimes/typegraph.rs index a8cd63d53f..c9d4215005 100644 --- a/src/typegraph/core/src/runtimes/typegraph.rs +++ b/src/typegraph/core/src/runtimes/typegraph.rs @@ -5,8 +5,8 @@ use common::typegraph::Materializer; use indexmap::IndexMap; use crate::{ - conversion::runtimes::MaterializerConverter, errors::Result, typegraph::TypegraphContext, - wit::runtimes::Effect, + conversion::runtimes::MaterializerConverter, errors::Result, sdk::runtimes::Effect, + typegraph::TypegraphContext, }; #[derive(Clone, Debug)] diff --git a/src/typegraph/core/src/runtimes/wasm.rs b/src/typegraph/core/src/runtimes/wasm.rs index dc92261af4..e6c817245c 100644 --- a/src/typegraph/core/src/runtimes/wasm.rs +++ b/src/typegraph/core/src/runtimes/wasm.rs @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::wit::runtimes as wit; +use crate::sdk::runtimes as sdk; #[derive(Debug)] pub enum WasmMaterializer { - ReflectedFunc(wit::MaterializerWasmReflectedFunc), - WireHandler(wit::MaterializerWasmWireHandler), + ReflectedFunc(sdk::MaterializerWasmReflectedFunc), + WireHandler(sdk::MaterializerWasmWireHandler), } diff --git a/src/typegraph/core/src/t.rs b/src/typegraph/core/src/t.rs index 40e06b1fa0..2fe7832d58 100644 --- a/src/typegraph/core/src/t.rs +++ b/src/typegraph/core/src/t.rs @@ -3,14 +3,14 @@ use crate::errors::Result; use crate::errors::TgError; +use crate::sdk::core::{ + Handler, TypeEither, TypeFloat, TypeFunc, TypeInteger, TypeList, TypeOptional, TypeString, + TypeStruct, TypeUnion, +}; use crate::types::RefAttr; use crate::types::TypeRefBuilder; use crate::types::{Named as _, TypeId, TypeRef}; -use crate::wit::core::{ - Guest, TypeEither, TypeFloat, TypeFunc, TypeInteger, TypeList, TypeOptional, TypeString, - TypeStruct, TypeUnion, -}; #[cfg(test)] use common::typegraph::{Injection, InjectionData, SingleValue}; diff --git a/src/typegraph/core/src/test_utils.rs b/src/typegraph/core/src/test_utils.rs index 2bfae8cc02..5d8e144a40 100644 --- a/src/typegraph/core/src/test_utils.rs +++ b/src/typegraph/core/src/test_utils.rs @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -pub(crate) use crate::wit::runtimes::{Effect, MaterializerDenoFunc}; +pub(crate) use crate::sdk::runtimes::{Effect, MaterializerDenoFunc}; impl MaterializerDenoFunc { pub fn with_code(code: impl Into) -> Self { @@ -69,9 +69,9 @@ pub mod models { } pub fn setup(name: Option<&str>) -> crate::errors::Result<()> { - use crate::wit::core::Guest; + use crate::sdk::core::Handler; - crate::Lib::init_typegraph(crate::wit::core::TypegraphInitParams { + crate::Lib::init_typegraph(crate::sdk::core::TypegraphInitParams { name: name .map(|n| n.to_string()) .unwrap_or_else(|| "test".to_string()), diff --git a/src/typegraph/core/src/typedef/either.rs b/src/typegraph/core/src/typedef/either.rs index afae92ca06..8175932d29 100644 --- a/src/typegraph/core/src/typedef/either.rs +++ b/src/typegraph/core/src/typedef/either.rs @@ -12,9 +12,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeEither, typegraph::TypegraphContext, types::{Either, ExtendedTypeDef, FindAttribute as _, TypeDefData, TypeId}, - wit::core::TypeEither, }; impl TypeConversion for Either { diff --git a/src/typegraph/core/src/typedef/file.rs b/src/typegraph/core/src/typedef/file.rs index f1550a63af..2ff208e769 100644 --- a/src/typegraph/core/src/typedef/file.rs +++ b/src/typegraph/core/src/typedef/file.rs @@ -8,9 +8,9 @@ use common::typegraph::{FileTypeData, TypeNode}; use crate::conversion::hash::Hashable; use crate::conversion::types::{BaseBuilderInit, TypeConversion}; use crate::errors::Result; +use crate::sdk::core::TypeFile; use crate::typegraph::TypegraphContext; use crate::types::{ExtendedTypeDef, File, FindAttribute as _, TypeDefData}; -use crate::wit::core::TypeFile; impl TypeDefData for TypeFile { fn get_display_params_into(&self, params: &mut Vec) { diff --git a/src/typegraph/core/src/typedef/float.rs b/src/typegraph/core/src/typedef/float.rs index d7e5f24891..82173625ef 100644 --- a/src/typegraph/core/src/typedef/float.rs +++ b/src/typegraph/core/src/typedef/float.rs @@ -13,9 +13,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeFloat, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, Float, TypeDefData}, - wit::core::TypeFloat, }; impl TypeConversion for Float { diff --git a/src/typegraph/core/src/typedef/func.rs b/src/typegraph/core/src/typedef/func.rs index d04a8aa2c2..72cc4f40ba 100644 --- a/src/typegraph/core/src/typedef/func.rs +++ b/src/typegraph/core/src/typedef/func.rs @@ -9,12 +9,12 @@ use crate::global_store::Store; use crate::params::apply::ParameterTransformNode; use crate::runtimes::random::collect_random_runtime_config; use crate::runtimes::Runtime; +use crate::sdk::core::TypeFunc; use crate::typegraph::TypegraphContext; use crate::types::{ AsTypeDefEx as _, ExtendedTypeDef, FindAttribute as _, Func, InjectionTree, RefAttr, Struct, TypeDef, TypeDefData, TypeId, }; -use crate::wit::core::TypeFunc; use common::typegraph::{ parameter_transform::FunctionParameterTransform, FunctionTypeData, TypeNode, }; diff --git a/src/typegraph/core/src/typedef/integer.rs b/src/typegraph/core/src/typedef/integer.rs index 5108b8573b..9653f429ea 100644 --- a/src/typegraph/core/src/typedef/integer.rs +++ b/src/typegraph/core/src/typedef/integer.rs @@ -12,9 +12,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeInteger, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, Integer, TypeDefData}, - wit::core::TypeInteger, }; impl TypeConversion for Integer { diff --git a/src/typegraph/core/src/typedef/list.rs b/src/typegraph/core/src/typedef/list.rs index 069cb79faf..2cfdfd4697 100644 --- a/src/typegraph/core/src/typedef/list.rs +++ b/src/typegraph/core/src/typedef/list.rs @@ -11,9 +11,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors::Result, + sdk::core::TypeList, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, List, TypeDefData, TypeId}, - wit::core::TypeList, }; impl TypeConversion for List { diff --git a/src/typegraph/core/src/typedef/optional.rs b/src/typegraph/core/src/typedef/optional.rs index 77f650838a..c4d4e73e08 100644 --- a/src/typegraph/core/src/typedef/optional.rs +++ b/src/typegraph/core/src/typedef/optional.rs @@ -12,9 +12,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeOptional, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, Optional, TypeDefData, TypeId}, - wit::core::TypeOptional, }; impl TypeConversion for Optional { diff --git a/src/typegraph/core/src/typedef/string.rs b/src/typegraph/core/src/typedef/string.rs index 49afb6f13f..47aea461df 100644 --- a/src/typegraph/core/src/typedef/string.rs +++ b/src/typegraph/core/src/typedef/string.rs @@ -12,9 +12,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeString, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, StringT, TypeDefData}, - wit::core::TypeString, }; impl TypeConversion for StringT { diff --git a/src/typegraph/core/src/typedef/struct_.rs b/src/typegraph/core/src/typedef/struct_.rs index c1481bcba5..3b9bfa4dcb 100644 --- a/src/typegraph/core/src/typedef/struct_.rs +++ b/src/typegraph/core/src/typedef/struct_.rs @@ -6,7 +6,7 @@ use crate::conversion::types::{BaseBuilderInit, TypeConversion}; use crate::types::{ AsTypeDefEx as _, ExtendedTypeDef, FindAttribute as _, IdKind, Struct, TypeDefData, TypeId, }; -use crate::{errors, typegraph::TypegraphContext, wit::core::TypeStruct}; +use crate::{errors, sdk::core::TypeStruct, typegraph::TypegraphContext}; use common::typegraph::{ObjectTypeData, TypeNode}; use errors::Result; use indexmap::IndexMap; diff --git a/src/typegraph/core/src/typedef/union.rs b/src/typegraph/core/src/typedef/union.rs index c037202fcd..00eb124b10 100644 --- a/src/typegraph/core/src/typedef/union.rs +++ b/src/typegraph/core/src/typedef/union.rs @@ -12,9 +12,9 @@ use crate::{ types::{BaseBuilderInit, TypeConversion}, }, errors, + sdk::core::TypeUnion, typegraph::TypegraphContext, types::{ExtendedTypeDef, FindAttribute as _, TypeDefData, TypeId, Union}, - wit::core::TypeUnion, }; impl TypeConversion for Union { diff --git a/src/typegraph/core/src/typegraph.rs b/src/typegraph/core/src/typegraph.rs index e9f7b79ae7..b9eee9c753 100644 --- a/src/typegraph/core/src/typegraph.rs +++ b/src/typegraph/core/src/typegraph.rs @@ -28,8 +28,8 @@ use std::hash::Hasher as _; use std::path::{Path, PathBuf}; use std::rc::Rc; -use crate::wit::core::{ - Artifact as WitArtifact, Error as TgError, MaterializerId, PolicyId, RuntimeId, +use crate::sdk::core::{ + Artifact as SdkArtifact, Error as TgError, MaterializerId, PolicyId, RuntimeId, SerializeParams, TypegraphInitParams, }; @@ -182,7 +182,7 @@ pub fn finalize_auths(ctx: &mut TypegraphContext) -> Result>>() } -pub fn serialize(params: SerializeParams) -> Result<(String, Vec)> { +pub fn serialize(params: SerializeParams) -> Result<(String, Vec)> { #[cfg(test)] eprintln!("Serializing typegraph..."); @@ -281,7 +281,7 @@ fn ensure_valid_export(export_key: String, type_id: TypeId) -> Result<()> { pub fn expose( fields: Vec<(String, TypeId)>, - default_policy: Option>, + default_policy: Option>, ) -> Result<()> { let fields = fields .into_iter() diff --git a/src/typegraph/core/src/types/mod.rs b/src/typegraph/core/src/types/mod.rs index b54916918a..a4e80729e3 100644 --- a/src/typegraph/core/src/types/mod.rs +++ b/src/typegraph/core/src/types/mod.rs @@ -1,6 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 +pub mod sdk; pub mod type_def; pub mod type_id; pub mod type_ref; diff --git a/src/typegraph/core/src/types/sdk/aws.rs b/src/typegraph/core/src/types/sdk/aws.rs new file mode 100644 index 0000000000..f39fa4155e --- /dev/null +++ b/src/typegraph/core/src/types/sdk/aws.rs @@ -0,0 +1,33 @@ +use serde::{Serialize, Deserialize}; +use super::core::{MaterializerId, RuntimeId}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct S3RuntimeData { + pub host_secret: String, + pub region_secret: String, + pub access_key_secret: String, + pub secret_key_secret: String, + pub path_style_secret: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct S3PresignGetParams { + pub bucket: String, + pub expiry_secs: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct S3PresignPutParams { + pub bucket: String, + pub expiry_secs: Option, + pub content_type: Option, +} + +pub trait Handler { + fn register_s3_runtime(data: S3RuntimeData) -> Result; + fn s3_presign_get(runtime: RuntimeId, data: S3PresignGetParams) -> Result; + fn s3_presign_put(runtime: RuntimeId, data: S3PresignPutParams) -> Result; + fn s3_list(runtime: RuntimeId, bucket: String) -> Result; + fn s3_upload(runtime: RuntimeId, bucket: String) -> Result; + fn s3_upload_all(runtime: RuntimeId, bucket: String) -> Result; +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/core.rs b/src/typegraph/core/src/types/sdk/core.rs new file mode 100644 index 0000000000..b53b4de861 --- /dev/null +++ b/src/typegraph/core/src/types/sdk/core.rs @@ -0,0 +1,249 @@ +use serde::{Serialize, Deserialize}; + + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Error { + pub stack: Vec, +} + +pub type TypeId = u32; + +pub type RuntimeId = u32; + +pub type MaterializerId = u32; + +pub type PolicyId = u32; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Cors { + pub allow_origin: Vec, + pub allow_headers: Vec, + pub expose_headers: Vec, + pub allow_methods: Vec, + pub allow_credentials: bool, + pub max_age_sec: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Rate { + pub window_limit: u32, + pub window_sec: u32, + pub query_limit: u32, + pub context_identifier: Option, + pub local_excess: u32, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypegraphInitParams { + pub name: String, + pub dynamic: Option, + pub path: String, + pub prefix: Option, + pub cors: Cors, + pub rate: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Artifact { + pub path: String, + pub hash: String, + pub size: u32, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MigrationAction { + pub apply: bool, + pub create: bool, + pub reset: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PrismaMigrationConfig { + pub migrations_dir: String, + pub migration_actions: Vec<(String, MigrationAction)>, + pub default_migration_action: MigrationAction, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SerializeParams { + pub typegraph_path: String, + pub prefix: Option, + pub artifact_resolution: bool, + pub codegen: bool, + pub prisma_migration: PrismaMigrationConfig, + pub pretty: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeProxy { + pub name: String, + pub extras: Vec<(String, String)>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeInteger { + pub min: Option, + pub max: Option, + pub exclusive_minimum: Option, + pub exclusive_maximum: Option, + pub multiple_of: Option, + pub enumeration: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeFloat { + pub min: Option, + pub max: Option, + pub exclusive_minimum: Option, + pub exclusive_maximum: Option, + pub multiple_of: Option, + pub enumeration: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeString { + pub max: Option, + pub min: Option, + pub format: Option, + pub pattern: Option, + pub enumeration: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeFile { + pub min: Option, + pub max: Option, + pub allow: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeList { + pub of: TypeId, + pub min: Option, + pub max: Option, + pub unique_items: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeOptional { + pub of: TypeId, + pub default_item: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeUnion { + pub variants: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeEither { + pub variants: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeStruct { + pub props: Vec<(String, TypeId)>, + pub additional_props: bool, + pub min: Option, + pub max: Option, + pub enumeration: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ValueSource { + Raw(String), + Context(String), + Secret(String), + Parent(String), + Param(String), +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ParameterTransform { + pub resolver_input: TypeId, + pub transform_tree: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TypeFunc { + pub inp: TypeId, + pub parameter_transform: Option, + pub out: TypeId, + pub mat: MaterializerId, + pub rate_calls: bool, + pub rate_weight: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TransformData { + pub query_input: TypeId, + pub parameter_transform: ParameterTransform, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Policy { + pub name: String, + pub materializer: MaterializerId, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PolicyPerEffect { + pub read: Option, + pub create: Option, + pub update: Option, + pub delete: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum PolicySpec { + Simple(PolicyId), + PerEffect(PolicyPerEffect), +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ContextCheck { + NotNull, + Value(String), + Pattern(String), +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct FuncParams { + pub inp: TypeId, + pub out: TypeId, + pub mat: MaterializerId, +} + +pub trait Handler { + fn init_typegraph(params: TypegraphInitParams) -> Result<(), super::Error>; + fn serialize_typegraph(params: SerializeParams) -> Result<(String, Vec), super::Error>; + fn with_injection(type_id: TypeId, injection: String) -> Result; + fn with_config(type_id: TypeId, config: String) -> Result; + fn refb(name: String, attributes: Option) -> Result; + fn floatb(data: TypeFloat) -> Result; + fn integerb(data: TypeInteger) -> Result; + fn booleanb() -> Result; + fn stringb(data: TypeString) -> Result; + fn as_id(id: TypeId, composite: bool) -> Result; + fn fileb(data: TypeFile) -> Result; + fn listb(data: TypeList) -> Result; + fn optionalb(data: TypeOptional) -> Result; + fn unionb(data: TypeUnion) -> Result; + fn eitherb(data: TypeEither) -> Result; + fn structb(data: TypeStruct) -> Result; + fn extend_struct(tpe: TypeId, props: Vec<(String, TypeId)>) -> Result; + fn get_type_repr(id: TypeId) -> Result; + fn funcb(data: TypeFunc) -> Result; + fn get_transform_data(resolver_input: TypeId, transform_tree: String) -> Result; + fn register_policy(pol: Policy) -> Result; + fn with_policy(type_id: TypeId, policy_chain: Vec) -> Result; + fn get_public_policy() -> Result<(PolicyId, String), super::Error>; + fn get_internal_policy() -> Result<(PolicyId, String), super::Error>; + fn register_context_policy(key: String, check: ContextCheck) -> Result<(PolicyId, String), super::Error>; + fn rename_type(tpe: TypeId, new_name: String) -> Result; + fn expose(fns: Vec<(String, TypeId)>, default_policy: Option>) -> Result<(), super::Error>; + fn set_seed(seed: Option) -> Result<(), super::Error>; +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs new file mode 100644 index 0000000000..9558c92812 --- /dev/null +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -0,0 +1,4 @@ +pub mod core; +pub mod runtimes; +pub mod aws; +pub mod utils;pub use core::Error; \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs new file mode 100644 index 0000000000..95c9644727 --- /dev/null +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -0,0 +1,343 @@ +use serde::{Serialize, Deserialize}; +use super::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; + +pub type Idempotency = bool; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum Effect { + Read, + Create(Idempotency), + Update(Idempotency), + Delete(Idempotency), +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct BaseMaterializer { + pub runtime: RuntimeId, + pub effect: Effect, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerDenoFunc { + pub code: String, + pub secrets: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerDenoStatic { + pub value: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerDenoPredefined { + pub name: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerDenoImport { + pub func_name: String, + pub module: String, + pub deps: Vec, + pub secrets: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct GraphqlRuntimeData { + pub endpoint: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerGraphqlQuery { + pub path: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct HttpRuntimeData { + pub endpoint: String, + pub cert_secret: Option, + pub basic_auth_secret: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum HttpMethod { + Get, + Post, + Put, + Patch, + Delete, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerHttpRequest { + pub method: HttpMethod, + pub path: String, + pub content_type: Option, + pub header_prefix: Option, + pub query_fields: Option>, + pub rename_fields: Option>, + pub body_fields: Option>, + pub auth_token_field: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerPythonDef { + pub runtime: RuntimeId, + pub name: String, + pub fn_: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerPythonLambda { + pub runtime: RuntimeId, + pub fn_: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerPythonModule { + pub runtime: RuntimeId, + pub file: String, + pub deps: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerPythonImport { + pub module: u32, + pub func_name: String, + pub secrets: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct RandomRuntimeData { + pub seed: Option, + pub reset: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerRandom { + pub runtime: RuntimeId, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct WasmRuntimeData { + pub wasm_artifact: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerWasmReflectedFunc { + pub func_name: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MaterializerWasmWireHandler { + pub func_name: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PrismaRuntimeData { + pub name: String, + pub connection_string_secret: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PrismaLinkData { + pub target_type: TypeId, + pub relationship_name: Option, + pub foreign_key: Option, + pub target_field: Option, + pub unique: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum PrismaMigrationOperation { + Diff, + Create, + Apply, + Deploy, + Reset, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TemporalRuntimeData { + pub name: String, + pub host_secret: String, + pub namespace_secret: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum TemporalOperationType { + StartWorkflow, + SignalWorkflow, + QueryWorkflow, + DescribeWorkflow, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TemporalOperationData { + pub mat_arg: Option, + pub func_arg: Option, + pub func_out: Option, + pub operation: TemporalOperationType, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum TypegateOperation { + ListTypegraphs, + FindTypegraph, + AddTypegraph, + RemoveTypegraphs, + GetSerializedTypegraph, + GetArgInfoByPath, + FindAvailableOperations, + FindPrismaModels, + RawPrismaRead, + RawPrismaCreate, + RawPrismaUpdate, + RawPrismaDelete, + QueryPrismaModel, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum TypegraphOperation { + Resolver, + GetType, + GetSchema, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct RedisBackend { + pub connection_string_secret: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum SubstantialBackend { + Memory, + Fs, + Redis(RedisBackend), +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum WorkflowKind { + Python, + Deno, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct WorkflowFileDescription { + pub workflows: Vec, + pub file: String, + pub deps: Vec, + pub kind: WorkflowKind, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SubstantialRuntimeData { + pub backend: SubstantialBackend, + pub file_descriptions: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum SubstantialOperationType { + Start, + StartRaw, + Stop, + Send, + SendRaw, + Resources, + Results, + ResultsRaw, + InternalLinkParentChild, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SubstantialOperationData { + pub func_arg: Option, + pub func_out: Option, + pub operation: SubstantialOperationType, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct KvRuntimeData { + pub url: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum KvMaterializer { + Get, + Set, + Delete, + Keys, + Values, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct GrpcRuntimeData { + pub proto_file: String, + pub endpoint: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct GrpcData { + pub method: String, +} + +pub trait Handler { + fn get_deno_runtime() -> Result; + fn register_deno_func(data: MaterializerDenoFunc, effect: Effect) -> Result; + fn register_deno_static(data: MaterializerDenoStatic, type_id: TypeId) -> Result; + fn get_predefined_deno_func(data: MaterializerDenoPredefined) -> Result; + fn import_deno_function(data: MaterializerDenoImport, effect: Effect) -> Result; + fn register_graphql_runtime(data: GraphqlRuntimeData) -> Result; + fn graphql_query(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; + fn graphql_mutation(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; + fn register_http_runtime(data: HttpRuntimeData) -> Result; + fn http_request(base: BaseMaterializer, data: MaterializerHttpRequest) -> Result; + fn register_python_runtime() -> Result; + fn from_python_lambda(base: BaseMaterializer, data: MaterializerPythonLambda) -> Result; + fn from_python_def(base: BaseMaterializer, data: MaterializerPythonDef) -> Result; + fn from_python_module(base: BaseMaterializer, data: MaterializerPythonModule) -> Result; + fn from_python_import(base: BaseMaterializer, data: MaterializerPythonImport) -> Result; + fn register_random_runtime(data: RandomRuntimeData) -> Result; + fn create_random_mat(base: BaseMaterializer, data: MaterializerRandom) -> Result; + fn register_wasm_reflected_runtime(data: WasmRuntimeData) -> Result; + fn from_wasm_reflected_func(base: BaseMaterializer, data: MaterializerWasmReflectedFunc) -> Result; + fn register_wasm_wire_runtime(data: WasmRuntimeData) -> Result; + fn from_wasm_wire_handler(base: BaseMaterializer, data: MaterializerWasmWireHandler) -> Result; + fn register_prisma_runtime(data: PrismaRuntimeData) -> Result; + fn prisma_find_unique(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_find_many(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_find_first(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_aggregate(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_count(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_group_by(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_create_one(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_create_many(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_update_one(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_update_many(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_upsert_one(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_delete_one(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_delete_many(runtime: RuntimeId, model: TypeId) -> Result; + fn prisma_execute(runtime: RuntimeId, query: String, param: TypeId, effect: Effect) -> Result; + fn prisma_query_raw(runtime: RuntimeId, query: String, out: TypeId, param: Option) -> Result; + fn prisma_link(data: PrismaLinkData) -> Result; + fn prisma_migration(operation: PrismaMigrationOperation) -> Result; + fn register_temporal_runtime(data: TemporalRuntimeData) -> Result; + fn generate_temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Result; + fn register_typegate_materializer(operation: TypegateOperation) -> Result; + fn register_typegraph_materializer(operation: TypegraphOperation) -> Result; + fn register_substantial_runtime(data: SubstantialRuntimeData) -> Result; + fn generate_substantial_operation(runtime: RuntimeId, data: SubstantialOperationData) -> Result; + fn register_kv_runtime(data: KvRuntimeData) -> Result; + fn kv_operation(base: BaseMaterializer, data: KvMaterializer) -> Result; + fn register_grpc_runtime(data: GrpcRuntimeData) -> Result; + fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result; +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/utils.rs b/src/typegraph/core/src/types/sdk/utils.rs new file mode 100644 index 0000000000..e05f8d789c --- /dev/null +++ b/src/typegraph/core/src/types/sdk/utils.rs @@ -0,0 +1,59 @@ +use serde::{Serialize, Deserialize}; +use super::core::TypeId; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ReduceEntry { + pub path: Vec, + pub injection_data: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum AuthProtocol { + Oauth2, + Jwt, + Basic, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Auth { + pub name: String, + pub protocol: AuthProtocol, + pub auth_data: Vec<(String, String)>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct QueryDeployParams { + pub tg: String, + pub secrets: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct FdkConfig { + pub workspace_path: String, + pub target_name: String, + pub config_json: String, + pub tg_json: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct FdkOutput { + pub path: String, + pub content: String, + pub overwrite: bool, +} + +pub trait Handler { + fn reduceb(super_type_id: TypeId, entries: Vec) -> Result; + fn add_graphql_endpoint(graphql: String) -> Result; + fn add_auth(data: Auth) -> Result; + fn add_raw_auth(data: String) -> Result; + fn oauth2(service_name: String, scopes: String) -> Result; + fn oauth2_without_profiler(service_name: String, scopes: String) -> Result; + fn oauth2_with_extended_profiler(service_name: String, scopes: String, extension: String) -> Result; + fn oauth2_with_custom_profiler(service_name: String, scopes: String, profiler: TypeId) -> Result; + fn gql_deploy_query(params: QueryDeployParams) -> Result; + fn gql_remove_query(tg_name: Vec) -> Result; + fn metagen_exec(config: FdkConfig) -> Result, super::Error>; + fn metagen_write_files(items: Vec, typegraph_dir: String) -> Result<(), super::Error>; +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/type_def.rs b/src/typegraph/core/src/types/type_def.rs index a18a103dfe..85870a99f7 100644 --- a/src/typegraph/core/src/types/type_def.rs +++ b/src/typegraph/core/src/types/type_def.rs @@ -8,12 +8,12 @@ use crate::conversion::hash::{Hashable, Hasher}; use crate::conversion::types::TypeConversion; use crate::errors::Result; use crate::global_store::Store; -use crate::typegraph::TypegraphContext; -use crate::types::ExtendedTypeDef; -use crate::wit::core::{ +use crate::sdk::core::{ TypeEither, TypeFile, TypeFloat, TypeFunc, TypeInteger, TypeList, TypeOptional, TypeString, TypeStruct, TypeUnion, }; +use crate::typegraph::TypegraphContext; +use crate::types::ExtendedTypeDef; use common::typegraph::TypeNode; use enum_dispatch::enum_dispatch; use std::hash::Hash as _; diff --git a/src/typegraph/core/src/types/type_id.rs b/src/typegraph/core/src/types/type_id.rs index 5e8289881e..c619e3ea07 100644 --- a/src/typegraph/core/src/types/type_id.rs +++ b/src/typegraph/core/src/types/type_id.rs @@ -2,9 +2,9 @@ // SPDX-License-Identifier: MPL-2.0 use crate::errors::Result; +use crate::sdk::core::TypeId as CoreTypeId; use crate::typegraph::TypegraphContext; use crate::types::AsTypeDefEx as _; -use crate::wit::core::TypeId as CoreTypeId; use std::fmt::Debug; #[derive(Clone, Copy, PartialEq, Eq, Hash)] diff --git a/src/typegraph/core/src/types/type_ref/injection.rs b/src/typegraph/core/src/types/type_ref/injection.rs index 9ae2846057..cfa3c54697 100644 --- a/src/typegraph/core/src/types/type_ref/injection.rs +++ b/src/typegraph/core/src/types/type_ref/injection.rs @@ -1,7 +1,7 @@ use super::{RefAttr, TypeRef}; +use crate::sdk::utils::ReduceEntry; use crate::types::Type; -use crate::wit::utils::ReduceEntry; -use crate::{errors::Result, wit::core::Error}; +use crate::{errors::Result, sdk::core::Error}; use common::typegraph::{Injection, InjectionNode}; use indexmap::{map::Entry, IndexMap}; use serde::{Deserialize, Serialize}; diff --git a/src/typegraph/core/src/types/type_ref/policy.rs b/src/typegraph/core/src/types/type_ref/policy.rs index 18e965fc23..0673eb6022 100644 --- a/src/typegraph/core/src/types/type_ref/policy.rs +++ b/src/typegraph/core/src/types/type_ref/policy.rs @@ -21,11 +21,11 @@ pub enum PolicySpec { PerEffect(PolicyPerEffect), } -impl From for PolicySpec { - fn from(spec: crate::wit::core::PolicySpec) -> Self { +impl From for PolicySpec { + fn from(spec: crate::sdk::core::PolicySpec) -> Self { match spec { - crate::wit::core::PolicySpec::Simple(id) => PolicySpec::Simple(PolicyId(id)), - crate::wit::core::PolicySpec::PerEffect(per_effect) => { + crate::sdk::core::PolicySpec::Simple(id) => PolicySpec::Simple(PolicyId(id)), + crate::sdk::core::PolicySpec::PerEffect(per_effect) => { PolicySpec::PerEffect(PolicyPerEffect { read: per_effect.read.map(PolicyId), create: per_effect.create.map(PolicyId), diff --git a/src/typegraph/core/src/utils/fs.rs b/src/typegraph/core/src/utils/fs.rs index c1c8934949..be0b3a8193 100644 --- a/src/typegraph/core/src/utils/fs.rs +++ b/src/typegraph/core/src/utils/fs.rs @@ -2,14 +2,12 @@ // SPDX-License-Identifier: MPL-2.0 use super::pathlib::PathLib; -use crate::wit::metatype::typegraph::host::{ - expand_path as expand_path_host, path_exists as path_exists_host, read_file as read_file_host, - write_file as write_file_host, -}; -use crate::{errors::Result, wit::core::Error as TgError}; +use crate::errors::{Result, TgError}; +use regex::Regex; use sha2::{Digest, Sha256}; use std::{ collections::BTreeSet, + fs, path::{Path, PathBuf}, }; @@ -26,9 +24,7 @@ impl FsContext { } pub fn exists(&self, path: &Path) -> Result { - Ok(path_exists_host( - &self.pathlib.get_base_dir().join(path).to_string_lossy(), - )?) + Ok(self.pathlib.get_base_dir().join(path).exists()) } pub fn expand_path(&self, path: &Path, exclude_globs: &[String]) -> Result> { @@ -57,13 +53,10 @@ impl FsContext { }) .collect::>(); - expand_path_host( - &self.pathlib.get_base_dir().join(path).to_string_lossy(), - &exclude_as_regex, - )? - .iter() - .map(|p| self.pathlib.relative(Path::new(p))) - .collect::, _>>() + self.expand_path_re(self.pathlib.get_base_dir().join(path), &exclude_as_regex)? + .iter() + .map(|p| self.pathlib.relative(Path::new(p))) + .collect::, _>>() } fn extract_glob_dirname(path: &str) -> PathBuf { @@ -117,9 +110,7 @@ impl FsContext { } pub fn read_file(&self, path: &Path) -> Result> { - Ok(read_file_host( - &self.pathlib.get_base_dir().join(path).to_string_lossy(), - )?) + Ok(fs::read(self.pathlib.get_base_dir().join(path))?) } pub fn read_text_file(&self, path: &Path) -> Result { @@ -128,10 +119,7 @@ impl FsContext { } pub fn write_file(&self, path: &Path, bytes: &[u8]) -> Result<()> { - Ok(write_file_host( - &self.pathlib.get_base_dir().join(path).to_string_lossy(), - bytes, - )?) + Ok(fs::write(self.pathlib.get_base_dir().join(path), bytes)?) } pub fn write_text_file(&self, path: &Path, text: String) -> Result<()> { @@ -146,4 +134,41 @@ impl FsContext { sha256.update(bytes); Ok((format!("{:x}", sha256.finalize()), size)) } + + fn expand_path_re(&self, root: PathBuf, exclude: &[String]) -> Result> { + let mut results = Vec::new(); + + let exclude = exclude + .iter() + .flat_map(|pat| Regex::new(pat)) + .collect::>(); + + self.expand_path_helper(root, &exclude, &mut results)?; + + Ok(results) + } + + fn expand_path_helper( + &self, + path: PathBuf, + exclude: &[Regex], + results: &mut Vec, + ) -> Result<()> { + for entry in fs::read_dir(path)? { + let path = entry?.path(); + let path_str = path.to_string_lossy(); + + if path.is_file() && !self.match_path(&path_str, exclude) { + results.push(path_str.to_string()); + } else if path.is_dir() { + self.expand_path_helper(path, exclude, results)?; + } + } + + Ok(()) + } + + fn match_path(&self, path: &str, patterns: &[Regex]) -> bool { + patterns.iter().any(|pat| pat.is_match(path)) + } } diff --git a/src/typegraph/core/src/utils/mod.rs b/src/typegraph/core/src/utils/mod.rs index adf2613405..25c8c00f70 100644 --- a/src/typegraph/core/src/utils/mod.rs +++ b/src/typegraph/core/src/utils/mod.rs @@ -15,9 +15,9 @@ use crate::global_store::{get_sdk_version, Store}; use crate::types::type_ref::InjectionTree; use crate::types::type_ref::OverrideInjections; +use crate::sdk::core::TypeId as CoreTypeId; +use crate::sdk::utils::{Auth as SdkAuth, FdkConfig, FdkOutput, QueryDeployParams, ReduceEntry}; use crate::types::TypeId; -use crate::wit::core::TypeId as CoreTypeId; -use crate::wit::utils::{Auth as WitAuth, FdkConfig, FdkOutput, QueryDeployParams, ReduceEntry}; use std::path::Path; mod archive; @@ -38,7 +38,7 @@ struct Oauth2Params<'a> { } impl TryFrom> for String { - type Error = crate::wit::core::Error; + type Error = crate::sdk::core::Error; fn try_from(value: Oauth2Params) -> Result { let auth_data = json!({ "authorize_url": serde_json::to_value(value.authorize_url).unwrap(), @@ -62,7 +62,7 @@ impl TryFrom> for String { } } -impl crate::wit::utils::Guest for crate::Lib { +impl crate::sdk::utils::Handler for crate::Lib { fn reduceb(fn_type_id: CoreTypeId, entries: Vec) -> Result { let injection_tree = InjectionTree::try_from(entries)?; Ok(TypeId(fn_type_id) @@ -75,7 +75,7 @@ impl crate::wit::utils::Guest for crate::Lib { Store::add_graphql_endpoint(graphql) } - fn add_auth(data: WitAuth) -> Result { + fn add_auth(data: SdkAuth) -> Result { Store::add_auth(data) } diff --git a/src/typegraph/core/src/utils/oauth2/mod.rs b/src/typegraph/core/src/utils/oauth2/mod.rs index 2caa5b527c..269ad6aca9 100644 --- a/src/typegraph/core/src/utils/oauth2/mod.rs +++ b/src/typegraph/core/src/utils/oauth2/mod.rs @@ -10,7 +10,7 @@ use crate::{ types::TypeId, }; -pub use crate::wit::core::Error as TgError; +pub use crate::sdk::core::Error as TgError; pub struct OAuth2Profiler { pub input: TypeId, @@ -22,11 +22,11 @@ impl TryInto for OAuth2Profiler { type Error = TgError; fn try_into(self) -> Result { - let deno_mat = DenoMaterializer::Inline(crate::wit::runtimes::MaterializerDenoFunc { + let deno_mat = DenoMaterializer::Inline(crate::sdk::runtimes::MaterializerDenoFunc { code: self.js_code, secrets: vec![], }); - let mat = Materializer::deno(deno_mat, crate::wit::runtimes::Effect::Read); + let mat = Materializer::deno(deno_mat, crate::sdk::runtimes::Effect::Read); t::func(self.input, self.output, Store::register_materializer(mat)) } } diff --git a/src/typegraph/core/src/utils/postprocess/mod.rs b/src/typegraph/core/src/utils/postprocess/mod.rs index 3839a007b7..41a4cbb09e 100644 --- a/src/typegraph/core/src/utils/postprocess/mod.rs +++ b/src/typegraph/core/src/utils/postprocess/mod.rs @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::wit::core::SerializeParams; +use crate::sdk::core::SerializeParams; use common::typegraph::Typegraph; use std::path::PathBuf; use substantial_rt::SubstantialProcessor; diff --git a/src/typegraph/core/src/utils/postprocess/prisma_rt.rs b/src/typegraph/core/src/utils/postprocess/prisma_rt.rs index 039027f732..85f6566927 100644 --- a/src/typegraph/core/src/utils/postprocess/prisma_rt.rs +++ b/src/typegraph/core/src/utils/postprocess/prisma_rt.rs @@ -7,11 +7,11 @@ use common::typegraph::runtimes::{KnownRuntime::Prisma, TGRuntime}; use common::typegraph::Typegraph; use crate::errors::Result; +use crate::sdk::core::MigrationAction; +use crate::sdk::core::PrismaMigrationConfig; use crate::utils::archive::ArchiveExt; use crate::utils::fs::FsContext; use crate::utils::postprocess::PostProcessor; -use crate::wit::core::MigrationAction; -use crate::wit::core::PrismaMigrationConfig; pub struct PrismaProcessor { config: PrismaMigrationConfig, @@ -66,8 +66,14 @@ impl PrismaProcessor { self.config .migration_actions .iter() - .filter_map(|(rt, action)| if rt == name { Some(*action) } else { None }) + .filter_map(|(rt, action)| { + if rt == name { + Some(action.clone()) + } else { + None + } + }) .last() - .unwrap_or(self.config.default_migration_action) + .unwrap_or(self.config.default_migration_action.clone()) } } diff --git a/src/typegraph/core/src/validation/errors.rs b/src/typegraph/core/src/validation/errors.rs index 41c4467f5e..365dd25085 100644 --- a/src/typegraph/core/src/validation/errors.rs +++ b/src/typegraph/core/src/validation/errors.rs @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -use crate::wit::core::Error; +use crate::sdk::core::Error; // pub fn invalid_runtime_type(runtime: &str, materializer: &str) -> Error { // format!( diff --git a/src/typegraph/core/src/validation/materializers.rs b/src/typegraph/core/src/validation/materializers.rs index 23c3023b4f..1315dcb306 100644 --- a/src/typegraph/core/src/validation/materializers.rs +++ b/src/typegraph/core/src/validation/materializers.rs @@ -2,8 +2,8 @@ // SPDX-License-Identifier: MPL-2.0 use crate::runtimes::{DenoMaterializer, MaterializerData, Runtime}; +use crate::sdk::core::TypeFunc; use crate::types::{AsTypeDefEx as _, TypeDef, TypeId}; -use crate::wit::core::TypeFunc; use crate::Result; use crate::{global_store::Store, runtimes::Materializer}; diff --git a/src/typegraph/core/src/validation/types.rs b/src/typegraph/core/src/validation/types.rs index 4f8ecde93d..ae1b1cade1 100644 --- a/src/typegraph/core/src/validation/types.rs +++ b/src/typegraph/core/src/validation/types.rs @@ -2,8 +2,8 @@ // SPDX-License-Identifier: MPL-2.0 use crate::global_store::Store; +use crate::sdk::core::TypeFunc; use crate::types::{AsTypeDefEx as _, Type, TypeDef, TypeId}; -use crate::wit::core::TypeFunc; use crate::{errors, Result}; impl TypeFunc { diff --git a/src/typegraph/core/wit/typegraph.wit b/src/typegraph/core/wit/typegraph.wit deleted file mode 100644 index 766757e8bf..0000000000 --- a/src/typegraph/core/wit/typegraph.wit +++ /dev/null @@ -1,674 +0,0 @@ -package metatype:typegraph; - - -interface core { - record error { - stack: list, - } - - // typegraph description - record cors { - allow-origin: list, - allow-headers: list, - expose-headers: list, - allow-methods: list, - allow-credentials: bool, - max-age-sec: option - } - - record rate { - window-limit: u32, - window-sec: u32, - query-limit: u32, - context-identifier: option, - local-excess: u32, - } - - record typegraph-init-params { - name: string, - dynamic: option, - path: string, - // TypeMeta - prefix: option, - cors: cors, - rate: option, - } - - record artifact { - path: string, - hash: string, - size: u32, - } - - init-typegraph: func(params: typegraph-init-params) -> result<_, error>; - - record migration-action { - apply: bool, - create: bool, - reset: bool, - } - - record prisma-migration-config { - migrations-dir: string, - migration-actions: list>, - default-migration-action: migration-action, - } - - record serialize-params { - typegraph-path: string, - prefix: option, - artifact-resolution: bool, - codegen: bool, - prisma-migration: prisma-migration-config, - pretty: bool, - } - - serialize-typegraph: func(params: serialize-params) -> result>, error>; - - type type-id = u32; - - with-injection: func(type-id: type-id, injection: string) -> result; - - with-config: func(type-id: type-id, config: string) -> result; - - record type-proxy { - name: string, - extras: list>, - } - refb: func(name: string, attributes: option) -> result; - - record type-integer { - min: option, - max: option, - exclusive-minimum: option, - exclusive-maximum: option, - multiple-of: option, - enumeration: option> - } - integerb: func(data: type-integer) -> result; - - record type-float { - min: option, - max: option, - exclusive-minimum: option, - exclusive-maximum: option, - multiple-of: option, - enumeration: option> - } - floatb: func(data: type-float) -> result; - - booleanb: func() -> result; - - record type-string { - min: option, - max: option, - format: option, - pattern: option, - enumeration: option> - } - stringb: func(data: type-string) -> result; - - as-id: func(id: type-id, composite: bool) -> result; - - record type-file { - min: option, - max: option, - allow: option>, - } - fileb: func(data: type-file) -> result; - - - record type-list { - of: type-id, - min: option, - max: option, - unique-items: option - } - listb: func(data: type-list) -> result; - - record type-optional { - of: type-id, - default-item: option - } - optionalb: func(data: type-optional) -> result; - - record type-union { - variants: list, - } - unionb: func(data: type-union) -> result; - - record type-either { - variants: list, - } - eitherb: func(data: type-either) -> result; - - record type-struct { - props: list>, - additional-props: bool, - min: option, - max: option, - enumeration: option>, - } - structb: func(data: type-struct) -> result; - extend-struct: func(tpe: type-id, props: list>) -> result; - - get-type-repr: func(id: type-id) -> result; - - variant value-source { - raw(string), // json - context(string), // key - secret(string), // key - parent(string), // name - param(string), // name - } - - record parameter-transform { - resolver-input: type-id, - transform-tree: string, - } - - record type-func { - inp: type-id, - parameter-transform: option, - out: type-id, - mat: materializer-id, - rate-calls: bool, - rate-weight: option, - } - - funcb: func(data: type-func) -> result; - - record transform-data { - query-input: type-id, - parameter-transform: parameter-transform, - } - - get-transform-data: func(resolver-input: type-id, transform-tree: string) -> result; - - type policy-id = u32; - - record policy { - name: string, - materializer: materializer-id, - } - - record policy-per-effect { - read: option, - create: option, - update: option, - delete: option, - } - - variant policy-spec { - simple(policy-id), - per-effect(policy-per-effect), - } - - register-policy: func(pol: policy) -> result; - - with-policy: func(type-id: type-id, policy-chain: list) -> result; - - // policy-id, policy-name - get-public-policy: func() -> result, error>; - get-internal-policy: func() -> result, error>; - - variant context-check { - not-null, - value(string), - pattern(string), - } - register-context-policy: func(key: string, check: context-check) -> result, error>; - - rename-type: func(tpe: type-id, new-name: string) -> result; - - expose: func(fns: list>, default-policy: option>) -> result<_, error>; - - set-seed: func(seed: option) -> result<_, error>; - - type runtime-id = u32; - type materializer-id = u32; - - record func-params { - inp: type-id, - out: type-id, - mat: materializer-id, - } -} - -interface runtimes { - use core.{error, type-id, func-params, runtime-id, materializer-id, artifact}; - - get-deno-runtime: func() -> runtime-id; - - type idempotency = bool; - - variant effect { - read, - create(idempotency), - update(idempotency), - delete(idempotency), - } - - record base-materializer { - runtime: runtime-id, - effect: effect, - } - - - // deno - record materializer-deno-func { - code: string, - secrets: list, - } - - record materializer-deno-static { - value: string, - } - - record materializer-deno-predefined { - name: string, - } - - record materializer-deno-import { - func-name: string, - module: string, - deps: list, - secrets: list, - } - - register-deno-func: func(data: materializer-deno-func, effect: effect) -> result; - register-deno-static: func(data: materializer-deno-static, type-id: type-id) -> result; - - get-predefined-deno-func: func(data: materializer-deno-predefined) -> result; - import-deno-function: func(data: materializer-deno-import, effect: effect) -> result; - - - // graphql - record graphql-runtime-data { - endpoint: string, - } - - record materializer-graphql-query { - path: option>, - } - - register-graphql-runtime: func(data: graphql-runtime-data) -> result; - graphql-query: func(base: base-materializer, data: materializer-graphql-query) -> result; - graphql-mutation: func(base: base-materializer, data: materializer-graphql-query) -> result; - - record http-runtime-data { - endpoint: string, - cert-secret: option, - basic-auth-secret: option, - } - - enum http-method { - get, - post, - put, - patch, - delete, - } - - record materializer-http-request { - method: http-method, - path: string, - content-type: option, - header-prefix: option, - query-fields: option>, - rename-fields: option>>, - body-fields: option>, - auth-token-field: option, - } - - register-http-runtime: func(data: http-runtime-data) -> result; - http-request: func(base: base-materializer, data: materializer-http-request) -> result; - - // python - record materializer-python-def { - runtime: runtime-id, - name: string, - fn: string, - } - - record materializer-python-lambda { - runtime: runtime-id, - fn: string, - } - - record materializer-python-module { - runtime: runtime-id, - file: string, - deps: list, - } - - record materializer-python-import { - module: u32, - func-name: string, - secrets: list - } - - // TODO: host:port - - register-python-runtime: func() -> result; - from-python-lambda: func(base: base-materializer, data: materializer-python-lambda) -> result; - from-python-def: func(base: base-materializer, data: materializer-python-def) -> result; - from-python-module: func(base: base-materializer, data: materializer-python-module) -> result; - from-python-import: func(base: base-materializer, data: materializer-python-import) -> result; - - // random - record random-runtime-data { - seed: option, - reset: option, - } - - record materializer-random { - runtime: runtime-id, - } - - register-random-runtime: func(data: random-runtime-data) -> result; - create-random-mat: func(base: base-materializer, data: materializer-random) -> result; - - // wasm - - record wasm-runtime-data { - wasm-artifact: string, - } - - record materializer-wasm-reflected-func { - func-name: string, - } - - register-wasm-reflected-runtime: func(data: wasm-runtime-data) -> result; - from-wasm-reflected-func: func(base: base-materializer, data: materializer-wasm-reflected-func) -> result; - - record materializer-wasm-wire-handler { - func-name: string, - } - - register-wasm-wire-runtime: func(data: wasm-runtime-data) -> result; - from-wasm-wire-handler: func(base: base-materializer, data: materializer-wasm-wire-handler) -> result; - - // prisma - record prisma-runtime-data { - name: string, - connection-string-secret: string, - } - - record prisma-link-data { - target-type: type-id, - relationship-name: option, - foreign-key: option, - target-field: option, - unique: option, - } - - register-prisma-runtime: func(data: prisma-runtime-data) -> result; - prisma-find-unique: func(runtime: runtime-id, model: type-id) -> result; - prisma-find-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-find-first: func(runtime: runtime-id, model: type-id) -> result; - prisma-aggregate: func(runtime: runtime-id, model: type-id) -> result; - prisma-count: func(runtime: runtime-id, model: type-id) -> result; - prisma-group-by: func(runtime: runtime-id, model: type-id) -> result; - prisma-create-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-create-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-update-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-update-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-upsert-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-delete-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-delete-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-execute: func(runtime: runtime-id, query: string, param: type-id, effect: effect) -> result; - prisma-query-raw: func(runtime: runtime-id, query: string, param: option, out: type-id) -> result; - prisma-link: func(data: prisma-link-data) -> result; - - - // prisma-migrate - enum prisma-migration-operation { - diff, - create, - apply, - deploy, - reset, - } - prisma-migration: func(operation: prisma-migration-operation) -> result; - - // temporal - record temporal-runtime-data { - name: string, - host-secret: string, - namespace-secret: option, - } - - variant temporal-operation-type { - start-workflow, - signal-workflow, - query-workflow, - describe-workflow - } - - record temporal-operation-data { - mat-arg: option, - func-arg: option, - func-out: option, - operation: temporal-operation-type, - } - - register-temporal-runtime: func(data: temporal-runtime-data) -> result; - generate-temporal-operation: func(runtime: runtime-id, data: temporal-operation-data) -> result; - - // typegate - enum typegate-operation { - list-typegraphs, - find-typegraph, - add-typegraph, - remove-typegraphs, - get-serialized-typegraph, - get-arg-info-by-path, - find-available-operations, - find-prisma-models, - raw-prisma-read, - raw-prisma-create, - raw-prisma-update, - raw-prisma-delete, - query-prisma-model, - } - - register-typegate-materializer: func(operation: typegate-operation) -> result; - - // typegraph (introspection) - enum typegraph-operation { - resolver, - get-type, - get-schema, - } - - register-typegraph-materializer: func(operation: typegraph-operation) -> result; - - // substantial - record redis-backend { - connection-string-secret: string, - } - - variant substantial-backend { - memory, - fs, - redis(redis-backend) - } - - - enum workflow-kind { - python, - deno - } - - record workflow-file-description { - workflows: list, - file: string, - deps: list, - kind: workflow-kind - } - - record substantial-runtime-data { - backend: substantial-backend, - file-descriptions: list - } - - variant substantial-operation-type { - start, - start-raw, - stop, - send, - send-raw, - resources, - results, - results-raw, - internal-link-parent-child - } - - record substantial-operation-data { - func-arg: option, - func-out: option, - operation: substantial-operation-type, - } - - register-substantial-runtime: func(data: substantial-runtime-data) -> result; - generate-substantial-operation: func(runtime: runtime-id, data: substantial-operation-data) -> result; - - // kv - record kv-runtime-data { - url: string - } - - register-kv-runtime: func(data: kv-runtime-data) -> result; - - enum kv-materializer { - get, - set, - delete, - keys, - values, - } - - kv-operation: func(base: base-materializer, data: kv-materializer) -> result; - - // Grpc - record grpc-runtime-data { - proto-file: string, - endpoint: string, - } - - register-grpc-runtime: func(data: grpc-runtime-data) -> result; - - record grpc-data { - method: string, - } - - call-grpc-method: func(runtime: runtime-id, data: grpc-data) -> result; -} - -interface aws { - use core.{error, runtime-id, materializer-id}; - - record s3-runtime-data { - host-secret: string, - region-secret: string, - access-key-secret: string, - secret-key-secret: string, - path-style-secret: string, - } - - record s3-presign-get-params { - bucket: string, - expiry-secs: option, - } - - record s3-presign-put-params { - bucket: string, - expiry-secs: option, - content-type: option, - } - - register-s3-runtime: func(data: s3-runtime-data) -> result; - s3-presign-get: func(runtime: runtime-id, data: s3-presign-get-params) -> result; - s3-presign-put: func(runtime: runtime-id, data: s3-presign-put-params) -> result; - s3-list: func(runtime: runtime-id, bucket: string) -> result; - s3-upload: func(runtime: runtime-id, bucket: string) -> result; - s3-upload-all: func(runtime: runtime-id, bucket: string) -> result; -} - - -interface utils { - use core.{error}; - type type-id = u32; - - record reduce-entry { - path: list, - injection-data: string, - } - reduceb: func(fn-type-id: type-id, entries: list) -> result; - - add-graphql-endpoint: func(graphql: string) -> result; - - variant auth-protocol { - oauth2, - jwt, - basic, - } - - record auth { - name: string, - protocol: auth-protocol, - // string => json string - auth-data: list>, - } - - add-auth: func(data: auth) -> result; - add-raw-auth: func(data: string) -> result; - oauth2: func(service-name: string, scopes: string) -> result; - oauth2-without-profiler: func(service-name: string, scopes: string) -> result; - oauth2-with-extended-profiler: func(service-name: string, scopes: string, extension: string) -> result; - oauth2-with-custom-profiler: func(service-name: string, scopes: string, profiler: type-id) -> result; - - record query-deploy-params { - tg: string, - secrets: option>>, - } - - gql-deploy-query: func(params: query-deploy-params) -> result; - gql-remove-query: func(tg-name: list) -> result; - - record fdk-config { - workspace-path: string, - target-name: string, - config-json: string, - tg-json: string, - } - - record fdk-output { - path: string, - content: string, - overwrite: bool, - } - - metagen-exec: func(config: fdk-config) -> result, error>; - metagen-write-files: func(items: list, typegraph-dir: string) -> result<_, error>; -} - -interface host { - print: func(s: string); - eprint: func(s: string); - expand-path: func(root: string, exclude: list) -> result, string>; - path-exists: func(path: string) -> result; - read-file: func(path: string) -> result, string>; - write-file: func(path: string, data: list) -> result<_, string>; - get-cwd: func() -> result; -} - - -world typegraph { - export core; - export runtimes; - export utils; - export aws; - import host; -} diff --git a/src/typegraph/specs/.gitignore b/src/typegraph/specs/.gitignore new file mode 100644 index 0000000000..54850400c0 --- /dev/null +++ b/src/typegraph/specs/.gitignore @@ -0,0 +1,2 @@ +node_modules +__pycache__ diff --git a/src/typegraph/specs/codegen/deno.json b/src/typegraph/specs/codegen/deno.json new file mode 100644 index 0000000000..0d4337cb02 --- /dev/null +++ b/src/typegraph/specs/codegen/deno.json @@ -0,0 +1,14 @@ +{ + "tasks": { + "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/scripts/main.ts", + "test": "deno test --allow-env --allow-read --allow-ffi --allow-run" + }, + "imports": { + "@std/fs": "jsr:@std/fs@^1.0.4", + "@std/path": "jsr:@std/path@^1.0.6", + "@std/text": "jsr:@std/text@^1.0.7", + "tree-sitter": "npm:tree-sitter@^0.21.1", + "tree-sitter-typescript": "npm:tree-sitter-typescript@^0.23.0" + }, + "nodeModulesDir": "auto" +} diff --git a/src/typegraph/specs/codegen/deno.lock b/src/typegraph/specs/codegen/deno.lock new file mode 100644 index 0000000000..625bdc8f1b --- /dev/null +++ b/src/typegraph/specs/codegen/deno.lock @@ -0,0 +1,99 @@ +{ + "version": "4", + "specifiers": { + "jsr:@std/assert@*": "1.0.6", + "jsr:@std/fs@*": "1.0.4", + "jsr:@std/fs@^1.0.4": "1.0.4", + "jsr:@std/internal@^1.0.4": "1.0.4", + "jsr:@std/path@*": "1.0.6", + "jsr:@std/path@^1.0.6": "1.0.6", + "jsr:@std/text@^1.0.7": "1.0.7", + "npm:@types/node@*": "22.5.4", + "npm:deasync@*": "0.1.30", + "npm:tree-sitter-typescript@0.23": "0.23.0_tree-sitter@0.21.1", + "npm:tree-sitter@~0.21.1": "0.21.1" + }, + "jsr": { + "@std/assert@1.0.6": { + "integrity": "1904c05806a25d94fe791d6d883b685c9e2dcd60e4f9fc30f4fc5cf010c72207", + "dependencies": [ + "jsr:@std/internal" + ] + }, + "@std/fs@1.0.4": { + "integrity": "2907d32d8d1d9e540588fd5fe0ec21ee638134bd51df327ad4e443aaef07123c", + "dependencies": [ + "jsr:@std/path@^1.0.6" + ] + }, + "@std/internal@1.0.4": { + "integrity": "62e8e4911527e5e4f307741a795c0b0a9e6958d0b3790716ae71ce085f755422" + }, + "@std/path@1.0.6": { + "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" + }, + "@std/text@1.0.7": { + "integrity": "344a820af99fde81ae1d4f9ce586da3f47a58cda25ac4c4dd688166cf5ed97f1" + } + }, + "npm": { + "@types/node@22.5.4": { + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dependencies": [ + "undici-types" + ] + }, + "bindings@1.5.0": { + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": [ + "file-uri-to-path" + ] + }, + "deasync@0.1.30": { + "integrity": "sha512-OaAjvEQuQ9tJsKG4oHO9nV1UHTwb2Qc2+fadB0VeVtD0Z9wiG1XPGLJ4W3aLhAoQSYTaLROFRbd5X20Dkzf7MQ==", + "dependencies": [ + "bindings", + "node-addon-api@1.7.2" + ] + }, + "file-uri-to-path@1.0.0": { + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node-addon-api@1.7.2": { + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" + }, + "node-addon-api@8.2.1": { + "integrity": "sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==" + }, + "node-gyp-build@4.8.2": { + "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==" + }, + "tree-sitter-typescript@0.23.0_tree-sitter@0.21.1": { + "integrity": "sha512-hRy5O9d+9ON4HxIWWxkI4zonrw2v/WNN1JoiGW5HkXfC9K2R3p53ugMvs6Vs4T7ASCwggsoQ75LNdgpExC/zgQ==", + "dependencies": [ + "node-addon-api@8.2.1", + "node-gyp-build", + "tree-sitter" + ] + }, + "tree-sitter@0.21.1": { + "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", + "dependencies": [ + "node-addon-api@8.2.1", + "node-gyp-build" + ] + }, + "undici-types@6.19.8": { + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@std/fs@^1.0.4", + "jsr:@std/path@^1.0.6", + "jsr:@std/text@^1.0.7", + "npm:tree-sitter-typescript@0.23", + "npm:tree-sitter@~0.21.1" + ] + } +} diff --git a/src/typegraph/specs/codegen/rpc/python/__init__.py b/src/typegraph/specs/codegen/rpc/python/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/typegraph/specs/codegen/rpc/python/client.py b/src/typegraph/specs/codegen/rpc/python/client.py new file mode 100644 index 0000000000..684f946394 --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/python/client.py @@ -0,0 +1,31 @@ +import json +import sys + +from typing import Any, Optional + + +state = {"id": 0} + + +def rpc_request(method: str, params: Optional[Any] = None): + request = { + "jsonrpc": "2.0", + "method": method, + "id": state["id"], + } + + if params != None: + request["params"] = params + + json_request = json.dumps(request) + + sys.stdout.write(json_request + "\n") + sys.stdout.flush() + state["id"] += 1 + + response = json.loads(sys.stdin.readline()) + + if "error" in response: + raise Exception(response["error"]["message"]) + + return response["result"] diff --git a/src/typegraph/specs/codegen/rpc/python/client_mock.py b/src/typegraph/specs/codegen/rpc/python/client_mock.py new file mode 100644 index 0000000000..d3e0d26c78 --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/python/client_mock.py @@ -0,0 +1,9 @@ +import json + +from client import rpc_request + + +first = rpc_request("hello", {"name": "world"}) +second = rpc_request("foo") + +print(json.dumps({"first": first, "second": second})) diff --git a/src/typegraph/specs/codegen/rpc/tests/client.test.ts b/src/typegraph/specs/codegen/rpc/tests/client.test.ts new file mode 100644 index 0000000000..c1abfd706e --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/tests/client.test.ts @@ -0,0 +1,71 @@ +import { assertEquals } from "jsr:@std/assert"; +import * as path from "jsr:@std/path"; +import { readOutput, writeToInput } from "./utils.ts"; + +const dirname = new URL(".", import.meta.url).pathname; + +const transactions = [ + { + request: { + jsonrpc: "2.0", + method: "hello", + params: { name: "world" }, + id: 0, + }, + response: { jsonrpc: "2.0", result: "ok", id: 0 }, + }, + { + request: { + jsonrpc: "2.0", + method: "foo", + id: 1, + }, + response: { jsonrpc: "2.0", result: "bar", id: 1 }, + }, +]; + +async function testClient(params: { command: string; args: string[] }) { + const command = new Deno.Command(params.command, { + args: params.args, + stdin: "piped", + stdout: "piped", + }); + const client = command.spawn(); + const reader = client.stdout.getReader(); + const writer = client.stdin.getWriter(); + + for (const transaction of transactions) { + const request = await readOutput(reader); + assertEquals(JSON.parse(request), transaction.request); + await writeToInput(writer, JSON.stringify(transaction.response) + "\n"); + } + + const finalOutput = await readOutput(reader); + const expected = { first: "ok", second: "bar" }; + + assertEquals(JSON.parse(finalOutput), expected); + + client.kill(); + + await reader.cancel(); + await writer.close(); + await client.status; +} + +Deno.test("Test TypeScript client", async () => { + const params = { + command: "deno", + args: ["run", "-A", path.join(dirname, "../typescript/client_mock.ts")], + }; + + await testClient(params); +}); + +Deno.test("Test Python client", async () => { + const params = { + command: "python3", + args: [path.join(dirname, "../python/client_mock.py")], + }; + + await testClient(params); +}); diff --git a/src/typegraph/specs/codegen/rpc/tests/utils.ts b/src/typegraph/specs/codegen/rpc/tests/utils.ts new file mode 100644 index 0000000000..4ab5933aa9 --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/tests/utils.ts @@ -0,0 +1,18 @@ +async function readOutput(reader: ReadableStreamDefaultReader) { + const decoder = new TextDecoder("utf-8"); + const buffer = await reader.read(); + const decoded = decoder.decode(buffer.value); + + return decoded; +} + +async function writeToInput( + writer: WritableStreamDefaultWriter, + value: string, +) { + const encoder = new TextEncoder(); + const encoded = encoder.encode(value); + await writer.write(encoded); +} + +export { readOutput, writeToInput }; diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts new file mode 100644 index 0000000000..46778ff99e --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -0,0 +1,52 @@ +import { Buffer } from "node:buffer"; +import process from "node:process"; +import fs from "node:fs"; + +const BUFFER_SIZE = 1024; + +const state = { id: 0 }; + +type RpcResponse = { + jsonrpc: "2.0"; + result?: R; + error?: { + code: number; + message: string; + data?: E; + }; + id: number | string; +}; + +function rpcRequest(method: string, params?: P) { + const request = { + jsonrpc: "2.0", + method, + params, + id: state.id, + }; + + const jsonRequest = JSON.stringify(request); + + process.stdout.write(jsonRequest + "\n"); + state.id += 1; + + const buffer = Buffer.alloc(BUFFER_SIZE); + + let bytesRead = null; + let content = Buffer.alloc(0); + + do { + bytesRead = fs.readSync(process.stdin.fd, buffer); + content = Buffer.concat([content, buffer.subarray(0, bytesRead)]); + } while (bytesRead == BUFFER_SIZE); + + const response: RpcResponse = JSON.parse(content.toString()); + + if (response.error) { + throw new Error(response.error.message); + } + + return response.result as R; +} + +export { rpcRequest }; diff --git a/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts b/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts new file mode 100644 index 0000000000..f850214ce3 --- /dev/null +++ b/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts @@ -0,0 +1,6 @@ +import { rpcRequest } from "./client.ts"; + +const first = rpcRequest("hello", { name: "world" }); +const second = rpcRequest("foo"); + +console.log(JSON.stringify({ first, second })); diff --git a/src/typegraph/specs/codegen/src/cmd/main.ts b/src/typegraph/specs/codegen/src/cmd/main.ts new file mode 100644 index 0000000000..814173d4d6 --- /dev/null +++ b/src/typegraph/specs/codegen/src/cmd/main.ts @@ -0,0 +1,31 @@ +import * as fs from "@std/fs"; +import { + getCodeGenerator, + getTypeDefSources, + isValidTarget, + validTargets, +} from "./utils.ts"; + +const usage = `Typegraph client SDK codegen tool + +Usage: tg-codegen [target] [outdir] (target: ${validTargets.join(", ")})`; + +const [target, outDir] = Deno.args; + +if (!target || !outDir || !isValidTarget(target)) { + console.log(usage); + Deno.exit(1); +} + +if (!fs.existsSync(outDir)) { + Deno.mkdirSync(outDir); +} + +console.log(`Generating ${target} types and bindings...`); + +const sources = getTypeDefSources(); +const codegen = getCodeGenerator(target); + +codegen.generate(sources, outDir); + +console.log("Done"); diff --git a/src/typegraph/specs/codegen/src/cmd/utils.ts b/src/typegraph/specs/codegen/src/cmd/utils.ts new file mode 100644 index 0000000000..7a9926e806 --- /dev/null +++ b/src/typegraph/specs/codegen/src/cmd/utils.ts @@ -0,0 +1,40 @@ +import * as path from "@std/path"; +import type { TypeDefProcessor } from "../lib/base.ts"; +import TypeScriptCodeGenerator from "../lib/typescript.ts"; +import RustLibCodeGenerator from "../lib/rust_lib.ts"; +import PythonCodeGenerator from "../lib/python.ts"; + +const dirname = new URL(".", import.meta.url).pathname; + +function getTypeDefSources() { + const typeDefsDir = path.join(dirname, "../../../types"); + const typeDefFiles = Array.from(Deno.readDirSync(typeDefsDir)); + + const typeDefModules = typeDefFiles + .map(({ name }) => { + const filePath = path.join(typeDefsDir, name); + const fileContent = Deno.readTextFileSync(filePath); + const moduleName = name.split(".")[0]; + return { moduleName, content: fileContent }; + }) + .filter(({ moduleName }) => moduleName !== "primitives"); + + return typeDefModules; +} + +type GenTarget = "typescript" | "python" | "rust-lib"; + +const validTargets = ["typescript", "python", "rust-lib"]; + +function getCodeGenerator(target: GenTarget): TypeDefProcessor { + if (target === "typescript") return new TypeScriptCodeGenerator(); + if (target === "python") return new PythonCodeGenerator(); + return new RustLibCodeGenerator(); +} + +function isValidTarget(target: string): target is GenTarget { + return validTargets.includes(target); +} + +export type { GenTarget }; +export { getTypeDefSources, getCodeGenerator, isValidTarget, validTargets }; diff --git a/src/typegraph/specs/codegen/src/lib/base.ts b/src/typegraph/specs/codegen/src/lib/base.ts new file mode 100644 index 0000000000..79d7b1b50a --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/base.ts @@ -0,0 +1,254 @@ +import type { SyntaxNode } from "tree-sitter"; +import { + getImports, + getTypeDefs, + parseTypeScript, + type TypeDefMatch, + type TypeImport, +} from "./treesitter.ts"; +import * as path from "@std/path"; + +type TypeDef = AliasTypeDef | RecordTypeDef | UnionTypeDef; + +type AliasTypeDef = { + kind: "alias"; + ident: string; + value: string; +}; + +type RecordTypeDef = { + kind: "record"; + ident: string; + props: { name: string; value: string; optional: boolean }[]; +}; + +type UnionTypeDef = { + kind: "union"; + ident: string; + variants: { tag: string; value?: string }[]; +}; + +type FuncDef = { + ident: string; + params: { name: string; type: string; optional: boolean }[]; + ret: string; +}; + +type TypeDefSource = { + moduleName: string; + content: string; +}; + +abstract class TypeDefProcessor { + protected typeDefs: TypeDef[]; + protected funcDefs: FuncDef[]; + protected imports: TypeImport[]; + protected typeMap: Record; + protected reservedKeywords: string[]; + protected fileExtension: string; + + constructor(params: { + typeMap: Record; + reservedKeywords: string[]; + fileExtension: string; + }) { + this.typeDefs = []; + this.funcDefs = []; + this.imports = []; + this.typeMap = params.typeMap; + this.reservedKeywords = params.reservedKeywords; + this.fileExtension = params.fileExtension; + } + + process(source: string) { + const tree = parseTypeScript(source); + const typeDefs = getTypeDefs(tree.rootNode); + + this.typeDefs = []; + this.funcDefs = []; + this.imports = getImports(tree.rootNode).filter( + ({ source }) => source !== "primitives", + ); + + for (const typeDef of typeDefs) { + this.visitTypeDef(typeDef); + } + } + + visitTypeDef(def: TypeDefMatch) { + const { ident, value } = def; + const valueType = value.type; + + if (valueType === "type_identifier" || valueType == "predefined_type") + this.visitAliasType(ident, value); + else if (valueType === "object_type") this.visitRecordType(ident, value); + else if (valueType === "union_type") this.visitUnionType(ident, value); + else if (valueType === "function_type") + this.visitFunctionType(ident, value); + } + + visitAliasType(ident: SyntaxNode, value: SyntaxNode) { + this.typeDefs.push({ + kind: "alias", + ident: ident.text, + value: this.resolveType(value), + }); + } + + visitRecordType(ident: SyntaxNode, value: SyntaxNode) { + this.typeDefs.push({ + kind: "record", + ident: ident.text, + props: this.resolveRecordProps(value.namedChildren), + }); + } + + visitUnionType(ident: SyntaxNode, value: SyntaxNode) { + this.typeDefs.push({ + kind: "union", + ident: ident.text, + variants: this.resolveVariants(value), + }); + } + + visitFunctionType(ident: SyntaxNode, value: SyntaxNode) { + const params = value.childForFieldName("parameters")!; + const ret = value.childForFieldName("return_type")!; + const paramData = params.namedChildren.map((p) => { + const [ident, second] = p.namedChildren; + return { + name: ident.text, + type: this.resolveType(second.namedChildren[0]), + optional: p.type === "optional_parameter", + }; + }); + + this.funcDefs.push({ + ident: ident.text, + params: paramData, + ret: this.resolveType(ret), + }); + } + + abstract makeArrayType(inner: string): string; + abstract makeTupleType(first: string, second: string): string; + + resolveIdent(ident: string) { + return this.reservedKeywords.includes(ident) ? ident + "_" : ident; + } + + resolveType(value: SyntaxNode): string { + const [first, second] = value.namedChildren; + + if (value.type === "array_type") { + return this.makeArrayType(this.resolveType(first)); + } + + if (value.type === "tuple_type") { + return this.makeTupleType( + this.resolveType(first), + this.resolveType(second), + ); + } + + return this.typeMap[value.text] ?? value.text; + } + + resolveRecordProps(props: SyntaxNode[]) { + const results = []; + + for (const prop of props) { + if (!prop.childCount) continue; // skip possible comments + + const optional = prop.childCount === 3; // includes the `?` symbol + const [identNode, valueNode] = prop.namedChildren; + const name = this.resolveIdent(identNode.text); + const value = this.resolveType(valueNode.namedChildren[0]); + + results.push({ name, value, optional }); + } + + return results; + } + + resolveVariants(root: SyntaxNode) { + const results = []; + let current = root; + + while (current && current.type === "union_type") { + const [first, ...rest] = current.namedChildren; + const second = rest.filter((n) => n.type !== "comment").at(0); // escape comment nodes + if (second) results.push(second); + if (first) current = first; + } + + if (current) { + results.push(current); + } + + return results.reverse().map((v) => this.resolveVariant(v)); + } + + resolveVariant(node: SyntaxNode) { + if (node.type === "literal_type") { + const nameNode = node.descendantsOfType("string_fragment")[0]; + return { tag: nameNode.text }; + } + + if (node.type === "object_type") { + const nameNode = node.descendantsOfType("property_identifier")[0]; + const typeNode = node.descendantsOfType("type_annotation")[0]; + const type = this.resolveType(typeNode.namedChildren[0]); + return { tag: nameNode.text, value: type }; + } + + throw new Error(`Unexpected variant node: ${node.text}`); + } + + abstract formatAliasTypeDef(def: AliasTypeDef): string; + abstract formatRecordTypeDef(def: RecordTypeDef): string; + abstract formatUnionTypeDef(def: UnionTypeDef): string; + abstract formatFuncDef(def: FuncDef): string; + abstract formatHeaders(): string; + + formatTypeDef(def: TypeDef) { + if (def.kind === "alias") return this.formatAliasTypeDef(def); + else if (def.kind === "record") return this.formatRecordTypeDef(def); + else return this.formatUnionTypeDef(def); + } + + formatTypeDefs() { + return this.typeDefs.map((def) => this.formatTypeDef(def)).join("\n\n"); + } + + formatFuncDefs() { + return this.funcDefs.map((func) => this.formatFuncDef(func)).join("\n\n"); + } + + generate(sources: TypeDefSource[], outDir: string) { + for (const { moduleName, content } of sources) { + this.process(content); + + const filePath = path.join(outDir, moduleName + this.fileExtension); + const fileContent = `${this.formatHeaders()}\n\n${this.formatTypeDefs()}\n\n${this.formatFuncDefs()}`; + + Deno.writeTextFileSync(filePath, fileContent); + + console.log(moduleName + this.fileExtension + " was created"); + } + + this.postGenerate(sources, outDir); + } + + abstract postGenerate(sources: TypeDefSource[], outDir: string): void; +} + +export type { + TypeDef, + AliasTypeDef, + RecordTypeDef, + UnionTypeDef, + FuncDef, + TypeDefSource, +}; +export { TypeDefProcessor }; diff --git a/src/typegraph/specs/codegen/src/lib/python.ts b/src/typegraph/specs/codegen/src/lib/python.ts new file mode 100644 index 0000000000..e223e69e73 --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/python.ts @@ -0,0 +1,130 @@ +import * as fs from "@std/fs"; +import * as path from "@std/path"; +import { TypeDefProcessor } from "./base.ts"; +import type { + AliasTypeDef, + FuncDef, + RecordTypeDef, + TypeDefSource, + UnionTypeDef, +} from "./base.ts"; +import { toPascalCase } from "@std/text"; + +const typeMap = { + UInt: "int", + SInt: "int", + Float: "float", + string: "str", + boolean: "bool", + void: "None", +}; + +class PythonCodeGenerator extends TypeDefProcessor { + constructor() { + super({ + typeMap, + reservedKeywords: [], + fileExtension: ".py", + }); + } + + override makeArrayType(inner: string) { + return `t.List[${inner}]`; + } + + override makeTupleType(first: string, second: string) { + return `t.Tuple[${first}, ${second}]`; + } + + override formatHeaders() { + return [ + "import typing as t", + "from pydantic import BaseModel", + "from client import rpc_request", + this.imports + .map( + ({ source, imports }) => + `from ${source} import ${imports.join(", ")}`, + ) + .join("\n"), + ].join("\n"); + } + + override formatAliasTypeDef(def: AliasTypeDef) { + return `${def.ident} = ${def.value}`; + } + + override formatRecordTypeDef(def: RecordTypeDef) { + const props = def.props + .map( + (p) => + ` ${p.name}: ${p.optional ? `t.Optional[${p.value}]` : p.value}`, + ) + .join("\n"); + + return `class ${def.ident}(BaseModel): +${props}`; + } + + override formatUnionTypeDef(def: UnionTypeDef) { + const variants = def.variants + .map( + ({ tag, value }) => + ` ${value ? `t.TypedDict("${def.ident}${toPascalCase(tag)}", {"${tag}": ${value}})` : `t.Literal["${tag}"]`},`, + ) + .join("\n"); + + return `${def.ident} = t.Union[ +${variants} +]`; + } + + override formatFuncDef(def: FuncDef): string { + if (!def.params.length) { + return `def ${def.ident}() -> ${def.ret}: + class ReturnType(BaseModel): + value: ${def.ret} + + res = rpc_request("${def.ident}") + ret = ReturnType(**res) + + return ret.value`; + } + + const params = def.params + .map( + (p) => + `${p.name}: ${p.optional ? `t.Optional[${p.type}] = None` : p.type}`, + ) + .join(", "); + + return `def ${def.ident}(${params}) -> ${def.ret}: + class RequestType(BaseModel): +${def.params.map((p) => ` ${p.name}: ${p.optional ? `t.Optional[${p.type}]` : p.type}`).join("\n")} + + class ReturnType(BaseModel): + value: ${def.ret} + + req = RequestType(${def.params.map(({ name }) => `${name}=${name}`).join(", ")}) + res = rpc_request("${def.ident}", req.model_dump()) + ret = ReturnType(**res) + + return ret.value`; + } + + override postGenerate(_sources: TypeDefSource[], outDir: string): void { + const dirname = new URL(".", import.meta.url).pathname; + const rpcClientFile = path.join(dirname, "../../rpc/python/client.py"); + + fs.copySync(rpcClientFile, path.join(outDir, "client.py"), { + overwrite: true, + }); + + Deno.createSync(path.join(outDir, "__init__.py")); + + console.log("client.py was created"); + console.log("__init__.py was created"); + } +} + +export default PythonCodeGenerator; diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts new file mode 100644 index 0000000000..4a9956c07e --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -0,0 +1,110 @@ +import * as path from "@std/path"; +import { toPascalCase } from "@std/text"; +import { TypeDefProcessor } from "./base.ts"; +import type { + AliasTypeDef, + FuncDef, + RecordTypeDef, + UnionTypeDef, + TypeDefSource, +} from "./base.ts"; + +const typeMap = { + UInt: "u32", + SInt: "i32", + Float: "f64", + string: "String", + boolean: "bool", + void: "()", +}; + +const reservedKeywords = ["fn", "type"]; + +class RustLibCodeGenerator extends TypeDefProcessor { + constructor() { + super({ + typeMap, + reservedKeywords, + fileExtension: ".rs", + }); + } + + override makeArrayType(inner: string) { + return `Vec<${inner}>`; + } + + override makeTupleType(first: string, second: string) { + return `(${first}, ${second})`; + } + + override formatHeaders() { + return [ + "use serde::{Serialize, Deserialize};", + this.imports + .map( + ({ imports, source }) => + `use super::${source}::${imports.length > 1 ? `{${imports.join(", ")}}` : imports};`, + ) + .join("\n"), + ].join("\n"); + } + + override formatAliasTypeDef(def: AliasTypeDef) { + return `pub type ${def.ident} = ${def.value};`; + } + + override formatRecordTypeDef(def: RecordTypeDef) { + const props = def.props + .map( + (p) => + ` pub ${p.name}: ${p.optional ? `Option<${p.value}>` : p.value},`, + ) + .join("\n"); + + return `#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ${def.ident} { +${props} +}`; + } + + override formatUnionTypeDef(def: UnionTypeDef) { + const variants = def.variants + .map( + (v) => + ` ${v.value ? `${toPascalCase(v.tag)}(${v.value})` : toPascalCase(v.tag)},`, + ) + .join("\n"); + + return `#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ${def.ident} { +${variants} +}`; + } + + override formatFuncDef(def: FuncDef): string { + const params = def.params + .map((p) => `${p.name}: ${p.optional ? `Option<${p.type}>` : p.type}`) + .join(", "); + + return `fn ${def.ident}(${params}) -> Result<${def.ret}, super::Error>;`; + } + + override formatFuncDefs() { + return `pub trait Handler { +${this.funcDefs.map((f) => ` ${this.formatFuncDef(f)}`).join("\n")} +}`; + } + + override postGenerate(sources: TypeDefSource[], outDir: string) { + const imports = + sources.map(({ moduleName }) => `pub mod ${moduleName};`).join("\n") + + "pub use core::Error;"; + + Deno.writeTextFileSync(path.join(outDir, "mod.rs"), imports); + + console.log("mod.rs was created"); + } +} + +export default RustLibCodeGenerator; diff --git a/src/typegraph/specs/codegen/src/lib/treesitter.ts b/src/typegraph/specs/codegen/src/lib/treesitter.ts new file mode 100644 index 0000000000..1b6b0151dc --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/treesitter.ts @@ -0,0 +1,64 @@ +import Parser, { type SyntaxNode } from "tree-sitter"; +import TypeScript from "tree-sitter-typescript"; + +const parser = new Parser(); +const language = TypeScript.typescript; + +parser.setLanguage(language); + +const typeDefQuery = new Parser.Query( + language, + ` + (type_alias_declaration + name: (type_identifier) @ident + value: (_) @value) + `, +); + +const importQuery = new Parser.Query( + language, + ` + (import_statement + (import_clause + (named_imports) @import) + source: (string + (string_fragment) @source) + ) + `, +); + +type TypeDefMatch = { + ident: SyntaxNode; + value: SyntaxNode; +}; + +type TypeImport = { + imports: string[]; + source: string; +}; + +function parseTypeScript(source: string) { + return parser.parse(source); +} + +function getTypeDefs(root: SyntaxNode) { + return typeDefQuery + .matches(root) + .map(({ captures }) => + Object.fromEntries(captures.map(({ name, node }) => [name, node])), + ) as TypeDefMatch[]; +} + +function getImports(root: SyntaxNode) { + return importQuery.matches(root).map(({ captures }) => { + const [imports, source] = captures; + const namedImports = imports.node.namedChildren.map( + (c) => c.descendantsOfType("identifier")[0].text, + ); + const sourceName = source.node.text.match(/\w+/)!; + return { imports: namedImports, source: sourceName[0] }; + }); +} + +export type { TypeDefMatch, TypeImport }; +export { getTypeDefs, getImports, parseTypeScript }; diff --git a/src/typegraph/specs/codegen/src/lib/typescript.ts b/src/typegraph/specs/codegen/src/lib/typescript.ts new file mode 100644 index 0000000000..68eba9b42b --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/typescript.ts @@ -0,0 +1,90 @@ +import * as fs from "@std/fs"; +import * as path from "@std/path"; +import { toCamelCase } from "@std/text"; +import { TypeDefProcessor } from "./base.ts"; +import type { + AliasTypeDef, + FuncDef, + RecordTypeDef, + TypeDefSource, + UnionTypeDef, +} from "./base.ts"; + +const typeMap = { + UInt: "number", + SInt: "number", + Float: "number", +}; + +class TypeScriptCodeGenerator extends TypeDefProcessor { + constructor() { + super({ + typeMap, + reservedKeywords: [], + fileExtension: ".ts", + }); + } + + override makeArrayType(inner: string) { + return `${inner}[]`; + } + + override makeTupleType(first: string, second: string) { + return `[${first}, ${second}]`; + } + + override formatHeaders(): string { + return [ + 'import { rpcRequest } from "./client.ts";', + this.imports + .map( + ({ source, imports }) => + `import { ${imports.join(", ")} } from "./${source}.ts";`, + ) + .join("\n"), + ].join("\n"); + } + + override formatAliasTypeDef(def: AliasTypeDef): string { + return `export type ${def.ident} = ${def.value};`; + } + + override formatRecordTypeDef(def: RecordTypeDef): string { + return `export type ${def.ident} = { +${def.props + .map((p) => ` ${p.name}${p.optional ? "?" : ""}: ${p.value}`) + .join("\n")} +}`; + } + + override formatUnionTypeDef(def: UnionTypeDef): string { + return `export type ${def.ident} = +${def.variants.map((v) => ` | ${v.value ? `{ ${v.tag}: ${v.value} }` : `"${v.tag}"`}`).join("\n")};`; + } + + override formatFuncDef(def: FuncDef) { + const params = def.params + .map((p) => `${p.name}${p.optional ? "?" : ""}: ${p.type}`) + .join(", "); + const args = def.params.length + ? `{ ${def.params.map(({ name }) => name).join(", ")} }` + : "null"; + + return `export function ${toCamelCase(def.ident)}(${params}): ${def.ret} { + return rpcRequest("${def.ident}", ${args}); +}`; + } + + override postGenerate(_sources: TypeDefSource[], outDir: string): void { + const dirname = new URL(".", import.meta.url).pathname; + const rpcClientFile = path.join(dirname, "../../rpc/typescript/client.ts"); + + fs.copySync(rpcClientFile, path.join(outDir, "client.ts"), { + overwrite: true, + }); + + console.log("client.ts was created"); + } +} + +export default TypeScriptCodeGenerator; diff --git a/src/typegraph/specs/codegen/tests/python.test.ts b/src/typegraph/specs/codegen/tests/python.test.ts new file mode 100644 index 0000000000..a092075b14 --- /dev/null +++ b/src/typegraph/specs/codegen/tests/python.test.ts @@ -0,0 +1,83 @@ +import { assertEquals } from "jsr:@std/assert"; +import PythonCodeGenerator from "../src/lib/python.ts"; +import * as utils from "./utils.ts"; + +Deno.test("Python type alias codegen", () => { + const pycg = new PythonCodeGenerator(); + + pycg.process(utils.typeAliasCase); + + const result = pycg.formatTypeDefs(); + const expected = "Foo = Bar"; + + assertEquals(result, expected); +}); + +Deno.test("Python struct codegen", () => { + const pycg = new PythonCodeGenerator(); + + pycg.process(utils.recordCase); + + const result = pycg.formatTypeDefs(); + const expected = `class RecordLike(BaseModel): + num: int + key: str + str_arr: t.List[str] + tup: t.Tuple[float, float] + opt: t.Optional[bool] + comp: t.Optional[t.List[t.Tuple[int, Something]]]`; + + assertEquals(result, expected); +}); + +Deno.test("Python union codegen", () => { + const pycg = new PythonCodeGenerator(); + + pycg.process(utils.unionCase); + + const result = pycg.formatTypeDefs(); + const expected = `EnumLike = t.Union[ + t.Literal["simple"], + t.TypedDict("EnumLikeComposite", {"composite": Something}), + t.TypedDict("EnumLikeSnakeCase", {"snake_case": bool}), +]`; + + assertEquals(result, expected); +}); + +Deno.test("Python function codegen", () => { + const pycg = new PythonCodeGenerator(); + + pycg.process(utils.funcCase); + + const result = pycg.formatFuncDefs(); + const expected = `def func(param: str, opt: t.Optional[bool] = None) -> int: + class RequestType(BaseModel): + param: str + opt: t.Optional[bool] + + class ReturnType(BaseModel): + value: int + + req = RequestType(param=param, opt=opt) + res = rpc_request("func", req.model_dump()) + ret = ReturnType(**res) + + return ret.value`; + + assertEquals(result, expected); +}); + +Deno.test("Python import codegen", () => { + const pycg = new PythonCodeGenerator(); + + pycg.process(utils.importCase); + + const result = pycg.formatHeaders(); + const expected = `import typing as t +from pydantic import BaseModel +from client import rpc_request +from foobar import Foo, Bar`; + + assertEquals(result, expected); +}); diff --git a/src/typegraph/specs/codegen/tests/rust_lib.test.ts b/src/typegraph/specs/codegen/tests/rust_lib.test.ts new file mode 100644 index 0000000000..6738833e82 --- /dev/null +++ b/src/typegraph/specs/codegen/tests/rust_lib.test.ts @@ -0,0 +1,75 @@ +import { assertEquals } from "jsr:@std/assert"; +import RustLibCodeGenerator from "../src/lib/rust_lib.ts"; +import * as utils from "./utils.ts"; + +Deno.test("Rust type alias codegen", () => { + const rustcg = new RustLibCodeGenerator(); + + rustcg.process(utils.typeAliasCase); + + const result = rustcg.formatTypeDefs(); + const expected = "pub type Foo = Bar;"; + + assertEquals(result, expected); +}); + +Deno.test("Rust struct codegen", () => { + const rustcg = new RustLibCodeGenerator(); + + rustcg.process(utils.recordCase); + + const result = rustcg.formatTypeDefs(); + const expected = `#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct RecordLike { + pub num: u32, + pub key: String, + pub str_arr: Vec, + pub tup: (f64, f64), + pub opt: Option, + pub comp: Option>, +}`; + + assertEquals(result, expected); +}); + +Deno.test("Rust enum codegen", () => { + const rustcg = new RustLibCodeGenerator(); + + rustcg.process(utils.unionCase); + + const result = rustcg.formatTypeDefs(); + const expected = `#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum EnumLike { + Simple, + Composite(Something), + SnakeCase(bool), +}`; + + assertEquals(result, expected); +}); + +Deno.test("Rust function codegen", () => { + const rustcg = new RustLibCodeGenerator(); + + rustcg.process(utils.funcCase); + + const result = rustcg.formatFuncDefs(); + const expected = `pub trait Handler { + fn func(param: String, opt: Option) -> Result; +}`; + + assertEquals(result, expected); +}); + +Deno.test("Rust import codegen", () => { + const rustcg = new RustLibCodeGenerator(); + + rustcg.process(utils.importCase); + + const result = rustcg.formatHeaders(); + const expected = `use serde::{Serialize, Deserialize}; +use super::foobar::{Foo, Bar};`; + + assertEquals(result, expected); +}); diff --git a/src/typegraph/specs/codegen/tests/treesitter.test.ts b/src/typegraph/specs/codegen/tests/treesitter.test.ts new file mode 100644 index 0000000000..579b5e2683 --- /dev/null +++ b/src/typegraph/specs/codegen/tests/treesitter.test.ts @@ -0,0 +1,25 @@ +import { assertEquals } from "jsr:@std/assert"; +import { getTypeDefs, parseTypeScript } from "../src/lib/treesitter.ts"; + +Deno.test("Treesitter typedef query", () => { + const source = ` + type Foo = "bar"; + + type MyRecord = { + foo: "bar"; + }; + + type MyUnion = "foo" | "bar"; + `; + + const tree = parseTypeScript(source); + const typeDefs = getTypeDefs(tree.rootNode); + + assertEquals(typeDefs.length, 3); + + const [first, second, third] = typeDefs.map(({ ident }) => ident.text); + + assertEquals(first, "Foo"); + assertEquals(second, "MyRecord"); + assertEquals(third, "MyUnion"); +}); diff --git a/src/typegraph/specs/codegen/tests/typescript.test.ts b/src/typegraph/specs/codegen/tests/typescript.test.ts new file mode 100644 index 0000000000..4c708bab72 --- /dev/null +++ b/src/typegraph/specs/codegen/tests/typescript.test.ts @@ -0,0 +1,71 @@ +import { assertEquals } from "jsr:@std/assert"; +import TypeScriptCodeGenerator from "../src/lib/typescript.ts"; +import * as utils from "./utils.ts"; + +Deno.test("TypeScript type alias codegen", () => { + const tscg = new TypeScriptCodeGenerator(); + + tscg.process(utils.typeAliasCase); + + const result = tscg.formatTypeDefs(); + const expected = "export type Foo = Bar;"; + + assertEquals(result, expected); +}); + +Deno.test("TypeScript struct codegen", () => { + const pycg = new TypeScriptCodeGenerator(); + + pycg.process(utils.recordCase); + + const result = pycg.formatTypeDefs(); + const expected = `export type RecordLike = { + num: number + key: string + str_arr: string[] + tup: [number, number] + opt?: boolean + comp?: [number, Something][] +}`; + + assertEquals(result, expected); +}); + +Deno.test("TypeScript union codegen", () => { + const tscg = new TypeScriptCodeGenerator(); + + tscg.process(utils.unionCase); + + const result = tscg.formatTypeDefs(); + const expected = `export type EnumLike = + | "simple" + | { composite: Something } + | { snake_case: boolean };`; + + assertEquals(result, expected); +}); + +Deno.test("TypeScript function codegen", () => { + const tscg = new TypeScriptCodeGenerator(); + + tscg.process(utils.funcCase); + + const result = tscg.formatFuncDefs(); + const expected = `export function func(param: string, opt?: boolean): number { + return rpcRequest("func", { param, opt }); +}`; + + assertEquals(result, expected); +}); + +Deno.test("TypeScript import codegen", () => { + const tscg = new TypeScriptCodeGenerator(); + + tscg.process(utils.importCase); + + const result = tscg.formatHeaders(); + const expected = `import { rpcRequest } from "./client.ts"; +import { Foo, Bar } from "./foobar.ts";`; + + assertEquals(result, expected); +}); diff --git a/src/typegraph/specs/codegen/tests/utils.ts b/src/typegraph/specs/codegen/tests/utils.ts new file mode 100644 index 0000000000..22f8302339 --- /dev/null +++ b/src/typegraph/specs/codegen/tests/utils.ts @@ -0,0 +1,31 @@ +const typeAliasCase = ` + type Foo = Bar; +`; + +const recordCase = ` + type RecordLike = { + num: UInt; + key: string; + str_arr: string[]; + tup: [Float, Float]; + opt?: boolean; + comp?: [UInt, Something][]; + }; +`; + +const unionCase = ` + type EnumLike = + | "simple" + | { composite: Something } + | { snake_case: boolean } +`; + +const funcCase = ` + type func = (param: string, opt?: boolean) => UInt; +`; + +const importCase = ` + import { Foo, Bar } from "./foobar.ts"; +`; + +export { typeAliasCase, recordCase, unionCase, funcCase, importCase }; diff --git a/src/typegraph/specs/codegen/tg-codegen b/src/typegraph/specs/codegen/tg-codegen new file mode 100755 index 0000000000..f98e09de93 --- /dev/null +++ b/src/typegraph/specs/codegen/tg-codegen @@ -0,0 +1,13 @@ +#!/bin/bash + +SCRIPT_DIR=$(dirname "$(realpath "$0")") + +DENO_PERMISSIONS=( + --allow-env + --allow-write + --allow-read + --allow-ffi + --allow-run +) + +~/.deno/bin/deno run ${DENO_PERMISSIONS[*]} "$SCRIPT_DIR/src/cmd/main.ts" "$1" "$2" diff --git a/src/typegraph/specs/types/aws.d.ts b/src/typegraph/specs/types/aws.d.ts new file mode 100644 index 0000000000..4b08cda420 --- /dev/null +++ b/src/typegraph/specs/types/aws.d.ts @@ -0,0 +1,51 @@ +import type { MaterializerId, RuntimeId } from "./core.d.ts"; +import type { UInt } from "./primitives.d.ts"; + +type S3RuntimeData = { + host_secret: string; + region_secret: string; + access_key_secret: string; + secret_key_secret: string; + path_style_secret: string; +}; + +type S3PresignGetParams = { + bucket: string; + expiry_secs?: UInt; +}; + +type S3PresignPutParams = { + bucket: string; + expiry_secs?: UInt; + content_type?: string; +}; + +type register_s3_runtime = (data: S3RuntimeData) => RuntimeId; + +type s3_presign_get = ( + runtime: RuntimeId, + data: S3PresignGetParams, +) => MaterializerId; + +type s3_presign_put = ( + runtime: RuntimeId, + data: S3PresignPutParams, +) => MaterializerId; + +type s3_list = (runtime: RuntimeId, bucket: string) => MaterializerId; + +type s3_upload = (runtime: RuntimeId, bucket: string) => MaterializerId; + +type s3_upload_all = (runtime: RuntimeId, bucket: string) => MaterializerId; + +export type { + S3RuntimeData, + S3PresignGetParams, + S3PresignPutParams, + register_s3_runtime, + s3_presign_get, + s3_presign_put, + s3_list, + s3_upload, + s3_upload_all, +}; diff --git a/src/typegraph/specs/types/core.d.ts b/src/typegraph/specs/types/core.d.ts new file mode 100644 index 0000000000..99297e38a4 --- /dev/null +++ b/src/typegraph/specs/types/core.d.ts @@ -0,0 +1,300 @@ +import type { Float, SInt, UInt } from "./primitives.d.ts"; + +type Error = { + stack: string[]; +}; + +type TypeId = UInt; +type RuntimeId = UInt; +type MaterializerId = UInt; +type PolicyId = UInt; + +type Cors = { + allow_origin: string[]; + allow_headers: string[]; + expose_headers: string[]; + allow_methods: string[]; + allow_credentials: boolean; + max_age_sec?: UInt; +}; + +type Rate = { + window_limit: UInt; + window_sec: UInt; + query_limit: UInt; + context_identifier?: string; + local_excess: UInt; +}; + +type TypegraphInitParams = { + name: string; + dynamic?: boolean; + path: string; + prefix?: string; + cors: Cors; + rate?: Rate; +}; + +type Artifact = { + path: string; + hash: string; + size: UInt; +}; + +type MigrationAction = { + apply: boolean; + create: boolean; + reset: boolean; +}; + +type PrismaMigrationConfig = { + migrations_dir: string; + migration_actions: [string, MigrationAction][]; + default_migration_action: MigrationAction; +}; + +type SerializeParams = { + typegraph_path: string; + prefix?: string; + artifact_resolution: boolean; + codegen: boolean; + prisma_migration: PrismaMigrationConfig; + pretty: boolean; +}; + +type TypeProxy = { + name: string; + extras: [string, string][]; +}; + +type TypeInteger = { + min?: SInt; + max?: SInt; + exclusive_minimum?: SInt; + exclusive_maximum?: SInt; + multiple_of?: SInt; + enumeration?: SInt[]; +}; + +type TypeFloat = { + min?: Float; + max?: Float; + exclusive_minimum?: Float; + exclusive_maximum?: Float; + multiple_of?: Float; + enumeration?: Float[]; +}; + +type TypeString = { + max?: UInt; + min?: UInt; + format?: string; + pattern?: string; + enumeration?: string[]; +}; + +type TypeFile = { + min?: UInt; + max?: UInt; + allow?: string[]; +}; + +type TypeList = { + of: TypeId; + min?: UInt; + max?: UInt; + unique_items?: boolean; +}; + +type TypeOptional = { + of: TypeId; + default_item?: string; +}; + +type TypeUnion = { + variants: TypeId[]; +}; + +type TypeEither = { + variants: TypeId[]; +}; + +type TypeStruct = { + props: [string, TypeId][]; + additional_props: boolean; + min?: UInt; + max?: UInt; + enumeration?: string[]; +}; + +type ValueSource = + | { raw: string } // json + | { context: string } // key + | { secret: string } // key + | { parent: string } // name + | { param: string }; // name + +type ParameterTransform = { + resolver_input: TypeId; + transform_tree: string; +}; + +type TypeFunc = { + inp: TypeId; + parameter_transform?: ParameterTransform; + out: TypeId; + mat: MaterializerId; + rate_calls: boolean; + rate_weight?: UInt; +}; + +type TransformData = { + query_input: TypeId; + parameter_transform: ParameterTransform; +}; + +type Policy = { + name: string; + materializer: MaterializerId; +}; + +type PolicyPerEffect = { + read?: PolicyId; + create?: PolicyId; + update?: PolicyId; + delete?: PolicyId; +}; + +type PolicySpec = { simple: PolicyId } | { per_effect: PolicyPerEffect }; + +type ContextCheck = "not_null" | { value: string } | { pattern: string }; + +type FuncParams = { + inp: TypeId; + out: TypeId; + mat: MaterializerId; +}; + +type init_typegraph = (params: TypegraphInitParams) => void; + +type serialize_typegraph = (params: SerializeParams) => [string, Artifact[]]; + +type with_injection = (type_id: TypeId, injection: string) => TypeId; + +type with_config = (type_id: TypeId, config: string) => TypeId; + +type refb = (name: string, attributes?: string) => TypeId; + +type floatb = (data: TypeFloat) => TypeId; + +type integerb = (data: TypeInteger) => TypeId; + +type booleanb = () => TypeId; + +type stringb = (data: TypeString) => TypeId; + +type as_id = (id: TypeId, composite: boolean) => TypeId; + +type fileb = (data: TypeFile) => TypeId; + +type listb = (data: TypeList) => TypeId; + +type optionalb = (data: TypeOptional) => TypeId; + +type unionb = (data: TypeUnion) => TypeId; + +type eitherb = (data: TypeEither) => TypeId; + +type structb = (data: TypeStruct) => TypeId; + +type extend_struct = (tpe: TypeId, props: [string, TypeId][]) => TypeId; + +type get_type_repr = (id: TypeId) => string; + +type funcb = (data: TypeFunc) => TypeId; + +type get_transform_data = ( + resolver_input: TypeId, + transform_tree: string, +) => TransformData; + +type register_policy = (pol: Policy) => PolicyId; + +type with_policy = (type_id: TypeId, policy_chain: PolicySpec[]) => TypeId; + +type get_public_policy = () => [PolicyId, string]; + +type get_internal_policy = () => [PolicyId, string]; + +type register_context_policy = ( + key: string, + check: ContextCheck, +) => [PolicyId, string]; + +type rename_type = (tpe: TypeId, new_name: string) => TypeId; + +type expose = (fns: [string, TypeId][], default_policy?: PolicySpec[]) => void; + +type set_seed = (seed?: UInt) => void; + +export type { + Error, + TypeId, + RuntimeId, + MaterializerId, + PolicyId, + Cors, + Rate, + TypegraphInitParams, + Artifact, + MigrationAction, + PrismaMigrationConfig, + SerializeParams, + TypeProxy, + TypeInteger, + TypeFloat, + TypeString, + TypeFile, + TypeList, + TypeOptional, + TypeUnion, + TypeEither, + TypeStruct, + ValueSource, + ParameterTransform, + TypeFunc, + TransformData, + Policy, + PolicyPerEffect, + PolicySpec, + ContextCheck, + FuncParams, + init_typegraph, + serialize_typegraph, + with_injection, + with_config, + refb, + floatb, + integerb, + booleanb, + stringb, + as_id, + fileb, + listb, + optionalb, + unionb, + eitherb, + structb, + extend_struct, + get_type_repr, + funcb, + get_transform_data, + register_policy, + with_policy, + get_public_policy, + get_internal_policy, + register_context_policy, + rename_type, + expose, + set_seed, +}; diff --git a/src/typegraph/specs/types/primitives.d.ts b/src/typegraph/specs/types/primitives.d.ts new file mode 100644 index 0000000000..dd860eedcc --- /dev/null +++ b/src/typegraph/specs/types/primitives.d.ts @@ -0,0 +1,8 @@ +type UInt = number; +type SInt = number; +type Float = number; + +// TODO: Replace JSON represented by `string` with `any` +// type Json = any; + +export type { UInt, Float, SInt }; diff --git a/src/typegraph/specs/types/runtimes.d.ts b/src/typegraph/specs/types/runtimes.d.ts new file mode 100644 index 0000000000..c42532cb55 --- /dev/null +++ b/src/typegraph/specs/types/runtimes.d.ts @@ -0,0 +1,473 @@ +import type { + FuncParams, + MaterializerId, + RuntimeId, + TypeId, +} from "./core.d.ts"; +import type { UInt } from "./primitives.d.ts"; + +type Idempotency = boolean; + +type Effect = + | "read" + | { create: Idempotency } + | { update: Idempotency } + | { delete: Idempotency }; + +type BaseMaterializer = { + runtime: RuntimeId; + effect: Effect; +}; + +type MaterializerDenoFunc = { + code: string; + secrets: string[]; +}; + +type MaterializerDenoStatic = { + value: string; +}; + +type MaterializerDenoPredefined = { + name: string; +}; + +type MaterializerDenoImport = { + func_name: string; + module: string; + deps: string[]; + secrets: string[]; +}; + +type GraphqlRuntimeData = { + endpoint: string; +}; + +type MaterializerGraphqlQuery = { + path?: string[]; +}; + +type HttpRuntimeData = { + endpoint: string; + cert_secret?: string; + basic_auth_secret?: string; +}; + +type HttpMethod = "get" | "post" | "put" | "patch" | "delete"; + +type MaterializerHttpRequest = { + method: HttpMethod; + path: string; + content_type?: string; + header_prefix?: string; + query_fields?: string[]; + rename_fields?: [string, string][]; + body_fields?: string[]; + auth_token_field?: string; +}; + +type MaterializerPythonDef = { + runtime: RuntimeId; + name: string; + fn: string; +}; + +type MaterializerPythonLambda = { + runtime: RuntimeId; + fn: string; +}; + +type MaterializerPythonModule = { + runtime: RuntimeId; + file: string; + deps: string[]; +}; + +type MaterializerPythonImport = { + module: UInt; + func_name: string; + secrets: string[]; +}; + +type RandomRuntimeData = { + seed?: UInt; + reset?: string; +}; + +type MaterializerRandom = { + runtime: RuntimeId; +}; + +type WasmRuntimeData = { + wasm_artifact: string; +}; + +type MaterializerWasmReflectedFunc = { + func_name: string; +}; + +type MaterializerWasmWireHandler = { + func_name: string; +}; + +type PrismaRuntimeData = { + name: string; + connection_string_secret: string; +}; + +type PrismaLinkData = { + target_type: TypeId; + relationship_name?: string; + foreign_key?: boolean; + target_field?: string; + unique?: boolean; +}; + +type PrismaMigrationOperation = + | "diff" + | "create" + | "apply" + | "deploy" + | "reset"; + +type TemporalRuntimeData = { + name: string; + host_secret: string; + namespace_secret?: string; +}; + +type TemporalOperationType = + | "start_workflow" + | "signal_workflow" + | "query_workflow" + | "describe_workflow"; + +type TemporalOperationData = { + mat_arg?: string; + func_arg?: TypeId; + func_out?: TypeId; + operation: TemporalOperationType; +}; + +type TypegateOperation = + | "list_typegraphs" + | "find_typegraph" + | "add_typegraph" + | "remove_typegraphs" + | "get_serialized_typegraph" + | "get_arg_info_by_path" + | "find_available_operations" + | "find_prisma_models" + | "raw_prisma_read" + | "raw_prisma_create" + | "raw_prisma_update" + | "raw_prisma_delete" + | "query_prisma_model"; + +type TypegraphOperation = "resolver" | "get_type" | "get_schema"; + +type RedisBackend = { + connection_string_secret: string; +}; + +type SubstantialBackend = "memory" | "fs" | { redis: RedisBackend }; + +type WorkflowKind = "python" | "deno"; + +type WorkflowFileDescription = { + workflows: string[]; + file: string; + deps: string[]; + kind: WorkflowKind; +}; + +type SubstantialRuntimeData = { + backend: SubstantialBackend; + file_descriptions: WorkflowFileDescription[]; +}; + +type SubstantialOperationType = + | "start" + | "start_raw" + | "stop" + | "send" + | "send_raw" + | "resources" + | "results" + | "results_raw" + | "internal_link_parent_child"; + +type SubstantialOperationData = { + func_arg?: TypeId; + func_out?: TypeId; + operation: SubstantialOperationType; +}; + +type KvRuntimeData = { + url: string; +}; + +type KvMaterializer = "get" | "set" | "delete" | "keys" | "values"; + +type GrpcRuntimeData = { + proto_file: string; + endpoint: string; +}; + +type GrpcData = { + method: string; +}; + +type get_deno_runtime = () => RuntimeId; + +type register_deno_func = ( + data: MaterializerDenoFunc, + effect: Effect, +) => MaterializerId; + +type register_deno_static = ( + data: MaterializerDenoStatic, + type_id: TypeId, +) => MaterializerId; + +type get_predefined_deno_func = ( + data: MaterializerDenoPredefined, +) => MaterializerId; + +type import_deno_function = ( + data: MaterializerDenoImport, + effect: Effect, +) => MaterializerId; + +type register_graphql_runtime = (data: GraphqlRuntimeData) => RuntimeId; + +type graphql_query = ( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, +) => MaterializerId; + +type graphql_mutation = ( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, +) => MaterializerId; + +type register_http_runtime = (data: HttpRuntimeData) => RuntimeId; + +type http_request = ( + base: BaseMaterializer, + data: MaterializerHttpRequest, +) => MaterializerId; + +type register_python_runtime = () => RuntimeId; + +type from_python_lambda = ( + base: BaseMaterializer, + data: MaterializerPythonLambda, +) => MaterializerId; + +type from_python_def = ( + base: BaseMaterializer, + data: MaterializerPythonDef, +) => MaterializerId; + +type from_python_module = ( + base: BaseMaterializer, + data: MaterializerPythonModule, +) => MaterializerId; + +type from_python_import = ( + base: BaseMaterializer, + data: MaterializerPythonImport, +) => MaterializerId; + +type register_random_runtime = (data: RandomRuntimeData) => MaterializerId; + +type create_random_mat = ( + base: BaseMaterializer, + data: MaterializerRandom, +) => MaterializerId; + +type register_wasm_reflected_runtime = (data: WasmRuntimeData) => RuntimeId; + +type from_wasm_reflected_func = ( + base: BaseMaterializer, + data: MaterializerWasmReflectedFunc, +) => MaterializerId; + +type register_wasm_wire_runtime = (data: WasmRuntimeData) => RuntimeId; + +type from_wasm_wire_handler = ( + base: BaseMaterializer, + data: MaterializerWasmWireHandler, +) => MaterializerId; + +type register_prisma_runtime = (data: PrismaRuntimeData) => RuntimeId; + +type prisma_find_unique = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_find_many = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_find_first = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_aggregate = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_count = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_group_by = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_create_one = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_create_many = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_update_one = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_update_many = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_upsert_one = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_delete_one = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_delete_many = (runtime: RuntimeId, model: TypeId) => FuncParams; + +type prisma_execute = ( + runtime: RuntimeId, + query: string, + param: TypeId, + effect: Effect, +) => FuncParams; + +type prisma_query_raw = ( + runtime: RuntimeId, + query: string, + out: TypeId, + param?: TypeId, +) => FuncParams; + +type prisma_link = (data: PrismaLinkData) => TypeId; + +type prisma_migration = (operation: PrismaMigrationOperation) => FuncParams; + +type register_temporal_runtime = (data: TemporalRuntimeData) => RuntimeId; + +type generate_temporal_operation = ( + runtime: RuntimeId, + data: TemporalOperationData, +) => FuncParams; + +type register_typegate_materializer = ( + operation: TypegateOperation, +) => MaterializerId; + +type register_typegraph_materializer = ( + operation: TypegraphOperation, +) => MaterializerId; + +type register_substantial_runtime = (data: SubstantialRuntimeData) => RuntimeId; + +type generate_substantial_operation = ( + runtime: RuntimeId, + data: SubstantialOperationData, +) => FuncParams; + +type register_kv_runtime = (data: KvRuntimeData) => RuntimeId; + +type kv_operation = ( + base: BaseMaterializer, + data: KvMaterializer, +) => MaterializerId; + +type register_grpc_runtime = (data: GrpcRuntimeData) => RuntimeId; + +type call_grpc_method = (runtime: RuntimeId, data: GrpcData) => FuncParams; + +export type { + Idempotency, + Effect, + BaseMaterializer, + MaterializerDenoFunc, + MaterializerDenoStatic, + MaterializerDenoPredefined, + MaterializerDenoImport, + GraphqlRuntimeData, + MaterializerGraphqlQuery, + HttpRuntimeData, + HttpMethod, + MaterializerHttpRequest, + MaterializerPythonDef, + MaterializerPythonLambda, + MaterializerPythonModule, + MaterializerPythonImport, + RandomRuntimeData, + MaterializerRandom, + WasmRuntimeData, + MaterializerWasmReflectedFunc, + MaterializerWasmWireHandler, + PrismaRuntimeData, + PrismaLinkData, + PrismaMigrationOperation, + TemporalRuntimeData, + TemporalOperationType, + TemporalOperationData, + TypegateOperation, + TypegraphOperation, + RedisBackend, + SubstantialBackend, + WorkflowKind, + WorkflowFileDescription, + SubstantialRuntimeData, + SubstantialOperationType, + SubstantialOperationData, + KvRuntimeData, + KvMaterializer, + GrpcRuntimeData, + GrpcData, + get_deno_runtime, + register_deno_func, + register_deno_static, + get_predefined_deno_func, + import_deno_function, + register_graphql_runtime, + graphql_query, + graphql_mutation, + register_http_runtime, + http_request, + register_python_runtime, + from_python_lambda, + from_python_def, + from_python_module, + from_python_import, + register_random_runtime, + create_random_mat, + register_wasm_reflected_runtime, + register_wasm_wire_runtime, + from_wasm_reflected_func, + from_wasm_wire_handler, + register_prisma_runtime, + prisma_find_unique, + prisma_find_many, + prisma_find_first, + prisma_aggregate, + prisma_count, + prisma_group_by, + prisma_create_one, + prisma_create_many, + prisma_update_one, + prisma_update_many, + prisma_upsert_one, + prisma_delete_one, + prisma_delete_many, + prisma_execute, + prisma_query_raw, + prisma_link, + prisma_migration, + register_temporal_runtime, + generate_temporal_operation, + register_typegate_materializer, + register_typegraph_materializer, + register_substantial_runtime, + generate_substantial_operation, + register_kv_runtime, + kv_operation, + register_grpc_runtime, + call_grpc_method, +}; diff --git a/src/typegraph/specs/types/utils.d.ts b/src/typegraph/specs/types/utils.d.ts new file mode 100644 index 0000000000..9eda1f1194 --- /dev/null +++ b/src/typegraph/specs/types/utils.d.ts @@ -0,0 +1,86 @@ +import type { TypeId } from "./core.d.ts"; +import type { UInt } from "./primitives.d.ts"; + +type ReduceEntry = { + path: string[]; + injection_data: string; +}; + +type AuthProtocol = "oauth2" | "jwt" | "basic"; + +type Auth = { + name: string; + protocol: AuthProtocol; + auth_data: [string, string][]; // string => json string +}; + +type QueryDeployParams = { + tg: string; + secrets?: [string, string][]; +}; + +type FdkConfig = { + workspace_path: string; + target_name: string; + config_json: string; + tg_json: string; +}; + +type FdkOutput = { + path: string; + content: string; + overwrite: boolean; +}; + +type reduceb = (super_type_id: TypeId, entries: ReduceEntry[]) => TypeId; + +type add_graphql_endpoint = (graphql: string) => UInt; + +type add_auth = (data: Auth) => UInt; + +type add_raw_auth = (data: string) => UInt; + +type oauth2 = (service_name: string, scopes: string) => string; + +type oauth2_without_profiler = (service_name: string, scopes: string) => string; + +type oauth2_with_extended_profiler = ( + service_name: string, + scopes: string, + extension: string, +) => string; + +type oauth2_with_custom_profiler = ( + service_name: string, + scopes: string, + profiler: TypeId, +) => string; + +type gql_deploy_query = (params: QueryDeployParams) => string; + +type gql_remove_query = (tg_name: string[]) => string; + +type metagen_exec = (config: FdkConfig) => FdkOutput[]; + +type metagen_write_files = (items: FdkOutput[], typegraph_dir: string) => void; + +export type { + ReduceEntry, + AuthProtocol, + Auth, + QueryDeployParams, + FdkConfig, + FdkOutput, + reduceb, + add_graphql_endpoint, + add_auth, + add_raw_auth, + oauth2, + oauth2_without_profiler, + oauth2_with_extended_profiler, + oauth2_with_custom_profiler, + gql_deploy_query, + gql_remove_query, + metagen_exec, + metagen_write_files, +}; From c3e62f90cd075a726513b9c48c74dc25682f6f45 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 28 Oct 2024 10:57:07 +0300 Subject: [PATCH 02/39] wip: dummy server & client sdk rewrite [skip ci] --- Cargo.lock | 1 + Cargo.toml | 1 + src/meta-cli/src/deploy/actors/task/action.rs | 2 +- src/meta-cli/src/deploy/actors/task/deploy.rs | 12 +- src/meta-cli/src/deploy/actors/task/list.rs | 2 +- .../src/deploy/actors/task/serialize.rs | 7 +- src/meta-cli/src/deploy/actors/task_io.rs | 2 +- src/meta-cli/src/typegraph/mod.rs | 1 + src/meta-cli/src/typegraph/rpc/aws.rs | 30 +++ src/meta-cli/src/typegraph/rpc/core.rs | 72 +++++++ src/meta-cli/src/typegraph/rpc/mod.rs | 24 +++ src/meta-cli/src/typegraph/rpc/runtimes.rs | 116 +++++++++++ src/meta-cli/src/typegraph/rpc/utils.rs | 42 ++++ src/typegraph/core/src/conversion/runtimes.rs | 9 +- src/typegraph/core/src/lib.rs | 6 + src/typegraph/core/src/typegraph.rs | 8 + src/typegraph/core/src/types/sdk/core.rs | 1 - src/typegraph/core/src/types/sdk/mod.rs | 5 +- src/typegraph/core/src/types/sdk/runtimes.rs | 4 +- src/typegraph/deno/deno.json | 8 +- src/typegraph/deno/src/effects.ts | 23 +- src/typegraph/deno/src/host/host.d.ts | 22 -- src/typegraph/deno/src/host/host.js | 85 -------- src/typegraph/deno/src/metagen.ts | 38 ++-- src/typegraph/deno/src/params.ts | 18 +- src/typegraph/deno/src/policy.ts | 15 +- src/typegraph/deno/src/providers/aws.ts | 26 +-- src/typegraph/deno/src/providers/prisma.ts | 16 +- src/typegraph/deno/src/providers/temporal.ts | 35 +--- src/typegraph/deno/src/runtimes/deno.ts | 18 +- src/typegraph/deno/src/runtimes/graphql.ts | 4 +- src/typegraph/deno/src/runtimes/grpc.ts | 4 +- src/typegraph/deno/src/runtimes/http.ts | 14 +- src/typegraph/deno/src/runtimes/kv.ts | 25 ++- src/typegraph/deno/src/runtimes/python.ts | 28 +-- src/typegraph/deno/src/runtimes/random.ts | 4 +- .../deno/src/runtimes/substantial.ts | 67 ++---- src/typegraph/deno/src/runtimes/wasm.ts | 12 +- src/typegraph/deno/src/sdk.ts | 12 ++ src/typegraph/deno/src/tg_artifact_upload.ts | 5 +- src/typegraph/deno/src/tg_deploy.ts | 25 ++- src/typegraph/deno/src/tg_manage.ts | 26 +-- src/typegraph/deno/src/typegraph.ts | 52 ++--- src/typegraph/deno/src/types.ts | 131 +++++------- src/typegraph/deno/src/utils/func_utils.ts | 35 ++-- src/typegraph/deno/src/wit.ts | 22 -- .../python/typegraph/deploy/request.py | 4 +- src/typegraph/python/typegraph/effects.py | 23 +- .../python/typegraph/graph/metagen.py | 19 +- .../python/typegraph/graph/params.py | 88 +++----- .../python/typegraph/graph/shared_types.py | 3 +- .../typegraph/graph/tg_artifact_upload.py | 52 +++-- .../python/typegraph/graph/tg_deploy.py | 22 +- .../python/typegraph/graph/tg_manage.py | 18 +- .../python/typegraph/graph/typegraph.py | 62 ++---- src/typegraph/python/typegraph/host/host.py | 70 ------- src/typegraph/python/typegraph/io.py | 2 +- src/typegraph/python/typegraph/policy.py | 76 +++---- .../python/typegraph/providers/aws.py | 45 ++-- .../python/typegraph/providers/prisma.py | 106 ++++------ .../python/typegraph/providers/temporal.py | 34 +-- .../python/typegraph/runtimes/base.py | 4 +- .../python/typegraph/runtimes/deno.py | 56 ++--- .../python/typegraph/runtimes/graphql.py | 26 +-- .../python/typegraph/runtimes/grpc.py | 18 +- .../python/typegraph/runtimes/http.py | 36 ++-- src/typegraph/python/typegraph/runtimes/kv.py | 30 +-- .../python/typegraph/runtimes/python.py | 52 ++--- .../python/typegraph/runtimes/random.py | 20 +- .../python/typegraph/runtimes/substantial.py | 69 ++---- .../python/typegraph/runtimes/wasm.py | 34 +-- src/typegraph/python/typegraph/t.py | 197 +++++------------- src/typegraph/python/typegraph/utils.py | 4 +- src/typegraph/python/typegraph/wit.py | 76 +++---- .../specs/codegen/rpc/python/client.py | 2 +- .../specs/codegen/rpc/tests/client.test.ts | 8 +- .../specs/codegen/rpc/typescript/client.ts | 2 +- src/typegraph/specs/codegen/src/cmd/main.ts | 27 +-- src/typegraph/specs/codegen/src/cmd/utils.ts | 18 +- src/typegraph/specs/codegen/src/lib/base.ts | 21 +- src/typegraph/specs/codegen/src/lib/python.ts | 17 +- .../specs/codegen/src/lib/rust_lib.ts | 29 ++- .../specs/codegen/src/lib/rust_rpc.ts | 106 ++++++++++ .../specs/codegen/src/lib/typescript.ts | 18 +- .../specs/codegen/tests/typescript.test.ts | 8 +- src/typegraph/specs/types/runtimes.d.ts | 4 +- 86 files changed, 1201 insertions(+), 1420 deletions(-) create mode 100644 src/meta-cli/src/typegraph/rpc/aws.rs create mode 100644 src/meta-cli/src/typegraph/rpc/core.rs create mode 100644 src/meta-cli/src/typegraph/rpc/mod.rs create mode 100644 src/meta-cli/src/typegraph/rpc/runtimes.rs create mode 100644 src/meta-cli/src/typegraph/rpc/utils.rs delete mode 100644 src/typegraph/deno/src/host/host.d.ts delete mode 100644 src/typegraph/deno/src/host/host.js create mode 100644 src/typegraph/deno/src/sdk.ts delete mode 100644 src/typegraph/deno/src/wit.ts delete mode 100644 src/typegraph/python/typegraph/host/host.py create mode 100644 src/typegraph/specs/codegen/src/lib/rust_rpc.ts diff --git a/Cargo.lock b/Cargo.lock index 44fccc390b..fcc66a9ecd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6953,6 +6953,7 @@ dependencies = [ "tracing-subscriber", "tracing-unwrap", "typegate_engine", + "typegraph_core", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 89e993ee2e..d6127f5819 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,7 @@ common = { path = "src/common/" } substantial = { path = "src/substantial/" } metagen = { path = "src/metagen/" } typegate_engine = { path = "src/typegate/engine" } +typegraph_core = { path = "src/typegraph/core" } # cli clap = "=4.5.13" diff --git a/src/meta-cli/src/deploy/actors/task/action.rs b/src/meta-cli/src/deploy/actors/task/action.rs index 58cf134414..010f569937 100644 --- a/src/meta-cli/src/deploy/actors/task/action.rs +++ b/src/meta-cli/src/deploy/actors/task/action.rs @@ -103,7 +103,7 @@ pub trait TaskAction: std::fmt::Debug + Clone + Send + Unpin { fn get_rpc_response( &self, - call: &Self::RpcCall, + call: Self::RpcCall, ) -> impl Future>; } diff --git a/src/meta-cli/src/deploy/actors/task/deploy.rs b/src/meta-cli/src/deploy/actors/task/deploy.rs index 0809e8aab1..c64fbdb9da 100644 --- a/src/meta-cli/src/deploy/actors/task/deploy.rs +++ b/src/meta-cli/src/deploy/actors/task/deploy.rs @@ -12,6 +12,7 @@ use crate::deploy::actors::console::Console; use crate::deploy::actors::task_manager::TaskRef; use crate::interlude::*; use crate::secrets::Secrets; +use crate::typegraph::rpc::{RpcCall as TypegraphRpcCall, RpcDispatch}; use color_eyre::owo_colors::OwoColorize; use common::node::Node; use serde::Deserialize; @@ -161,7 +162,11 @@ pub enum MigrationActionOverride { #[serde(tag = "method", content = "params")] pub enum RpcCall { GetDeployTarget, - GetDeployData { typegraph: String }, + GetDeployData { + typegraph: String, + }, + #[serde(untagged)] + TypegraphCall(TypegraphRpcCall), } struct ResetDatabase(PrismaRuntimeId); @@ -297,14 +302,15 @@ impl TaskAction for DeployAction { &self.task_ref } - async fn get_rpc_response(&self, call: &RpcCall) -> Result { + async fn get_rpc_response(&self, call: RpcCall) -> Result { match call { RpcCall::GetDeployTarget => { let deploy_target: &Node = &self.deploy_target; Ok(serde_json::to_value(deploy_target)?) } - RpcCall::GetDeployData { typegraph } => Ok(self.get_deploy_data(typegraph).await?), + RpcCall::GetDeployData { typegraph } => Ok(self.get_deploy_data(&typegraph).await?), + RpcCall::TypegraphCall(call) => Ok(call.dispatch()?), } } } diff --git a/src/meta-cli/src/deploy/actors/task/list.rs b/src/meta-cli/src/deploy/actors/task/list.rs index f2e6b26ec5..c057dd84b9 100644 --- a/src/meta-cli/src/deploy/actors/task/list.rs +++ b/src/meta-cli/src/deploy/actors/task/list.rs @@ -175,7 +175,7 @@ impl TaskAction for ListAction { &self.task_ref } - async fn get_rpc_response(&self, _call: &serde_json::Value) -> Result { + async fn get_rpc_response(&self, _call: serde_json::Value) -> Result { Err(ferr!("rpc request not supported on list task")) } } diff --git a/src/meta-cli/src/deploy/actors/task/serialize.rs b/src/meta-cli/src/deploy/actors/task/serialize.rs index fefa118033..ccfe5ec89c 100644 --- a/src/meta-cli/src/deploy/actors/task/serialize.rs +++ b/src/meta-cli/src/deploy/actors/task/serialize.rs @@ -10,6 +10,7 @@ use super::deploy::MigrationAction; use crate::deploy::actors::console::Console; use crate::deploy::actors::task_manager::TaskRef; use crate::interlude::*; +use crate::typegraph::rpc::{RpcCall as TypegraphRpcCall, RpcDispatch}; use color_eyre::owo_colors::OwoColorize; use common::typegraph::Typegraph; use serde::Deserialize; @@ -106,7 +107,7 @@ impl TaskAction for SerializeAction { type FailureData = SerializeError; type Options = SerializeOptions; type Generator = SerializeActionGenerator; - type RpcCall = serde_json::Value; + type RpcCall = TypegraphRpcCall; async fn get_command(&self) -> Result { build_task_command( @@ -171,7 +172,7 @@ impl TaskAction for SerializeAction { &self.task_ref } - async fn get_rpc_response(&self, _call: &serde_json::Value) -> Result { - Err(ferr!("rpc request not supported on serialize task")) + async fn get_rpc_response(&self, call: Self::RpcCall) -> Result { + Ok(call.dispatch()?) } } diff --git a/src/meta-cli/src/deploy/actors/task_io.rs b/src/meta-cli/src/deploy/actors/task_io.rs index c1a69ff527..e396157e5c 100644 --- a/src/meta-cli/src/deploy/actors/task_io.rs +++ b/src/meta-cli/src/deploy/actors/task_io.rs @@ -257,7 +257,7 @@ impl TaskIoActor { let scope = self.get_console_scope(); let fut = async move { - match action.get_rpc_response(&rpc_call).await { + match action.get_rpc_response(rpc_call).await { Ok(response) => { self_addr.do_send(message::SendRpcResponse(req.response(response))); } diff --git a/src/meta-cli/src/typegraph/mod.rs b/src/meta-cli/src/typegraph/mod.rs index 59ff4b4670..002b0bb2eb 100644 --- a/src/meta-cli/src/typegraph/mod.rs +++ b/src/meta-cli/src/typegraph/mod.rs @@ -3,3 +3,4 @@ pub mod dependency_graph; pub mod loader; +pub mod rpc; diff --git a/src/meta-cli/src/typegraph/rpc/aws.rs b/src/meta-cli/src/typegraph/rpc/aws.rs new file mode 100644 index 0000000000..94cbcc5cc6 --- /dev/null +++ b/src/meta-cli/src/typegraph/rpc/aws.rs @@ -0,0 +1,30 @@ +use serde::{Serialize, Deserialize}; +use serde_json::Value; +use typegraph_core::{errors::Result, Lib}; +use typegraph_core::sdk::aws::*; +#[allow(unused)] +use typegraph_core::sdk::core::{MaterializerId, RuntimeId}; + +#[derive(Debug, Serialize, Deserialize)] +#[serde(tag = "method", content = "params", rename_all="snake_case")] +pub enum RpcCall { + RegisterS3Runtime { data: S3RuntimeData }, + S3PresignGet { runtime: RuntimeId, data: S3PresignGetParams }, + S3PresignPut { runtime: RuntimeId, data: S3PresignPutParams }, + S3List { runtime: RuntimeId, bucket: String }, + S3Upload { runtime: RuntimeId, bucket: String }, + S3UploadAll { runtime: RuntimeId, bucket: String }, +} + +impl super::RpcDispatch for RpcCall { + fn dispatch(self) -> Result { + match self { + Self::RegisterS3Runtime { data } => Lib::register_s3_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::S3PresignGet { runtime, data } => Lib::s3_presign_get(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + Self::S3PresignPut { runtime, data } => Lib::s3_presign_put(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + Self::S3List { runtime, bucket } => Lib::s3_list(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), + Self::S3Upload { runtime, bucket } => Lib::s3_upload(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), + Self::S3UploadAll { runtime, bucket } => Lib::s3_upload_all(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), + } + } +} \ No newline at end of file diff --git a/src/meta-cli/src/typegraph/rpc/core.rs b/src/meta-cli/src/typegraph/rpc/core.rs new file mode 100644 index 0000000000..59d54527df --- /dev/null +++ b/src/meta-cli/src/typegraph/rpc/core.rs @@ -0,0 +1,72 @@ +use serde::{Serialize, Deserialize}; +use serde_json::Value; +use typegraph_core::{errors::Result, Lib}; +use typegraph_core::sdk::core::*; + +#[derive(Debug, Serialize, Deserialize)] +#[serde(tag = "method", content = "params", rename_all="snake_case")] +pub enum RpcCall { + InitTypegraph { params: TypegraphInitParams }, + SerializeTypegraph { params: SerializeParams }, + WithInjection { type_id: TypeId, injection: String }, + WithConfig { type_id: TypeId, config: String }, + Refb { name: String, attributes: Option }, + Floatb { data: TypeFloat }, + Integerb { data: TypeInteger }, + Booleanb, + Stringb { data: TypeString }, + AsId { id: TypeId, composite: bool }, + Fileb { data: TypeFile }, + Listb { data: TypeList }, + Optionalb { data: TypeOptional }, + Unionb { data: TypeUnion }, + Eitherb { data: TypeEither }, + Structb { data: TypeStruct }, + ExtendStruct { tpe: TypeId, props: Vec<(String, TypeId)> }, + GetTypeRepr { id: TypeId }, + Funcb { data: TypeFunc }, + GetTransformData { resolver_input: TypeId, transform_tree: String }, + RegisterPolicy { pol: Policy }, + WithPolicy { type_id: TypeId, policy_chain: Vec }, + GetPublicPolicy, + GetInternalPolicy, + RegisterContextPolicy { key: String, check: ContextCheck }, + RenameType { tpe: TypeId, new_name: String }, + Expose { fns: Vec<(String, TypeId)>, default_policy: Option> }, + SetSeed { seed: Option }, +} + +impl super::RpcDispatch for RpcCall { + fn dispatch(self) -> Result { + match self { + Self::InitTypegraph { params } => Lib::init_typegraph(params).map(|res| serde_json::to_value(res).unwrap()), + Self::SerializeTypegraph { params } => Lib::serialize_typegraph(params).map(|res| serde_json::to_value(res).unwrap()), + Self::WithInjection { type_id, injection } => Lib::with_injection(type_id, injection).map(|res| serde_json::to_value(res).unwrap()), + Self::WithConfig { type_id, config } => Lib::with_config(type_id, config).map(|res| serde_json::to_value(res).unwrap()), + Self::Refb { name, attributes } => Lib::refb(name, attributes).map(|res| serde_json::to_value(res).unwrap()), + Self::Floatb { data } => Lib::floatb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Integerb { data } => Lib::integerb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Booleanb => Lib::booleanb().map(|res| serde_json::to_value(res).unwrap()), + Self::Stringb { data } => Lib::stringb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::AsId { id, composite } => Lib::as_id(id, composite).map(|res| serde_json::to_value(res).unwrap()), + Self::Fileb { data } => Lib::fileb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Listb { data } => Lib::listb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Optionalb { data } => Lib::optionalb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Unionb { data } => Lib::unionb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Eitherb { data } => Lib::eitherb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Structb { data } => Lib::structb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::ExtendStruct { tpe, props } => Lib::extend_struct(tpe, props).map(|res| serde_json::to_value(res).unwrap()), + Self::GetTypeRepr { id } => Lib::get_type_repr(id).map(|res| serde_json::to_value(res).unwrap()), + Self::Funcb { data } => Lib::funcb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::GetTransformData { resolver_input, transform_tree } => Lib::get_transform_data(resolver_input, transform_tree).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterPolicy { pol } => Lib::register_policy(pol).map(|res| serde_json::to_value(res).unwrap()), + Self::WithPolicy { type_id, policy_chain } => Lib::with_policy(type_id, policy_chain).map(|res| serde_json::to_value(res).unwrap()), + Self::GetPublicPolicy => Lib::get_public_policy().map(|res| serde_json::to_value(res).unwrap()), + Self::GetInternalPolicy => Lib::get_internal_policy().map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterContextPolicy { key, check } => Lib::register_context_policy(key, check).map(|res| serde_json::to_value(res).unwrap()), + Self::RenameType { tpe, new_name } => Lib::rename_type(tpe, new_name).map(|res| serde_json::to_value(res).unwrap()), + Self::Expose { fns, default_policy } => Lib::expose(fns, default_policy).map(|res| serde_json::to_value(res).unwrap()), + Self::SetSeed { seed } => Lib::set_seed(seed).map(|res| serde_json::to_value(res).unwrap()), + } + } +} \ No newline at end of file diff --git a/src/meta-cli/src/typegraph/rpc/mod.rs b/src/meta-cli/src/typegraph/rpc/mod.rs new file mode 100644 index 0000000000..69054ff957 --- /dev/null +++ b/src/meta-cli/src/typegraph/rpc/mod.rs @@ -0,0 +1,24 @@ +pub mod aws; +pub mod core; +pub mod runtimes; +pub mod utils; + +use enum_dispatch::enum_dispatch; +use serde::{Serialize, Deserialize}; +use serde_json::Value; +use typegraph_core::errors::Result; + +#[enum_dispatch] +pub trait RpcDispatch { + fn dispatch(self) -> Result; +} + +#[derive(Debug, Serialize, Deserialize)] +#[enum_dispatch(RpcDispatch)] +#[serde(untagged)] +pub enum RpcCall { + Aws(aws::RpcCall), + Core(core::RpcCall), + Runtimes(runtimes::RpcCall), + Utils(utils::RpcCall), +} \ No newline at end of file diff --git a/src/meta-cli/src/typegraph/rpc/runtimes.rs b/src/meta-cli/src/typegraph/rpc/runtimes.rs new file mode 100644 index 0000000000..0918a0ee86 --- /dev/null +++ b/src/meta-cli/src/typegraph/rpc/runtimes.rs @@ -0,0 +1,116 @@ +use serde::{Serialize, Deserialize}; +use serde_json::Value; +use typegraph_core::{errors::Result, Lib}; +use typegraph_core::sdk::runtimes::*; +#[allow(unused)] +use typegraph_core::sdk::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; + +#[derive(Debug, Serialize, Deserialize)] +#[serde(tag = "method", content = "params", rename_all="snake_case")] +pub enum RpcCall { + GetDenoRuntime, + RegisterDenoFunc { data: MaterializerDenoFunc, effect: Effect }, + RegisterDenoStatic { data: MaterializerDenoStatic, type_id: TypeId }, + GetPredefinedDenoFunc { data: MaterializerDenoPredefined }, + ImportDenoFunction { data: MaterializerDenoImport, effect: Effect }, + RegisterGraphqlRuntime { data: GraphqlRuntimeData }, + GraphqlQuery { base: BaseMaterializer, data: MaterializerGraphqlQuery }, + GraphqlMutation { base: BaseMaterializer, data: MaterializerGraphqlQuery }, + RegisterHttpRuntime { data: HttpRuntimeData }, + HttpRequest { base: BaseMaterializer, data: MaterializerHttpRequest }, + RegisterPythonRuntime, + FromPythonLambda { base: BaseMaterializer, data: MaterializerPythonLambda }, + FromPythonDef { base: BaseMaterializer, data: MaterializerPythonDef }, + FromPythonModule { base: BaseMaterializer, data: MaterializerPythonModule }, + FromPythonImport { base: BaseMaterializer, data: MaterializerPythonImport }, + RegisterRandomRuntime { data: RandomRuntimeData }, + CreateRandomMat { base: BaseMaterializer, data: MaterializerRandom }, + RegisterWasmReflectedRuntime { data: WasmRuntimeData }, + FromWasmReflectedFunc { base: BaseMaterializer, data: MaterializerWasmReflectedFunc }, + RegisterWasmWireRuntime { data: WasmRuntimeData }, + FromWasmWireHandler { base: BaseMaterializer, data: MaterializerWasmWireHandler }, + RegisterPrismaRuntime { data: PrismaRuntimeData }, + PrismaFindUnique { runtime: RuntimeId, model: TypeId }, + PrismaFindMany { runtime: RuntimeId, model: TypeId }, + PrismaFindFirst { runtime: RuntimeId, model: TypeId }, + PrismaAggregate { runtime: RuntimeId, model: TypeId }, + PrismaCount { runtime: RuntimeId, model: TypeId }, + PrismaGroupBy { runtime: RuntimeId, model: TypeId }, + PrismaCreateOne { runtime: RuntimeId, model: TypeId }, + PrismaCreateMany { runtime: RuntimeId, model: TypeId }, + PrismaUpdateOne { runtime: RuntimeId, model: TypeId }, + PrismaUpdateMany { runtime: RuntimeId, model: TypeId }, + PrismaUpsertOne { runtime: RuntimeId, model: TypeId }, + PrismaDeleteOne { runtime: RuntimeId, model: TypeId }, + PrismaDeleteMany { runtime: RuntimeId, model: TypeId }, + PrismaExecute { runtime: RuntimeId, query: String, param: TypeId, effect: Effect }, + PrismaQueryRaw { runtime: RuntimeId, query: String, out: TypeId, param: Option }, + PrismaLink { data: PrismaLinkData }, + PrismaMigration { operation: PrismaMigrationOperation }, + RegisterTemporalRuntime { data: TemporalRuntimeData }, + GenerateTemporalOperation { runtime: RuntimeId, data: TemporalOperationData }, + RegisterTypegateMaterializer { operation: TypegateOperation }, + RegisterTypegraphMaterializer { operation: TypegraphOperation }, + RegisterSubstantialRuntime { data: SubstantialRuntimeData }, + GenerateSubstantialOperation { runtime: RuntimeId, data: SubstantialOperationData }, + RegisterKvRuntime { data: KvRuntimeData }, + KvOperation { base: BaseMaterializer, data: KvMaterializer }, + RegisterGrpcRuntime { data: GrpcRuntimeData }, + CallGrpcMethod { runtime: RuntimeId, data: GrpcData }, +} + +impl super::RpcDispatch for RpcCall { + fn dispatch(self) -> Result { + match self { + Self::GetDenoRuntime => Lib::get_deno_runtime().map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterDenoFunc { data, effect } => Lib::register_deno_func(data, effect).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterDenoStatic { data, type_id } => Lib::register_deno_static(data, type_id).map(|res| serde_json::to_value(res).unwrap()), + Self::GetPredefinedDenoFunc { data } => Lib::get_predefined_deno_func(data).map(|res| serde_json::to_value(res).unwrap()), + Self::ImportDenoFunction { data, effect } => Lib::import_deno_function(data, effect).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterGraphqlRuntime { data } => Lib::register_graphql_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::GraphqlQuery { base, data } => Lib::graphql_query(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::GraphqlMutation { base, data } => Lib::graphql_mutation(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterHttpRuntime { data } => Lib::register_http_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::HttpRequest { base, data } => Lib::http_request(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterPythonRuntime => Lib::register_python_runtime().map(|res| serde_json::to_value(res).unwrap()), + Self::FromPythonLambda { base, data } => Lib::from_python_lambda(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::FromPythonDef { base, data } => Lib::from_python_def(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::FromPythonModule { base, data } => Lib::from_python_module(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::FromPythonImport { base, data } => Lib::from_python_import(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterRandomRuntime { data } => Lib::register_random_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::CreateRandomMat { base, data } => Lib::create_random_mat(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterWasmReflectedRuntime { data } => Lib::register_wasm_reflected_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::FromWasmReflectedFunc { base, data } => Lib::from_wasm_reflected_func(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterWasmWireRuntime { data } => Lib::register_wasm_wire_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::FromWasmWireHandler { base, data } => Lib::from_wasm_wire_handler(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterPrismaRuntime { data } => Lib::register_prisma_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaFindUnique { runtime, model } => Lib::prisma_find_unique(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaFindMany { runtime, model } => Lib::prisma_find_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaFindFirst { runtime, model } => Lib::prisma_find_first(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaAggregate { runtime, model } => Lib::prisma_aggregate(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaCount { runtime, model } => Lib::prisma_count(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaGroupBy { runtime, model } => Lib::prisma_group_by(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaCreateOne { runtime, model } => Lib::prisma_create_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaCreateMany { runtime, model } => Lib::prisma_create_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaUpdateOne { runtime, model } => Lib::prisma_update_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaUpdateMany { runtime, model } => Lib::prisma_update_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaUpsertOne { runtime, model } => Lib::prisma_upsert_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaDeleteOne { runtime, model } => Lib::prisma_delete_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaDeleteMany { runtime, model } => Lib::prisma_delete_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaExecute { runtime, query, param, effect } => Lib::prisma_execute(runtime, query, param, effect).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaQueryRaw { runtime, query, out, param } => Lib::prisma_query_raw(runtime, query, out, param).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaLink { data } => Lib::prisma_link(data).map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaMigration { operation } => Lib::prisma_migration(operation).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterTemporalRuntime { data } => Lib::register_temporal_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::GenerateTemporalOperation { runtime, data } => Lib::generate_temporal_operation(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterTypegateMaterializer { operation } => Lib::register_typegate_materializer(operation).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterTypegraphMaterializer { operation } => Lib::register_typegraph_materializer(operation).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterSubstantialRuntime { data } => Lib::register_substantial_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::GenerateSubstantialOperation { runtime, data } => Lib::generate_substantial_operation(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterKvRuntime { data } => Lib::register_kv_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::KvOperation { base, data } => Lib::kv_operation(base, data).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterGrpcRuntime { data } => Lib::register_grpc_runtime(data).map(|res| serde_json::to_value(res).unwrap()), + Self::CallGrpcMethod { runtime, data } => Lib::call_grpc_method(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + } + } +} \ No newline at end of file diff --git a/src/meta-cli/src/typegraph/rpc/utils.rs b/src/meta-cli/src/typegraph/rpc/utils.rs new file mode 100644 index 0000000000..87a04ed659 --- /dev/null +++ b/src/meta-cli/src/typegraph/rpc/utils.rs @@ -0,0 +1,42 @@ +use serde::{Serialize, Deserialize}; +use serde_json::Value; +use typegraph_core::{errors::Result, Lib}; +use typegraph_core::sdk::utils::*; +#[allow(unused)] +use typegraph_core::sdk::core::TypeId; + +#[derive(Debug, Serialize, Deserialize)] +#[serde(tag = "method", content = "params", rename_all="snake_case")] +pub enum RpcCall { + Reduceb { super_type_id: TypeId, entries: Vec }, + AddGraphqlEndpoint { graphql: String }, + AddAuth { data: Auth }, + AddRawAuth { data: String }, + Oauth2 { service_name: String, scopes: String }, + Oauth2WithoutProfiler { service_name: String, scopes: String }, + Oauth2WithExtendedProfiler { service_name: String, scopes: String, extension: String }, + Oauth2WithCustomProfiler { service_name: String, scopes: String, profiler: TypeId }, + GqlDeployQuery { params: QueryDeployParams }, + GqlRemoveQuery { tg_name: Vec }, + MetagenExec { config: FdkConfig }, + MetagenWriteFiles { items: Vec, typegraph_dir: String }, +} + +impl super::RpcDispatch for RpcCall { + fn dispatch(self) -> Result { + match self { + Self::Reduceb { super_type_id, entries } => Lib::reduceb(super_type_id, entries).map(|res| serde_json::to_value(res).unwrap()), + Self::AddGraphqlEndpoint { graphql } => Lib::add_graphql_endpoint(graphql).map(|res| serde_json::to_value(res).unwrap()), + Self::AddAuth { data } => Lib::add_auth(data).map(|res| serde_json::to_value(res).unwrap()), + Self::AddRawAuth { data } => Lib::add_raw_auth(data).map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2 { service_name, scopes } => Lib::oauth2(service_name, scopes).map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithoutProfiler { service_name, scopes } => Lib::oauth2_without_profiler(service_name, scopes).map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithExtendedProfiler { service_name, scopes, extension } => Lib::oauth2_with_extended_profiler(service_name, scopes, extension).map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithCustomProfiler { service_name, scopes, profiler } => Lib::oauth2_with_custom_profiler(service_name, scopes, profiler).map(|res| serde_json::to_value(res).unwrap()), + Self::GqlDeployQuery { params } => Lib::gql_deploy_query(params).map(|res| serde_json::to_value(res).unwrap()), + Self::GqlRemoveQuery { tg_name } => Lib::gql_remove_query(tg_name).map(|res| serde_json::to_value(res).unwrap()), + Self::MetagenExec { config } => Lib::metagen_exec(config).map(|res| serde_json::to_value(res).unwrap()), + Self::MetagenWriteFiles { items, typegraph_dir } => Lib::metagen_write_files(items, typegraph_dir).map(|res| serde_json::to_value(res).unwrap()), + } + } +} \ No newline at end of file diff --git a/src/typegraph/core/src/conversion/runtimes.rs b/src/typegraph/core/src/conversion/runtimes.rs index b8655e06da..650859f377 100644 --- a/src/typegraph/core/src/conversion/runtimes.rs +++ b/src/typegraph/core/src/conversion/runtimes.rs @@ -220,12 +220,12 @@ impl MaterializerConverter for PythonMaterializer { Lambda(lambda) => { let mut data = IndexMap::new(); let mut sha256 = Sha256::new(); - sha256.update(lambda.fn_.clone()); + sha256.update(lambda.function.clone()); let fn_hash: String = format!("sha256_{:x}", sha256.finalize()); data.insert("name".to_string(), serde_json::Value::String(fn_hash)); data.insert( "fn".to_string(), - serde_json::Value::String(lambda.fn_.clone()), + serde_json::Value::String(lambda.function.clone()), ); ("lambda".to_string(), data) } @@ -235,7 +235,10 @@ impl MaterializerConverter for PythonMaterializer { "name".to_string(), serde_json::Value::String(def.name.clone()), ); - data.insert("fn".to_string(), serde_json::Value::String(def.fn_.clone())); + data.insert( + "fn".to_string(), + serde_json::Value::String(def.function.clone()), + ); ("def".to_string(), data) } Module(module) => { diff --git a/src/typegraph/core/src/lib.rs b/src/typegraph/core/src/lib.rs index d20de26179..0d1262f163 100644 --- a/src/typegraph/core/src/lib.rs +++ b/src/typegraph/core/src/lib.rs @@ -339,6 +339,12 @@ impl sdk::core::Handler for Lib { } } +impl Lib { + pub fn reset() { + typegraph::reset(); + } +} + #[macro_export] macro_rules! log { ($($arg:tt)*) => { diff --git a/src/typegraph/core/src/typegraph.rs b/src/typegraph/core/src/typegraph.rs index b9eee9c753..d04bfe6740 100644 --- a/src/typegraph/core/src/typegraph.rs +++ b/src/typegraph/core/src/typegraph.rs @@ -514,3 +514,11 @@ pub fn current_typegraph_dir() -> Result { // TODO error handling Ok(tg_path.parent().unwrap().to_owned()) } + +pub fn reset() { + TG.with_borrow_mut(|tg| { + if let Some(ctx) = tg.take() { + Store::restore(ctx.saved_store_state.unwrap()); + } + }); +} diff --git a/src/typegraph/core/src/types/sdk/core.rs b/src/typegraph/core/src/types/sdk/core.rs index b53b4de861..f4c33fb951 100644 --- a/src/typegraph/core/src/types/sdk/core.rs +++ b/src/typegraph/core/src/types/sdk/core.rs @@ -1,6 +1,5 @@ use serde::{Serialize, Deserialize}; - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Error { pub stack: Vec, diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs index 9558c92812..7e6a739737 100644 --- a/src/typegraph/core/src/types/sdk/mod.rs +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -1,4 +1,5 @@ +pub mod aws; pub mod core; pub mod runtimes; -pub mod aws; -pub mod utils;pub use core::Error; \ No newline at end of file +pub mod utils; +pub use core::Error; \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs index 95c9644727..fbf1b33487 100644 --- a/src/typegraph/core/src/types/sdk/runtimes.rs +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -85,13 +85,13 @@ pub struct MaterializerHttpRequest { pub struct MaterializerPythonDef { pub runtime: RuntimeId, pub name: String, - pub fn_: String, + pub function: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct MaterializerPythonLambda { pub runtime: RuntimeId, - pub fn_: String, + pub function: String, } #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index 6d368cd926..31ea90751b 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -2,11 +2,7 @@ "name": "@typegraph/sdk", "version": "0.5.0-rc.2", "publish": { - "exclude": [ - "!src/gen", - "!LICENSE.md", - "!README.md" - ] + "exclude": ["!src/gen", "!LICENSE.md", "!README.md"] }, "exports": { "./deps/_import.ts": "./src/deps/_import.ts", @@ -40,6 +36,6 @@ "./utils/func_utils.ts": "./src/utils/func_utils.ts", "./utils/injection_utils.ts": "./src/utils/injection_utils.ts", "./utils/type_utils.ts": "./src/utils/type_utils.ts", - "./wit.ts": "./src/wit.ts" + "./sdk.ts": "./src/sdk.ts" } } diff --git a/src/typegraph/deno/src/effects.ts b/src/typegraph/deno/src/effects.ts index 8c5dbcdf7e..c7947f64ff 100644 --- a/src/typegraph/deno/src/effects.ts +++ b/src/typegraph/deno/src/effects.ts @@ -1,27 +1,22 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { - EffectCreate, - EffectDelete, - EffectRead, - EffectUpdate, -} from "./gen/typegraph_core.d.ts"; +import { Effect } from "./gen/runtimes.ts"; -export function read(): EffectRead { - return { tag: "read" }; +export function read(): Effect { + return "read"; } -export function create(idempotent = false): EffectCreate { - return { tag: "create", val: idempotent }; +export function create(idempotent = false): Effect { + return { create: idempotent }; } -export function delete_(idempotent = true): EffectDelete { - return { tag: "delete", val: idempotent }; +export function delete_(idempotent = true): Effect { + return { delete: idempotent }; } -export function update(idempotent = false): EffectUpdate { - return { tag: "update", val: idempotent }; +export function update(idempotent = false): Effect { + return { update: idempotent }; } export const UPDATE = Symbol("update"); diff --git a/src/typegraph/deno/src/host/host.d.ts b/src/typegraph/deno/src/host/host.d.ts deleted file mode 100644 index 0a3cb60b30..0000000000 --- a/src/typegraph/deno/src/host/host.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -export function listAllFilesHelper( - root: string, - list: Array, - exclude?: Array, -): void; - -export function expandPath(root: string, exclude: Array): Array; - -export function print(msg: string): void; - -export function eprint(msg: string): void; - -export function getCwd(): string; - -export function pathExists(filePath: string): boolean; - -export function readFile(filePath: string): Uint8Array; - -export function writeFile(filePath: string, data: Uint8Array): void; diff --git a/src/typegraph/deno/src/host/host.js b/src/typegraph/deno/src/host/host.js deleted file mode 100644 index 27326fad1f..0000000000 --- a/src/typegraph/deno/src/host/host.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 -import * as fs from "node:fs"; -import * as path from "node:path"; -import * as process from "node:process"; - -function listAllFilesHelper( - root, - list, - exclude, -) { - const currStat = fs.statSync(root); - if (!currStat.isDirectory()) { - list.push(root); - return; - } - search: for (const filename of fs.readdirSync(root)) { - const fullPath = path.join(root, filename); - if (exclude) { - for (const pattern of exclude) { - const reg = new RegExp(pattern); - if (reg.test(fullPath)) continue search; - } - } - listAllFilesHelper(fullPath, list, exclude); - } -} - -export function expandPath( - root, - exclude, -) { - try { - const ret = []; - listAllFilesHelper(root, ret, exclude); - return ret; - } catch (err) { - throw (err instanceof Error ? err.message : err); - } -} - -export function print(msg) { - console.log(msg); -} - -export function eprint(msg) { - console.error(msg); -} - -export function getCwd() { - try { - return process.cwd(); - } catch (err) { - throw (err instanceof Error ? err.message : err); - } -} - -export function pathExists(filePath) { - try { - return fs.existsSync(filePath); - } catch (err) { - throw (err instanceof Error ? err.message : err); - } -} - -export function readFile(filePath) { - try { - const buffer = fs.readFileSync(filePath, null); - return new Uint8Array(buffer); - } catch (err) { - throw (err instanceof Error ? err.message : err); - } -} - -export function writeFile(filePath, data) { - try { - const dir = path.dirname(filePath); - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, { recursive: true }); - } - void fs.writeFileSync(filePath, data, { flag: "w" }); - } catch (err) { - throw (err instanceof Error ? err.message : err); - } -} diff --git a/src/typegraph/deno/src/metagen.ts b/src/typegraph/deno/src/metagen.ts index ac347c11f1..adc81467b1 100644 --- a/src/typegraph/deno/src/metagen.ts +++ b/src/typegraph/deno/src/metagen.ts @@ -1,28 +1,28 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { - FdkConfig, - FdkOutput, - SerializeParams, -} from "./gen/typegraph_core.d.ts"; +import { SerializeParams } from "./gen/core.ts"; import { TypegraphOutput } from "./typegraph.ts"; -import { wit_utils } from "./wit.ts"; +import { sdkUtils } from "./sdk.ts"; import { freezeTgOutput } from "./utils/func_utils.ts"; +import { FdkConfig, FdkOutput } from "./gen/utils.ts"; export class Metagen { - constructor(private workspacePath: string, private genConfig: unknown) {} + constructor( + private workspacePath: string, + private genConfig: unknown, + ) {} private getFdkConfig(tgOutput: TypegraphOutput, targetName: string) { const serializeParams = { - typegraphPath: `${this.workspacePath}/tg.ts`, + typegraph_path: `${this.workspacePath}/tg.ts`, prefix: undefined, - artifactResolution: false, + artifact_resolution: false, codegen: true, - prismaMigration: { - migrationsDir: "prisma-migrations", - migrationActions: [], - defaultMigrationAction: { + prisma_migration: { + migrations_dir: "prisma-migrations", + migration_actions: [], + default_migration_action: { apply: false, create: false, reset: false, @@ -32,10 +32,10 @@ export class Metagen { } satisfies SerializeParams; const frozenOut = freezeTgOutput(serializeParams, tgOutput); return { - configJson: JSON.stringify(this.genConfig), - tgJson: frozenOut.serialize(serializeParams).tgJson, - targetName, - workspacePath: this.workspacePath, + config_json: JSON.stringify(this.genConfig), + tg_json: frozenOut.serialize(serializeParams).tgJson, + target_name: targetName, + workspace_path: this.workspacePath, } as FdkConfig; } @@ -46,7 +46,7 @@ export class Metagen { overwrite?: false, ): Array { const fdkConfig = this.getFdkConfig(tgOutput, targetName); - return wit_utils.metagenExec(fdkConfig).map((value: any) => ({ + return sdkUtils.metagenExec(fdkConfig).map((value: any) => ({ ...value, overwrite: overwrite ?? value.overwrite, })) as Array; @@ -55,6 +55,6 @@ export class Metagen { /** run metagen */ run(tgOutput: TypegraphOutput, targetName: string, overwrite?: false) { const items = this.dryRun(tgOutput, targetName, overwrite); - wit_utils.metagenWriteFiles(items, this.workspacePath); + sdkUtils.metagenWriteFiles(items, this.workspacePath); } } diff --git a/src/typegraph/deno/src/params.ts b/src/typegraph/deno/src/params.ts index 669cc40279..c901141bc3 100644 --- a/src/typegraph/deno/src/params.ts +++ b/src/typegraph/deno/src/params.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 import { RawAuth } from "./typegraph.ts"; -import { Auth as Auth_, wit_utils } from "./wit.ts"; +import { Auth as Auth_, sdkUtils } from "./sdk.ts"; import * as t from "./types.ts"; export type StdOauth2Profiler = @@ -39,8 +39,8 @@ export class Auth { return { name, - authData, - protocol: { tag: "jwt" }, + auth_data: authData, + protocol: "jwt", }; } @@ -55,8 +55,8 @@ export class Auth { const authData = [["users", JSON.stringify(users)]] as [string, string][]; return { name: "basic", - protocol: { tag: "basic" }, - authData, + protocol: "basic", + auth_data: authData, }; } @@ -67,10 +67,10 @@ export class Auth { ): RawAuth { switch (profiler.profiler) { case "none": - return new RawAuth(wit_utils.oauth2WithoutProfiler(provider, scopes)); + return new RawAuth(sdkUtils.oauth2WithoutProfiler(provider, scopes)); case "extended": return new RawAuth( - wit_utils.oauth2WithExtendedProfiler( + sdkUtils.oauth2WithExtendedProfiler( provider, scopes, JSON.stringify(profiler.extension), @@ -78,10 +78,10 @@ export class Auth { ); case "custom": return new RawAuth( - wit_utils.oauth2WithCustomProfiler(provider, scopes, profiler.id), + sdkUtils.oauth2WithCustomProfiler(provider, scopes, profiler.id), ); default: - return new RawAuth(wit_utils.oauth2(provider, scopes)); + return new RawAuth(sdkUtils.oauth2(provider, scopes)); } } diff --git a/src/typegraph/deno/src/policy.ts b/src/typegraph/deno/src/policy.ts index 8059b87508..6e5b67f181 100644 --- a/src/typegraph/deno/src/policy.ts +++ b/src/typegraph/deno/src/policy.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { ContextCheck, MaterializerId } from "./gen/typegraph_core.d.ts"; -import { core } from "./wit.ts"; +import { ContextCheck, MaterializerId } from "./gen/core.ts"; +import { core } from "./sdk.ts"; interface PolicyPerEffectAlt { update?: Policy; @@ -16,7 +16,10 @@ export class PolicyPerEffectObject { } export default class Policy { - constructor(public readonly _id: number, public readonly name: string) {} + constructor( + public readonly _id: number, + public readonly name: string, + ) {} static public(): Policy { const [id, name] = core.getPublicPolicy(); @@ -25,17 +28,17 @@ export default class Policy { static #serializeContext(check: string | RegExp | null): ContextCheck { if (check === null) { - return { tag: "not-null" }; + return "not_null"; } if (typeof check === "string") { - return { tag: "value", val: check }; + return { value: check }; } if (!(check instanceof RegExp)) { throw new Error( "Invalid context check: expected null, string, or RegExp", ); } - return { tag: "pattern", val: check.source }; + return { pattern: check.source }; } static context(key: string, check?: string | RegExp | null): Policy { diff --git a/src/typegraph/deno/src/providers/aws.ts b/src/typegraph/deno/src/providers/aws.ts index 25cb62b2b6..57bf963388 100644 --- a/src/typegraph/deno/src/providers/aws.ts +++ b/src/typegraph/deno/src/providers/aws.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: MPL-2.0 import { Materializer, Runtime } from "../runtimes/mod.ts"; -import { aws } from "../wit.ts"; +import { aws } from "../sdk.ts"; import { S3PresignGetParams, S3PresignPutParams, S3RuntimeData, -} from "../gen/typegraph_core.d.ts"; +} from "../gen/aws.ts"; import { t } from "../index.ts"; type S3PresignGetMat = Materializer & S3PresignGetParams; @@ -26,32 +26,32 @@ export class S3Runtime extends Runtime { constructor(options: S3RuntimeData) { const id = aws.registerS3Runtime(options); super(id); - this.hostSecret = options.hostSecret; - this.regionSecret = options.regionSecret; - this.accessKeySecret = options.accessKeySecret; - this.secretKeySecret = options.secretKeySecret; - this.pathStyleSecret = options.pathStyleSecret; + this.hostSecret = options.host_secret; + this.regionSecret = options.region_secret; + this.accessKeySecret = options.access_key_secret; + this.secretKeySecret = options.secret_key_secret; + this.pathStyleSecret = options.path_style_secret; } /** create a function to presign an S3 GetObject request */ public presignGet(params: S3PresignGetParams): t.Func { - const { bucket, expirySecs } = params; + const { bucket, expiry_secs } = params; const mat: S3PresignGetMat = { _id: aws.s3PresignGet(this._id, params), bucket, - expirySecs, + expiry_secs, }; return t.func(t.struct({ path: t.string() }), t.uri(), mat); } /** create a function to presign an S3 PutObject request */ public presignPut(params: S3PresignPutParams): t.Func { - const { bucket, expirySecs, contentType } = params; + const { bucket, expiry_secs, content_type } = params; const mat: S3PresignPutMat = { _id: aws.s3PresignPut(this._id, params), bucket, - expirySecs, - contentType, + expiry_secs, + content_type, }; return t.func( t.struct({ length: t.integer(), path: t.string() }), @@ -101,7 +101,7 @@ export class S3Runtime extends Runtime { }; return t.func( t.struct({ - prefix: t.string().optional({ defaultItem: "" }), + prefix: t.string().optional({ default_item: "" }), files: t.list(fileType), }), t.boolean(), diff --git a/src/typegraph/deno/src/providers/prisma.ts b/src/typegraph/deno/src/providers/prisma.ts index 790d59d07a..73c2b27c67 100644 --- a/src/typegraph/deno/src/providers/prisma.ts +++ b/src/typegraph/deno/src/providers/prisma.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: MPL-2.0 import { Runtime } from "../runtimes/mod.ts"; -import { runtimes } from "../wit.ts"; +import { runtimes } from "../sdk.ts"; import { Typedef } from "../types.ts"; import { t } from "../index.ts"; -import { Effect } from "../gen/typegraph_core.d.ts"; +import { Effect } from "../gen/runtimes.ts"; import { genRef } from "./../typegraph.ts"; type PrismaLinkArg = { @@ -20,7 +20,7 @@ export class PrismaRuntime extends Runtime { constructor(name: string, connectionStringSecret: string) { const id = runtimes.registerPrismaRuntime({ name, - connectionStringSecret, + connection_string_secret: connectionStringSecret, }); super(id); this.name = name; @@ -160,8 +160,8 @@ export class PrismaRuntime extends Runtime { const type = runtimes.prismaQueryRaw( this._id, query, - parameters ? parameters._id : undefined, output._id, + parameters ? parameters._id : undefined, ); return t.Func.fromTypeFunc(type); } @@ -186,10 +186,10 @@ function prismaLink( } arg = arg ?? {}; const typeId = runtimes.prismaLink({ - targetType: targetType._id, - relationshipName: name, - foreignKey: arg.fkey, - targetField: arg.field, + target_type: targetType._id, + relationship_name: name, + foreign_key: arg.fkey, + target_field: arg.field, unique: arg.unique, }); return new Typedef(typeId); diff --git a/src/typegraph/deno/src/providers/temporal.ts b/src/typegraph/deno/src/providers/temporal.ts index 729a1d1ff2..86b090e38f 100644 --- a/src/typegraph/deno/src/providers/temporal.ts +++ b/src/typegraph/deno/src/providers/temporal.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: MPL-2.0 import { Runtime } from "../runtimes/mod.ts"; -import { runtimes } from "../wit.ts"; +import { runtimes } from "../sdk.ts"; import { Func, Typedef } from "../types.ts"; import { TemporalOperationData, TemporalOperationType, -} from "../gen/typegraph_core.d.ts"; +} from "../gen/runtimes.ts"; export class TemporalRuntime extends Runtime { name: string; @@ -25,8 +25,8 @@ export class TemporalRuntime extends Runtime { }) { const id = runtimes.registerTemporalRuntime({ name, - hostSecret, - namespaceSecret, + host_secret: hostSecret, + namespace_secret: namespaceSecret, }); super(id); this.name = name; @@ -52,40 +52,21 @@ export class TemporalRuntime extends Runtime { /** create a function to start a workflow */ startWorkflow(workflowType: string, arg: Typedef): Func { - return this.#genericTemporalFunc( - { - tag: "start-workflow", - }, - workflowType, - arg, - ); + return this.#genericTemporalFunc("start_workflow", workflowType, arg); } /** create a function to signal a workflow */ signalWorkflow(signalName: string, arg: Typedef): Func { - return this.#genericTemporalFunc( - { - tag: "signal-workflow", - }, - signalName, - arg, - ); + return this.#genericTemporalFunc("signal_workflow", signalName, arg); } /** create a function to query a workflow */ queryWorkflow(queryType: string, arg: Typedef, out: Typedef): Func { - return this.#genericTemporalFunc( - { - tag: "query-workflow", - }, - queryType, - arg, - out, - ); + return this.#genericTemporalFunc("query_workflow", queryType, arg, out); } /** create a function that describes a workflow */ describeWorkflow(): Func { - return this.#genericTemporalFunc({ tag: "describe-workflow" }); + return this.#genericTemporalFunc("describe_workflow"); } } diff --git a/src/typegraph/deno/src/runtimes/deno.ts b/src/typegraph/deno/src/runtimes/deno.ts index ebf68b35a4..5b7e324e56 100644 --- a/src/typegraph/deno/src/runtimes/deno.ts +++ b/src/typegraph/deno/src/runtimes/deno.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: MPL-2.0 import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import type { Effect } from "../gen/typegraph_core.d.ts"; +import { runtimes } from "../sdk.ts"; +import type { Effect } from "../gen/runtimes.ts"; import Policy from "../policy.ts"; import { type Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; @@ -87,7 +87,7 @@ export class DenoRuntime extends Runtime { ): t.Func { const matId = runtimes.importDenoFunction( { - funcName: name, + func_name: name, module, deps, secrets, @@ -130,9 +130,10 @@ export class DenoRuntime extends Runtime { policy(name: string, _code: string): Policy; policy(name: string, data: Omit): Policy; policy(name: string, data: string | Omit): Policy { - const params = typeof data === "string" - ? { code: data, secrets: [] } - : { secrets: [], ...data }; + const params = + typeof data === "string" + ? { code: data, secrets: [] } + : { secrets: [], ...data }; return Policy.create( name, @@ -144,13 +145,14 @@ export class DenoRuntime extends Runtime { } importPolicy(data: Omit, name?: string): Policy { - const policyName = name ?? + const policyName = + name ?? `__imp_${data.module}_${data.name}`.replace(/[^a-zA-Z0-9_]/g, "_"); return Policy.create( policyName, runtimes.importDenoFunction( { - funcName: data.name, + func_name: data.name, module: data.module, secrets: data.secrets ?? [], deps: data.deps ?? [], diff --git a/src/typegraph/deno/src/runtimes/graphql.ts b/src/typegraph/deno/src/runtimes/graphql.ts index e53fa2abc1..d98a790da3 100644 --- a/src/typegraph/deno/src/runtimes/graphql.ts +++ b/src/typegraph/deno/src/runtimes/graphql.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Effect } from "../gen/typegraph_core.d.ts"; +import { Effect } from "../gen/runtimes.ts"; import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; +import { runtimes } from "../sdk.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; diff --git a/src/typegraph/deno/src/runtimes/grpc.ts b/src/typegraph/deno/src/runtimes/grpc.ts index d75be27f79..f2ca84e966 100644 --- a/src/typegraph/deno/src/runtimes/grpc.ts +++ b/src/typegraph/deno/src/runtimes/grpc.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: MPL-2.0 import { Func } from "../types.ts"; -import { runtimes } from "../wit.ts"; +import { runtimes } from "../sdk.ts"; import { Runtime } from "./mod.ts"; export class GrpcRuntime extends Runtime { constructor(protoFile: string, endpoint: string) { const id = runtimes.registerGrpcRuntime({ - protoFile, + proto_file: protoFile, endpoint, }); super(id); diff --git a/src/typegraph/deno/src/runtimes/http.ts b/src/typegraph/deno/src/runtimes/http.ts index 992ad7ac93..7404b527b7 100644 --- a/src/typegraph/deno/src/runtimes/http.ts +++ b/src/typegraph/deno/src/runtimes/http.ts @@ -6,15 +6,13 @@ import { Effect, HttpMethod, MaterializerHttpRequest, -} from "../gen/typegraph_core.d.ts"; -import { runtimes } from "../wit.ts"; +} from "../gen/runtimes.ts"; +import { runtimes } from "../sdk.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; -type HttpRequestMat = - & Materializer - & Omit - & { +type HttpRequestMat = Materializer & + Omit & { method: M; }; @@ -27,8 +25,8 @@ export class HttpRuntime extends Runtime { super( runtimes.registerHttpRuntime({ endpoint, - certSecret, - basicAuthSecret, + cert_secret: certSecret, + basic_auth_secret: basicAuthSecret, }), ); } diff --git a/src/typegraph/deno/src/runtimes/kv.ts b/src/typegraph/deno/src/runtimes/kv.ts index 14d5a81597..067610ff85 100644 --- a/src/typegraph/deno/src/runtimes/kv.ts +++ b/src/typegraph/deno/src/runtimes/kv.ts @@ -3,8 +3,8 @@ import { Materializer, Runtime } from "./mod.ts"; import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect, KvMaterializer } from "../gen/typegraph_core.d.ts"; +import { runtimes } from "../sdk.ts"; +import { Effect, KvMaterializer } from "../gen/runtimes.ts"; import { fx } from "../index.ts"; @@ -26,10 +26,13 @@ export class KvRuntime extends Runtime { } #operation(operation: KvMaterializer, effect: Effect) { - const mad_id = runtimes.kvOperation({ - runtime: this._id, - effect: effect, - }, operation); + const mad_id = runtimes.kvOperation( + { + runtime: this._id, + effect: effect, + }, + operation, + ); return new KvOperationMat(mad_id, operation); } @@ -37,7 +40,7 @@ export class KvRuntime extends Runtime { set() { const mat = this.#operation("set", fx.update()); return t.func( - t.struct({ "key": t.string(), "value": t.string() }), + t.struct({ key: t.string(), value: t.string() }), t.string(), mat, ); @@ -45,18 +48,18 @@ export class KvRuntime extends Runtime { get() { const mat = this.#operation("get", fx.read()); - return t.func(t.struct({ "key": t.string() }), t.string(), mat); + return t.func(t.struct({ key: t.string() }), t.string(), mat); } delete() { const mat = this.#operation("delete", fx.delete_()); - return t.func(t.struct({ "key": t.string() }), t.integer(), mat); + return t.func(t.struct({ key: t.string() }), t.integer(), mat); } keys() { const mat = this.#operation("keys", fx.read()); return t.func( - t.struct({ "filter": t.string().optional() }), + t.struct({ filter: t.string().optional() }), t.list(t.string()), mat, ); @@ -65,7 +68,7 @@ export class KvRuntime extends Runtime { values() { const mat = this.#operation("values", fx.read()); return t.func( - t.struct({ "filter": t.string().optional() }), + t.struct({ filter: t.string().optional() }), t.list(t.string()), mat, ); diff --git a/src/typegraph/deno/src/runtimes/python.ts b/src/typegraph/deno/src/runtimes/python.ts index 447c65d3cf..0984f07b23 100644 --- a/src/typegraph/deno/src/runtimes/python.ts +++ b/src/typegraph/deno/src/runtimes/python.ts @@ -2,19 +2,19 @@ // SPDX-License-Identifier: MPL-2.0 import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect, SubstantialBackend } from "../gen/typegraph_core.d.ts"; +import { runtimes } from "../sdk.ts"; +import { Effect, SubstantialBackend } from "../gen/runtimes.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; import { SubstantialRuntime } from "../runtimes/substantial.ts"; interface LambdaMat extends Materializer { - fn: string; + function: string; effect: Effect; } interface DefMat extends Materializer { - fn: string; + function: string; name: string; effect: Effect; } @@ -41,7 +41,7 @@ export class PythonRuntime extends Runtime { fromLambda< P extends Record = Record, I extends t.Struct

= t.Struct

, - O extends t.Typedef = t.Typedef + O extends t.Typedef = t.Typedef, >(inp: I, out: O, { code }: { code: string }): t.Func { const matId = runtimes.fromPythonLambda( { @@ -49,14 +49,14 @@ export class PythonRuntime extends Runtime { effect: fx.read(), }, { - fn: code, // not formatted + function: code, // not formatted runtime: this._id, - } + }, ); return t.func(inp, out, { _id: matId, - fn: code, + function: code, } as LambdaMat); } @@ -64,7 +64,7 @@ export class PythonRuntime extends Runtime { fromDef< P extends Record = Record, I extends t.Struct

= t.Struct

, - O extends t.Typedef = t.Typedef + O extends t.Typedef = t.Typedef, >(inp: I, out: O, { code }: { code: string }): t.Func { const name = code.trim().match(/def\s+([A-Za-z0-9_]+)/)?.[1]; if (name == undefined) { @@ -77,22 +77,22 @@ export class PythonRuntime extends Runtime { }, { name: name, - fn: code, + function: code, runtime: this._id, - } + }, ); return t.func(inp, out, { _id: matId, name, - fn: code, + function: code, } as DefMat); } import( inp: I, out: O, - { name, module, deps = [], effect = fx.read(), secrets = [] }: PythonImport + { name, module, deps = [], effect = fx.read(), secrets = [] }: PythonImport, ): t.Func { const base = { runtime: this._id, @@ -107,7 +107,7 @@ export class PythonRuntime extends Runtime { const pyModMatId = runtimes.fromPythonImport(base, { module: matId, - funcName: name, + func_name: name, secrets, }); diff --git a/src/typegraph/deno/src/runtimes/random.ts b/src/typegraph/deno/src/runtimes/random.ts index 330944e561..25c365f966 100644 --- a/src/typegraph/deno/src/runtimes/random.ts +++ b/src/typegraph/deno/src/runtimes/random.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: MPL-2.0 import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { RandomRuntimeData } from "../gen/typegraph_core.d.ts"; +import { runtimes } from "../sdk.ts"; +import { RandomRuntimeData } from "../gen/runtimes.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; diff --git a/src/typegraph/deno/src/runtimes/substantial.ts b/src/typegraph/deno/src/runtimes/substantial.ts index 4ad4145d6f..5e10f1f0f6 100644 --- a/src/typegraph/deno/src/runtimes/substantial.ts +++ b/src/typegraph/deno/src/runtimes/substantial.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 import { type Materializer, Runtime } from "../runtimes/mod.ts"; -import { runtimes } from "../wit.ts"; +import { runtimes } from "../sdk.ts"; import { Func, type Typedef } from "../types.ts"; import type { SubstantialBackend, @@ -10,22 +10,21 @@ import type { SubstantialOperationType, WorkflowFileDescription, WorkflowKind, -} from "../gen/typegraph_core.d.ts"; +} from "../gen/runtimes.ts"; export class Backend { static devMemory(): SubstantialBackend { - return { tag: "memory" }; + return "memory"; } static devFs(): SubstantialBackend { - return { tag: "fs" }; + return "fs"; } static redis(connectionStringSecret: string): SubstantialBackend { return { - tag: "redis", - val: { - connectionStringSecret, + redis: { + connection_string_secret: connectionStringSecret, }, }; } @@ -36,11 +35,11 @@ export class SubstantialRuntime extends Runtime { constructor( backend: SubstantialBackend, - fileDescriptions: Array + fileDescriptions: Array, ) { const id = runtimes.registerSubstantialRuntime({ backend, - fileDescriptions, + file_descriptions: fileDescriptions, }); super(id); this.backend = backend; @@ -49,7 +48,7 @@ export class SubstantialRuntime extends Runtime { _genericSubstantialFunc( operation: SubstantialOperationType, funcArg?: Typedef, - funcOut?: Typedef + funcOut?: Typedef, ): Func { const data = { funcArg: funcArg?._id, @@ -61,67 +60,39 @@ export class SubstantialRuntime extends Runtime { } start(kwargs: Typedef): Func { - return this._genericSubstantialFunc( - { - tag: "start", - }, - kwargs - ); + return this._genericSubstantialFunc("start", kwargs); } startRaw(): Func { - return this._genericSubstantialFunc({ - tag: "start-raw", - }); + return this._genericSubstantialFunc("start_raw"); } stop(): Func { - return this._genericSubstantialFunc({ - tag: "stop", - }); + return this._genericSubstantialFunc("stop"); } send(payload: Typedef): Func { - return this._genericSubstantialFunc( - { - tag: "send", - }, - payload - ); + return this._genericSubstantialFunc("send", payload); } sendRaw(): Func { - return this._genericSubstantialFunc({ - tag: "send-raw", - }); + return this._genericSubstantialFunc("send_raw"); } queryResources(): Func { - return this._genericSubstantialFunc({ - tag: "resources", - }); + return this._genericSubstantialFunc("resources"); } queryResults(output: Typedef): Func { - return this._genericSubstantialFunc( - { - tag: "results", - }, - undefined, - output - ); + return this._genericSubstantialFunc("results", undefined, output); } queryResultsRaw(): Func { - return this._genericSubstantialFunc({ - tag: "results-raw", - }); + return this._genericSubstantialFunc("results_raw"); } #internalLinkParentChild(): Func { - return this._genericSubstantialFunc({ - tag: "internal-link-parent-child", - }); + return this._genericSubstantialFunc("internal_link_parent_child"); } internals(): Record> { @@ -141,7 +112,7 @@ export class WorkflowFile { private constructor( public readonly file: string, public readonly kind: WorkflowKind, - public deps: Array = [] + public deps: Array = [], ) {} static deno(file: string, deps: Array = []): WorkflowFile { diff --git a/src/typegraph/deno/src/runtimes/wasm.ts b/src/typegraph/deno/src/runtimes/wasm.ts index 462f8a261c..88015f1d14 100644 --- a/src/typegraph/deno/src/runtimes/wasm.ts +++ b/src/typegraph/deno/src/runtimes/wasm.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: MPL-2.0 import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect } from "../gen/typegraph_core.d.ts"; +import { runtimes } from "../sdk.ts"; +import { Effect } from "../gen/runtimes.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; @@ -32,7 +32,7 @@ class WasmRuntimeWire extends WasmRuntime { constructor(artifactPath: string) { super( runtimes.registerWasmWireRuntime({ - wasmArtifact: artifactPath, + wasm_artifact: artifactPath, }), ); } @@ -54,7 +54,7 @@ class WasmRuntimeWire extends WasmRuntime { effect, }, { - funcName: name, + func_name: name, }, ); @@ -70,7 +70,7 @@ class WasmRuntimeReflected extends WasmRuntime { constructor(artifactPath: string) { super( runtimes.registerWasmReflectedRuntime({ - wasmArtifact: artifactPath, + wasm_artifact: artifactPath, }), ); } @@ -92,7 +92,7 @@ class WasmRuntimeReflected extends WasmRuntime { effect, }, { - funcName: name, + func_name: name, }, ); diff --git a/src/typegraph/deno/src/sdk.ts b/src/typegraph/deno/src/sdk.ts new file mode 100644 index 0000000000..095a8e20e5 --- /dev/null +++ b/src/typegraph/deno/src/sdk.ts @@ -0,0 +1,12 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +import * as core from "./gen/core.ts"; +import * as runtimes from "./gen/runtimes.ts"; +import * as aws from "./gen/aws.ts"; +import * as sdkUtils from "./gen/utils.ts"; + +export { core, runtimes, aws, sdkUtils }; + +export type { Cors, Rate } from "./gen/core.ts"; +export type { Auth, AuthProtocol } from "./gen/utils.ts"; diff --git a/src/typegraph/deno/src/tg_artifact_upload.ts b/src/typegraph/deno/src/tg_artifact_upload.ts index d762f9623f..34e6f83594 100644 --- a/src/typegraph/deno/src/tg_artifact_upload.ts +++ b/src/typegraph/deno/src/tg_artifact_upload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 import { BasicAuth } from "./tg_deploy.ts"; -import { Artifact } from "./gen/typegraph_core.d.ts"; +import { Artifact } from "./gen/core.ts"; import { dirname, join } from "node:path"; import * as fsp from "node:fs/promises"; import { log } from "./io.ts"; @@ -49,8 +49,7 @@ export class ArtifactUploader { // const uploadUrls: Array = await response.json(); if (uploadUrls.length !== artifactMetas.length) { - const diff = - `array length mismatch: ${uploadUrls.length} !== ${artifactMetas.length}`; + const diff = `array length mismatch: ${uploadUrls.length} !== ${artifactMetas.length}`; throw new Error(`Failed to get upload URLs for all artifacts: ${diff}`); } diff --git a/src/typegraph/deno/src/tg_deploy.ts b/src/typegraph/deno/src/tg_deploy.ts index 868ed18027..df7a7be8f7 100644 --- a/src/typegraph/deno/src/tg_deploy.ts +++ b/src/typegraph/deno/src/tg_deploy.ts @@ -1,15 +1,18 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { MigrationAction, SerializeParams } from "./gen/typegraph_core.d.ts"; +import { MigrationAction, SerializeParams } from "./gen/core.ts"; import { ArtifactUploader } from "./tg_artifact_upload.ts"; import { TypegraphOutput } from "./typegraph.ts"; -import { wit_utils } from "./wit.ts"; +import { sdkUtils } from "./sdk.ts"; import { execRequest } from "./utils/func_utils.ts"; import { log } from "./io.ts"; export class BasicAuth { - constructor(public username: string, public password: string) {} + constructor( + public username: string, + public password: string, + ) {} asHeaderValue(): string { return `Basic ${btoa(this.username + ":" + this.password)}`; } @@ -55,14 +58,14 @@ export async function tgDeploy( params: TypegraphDeployParams, ): Promise { const serializeParams = { - typegraphPath: params.typegraphPath, + typegraph_path: params.typegraphPath, prefix: params.prefix, - artifactResolution: true, + artifact_resolution: true, codegen: false, - prismaMigration: { - migrationsDir: params.migrationsDir ?? "prisma-migrations", - migrationActions: Object.entries(params.migrationActions ?? {}), - defaultMigrationAction: params.defaultMigrationAction ?? { + prisma_migration: { + migrations_dir: params.migrationsDir ?? "prisma-migrations", + migration_actions: Object.entries(params.migrationActions ?? {}), + default_migration_action: params.defaultMigrationAction ?? { apply: true, create: false, reset: false, @@ -102,7 +105,7 @@ export async function tgDeploy( { method: "POST", headers, - body: wit_utils.gqlDeployQuery({ + body: sdkUtils.gqlDeployQuery({ tg: tgJson, secrets: Object.entries(params.secrets ?? {}), }), @@ -140,7 +143,7 @@ export async function tgRemove( { method: "POST", headers, - body: wit_utils.gqlRemoveQuery([typegraphName.toString()]), + body: sdkUtils.gqlRemoveQuery([typegraphName.toString()]), }, `tgRemove failed to remove typegraph ${typegraphName}`, )) as Record | string; diff --git a/src/typegraph/deno/src/tg_manage.ts b/src/typegraph/deno/src/tg_manage.ts index cc682ef7e4..a041068ba0 100644 --- a/src/typegraph/deno/src/tg_manage.ts +++ b/src/typegraph/deno/src/tg_manage.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { SerializeParams } from "./gen/typegraph_core.d.ts"; +import { SerializeParams } from "./gen/core.ts"; import { BasicAuth, tgDeploy } from "./tg_deploy.ts"; import { TgFinalizationResult, TypegraphOutput } from "./typegraph.ts"; import { freezeTgOutput } from "./utils/func_utils.ts"; @@ -45,14 +45,14 @@ export class Manager { try { const env = this.#env; finalizationResult = this.#typegraph.serialize({ - typegraphPath: env.typegraph_path, + typegraph_path: env.typegraph_path, prefix: env.prefix, - artifactResolution: this.#env.artifact_resolution, + artifact_resolution: this.#env.artifact_resolution, codegen: false, - prismaMigration: { - migrationsDir: this.#getMigrationsDir(), - migrationActions: [], - defaultMigrationAction: { + prisma_migration: { + migrations_dir: this.#getMigrationsDir(), + migration_actions: [], + default_migration_action: { apply: true, create: false, reset: false, @@ -83,14 +83,14 @@ export class Manager { } const params: SerializeParams = { - typegraphPath: env.typegraph_path, + typegraph_path: env.typegraph_path, prefix: env.prefix, - artifactResolution: true, + artifact_resolution: true, codegen: false, - prismaMigration: { - migrationsDir: this.#getMigrationsDir(), - migrationActions: Object.entries(deployData.migrationActions), - defaultMigrationAction: deployData.defaultMigrationAction, + prisma_migration: { + migrations_dir: this.#getMigrationsDir(), + migration_actions: Object.entries(deployData.migrationActions), + default_migration_action: deployData.defaultMigrationAction, }, pretty: false, }; diff --git a/src/typegraph/deno/src/typegraph.ts b/src/typegraph/deno/src/typegraph.ts index 1d7a4fd4e9..5d755f6805 100644 --- a/src/typegraph/deno/src/typegraph.ts +++ b/src/typegraph/deno/src/typegraph.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 import * as t from "./types.ts"; -import { core } from "./gen/typegraph_core.js"; +import { core } from "./sdk.ts"; import { caller, dirname, fromFileUrl } from "./deps/mod.ts"; import { InjectionValue } from "./utils/type_utils.ts"; import { @@ -10,9 +10,9 @@ import { serializeGenericInjection, serializeStaticInjection, } from "./utils/injection_utils.ts"; -import { Auth, Cors as CorsWit, Rate, wit_utils } from "./wit.ts"; +import { Auth, Cors as CoreCors, Rate, sdkUtils } from "./sdk.ts"; import { getPolicyChain } from "./types.ts"; -import { Artifact, SerializeParams } from "./gen/typegraph_core.d.ts"; +import { Artifact, SerializeParams } from "./gen/core.ts"; import { Manager } from "./tg_manage.ts"; import { log } from "./io.ts"; import { hasCliEnv } from "./envs/cli.ts"; @@ -20,7 +20,7 @@ import process from "node:process"; type Exports = Record; -type Cors = Partial; +type Cors = Partial; interface TypegraphArgs { name: string; @@ -34,7 +34,10 @@ interface TypegraphArgs { } export class ApplyFromArg { - constructor(public name: string | null, public type: number | null) {} + constructor( + public name: string | null, + public type: number | null, + ) {} } export class ApplyFromStatic { @@ -46,7 +49,10 @@ export class ApplyFromSecret { } export class ApplyFromContext { - constructor(public key: string | null, public type: number | null) {} + constructor( + public key: string | null, + public type: number | null, + ) {} } export class ApplyFromParent { @@ -150,14 +156,12 @@ export async function typegraph( maybeBuilder?: TypegraphBuilder, ): Promise { ++counter; - const args = typeof nameOrArgs === "string" - ? { name: nameOrArgs } - : nameOrArgs; + const args = + typeof nameOrArgs === "string" ? { name: nameOrArgs } : nameOrArgs; const { name, dynamic, cors, prefix, rate, secrets } = args; - const builder = "builder" in args - ? (args.builder as TypegraphBuilder) - : maybeBuilder!; + const builder = + "builder" in args ? (args.builder as TypegraphBuilder) : maybeBuilder!; const file = caller(); if (!file) { @@ -168,13 +172,13 @@ export async function typegraph( const path = fromFileUrl(`file://${simpleFile}`); const defaultCorsFields = { - allowCredentials: true, - allowHeaders: [], - allowMethods: [], - allowOrigin: [], - exposeHeaders: [], - maxAgeSec: undefined, - } as CorsWit; + allow_credentials: true, + allow_headers: [], + allow_methods: [], + allow_origin: [], + expose_headers: [], + max_age_sec: undefined, + } as CoreCors; const defaultRateFields = { localExcess: 0, @@ -200,13 +204,13 @@ export async function typegraph( return new InheritDef(); }, rest: (graphql: string) => { - return wit_utils.addGraphqlEndpoint(graphql); + return sdkUtils.addGraphqlEndpoint(graphql); }, auth: (value: Auth | RawAuth) => { if (value instanceof RawAuth) { - return wit_utils.addRawAuth(value.jsonStr); + return sdkUtils.addRawAuth(value.jsonStr); } - return wit_utils.addAuth(value); + return sdkUtils.addAuth(value); }, ref: (name: string) => { return genRef(name); @@ -219,7 +223,7 @@ export async function typegraph( try { builder(g); - } catch (err) { + } catch (err: any) { if (err.payload && !err.cause) { err.cause = err.payload; } @@ -277,7 +281,7 @@ export async function typegraph( /** generate a type reference (by name) */ export function genRef(name: string): t.Typedef { - const value = core.refb(name, null); + const value = core.refb(name); if (typeof value == "object") { throw new Error(JSON.stringify(value)); } diff --git a/src/typegraph/deno/src/types.ts b/src/typegraph/deno/src/types.ts index 7a41510d14..7d518439dc 100644 --- a/src/typegraph/deno/src/types.ts +++ b/src/typegraph/deno/src/types.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { core, wit_utils } from "./wit.ts"; +import { core, sdkUtils } from "./sdk.ts"; import { ParameterTransform, PolicyPerEffect, @@ -14,8 +14,8 @@ import { TypeOptional, TypeString, TypeUnion, -} from "./gen/typegraph_core.d.ts"; -import { FuncParams } from "./gen/typegraph_core.d.ts"; +} from "./gen/core.ts"; +import { FuncParams } from "./gen/core.ts"; import { Materializer } from "./runtimes/mod.ts"; import { mapValues } from "./deps/mod.ts"; import Policy, { PolicyPerEffectObject } from "./policy.ts"; @@ -46,20 +46,18 @@ export type PolicySpec = | Policy | PolicyPerEffectObject | { - none: Policy; - create: Policy; - update: Policy; - delete: Policy; - }; + none: Policy; + create: Policy; + update: Policy; + delete: Policy; + }; export type Simplified = Omit; -export type SimplifiedNumericData = - & { enumeration?: number[] } - & Omit< - T, - "enumeration" - >; +export type SimplifiedNumericData = { enumeration?: number[] } & Omit< + T, + "enumeration" +>; export function getPolicyChain( policy: PolicySpec[] | PolicySpec, @@ -67,12 +65,11 @@ export function getPolicyChain( const chain = Array.isArray(policy) ? policy : [policy]; return chain.map((p) => { if (p instanceof Policy) { - return { tag: "simple", val: p._id } as const; + return { simple: p._id } as const; } return { - tag: "per-effect", - val: mapValues( + per_effect: mapValues( p instanceof PolicyPerEffectObject ? p.value : p, (v: any) => v._id, ) as unknown as PolicyPerEffect, @@ -189,9 +186,7 @@ class Boolean extends Typedef { } /** boolean type */ -export function boolean( - base: Base = {}, -): Boolean { +export function boolean(base: Base = {}): Boolean { return new Boolean(withBase(core.booleanb(), base)); } @@ -201,15 +196,15 @@ class Integer extends Typedef implements Readonly { readonly exclusiveMinimum?: number; readonly exclusiveMaximum?: number; readonly multipleOf?: number; - readonly enumeration?: Int32Array; + readonly enumeration?: number[]; constructor(_id: number, data: TypeInteger) { super(_id); this.min = data.min; this.max = data.max; - this.exclusiveMinimum = data.exclusiveMinimum; - this.exclusiveMaximum = data.exclusiveMaximum; - this.multipleOf = data.multipleOf; + this.exclusiveMinimum = data.exclusive_minimum; + this.exclusiveMaximum = data.exclusive_maximum; + this.multipleOf = data.multiple_of; this.enumeration = data.enumeration; } @@ -226,9 +221,7 @@ export function integer( ): Integer { const completeData = { ...data, - enumeration: data.enumeration - ? new Int32Array(data.enumeration) - : undefined, + enumeration: data.enumeration, }; return new Integer(withBase(core.integerb(completeData), base), completeData); } @@ -239,15 +232,15 @@ class Float extends Typedef implements Readonly { readonly exclusiveMinimum?: number; readonly exclusiveMaximum?: number; readonly multipleOf?: number; - readonly enumeration?: Float64Array; + readonly enumeration?: number[]; constructor(_id: number, data: TypeFloat) { super(_id); this.min = data.min; this.max = data.max; - this.exclusiveMinimum = data.exclusiveMinimum; - this.exclusiveMaximum = data.exclusiveMaximum; - this.multipleOf = data.multipleOf; + this.exclusiveMinimum = data.exclusive_minimum; + this.exclusiveMaximum = data.exclusive_maximum; + this.multipleOf = data.multiple_of; this.enumeration = data.enumeration; } } @@ -259,14 +252,9 @@ export function float( ): Float { const completeData = { ...data, - enumeration: data.enumeration - ? new Float64Array(data.enumeration) - : undefined, + enumeration: data.enumeration, }; - return new Float( - withBase(core.floatb(completeData), base), - completeData, - ); + return new Float(withBase(core.floatb(completeData), base), completeData); } class StringT extends Typedef implements Readonly { @@ -292,10 +280,7 @@ class StringT extends Typedef implements Readonly { } /** string type */ -export function string( - data: TypeString = {}, - base: BaseEx = {}, -): StringT { +export function string(data: TypeString = {}, base: BaseEx = {}): StringT { return new StringT(withBase(core.stringb(data), base), data); } @@ -346,10 +331,7 @@ export function phone(): StringT { // Note: enum is a reserved word /** string enum type */ -export function enum_( - variants: string[], - base: Base = {}, -): StringT { +export function enum_(variants: string[], base: Base = {}): StringT { return string( { enumeration: variants.map((variant) => JSON.stringify(variant)), @@ -372,14 +354,8 @@ class File extends Typedef { } /** file type */ -export function file( - data: Simplified = {}, - base: Base = {}, -): File { - return new File( - withBase(core.fileb(data), base), - data, - ); +export function file(data: Simplified = {}, base: Base = {}): File { + return new File(withBase(core.fileb(data), base), data); } class List extends Typedef { @@ -393,7 +369,7 @@ class List extends Typedef { this.min = data.min; this.max = data.max; this.items = data.of; - this.uniqueItems = data.uniqueItems; + this.uniqueItems = data.unique_items; } } @@ -407,10 +383,7 @@ export function list( of: variant._id, ...data, } as TypeList; - return new List( - withBase(core.listb(completeData), base), - completeData, - ); + return new List(withBase(core.listb(completeData), base), completeData); } class Optional extends Typedef { @@ -420,7 +393,7 @@ class Optional extends Typedef { constructor(_id: number, data: TypeOptional) { super(_id); this.item = data.of; - this.defaultItem = data.defaultItem; + this.defaultItem = data.default_item; } } @@ -433,7 +406,7 @@ export function optional( const completeData = { of: variant._id, ...data, - defaultItem: JSON.stringify(data.defaultItem), + defaultItem: JSON.stringify(data.default_item), } as TypeOptional; return new Optional( withBase(core.optionalb(completeData), base), @@ -451,12 +424,9 @@ class Union extends Typedef { } /** union type */ -export function union( - variants: Array, - base: Base = {}, -): Union { +export function union(variants: Array, base: Base = {}): Union { const data = { - variants: new Uint32Array(variants.map((variant) => variant._id)), + variants: variants.map((variant) => variant._id), }; return new Union(withBase(core.unionb(data), base), data); } @@ -471,12 +441,9 @@ class Either extends Typedef { } /** either type */ -export function either( - variants: Array, - base: Base = {}, -): Either { +export function either(variants: Array, base: Base = {}): Either { const data = { - variants: new Uint32Array(variants.map((variant) => variant._id)), + variants: variants.map((variant) => variant._id), }; return new Either(withBase(core.eitherb(data), base), data); } @@ -492,7 +459,10 @@ export class Struct

extends Typedef { /** struct type */ export function struct

( props: P, - { additionalProps, ...base }: Base & { + { + additionalProps, + ...base + }: Base & { additionalProps?: boolean; } = {}, ): Struct

{ @@ -500,7 +470,7 @@ export function struct

( withBase( core.structb({ props: Object.entries(props).map(([name, typ]) => [name, typ._id]), - additionalProps: additionalProps ?? false, + additional_props: additionalProps ?? false, }), base, ), @@ -599,10 +569,7 @@ export class Func< * see [parameter transformations](https://metatype.dev/docs/reference/types/parameter-transformations) */ reduce(value: Record): Func { - const reducedId = wit_utils.reduceb( - this._id, - buildReduceEntries(value), - ); + const reducedId = sdkUtils.reduceb(this._id, buildReduceEntries(value)); return new Func( reducedId, @@ -631,10 +598,10 @@ export class Func< const transformData = core.getTransformData(this.inp._id, transformTree); return func( - new Typedef(transformData.queryInput), + new Typedef(transformData.query_input), this.out, this.mat, - transformData.parameterTransform, + transformData.parameter_transform, this.config, ); } @@ -681,9 +648,9 @@ export function func< inp: inp._id, out: out._id, mat: mat._id, - parameterTransform: transformData ?? undefined, - rateCalls, - rateWeight, + parameter_transform: transformData ?? undefined, + rate_calls: rateCalls, + rate_weight: rateWeight, }) as number, inp, out, diff --git a/src/typegraph/deno/src/utils/func_utils.ts b/src/typegraph/deno/src/utils/func_utils.ts index 7f39df0c2b..76abaf8680 100644 --- a/src/typegraph/deno/src/utils/func_utils.ts +++ b/src/typegraph/deno/src/utils/func_utils.ts @@ -6,11 +6,11 @@ import { TgFinalizationResult, TypegraphOutput, } from "../typegraph.ts"; -import { ReduceEntry } from "../gen/typegraph_core.d.ts"; +import { ReduceEntry } from "../gen/utils.ts"; import { serializeStaticInjection } from "./injection_utils.ts"; -import { SerializeParams } from "../gen/typegraph_core.d.ts"; +import { SerializeParams } from "../gen/core.ts"; import { log } from "../io.ts"; -import { core } from "../wit.ts"; +import { core } from "../sdk.ts"; export function stringifySymbol(symbol: symbol): string { const name = symbol.toString().match(/\((.+)\)/)?.[1]; @@ -32,13 +32,18 @@ export function serializeConfig(config: ConfigSpec | undefined): string | null { if (array.length === 0) { return null; } - return JSON.stringify(array.reduce>((acc, item) => { - if (typeof item === "string") { - return { ...acc, [item]: true }; - } else { - return { ...acc, ...item }; - } - }, {} as Record)); + return JSON.stringify( + array.reduce>( + (acc, item) => { + if (typeof item === "string") { + return { ...acc, [item]: true }; + } else { + return { ...acc, ...item }; + } + }, + {} as Record, + ), + ); } export type AsIdField = boolean | "simple" | "composite"; @@ -95,7 +100,7 @@ export function buildReduceEntries( } entries.push({ path: currPath, - injectionData: node.payload, + injection_data: node.payload, }); return entries; } @@ -104,7 +109,7 @@ export function buildReduceEntries( if (Array.isArray(node)) { entries.push({ path: currPath, - injectionData: serializeStaticInjection(node), + injection_data: serializeStaticInjection(node), }); return entries; } @@ -118,7 +123,7 @@ export function buildReduceEntries( if (allowed.includes(typeof node)) { entries.push({ path: currPath, - injectionData: serializeStaticInjection(node), + injection_data: serializeStaticInjection(node), }); return entries; } @@ -148,8 +153,8 @@ export function freezeTgOutput( config: SerializeParams, tgOutput: TypegraphOutput, ): TypegraphOutput { - frozenMemo[tgOutput.name] = frozenMemo[tgOutput.name] ?? - tgOutput.serialize(config); + frozenMemo[tgOutput.name] = + frozenMemo[tgOutput.name] ?? tgOutput.serialize(config); return { ...tgOutput, serialize: () => frozenMemo[tgOutput.name], diff --git a/src/typegraph/deno/src/wit.ts b/src/typegraph/deno/src/wit.ts deleted file mode 100644 index 9d6def4c09..0000000000 --- a/src/typegraph/deno/src/wit.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -import { MetatypeTypegraphCore } from "./gen/typegraph_core.d.ts"; -import { MetatypeTypegraphRuntimes } from "./gen/typegraph_core.d.ts"; -import { MetatypeTypegraphAws } from "./gen/typegraph_core.d.ts"; -import { MetatypeTypegraphUtils } from "./gen/typegraph_core.d.ts"; -import * as js from "./gen/typegraph_core.js"; - -export const core = js.core as typeof MetatypeTypegraphCore; -export const runtimes = js.runtimes as typeof MetatypeTypegraphRuntimes; -export const aws = js.aws as typeof MetatypeTypegraphAws; -export const wit_utils = js.utils as typeof MetatypeTypegraphUtils; - -export type { Cors, Rate } from "./gen/typegraph_core.d.ts"; -export type { - Auth, - AuthProtocol, - AuthProtocolBasic, - AuthProtocolJwt, - AuthProtocolOauth2, -} from "./gen/typegraph_core.d.ts"; diff --git a/src/typegraph/python/typegraph/deploy/request.py b/src/typegraph/python/typegraph/deploy/request.py index 819cfc44d5..9d6f99a835 100644 --- a/src/typegraph/python/typegraph/deploy/request.py +++ b/src/typegraph/python/typegraph/deploy/request.py @@ -4,8 +4,8 @@ from enum import Enum from typing import Optional, Any -from typegraph.python.typegraph.graph.shared_types import BasicAuth -from typegraph.python.typegraph.io import DeployTarget +from typegraph.graph.shared_types import BasicAuth +from typegraph.io import DeployTarget class Encoding(Enum): diff --git a/src/typegraph/python/typegraph/effects.py b/src/typegraph/python/typegraph/effects.py index 8156959e5c..cc744ae224 100644 --- a/src/typegraph/python/typegraph/effects.py +++ b/src/typegraph/python/typegraph/effects.py @@ -3,28 +3,25 @@ from enum import Enum, auto -from typegraph.gen.exports.runtimes import ( - EffectCreate, - EffectDelete, - EffectRead, - EffectUpdate, +from typegraph.gen.runtimes import ( + Effect, ) -def read(): - return EffectRead() +def read() -> Effect: + return "read" -def create(idempotent: bool = False): - return EffectCreate(idempotent) +def create(idempotent: bool = False) -> Effect: + return {"create": idempotent} -def delete(idempotent: bool = True): - return EffectDelete(idempotent) +def delete(idempotent: bool = True) -> Effect: + return {"delete": idempotent} -def update(idempotent: bool = False): - return EffectUpdate(idempotent) +def update(idempotent: bool = False) -> Effect: + return {"update": idempotent} # For injections diff --git a/src/typegraph/python/typegraph/graph/metagen.py b/src/typegraph/python/typegraph/graph/metagen.py index 5b819be41f..72b4b56eaf 100644 --- a/src/typegraph/python/typegraph/graph/metagen.py +++ b/src/typegraph/python/typegraph/graph/metagen.py @@ -3,16 +3,15 @@ import json from typing import List, Union -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( MigrationAction, SerializeParams, PrismaMigrationConfig, ) -from typegraph.gen.exports.utils import FdkConfig, FdkOutput -from typegraph.gen.types import Err +from typegraph.gen.utils import FdkConfig, FdkOutput from typegraph.graph.shared_types import TypegraphOutput from typegraph.utils import freeze_tg_output -from typegraph.wit import ErrorStack, store, wit_utils +from typegraph.wit import sdk_utils class Metagen: @@ -58,13 +57,11 @@ def dry_run( overwrite: Union[bool, None] = None, ) -> List[FdkOutput]: fdk_config = self._get_fdk_config(tg_output, target_name) - res = wit_utils.metagen_exec(store, fdk_config) - if isinstance(res, Err): - raise ErrorStack(res.value) - for item in res.value: + res = sdk_utils.metagen_exec(fdk_config) + for item in res: if overwrite is not None: item.overwrite = overwrite - return res.value + return res def run( self, @@ -73,6 +70,4 @@ def run( overwrite: Union[bool, None] = None, ): items = self.dry_run(tg_output, target_name, overwrite) - res = wit_utils.metagen_write_files(store, items, self.workspace_path) - if isinstance(res, Err): - raise ErrorStack(res.value) + _ = sdk_utils.metagen_write_files(items, self.workspace_path) diff --git a/src/typegraph/python/typegraph/graph/params.py b/src/typegraph/python/typegraph/graph/params.py index 8cc457b5a0..346688f947 100644 --- a/src/typegraph/python/typegraph/graph/params.py +++ b/src/typegraph/python/typegraph/graph/params.py @@ -4,10 +4,8 @@ from dataclasses import dataclass import json from typing import List, Optional, TYPE_CHECKING, Any -from typegraph.gen.exports import utils -from typegraph.wit import ErrorStack, store, wit_utils - -from typegraph.gen.types import Err +from typegraph.gen import utils +from typegraph.wit import sdk_utils if TYPE_CHECKING: from typegraph import t @@ -93,14 +91,14 @@ def jwt(name: str, format: str, algorithm: None) -> "utils.Auth": ("algorithm", json.dumps(algorithm)), ] - return utils.Auth(name, utils.AuthProtocolJwt(), auth_data) + return utils.Auth(name, "jwt", auth_data) def hmac256(name: str) -> "utils.Auth": return Auth.jwt(name, "raw", {"name": "HMAC", "hash": {"name": "SHA-256"}}) def basic(users: List[str]) -> "utils.Auth": auth_data = [("users", json.dumps(users))] - return utils.Auth("basic", utils.AuthProtocolBasic(), auth_data) + return utils.Auth("basic", "basic", auth_data) @classmethod def oauth2( @@ -111,10 +109,10 @@ def oauth2( scopes: str, profile_url: Optional[str] = None, profiler: Optional["t.func"] = None, - ) -> "utils.Auth": - return utils.Auth( + ): + return sdk_utils.Auth( name, - utils.AuthProtocolOauth2(), + "oauth2", [ ("authorize_url", json.dumps(authorize_url)), ("access_url", json.dumps(access_url)), @@ -124,74 +122,46 @@ def oauth2( ], ) - def oauth2_digitalocean( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_digitalocean(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("digitalocean", scopes, profiler) - def oauth2_discord( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_discord(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("discord", scopes, profiler) - def oauth2_dropbox( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_dropbox(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("dropbox", scopes, profiler) - def oauth2_facebook( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_facebook(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("facebook", scopes, profiler) - def oauth2_github( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_github(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("github", scopes, profiler) - def oauth2_gitlab( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_gitlab(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("gitlab", scopes, profiler) - def oauth2_google( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_google(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("google", scopes, profiler) - def oauth2_instagram( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_instagram(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("instagram", scopes, profiler) - def oauth2_linkedin( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_linkedin(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("linkedin", scopes, profiler) - def oauth2_microsoft( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_microsoft(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("microsoft", scopes, profiler) - def oauth2_reddit( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_reddit(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("reddit", scopes, profiler) - def oauth2_slack( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_slack(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("slack", scopes, profiler) - def oauth2_stackexchange( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_stackexchange(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("stackexchange", scopes, profiler) - def oauth2_twitter( - scopes: str, profiler: Optional[StdOauth2Profiler] = None - ) -> "utils.Auth": + def oauth2_twitter(scopes: str, profiler: Optional[StdOauth2Profiler] = None): return RawAuth.from_std("twitter", scopes, profiler) @@ -204,21 +174,19 @@ def from_std( cls, service: str, scopes: str, profiler: Optional[StdOauth2Profiler] = None ): if isinstance(profiler, NoProfiler): - res = wit_utils.oauth2_without_profiler(store, service, scopes) + res = sdk_utils.oauth2_without_profiler(service, scopes) elif isinstance(profiler, ExtendedProfiler): - res = wit_utils.oauth2_with_extended_profiler( - store, service, scopes, json.dumps(profiler.extension) + res = sdk_utils.oauth2_with_extended_profiler( + service, scopes, json.dumps(profiler.extension) ) elif isinstance(profiler, CustomProfiler): - res = wit_utils.oauth2_with_custom_profiler( - store, service, scopes, profiler.func._id + res = sdk_utils.oauth2_with_custom_profiler( + service, scopes, profiler.func._id ) else: # default profiler - res = wit_utils.oauth2(store, service, scopes) + res = sdk_utils.oauth2(service, scopes) - if isinstance(res, Err): - raise ErrorStack(res.value) - return cls(res.value) + return cls(res) @dataclass diff --git a/src/typegraph/python/typegraph/graph/shared_types.py b/src/typegraph/python/typegraph/graph/shared_types.py index cce409a2c8..6312bccb05 100644 --- a/src/typegraph/python/typegraph/graph/shared_types.py +++ b/src/typegraph/python/typegraph/graph/shared_types.py @@ -4,8 +4,7 @@ from base64 import b64encode from dataclasses import dataclass from typing import Callable, List -from typegraph.gen.exports.core import Artifact -from typegraph.wit import SerializeParams +from typegraph.gen.core import Artifact, SerializeParams @dataclass diff --git a/src/typegraph/python/typegraph/graph/tg_artifact_upload.py b/src/typegraph/python/typegraph/graph/tg_artifact_upload.py index a907b4b011..06a21a827c 100644 --- a/src/typegraph/python/typegraph/graph/tg_artifact_upload.py +++ b/src/typegraph/python/typegraph/graph/tg_artifact_upload.py @@ -3,14 +3,12 @@ import json import os -import sys from dataclasses import dataclass from typing import Any, Dict, List, Optional, Union from urllib import request, parse as Url from urllib.error import HTTPError -from typegraph.gen.exports.core import Artifact -from typegraph.gen.types import Err, Ok, Result +from typegraph.gen.core import Artifact from typegraph.graph.shared_types import BasicAuth from typegraph.io import Log @@ -79,7 +77,7 @@ def __upload( self, token: str, meta: UploadArtifactMeta, - ) -> Result[Any, Err]: + ) -> Any: upload_headers = {"Content-Type": "application/octet-stream"} if self.auth is not None: @@ -88,7 +86,7 @@ def __upload( if token is None: Log.info("skipping artifact upload:", meta.relativePath) - return Ok(None) + return if self.tg_path is None: raise Exception("Typegraph path not set in Deploy Params") @@ -139,28 +137,29 @@ def get_metas(self, artifacts: List[Artifact]) -> List[UploadArtifactMeta]: for artifact in artifacts ] - def __handle_errors( - self, - results: List[Result[Any, Err[Any]]], - artifact_metas: List[UploadArtifactMeta], - ): - errors = 0 - for result, meta in zip(results, artifact_metas): - if isinstance(result, Err): - print( - f"failed to upload artifact {meta.relativePath}: {result.value}", - file=sys.stderr, - ) - errors += 1 - # else: - # print(f"Successfuly uploaded artifact {meta.relativePath}", file=sys.stderr) - - if errors > 0: - raise Exception(f"failed to upload {errors} artifacts") + # FIXME: Exceptions are directly thrown so why is it even here? + # def __handle_errors( + # self, + # results: List[Result[Any, Err[Any]]], + # artifact_metas: List[UploadArtifactMeta], + # ): + # errors = 0 + # for result, meta in zip(results, artifact_metas): + # if isinstance(result, Err): + # print( + # f"failed to upload artifact {meta.relativePath}: {result.value}", + # file=sys.stderr, + # ) + # errors += 1 + # # else: + # # print(f"Successfuly uploaded artifact {meta.relativePath}", file=sys.stderr) + # + # if errors > 0: + # raise Exception(f"failed to upload {errors} artifacts") def upload_artifacts( self, - ) -> Result[None, Err]: + ): artifact_metas = self.get_metas(self.artifacts) upload_urls = self.__get_upload_tokens(artifact_metas) @@ -172,9 +171,8 @@ def upload_artifacts( result = self.__upload(url, meta) results.append(result) - self.__handle_errors(results, artifact_metas) - - return Ok(None) + # FIXME: Why?? + # self.__handle_errors(results, artifact_metas) def handle_response(res: Any): diff --git a/src/typegraph/python/typegraph/graph/tg_deploy.py b/src/typegraph/python/typegraph/graph/tg_deploy.py index b300f46393..9b2e7558b6 100644 --- a/src/typegraph/python/typegraph/graph/tg_deploy.py +++ b/src/typegraph/python/typegraph/graph/tg_deploy.py @@ -7,13 +7,12 @@ from urllib import request from platform import python_version -from typegraph.gen.exports.utils import QueryDeployParams -from typegraph.gen.types import Err -from typegraph.gen.exports.core import MigrationAction, PrismaMigrationConfig +from typegraph.gen.utils import QueryDeployParams +from typegraph.gen.core import MigrationAction, PrismaMigrationConfig, SerializeParams from typegraph.graph.shared_types import BasicAuth from typegraph.graph.tg_artifact_upload import ArtifactUploader from typegraph.graph.typegraph import TypegraphOutput -from typegraph.wit import ErrorStack, SerializeParams, store, wit_utils +from typegraph.wit import sdk_utils from typegraph import version as sdk_version @@ -103,22 +102,18 @@ def tg_deploy(tg: TypegraphOutput, params: TypegraphDeployParams) -> DeployResul artifact_uploader.upload_artifacts() # deploy the typegraph - res = wit_utils.gql_deploy_query( - store, + res = sdk_utils.gql_deploy_query( params=QueryDeployParams( tg=tg_json, secrets=[(k, v) for k, v in (params.secrets or {}).items()], ), ) - if isinstance(res, Err): - raise ErrorStack(res.value) - req = request.Request( url=url, method="POST", headers=headers, - data=res.value.encode(), + data=res.encode(), ) response = exec_request(req) @@ -139,16 +134,13 @@ def tg_remove(typegraph_name: str, params: TypegraphRemoveParams): if typegate.auth is not None: headers["Authorization"] = typegate.auth.as_header_value() - res = wit_utils.gql_remove_query(store, [typegraph_name]) - - if isinstance(res, Err): - raise ErrorStack(res.value) + res = sdk_utils.gql_remove_query([typegraph_name]) req = request.Request( url=url, method="POST", headers=headers, - data=res.value.encode(), + data=res.encode(), ) response = exec_request(req).read().decode() diff --git a/src/typegraph/python/typegraph/graph/tg_manage.py b/src/typegraph/python/typegraph/graph/tg_manage.py index 1d71cd921f..d9bb84b34f 100644 --- a/src/typegraph/python/typegraph/graph/tg_manage.py +++ b/src/typegraph/python/typegraph/graph/tg_manage.py @@ -4,7 +4,7 @@ import traceback from pathlib import Path -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( SerializeParams, MigrationAction, PrismaMigrationConfig, @@ -15,7 +15,6 @@ TypegraphDeployParams, tg_deploy, ) -from typegraph.wit import ErrorStack from typegraph.utils import freeze_tg_output from typegraph.io import Log, Rpc from typegraph.envs.cli import CliEnv, Command, get_cli_env @@ -66,10 +65,7 @@ def serialize(self): Log.success(res.tgJson, noencode=True) except Exception as err: Log.debug(traceback.format_exc()) - if isinstance(err, ErrorStack): - Log.failure({"typegraph": self.typegraph.name, "errors": err.stack}) - else: - Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) + Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) def deploy(self): env = self.env @@ -94,10 +90,7 @@ def deploy(self): frozen_out.serialize(params) except Exception as err: Log.debug(traceback.format_exc()) - if isinstance(err, ErrorStack): - Log.failure({"typegraph": self.typegraph.name, "errors": err.stack}) - else: - Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) + Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) return try: @@ -124,10 +117,7 @@ def deploy(self): Log.success({"typegraph": self.typegraph.name, **response}) except Exception as err: Log.debug(traceback.format_exc()) - if isinstance(err, ErrorStack): - Log.failure({"typegraph": self.typegraph.name, "errors": err.stack}) - else: - Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) + Log.failure({"typegraph": self.typegraph.name, "errors": [str(err)]}) return def list(self): diff --git a/src/typegraph/python/typegraph/graph/typegraph.py b/src/typegraph/python/typegraph/graph/typegraph.py index 135bb1e6de..f3e7019681 100644 --- a/src/typegraph/python/typegraph/graph/typegraph.py +++ b/src/typegraph/python/typegraph/graph/typegraph.py @@ -6,21 +6,20 @@ from pathlib import Path from typing import TYPE_CHECKING, Callable, List, Optional, Union, Any -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( SerializeParams, Rate, TypegraphInitParams, ) -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( Cors as CoreCors, ) -from typegraph.gen.exports.utils import Auth -from typegraph.gen.types import Err +from typegraph.gen.utils import Auth from typegraph.graph.params import Cors, RawAuth from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.policy import Policy, PolicyPerEffect, PolicySpec, get_policy_chain from typegraph.envs.cli import CLI_ENV -from typegraph.wit import ErrorStack, core, store, wit_utils +from typegraph.wit import core, sdk_utils from typegraph.io import Log if TYPE_CHECKING: @@ -69,7 +68,7 @@ def __init__( @classmethod def get_active(cls) -> Optional["Typegraph"]: if len(cls._context) == 0: - raise ErrorStack("No active typegraph") + raise Exception("No active typegraph") return cls._context[-1] def __call__(self, **kwargs: ExposeItem): @@ -80,15 +79,11 @@ def expose( default_policy: Optional[PolicySpec] = None, **kwargs: ExposeItem, ): - res = core.expose( - store, + core.expose( [(k, v._id) for k, v in kwargs.items()], default_policy=get_policy_chain(default_policy) if default_policy else None, ) - if isinstance(res, Err): - raise ErrorStack(res.value) - @dataclass class ApplyFromArg: @@ -132,28 +127,19 @@ def inherit(self): return InheritDef() def rest(self, graphql: str) -> int: - res = wit_utils.add_graphql_endpoint(store, graphql) - if isinstance(res, Err): - raise ErrorStack(res.value) - return res.value + return sdk_utils.add_graphql_endpoint(graphql) def auth(self, value: Union[Auth, RawAuth]): - res = ( - wit_utils.add_raw_auth(store, value.json_str) - if isinstance(value, RawAuth) - else wit_utils.add_auth(store, value) - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - return res.value + if isinstance(value, RawAuth): + return sdk_utils.add_raw_auth(value.json_str) + else: + return sdk_utils.add_auth(value) def ref(self, name: str) -> "t.typedef": return gen_ref(name) def configure_random_injection(self, seed: int): - res = core.set_seed(store, seed) - if isinstance(res, Err): - raise ErrorStack(res.value) + core.set_seed(seed) def as_arg(self, name: Optional[str] = None): return ApplyFromArg(name) @@ -218,7 +204,6 @@ def serialize(params: SerializeParams): ) core.init_typegraph( - store, TypegraphInitParams( name=tg.name, dynamic=tg.dynamic, @@ -231,17 +216,12 @@ def serialize(params: SerializeParams): try: builder(Graph(tg)) - except ErrorStack as e: + except Exception as e: import sys sys.stderr.write(f"Error in typegraph '{actual_name}':\n") - for line in e.stack: - sys.stderr.write("- ") - sys.stderr.write(line) - sys.stderr.write("\n") + sys.stderr.write(str(e)) sys.exit(1) - except Exception: - raise popped = Typegraph._context.pop() assert tg == popped @@ -250,11 +230,8 @@ def serialize(params: SerializeParams): def serialize_with_artifacts( config: SerializeParams, ): - finalization_result = core.serialize_typegraph(store, config) - if isinstance(finalization_result, Err): - raise ErrorStack(finalization_result.value) - - tg_json, ref_artifacts = finalization_result.value + finalization_result = core.serialize_typegraph(config) + tg_json, ref_artifacts = finalization_result return FinalizationResult(tg_json, ref_artifacts) tg_output = TypegraphOutput(name=tg.name, serialize=serialize_with_artifacts) @@ -272,9 +249,8 @@ def serialize_with_artifacts( def gen_ref(name: str) -> "t.typedef": - res = core.refb(store, name, None) - if isinstance(res, Err): - raise ErrorStack(res.value) + res = core.refb(name, None) + from typegraph.t import typedef - return typedef(res.value) + return typedef(res) diff --git a/src/typegraph/python/typegraph/host/host.py b/src/typegraph/python/typegraph/host/host.py deleted file mode 100644 index 145a500360..0000000000 --- a/src/typegraph/python/typegraph/host/host.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -# SPDX-License-Identifier: MPL-2.0 - -import os -import re -import sys -from typing import List - -from typegraph.gen import imports -from typegraph.gen.types import Err, Ok, Result - - -def has_match(text: str, items: List[str]) -> bool: - for pat_s in items: - pattern = re.compile(pattern=pat_s) - if bool(re.search(pattern, text)): - return True - return False - - -class HostImpl(imports.HostHost): - def print(self, msg: str): - print(msg) - - def eprint(self, msg: str): - print(msg, file=sys.stderr) - - def expand_path(self, root: str, exclude: List[str]) -> Result[List[str], str]: - try: - result = [] - if os.path.isfile(root): - result.append(root) - for path, _, files in os.walk(root): - for name in files: - file_path = os.path.join(path, name) - if not has_match(file_path, exclude): - result.append(file_path) - - return Ok(result) - except Exception as e: - return Err(str(e)) - - def path_exists(self, path: str) -> Result[bool, str]: - try: - return Ok(os.path.isfile(path) or os.path.isdir(path)) - except Exception as e: - return Err(str(e)) - - def read_file(self, path: str) -> Result[bytes, str]: - try: - file = open(path, mode="rb") - return Ok(file.read()) - except Exception as e: - return Err(str(e)) - - def write_file(self, path: str, data: bytes) -> Result[None, str]: - try: - dirname = os.path.dirname(path) - os.makedirs(dirname, exist_ok=True) - file = open(path, "wb") - file.write(data) - return Ok(None) - except Exception as e: - return Err(str(e)) - - def get_cwd(self) -> Result[str, str]: - try: - return Ok(os.getcwd()) - except Exception as e: - return Err(str(e)) diff --git a/src/typegraph/python/typegraph/io.py b/src/typegraph/python/typegraph/io.py index 92bb66f384..dd69176338 100644 --- a/src/typegraph/python/typegraph/io.py +++ b/src/typegraph/python/typegraph/io.py @@ -5,7 +5,7 @@ from fileinput import FileInput from dataclasses import dataclass from typegraph.graph.shared_types import BasicAuth -from typegraph.gen.exports.core import MigrationAction +from typegraph.gen.core import MigrationAction import json diff --git a/src/typegraph/python/typegraph/policy.py b/src/typegraph/python/typegraph/policy.py index 8694571835..f680fa280b 100644 --- a/src/typegraph/python/typegraph/policy.py +++ b/src/typegraph/python/typegraph/policy.py @@ -5,25 +5,13 @@ from re import Pattern from typing import List, Optional, Union -from typegraph.gen.exports.core import ( - ContextCheckPattern, - ContextCheckValue, - ContextCheckNotNull, - Err, +from typegraph.gen.core import ( MaterializerId, - PolicySpecPerEffect, - PolicySpecSimple, + Policy as CorePolicy, + PolicySpec as CorePolicySpec, + PolicyPerEffect as CorePolicyPerEffect, ) -from typegraph.gen.exports.core import ( - Policy as WitPolicy, -) -from typegraph.gen.exports.core import ( - PolicyPerEffect as WitPolicyPerEffect, -) -from typegraph.gen.exports.core import ( - PolicySpec as WitPolicySpec, -) -from typegraph.wit import core, store +from typegraph.wit import core class Policy: @@ -39,42 +27,30 @@ def public(cls): """ Public access """ - res = core.get_public_policy(store) - if isinstance(res, Err): - raise Exception(res.value) - return cls(id=res.value[0], name=res.value[1]) + res = core.get_public_policy() + return cls(id=res[0], name=res[1]) @classmethod def context(cls, key: str, check: Optional[Union[str, Pattern]] = None) -> "Policy": if check is None: - res = core.register_context_policy(store, key, ContextCheckNotNull()) + res = core.register_context_policy(key, "not_null") elif isinstance(check, str): - res = core.register_context_policy(store, key, ContextCheckValue(check)) + res = core.register_context_policy(key, {"value": check}) else: - res = core.register_context_policy( - store, key, ContextCheckPattern(check.pattern) - ) + res = core.register_context_policy(key, {"pattern": check.pattern}) - if isinstance(res, Err): - raise Exception(res.value) - - (policy_id, name) = res.value + (policy_id, name) = res return cls(id=policy_id, name=name) @classmethod def internal(cls) -> "Policy": - res = core.get_internal_policy(store) - if isinstance(res, Err): - raise Exception(res.value) - return cls(id=res.value[0], name=res.value[1]) + res = core.get_internal_policy() + return cls(id=res[0], name=res[1]) @classmethod def create(cls, name: str, mat_id: MaterializerId) -> "Policy": - res = core.register_policy(store, WitPolicy(name=name, materializer=mat_id)) - if isinstance(res, Err): - raise Exception(res.value) - - return cls(id=res.value, name=name) + res = core.register_policy(CorePolicy(name=name, materializer=mat_id)) + return cls(id=res, name=name) @classmethod def on( @@ -101,20 +77,22 @@ class PolicyPerEffect: PolicySpec = Union[SinglePolicySpec, List[SinglePolicySpec]] -def get_policy_chain(policies: PolicySpec) -> List[WitPolicySpec]: +def get_policy_chain(policies: PolicySpec) -> List[CorePolicySpec]: if not isinstance(policies, list) and not isinstance(policies, tuple): policies = (policies,) return [ - PolicySpecSimple(value=p.id) - if isinstance(p, Policy) - else PolicySpecPerEffect( - value=WitPolicyPerEffect( - create=p.create and p.create.id, - update=p.update and p.update.id, - delete=p.delete and p.delete.id, - read=p.read and p.read.id, - ) + ( + {"simple": p.id} + if isinstance(p, Policy) + else { + "per_effect": CorePolicyPerEffect( + create=p.create and p.create.id, + update=p.update and p.update.id, + delete=p.delete and p.delete.id, + read=p.read and p.read.id, + ) + } ) for p in policies ] diff --git a/src/typegraph/python/typegraph/providers/aws.py b/src/typegraph/python/typegraph/providers/aws.py index 2d6030bce9..a11f4b121f 100644 --- a/src/typegraph/python/typegraph/providers/aws.py +++ b/src/typegraph/python/typegraph/providers/aws.py @@ -5,15 +5,13 @@ from typing import Optional from typegraph import t -from typegraph.gen.exports.aws import ( +from typegraph.gen.aws import ( S3PresignGetParams, S3PresignPutParams, S3RuntimeData, ) -from typegraph.gen.exports.runtimes import EffectCreate, EffectRead -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import aws, ErrorStack, store +from typegraph.wit import aws class S3Runtime(Runtime): @@ -32,7 +30,6 @@ def __init__( path_style_secret: str, ): runtime_id = aws.register_s3_runtime( - store, S3RuntimeData( host_secret=host_secret, region_secret=region_secret, @@ -41,10 +38,8 @@ def __init__( path_style_secret=path_style_secret, ), ) - if isinstance(runtime_id, Err): - raise ErrorStack(runtime_id.value) - super().__init__(runtime_id.value) + super().__init__(runtime_id) self.host_secret = host_secret self.region_secret = region_secret self.access_key_secret = access_key_secret @@ -53,24 +48,21 @@ def __init__( def presign_get(self, bucket: str, expiry_secs: Optional[int] = None): mat_id = aws.s3_presign_get( - store, self.id, S3PresignGetParams( bucket=bucket, expiry_secs=expiry_secs, ), ) - if isinstance(mat_id, Err): - raise ErrorStack(mat_id.value) return t.func( t.struct({"path": t.string()}), t.uri(), PresignGetMat( - mat_id.value, + mat_id, bucket=bucket, expiry_secs=expiry_secs, - effect=EffectRead(), + effect="read", ), ) @@ -81,7 +73,6 @@ def presign_put( expiry_secs: Optional[int] = None, ): mat_id = aws.s3_presign_put( - store, self.id, S3PresignPutParams( bucket=bucket, @@ -89,25 +80,21 @@ def presign_put( expiry_secs=expiry_secs, ), ) - if isinstance(mat_id, Err): - raise ErrorStack(mat_id.value) return t.func( t.struct({"length": t.integer(), "path": t.string()}), t.uri(), PresignPutMat( - mat_id.value, + mat_id, bucket=bucket, content_type=content_type, expiry_secs=expiry_secs, - effect=EffectRead(), + effect="read", ), ) def list(self, bucket: str): - mat_id = aws.s3_list(store, self.id, bucket) - if isinstance(mat_id, Err): - raise ErrorStack(mat_id.value) + mat_id = aws.s3_list(self.id, bucket) return t.func( t.struct({"path": t.string().optional()}), @@ -117,16 +104,15 @@ def list(self, bucket: str): "prefix": t.list(t.string()), } ), - S3ListMat(mat_id.value, bucket=bucket, effect=EffectRead()), + S3ListMat(mat_id, bucket=bucket, effect="read"), ) def upload(self, bucket: str, file_type: Optional[t.file] = None): - mat_id = aws.s3_upload(store, self.id, bucket) - if isinstance(mat_id, Err): - raise ErrorStack(mat_id.value) + mat_id = aws.s3_upload(self.id, bucket) if file_type is None: file_type = t.file() + return t.func( t.struct( { @@ -135,16 +121,15 @@ def upload(self, bucket: str, file_type: Optional[t.file] = None): } ), t.boolean(), - S3UploadMat(mat_id.value, bucket=bucket, effect=EffectCreate(True)), + S3UploadMat(mat_id, bucket=bucket, effect={"create": True}), ) def upload_all(self, bucket: str, file_type: Optional[t.file] = None): - mat_id = aws.s3_upload_all(store, self.id, bucket) - if isinstance(mat_id, Err): - raise ErrorStack(mat_id.value) + mat_id = aws.s3_upload_all(self.id, bucket) if file_type is None: file_type = t.file() + return t.func( t.struct( { @@ -153,7 +138,7 @@ def upload_all(self, bucket: str, file_type: Optional[t.file] = None): } ), t.boolean(), - S3UploadAllMat(mat_id.value, bucket=bucket, effect=EffectCreate(True)), + S3UploadAllMat(mat_id, bucket=bucket, effect={"create": True}), ) diff --git a/src/typegraph/python/typegraph/providers/prisma.py b/src/typegraph/python/typegraph/providers/prisma.py index 80696ccddf..b66bffa088 100644 --- a/src/typegraph/python/typegraph/providers/prisma.py +++ b/src/typegraph/python/typegraph/providers/prisma.py @@ -4,9 +4,8 @@ from typing import Union, Optional from typegraph.runtimes.base import Runtime -from typegraph.wit import ErrorStack, runtimes, store -from typegraph.gen.types import Err -from typegraph.gen.exports.runtimes import ( +from typegraph.wit import runtimes +from typegraph.gen.runtimes import ( Effect, PrismaRuntimeData, PrismaLinkData, @@ -21,133 +20,101 @@ class PrismaRuntime(Runtime): def __init__(self, name: str, connection_string_secret: str): runtime_id = runtimes.register_prisma_runtime( - store, PrismaRuntimeData(name, connection_string_secret) + PrismaRuntimeData(name, connection_string_secret) ) - if isinstance(runtime_id, Err): - raise ErrorStack(runtime_id.value) - super().__init__(runtime_id.value) + super().__init__(runtime_id) self.name = name self.connection_string_secret = connection_string_secret def find_unique(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_find_unique(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_find_unique(self.id, model._id) + return t.func.from_type_func(type) def find_many(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_find_many(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_find_many(self.id, model._id) + return t.func.from_type_func(type) def find_first(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_find_first(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_find_first(self.id, model._id) + return t.func.from_type_func(type) def aggregate(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_aggregate(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_aggregate(self.id, model._id) + return t.func.from_type_func(type) def count(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_count(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_count(self.id, model._id) + return t.func.from_type_func(type) def group_by(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_group_by(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_group_by(self.id, model._id) + return t.func.from_type_func(type) def create(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_create_one(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_create_one(self.id, model._id) + return t.func.from_type_func(type) def create_many(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_create_many(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_create_many(self.id, model._id) + return t.func.from_type_func(type) def update(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_update_one(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_update_one(self.id, model._id) + return t.func.from_type_func(type) def update_many(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_update_many(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_update_many(self.id, model._id) + return t.func.from_type_func(type) def upsert(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_upsert_one(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_upsert_one(self.id, model._id) + return t.func.from_type_func(type) def delete(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_delete_one(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_delete_one(self.id, model._id) + return t.func.from_type_func(type) def delete_many(self, model: Union[str, t.typedef]) -> t.func: if isinstance(model, str): model = gen_ref(model) - type = runtimes.prisma_delete_many(store, self.id, model._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_delete_many(self.id, model._id) + return t.func.from_type_func(type) def execute(self, query: str, parameters: t.typedef, effect: Effect) -> t.func: - type = runtimes.prisma_execute(store, self.id, query, parameters._id, effect) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_execute(self.id, query, parameters._id, effect) + return t.func.from_type_func(type) def query_raw( self, query: str, parameters: Union[None, t.typedef], output: t.typedef ) -> t.func: params_id = None if parameters is None else parameters._id - type = runtimes.prisma_query_raw(store, self.id, query, params_id, output._id) - if isinstance(type, Err): - raise ErrorStack(type.value) - return t.func.from_type_func(type.value) + type = runtimes.prisma_query_raw(self.id, query, output._id, params_id) + return t.func.from_type_func(type) def link( self, @@ -174,7 +141,6 @@ def prisma_link( if isinstance(target_type, str): target_type = gen_ref(target_type) type_id = runtimes.prisma_link( - store, PrismaLinkData( target_type=target_type._id, relationship_name=name, @@ -184,6 +150,4 @@ def prisma_link( ), ) - if isinstance(type_id, Err): - raise ErrorStack(type_id.value) - return t.typedef(type_id.value) + return t.typedef(type_id) diff --git a/src/typegraph/python/typegraph/providers/temporal.py b/src/typegraph/python/typegraph/providers/temporal.py index 104505fe45..45554d50c7 100644 --- a/src/typegraph/python/typegraph/providers/temporal.py +++ b/src/typegraph/python/typegraph/providers/temporal.py @@ -5,17 +5,12 @@ from typegraph.runtimes.base import Runtime -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( TemporalOperationData, TemporalRuntimeData, TemporalOperationType, - TemporalOperationTypeStartWorkflow, - TemporalOperationTypeSignalWorkflow, - TemporalOperationTypeQueryWorkflow, - TemporalOperationTypeDescribeWorkflow, ) -from typegraph.gen.types import Err -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes from typegraph import t @@ -31,10 +26,8 @@ def __init__( data = TemporalRuntimeData( name=name, host_secret=host_secret, namespace_secret=namespace_secret ) - runtime_id = runtimes.register_temporal_runtime(store, data) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - super().__init__(runtime_id.value) + runtime_id = runtimes.register_temporal_runtime(data) + super().__init__(runtime_id) self.name = name self.host_secret = host_secret @@ -51,28 +44,21 @@ def _generic_temporal_func( func_out=None if func_out is None else func_out._id, operation=operation, ) - func_data = runtimes.generate_temporal_operation(store, self.id, data) - if isinstance(func_data, Err): - raise Exception(func_data.value) - - return t.func.from_type_func(func_data.value) + func_data = runtimes.generate_temporal_operation(self.id, data) + return t.func.from_type_func(func_data) def start_workflow(self, workflow_type: str, arg: t.typedef): - return self._generic_temporal_func( - TemporalOperationTypeStartWorkflow(), workflow_type, arg - ) + return self._generic_temporal_func("start_workflow", workflow_type, arg) def signal_workflow(self, signal_name: str, arg: t.typedef): return self._generic_temporal_func( - TemporalOperationTypeSignalWorkflow(), + "signal_workflow", signal_name, arg, ) def query_workflow(self, query_type: str, arg: t.typedef, out: t.typedef): - return self._generic_temporal_func( - TemporalOperationTypeQueryWorkflow(), query_type, arg, out - ) + return self._generic_temporal_func("query_workflow", query_type, arg, out) def describe_workflow(self): - return self._generic_temporal_func(TemporalOperationTypeDescribeWorkflow()) + return self._generic_temporal_func("describe_workflow") diff --git a/src/typegraph/python/typegraph/runtimes/base.py b/src/typegraph/python/typegraph/runtimes/base.py index f04afc931a..98c7241c68 100644 --- a/src/typegraph/python/typegraph/runtimes/base.py +++ b/src/typegraph/python/typegraph/runtimes/base.py @@ -3,8 +3,8 @@ from dataclasses import dataclass -from typegraph.gen.exports.core import MaterializerId, RuntimeId -from typegraph.gen.exports.runtimes import Effect +from typegraph.gen.core import MaterializerId, RuntimeId +from typegraph.gen.runtimes import Effect @dataclass diff --git a/src/typegraph/python/typegraph/runtimes/deno.py b/src/typegraph/python/typegraph/runtimes/deno.py index 99a9c7e51d..ca61936fb5 100644 --- a/src/typegraph/python/typegraph/runtimes/deno.py +++ b/src/typegraph/python/typegraph/runtimes/deno.py @@ -6,20 +6,18 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Any, List, Optional -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( Effect, - EffectRead, MaterializerDenoFunc, MaterializerDenoImport, MaterializerDenoPredefined, MaterializerDenoStatic, ) -from typegraph.gen.types import Err from typegraph.policy import Policy from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes -# from typegraph.wit import wit_utils +# from typegraph.wit import sdk_utils if TYPE_CHECKING: @@ -28,25 +26,22 @@ class DenoRuntime(Runtime): def __init__(self): - super().__init__(runtimes.get_deno_runtime(store)) + super().__init__(runtimes.get_deno_runtime()) def static(self, out: "t.typedef", value: Any): from typegraph import t mat_id = runtimes.register_deno_static( - store, MaterializerDenoStatic(json.dumps(value)), out._id + MaterializerDenoStatic(json.dumps(value)), out._id ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return t.func( t.struct(), out, StaticMat( - mat_id.value, + mat_id, value=value, - effect=EffectRead(), + effect="read", ), ) @@ -60,20 +55,16 @@ def func( effect: Optional[Effect] = None, ): secrets = secrets or [] - effect = effect or EffectRead() + effect = effect or "read" mat_id = runtimes.register_deno_func( - store, MaterializerDenoFunc(code=code, secrets=secrets), effect, ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - from typegraph import t return t.func( - inp, out, FunMat(mat_id.value, code=code, secrets=secrets, effect=effect) + inp, out, FunMat(mat_id, code=code, secrets=secrets, effect=effect) ) def import_( @@ -87,26 +78,22 @@ def import_( effect: Optional[Effect] = None, secrets: Optional[List[str]] = None, ): - effect = effect or EffectRead() + effect = effect or "read" secrets = secrets or [] mat_id = runtimes.import_deno_function( - store, MaterializerDenoImport( func_name=name, module=module, secrets=secrets, deps=deps ), effect, ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - from typegraph import t return t.func( inp, out, ImportMat( - id=mat_id.value, + id=mat_id, name=name, module=module, secrets=secrets, @@ -118,15 +105,13 @@ def identity(self, inp: "t.struct") -> "t.func": from typegraph import t res = runtimes.get_predefined_deno_func( - store, MaterializerDenoPredefined(name="identity") + MaterializerDenoPredefined(name="identity") ) - if isinstance(res, Err): - raise Exception(res.value) return t.func( inp, inp, - PredefinedFunMat(id=res.value, name="identity", effect=EffectRead()), + PredefinedFunMat(id=res, name="identity", effect="read"), ) def policy( @@ -134,17 +119,13 @@ def policy( ) -> Policy: secrets = secrets or [] mat_id = runtimes.register_deno_func( - store, MaterializerDenoFunc(code=code, secrets=secrets), - EffectRead(), + "read", ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return Policy.create( name, - mat_id.value, + mat_id, ) def import_policy( @@ -157,16 +138,13 @@ def import_policy( name = name or re.sub("[^a-zA-Z0-9_]", "_", f"__imp_{module}_{name}") res = runtimes.import_deno_function( - store, MaterializerDenoImport( func_name=func_name, module=module, secrets=secrets or [] ), - EffectRead(), + "read", ) - if isinstance(res, Err): - raise Exception(res.value) - return Policy.create(name, res.value) + return Policy.create(name, res) @dataclass diff --git a/src/typegraph/python/typegraph/runtimes/graphql.py b/src/typegraph/python/typegraph/runtimes/graphql.py index 95b1c54a76..91f27a9dcf 100644 --- a/src/typegraph/python/typegraph/runtimes/graphql.py +++ b/src/typegraph/python/typegraph/runtimes/graphql.py @@ -5,16 +5,14 @@ from typing import List, Optional from typegraph import t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, Effect, - EffectRead, GraphqlRuntimeData, MaterializerGraphqlQuery, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes @dataclass @@ -32,27 +30,21 @@ class GraphQLRuntime(Runtime): def __init__(self, endpoint: str): runtime_id = runtimes.register_graphql_runtime( - store, GraphqlRuntimeData(endpoint=endpoint) + GraphqlRuntimeData(endpoint=endpoint) ) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - super().__init__(runtime_id.value) + super().__init__(runtime_id) self.endpoint = endpoint def query( self, inp: "t.struct", out: "t.typedef", *, path: Optional[List[str]] = None ): mat_id = runtimes.graphql_query( - store, - BaseMaterializer(runtime=self.id, effect=EffectRead()), + BaseMaterializer(runtime=self.id, effect="read"), MaterializerGraphqlQuery(path=path), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - - return t.func(inp, out, QueryMat(mat_id.value, effect=EffectRead(), path=path)) + return t.func(inp, out, QueryMat(mat_id, effect="read", path=path)) def mutation( self, @@ -63,12 +55,8 @@ def mutation( path: Optional[List[str]] = None, ): mat_id = runtimes.graphql_mutation( - store, BaseMaterializer(runtime=self.id, effect=effect), MaterializerGraphqlQuery(path=path), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - - return t.func(inp, out, MutationMat(mat_id.value, effect=effect, path=path)) + return t.func(inp, out, MutationMat(mat_id, effect=effect, path=path)) diff --git a/src/typegraph/python/typegraph/runtimes/grpc.py b/src/typegraph/python/typegraph/runtimes/grpc.py index 9b8fde896a..1a72159025 100644 --- a/src/typegraph/python/typegraph/runtimes/grpc.py +++ b/src/typegraph/python/typegraph/runtimes/grpc.py @@ -2,29 +2,21 @@ # SPDX-License-Identifier: MPL-2.0 from typegraph import t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( GrpcData, GrpcRuntimeData, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes class GrpcRuntime(Runtime): def __init__(self, proto_file: str, endpoint: str): data = GrpcRuntimeData(proto_file, endpoint) - runtime_id = runtimes.register_grpc_runtime(store, data) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - - super().__init__(runtime_id.value) + runtime_id = runtimes.register_grpc_runtime(data) + super().__init__(runtime_id) def call(self, method: str): data = GrpcData(method) - func_data = runtimes.call_grpc_method(store, self.id, data) - - if isinstance(func_data, Err): - raise Exception(func_data.value) - + func_data = runtimes.call_grpc_method(self.id, data) return t.func.from_type_func(func_data.value) diff --git a/src/typegraph/python/typegraph/runtimes/http.py b/src/typegraph/python/typegraph/runtimes/http.py index c44311654c..000341d0a0 100644 --- a/src/typegraph/python/typegraph/runtimes/http.py +++ b/src/typegraph/python/typegraph/runtimes/http.py @@ -4,19 +4,18 @@ from dataclasses import dataclass from typing import Dict, List, Optional -from typing_extensions import TypedDict +from typing_extensions import TypedDict from typegraph import fx, t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, Effect, HttpMethod, HttpRuntimeData, MaterializerHttpRequest, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes class HttpRequestKwargs(TypedDict): @@ -67,12 +66,9 @@ def __init__( basic_auth_secret: Optional[str] = None, ): runtime_id = runtimes.register_http_runtime( - store, HttpRuntimeData(endpoint, cert_secret, basic_auth_secret) + HttpRuntimeData(endpoint, cert_secret, basic_auth_secret) ) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - - super().__init__(runtime_id.value) + super().__init__(runtime_id) self.endpoint = endpoint self.cert_secret = cert_secret self.basic_auth_secret = basic_auth_secret @@ -87,7 +83,6 @@ def __request( opts: HttpRequestOptions, ): mat_id = runtimes.http_request( - store, BaseMaterializer(runtime=self.id, effect=effect), MaterializerHttpRequest( method, @@ -95,22 +90,19 @@ def __request( content_type=opts.content_type, header_prefix=opts.header_prefix, query_fields=opts.query_fields, - rename_fields=list(opts.rename_fields.items()) - if opts.rename_fields - else None, + rename_fields=( + list(opts.rename_fields.items()) if opts.rename_fields else None + ), body_fields=opts.body_fields, auth_token_field=opts.auth_token_field, ), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return t.func( inp, out, HttpRequestMat( - mat_id.value, + mat_id, method=method, effect=effect, path=path, @@ -126,7 +118,7 @@ def get( **kwargs: HttpRequestKwargs, ): return self.__request( - HttpMethod.GET, + "get", path, inp, out, @@ -144,7 +136,7 @@ def post( **kwargs: HttpRequestKwargs, ): return self.__request( - HttpMethod.POST, + "post", path, inp, out, @@ -162,7 +154,7 @@ def put( **kwargs: HttpRequestKwargs, ): return self.__request( - HttpMethod.PUT, + "put", path, inp, out, @@ -180,7 +172,7 @@ def patch( **kwargs: HttpRequestKwargs, ): return self.__request( - HttpMethod.PATCH, + "patch", path, inp, out, @@ -198,7 +190,7 @@ def delete( **kwargs: HttpRequestKwargs, ): return self.__request( - HttpMethod.DELETE, + "delete", path, inp, out, diff --git a/src/typegraph/python/typegraph/runtimes/kv.py b/src/typegraph/python/typegraph/runtimes/kv.py index 4c7090ce14..2d319a80d6 100644 --- a/src/typegraph/python/typegraph/runtimes/kv.py +++ b/src/typegraph/python/typegraph/runtimes/kv.py @@ -4,15 +4,14 @@ from dataclasses import dataclass from typegraph import fx, t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, Effect, KvMaterializer, KvRuntimeData, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes class KvRuntime(Runtime): @@ -20,35 +19,32 @@ class KvRuntime(Runtime): def __init__(self, url: str): data = KvRuntimeData(url) - runtime_id = runtimes.register_kv_runtime(store, data) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - - super().__init__(runtime_id.value) + runtime_id = runtimes.register_kv_runtime(data) + super().__init__(runtime_id) self.url = url def get(self): - mat = self.__operation(KvMaterializer.GET, fx.read()) + mat = self.__operation("get", fx.read()) return t.func(t.struct({"key": t.string()}), t.string(), mat) def set(self): - mat = self.__operation(KvMaterializer.SET, fx.update()) + mat = self.__operation("set", fx.update()) return t.func( t.struct({"key": t.string(), "value": t.string()}), t.string(), mat ) def delete(self): - mat = self.__operation(KvMaterializer.DELETE, fx.delete()) + mat = self.__operation("delete", fx.delete()) return t.func(t.struct({"key": t.string()}), t.integer(), mat) def keys(self): - mat = self.__operation(KvMaterializer.KEYS, fx.read()) + mat = self.__operation("keys", fx.read()) return t.func( t.struct({"filter": t.optional(t.string())}), t.list(t.string()), mat ) def values(self): - mat = self.__operation(KvMaterializer.VALUES, fx.read()) + mat = self.__operation("values", fx.read()) return t.func( t.struct({"filter": t.optional(t.string())}), t.list(t.string()), @@ -56,13 +52,9 @@ def values(self): ) def __operation(self, operation: KvMaterializer, effect: Effect): - mat_id = runtimes.kv_operation( - store, BaseMaterializer(self.id, effect), operation - ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) + mat_id = runtimes.kv_operation(BaseMaterializer(self.id, effect), operation) - return KvOperationMat(mat_id.value, effect=effect, operation=operation) + return KvOperationMat(mat_id, effect=effect, operation=operation) @dataclass diff --git a/src/typegraph/python/typegraph/runtimes/python.py b/src/typegraph/python/typegraph/runtimes/python.py index 807036e612..364ac50684 100644 --- a/src/typegraph/python/typegraph/runtimes/python.py +++ b/src/typegraph/python/typegraph/runtimes/python.py @@ -6,18 +6,16 @@ from typing import TYPE_CHECKING, List, Optional from astunparse import unparse -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, Effect, - EffectRead, MaterializerPythonDef, MaterializerPythonImport, MaterializerPythonLambda, MaterializerPythonModule, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes if TYPE_CHECKING: from typegraph import t @@ -25,7 +23,7 @@ class PythonRuntime(Runtime): def __init__(self): - super().__init__(runtimes.register_python_runtime(store)) + super().__init__(runtimes.register_python_runtime()) def from_lambda( self, @@ -33,7 +31,7 @@ def from_lambda( out: "t.typedef", function: callable, *, - effect: Effect = EffectRead(), + effect: Effect = "read", # secrets: Optional[List[str]] = None, ): lambdas, _defs = DefinitionCollector.collect(function) @@ -42,20 +40,16 @@ def from_lambda( if fn.startswith("(") and fn.endswith(")"): fn = fn[1:-1] mat_id = runtimes.from_python_lambda( - store, - BaseMaterializer(runtime=self.id.value, effect=effect), - MaterializerPythonLambda(runtime=self.id.value, fn=fn), + BaseMaterializer(runtime=self.id, effect=effect), + MaterializerPythonLambda(runtime=self.id, function=fn), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - from typegraph import t return t.func( inp, out, - LambdaMat(id=mat_id.value, fn=fn, effect=effect), + LambdaMat(id=mat_id, fn=fn, effect=effect), ) def from_def( @@ -64,27 +58,23 @@ def from_def( out: "t.typedef", function: callable, *, - effect: Effect = EffectRead(), + effect: Effect = "read", ): _lambdas, defs = DefinitionCollector.collect(function) assert len(defs) == 1 name, fn = defs[0] mat_id = runtimes.from_python_def( - store, - BaseMaterializer(runtime=self.id.value, effect=effect), - MaterializerPythonDef(runtime=self.id.value, name=name, fn=fn), + BaseMaterializer(runtime=self.id, effect=effect), + MaterializerPythonDef(runtime=self.id, name=name, function=fn), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - from typegraph import t return t.func( inp, out, - DefMat(id=mat_id.value, name=name, fn=fn, effect=effect), + DefMat(id=mat_id, name=name, fn=fn, effect=effect), ) def import_( @@ -98,41 +88,31 @@ def import_( effect: Optional[Effect] = None, secrets: Optional[List[str]] = None, ): - effect = effect or EffectRead() + effect = effect or "read" secrets = secrets or [] - base = BaseMaterializer(runtime=self.id.value, effect=effect) + base = BaseMaterializer(runtime=self.id, effect=effect) mat_id = runtimes.from_python_module( - store, base, MaterializerPythonModule( file=module, deps=deps, - runtime=self.id.value, + runtime=self.id, ), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - py_mod_mat_id = runtimes.from_python_import( - store, base, - MaterializerPythonImport( - module=mat_id.value, func_name=name, secrets=secrets - ), + MaterializerPythonImport(module=mat_id, func_name=name, secrets=secrets), ) - if isinstance(py_mod_mat_id, Err): - raise Exception(py_mod_mat_id.value) - from typegraph import t return t.func( inp, out, ImportMat( - id=py_mod_mat_id.value, + id=py_mod_mat_id, name=name, module=module, secrets=secrets, diff --git a/src/typegraph/python/typegraph/runtimes/random.py b/src/typegraph/python/typegraph/runtimes/random.py index 2754f461fa..6f810702e5 100644 --- a/src/typegraph/python/typegraph/runtimes/random.py +++ b/src/typegraph/python/typegraph/runtimes/random.py @@ -4,22 +4,20 @@ from typing import Optional from typegraph import t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, - EffectRead, MaterializerRandom, RandomRuntimeData, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes class RandomRuntime(Runtime): def __init__(self, seed: Optional[int] = None, reset: Optional[str] = ""): super().__init__( runtimes.register_random_runtime( - store, data=RandomRuntimeData(seed=seed, reset=reset) + data=RandomRuntimeData(seed=seed, reset=reset) ) ) @@ -27,21 +25,17 @@ def gen( self, out: "t.typedef", ): - effect = EffectRead() + effect = "read" mat_id = runtimes.create_random_mat( - store, - base=BaseMaterializer(runtime=self.id.value, effect=effect), - data=MaterializerRandom(runtime=self.id.value), + base=BaseMaterializer(runtime=self.id, effect=effect), + data=MaterializerRandom(runtime=self.id), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return t.func( t.struct({}), out, - RandomMat(id=mat_id.value, runtime=self.id.value, effect=effect), + RandomMat(id=mat_id, runtime=self.id, effect=effect), ) diff --git a/src/typegraph/python/typegraph/runtimes/substantial.py b/src/typegraph/python/typegraph/runtimes/substantial.py index 836d35ccdd..1a70864c90 100644 --- a/src/typegraph/python/typegraph/runtimes/substantial.py +++ b/src/typegraph/python/typegraph/runtimes/substantial.py @@ -3,41 +3,30 @@ from typing import List, Union from typegraph import t -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( RedisBackend, SubstantialBackend, - SubstantialBackendFs, - SubstantialBackendMemory, - SubstantialBackendRedis, SubstantialOperationData, SubstantialOperationType, - SubstantialOperationTypeSend, - SubstantialOperationTypeSendRaw, - SubstantialOperationTypeStart, - SubstantialOperationTypeStartRaw, - SubstantialOperationTypeStop, - SubstantialOperationTypeResources, - SubstantialOperationTypeResults, - SubstantialOperationTypeResultsRaw, - SubstantialOperationTypeInternalLinkParentChild, SubstantialRuntimeData, WorkflowFileDescription, WorkflowKind, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes class Backend: - def dev_memory(): - return SubstantialBackendMemory() + def dev_memory() -> SubstantialBackend: + return "memory" - def dev_fs(): - return SubstantialBackendFs() + def dev_fs() -> SubstantialBackend: + return "fs" - def redis(connection_string_secret: str): - return SubstantialBackendRedis(value=RedisBackend(connection_string_secret)) + def redis(connection_string_secret: str) -> SubstantialBackend: + return { + "redis": RedisBackend(connection_string_secret=connection_string_secret) + } class SubstantialRuntime(Runtime): @@ -47,7 +36,7 @@ def __init__( file_descriptions: List[WorkflowFileDescription], ): data = SubstantialRuntimeData(backend, file_descriptions) - super().__init__(runtimes.register_substantial_runtime(store, data)) + super().__init__(runtimes.register_substantial_runtime(data)) self.backend = backend def _generic_substantial_func( @@ -61,48 +50,36 @@ def _generic_substantial_func( func_out=None if func_out is None else func_out._id, operation=operation, ) - func_data = runtimes.generate_substantial_operation(store, self.id.value, data) - - if isinstance(func_data, Err): - raise Exception(func_data.value) + func_data = runtimes.generate_substantial_operation(self.id, data) return t.func.from_type_func(func_data.value) def start(self, kwargs: "t.struct"): - operation = SubstantialOperationTypeStart() - return self._generic_substantial_func(operation, kwargs, None) + return self._generic_substantial_func("start", kwargs, None) def start_raw(self): - operation = SubstantialOperationTypeStartRaw() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("start_raw", None, None) def stop(self): - operation = SubstantialOperationTypeStop() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("stop", None, None) def send(self, payload: "t.typedef"): - operation = SubstantialOperationTypeSend() - return self._generic_substantial_func(operation, payload, None) + return self._generic_substantial_func("send", payload, None) def send_raw(self): - operation = SubstantialOperationTypeSendRaw() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("send_raw", None, None) def query_resources(self): - operation = SubstantialOperationTypeResources() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("resources", None, None) def query_results(self, output: "t.typedef"): - operation = SubstantialOperationTypeResults() - return self._generic_substantial_func(operation, None, output) + return self._generic_substantial_func("results", None, output) def query_results_raw(self): - operation = SubstantialOperationTypeResultsRaw() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("results_raw", None, None) def _internal_link_parent_child(self): - operation = SubstantialOperationTypeInternalLinkParentChild() - return self._generic_substantial_func(operation, None, None) + return self._generic_substantial_func("internal_link_parent_child", None, None) def internals(self): return { @@ -122,10 +99,10 @@ def __init__(self, file: str, kind: WorkflowKind, deps: List[str] = []): self.workflows: List[str] = [] def deno(*, file: str, deps: List[str] = []): - return WorkflowFile(file, WorkflowKind.DENO, deps) + return WorkflowFile(file, "deno", deps) def python(*, file: str, deps: List[str] = []): - return WorkflowFile(file, WorkflowKind.PYTHON, deps) + return WorkflowFile(file, "python", deps) def import_(self, names: List[str]): self.workflows += names diff --git a/src/typegraph/python/typegraph/runtimes/wasm.py b/src/typegraph/python/typegraph/runtimes/wasm.py index 0e9e28afe6..1b9249be4b 100644 --- a/src/typegraph/python/typegraph/runtimes/wasm.py +++ b/src/typegraph/python/typegraph/runtimes/wasm.py @@ -3,17 +3,15 @@ from dataclasses import dataclass from typing import Optional -from typegraph.gen.exports.runtimes import ( +from typegraph.gen.runtimes import ( BaseMaterializer, Effect, - EffectRead, WasmRuntimeData, MaterializerWasmReflectedFunc, MaterializerWasmWireHandler, ) -from typegraph.gen.types import Err from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes, store +from typegraph.wit import runtimes from typegraph import t @@ -36,13 +34,9 @@ class WireWasmMat(Materializer): class WasmRuntimeWire(WasmRuntime): def __init__(self, artifact_path: str): runtime_id = runtimes.register_wasm_wire_runtime( - store, data=WasmRuntimeData(wasm_artifact=artifact_path), ) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - - super().__init__(runtime_id.value) + super().__init__(runtime_id) def handler( self, @@ -52,21 +46,17 @@ def handler( name: str, effect: Optional[Effect] = None, ): - effect = effect or EffectRead() + effect = effect or "read" mat_id = runtimes.from_wasm_wire_handler( - store, BaseMaterializer(runtime=self.id, effect=effect), MaterializerWasmWireHandler(func_name=name), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return t.func( inp, out, - WireWasmMat(id=mat_id.value, func_name=name, effect=effect), + WireWasmMat(id=mat_id, func_name=name, effect=effect), ) @@ -78,13 +68,9 @@ class ReflectedWasmMat(Materializer): class WasmRuntimeReflected(WasmRuntime): def __init__(self, artifact_path: str): runtime_id = runtimes.register_wasm_reflected_runtime( - store, data=WasmRuntimeData(wasm_artifact=artifact_path), ) - if isinstance(runtime_id, Err): - raise Exception(runtime_id.value) - - super().__init__(runtime_id.value) + super().__init__(runtime_id) def export( self, @@ -94,19 +80,15 @@ def export( name: str, effect: Optional[Effect] = None, ): - effect = effect or EffectRead() + effect = effect or "read" mat_id = runtimes.from_wasm_reflected_func( - store, BaseMaterializer(runtime=self.id, effect=effect), MaterializerWasmReflectedFunc(func_name=name), ) - if isinstance(mat_id, Err): - raise Exception(mat_id.value) - return t.func( inp, out, - ReflectedWasmMat(id=mat_id.value, func_name=name, effect=effect), + ReflectedWasmMat(id=mat_id, func_name=name, effect=effect), ) diff --git a/src/typegraph/python/typegraph/t.py b/src/typegraph/python/typegraph/t.py index 5e6215d0cf..fa7d8ce366 100644 --- a/src/typegraph/python/typegraph/t.py +++ b/src/typegraph/python/typegraph/t.py @@ -8,7 +8,7 @@ from typing_extensions import Self from typegraph.effects import EffectType -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( FuncParams, ParameterTransform, TypeList, @@ -23,12 +23,8 @@ TypeUnion, PolicySpec as WitPolicySpec, ) -from typegraph.gen.exports.runtimes import EffectRead -from typegraph.gen.types import Err from typegraph.graph.typegraph import ( - ErrorStack, core, - store, ApplyFromArg, ApplyFromContext, ApplyFromParent, @@ -48,7 +44,7 @@ build_reduce_entries, serialize_config, ) -from typegraph.wit import wit_utils +from typegraph.wit import sdk_utils # TODO: better approach? og_list = list @@ -68,40 +64,27 @@ def __init__(self, id: int): self.name = None def __repr__(self): - res = core.get_type_repr(store, self._id) - if isinstance(res, Err): - raise ErrorStack(res.value) - return res.value + return core.get_type_repr(self._id) def with_policy(self, *policies: Optional[PolicySpec]) -> Self: policy_chain = get_policy_chain(policies) - res = core.with_policy(store, self._id, policy_chain) - if isinstance(res, Err): - raise ErrorStack(res.value) - + res = core.with_policy(self._id, policy_chain) ret = copy.copy(self) - ret._id = res.value + ret._id = res ret.policy_chain = policy_chain return ret def rename(self, name: str) -> Self: - res = core.rename_type(store, self._id, name) - - if isinstance(res, Err): - raise ErrorStack(res.value) - + res = core.rename_type(self._id, name) ret = copy.copy(self) - ret._id = res.value + ret._id = res ret.name = name return ret def _with_injection(self, injection: str) -> Self: - res = core.with_injection(store, self._id, injection) - if isinstance(res, Err): - raise ErrorStack(res.value) - + res = core.with_injection(self._id, injection) ret = copy.copy(self) - ret._id = res.value + ret._id = res ret.injection = injection return ret @@ -182,23 +165,14 @@ def _with_ext( name: Optional[str], ) -> int: if as_id: - res = core.as_id(store, type_id, as_id == "composite") - if isinstance(res, Err): - raise ErrorStack(res.value) - type_id = res.value + type_id = core.as_id(type_id, as_id == "composite") config = serialize_config(raw_config) if config: - res = core.with_config(store, type_id, config) - if isinstance(res, Err): - raise ErrorStack(res.value) - type_id = res.value + type_id = core.with_config(type_id, config) if name: - res = core.rename_type(store, type_id, name) - if isinstance(res, Err): - raise ErrorStack(res.value) - type_id = res.value - if name == "ExtendedProfile": - Log.info(f">>> type#{type_id}; as_id={as_id}; config={config}; name={name}") + type_id = core.rename_type(type_id, name) + if name == "ExtendedProfile": + Log.info(f">>> type#{type_id}; as_id={as_id}; config={config}; name={name}") return type_id @@ -232,13 +206,8 @@ def __init__( multiple_of=multiple_of, enumeration=enum, ) - res = core.integerb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, as_id, config, name)) + res = core.integerb(data) + super().__init__(_with_ext(res, as_id, config, name)) self.min = min self.max = max self.exclusive_minimum = exclusive_minimum @@ -248,10 +217,8 @@ def __init__( self.as_id = as_id def id(self, as_id: AsId = True) -> "typedef": # "integer" - res = core.as_id(store, self._id, as_id == "composite") - if isinstance(res, Err): - raise ErrorStack(res.value) - return typedef(res.value) + res = core.as_id(self._id, as_id == "composite") + return typedef(res) class float(typedef): @@ -277,22 +244,17 @@ def __init__( data = TypeFloat( min=og_float(min) if min is not None else None, max=og_float(max) if max is not None else None, - exclusive_minimum=og_float(exclusive_minimum) - if exclusive_minimum is not None - else None, - exclusive_maximum=og_float(exclusive_maximum) - if exclusive_maximum is not None - else None, + exclusive_minimum=( + og_float(exclusive_minimum) if exclusive_minimum is not None else None + ), + exclusive_maximum=( + og_float(exclusive_maximum) if exclusive_maximum is not None else None + ), multiple_of=og_float(multiple_of) if multiple_of is not None else None, enumeration=enum, ) - res = core.floatb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + res = core.floatb(data) + super().__init__(_with_ext(res, None, config, name)) self.min = min self.max = max self.exclusive_minimum = exclusive_minimum @@ -305,10 +267,8 @@ class boolean(typedef): def __init__( self, *, name: Optional[str] = None, config: Optional[ConfigSpec] = None ): - res = core.booleanb(store) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + res = core.booleanb() + super().__init__(_with_ext(res, None, config, name)) class string(typedef): @@ -317,7 +277,7 @@ class string(typedef): pattern: Optional[str] = None format: Optional[str] = None enumeration: Optional[List[str]] = None - as_id: AsId = None + as_id: Optional[AsId] = None def __init__( self, @@ -329,7 +289,7 @@ def __init__( enum: Optional[List[str]] = None, name: Optional[str] = None, config: Optional[ConfigSpec] = None, - as_id: AsId = None, + as_id: Optional[AsId] = None, ): enum_variants = None if enum is not None: @@ -339,13 +299,8 @@ def __init__( min=min, max=max, pattern=pattern, format=format, enumeration=enum_variants ) - res = core.stringb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, as_id, config, name)) + res = core.stringb(data) + super().__init__(_with_ext(res, as_id, config, name)) self.min = min self.max = max self.pattern = pattern @@ -354,10 +309,8 @@ def __init__( self.as_id = as_id def id(self, as_id: AsId = True) -> "typedef": # "integer" - res = core.as_id(store, self._id, as_id == "composite") - if isinstance(res, Err): - raise ErrorStack(res.value) - return typedef(res.value) + res = core.as_id(self._id, as_id == "composite") + return typedef(res) def uuid( @@ -429,14 +382,8 @@ def __init__( allow=allow, ) - res = core.fileb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - - super().__init__(_with_ext(res.value, None, config, name)) + res = core.fileb(data) + super().__init__(_with_ext(res, None, config, name)) self.min = min self.max = max self.allow = allow @@ -465,12 +412,9 @@ def __init__( ) res = core.listb( - store, data, ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + super().__init__(_with_ext(res, None, config, name)) self.min = min self.max = max self.items = items @@ -493,13 +437,8 @@ def __init__( default_item=None if default_item is None else JsonLib.dumps(default_item), ) - res = core.optionalb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + res = core.optionalb(data) + super().__init__(_with_ext(res, None, config, name)) self.item = item self.default_item = default_item @@ -515,13 +454,8 @@ def __init__( ): data = TypeUnion(variants=og_list(map(lambda v: v._id, variants))) - res = core.unionb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + res = core.unionb(data) + super().__init__(_with_ext(res, None, config, name)) self.variants = variants @@ -535,13 +469,8 @@ def __init__( config: Optional[ConfigSpec] = None, ): data = TypeEither(variants=og_list(map(lambda v: v._id, variants))) - res = core.eitherb( - store, - data, - ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + res = core.eitherb(data) + super().__init__(_with_ext(res, None, config, name)) self.variants = variants @@ -565,9 +494,7 @@ def __init__( ): if self.__class__ != struct: # custom class if len(self.__class__.__bases__) > 1: - raise ErrorStack.from_str( - "multiple inheritance is currently not supported" - ) + raise Exception("multiple inheritance is currently not supported") (base,) = self.__class__.__bases__ child_cls = self.__class__ child_attr = set([i for i in vars(child_cls) if not i.startswith("__")]) @@ -582,14 +509,14 @@ def __init__( err_msg += " is a reserved field" else: err_msg += " are reserved fields" - raise ErrorStack(err_msg) + raise Exception(err_msg) self_attr = child_attr if base != struct: # child.props should inherit parent.props curr_base = base while curr_base != struct: if len(curr_base.__bases__) > 1: - raise ErrorStack( + raise Exception( "multiple inheritance is currently not supported" ) (curr_base,) = curr_base.__bases__ @@ -614,12 +541,9 @@ def __init__( ) res = core.structb( - store, data, ) - if isinstance(res, Err): - raise ErrorStack(res.value) - super().__init__(_with_ext(res.value, None, config, name)) + super().__init__(_with_ext(res, None, config, name)) self.props = props self.enumeration = enum @@ -686,10 +610,7 @@ def register(): rate_calls=rate_calls, rate_weight=rate_weight, ) - res = core.funcb(store, data) - if isinstance(res, Err): - raise ErrorStack(res.value) - return res.value + return core.funcb(data) id = register() if type_id is None else type_id @@ -713,12 +634,10 @@ def rate(self, calls: bool = False, weight: Optional[int] = None) -> "func": def extend(self, props: Dict[str, typedef]): res = core.extend_struct( - store, self.out._id, og_list((k, v._id) for k, v in props.items()) + self.out._id, og_list((k, v._id) for k, v in props.items()) ) - if isinstance(res, Err): - raise ErrorStack(res.value) - out = typedef(res.value) + out = typedef(res) return func( self.inp, @@ -731,10 +650,7 @@ def extend(self, props: Dict[str, typedef]): def reduce(self, value: Dict[str, Any]) -> "func": reduce_entries = build_reduce_entries(value, [], []) - reduced_id = wit_utils.reduceb(store, self._id, reduce_entries) - - if isinstance(reduced_id, Err): - raise ErrorStack(reduced_id.value) + reduced_id = sdk_utils.reduceb(self._id, reduce_entries) # TODO typedef(...).as_struct() return func( @@ -744,7 +660,7 @@ def reduce(self, value: Dict[str, Any]) -> "func": parameter_transform=self.parameter_transform, rate_calls=self.rate_calls, rate_weight=self.rate_weight, - type_id=reduced_id.value, + type_id=reduced_id, ) def apply(self, value: ApplyParamObjectNode) -> "func": @@ -753,12 +669,13 @@ def apply(self, value: ApplyParamObjectNode) -> "func": assert serialized["type"] == "object" transform_tree = JsonLib.dumps(serialized["fields"]) - transform_data = core.get_transform_data(store, self.inp._id, transform_tree) - if isinstance(transform_data, Err): + try: + transform_data = core.get_transform_data(self.inp._id, transform_tree) + except Exception as e: import sys print(transform_tree, file=sys.stderr) - raise ErrorStack(transform_data.value) + raise e return func( typedef(transform_data.value.query_input), @@ -775,7 +692,7 @@ def from_type_func( ) -> "func": # Note: effect is a just placeholder # in the deno frontend, we do not have to fill the effect attribute on materializers - mat = Materializer(id=data.mat, effect=EffectRead()) + mat = Materializer(id=data.mat, effect="read") return func( typedef(id=data.inp), typedef(id=data.out), diff --git a/src/typegraph/python/typegraph/utils.py b/src/typegraph/python/typegraph/utils.py index c7b091a733..22195b8a84 100644 --- a/src/typegraph/python/typegraph/utils.py +++ b/src/typegraph/python/typegraph/utils.py @@ -5,8 +5,8 @@ from functools import reduce from typing import Any, Dict, List, Optional, Union -from typegraph.gen.exports.core import SerializeParams -from typegraph.gen.exports.utils import ReduceEntry +from typegraph.gen.core import SerializeParams +from typegraph.gen.utils import ReduceEntry from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.injection import InheritDef, serialize_static_injection from typegraph.wit import store, wit_utils diff --git a/src/typegraph/python/typegraph/wit.py b/src/typegraph/python/typegraph/wit.py index 83b857f017..29e1563573 100644 --- a/src/typegraph/python/typegraph/wit.py +++ b/src/typegraph/python/typegraph/wit.py @@ -1,38 +1,44 @@ # Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. # SPDX-License-Identifier: MPL-2.0 -from wasmtime import Store -from typing import List - -from typegraph.gen import Root, RootImports -from typegraph.gen.exports.aws import Aws -from typegraph.gen.exports.core import Core, Error -from typegraph.gen.exports.runtimes import Runtimes -from typegraph.gen.exports.utils import Utils -from typegraph.host.host import HostImpl - -# Make sure the imports are similar to the node implementation -from typegraph.gen.exports.core import ( - SerializeParams, # noqa - PrismaMigrationConfig, # noqa - MigrationAction, # noqa -) - -store = Store() -_typegraph_core = Root(store, RootImports(HostImpl())) - -core = Core(_typegraph_core) -runtimes = Runtimes(_typegraph_core) -aws = Aws(_typegraph_core) -wit_utils = Utils(_typegraph_core) - - -class ErrorStack(Exception): - stack: List[str] - - def __init__(self, err: Error): - super(ErrorStack, self).__init__("\n".join(f"- {msg}" for msg in err.stack)) - self.stack = err.stack - - def from_str(msg: str) -> "ErrorStack": - return ErrorStack(Error([msg])) +# from wasmtime import Store +# from typing import List +# +# from typegraph.gen import Root, RootImports +# from typegraph.gen.exports.aws import Aws +# from typegraph.gen.exports.core import Core, Error +# from typegraph.gen.exports.runtimes import Runtimes +# from typegraph.gen.exports.utils import Utils +# from typegraph.host.host import HostImpl +# +# # Make sure the imports are similar to the node implementation +# from typegraph.gen.exports.core import ( +# SerializeParams, # noqa +# PrismaMigrationConfig, # noqa +# MigrationAction, # noqa +# +# ) +# store = Store() +# _typegraph_core = Root(store, RootImports(HostImpl())) +# +import typegraph.gen.aws as aws +import typegraph.gen.core as core +import typegraph.gen.runtimes as runtimes +import typegraph.gen.utils as utils + +aws = aws +core = core +runtimes = runtimes +sdk_utils = utils + +# +# +# class ErrorStack(Exception): +# stack: List[str] +# +# def __init__(self, err: Error): +# super(ErrorStack, self).__init__("\n".join(f"- {msg}" for msg in err.stack)) +# self.stack = err.stack +# +# def from_str(msg: str) -> "ErrorStack": +# return ErrorStack(Error([msg])) diff --git a/src/typegraph/specs/codegen/rpc/python/client.py b/src/typegraph/specs/codegen/rpc/python/client.py index 684f946394..af60b431a2 100644 --- a/src/typegraph/specs/codegen/rpc/python/client.py +++ b/src/typegraph/specs/codegen/rpc/python/client.py @@ -19,7 +19,7 @@ def rpc_request(method: str, params: Optional[Any] = None): json_request = json.dumps(request) - sys.stdout.write(json_request + "\n") + sys.stdout.write("jsonrpc: " + json_request + "\n") sys.stdout.flush() state["id"] += 1 diff --git a/src/typegraph/specs/codegen/rpc/tests/client.test.ts b/src/typegraph/specs/codegen/rpc/tests/client.test.ts index c1abfd706e..7183d78619 100644 --- a/src/typegraph/specs/codegen/rpc/tests/client.test.ts +++ b/src/typegraph/specs/codegen/rpc/tests/client.test.ts @@ -35,8 +35,12 @@ async function testClient(params: { command: string; args: string[] }) { const writer = client.stdin.getWriter(); for (const transaction of transactions) { - const request = await readOutput(reader); - assertEquals(JSON.parse(request), transaction.request); + const request = await readOutput(reader); // "jsonrpc: { ... }\n" + const sliceIndex = request.search(":"); + const json = request.slice(sliceIndex + 1); + + assertEquals(JSON.parse(json), transaction.request); + await writeToInput(writer, JSON.stringify(transaction.response) + "\n"); } diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 46778ff99e..62f9412543 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -27,7 +27,7 @@ function rpcRequest(method: string, params?: P) { const jsonRequest = JSON.stringify(request); - process.stdout.write(jsonRequest + "\n"); + process.stdout.write("jsonrpc: " + jsonRequest + "\n"); state.id += 1; const buffer = Buffer.alloc(BUFFER_SIZE); diff --git a/src/typegraph/specs/codegen/src/cmd/main.ts b/src/typegraph/specs/codegen/src/cmd/main.ts index 814173d4d6..3648353476 100644 --- a/src/typegraph/specs/codegen/src/cmd/main.ts +++ b/src/typegraph/specs/codegen/src/cmd/main.ts @@ -1,31 +1,34 @@ import * as fs from "@std/fs"; -import { - getCodeGenerator, - getTypeDefSources, - isValidTarget, - validTargets, -} from "./utils.ts"; +import { getCodeGenerator, getTypeDefSources } from "./utils.ts"; + +const targets = ["typescript", "python", "rust-lib", "rust-rpc"]; const usage = `Typegraph client SDK codegen tool -Usage: tg-codegen [target] [outdir] (target: ${validTargets.join(", ")})`; +Usage: tg-codegen [target] [outdir] (target: ${targets.join(", ")})`; const [target, outDir] = Deno.args; -if (!target || !outDir || !isValidTarget(target)) { +if (!target || target === "--help" || target === "-h") { console.log(usage); Deno.exit(1); } -if (!fs.existsSync(outDir)) { - Deno.mkdirSync(outDir); +const generator = getCodeGenerator(target); + +if (!outDir || Deno.args.length > 2 || !generator) { + console.error("Error: Invalid parameters, use --help to display the usage"); + Deno.exit(1); } console.log(`Generating ${target} types and bindings...`); +if (!fs.existsSync(outDir)) { + Deno.mkdirSync(outDir); +} + const sources = getTypeDefSources(); -const codegen = getCodeGenerator(target); -codegen.generate(sources, outDir); +generator.generate(sources, outDir); console.log("Done"); diff --git a/src/typegraph/specs/codegen/src/cmd/utils.ts b/src/typegraph/specs/codegen/src/cmd/utils.ts index 7a9926e806..08412a2a3b 100644 --- a/src/typegraph/specs/codegen/src/cmd/utils.ts +++ b/src/typegraph/specs/codegen/src/cmd/utils.ts @@ -1,8 +1,8 @@ import * as path from "@std/path"; -import type { TypeDefProcessor } from "../lib/base.ts"; import TypeScriptCodeGenerator from "../lib/typescript.ts"; import RustLibCodeGenerator from "../lib/rust_lib.ts"; import PythonCodeGenerator from "../lib/python.ts"; +import RustRpcCodeGenerator from "../lib/rust_rpc.ts"; const dirname = new URL(".", import.meta.url).pathname; @@ -22,19 +22,11 @@ function getTypeDefSources() { return typeDefModules; } -type GenTarget = "typescript" | "python" | "rust-lib"; - -const validTargets = ["typescript", "python", "rust-lib"]; - -function getCodeGenerator(target: GenTarget): TypeDefProcessor { +function getCodeGenerator(target: string) { if (target === "typescript") return new TypeScriptCodeGenerator(); if (target === "python") return new PythonCodeGenerator(); - return new RustLibCodeGenerator(); -} - -function isValidTarget(target: string): target is GenTarget { - return validTargets.includes(target); + if (target === "rust-lib") return new RustLibCodeGenerator(); + if (target === "rust-rpc") return new RustRpcCodeGenerator(); } -export type { GenTarget }; -export { getTypeDefSources, getCodeGenerator, isValidTarget, validTargets }; +export { getTypeDefSources, getCodeGenerator }; diff --git a/src/typegraph/specs/codegen/src/lib/base.ts b/src/typegraph/specs/codegen/src/lib/base.ts index 79d7b1b50a..58087f2030 100644 --- a/src/typegraph/specs/codegen/src/lib/base.ts +++ b/src/typegraph/specs/codegen/src/lib/base.ts @@ -44,19 +44,16 @@ abstract class TypeDefProcessor { protected funcDefs: FuncDef[]; protected imports: TypeImport[]; protected typeMap: Record; - protected reservedKeywords: string[]; protected fileExtension: string; constructor(params: { typeMap: Record; - reservedKeywords: string[]; fileExtension: string; }) { this.typeDefs = []; this.funcDefs = []; this.imports = []; this.typeMap = params.typeMap; - this.reservedKeywords = params.reservedKeywords; this.fileExtension = params.fileExtension; } @@ -133,8 +130,8 @@ abstract class TypeDefProcessor { abstract makeArrayType(inner: string): string; abstract makeTupleType(first: string, second: string): string; - resolveIdent(ident: string) { - return this.reservedKeywords.includes(ident) ? ident + "_" : ident; + resolveIdent(ident: SyntaxNode) { + return ident.text; } resolveType(value: SyntaxNode): string { @@ -162,7 +159,7 @@ abstract class TypeDefProcessor { const optional = prop.childCount === 3; // includes the `?` symbol const [identNode, valueNode] = prop.namedChildren; - const name = this.resolveIdent(identNode.text); + const name = this.resolveIdent(identNode); const value = this.resolveType(valueNode.namedChildren[0]); results.push({ name, value, optional }); @@ -209,7 +206,7 @@ abstract class TypeDefProcessor { abstract formatRecordTypeDef(def: RecordTypeDef): string; abstract formatUnionTypeDef(def: UnionTypeDef): string; abstract formatFuncDef(def: FuncDef): string; - abstract formatHeaders(): string; + abstract formatHeaders(moduleName: string): string; formatTypeDef(def: TypeDef) { if (def.kind === "alias") return this.formatAliasTypeDef(def); @@ -225,12 +222,20 @@ abstract class TypeDefProcessor { return this.funcDefs.map((func) => this.formatFuncDef(func)).join("\n\n"); } + formatFile(moduleNmae: string) { + return [ + this.formatHeaders(moduleNmae), + this.formatTypeDefs(), + this.formatFuncDefs(), + ].join("\n\n"); + } + generate(sources: TypeDefSource[], outDir: string) { for (const { moduleName, content } of sources) { this.process(content); const filePath = path.join(outDir, moduleName + this.fileExtension); - const fileContent = `${this.formatHeaders()}\n\n${this.formatTypeDefs()}\n\n${this.formatFuncDefs()}`; + const fileContent = this.formatFile(moduleName); Deno.writeTextFileSync(filePath, fileContent); diff --git a/src/typegraph/specs/codegen/src/lib/python.ts b/src/typegraph/specs/codegen/src/lib/python.ts index e223e69e73..02854ff463 100644 --- a/src/typegraph/specs/codegen/src/lib/python.ts +++ b/src/typegraph/specs/codegen/src/lib/python.ts @@ -23,7 +23,6 @@ class PythonCodeGenerator extends TypeDefProcessor { constructor() { super({ typeMap, - reservedKeywords: [], fileExtension: ".py", }); } @@ -37,17 +36,17 @@ class PythonCodeGenerator extends TypeDefProcessor { } override formatHeaders() { - return [ + const baseImports = [ "import typing as t", "from pydantic import BaseModel", "from client import rpc_request", - this.imports - .map( - ({ source, imports }) => - `from ${source} import ${imports.join(", ")}`, - ) - .join("\n"), - ].join("\n"); + ]; + + const imports = this.imports.map( + ({ source, imports }) => `from ${source} import ${imports.join(", ")}`, + ); + + return [...baseImports, ...imports].filter(Boolean).join("\n"); } override formatAliasTypeDef(def: AliasTypeDef) { diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts index 4a9956c07e..661300ef31 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_lib.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -18,13 +18,10 @@ const typeMap = { void: "()", }; -const reservedKeywords = ["fn", "type"]; - class RustLibCodeGenerator extends TypeDefProcessor { constructor() { super({ typeMap, - reservedKeywords, fileExtension: ".rs", }); } @@ -37,16 +34,15 @@ class RustLibCodeGenerator extends TypeDefProcessor { return `(${first}, ${second})`; } - override formatHeaders() { - return [ - "use serde::{Serialize, Deserialize};", - this.imports - .map( - ({ imports, source }) => - `use super::${source}::${imports.length > 1 ? `{${imports.join(", ")}}` : imports};`, - ) - .join("\n"), - ].join("\n"); + override formatHeaders(_moduleName?: string) { + const baseImport = "use serde::{Serialize, Deserialize};"; + + const imports = this.imports.map( + ({ imports, source }) => + `use super::${source}::${imports.length > 1 ? `{${imports.join(", ")}}` : imports};`, + ); + + return [baseImport, ...imports].filter(Boolean).join("\n"); } override formatAliasTypeDef(def: AliasTypeDef) { @@ -97,9 +93,10 @@ ${this.funcDefs.map((f) => ` ${this.formatFuncDef(f)}`).join("\n")} } override postGenerate(sources: TypeDefSource[], outDir: string) { - const imports = - sources.map(({ moduleName }) => `pub mod ${moduleName};`).join("\n") + - "pub use core::Error;"; + const imports = sources + .map(({ moduleName }) => `pub mod ${moduleName};`) + .concat("pub use core::Error;") + .join("\n"); Deno.writeTextFileSync(path.join(outDir, "mod.rs"), imports); diff --git a/src/typegraph/specs/codegen/src/lib/rust_rpc.ts b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts new file mode 100644 index 0000000000..c27bbbda2e --- /dev/null +++ b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts @@ -0,0 +1,106 @@ +import * as path from "@std/path"; +import { toPascalCase } from "@std/text"; +import type { FuncDef, TypeDefSource } from "./base.ts"; +import RustLibCodeGenerator from "./rust_lib.ts"; + +class RustRpcCodeGenerator extends RustLibCodeGenerator { + constructor() { + super(); + } + + override formatHeaders(moduleName: string) { + const baseImports = [ + "use serde::{Serialize, Deserialize};", + "use serde_json::Value;", + "use typegraph_core::{errors::Result, Lib};", + `use typegraph_core::sdk::${moduleName}::*;`, + ]; + + const imports = this.imports.map( + ({ imports, source }) => + "#[allow(unused)]\n" + + `use typegraph_core::sdk::${source}::${imports.length > 1 ? `{${imports.join(", ")}}` : imports};`, + ); + + return baseImports.concat(imports).join("\n"); + } + + formatEnumVariantDef(def: FuncDef) { + const data = def.params.length + ? ` { ${def.params.map((p) => `${p.name}: ${p.optional ? `Option<${p.type}>` : p.type}`).join(", ")} }` + : ""; + + return `${toPascalCase(def.ident)}${data}`; + } + + formatEnumVariantBranching(def: FuncDef) { + const data = def.params.length + ? ` { ${def.params.map((p) => p.name).join(", ")} }` + : ""; + + const handler = + `Lib::${def.ident}(${def.params.map((p) => p.name).join(", ")})` + + ".map(|res| serde_json::to_value(res).unwrap())"; + + return `${toPascalCase(def.ident)}${data} => ${handler}`; + } + + formatRpcEnumDef() { + return `#[derive(Debug, Serialize, Deserialize)] +#[serde(tag = "method", content = "params", rename_all="snake_case")] +pub enum RpcCall { +${this.funcDefs.map((def) => ` ${this.formatEnumVariantDef(def)},`).join("\n")} +}`; + } + + formatRpcEnumImpl() { + return `impl super::RpcDispatch for RpcCall { + fn dispatch(self) -> Result { + match self { +${this.funcDefs.map((def) => ` Self::${this.formatEnumVariantBranching(def)},`).join("\n")} + } + } +}`; + } + + override formatFile(moduleName: string) { + return [ + this.formatHeaders(moduleName), + this.formatRpcEnumDef(), + this.formatRpcEnumImpl(), + ].join("\n\n"); + } + + override postGenerate(sources: TypeDefSource[], outDir: string) { + const exports = sources + .map(({ moduleName }) => `pub mod ${moduleName};`) + .join("\n"); + + const dependencies = [ + "use enum_dispatch::enum_dispatch;", + "use serde::{Serialize, Deserialize};", + "use serde_json::Value;", + "use typegraph_core::errors::Result;", + ].join("\n"); + + const traitDef = `#[enum_dispatch] +pub trait RpcDispatch { + fn dispatch(self) -> Result; +}`; + + const rpcDef = `#[derive(Debug, Serialize, Deserialize)] +#[enum_dispatch(RpcDispatch)] +#[serde(untagged)] +pub enum RpcCall { +${sources.map(({ moduleName }) => ` ${toPascalCase(moduleName)}(${moduleName}::RpcCall),`).join("\n")} +}`; + + const fileContent = [exports, dependencies, traitDef, rpcDef].join("\n\n"); + + Deno.writeTextFileSync(path.join(outDir, "mod.rs"), fileContent); + + console.log("mod.rs was created"); + } +} + +export default RustRpcCodeGenerator; diff --git a/src/typegraph/specs/codegen/src/lib/typescript.ts b/src/typegraph/specs/codegen/src/lib/typescript.ts index 68eba9b42b..3ae85cbfd5 100644 --- a/src/typegraph/specs/codegen/src/lib/typescript.ts +++ b/src/typegraph/specs/codegen/src/lib/typescript.ts @@ -20,7 +20,6 @@ class TypeScriptCodeGenerator extends TypeDefProcessor { constructor() { super({ typeMap, - reservedKeywords: [], fileExtension: ".ts", }); } @@ -34,15 +33,14 @@ class TypeScriptCodeGenerator extends TypeDefProcessor { } override formatHeaders(): string { - return [ - 'import { rpcRequest } from "./client.ts";', - this.imports - .map( - ({ source, imports }) => - `import { ${imports.join(", ")} } from "./${source}.ts";`, - ) - .join("\n"), - ].join("\n"); + const baseImport = 'import { rpcRequest } from "./client.ts";'; + + const imports = this.imports.map( + ({ source, imports }) => + `import type { ${imports.join(", ")} } from "./${source}.ts";`, + ); + + return [baseImport, ...imports].filter(Boolean).join("\n"); } override formatAliasTypeDef(def: AliasTypeDef): string { diff --git a/src/typegraph/specs/codegen/tests/typescript.test.ts b/src/typegraph/specs/codegen/tests/typescript.test.ts index 4c708bab72..99365a75d1 100644 --- a/src/typegraph/specs/codegen/tests/typescript.test.ts +++ b/src/typegraph/specs/codegen/tests/typescript.test.ts @@ -14,11 +14,11 @@ Deno.test("TypeScript type alias codegen", () => { }); Deno.test("TypeScript struct codegen", () => { - const pycg = new TypeScriptCodeGenerator(); + const tscg = new TypeScriptCodeGenerator(); - pycg.process(utils.recordCase); + tscg.process(utils.recordCase); - const result = pycg.formatTypeDefs(); + const result = tscg.formatTypeDefs(); const expected = `export type RecordLike = { num: number key: string @@ -65,7 +65,7 @@ Deno.test("TypeScript import codegen", () => { const result = tscg.formatHeaders(); const expected = `import { rpcRequest } from "./client.ts"; -import { Foo, Bar } from "./foobar.ts";`; +import type { Foo, Bar } from "./foobar.ts";`; assertEquals(result, expected); }); diff --git a/src/typegraph/specs/types/runtimes.d.ts b/src/typegraph/specs/types/runtimes.d.ts index c42532cb55..f1c83ffa17 100644 --- a/src/typegraph/specs/types/runtimes.d.ts +++ b/src/typegraph/specs/types/runtimes.d.ts @@ -69,12 +69,12 @@ type MaterializerHttpRequest = { type MaterializerPythonDef = { runtime: RuntimeId; name: string; - fn: string; + function: string; }; type MaterializerPythonLambda = { runtime: RuntimeId; - fn: string; + function: string; }; type MaterializerPythonModule = { From a3077a74b45d9d4c0b4583d6ce95b9ba7947259f Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 28 Oct 2024 11:08:08 +0300 Subject: [PATCH 03/39] fixup: cleanup [skip ci] --- src/meta-cli/Cargo.toml | 1 + .../python/typegraph/graph/metagen.py | 2 +- .../python/typegraph/graph/params.py | 2 +- .../python/typegraph/graph/tg_deploy.py | 2 +- .../python/typegraph/graph/typegraph.py | 2 +- src/typegraph/python/typegraph/policy.py | 2 +- .../python/typegraph/providers/aws.py | 2 +- .../python/typegraph/providers/prisma.py | 2 +- .../python/typegraph/providers/temporal.py | 2 +- .../python/typegraph/runtimes/deno.py | 4 +- .../python/typegraph/runtimes/graphql.py | 2 +- .../python/typegraph/runtimes/grpc.py | 2 +- .../python/typegraph/runtimes/http.py | 2 +- src/typegraph/python/typegraph/runtimes/kv.py | 2 +- .../python/typegraph/runtimes/python.py | 2 +- .../python/typegraph/runtimes/random.py | 2 +- .../python/typegraph/runtimes/substantial.py | 2 +- .../python/typegraph/runtimes/wasm.py | 2 +- src/typegraph/python/typegraph/sdk.py | 12 +++++ src/typegraph/python/typegraph/t.py | 2 +- src/typegraph/python/typegraph/utils.py | 2 +- src/typegraph/python/typegraph/wit.py | 44 ------------------- 22 files changed, 33 insertions(+), 64 deletions(-) create mode 100644 src/typegraph/python/typegraph/sdk.py delete mode 100644 src/typegraph/python/typegraph/wit.py diff --git a/src/meta-cli/Cargo.toml b/src/meta-cli/Cargo.toml index d74d19c4b9..ffa46e5a29 100644 --- a/src/meta-cli/Cargo.toml +++ b/src/meta-cli/Cargo.toml @@ -31,6 +31,7 @@ typegate = ["dep:typegate_engine"] [dependencies] # internal +typegraph_core.workspace = true typegate_engine = { workspace = true, optional = true } common.workspace = true metagen.workspace = true diff --git a/src/typegraph/python/typegraph/graph/metagen.py b/src/typegraph/python/typegraph/graph/metagen.py index 72b4b56eaf..944789b284 100644 --- a/src/typegraph/python/typegraph/graph/metagen.py +++ b/src/typegraph/python/typegraph/graph/metagen.py @@ -11,7 +11,7 @@ from typegraph.gen.utils import FdkConfig, FdkOutput from typegraph.graph.shared_types import TypegraphOutput from typegraph.utils import freeze_tg_output -from typegraph.wit import sdk_utils +from typegraph.sdk import sdk_utils class Metagen: diff --git a/src/typegraph/python/typegraph/graph/params.py b/src/typegraph/python/typegraph/graph/params.py index 346688f947..e7bbdeb409 100644 --- a/src/typegraph/python/typegraph/graph/params.py +++ b/src/typegraph/python/typegraph/graph/params.py @@ -5,7 +5,7 @@ import json from typing import List, Optional, TYPE_CHECKING, Any from typegraph.gen import utils -from typegraph.wit import sdk_utils +from typegraph.sdk import sdk_utils if TYPE_CHECKING: from typegraph import t diff --git a/src/typegraph/python/typegraph/graph/tg_deploy.py b/src/typegraph/python/typegraph/graph/tg_deploy.py index 9b2e7558b6..0b745adbd5 100644 --- a/src/typegraph/python/typegraph/graph/tg_deploy.py +++ b/src/typegraph/python/typegraph/graph/tg_deploy.py @@ -12,7 +12,7 @@ from typegraph.graph.shared_types import BasicAuth from typegraph.graph.tg_artifact_upload import ArtifactUploader from typegraph.graph.typegraph import TypegraphOutput -from typegraph.wit import sdk_utils +from typegraph.sdk import sdk_utils from typegraph import version as sdk_version diff --git a/src/typegraph/python/typegraph/graph/typegraph.py b/src/typegraph/python/typegraph/graph/typegraph.py index f3e7019681..cb3b59b0af 100644 --- a/src/typegraph/python/typegraph/graph/typegraph.py +++ b/src/typegraph/python/typegraph/graph/typegraph.py @@ -19,7 +19,7 @@ from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.policy import Policy, PolicyPerEffect, PolicySpec, get_policy_chain from typegraph.envs.cli import CLI_ENV -from typegraph.wit import core, sdk_utils +from typegraph.sdk import core, sdk_utils from typegraph.io import Log if TYPE_CHECKING: diff --git a/src/typegraph/python/typegraph/policy.py b/src/typegraph/python/typegraph/policy.py index f680fa280b..4683b8c61d 100644 --- a/src/typegraph/python/typegraph/policy.py +++ b/src/typegraph/python/typegraph/policy.py @@ -11,7 +11,7 @@ PolicySpec as CorePolicySpec, PolicyPerEffect as CorePolicyPerEffect, ) -from typegraph.wit import core +from typegraph.sdk import core class Policy: diff --git a/src/typegraph/python/typegraph/providers/aws.py b/src/typegraph/python/typegraph/providers/aws.py index a11f4b121f..d7e8e5b38b 100644 --- a/src/typegraph/python/typegraph/providers/aws.py +++ b/src/typegraph/python/typegraph/providers/aws.py @@ -11,7 +11,7 @@ S3RuntimeData, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import aws +from typegraph.sdk import aws class S3Runtime(Runtime): diff --git a/src/typegraph/python/typegraph/providers/prisma.py b/src/typegraph/python/typegraph/providers/prisma.py index b66bffa088..ec49bb3daa 100644 --- a/src/typegraph/python/typegraph/providers/prisma.py +++ b/src/typegraph/python/typegraph/providers/prisma.py @@ -4,7 +4,7 @@ from typing import Union, Optional from typegraph.runtimes.base import Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes from typegraph.gen.runtimes import ( Effect, PrismaRuntimeData, diff --git a/src/typegraph/python/typegraph/providers/temporal.py b/src/typegraph/python/typegraph/providers/temporal.py index 45554d50c7..ff6b04ea7b 100644 --- a/src/typegraph/python/typegraph/providers/temporal.py +++ b/src/typegraph/python/typegraph/providers/temporal.py @@ -10,7 +10,7 @@ TemporalRuntimeData, TemporalOperationType, ) -from typegraph.wit import runtimes +from typegraph.sdk import runtimes from typegraph import t diff --git a/src/typegraph/python/typegraph/runtimes/deno.py b/src/typegraph/python/typegraph/runtimes/deno.py index ca61936fb5..9673a82360 100644 --- a/src/typegraph/python/typegraph/runtimes/deno.py +++ b/src/typegraph/python/typegraph/runtimes/deno.py @@ -15,9 +15,9 @@ ) from typegraph.policy import Policy from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes -# from typegraph.wit import sdk_utils +# from typegraph.sdk import sdk_utils if TYPE_CHECKING: diff --git a/src/typegraph/python/typegraph/runtimes/graphql.py b/src/typegraph/python/typegraph/runtimes/graphql.py index 91f27a9dcf..74c77e6df2 100644 --- a/src/typegraph/python/typegraph/runtimes/graphql.py +++ b/src/typegraph/python/typegraph/runtimes/graphql.py @@ -12,7 +12,7 @@ MaterializerGraphqlQuery, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes @dataclass diff --git a/src/typegraph/python/typegraph/runtimes/grpc.py b/src/typegraph/python/typegraph/runtimes/grpc.py index 1a72159025..b1f90fa698 100644 --- a/src/typegraph/python/typegraph/runtimes/grpc.py +++ b/src/typegraph/python/typegraph/runtimes/grpc.py @@ -7,7 +7,7 @@ GrpcRuntimeData, ) from typegraph.runtimes.base import Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes class GrpcRuntime(Runtime): diff --git a/src/typegraph/python/typegraph/runtimes/http.py b/src/typegraph/python/typegraph/runtimes/http.py index 000341d0a0..1b39c15973 100644 --- a/src/typegraph/python/typegraph/runtimes/http.py +++ b/src/typegraph/python/typegraph/runtimes/http.py @@ -15,7 +15,7 @@ MaterializerHttpRequest, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes class HttpRequestKwargs(TypedDict): diff --git a/src/typegraph/python/typegraph/runtimes/kv.py b/src/typegraph/python/typegraph/runtimes/kv.py index 2d319a80d6..69b16bd5bf 100644 --- a/src/typegraph/python/typegraph/runtimes/kv.py +++ b/src/typegraph/python/typegraph/runtimes/kv.py @@ -11,7 +11,7 @@ KvRuntimeData, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes class KvRuntime(Runtime): diff --git a/src/typegraph/python/typegraph/runtimes/python.py b/src/typegraph/python/typegraph/runtimes/python.py index 364ac50684..699d972d51 100644 --- a/src/typegraph/python/typegraph/runtimes/python.py +++ b/src/typegraph/python/typegraph/runtimes/python.py @@ -15,7 +15,7 @@ MaterializerPythonModule, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes if TYPE_CHECKING: from typegraph import t diff --git a/src/typegraph/python/typegraph/runtimes/random.py b/src/typegraph/python/typegraph/runtimes/random.py index 6f810702e5..ab6a9dfb2e 100644 --- a/src/typegraph/python/typegraph/runtimes/random.py +++ b/src/typegraph/python/typegraph/runtimes/random.py @@ -10,7 +10,7 @@ RandomRuntimeData, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes class RandomRuntime(Runtime): diff --git a/src/typegraph/python/typegraph/runtimes/substantial.py b/src/typegraph/python/typegraph/runtimes/substantial.py index 1a70864c90..d77cb75e30 100644 --- a/src/typegraph/python/typegraph/runtimes/substantial.py +++ b/src/typegraph/python/typegraph/runtimes/substantial.py @@ -13,7 +13,7 @@ WorkflowKind, ) from typegraph.runtimes.base import Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes class Backend: diff --git a/src/typegraph/python/typegraph/runtimes/wasm.py b/src/typegraph/python/typegraph/runtimes/wasm.py index 1b9249be4b..c16e775df9 100644 --- a/src/typegraph/python/typegraph/runtimes/wasm.py +++ b/src/typegraph/python/typegraph/runtimes/wasm.py @@ -11,7 +11,7 @@ MaterializerWasmWireHandler, ) from typegraph.runtimes.base import Materializer, Runtime -from typegraph.wit import runtimes +from typegraph.sdk import runtimes from typegraph import t diff --git a/src/typegraph/python/typegraph/sdk.py b/src/typegraph/python/typegraph/sdk.py new file mode 100644 index 0000000000..42453cc7fb --- /dev/null +++ b/src/typegraph/python/typegraph/sdk.py @@ -0,0 +1,12 @@ +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 + +import typegraph.gen.aws as aws +import typegraph.gen.core as core +import typegraph.gen.runtimes as runtimes +import typegraph.gen.utils as utils + +aws = aws +core = core +runtimes = runtimes +sdk_utils = utils diff --git a/src/typegraph/python/typegraph/t.py b/src/typegraph/python/typegraph/t.py index fa7d8ce366..d90dc540ea 100644 --- a/src/typegraph/python/typegraph/t.py +++ b/src/typegraph/python/typegraph/t.py @@ -44,7 +44,7 @@ build_reduce_entries, serialize_config, ) -from typegraph.wit import sdk_utils +from typegraph.sdk import sdk_utils # TODO: better approach? og_list = list diff --git a/src/typegraph/python/typegraph/utils.py b/src/typegraph/python/typegraph/utils.py index 22195b8a84..5021c7d34f 100644 --- a/src/typegraph/python/typegraph/utils.py +++ b/src/typegraph/python/typegraph/utils.py @@ -9,7 +9,7 @@ from typegraph.gen.utils import ReduceEntry from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.injection import InheritDef, serialize_static_injection -from typegraph.wit import store, wit_utils +from typegraph.sdk import store, wit_utils # def serialize_record_values(obj: Union[Dict[str, any], None]): # return [(k, json.dumps(v)) for k, v in obj.items()] if obj is not None else None diff --git a/src/typegraph/python/typegraph/wit.py b/src/typegraph/python/typegraph/wit.py deleted file mode 100644 index 29e1563573..0000000000 --- a/src/typegraph/python/typegraph/wit.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -# SPDX-License-Identifier: MPL-2.0 - -# from wasmtime import Store -# from typing import List -# -# from typegraph.gen import Root, RootImports -# from typegraph.gen.exports.aws import Aws -# from typegraph.gen.exports.core import Core, Error -# from typegraph.gen.exports.runtimes import Runtimes -# from typegraph.gen.exports.utils import Utils -# from typegraph.host.host import HostImpl -# -# # Make sure the imports are similar to the node implementation -# from typegraph.gen.exports.core import ( -# SerializeParams, # noqa -# PrismaMigrationConfig, # noqa -# MigrationAction, # noqa -# -# ) -# store = Store() -# _typegraph_core = Root(store, RootImports(HostImpl())) -# -import typegraph.gen.aws as aws -import typegraph.gen.core as core -import typegraph.gen.runtimes as runtimes -import typegraph.gen.utils as utils - -aws = aws -core = core -runtimes = runtimes -sdk_utils = utils - -# -# -# class ErrorStack(Exception): -# stack: List[str] -# -# def __init__(self, err: Error): -# super(ErrorStack, self).__init__("\n".join(f"- {msg}" for msg in err.stack)) -# self.stack = err.stack -# -# def from_str(msg: str) -> "ErrorStack": -# return ErrorStack(Error([msg])) From fe4b9f1506537bb0ab6fa2835daf2dcd5b0789c4 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 29 Oct 2024 07:35:04 +0300 Subject: [PATCH 04/39] wip: fix python & try testing --- src/typegraph/python/poetry.lock | 137 +++++++++++++++++- src/typegraph/python/pyproject.toml | 1 + src/typegraph/python/typegraph/utils.py | 7 +- src/typegraph/specs/codegen/src/lib/python.ts | 25 ++-- tests/docs/how-tos/prog_deploy/prog_deploy.py | 2 +- tests/runtimes/prisma/full_prisma_mapping.py | 2 +- tests/utils/test.ts | 89 +----------- tests/utils/tg_deploy_script.py | 2 +- 8 files changed, 162 insertions(+), 103 deletions(-) diff --git a/src/typegraph/python/poetry.lock b/src/typegraph/python/poetry.lock index abb7f03a13..eddd6177c8 100644 --- a/src/typegraph/python/poetry.lock +++ b/src/typegraph/python/poetry.lock @@ -1,5 +1,16 @@ # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + [[package]] name = "astunparse" version = "1.6.3" @@ -37,6 +48,130 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] type = ["pytest-mypy"] +[[package]] +name = "pydantic" +version = "2.9.2" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +pydantic-core = "2.23.4" +typing-extensions = [ + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, +] + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.23.4" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, + {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, + {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, + {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, + {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, + {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, + {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, + {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, + {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, + {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, + {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + [[package]] name = "python-box" version = "7.2.0" @@ -152,4 +287,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "bae8760dd91a2c2bd18fa8958b8d85a6a09bb0a20204aefd15f6ccd620fbf05b" +content-hash = "65e0405fc1e8bd21af3dd733f5ffdf62de392fb7c78ed0037d4b8206aab3ccda" diff --git a/src/typegraph/python/pyproject.toml b/src/typegraph/python/pyproject.toml index 0e112e67c0..79fa1e566f 100644 --- a/src/typegraph/python/pyproject.toml +++ b/src/typegraph/python/pyproject.toml @@ -19,3 +19,4 @@ wasmtime = "^25.0.0" typing-extensions = "^4.8.0" python-box = "^7.1.1" astunparse = "^1.6.3" +pydantic = "^2.9.2" diff --git a/src/typegraph/python/typegraph/utils.py b/src/typegraph/python/typegraph/utils.py index 5021c7d34f..0b72f01f59 100644 --- a/src/typegraph/python/typegraph/utils.py +++ b/src/typegraph/python/typegraph/utils.py @@ -9,7 +9,7 @@ from typegraph.gen.utils import ReduceEntry from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.injection import InheritDef, serialize_static_injection -from typegraph.sdk import store, wit_utils +from typegraph.sdk import sdk_utils # def serialize_record_values(obj: Union[Dict[str, any], None]): # return [(k, json.dumps(v)) for k, v in obj.items()] if obj is not None else None @@ -74,8 +74,9 @@ def build_reduce_entries(node: Any, paths: List[ReduceEntry], curr_path: List[st raise Exception(f"unsupported type {type(node)} at {'.'.join(curr_path)}") -def unpack_tarb64(tar_b64: str, dest: str): - return wit_utils.unpack_tarb64(store, tar_b64, dest) +# FIXME: What is this? +# def unpack_tarb64(tar_b64: str, dest: str): +# return sdk_utils.unpack_tarb64(tar_b64, dest) frozen_memo: Dict[str, FinalizationResult] = {} diff --git a/src/typegraph/specs/codegen/src/lib/python.ts b/src/typegraph/specs/codegen/src/lib/python.ts index 02854ff463..e6d3527968 100644 --- a/src/typegraph/specs/codegen/src/lib/python.ts +++ b/src/typegraph/specs/codegen/src/lib/python.ts @@ -37,13 +37,14 @@ class PythonCodeGenerator extends TypeDefProcessor { override formatHeaders() { const baseImports = [ - "import typing as t", + "import typing_extensions as t", "from pydantic import BaseModel", - "from client import rpc_request", + "from typegraph.gen.client import rpc_request", ]; const imports = this.imports.map( - ({ source, imports }) => `from ${source} import ${imports.join(", ")}`, + ({ source, imports }) => + `from typegraph.gen.${source} import ${imports.join(", ")}`, ); return [...baseImports, ...imports].filter(Boolean).join("\n"); @@ -54,15 +55,15 @@ class PythonCodeGenerator extends TypeDefProcessor { } override formatRecordTypeDef(def: RecordTypeDef) { - const props = def.props - .map( - (p) => - ` ${p.name}: ${p.optional ? `t.Optional[${p.value}]` : p.value}`, - ) - .join("\n"); + const props = def.props.map( + (p) => `${p.name}: ${p.optional ? `t.Optional[${p.value}]` : p.value}`, + ); return `class ${def.ident}(BaseModel): -${props}`; +${props.map((p) => " " + p).join("\n")} + + def __init__(self, ${props.join(", ")}, **kwargs): + super().__init__(${def.props.map((p) => p.name + "=" + p.name)}, **kwargs)`; } override formatUnionTypeDef(def: UnionTypeDef) { @@ -85,7 +86,7 @@ ${variants} value: ${def.ret} res = rpc_request("${def.ident}") - ret = ReturnType(**res) + ret = ReturnType(value=res) return ret.value`; } @@ -106,7 +107,7 @@ ${def.params.map((p) => ` ${p.name}: ${p.optional ? `t.Optional[${p.type} req = RequestType(${def.params.map(({ name }) => `${name}=${name}`).join(", ")}) res = rpc_request("${def.ident}", req.model_dump()) - ret = ReturnType(**res) + ret = ReturnType(value=res) return ret.value`; } diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy.py b/tests/docs/how-tos/prog_deploy/prog_deploy.py index 0e53ac081a..edb799162d 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy.py +++ b/tests/docs/how-tos/prog_deploy/prog_deploy.py @@ -5,7 +5,7 @@ import sys # skip:end -from typegraph.gen.exports.core import MigrationAction +from typegraph.gen.core import MigrationAction from typegraph.graph.shared_types import BasicAuth from typegraph.graph.tg_deploy import ( TypegraphDeployParams, diff --git a/tests/runtimes/prisma/full_prisma_mapping.py b/tests/runtimes/prisma/full_prisma_mapping.py index 6ab88a46ba..9f28a25528 100644 --- a/tests/runtimes/prisma/full_prisma_mapping.py +++ b/tests/runtimes/prisma/full_prisma_mapping.py @@ -1,5 +1,5 @@ from typegraph import typegraph, Policy, t, Graph -from typegraph.gen.exports.runtimes import EffectUpdate +from typegraph.gen.runtimes import EffectUpdate from typegraph.providers.prisma import PrismaRuntime diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 12fef6bb04..6cdf2e1ff5 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -215,95 +215,16 @@ export class MetaTest { } async engine(path: string, opts: ParseOptions = {}) { - const extension = extname(path); - let sdkLang: SDKLangugage; - switch (extension) { - case ".py": - sdkLang = SDKLangugage.Python; - break; - case ".ts": - case ".js": - case ".mjs": - sdkLang = SDKLangugage.TypeScript; - break; - default: - throw new Error(`Unsupported file type ${extension}`); - } - - // FIXME: this breaks if an absolute path is passed - const testDirName = dirname(path); - const cwd = join(testDir, testDirName); - - const serialized = await this.#deployTypegraphFromShell( - path, - sdkLang, - cwd, - opts, - ); - - return await this.#engineFromDeployed(serialized, opts.secrets ?? {}); - } - - async #deployTypegraphFromShell( - path: string, - lang: SDKLangugage, - cwd: string, - opts: ParseOptions, - ): Promise { - const secrets = opts.secrets ?? {}; - const secretsStr = JSON.stringify(secrets); - - const cmd = []; - - if (lang === SDKLangugage.TypeScript) { - cmd.push( - lang.toString(), - "run", - "--allow-all", - "utils/tg_deploy_script.ts", - cwd, - this.port.toString(), - path, - secretsStr, - ); - } else { - cmd.push( - ...(Deno.env.get("MCLI_LOADER_PY")?.split(" ") ?? [lang.toString()]), - "utils/tg_deploy_script.py", - cwd, - this.port.toString(), - path, - secretsStr, - ); - } - - if (opts.typegraph) { - cmd.push(opts.typegraph); - } - - const env: Record = {}; - if (opts.prefix) { - env["PREFIX"] = opts.prefix; - } - - const output = await this.shell(cmd, { env }); - - const { stderr, stdout, code } = output; + const args = ["serialize", "--file", path, "--quiet"]; + const { code, stdout, stderr } = await this.meta(args); if (code !== 0) { - throw new Error(`Failed with exit code ${code}: ${stderr}`); + throw new Error(stderr); } - if (stdout.length === 0) { - throw new Error("No typegraph"); - } - - const tg_json = extractJsonFromStdout(stdout); - if (!tg_json) { - throw new Error("No typegraph"); - } + const tgString = stdout.trim().slice(1, stdout.length - 1); // remove the brackets [] - return tg_json; + return await this.#engineFromDeployed(tgString, opts.secrets ?? {}); } async unregister(engine: QueryEngine) { diff --git a/tests/utils/tg_deploy_script.py b/tests/utils/tg_deploy_script.py index ebaa20c3af..08ac1c94c8 100644 --- a/tests/utils/tg_deploy_script.py +++ b/tests/utils/tg_deploy_script.py @@ -3,7 +3,7 @@ import os import sys -from typegraph.gen.exports.core import ( +from typegraph.gen.core import ( MigrationAction, ) from typegraph.graph.shared_types import BasicAuth From 93c8226f4e6d02096b5cae7d4ace8f5654885c00 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 4 Nov 2024 08:14:45 +0300 Subject: [PATCH 05/39] fix: dev mode & test typegraph parsing [skip ci] --- src/typegraph/deno/src/io.ts | 64 +++-------------------------- src/typegraph/deno/src/tg_manage.ts | 2 +- tests/utils/test.ts | 4 +- 3 files changed, 9 insertions(+), 61 deletions(-) diff --git a/src/typegraph/deno/src/io.ts b/src/typegraph/deno/src/io.ts index c538db036a..1cbe3b6293 100644 --- a/src/typegraph/deno/src/io.ts +++ b/src/typegraph/deno/src/io.ts @@ -3,6 +3,7 @@ import { inspect } from "node:util"; // import { createInterface, Interface } from "node:readline"; import process from "node:process"; +import { rpcRequest } from "./gen/client.ts"; /** * see: module level documentation `meta-cli/src/deploy/actors/task.rs` */ @@ -48,65 +49,8 @@ export const log = { }, }; -class RpcResponseReader { - private buffer: string = ""; - - constructor() { - process.stdin.setEncoding("utf-8"); - } - - read(id: number) { - return new Promise((resolve, reject) => { - const handler = () => { - while (true) { - const chunk = process.stdin.read(); - if (chunk == null) { - break; - } - this.buffer += chunk; - const lines = this.buffer.split(/\r\n|\n/); - if (lines.length > 2) { - reject(new Error("not sequential")); - } else if (lines.length <= 1) { - continue; - } - this.buffer = lines.pop()!; - - try { - const message = JSON.parse(lines[0]); - if (message.id === id) { - resolve(message.result); - break; - } - } catch (e) { - reject("invalid message"); - } - } - process.stdin.off("readable", handler); - }; - process.stdin.on("readable", handler); - }); - } -} - -const JSONRPC_VERSION = "2.0"; - const rpcCall = (() => { - const responseReader = new RpcResponseReader(); - let latestRpcId = 0; - - return (method: string, params: any = null) => { - const rpcId = latestRpcId++; - const rpcMessage = JSON.stringify({ - jsonrpc: JSONRPC_VERSION, - id: rpcId, - method, - params, - }); - - process.stdout.write(`jsonrpc: ${rpcMessage}\n`); - return responseReader.read(rpcId); - }; + return (method: string, params: any = null) => rpcRequest(method, params); })(); export interface DeployTarget { @@ -132,5 +76,7 @@ export interface DeployData { export const rpc = { getDeployTarget: () => rpcCall("GetDeployTarget") as Promise, getDeployData: (typegraph: string) => - rpcCall("GetDeployData", { typegraph }) as Promise, + rpcRequest("GetDeployData", { + typegraph, + }), }; diff --git a/src/typegraph/deno/src/tg_manage.ts b/src/typegraph/deno/src/tg_manage.ts index a041068ba0..6ae83a301a 100644 --- a/src/typegraph/deno/src/tg_manage.ts +++ b/src/typegraph/deno/src/tg_manage.ts @@ -71,7 +71,7 @@ export class Manager { async #deploy(): Promise { try { - const deployData = await rpc.getDeployData(this.#typegraph.name); + const deployData = rpc.getDeployData(this.#typegraph.name); const env = this.#env; if (!env.artifact_resolution) { diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 6cdf2e1ff5..0ae03381f3 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -222,7 +222,9 @@ export class MetaTest { throw new Error(stderr); } - const tgString = stdout.trim().slice(1, stdout.length - 1); // remove the brackets [] + const output = stdout.trim(); + const startIndex = output.search("[{"); + const tgString = output.slice(startIndex + 1, stdout.length - 1); // remove the brackets [] return await this.#engineFromDeployed(tgString, opts.secrets ?? {}); } From cc03068cd1d4b85f21db63ed26fb2cf4da4c3786 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 4 Nov 2024 22:14:23 +0300 Subject: [PATCH 06/39] fix: several fixes [skip ci] --- src/typegraph/deno/src/metagen.ts | 20 +++++----- src/typegraph/deno/src/params.ts | 4 +- src/typegraph/deno/src/providers/aws.ts | 22 +++++------ src/typegraph/deno/src/providers/prisma.ts | 10 ++--- src/typegraph/deno/src/providers/temporal.ts | 4 +- src/typegraph/deno/src/runtimes/deno.ts | 4 +- src/typegraph/deno/src/runtimes/grpc.ts | 2 +- src/typegraph/deno/src/runtimes/http.ts | 4 +- src/typegraph/deno/src/runtimes/python.ts | 2 +- .../deno/src/runtimes/substantial.ts | 4 +- src/typegraph/deno/src/runtimes/wasm.ts | 8 ++-- src/typegraph/deno/src/tg_deploy.ts | 12 +++--- src/typegraph/deno/src/tg_manage.ts | 24 ++++++------ src/typegraph/deno/src/typegraph.ts | 13 +++---- src/typegraph/deno/src/types.ts | 30 +++++++-------- src/typegraph/deno/src/utils/func_utils.ts | 11 ++++-- .../python/typegraph/graph/params.py | 1 + .../python/typegraph/graph/typegraph.py | 17 ++------- src/typegraph/python/typegraph/t.py | 4 +- .../specs/codegen/rpc/typescript/client.ts | 38 +++++++++++++------ .../specs/codegen/src/lib/typescript.ts | 2 +- .../specs/codegen/tests/python.test.ts | 13 ++++--- src/typegraph/specs/codegen/tg-codegen | 2 +- tests/utils/test.ts | 2 +- 24 files changed, 133 insertions(+), 120 deletions(-) diff --git a/src/typegraph/deno/src/metagen.ts b/src/typegraph/deno/src/metagen.ts index adc81467b1..e0c790a8a8 100644 --- a/src/typegraph/deno/src/metagen.ts +++ b/src/typegraph/deno/src/metagen.ts @@ -15,14 +15,14 @@ export class Metagen { private getFdkConfig(tgOutput: TypegraphOutput, targetName: string) { const serializeParams = { - typegraph_path: `${this.workspacePath}/tg.ts`, + typegraphPath: `${this.workspacePath}/tg.ts`, prefix: undefined, - artifact_resolution: false, + artifactResolution: false, codegen: true, - prisma_migration: { - migrations_dir: "prisma-migrations", - migration_actions: [], - default_migration_action: { + prismaMigration: { + migrationsDir: "prisma-migrations", + migrationActions: [], + defaultMigrationAction: { apply: false, create: false, reset: false, @@ -32,10 +32,10 @@ export class Metagen { } satisfies SerializeParams; const frozenOut = freezeTgOutput(serializeParams, tgOutput); return { - config_json: JSON.stringify(this.genConfig), - tg_json: frozenOut.serialize(serializeParams).tgJson, - target_name: targetName, - workspace_path: this.workspacePath, + configJson: JSON.stringify(this.genConfig), + tgJson: frozenOut.serialize(serializeParams).tgJson, + targetName: targetName, + workspacePath: this.workspacePath, } as FdkConfig; } diff --git a/src/typegraph/deno/src/params.ts b/src/typegraph/deno/src/params.ts index c901141bc3..1d0551aa72 100644 --- a/src/typegraph/deno/src/params.ts +++ b/src/typegraph/deno/src/params.ts @@ -39,7 +39,7 @@ export class Auth { return { name, - auth_data: authData, + authData, protocol: "jwt", }; } @@ -56,7 +56,7 @@ export class Auth { return { name: "basic", protocol: "basic", - auth_data: authData, + authData, }; } diff --git a/src/typegraph/deno/src/providers/aws.ts b/src/typegraph/deno/src/providers/aws.ts index 57bf963388..659181c4db 100644 --- a/src/typegraph/deno/src/providers/aws.ts +++ b/src/typegraph/deno/src/providers/aws.ts @@ -26,32 +26,32 @@ export class S3Runtime extends Runtime { constructor(options: S3RuntimeData) { const id = aws.registerS3Runtime(options); super(id); - this.hostSecret = options.host_secret; - this.regionSecret = options.region_secret; - this.accessKeySecret = options.access_key_secret; - this.secretKeySecret = options.secret_key_secret; - this.pathStyleSecret = options.path_style_secret; + this.hostSecret = options.hostSecret; + this.regionSecret = options.regionSecret; + this.accessKeySecret = options.accessKeySecret; + this.secretKeySecret = options.secretKeySecret; + this.pathStyleSecret = options.pathStyleSecret; } /** create a function to presign an S3 GetObject request */ public presignGet(params: S3PresignGetParams): t.Func { - const { bucket, expiry_secs } = params; + const { bucket, expirySecs } = params; const mat: S3PresignGetMat = { _id: aws.s3PresignGet(this._id, params), bucket, - expiry_secs, + expirySecs, }; return t.func(t.struct({ path: t.string() }), t.uri(), mat); } /** create a function to presign an S3 PutObject request */ public presignPut(params: S3PresignPutParams): t.Func { - const { bucket, expiry_secs, content_type } = params; + const { bucket, expirySecs, contentType } = params; const mat: S3PresignPutMat = { _id: aws.s3PresignPut(this._id, params), bucket, - expiry_secs, - content_type, + expirySecs, + contentType, }; return t.func( t.struct({ length: t.integer(), path: t.string() }), @@ -101,7 +101,7 @@ export class S3Runtime extends Runtime { }; return t.func( t.struct({ - prefix: t.string().optional({ default_item: "" }), + prefix: t.string().optional({ defaultItem: "" }), files: t.list(fileType), }), t.boolean(), diff --git a/src/typegraph/deno/src/providers/prisma.ts b/src/typegraph/deno/src/providers/prisma.ts index 73c2b27c67..37a690ea6e 100644 --- a/src/typegraph/deno/src/providers/prisma.ts +++ b/src/typegraph/deno/src/providers/prisma.ts @@ -20,7 +20,7 @@ export class PrismaRuntime extends Runtime { constructor(name: string, connectionStringSecret: string) { const id = runtimes.registerPrismaRuntime({ name, - connection_string_secret: connectionStringSecret, + connectionStringSecret, }); super(id); this.name = name; @@ -186,10 +186,10 @@ function prismaLink( } arg = arg ?? {}; const typeId = runtimes.prismaLink({ - target_type: targetType._id, - relationship_name: name, - foreign_key: arg.fkey, - target_field: arg.field, + targetType: targetType._id, + relationshipName: name, + foreignKey: arg.fkey, + targetField: arg.field, unique: arg.unique, }); return new Typedef(typeId); diff --git a/src/typegraph/deno/src/providers/temporal.ts b/src/typegraph/deno/src/providers/temporal.ts index 86b090e38f..4fbbedac89 100644 --- a/src/typegraph/deno/src/providers/temporal.ts +++ b/src/typegraph/deno/src/providers/temporal.ts @@ -25,8 +25,8 @@ export class TemporalRuntime extends Runtime { }) { const id = runtimes.registerTemporalRuntime({ name, - host_secret: hostSecret, - namespace_secret: namespaceSecret, + hostSecret, + namespaceSecret, }); super(id); this.name = name; diff --git a/src/typegraph/deno/src/runtimes/deno.ts b/src/typegraph/deno/src/runtimes/deno.ts index 5b7e324e56..f0190da552 100644 --- a/src/typegraph/deno/src/runtimes/deno.ts +++ b/src/typegraph/deno/src/runtimes/deno.ts @@ -87,7 +87,7 @@ export class DenoRuntime extends Runtime { ): t.Func { const matId = runtimes.importDenoFunction( { - func_name: name, + funcName: name, module, deps, secrets, @@ -152,7 +152,7 @@ export class DenoRuntime extends Runtime { policyName, runtimes.importDenoFunction( { - func_name: data.name, + funcName: data.name, module: data.module, secrets: data.secrets ?? [], deps: data.deps ?? [], diff --git a/src/typegraph/deno/src/runtimes/grpc.ts b/src/typegraph/deno/src/runtimes/grpc.ts index f2ca84e966..3c88caf0bd 100644 --- a/src/typegraph/deno/src/runtimes/grpc.ts +++ b/src/typegraph/deno/src/runtimes/grpc.ts @@ -8,7 +8,7 @@ import { Runtime } from "./mod.ts"; export class GrpcRuntime extends Runtime { constructor(protoFile: string, endpoint: string) { const id = runtimes.registerGrpcRuntime({ - proto_file: protoFile, + protoFile, endpoint, }); super(id); diff --git a/src/typegraph/deno/src/runtimes/http.ts b/src/typegraph/deno/src/runtimes/http.ts index 7404b527b7..94e8aa395a 100644 --- a/src/typegraph/deno/src/runtimes/http.ts +++ b/src/typegraph/deno/src/runtimes/http.ts @@ -25,8 +25,8 @@ export class HttpRuntime extends Runtime { super( runtimes.registerHttpRuntime({ endpoint, - cert_secret: certSecret, - basic_auth_secret: basicAuthSecret, + certSecret, + basicAuthSecret, }), ); } diff --git a/src/typegraph/deno/src/runtimes/python.ts b/src/typegraph/deno/src/runtimes/python.ts index 0984f07b23..00cd0fa4db 100644 --- a/src/typegraph/deno/src/runtimes/python.ts +++ b/src/typegraph/deno/src/runtimes/python.ts @@ -107,7 +107,7 @@ export class PythonRuntime extends Runtime { const pyModMatId = runtimes.fromPythonImport(base, { module: matId, - func_name: name, + funcName: name, secrets, }); diff --git a/src/typegraph/deno/src/runtimes/substantial.ts b/src/typegraph/deno/src/runtimes/substantial.ts index 5e10f1f0f6..f3f7e3f418 100644 --- a/src/typegraph/deno/src/runtimes/substantial.ts +++ b/src/typegraph/deno/src/runtimes/substantial.ts @@ -24,7 +24,7 @@ export class Backend { static redis(connectionStringSecret: string): SubstantialBackend { return { redis: { - connection_string_secret: connectionStringSecret, + connectionStringSecret, }, }; } @@ -39,7 +39,7 @@ export class SubstantialRuntime extends Runtime { ) { const id = runtimes.registerSubstantialRuntime({ backend, - file_descriptions: fileDescriptions, + fileDescriptions, }); super(id); this.backend = backend; diff --git a/src/typegraph/deno/src/runtimes/wasm.ts b/src/typegraph/deno/src/runtimes/wasm.ts index 88015f1d14..62dc745a66 100644 --- a/src/typegraph/deno/src/runtimes/wasm.ts +++ b/src/typegraph/deno/src/runtimes/wasm.ts @@ -32,7 +32,7 @@ class WasmRuntimeWire extends WasmRuntime { constructor(artifactPath: string) { super( runtimes.registerWasmWireRuntime({ - wasm_artifact: artifactPath, + wasmArtifact: artifactPath, }), ); } @@ -54,7 +54,7 @@ class WasmRuntimeWire extends WasmRuntime { effect, }, { - func_name: name, + funcName: name, }, ); @@ -70,7 +70,7 @@ class WasmRuntimeReflected extends WasmRuntime { constructor(artifactPath: string) { super( runtimes.registerWasmReflectedRuntime({ - wasm_artifact: artifactPath, + wasmArtifact: artifactPath, }), ); } @@ -92,7 +92,7 @@ class WasmRuntimeReflected extends WasmRuntime { effect, }, { - func_name: name, + funcName: name, }, ); diff --git a/src/typegraph/deno/src/tg_deploy.ts b/src/typegraph/deno/src/tg_deploy.ts index e9655a2a85..7285dcef9c 100644 --- a/src/typegraph/deno/src/tg_deploy.ts +++ b/src/typegraph/deno/src/tg_deploy.ts @@ -58,14 +58,14 @@ export async function tgDeploy( params: TypegraphDeployParams, ): Promise { const serializeParams = { - typegraph_path: params.typegraphPath, + typegraphPath: params.typegraphPath, prefix: params.prefix, - artifact_resolution: true, + artifactResolution: true, codegen: false, - prisma_migration: { - migrations_dir: params.migrationsDir ?? "prisma-migrations", - migration_actions: Object.entries(params.migrationActions ?? {}), - default_migration_action: params.defaultMigrationAction ?? { + prismaMigration: { + migrationsDir: params.migrationsDir ?? "prisma-migrations", + migrationActions: Object.entries(params.migrationActions ?? {}), + defaultMigrationAction: params.defaultMigrationAction ?? { apply: true, create: false, reset: false, diff --git a/src/typegraph/deno/src/tg_manage.ts b/src/typegraph/deno/src/tg_manage.ts index 6ae83a301a..fef623e224 100644 --- a/src/typegraph/deno/src/tg_manage.ts +++ b/src/typegraph/deno/src/tg_manage.ts @@ -45,14 +45,14 @@ export class Manager { try { const env = this.#env; finalizationResult = this.#typegraph.serialize({ - typegraph_path: env.typegraph_path, + typegraphPath: env.typegraph_path, prefix: env.prefix, - artifact_resolution: this.#env.artifact_resolution, + artifactResolution: this.#env.artifact_resolution, codegen: false, - prisma_migration: { - migrations_dir: this.#getMigrationsDir(), - migration_actions: [], - default_migration_action: { + prismaMigration: { + migrationsDir: this.#getMigrationsDir(), + migrationActions: [], + defaultMigrationAction: { apply: true, create: false, reset: false, @@ -83,14 +83,14 @@ export class Manager { } const params: SerializeParams = { - typegraph_path: env.typegraph_path, + typegraphPath: env.typegraph_path, prefix: env.prefix, - artifact_resolution: true, + artifactResolution: true, codegen: false, - prisma_migration: { - migrations_dir: this.#getMigrationsDir(), - migration_actions: Object.entries(deployData.migrationActions), - default_migration_action: deployData.defaultMigrationAction, + prismaMigration: { + migrationsDir: this.#getMigrationsDir(), + migrationActions: Object.entries(deployData.migrationActions), + defaultMigrationAction: deployData.defaultMigrationAction, }, pretty: false, }; diff --git a/src/typegraph/deno/src/typegraph.ts b/src/typegraph/deno/src/typegraph.ts index 7e25b7f5b8..3de550d07b 100644 --- a/src/typegraph/deno/src/typegraph.ts +++ b/src/typegraph/deno/src/typegraph.ts @@ -172,12 +172,12 @@ export async function typegraph( const path = fromFileUrl(`file://${simpleFile}`); const defaultCorsFields = { - allow_credentials: true, - allow_headers: [], - allow_methods: [], - allow_origin: [], - expose_headers: [], - max_age_sec: undefined, + allowCredentials: true, + allowHeaders: [], + allowMethods: [], + allowOrigin: [], + exposeHeaders: [], + maxAgeSec: undefined, } as CoreCors; const defaultRateFields = { @@ -191,7 +191,6 @@ export async function typegraph( rate: rate ? { ...defaultRateFields, ...rate } : undefined, }; - core.initTypegraph({ name, dynamic, path, ...tgParams }); const g: TypegraphBuilderArgs = { diff --git a/src/typegraph/deno/src/types.ts b/src/typegraph/deno/src/types.ts index 7d518439dc..98ecde2237 100644 --- a/src/typegraph/deno/src/types.ts +++ b/src/typegraph/deno/src/types.ts @@ -202,9 +202,9 @@ class Integer extends Typedef implements Readonly { super(_id); this.min = data.min; this.max = data.max; - this.exclusiveMinimum = data.exclusive_minimum; - this.exclusiveMaximum = data.exclusive_maximum; - this.multipleOf = data.multiple_of; + this.exclusiveMinimum = data.exclusiveMinimum; + this.exclusiveMaximum = data.exclusiveMaximum; + this.multipleOf = data.multipleOf; this.enumeration = data.enumeration; } @@ -238,9 +238,9 @@ class Float extends Typedef implements Readonly { super(_id); this.min = data.min; this.max = data.max; - this.exclusiveMinimum = data.exclusive_minimum; - this.exclusiveMaximum = data.exclusive_maximum; - this.multipleOf = data.multiple_of; + this.exclusiveMinimum = data.exclusiveMinimum; + this.exclusiveMaximum = data.exclusiveMaximum; + this.multipleOf = data.multipleOf; this.enumeration = data.enumeration; } } @@ -369,7 +369,7 @@ class List extends Typedef { this.min = data.min; this.max = data.max; this.items = data.of; - this.uniqueItems = data.unique_items; + this.uniqueItems = data.uniqueItems; } } @@ -393,7 +393,7 @@ class Optional extends Typedef { constructor(_id: number, data: TypeOptional) { super(_id); this.item = data.of; - this.defaultItem = data.default_item; + this.defaultItem = data.defaultItem; } } @@ -406,7 +406,7 @@ export function optional( const completeData = { of: variant._id, ...data, - defaultItem: JSON.stringify(data.default_item), + defaultItem: JSON.stringify(data.defaultItem), } as TypeOptional; return new Optional( withBase(core.optionalb(completeData), base), @@ -470,7 +470,7 @@ export function struct

( withBase( core.structb({ props: Object.entries(props).map(([name, typ]) => [name, typ._id]), - additional_props: additionalProps ?? false, + additionalProps: additionalProps ?? false, }), base, ), @@ -598,10 +598,10 @@ export class Func< const transformData = core.getTransformData(this.inp._id, transformTree); return func( - new Typedef(transformData.query_input), + new Typedef(transformData.queryInput), this.out, this.mat, - transformData.parameter_transform, + transformData.parameterTransform, this.config, ); } @@ -648,9 +648,9 @@ export function func< inp: inp._id, out: out._id, mat: mat._id, - parameter_transform: transformData ?? undefined, - rate_calls: rateCalls, - rate_weight: rateWeight, + parameterTransform: transformData ?? undefined, + rateCalls, + rateWeight, }) as number, inp, out, diff --git a/src/typegraph/deno/src/utils/func_utils.ts b/src/typegraph/deno/src/utils/func_utils.ts index 69d69f84c5..0c0cb300f2 100644 --- a/src/typegraph/deno/src/utils/func_utils.ts +++ b/src/typegraph/deno/src/utils/func_utils.ts @@ -100,7 +100,7 @@ export function buildReduceEntries( } entries.push({ path: currPath, - injection_data: node.payload, + injectionData: node.payload, }); return entries; } @@ -109,7 +109,7 @@ export function buildReduceEntries( if (Array.isArray(node)) { entries.push({ path: currPath, - injection_data: serializeStaticInjection(node), + injectionData: serializeStaticInjection(node), }); return entries; } @@ -123,7 +123,7 @@ export function buildReduceEntries( if (allowed.includes(typeof node)) { entries.push({ path: currPath, - injection_data: serializeStaticInjection(node), + injectionData: serializeStaticInjection(node), }); return entries; } @@ -172,7 +172,10 @@ export async function execRequest( try { const response = await fetch(url, reqInit); if (!response.ok) { - log.error("error response json", await response.json().catch(_err => 'non json response')); + log.error( + "error response json", + await response.json().catch((_err) => "non json response"), + ); throw Error( `${errMsg}: request failed with status ${response.status} (${response.statusText})`, ); diff --git a/src/typegraph/python/typegraph/graph/params.py b/src/typegraph/python/typegraph/graph/params.py index e7bbdeb409..9f0ad301fc 100644 --- a/src/typegraph/python/typegraph/graph/params.py +++ b/src/typegraph/python/typegraph/graph/params.py @@ -5,6 +5,7 @@ import json from typing import List, Optional, TYPE_CHECKING, Any from typegraph.gen import utils +from typegraph.gen.core import Rate as CoreRate from typegraph.sdk import sdk_utils if TYPE_CHECKING: diff --git a/src/typegraph/python/typegraph/graph/typegraph.py b/src/typegraph/python/typegraph/graph/typegraph.py index cb3b59b0af..acc6bd33f2 100644 --- a/src/typegraph/python/typegraph/graph/typegraph.py +++ b/src/typegraph/python/typegraph/graph/typegraph.py @@ -11,9 +11,7 @@ Rate, TypegraphInitParams, ) -from typegraph.gen.core import ( - Cors as CoreCors, -) +from typegraph.gen.core import Cors as CoreCors, Rate as CoreRate from typegraph.gen.utils import Auth from typegraph.graph.params import Cors, RawAuth from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput @@ -35,7 +33,7 @@ class Typegraph: dynamic: Optional[bool] path: str _context: List["Typegraph"] = [] - rate: Optional[Rate] + rate: Optional[CoreRate] cors: Optional[CoreCors] prefix: Optional[str] @@ -52,17 +50,10 @@ def __init__( self.dynamic = dynamic self.path = str(Path(inspect.stack()[2].filename).resolve()) - self.rate = rate + self.rate = Rate(**rate.__dict__) if rate else None cors = cors or Cors() - self.cors = CoreCors( - allow_origin=cors.allow_origin, - allow_headers=cors.allow_headers, - expose_headers=cors.expose_headers, - allow_methods=cors.allow_methods, - allow_credentials=cors.allow_credentials, - max_age_sec=cors.max_age_sec, - ) + self.cors = CoreCors(**cors.__dict__) self.prefix = prefix @classmethod diff --git a/src/typegraph/python/typegraph/t.py b/src/typegraph/python/typegraph/t.py index d90dc540ea..e4d1ed09a4 100644 --- a/src/typegraph/python/typegraph/t.py +++ b/src/typegraph/python/typegraph/t.py @@ -678,10 +678,10 @@ def apply(self, value: ApplyParamObjectNode) -> "func": raise e return func( - typedef(transform_data.value.query_input), + typedef(transform_data.query_input), self.out, self.mat, - parameter_transform=transform_data.value.parameter_transform, + parameter_transform=transform_data.parameter_transform, rate_calls=self.rate_calls, rate_weight=self.rate_weight, ) diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 62f9412543..c5468e8493 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -1,10 +1,8 @@ -import { Buffer } from "node:buffer"; -import process from "node:process"; -import fs from "node:fs"; - const BUFFER_SIZE = 1024; const state = { id: 0 }; +const encoder = new TextEncoder(); +const decoder = new TextDecoder(); type RpcResponse = { jsonrpc: "2.0"; @@ -17,30 +15,48 @@ type RpcResponse = { id: number | string; }; +function camelToSnakeCase(obj: Record): Record { + const result: Record = {}; + + for (const [key, value] of Object.entries(obj)) { + const snakeKey = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase(); + + if (value && typeof value === "object" && !Array.isArray(value)) { + result[snakeKey] = camelToSnakeCase(value); + } else { + result[snakeKey] = value; + } + } + + return result; +} + function rpcRequest(method: string, params?: P) { const request = { jsonrpc: "2.0", method, - params, + params: params && camelToSnakeCase(params), id: state.id, }; const jsonRequest = JSON.stringify(request); + const message = encoder.encode("jsonrpc: " + jsonRequest + "\n"); - process.stdout.write("jsonrpc: " + jsonRequest + "\n"); + Deno.stdout.writeSync(message); state.id += 1; - const buffer = Buffer.alloc(BUFFER_SIZE); + const buffer = new Uint8Array(BUFFER_SIZE); let bytesRead = null; - let content = Buffer.alloc(0); + let content = new Uint8Array(0); do { - bytesRead = fs.readSync(process.stdin.fd, buffer); - content = Buffer.concat([content, buffer.subarray(0, bytesRead)]); + bytesRead = Deno.stdin.readSync(buffer) ?? 0; + content = new Uint8Array([...content, ...buffer.subarray(0, bytesRead)]); } while (bytesRead == BUFFER_SIZE); - const response: RpcResponse = JSON.parse(content.toString()); + const decoded = decoder.decode(content); + const response: RpcResponse = JSON.parse(decoded); if (response.error) { throw new Error(response.error.message); diff --git a/src/typegraph/specs/codegen/src/lib/typescript.ts b/src/typegraph/specs/codegen/src/lib/typescript.ts index 3ae85cbfd5..32cd589078 100644 --- a/src/typegraph/specs/codegen/src/lib/typescript.ts +++ b/src/typegraph/specs/codegen/src/lib/typescript.ts @@ -50,7 +50,7 @@ class TypeScriptCodeGenerator extends TypeDefProcessor { override formatRecordTypeDef(def: RecordTypeDef): string { return `export type ${def.ident} = { ${def.props - .map((p) => ` ${p.name}${p.optional ? "?" : ""}: ${p.value}`) + .map((p) => ` ${toCamelCase(p.name)}${p.optional ? "?" : ""}: ${p.value}`) .join("\n")} }`; } diff --git a/src/typegraph/specs/codegen/tests/python.test.ts b/src/typegraph/specs/codegen/tests/python.test.ts index a092075b14..addf8df0ac 100644 --- a/src/typegraph/specs/codegen/tests/python.test.ts +++ b/src/typegraph/specs/codegen/tests/python.test.ts @@ -25,7 +25,10 @@ Deno.test("Python struct codegen", () => { str_arr: t.List[str] tup: t.Tuple[float, float] opt: t.Optional[bool] - comp: t.Optional[t.List[t.Tuple[int, Something]]]`; + comp: t.Optional[t.List[t.Tuple[int, Something]]] + + def __init__(self, num: int, key: str, str_arr: t.List[str], tup: t.Tuple[float, float], opt: t.Optional[bool], comp: t.Optional[t.List[t.Tuple[int, Something]]], **kwargs): + super().__init__(num=num,key=key,str_arr=str_arr,tup=tup,opt=opt,comp=comp, **kwargs)`; assertEquals(result, expected); }); @@ -61,7 +64,7 @@ Deno.test("Python function codegen", () => { req = RequestType(param=param, opt=opt) res = rpc_request("func", req.model_dump()) - ret = ReturnType(**res) + ret = ReturnType(value=res) return ret.value`; @@ -74,10 +77,10 @@ Deno.test("Python import codegen", () => { pycg.process(utils.importCase); const result = pycg.formatHeaders(); - const expected = `import typing as t + const expected = `import typing_extensions as t from pydantic import BaseModel -from client import rpc_request -from foobar import Foo, Bar`; +from typegraph.gen.client import rpc_request +from typegraph.gen.foobar import Foo, Bar`; assertEquals(result, expected); }); diff --git a/src/typegraph/specs/codegen/tg-codegen b/src/typegraph/specs/codegen/tg-codegen index f98e09de93..3d98f01904 100755 --- a/src/typegraph/specs/codegen/tg-codegen +++ b/src/typegraph/specs/codegen/tg-codegen @@ -10,4 +10,4 @@ DENO_PERMISSIONS=( --allow-run ) -~/.deno/bin/deno run ${DENO_PERMISSIONS[*]} "$SCRIPT_DIR/src/cmd/main.ts" "$1" "$2" +deno run ${DENO_PERMISSIONS[*]} "$SCRIPT_DIR/src/cmd/main.ts" "$1" "$2" diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 0ae03381f3..f35add38f5 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -223,7 +223,7 @@ export class MetaTest { } const output = stdout.trim(); - const startIndex = output.search("[{"); + const startIndex = output.search(/\[{/); const tgString = output.slice(startIndex + 1, stdout.length - 1); // remove the brackets [] return await this.#engineFromDeployed(tgString, opts.secrets ?? {}); From 332cd394d386166dbb3b12977089f08d5517eb75 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 4 Nov 2024 23:27:48 +0300 Subject: [PATCH 07/39] wip: fix tests [skip ci] --- tests/multi_typegraph/multi_typegraph.ts | 161 +++++++++--------- tests/multi_typegraph/multi_typegraph_test.ts | 4 +- tests/policies/policies_test.ts | 2 +- tests/utils/test.ts | 8 +- 4 files changed, 87 insertions(+), 88 deletions(-) diff --git a/tests/multi_typegraph/multi_typegraph.ts b/tests/multi_typegraph/multi_typegraph.ts index 34957744b0..6d95fb2eb0 100644 --- a/tests/multi_typegraph/multi_typegraph.ts +++ b/tests/multi_typegraph/multi_typegraph.ts @@ -13,106 +13,103 @@ function randomFunc() { export const notTg = randomFunc(); -export const temporal = async () => - await typegraph("temporal", (g: any) => { - const pub = Policy.public(); - const temporal = new TemporalRuntime({ - name: "test", - hostSecret: "HOST", - namespaceSecret: "NAMESPACE", - }); - g.expose({ - startKv: temporal - .startWorkflow("keyValueStore", t.struct({})) - .withPolicy(pub), +await typegraph("temporal", (g: any) => { + const pub = Policy.public(); + const temporal = new TemporalRuntime({ + name: "test", + hostSecret: "HOST", + namespaceSecret: "NAMESPACE", + }); + g.expose({ + startKv: temporal + .startWorkflow("keyValueStore", t.struct({})) + .withPolicy(pub), - query: temporal - .queryWorkflow("getValue", t.string(), t.string().optional()) - .withPolicy(pub), + query: temporal + .queryWorkflow("getValue", t.string(), t.string().optional()) + .withPolicy(pub), - signal: temporal - .signalWorkflow( - "setValue", - t.struct({ key: t.string(), value: t.string() }), - ) - .withPolicy(pub), + signal: temporal + .signalWorkflow( + "setValue", + t.struct({ key: t.string(), value: t.string() }), + ) + .withPolicy(pub), - describe: temporal.describeWorkflow().withPolicy(pub), - }); + describe: temporal.describeWorkflow().withPolicy(pub), }); +}); const tpe = t.struct({ a: t.string(), b: t.list(t.either([t.integer(), t.string()])), }); -export const python = async () => - await typegraph("python", (g: any) => { - const python = new PythonRuntime(); - const pub = Policy.public(); +await typegraph("python", (g: any) => { + const python = new PythonRuntime(); + const pub = Policy.public(); - g.expose({ - identityLambda: python - .fromLambda(t.struct({ input: tpe }), tpe, { - code: "lambda x: x['input']", - }) - .withPolicy(pub), - identityDef: python - .fromDef(t.struct({ input: tpe }), tpe, { - code: outdent` + g.expose({ + identityLambda: python + .fromLambda(t.struct({ input: tpe }), tpe, { + code: "lambda x: x['input']", + }) + .withPolicy(pub), + identityDef: python + .fromDef(t.struct({ input: tpe }), tpe, { + code: outdent` def identity(x): return x['input'] `, - }) - .withPolicy(pub), - }); + }) + .withPolicy(pub), }); +}); -export const randomTg = async () => - await typegraph("random", (g: any) => { - const random = new RandomRuntime({ seed: 1, reset: "" }); - const pub = Policy.public(); +await typegraph("random", (g: any) => { + const random = new RandomRuntime({ seed: 1, reset: "" }); + const pub = Policy.public(); - // test for enum, union, either - const rgb = t.struct( - { - R: t.float(), - G: t.float(), - B: t.float(), - }, - { name: "Rgb" }, - ); - const vec = t.struct( - { x: t.float(), y: t.float(), z: t.float() }, - { - name: "Vec", - }, - ); + // test for enum, union, either + const rgb = t.struct( + { + R: t.float(), + G: t.float(), + B: t.float(), + }, + { name: "Rgb" }, + ); + const vec = t.struct( + { x: t.float(), y: t.float(), z: t.float() }, + { + name: "Vec", + }, + ); - const rubix_cube = t.struct( - { name: t.string(), size: t.integer() }, - { - name: "Rubix", - }, - ); - const toygun = t.struct({ color: t.string() }, { name: "Toygun" }); + const rubix_cube = t.struct( + { name: t.string(), size: t.integer() }, + { + name: "Rubix", + }, + ); + const toygun = t.struct({ color: t.string() }, { name: "Toygun" }); - const testStruct = t.struct({ - field: t.union([rgb, vec]), - toy: t.either([rubix_cube, toygun]), - educationLevel: t.enum_(["primary", "secondary", "tertiary"]), - cents: t.float({ enumeration: [0.25, 0.5, 1.0] }), - }); + const testStruct = t.struct({ + field: t.union([rgb, vec]), + toy: t.either([rubix_cube, toygun]), + educationLevel: t.enum_(["primary", "secondary", "tertiary"]), + cents: t.float({ enumeration: [0.25, 0.5, 1.0] }), + }); - g.expose({ - test1: random - .gen( - t.struct({ - email: t.email(), - country: t.string({}, { config: { gen: "country", full: true } }), - }), - ) - .withPolicy(pub), - test2: random.gen(testStruct).withPolicy(pub), - }); + g.expose({ + test1: random + .gen( + t.struct({ + email: t.email(), + country: t.string({}, { config: { gen: "country", full: true } }), + }), + ) + .withPolicy(pub), + test2: random.gen(testStruct).withPolicy(pub), }); +}); diff --git a/tests/multi_typegraph/multi_typegraph_test.ts b/tests/multi_typegraph/multi_typegraph_test.ts index 485dd4ef24..50998d6861 100644 --- a/tests/multi_typegraph/multi_typegraph_test.ts +++ b/tests/multi_typegraph/multi_typegraph_test.ts @@ -19,7 +19,7 @@ const ALL_POSTS = [1, 2, 4, 7, 12, 34, 67].map(generatePost); const tsTgPath = "multi_typegraph/multi_typegraph.ts"; Meta.test("Deno: Multi-typegraph file - Random typegraph", async (t) => { - const e = await t.engine(tsTgPath, { typegraph: "randomTg" }); + const e = await t.engine(tsTgPath, { typegraph: "random" }); await t.should("work on enum, union, and either types", async () => { await gql` @@ -121,7 +121,7 @@ Meta.test( }, async (metaTest) => { const engine = await metaTest.engine("multi_typegraph/multi_typegraph.py", { - typegraph: "http_py", + typegraph: "http-py", }); mf.mock("GET@/api/posts", (req) => { const tags = new URL(req.url).searchParams.getAll("tags"); diff --git a/tests/policies/policies_test.ts b/tests/policies/policies_test.ts index a2c40bfe15..4bb223dfcb 100644 --- a/tests/policies/policies_test.ts +++ b/tests/policies/policies_test.ts @@ -23,7 +23,7 @@ Meta.test("Policies", async (t) => { const crypto = t.typegate.cryptoKeys; const e = await t.engine("policies/policies.py", { secrets: await genSecretKey(config), - // typegraph: "policies", + typegraph: "policies", }); await t.should("have public access", async () => { diff --git a/tests/utils/test.ts b/tests/utils/test.ts index f35add38f5..533f86b74f 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -216,15 +216,17 @@ export class MetaTest { async engine(path: string, opts: ParseOptions = {}) { const args = ["serialize", "--file", path, "--quiet"]; - const { code, stdout, stderr } = await this.meta(args); + const tgArgs = opts.typegraph ? ["--typegraph", opts.typegraph] : ["-1"]; + const { code, stdout, stderr } = await this.meta(args.concat(tgArgs)); if (code !== 0) { throw new Error(stderr); } + // FIXME: meta cli prints debug output to stdout const output = stdout.trim(); - const startIndex = output.search(/\[{/); - const tgString = output.slice(startIndex + 1, stdout.length - 1); // remove the brackets [] + const startIndex = output.search(/\{/); + const tgString = output.slice(startIndex); return await this.#engineFromDeployed(tgString, opts.secrets ?? {}); } From 30fc9b9cc3ce3625439cbb15b4a3bb09bb08f58c Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 5 Nov 2024 13:10:39 +0300 Subject: [PATCH 08/39] fix: ghjk tg-build & codegen deno --- .ghjk/lock.json | 48 +++------ deno.jsonc | 1 + deno.lock | 86 ++++++++++++++++ import_map.json | 5 +- .../python/typegraph/graph/params.py | 1 - src/typegraph/python/typegraph/t.py | 2 +- src/typegraph/python/typegraph/utils.py | 1 - src/typegraph/specs/codegen/deno.json | 14 --- src/typegraph/specs/codegen/deno.jsonc | 6 ++ src/typegraph/specs/codegen/deno.lock | 99 ------------------- tests/utils/test.ts | 32 +++++- tools/jsr/deno2node.ts | 14 +-- tools/tasks/build.ts | 28 +++--- 13 files changed, 157 insertions(+), 180 deletions(-) delete mode 100644 src/typegraph/specs/codegen/deno.json create mode 100644 src/typegraph/specs/codegen/deno.jsonc delete mode 100644 src/typegraph/specs/codegen/deno.lock diff --git a/.ghjk/lock.json b/.ghjk/lock.json index 841c982e83..ad932bdc75 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -1072,27 +1072,11 @@ ], "allowedBuildDeps": "bciqek3tmrhm4iohl6tvdzlhxwhv7b52makvvgehltxv52d3l7rbki3y" }, - "ghjkEnvProvInstSet_______task_env_build-tgraph-core": { - "installs": [ - "bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy", - "bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y", - "bciqminqcmgw3fbbhibwc7tf6mrupttheic7kpiykadbowqmnzhmzo5a", - "bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba", - "bciqcnbruy2q6trpvia52n2yis4t27taoz4mxkeguqz5aif7ex6rp26y", - "bciqpu7gxs3zm7i4gwp3m3cfdxwz27ixvsykdnbxrl5m5mt3xbb3b4la", - "bciqjme7csfq43oenkrsakdhaha34hgy6vdwkfffki2ank3kf6mjcguq" - ], - "allowedBuildDeps": "bciqek3tmrhm4iohl6tvdzlhxwhv7b52makvvgehltxv52d3l7rbki3y" - }, "ghjkEnvProvInstSet_______task_env_build-tgraph-py": { "installs": [ "bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy", "bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y", "bciqminqcmgw3fbbhibwc7tf6mrupttheic7kpiykadbowqmnzhmzo5a", - "bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba", - "bciqcnbruy2q6trpvia52n2yis4t27taoz4mxkeguqz5aif7ex6rp26y", - "bciqpu7gxs3zm7i4gwp3m3cfdxwz27ixvsykdnbxrl5m5mt3xbb3b4la", - "bciqjme7csfq43oenkrsakdhaha34hgy6vdwkfffki2ank3kf6mjcguq", "bciqfpjzi6gguk7dafyicfjpzpwtybgyc2dsnxg2zxkcmyinzy7abpla", "bciqkgncxbauys2qfguplxcz2auxrcyamj4b6htqk2fqvohfm3afd7sa", "bciqihcmo6l5uwzih3e3ujc55curep4arfomo6rzkdsfim74unxexiqy" @@ -1104,10 +1088,6 @@ "bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy", "bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y", "bciqminqcmgw3fbbhibwc7tf6mrupttheic7kpiykadbowqmnzhmzo5a", - "bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba", - "bciqcnbruy2q6trpvia52n2yis4t27taoz4mxkeguqz5aif7ex6rp26y", - "bciqpu7gxs3zm7i4gwp3m3cfdxwz27ixvsykdnbxrl5m5mt3xbb3b4la", - "bciqjme7csfq43oenkrsakdhaha34hgy6vdwkfffki2ank3kf6mjcguq", "bciqezep4ufkgwesldlm5etyfkgdsiickfudx7cosydcz6xtgeorn2hy", "bciqaixkkacuuligsvtjcfdfgjgl65owtyspiiljb3vmutlgymecsiwq", "bciqlt27ioikxnpkqq37hma7ibn5e5wpzfarbvoh77zwdkarwghtvzxa" @@ -1320,7 +1300,7 @@ "build-tgraph-core": { "ty": "denoFile@v1", "key": "build-tgraph-core", - "envKey": "bciqgqffklh7r5setenk7bkrqoyingrbbjbrcj4jka3rttr56ybxruqi" + "envKey": "bciqjqpgdwvbvonak3vsozretaksktub273tf3ipzah6sd7ut3kexqzi" }, "build-tgraph-py": { "ty": "denoFile@v1", @@ -1328,7 +1308,7 @@ "dependsOn": [ "build-tgraph-core" ], - "envKey": "bciqmqhamsvcr6i7ol37s5kizxnoawcecho4kzqiwxgodztarzdapawa" + "envKey": "bciqitmhilz5ixbiasuhoeqboakq4cy2snb7llbcfwman6yqlq2p6rqy" }, "build-tgraph-ts": { "ty": "denoFile@v1", @@ -1336,7 +1316,7 @@ "dependsOn": [ "build-tgraph-core" ], - "envKey": "bciqp4x2tqplttorqy7ixw4rltvd7i5dknke6f3ba3uzbgymrp3s7aya" + "envKey": "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy" }, "build-tgraph-ts-node": { "ty": "denoFile@v1", @@ -1344,7 +1324,7 @@ "dependsOn": [ "build-tgraph-ts" ], - "envKey": "bciqp4x2tqplttorqy7ixw4rltvd7i5dknke6f3ba3uzbgymrp3s7aya" + "envKey": "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy" }, "build-tgraph": { "ty": "denoFile@v1", @@ -1947,7 +1927,7 @@ } ] }, - "bciqgqffklh7r5setenk7bkrqoyingrbbjbrcj4jka3rttr56ybxruqi": { + "bciqjqpgdwvbvonak3vsozretaksktub273tf3ipzah6sd7ut3kexqzi": { "provides": [ { "ty": "posix.envVar", @@ -1976,16 +1956,16 @@ }, { "ty": "posix.envVar", - "key": "WASM_FILE", - "val": "target/wasm/release/typegraph_core.wasm" + "key": "TG_CODEGEN", + "val": "src/typegraph/specs/codegen/tg-codegen" }, { "ty": "ghjk.ports.InstallSetRef", - "setId": "ghjkEnvProvInstSet_______task_env_build-tgraph-core" + "setId": "ghjkEnvProvInstSet____rust" } ] }, - "bciqmqhamsvcr6i7ol37s5kizxnoawcecho4kzqiwxgodztarzdapawa": { + "bciqitmhilz5ixbiasuhoeqboakq4cy2snb7llbcfwman6yqlq2p6rqy": { "provides": [ { "ty": "posix.envVar", @@ -2014,8 +1994,8 @@ }, { "ty": "posix.envVar", - "key": "WASM_FILE", - "val": "target/wasm/release/typegraph_core.wasm" + "key": "TG_CODEGEN", + "val": "src/typegraph/specs/codegen/tg-codegen" }, { "ty": "ghjk.ports.InstallSetRef", @@ -2023,7 +2003,7 @@ } ] }, - "bciqp4x2tqplttorqy7ixw4rltvd7i5dknke6f3ba3uzbgymrp3s7aya": { + "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy": { "provides": [ { "ty": "posix.envVar", @@ -2052,8 +2032,8 @@ }, { "ty": "posix.envVar", - "key": "WASM_FILE", - "val": "target/wasm/release/typegraph_core.wasm" + "key": "TG_CODEGEN", + "val": "src/typegraph/specs/codegen/tg-codegen" }, { "ty": "ghjk.ports.InstallSetRef", diff --git a/deno.jsonc b/deno.jsonc index 582d271d36..237e94ee93 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -7,6 +7,7 @@ "./src/typegate/", // need special lint rules "./tests", // needs special lint rules "./src/typegraph/deno", // needed for publishing + "./src/typegraph/specs/codegen", // needed for running scripts "./examples/" // needed for published_test ] }, diff --git a/deno.lock b/deno.lock index 9a679f2d84..a5fd68e21c 100644 --- a/deno.lock +++ b/deno.lock @@ -5,6 +5,7 @@ "jsr:@david/dax@0.41.0": "jsr:@david/dax@0.41.0", "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", "jsr:@std/archive@^0.225.0": "jsr:@std/archive@0.225.1", + "jsr:@std/assert": "jsr:@std/assert@1.0.6", "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", "jsr:@std/assert@^1.0.2": "jsr:@std/assert@1.0.4", "jsr:@std/assert@^1.0.4": "jsr:@std/assert@1.0.6", @@ -39,6 +40,7 @@ "jsr:@std/io@^0.224.5": "jsr:@std/io@0.224.6", "jsr:@std/io@^0.224.6": "jsr:@std/io@0.224.6", "jsr:@std/log@^0.224.5": "jsr:@std/log@0.224.6", + "jsr:@std/path": "jsr:@std/path@1.0.4", "jsr:@std/path@0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.4", @@ -49,6 +51,7 @@ "jsr:@std/streams@1": "jsr:@std/streams@1.0.4", "jsr:@std/streams@^1.0.2": "jsr:@std/streams@1.0.4", "jsr:@std/testing@^1.0.1": "jsr:@std/testing@1.0.2", + "jsr:@std/text@^1.0.7": "jsr:@std/text@1.0.8", "jsr:@std/url@^0.225.0": "jsr:@std/url@0.225.0", "jsr:@std/uuid@^1.0.1": "jsr:@std/uuid@1.0.2", "jsr:@std/yaml@^1.0.4": "jsr:@std/yaml@1.0.5", @@ -58,10 +61,13 @@ "npm:@types/node": "npm:@types/node@18.16.19", "npm:chance@1.1.11": "npm:chance@1.1.11", "npm:graphql@16.8.1": "npm:graphql@16.8.1", + "npm:json-schema-faker@0.5.3": "npm:json-schema-faker@0.5.3", "npm:lodash@4.17.21": "npm:lodash@4.17.21", "npm:mathjs@11.11.1": "npm:mathjs@11.11.1", "npm:multiformats@13.1.0": "npm:multiformats@13.1.0", "npm:pg@8.12.0": "npm:pg@8.12.0", + "npm:tree-sitter-typescript@^0.23.0": "npm:tree-sitter-typescript@0.23.0_tree-sitter@0.21.1", + "npm:tree-sitter@^0.21.1": "npm:tree-sitter@0.21.1", "npm:validator@13.12.0": "npm:validator@13.12.0", "npm:zod-validation-error@3.3.0": "npm:zod-validation-error@3.3.0_zod@3.23.8", "npm:zod@3.23.8": "npm:zod@3.23.8" @@ -280,6 +286,9 @@ "jsr:@std/path@^1.0.4" ] }, + "@std/text@1.0.8": { + "integrity": "40ba34caa095f393e78796e5eda37b8b4e2cc6cfd6f51f34658ad7487b1451e4" + }, "@std/url@0.225.0": { "integrity": "fc854cc8a720e9c974904071140b462880d8347030006f43193935ae06c7a0f9", "dependencies": [ @@ -369,6 +378,16 @@ "debug": "debug@4.3.6" } }, + "argparse@1.0.10": { + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "sprintf-js@1.0.3" + } + }, + "call-me-maybe@1.0.2": { + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dependencies": {} + }, "chance@1.1.11": { "integrity": "sha512-kqTg3WWywappJPqtgrdvbA380VoXO2eu9VCV895JgbyHsaErXdyHK9LOZ911OvAk6L0obK7kDk9CGs8+oBawVA==", "dependencies": {} @@ -395,6 +414,14 @@ "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==", "dependencies": {} }, + "esprima@4.0.1": { + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dependencies": {} + }, + "format-util@1.0.5": { + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==", + "dependencies": {} + }, "fraction.js@4.3.4": { "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", "dependencies": {} @@ -414,6 +441,32 @@ "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", "dependencies": {} }, + "js-yaml@3.14.1": { + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "argparse@1.0.10", + "esprima": "esprima@4.0.1" + } + }, + "json-schema-faker@0.5.3": { + "integrity": "sha512-BeIrR0+YSrTbAR9dOMnjbFl1MvHyXnq+Wpdw1FpWZDHWKLzK229hZ5huyPcmzFUfVq1ODwf40WdGVoE266UBUg==", + "dependencies": { + "json-schema-ref-parser": "json-schema-ref-parser@6.1.0", + "jsonpath-plus": "jsonpath-plus@7.2.0" + } + }, + "json-schema-ref-parser@6.1.0": { + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "dependencies": { + "call-me-maybe": "call-me-maybe@1.0.2", + "js-yaml": "js-yaml@3.14.1", + "ono": "ono@4.0.11" + } + }, + "jsonpath-plus@7.2.0": { + "integrity": "sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==", + "dependencies": {} + }, "lodash@4.17.21": { "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dependencies": {} @@ -444,6 +497,20 @@ "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==", "dependencies": {} }, + "node-addon-api@8.2.1": { + "integrity": "sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==", + "dependencies": {} + }, + "node-gyp-build@4.8.2": { + "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "dependencies": {} + }, + "ono@4.0.11": { + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "dependencies": { + "format-util": "format-util@1.0.5" + } + }, "pg-cloudflare@1.1.1": { "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", "dependencies": {} @@ -523,10 +590,29 @@ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dependencies": {} }, + "sprintf-js@1.0.3": { + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dependencies": {} + }, "tiny-emitter@2.1.0": { "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", "dependencies": {} }, + "tree-sitter-typescript@0.23.0_tree-sitter@0.21.1": { + "integrity": "sha512-hRy5O9d+9ON4HxIWWxkI4zonrw2v/WNN1JoiGW5HkXfC9K2R3p53ugMvs6Vs4T7ASCwggsoQ75LNdgpExC/zgQ==", + "dependencies": { + "node-addon-api": "node-addon-api@8.2.1", + "node-gyp-build": "node-gyp-build@4.8.2", + "tree-sitter": "tree-sitter@0.21.1" + } + }, + "tree-sitter@0.21.1": { + "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", + "dependencies": { + "node-addon-api": "node-addon-api@8.2.1", + "node-gyp-build": "node-gyp-build@4.8.2" + } + }, "tslib@2.6.3": { "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dependencies": {} diff --git a/import_map.json b/import_map.json index b2267c7c5c..18025efb6a 100644 --- a/import_map.json +++ b/import_map.json @@ -13,6 +13,7 @@ "@std/io/": "jsr:/@std/io@^0.224.5/", "@std/path": "jsr:@std/path@^1.0.2", "@std/path/": "jsr:/@std/path@^1.0.2/", + "@std/text": "jsr:@std/text@^1.0.7", "@std/uuid": "jsr:@std/uuid@^1.0.1", "aws-sdk/client-s3": "https://esm.sh/@aws-sdk/client-s3@3.626.0?pin=v135", "aws-sdk/lib-storage": "https://esm.sh/@aws-sdk/lib-storage@3.626.0?pin=v135", @@ -40,6 +41,8 @@ "sentry": "npm:@sentry/node@7.70.0", "swc": "https://deno.land/x/swc@0.2.1/mod.ts", "swc/types": "https://esm.sh/@swc/core@1.3.87/types.d.ts?pin=v131", - "validator": "npm:validator@13.12.0" + "validator": "npm:validator@13.12.0", + "tree-sitter": "npm:tree-sitter@^0.21.1", + "tree-sitter-typescript": "npm:tree-sitter-typescript@^0.23.0" } } diff --git a/src/typegraph/python/typegraph/graph/params.py b/src/typegraph/python/typegraph/graph/params.py index 9f0ad301fc..e7bbdeb409 100644 --- a/src/typegraph/python/typegraph/graph/params.py +++ b/src/typegraph/python/typegraph/graph/params.py @@ -5,7 +5,6 @@ import json from typing import List, Optional, TYPE_CHECKING, Any from typegraph.gen import utils -from typegraph.gen.core import Rate as CoreRate from typegraph.sdk import sdk_utils if TYPE_CHECKING: diff --git a/src/typegraph/python/typegraph/t.py b/src/typegraph/python/typegraph/t.py index e4d1ed09a4..6273d7b092 100644 --- a/src/typegraph/python/typegraph/t.py +++ b/src/typegraph/python/typegraph/t.py @@ -579,7 +579,7 @@ def serialize_apply_param_node(node: ApplyParamNode) -> Any: if isinstance(node, (og_list, tuple)): return {"type": "array", "items": [serialize_apply_param_node(v) for v in node]} - raise ErrorStack(f"unexpected node type: node={node}") + raise Exception(f"unexpected node type: node={node}") class func(typedef): diff --git a/src/typegraph/python/typegraph/utils.py b/src/typegraph/python/typegraph/utils.py index 0b72f01f59..7c374b3381 100644 --- a/src/typegraph/python/typegraph/utils.py +++ b/src/typegraph/python/typegraph/utils.py @@ -9,7 +9,6 @@ from typegraph.gen.utils import ReduceEntry from typegraph.graph.shared_types import FinalizationResult, TypegraphOutput from typegraph.injection import InheritDef, serialize_static_injection -from typegraph.sdk import sdk_utils # def serialize_record_values(obj: Union[Dict[str, any], None]): # return [(k, json.dumps(v)) for k, v in obj.items()] if obj is not None else None diff --git a/src/typegraph/specs/codegen/deno.json b/src/typegraph/specs/codegen/deno.json deleted file mode 100644 index 0d4337cb02..0000000000 --- a/src/typegraph/specs/codegen/deno.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "tasks": { - "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/scripts/main.ts", - "test": "deno test --allow-env --allow-read --allow-ffi --allow-run" - }, - "imports": { - "@std/fs": "jsr:@std/fs@^1.0.4", - "@std/path": "jsr:@std/path@^1.0.6", - "@std/text": "jsr:@std/text@^1.0.7", - "tree-sitter": "npm:tree-sitter@^0.21.1", - "tree-sitter-typescript": "npm:tree-sitter-typescript@^0.23.0" - }, - "nodeModulesDir": "auto" -} diff --git a/src/typegraph/specs/codegen/deno.jsonc b/src/typegraph/specs/codegen/deno.jsonc new file mode 100644 index 0000000000..07b0c2cc5d --- /dev/null +++ b/src/typegraph/specs/codegen/deno.jsonc @@ -0,0 +1,6 @@ +{ + "tasks": { + "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/scripts/main.ts", + "test": "deno test --allow-env --allow-read --allow-ffi --allow-run", + }, +} diff --git a/src/typegraph/specs/codegen/deno.lock b/src/typegraph/specs/codegen/deno.lock deleted file mode 100644 index 625bdc8f1b..0000000000 --- a/src/typegraph/specs/codegen/deno.lock +++ /dev/null @@ -1,99 +0,0 @@ -{ - "version": "4", - "specifiers": { - "jsr:@std/assert@*": "1.0.6", - "jsr:@std/fs@*": "1.0.4", - "jsr:@std/fs@^1.0.4": "1.0.4", - "jsr:@std/internal@^1.0.4": "1.0.4", - "jsr:@std/path@*": "1.0.6", - "jsr:@std/path@^1.0.6": "1.0.6", - "jsr:@std/text@^1.0.7": "1.0.7", - "npm:@types/node@*": "22.5.4", - "npm:deasync@*": "0.1.30", - "npm:tree-sitter-typescript@0.23": "0.23.0_tree-sitter@0.21.1", - "npm:tree-sitter@~0.21.1": "0.21.1" - }, - "jsr": { - "@std/assert@1.0.6": { - "integrity": "1904c05806a25d94fe791d6d883b685c9e2dcd60e4f9fc30f4fc5cf010c72207", - "dependencies": [ - "jsr:@std/internal" - ] - }, - "@std/fs@1.0.4": { - "integrity": "2907d32d8d1d9e540588fd5fe0ec21ee638134bd51df327ad4e443aaef07123c", - "dependencies": [ - "jsr:@std/path@^1.0.6" - ] - }, - "@std/internal@1.0.4": { - "integrity": "62e8e4911527e5e4f307741a795c0b0a9e6958d0b3790716ae71ce085f755422" - }, - "@std/path@1.0.6": { - "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" - }, - "@std/text@1.0.7": { - "integrity": "344a820af99fde81ae1d4f9ce586da3f47a58cda25ac4c4dd688166cf5ed97f1" - } - }, - "npm": { - "@types/node@22.5.4": { - "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", - "dependencies": [ - "undici-types" - ] - }, - "bindings@1.5.0": { - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": [ - "file-uri-to-path" - ] - }, - "deasync@0.1.30": { - "integrity": "sha512-OaAjvEQuQ9tJsKG4oHO9nV1UHTwb2Qc2+fadB0VeVtD0Z9wiG1XPGLJ4W3aLhAoQSYTaLROFRbd5X20Dkzf7MQ==", - "dependencies": [ - "bindings", - "node-addon-api@1.7.2" - ] - }, - "file-uri-to-path@1.0.0": { - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "node-addon-api@1.7.2": { - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" - }, - "node-addon-api@8.2.1": { - "integrity": "sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==" - }, - "node-gyp-build@4.8.2": { - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==" - }, - "tree-sitter-typescript@0.23.0_tree-sitter@0.21.1": { - "integrity": "sha512-hRy5O9d+9ON4HxIWWxkI4zonrw2v/WNN1JoiGW5HkXfC9K2R3p53ugMvs6Vs4T7ASCwggsoQ75LNdgpExC/zgQ==", - "dependencies": [ - "node-addon-api@8.2.1", - "node-gyp-build", - "tree-sitter" - ] - }, - "tree-sitter@0.21.1": { - "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", - "dependencies": [ - "node-addon-api@8.2.1", - "node-gyp-build" - ] - }, - "undici-types@6.19.8": { - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - } - }, - "workspace": { - "dependencies": [ - "jsr:@std/fs@^1.0.4", - "jsr:@std/path@^1.0.6", - "jsr:@std/text@^1.0.7", - "npm:tree-sitter-typescript@0.23", - "npm:tree-sitter@~0.21.1" - ] - } -} diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 533f86b74f..8f03942ceb 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Elastic-2.0 import { SystemTypegraph } from "@metatype/typegate/system_typegraphs.ts"; -import { dirname, extname, join } from "@std/path"; +import { basename, dirname, extname, join } from "@std/path"; import { newTempDir, testDir } from "./dir.ts"; import { shell, ShellOptions } from "./shell.ts"; import { assertSnapshot } from "@std/testing/snapshot"; @@ -19,6 +19,10 @@ import { } from "@metatype/typegate/config.ts"; // until deno supports it... import { AsyncDisposableStack } from "dispose"; +import { Typegraph } from "@metatype/typegate/typegraph/types.ts"; +import { ArtifactUploader } from "@typegraph/sdk/tg_artifact_upload.ts"; +import { BasicAuth } from "@typegraph/sdk/tg_deploy.ts"; +import { exists } from "@std/fs/exists"; export interface ParseOptions { deploy?: boolean; @@ -195,11 +199,10 @@ export class MetaTest { await this.typegates.next().removeTypegraph(tgName); } - async #engineFromDeployed( - tgString: string, + async #engineFromTypegraph( + tg: Typegraph, secrets: Record, ): Promise { - const tg = await TypeGraph.parseJson(tgString); const { engine, response } = await this.typegate.pushTypegraph( tg, secrets, @@ -227,8 +230,27 @@ export class MetaTest { const output = stdout.trim(); const startIndex = output.search(/\{/); const tgString = output.slice(startIndex); + const tg = await TypeGraph.parseJson(tgString); + + const artifacts = Object.values(tg.meta.artifacts); + const tgUrl = `http://localhost:${this.port}`; + const tgName = TypeGraph.formatName(tg); + const auth = new BasicAuth("username", "password"); + const headers = new Headers(); + + if (artifacts.length > 0) { + const artifactUploader = new ArtifactUploader( + tgUrl, + artifacts, + tgName, + auth, + headers, + join(this.workingDir, path), + ); + await artifactUploader.uploadArtifacts(); + } - return await this.#engineFromDeployed(tgString, opts.secrets ?? {}); + return await this.#engineFromTypegraph(tg, opts.secrets ?? {}); } async unregister(engine: QueryEngine) { diff --git a/tools/jsr/deno2node.ts b/tools/jsr/deno2node.ts index 6354b95478..e12cc988e3 100644 --- a/tools/jsr/deno2node.ts +++ b/tools/jsr/deno2node.ts @@ -15,13 +15,11 @@ console.log("deno2node"); await dnt.emptyDir(outDir); const entryPoints: dnt.BuildOptions["entryPoints"] = [join(srcDir, "index.ts")]; -for ( - const { name, path } of expandGlobSync("./**/*.*", { - root: srcDir, - includeDirs: false, - globstar: true, - }) -) { +for (const { name, path } of expandGlobSync("./**/*.*", { + root: srcDir, + includeDirs: false, + globstar: true, +})) { if (path.endsWith(".d.ts")) { continue; } @@ -76,8 +74,6 @@ await dnt.build({ { [fromRoot("README.md")]: "README.md", [fromRoot("tools/LICENSE-MPL-2.0.md")]: "LICENSE.md", - [fromRoot("./src/typegraph/deno/src/gen/typegraph_core.core.wasm")]: - "./esm/gen/typegraph_core.core.wasm", }, ); }, diff --git a/tools/tasks/build.ts b/tools/tasks/build.ts index b285c7918c..7222227aa2 100644 --- a/tools/tasks/build.ts +++ b/tools/tasks/build.ts @@ -25,18 +25,17 @@ export default { }, "build-tgraph-core": { - inherit: ["_rust", "_wasm"], + inherit: ["_rust"], vars: { - WASM_FILE: "target/wasm/release/typegraph_core.wasm", + TG_CODEGEN: "src/typegraph/specs/codegen/tg-codegen", }, async fn($) { - const target = "wasm32-unknown-unknown"; - await $`cargo build -p typegraph_core --target ${target} --release --target-dir target/wasm`; - await $`cp target/wasm/${target}/release/typegraph_core.wasm $WASM_FILE.tmp`; - if ($.env["WASM_OPT"]) { - await $`wasm-opt -Oz $WASM_FILE.tmp -o $WASM_FILE.tmp`; - } - await $`wasm-tools component new $WASM_FILE.tmp -o $WASM_FILE`; + const genPath = await $.removeIfExists( + $.workingDir.join("src/typegraph/core/src/types/sdk"), + ); + + await $`chmod +x $TG_CODEGEN`; + await $`$TG_CODEGEN rust-lib ${genPath}`; }, }, "build-tgraph-ts": { @@ -47,9 +46,7 @@ export default { $.workingDir.join("src/typegraph/deno/src/gen"), ); - await $`jco transpile $WASM_FILE -o ${genPath} --map metatype:typegraph/host=../host/host.js`; - // FIXME: deno workspace discovery broken when - await $`bash -c "deno run -A tools/jsr/fix-declarations.ts"`; + await $`$TG_CODEGEN typescript ${genPath}`; }, }, "build-tgraph-ts-node": { @@ -68,10 +65,11 @@ export default { dependsOn: "build-tgraph-core", inherit: ["build-tgraph-core", "_python"], async fn($) { - await $.removeIfExists( - $.workingDir.join("typegraph/python/typegraph/gen"), + const genPath = await $.removeIfExists( + $.workingDir.join("src/typegraph/python/typegraph/gen"), ); - await $`poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir src/typegraph/python/typegraph/gen`; + + await $`$TG_CODEGEN python ${genPath}`; await $`poetry run ruff check src/typegraph/python/typegraph`; }, }, From a2c02cb1f894f72882733096fa1a6f827cbb4a9c Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 5 Nov 2024 14:53:03 +0300 Subject: [PATCH 09/39] fix: remove wasm related ops --- .github/workflows/tests.yml | 4 +- src/typegraph/deno/deno.json | 1 - tests/metagen/metagen_test.ts | 2 +- tools/jsr/fix-declarations.ts | 98 ----------------------------------- 4 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 tools/jsr/fix-declarations.ts diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3c5d487d82..7166bc4395 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -281,12 +281,12 @@ jobs: source .venv/bin/activate # this doesn't publish it but only builds it - WASM_OPT=1 ghjk x build-tgraph-ts + ghjk x build-tgraph-ts # start the docker containers ghjk x dev-compose base prisma grpc subredis - WASM_OPT=1 ghjk x build-tgraph + ghjk x build-tgraph ghjk x install-ts diff --git a/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index 1326072fc4..0efa70db8e 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -9,7 +9,6 @@ "./deps/mod.ts": "./src/deps/mod.ts", "./effects.ts": "./src/effects.ts", "./envs/cli.ts": "./src/envs/cli.ts", - "./gen/typegraph_core.d.ts": "./src/gen/typegraph_core.d.ts", "./host/host.d.ts": "./src/host/host.d.ts", "./index.ts": "./src/index.ts", "./io.ts": "./src/io.ts", diff --git a/tests/metagen/metagen_test.ts b/tests/metagen/metagen_test.ts index 12ad310f80..e5859f370d 100644 --- a/tests/metagen/metagen_test.ts +++ b/tests/metagen/metagen_test.ts @@ -11,7 +11,7 @@ import { testDir } from "test-utils/dir.ts"; import $ from "@david/dax"; import { z as zod } from "zod"; import { workspaceDir } from "test-utils/dir.ts"; -import { FdkOutput } from "@typegraph/sdk/gen/typegraph_core.d.ts"; +import { FdkOutput } from "@typegraph/sdk/gen/utils.ts"; const denoJson = resolve(testDir, "./deno.jsonc"); diff --git a/tools/jsr/fix-declarations.ts b/tools/jsr/fix-declarations.ts deleted file mode 100644 index 286bb7bd49..0000000000 --- a/tools/jsr/fix-declarations.ts +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -import { dirname, fromFileUrl, resolve } from "@std/path"; -import { expandGlob } from "@std/fs"; -import { join, relative } from "../deps.ts"; -import { denoSdkDir } from "./common.ts"; - -export const thisDir = dirname(fromFileUrl(import.meta.url)); - -type Replacer = { - path: string; - op: (s: string) => string; -}; - -const basePath = "../../src/typegraph/deno/src/gen"; - -const replacements = [ - // Imports should refer to the actual file - ...(await Array.fromAsync( - expandGlob(join(basePath, "/**/*.d.ts"), { - root: thisDir, - includeDirs: false, - globstar: true, - }), - )).map(({ path }) => ({ - path, - op: (s: string) => s.replace(/^(import .*)(\.js)\';$/, "$1.d.ts';"), - })), - // Remove exports aliases - { - path: resolve(thisDir, basePath, "typegraph_core.js"), - op: (s: string) => s.replaceAll(/,\s*\w+ as '[\w:\/]+'/g, ""), - }, - // Normalize native node imports - { - path: resolve(thisDir, basePath, "typegraph_core.js"), - op: (s: string) => - s.replaceAll(/["']fs\/promises["']/g, "'node:fs/promises'"), - }, -] as Array; - -console.log("Fixing declarations.."); -for (const { path, op } of replacements) { - const text = await Deno.readTextFile(path); - const rewrite = [...text.split("\n")]; - - for (let i = 0; i < rewrite.length; i += 1) { - rewrite[i] = op(rewrite[i]); - } - - const newText = rewrite.join("\n"); - if (text != newText) { - console.log(` Fixed generated code at ${relative(thisDir, path)}`); - await Deno.writeTextFile(path, newText); - } -} - -console.log("Merge types"); -// Merge everything at interfaces/* -const merged = (await Array.fromAsync( - expandGlob(join(basePath, "/interfaces/*.d.ts"), { - root: thisDir, - includeDirs: false, - globstar: true, - }), -)).reduce((curr, { path }) => { - console.log(` < ${path}`); - const next = ` -// ${relative(denoSdkDir, path)} -${ - Deno.readTextFileSync(path) - .replaceAll(/import type {.+} from ['"].+\.d\.ts['"];/g, (m) => `// ${m}`) - .replaceAll(/export {.+};/g, (m) => `// ${m}`) - } -`; - return curr + next; -}, ""); - -// Dump everything into typegraph_core.d.ts -// As of jco 1.2.4, typegraph_core.d.ts simply re-exports the types from interfaces/*.d.ts -const hintMainPath = join(thisDir, basePath, "/typegraph_core.d.ts"); -let mergedContent = ` -// interfaces begin -${merged} -// interfaces end - -// common -`; - -const dupDecl = ["export type TypeId = number;"]; -for (const dup of dupDecl) { - mergedContent = mergedContent.replaceAll(dup, ""); -} -mergedContent += `\n${dupDecl.join("\n")}`; - -await Deno.writeTextFile(hintMainPath, mergedContent); -await Deno.remove(join(thisDir, basePath, "/interfaces"), { recursive: true }); From 70375bbf05a1f1f93da44ee3ec7d6a242caa03b9 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 5 Nov 2024 17:22:25 +0300 Subject: [PATCH 10/39] fix: TS client --- .../specs/codegen/rpc/typescript/client.ts | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index c5468e8493..0555f23f34 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -15,20 +15,26 @@ type RpcResponse = { id: number | string; }; -function camelToSnakeCase(obj: Record): Record { - const result: Record = {}; - - for (const [key, value] of Object.entries(obj)) { - const snakeKey = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase(); - - if (value && typeof value === "object" && !Array.isArray(value)) { - result[snakeKey] = camelToSnakeCase(value); - } else { - result[snakeKey] = value; +function camelToSnakeCase(obj: any): any { + if (Array.isArray(obj)) { + return obj.map(camelToSnakeCase); + } else if (obj && typeof obj === "object") { + const result: Record = {}; + + for (const [key, value] of Object.entries(obj)) { + const snakeKey = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase(); + + if (value && typeof value === "object") { + result[snakeKey] = camelToSnakeCase(value); + } else { + result[snakeKey] = value; + } } + + return result; } - return result; + return obj; } function rpcRequest(method: string, params?: P) { From 76a2064720c6733f48b134d1760c3ecf6b7a31bf Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 5 Nov 2024 19:11:21 +0300 Subject: [PATCH 11/39] fix: bad mappings --- examples/typegraphs/execute.py | 5 ++--- src/typegraph/deno/deno.json | 1 - src/typegraph/deno/src/types.ts | 2 +- .../python/typegraph/runtimes/grpc.py | 2 +- src/typegraph/python/typegraph/runtimes/kv.py | 2 +- .../python/typegraph/runtimes/substantial.py | 2 +- .../specs/codegen/rpc/typescript/client.ts | 19 ++++++++----------- .../specs/codegen/src/lib/typescript.ts | 2 +- tests/runtimes/prisma/full_prisma_mapping.py | 5 ++--- 9 files changed, 17 insertions(+), 23 deletions(-) diff --git a/examples/typegraphs/execute.py b/examples/typegraphs/execute.py index ed46b99712..b0d695793a 100644 --- a/examples/typegraphs/execute.py +++ b/examples/typegraphs/execute.py @@ -1,8 +1,7 @@ -from typegraph import typegraph, Policy, t, Graph +from typegraph import typegraph, Policy, t, Graph, fx from typegraph.runtimes.deno import DenoRuntime from typegraph.graph.params import Auth from typegraph.providers.prisma import PrismaRuntime -from typegraph.gen.exports.runtimes import EffectUpdate from typegraph.graph.params import Cors @@ -82,7 +81,7 @@ def roadmap(g: Graph): "importance": t.enum(["medium", "important", "critical"]), } ), - EffectUpdate(True), + fx.update(True), ), get_context=deno.identity(t.struct({"username": t.string().optional()})).apply( { diff --git a/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index 0efa70db8e..9aae1cb4c9 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -9,7 +9,6 @@ "./deps/mod.ts": "./src/deps/mod.ts", "./effects.ts": "./src/effects.ts", "./envs/cli.ts": "./src/envs/cli.ts", - "./host/host.d.ts": "./src/host/host.d.ts", "./index.ts": "./src/index.ts", "./io.ts": "./src/io.ts", "./metagen.ts": "./src/metagen.ts", diff --git a/src/typegraph/deno/src/types.ts b/src/typegraph/deno/src/types.ts index 98ecde2237..feaa4b3792 100644 --- a/src/typegraph/deno/src/types.ts +++ b/src/typegraph/deno/src/types.ts @@ -69,7 +69,7 @@ export function getPolicyChain( } return { - per_effect: mapValues( + perEffect: mapValues( p instanceof PolicyPerEffectObject ? p.value : p, (v: any) => v._id, ) as unknown as PolicyPerEffect, diff --git a/src/typegraph/python/typegraph/runtimes/grpc.py b/src/typegraph/python/typegraph/runtimes/grpc.py index b1f90fa698..5c1d847d33 100644 --- a/src/typegraph/python/typegraph/runtimes/grpc.py +++ b/src/typegraph/python/typegraph/runtimes/grpc.py @@ -19,4 +19,4 @@ def __init__(self, proto_file: str, endpoint: str): def call(self, method: str): data = GrpcData(method) func_data = runtimes.call_grpc_method(self.id, data) - return t.func.from_type_func(func_data.value) + return t.func.from_type_func(func_data) diff --git a/src/typegraph/python/typegraph/runtimes/kv.py b/src/typegraph/python/typegraph/runtimes/kv.py index 69b16bd5bf..e7e280e508 100644 --- a/src/typegraph/python/typegraph/runtimes/kv.py +++ b/src/typegraph/python/typegraph/runtimes/kv.py @@ -25,7 +25,7 @@ def __init__(self, url: str): def get(self): mat = self.__operation("get", fx.read()) - return t.func(t.struct({"key": t.string()}), t.string(), mat) + return t.func(t.struct({"key": t.string()}), t.string().optional(), mat) def set(self): mat = self.__operation("set", fx.update()) diff --git a/src/typegraph/python/typegraph/runtimes/substantial.py b/src/typegraph/python/typegraph/runtimes/substantial.py index d77cb75e30..f0dacb702a 100644 --- a/src/typegraph/python/typegraph/runtimes/substantial.py +++ b/src/typegraph/python/typegraph/runtimes/substantial.py @@ -52,7 +52,7 @@ def _generic_substantial_func( ) func_data = runtimes.generate_substantial_operation(self.id, data) - return t.func.from_type_func(func_data.value) + return t.func.from_type_func(func_data) def start(self, kwargs: "t.struct"): return self._generic_substantial_func("start", kwargs, None) diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 0555f23f34..92d537fbd1 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -1,3 +1,5 @@ +import { toCamelCase, toSnakeCase } from "@std/text"; + const BUFFER_SIZE = 1024; const state = { id: 0 }; @@ -15,20 +17,15 @@ type RpcResponse = { id: number | string; }; -function camelToSnakeCase(obj: any): any { +function transformKeys(obj: any, convertKey: (key: string) => string): any { if (Array.isArray(obj)) { - return obj.map(camelToSnakeCase); + return obj.map((item) => transformKeys(item, convertKey)); } else if (obj && typeof obj === "object") { const result: Record = {}; for (const [key, value] of Object.entries(obj)) { - const snakeKey = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase(); - - if (value && typeof value === "object") { - result[snakeKey] = camelToSnakeCase(value); - } else { - result[snakeKey] = value; - } + const newKey = convertKey(key); + result[newKey] = transformKeys(value, convertKey); } return result; @@ -41,7 +38,7 @@ function rpcRequest(method: string, params?: P) { const request = { jsonrpc: "2.0", method, - params: params && camelToSnakeCase(params), + params: params && transformKeys(params, toSnakeCase), id: state.id, }; @@ -68,7 +65,7 @@ function rpcRequest(method: string, params?: P) { throw new Error(response.error.message); } - return response.result as R; + return transformKeys(response.result, toCamelCase) as R; } export { rpcRequest }; diff --git a/src/typegraph/specs/codegen/src/lib/typescript.ts b/src/typegraph/specs/codegen/src/lib/typescript.ts index 32cd589078..65bcc77e90 100644 --- a/src/typegraph/specs/codegen/src/lib/typescript.ts +++ b/src/typegraph/specs/codegen/src/lib/typescript.ts @@ -57,7 +57,7 @@ ${def.props override formatUnionTypeDef(def: UnionTypeDef): string { return `export type ${def.ident} = -${def.variants.map((v) => ` | ${v.value ? `{ ${v.tag}: ${v.value} }` : `"${v.tag}"`}`).join("\n")};`; +${def.variants.map((v) => ` | ${v.value ? `{ ${toCamelCase(v.tag)}: ${v.value} }` : `"${v.tag}"`}`).join("\n")};`; } override formatFuncDef(def: FuncDef) { diff --git a/tests/runtimes/prisma/full_prisma_mapping.py b/tests/runtimes/prisma/full_prisma_mapping.py index 9f28a25528..d1183c4cce 100644 --- a/tests/runtimes/prisma/full_prisma_mapping.py +++ b/tests/runtimes/prisma/full_prisma_mapping.py @@ -1,5 +1,4 @@ -from typegraph import typegraph, Policy, t, Graph -from typegraph.gen.runtimes import EffectUpdate +from typegraph import typegraph, Policy, t, Graph, fx from typegraph.providers.prisma import PrismaRuntime @@ -100,7 +99,7 @@ def full_prisma_mapping(g: Graph): "replacement": t.string(), } ), - EffectUpdate(True), + fx.update(True), ), # https://www.postgresql.org/docs/10/functions-subquery.html # expr = ANY(array) equiv. to expr IN (array[0], array[1], ..) From 4de71987d873a8f648ead4278e1b4bd193036221 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 5 Nov 2024 20:58:50 +0300 Subject: [PATCH 12/39] fix: wasm tests --- tests/runtimes/wasm_reflected/wasm_sync_test.ts | 6 +++--- tests/runtimes/wasm_wire/wasm_sync_test.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/runtimes/wasm_reflected/wasm_sync_test.ts b/tests/runtimes/wasm_reflected/wasm_sync_test.ts index 4e317dea61..2019a7bc62 100644 --- a/tests/runtimes/wasm_reflected/wasm_sync_test.ts +++ b/tests/runtimes/wasm_reflected/wasm_sync_test.ts @@ -63,11 +63,11 @@ Meta.test( "runtimes/wasm_reflected/wasm_reflected.ts", ); const s3 = new S3Client(syncConfig.s3); - assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 3); + assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 2); const s3Objects = await listObjects(s3, syncConfig.s3Bucket); // two objects, the artifact and the typegraph - assertEquals(s3Objects?.length, 3); + assertEquals(s3Objects?.length, 2); await gql` query { @@ -88,7 +88,7 @@ Meta.test( const s3 = new S3Client(syncConfig.s3); // typegraphs are pushed to s3 whenever pushed to a typegate - assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 3); + assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 2); const engine = await metaTest.engine( "runtimes/wasm_reflected/wasm_reflected.ts", diff --git a/tests/runtimes/wasm_wire/wasm_sync_test.ts b/tests/runtimes/wasm_wire/wasm_sync_test.ts index d22f4a9240..d17beaead9 100644 --- a/tests/runtimes/wasm_wire/wasm_sync_test.ts +++ b/tests/runtimes/wasm_wire/wasm_sync_test.ts @@ -65,7 +65,7 @@ Meta.test( const s3Objects = await listObjects(s3, syncConfig.s3Bucket); // two objects, the artifact and the typegraph - assertEquals(s3Objects?.length, 3); + assertEquals(s3Objects?.length, 2); await gql` query { @@ -85,7 +85,7 @@ Meta.test( await metaTest.should("work with multiple typegate instances", async () => { const s3 = new S3Client(syncConfig.s3); - assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 3); + assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 2); const engine = await metaTest.engine("runtimes/wasm_wire/wasm_wire.ts"); From dc7c676bdb76d1898c6e76b0b3a2e15c8a6c6eb9 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 6 Nov 2024 06:11:01 +0300 Subject: [PATCH 13/39] fix: tg-build --- src/typegraph/specs/codegen/rpc/typescript/client.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 92d537fbd1..682337268a 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -1,5 +1,3 @@ -import { toCamelCase, toSnakeCase } from "@std/text"; - const BUFFER_SIZE = 1024; const state = { id: 0 }; @@ -17,6 +15,14 @@ type RpcResponse = { id: number | string; }; +function toCamelCase(str: string) { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); +} + +function toSnakeCase(str: string) { + return str.replace(/([A-Z])/g, "_$1").toLowerCase(); +} + function transformKeys(obj: any, convertKey: (key: string) => string): any { if (Array.isArray(obj)) { return obj.map((item) => transformKeys(item, convertKey)); From e3bc70881f02070330e68a27ace5fc915874b35a Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 6 Nov 2024 07:11:32 +0300 Subject: [PATCH 14/39] fix: node support --- .../specs/codegen/rpc/typescript/client.ts | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 682337268a..eccbd57e06 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -1,6 +1,10 @@ +import fs from "node:fs"; +import { Buffer } from "node:buffer"; + const BUFFER_SIZE = 1024; const state = { id: 0 }; +const isDeno = !Deno.version.v8.includes("node"); const encoder = new TextEncoder(); const decoder = new TextDecoder(); @@ -40,6 +44,30 @@ function transformKeys(obj: any, convertKey: (key: string) => string): any { return obj; } +function readResponse() { + const buffer = Buffer.alloc(BUFFER_SIZE); + + let bytesRead = null; + let content = Buffer.alloc(0); + + if (isDeno) { + do { + bytesRead = Deno.stdin.readSync(buffer) ?? 0; + content = Buffer.concat([content, buffer.subarray(0, bytesRead)]); + } while (bytesRead == BUFFER_SIZE); + } else { + const fd = fs.openSync("/dev/stdin", "r"); + do { + bytesRead = fs.readSync(fd, buffer) ?? 0; + content = Buffer.concat([content, buffer.subarray(0, bytesRead)]); + } while (bytesRead == BUFFER_SIZE); + + fs.closeSync(fd); + } + + return decoder.decode(content); +} + function rpcRequest(method: string, params?: P) { const request = { jsonrpc: "2.0", @@ -54,24 +82,14 @@ function rpcRequest(method: string, params?: P) { Deno.stdout.writeSync(message); state.id += 1; - const buffer = new Uint8Array(BUFFER_SIZE); - - let bytesRead = null; - let content = new Uint8Array(0); - - do { - bytesRead = Deno.stdin.readSync(buffer) ?? 0; - content = new Uint8Array([...content, ...buffer.subarray(0, bytesRead)]); - } while (bytesRead == BUFFER_SIZE); - - const decoded = decoder.decode(content); - const response: RpcResponse = JSON.parse(decoded); + const response = readResponse(); + const jsonResponse: RpcResponse = JSON.parse(response); - if (response.error) { - throw new Error(response.error.message); + if (jsonResponse.error) { + throw new Error(jsonResponse.error.message); } - return transformKeys(response.result, toCamelCase) as R; + return transformKeys(jsonResponse.result, toCamelCase) as R; } export { rpcRequest }; From 5129994120746bb3f87cf00b9a4b40cc2d5ae7cd Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 6 Nov 2024 11:00:44 +0300 Subject: [PATCH 15/39] fix: cli stuff --- src/meta-cli/src/cli/deploy.rs | 3 ++- src/meta-cli/src/cli/serialize.rs | 3 ++- tests/utils/test.ts | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/meta-cli/src/cli/deploy.rs b/src/meta-cli/src/cli/deploy.rs index fffa187e3c..e1ae254975 100644 --- a/src/meta-cli/src/cli/deploy.rs +++ b/src/meta-cli/src/cli/deploy.rs @@ -78,8 +78,9 @@ pub struct DeployOptions { #[clap(skip = None)] pub typegate_options: Option, + /// FIXME: restructure the typegraph core to handle multiple threads /// maximum number of concurrent deployment tasks - #[clap(long)] + #[clap(skip = None)] pub threads: Option, /// max retry count diff --git a/src/meta-cli/src/cli/serialize.rs b/src/meta-cli/src/cli/serialize.rs index 37b6dc7469..96ee4db8af 100644 --- a/src/meta-cli/src/cli/serialize.rs +++ b/src/meta-cli/src/cli/serialize.rs @@ -43,7 +43,8 @@ pub struct Serialize { #[clap(short, long)] prefix: Option, - #[clap(long)] + /// FIXME: restructure the typegraph core to handle multiple threads + #[clap(skip = None)] max_parallel_loads: Option, } diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 8f03942ceb..4d5ec0e30a 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -232,6 +232,9 @@ export class MetaTest { const tgString = output.slice(startIndex); const tg = await TypeGraph.parseJson(tgString); + // FIXME: hack waiting for MET-738 or a better way to create an engine + tg.meta.prefix = opts.prefix; + const artifacts = Object.values(tg.meta.artifacts); const tgUrl = `http://localhost:${this.port}`; const tgName = TypeGraph.formatName(tg); From 530446d351efd0ff41ea1f3009e76864266f9c04 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 6 Nov 2024 19:19:22 +0300 Subject: [PATCH 16/39] fix: fs operations & python lockfile --- src/typegraph/core/src/utils/fs.rs | 8 +++- src/typegraph/python/poetry.lock | 65 +---------------------------- src/typegraph/python/pyproject.toml | 1 - 3 files changed, 8 insertions(+), 66 deletions(-) diff --git a/src/typegraph/core/src/utils/fs.rs b/src/typegraph/core/src/utils/fs.rs index be0b3a8193..abf4027cf5 100644 --- a/src/typegraph/core/src/utils/fs.rs +++ b/src/typegraph/core/src/utils/fs.rs @@ -143,7 +143,13 @@ impl FsContext { .flat_map(|pat| Regex::new(pat)) .collect::>(); - self.expand_path_helper(root, &exclude, &mut results)?; + if root.is_file() { + let path_buf = root.to_path_buf(); + let path_str = path_buf.to_string_lossy().to_string(); + results.push(path_str); + } else { + self.expand_path_helper(root, &exclude, &mut results)?; + } Ok(results) } diff --git a/src/typegraph/python/poetry.lock b/src/typegraph/python/poetry.lock index eddd6177c8..bc6621579f 100644 --- a/src/typegraph/python/poetry.lock +++ b/src/typegraph/python/poetry.lock @@ -26,28 +26,6 @@ files = [ six = ">=1.6.1,<2.0" wheel = ">=0.23.0,<1.0" -[[package]] -name = "importlib-resources" -version = "6.4.5" -description = "Read resources from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717"}, - {file = "importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065"}, -] - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] -type = ["pytest-mypy"] - [[package]] name = "pydantic" version = "2.9.2" @@ -229,28 +207,6 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -[[package]] -name = "wasmtime" -version = "25.0.0" -description = "A WebAssembly runtime powered by Wasmtime" -optional = false -python-versions = ">=3.8" -files = [ - {file = "wasmtime-25.0.0-py3-none-any.whl", hash = "sha256:22aa59fc6e01deec8a6703046f82466090d5811096a3bb5c169907e36c842af1"}, - {file = "wasmtime-25.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:13e9a718e9d580c1738782cc19f4dcb9fb068f7e51778ea621fd664f4433525b"}, - {file = "wasmtime-25.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5bdf1214ee3ee78a4a8a92da339f4c4c8c109e65af881b37f4adfc05d02af426"}, - {file = "wasmtime-25.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:b4364e14d44e3b7afe6a40bf608e9d0d2c40b09dece441d20f4f6e31906b729c"}, - {file = "wasmtime-25.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:a07445073cf36a6e5d1dc28246a897dcbdaa537ba8be8805be65422ecca297eb"}, - {file = "wasmtime-25.0.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:53d5f614348a28aabdf80ae4f6fdfa803031af1f74ada03826fd4fd43aeee6c8"}, - {file = "wasmtime-25.0.0-py3-none-win_amd64.whl", hash = "sha256:f8a2a213b9179965db2d2eedececd69a37e287e902330509afae51c71a3a6842"}, -] - -[package.dependencies] -importlib-resources = ">=5.10" - -[package.extras] -testing = ["componentize-py", "coverage", "pycparser", "pytest", "pytest-mypy"] - [[package]] name = "wheel" version = "0.44.0" @@ -265,26 +221,7 @@ files = [ [package.extras] test = ["pytest (>=6.0.0)", "setuptools (>=65)"] -[[package]] -name = "zipp" -version = "3.20.2" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, - {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] -type = ["pytest-mypy"] - [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "65e0405fc1e8bd21af3dd733f5ffdf62de392fb7c78ed0037d4b8206aab3ccda" +content-hash = "16dbdf60f5d67f14a59495193491cd19bd47d020ced76a6e6a358786758114ca" diff --git a/src/typegraph/python/pyproject.toml b/src/typegraph/python/pyproject.toml index 5450ce8d91..7fcb2c5317 100644 --- a/src/typegraph/python/pyproject.toml +++ b/src/typegraph/python/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<4.0" -wasmtime = "^25.0.0" typing-extensions = "^4.8.0" python-box = "^7.1.1" astunparse = "^1.6.3" From 122ca738cdd71f2979eaf45e5e767aed16bd72df Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 6 Nov 2024 22:29:44 +0300 Subject: [PATCH 17/39] fix: python sync test --- tests/runtimes/python/python_sync_test.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/runtimes/python/python_sync_test.ts b/tests/runtimes/python/python_sync_test.ts index 0ad6a0c522..90e19feefa 100644 --- a/tests/runtimes/python/python_sync_test.ts +++ b/tests/runtimes/python/python_sync_test.ts @@ -62,8 +62,8 @@ Meta.test( const engine = await metaTest.engine("runtimes/python/python.ts"); const s3Objects = await listObjects(s3, syncConfig.s3Bucket); - // two objects, 2 artifacts and the 2 typegraphs; why 2 typegraphs?? - assertEquals(s3Objects?.length, 4); + // two objects, 2 artifacts and 1 typegraph + assertEquals(s3Objects?.length, 3); await gql` query { @@ -186,7 +186,7 @@ Meta.test( .expectData({ test: `test${i}`, }) - .on(e) + .on(e), ); const start = performance.now(); @@ -304,8 +304,7 @@ Meta.test( Meta.test( { - name: - "PythonRuntime - Python SDK: typegraph with no artifacts in sync mode", + name: "PythonRuntime - Python SDK: typegraph with no artifacts in sync mode", sanitizeOps: false, syncConfig, async setup() { @@ -383,8 +382,7 @@ Meta.test( Meta.test( { - name: - "Python - Python SDK: typegraph with duplicate artifact uploads in sync mode", + name: "Python - Python SDK: typegraph with duplicate artifact uploads in sync mode", sanitizeOps: false, syncConfig, async setup() { @@ -418,8 +416,7 @@ Meta.test( Meta.test( { - name: - "Python Runtime - TS SDK: typegraph with duplicate artifact uploads in sync mode", + name: "Python Runtime - TS SDK: typegraph with duplicate artifact uploads in sync mode", sanitizeOps: false, syncConfig, async setup() { From fd3942f39d9d5b6adc76fa6c4589cc7e6c6041c0 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 11 Nov 2024 17:20:58 +0300 Subject: [PATCH 18/39] wip: temporary fixes --- .../how-tos/prog_deploy/prog_deploy_test.ts | 136 +++++++++--------- tests/e2e/nextjs/typegraph/apollo.py | 2 +- tests/e2e/self_deploy/self_deploy_test.ts | 53 +++---- 3 files changed, 97 insertions(+), 94 deletions(-) diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts index e9f11bdbee..9fa257707c 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts @@ -11,41 +11,42 @@ Meta.test( name: "Programmatic deployment test - Python SDK", }, async (t: MetaTest) => { - const port = t.port; - const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); - - await t.should("deploy python typegraph to typegate", async () => { - const pythonDeploy = path.join(scriptsPath, "prog_deploy.py"); - const deployCommand = [ - ...(Deno.env.get("MCLI_LOADER_PY")?.split(" ") ?? ["python3"]), - pythonDeploy, - scriptsPath, - port.toString(), - ]; - const deployResult = await t.shell(deployCommand); - if (deployResult.code !== 0) { - console.error("Typegraph Deploy Script Failed: ", deployResult.stderr); - } - - assertExists(deployResult.stdout, "Typegraph is serialized"); - }); - - await t.should("remove typegraph from typegate", async () => { - const pythonRemove = path.join(scriptsPath, "prog_remove.py"); - const removeCommand = [ - ...(Deno.env.get("MCLI_LOADER_PY")?.split(" ") ?? ["python3"]), - pythonRemove, - port.toString(), - ]; - const removeResult = await t.shell(removeCommand); - if (removeResult.code !== 0) { - console.error("Typegraph Remove Script Failed: ", removeResult.stderr); - } - assertEquals( - removeResult.stdout, - "{'data': {'removeTypegraphs': True}}\n", - ); - }); + throw new Error("Unimplemented"); + //const port = t.port; + //const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); + // + //await t.should("deploy python typegraph to typegate", async () => { + // const pythonDeploy = path.join(scriptsPath, "prog_deploy.py"); + // const deployCommand = [ + // ...(Deno.env.get("MCLI_LOADER_PY")?.split(" ") ?? ["python3"]), + // pythonDeploy, + // scriptsPath, + // port.toString(), + // ]; + // const deployResult = await t.shell(deployCommand); + // if (deployResult.code !== 0) { + // console.error("Typegraph Deploy Script Failed: ", deployResult.stderr); + // } + // + // assertExists(deployResult.stdout, "Typegraph is serialized"); + //}); + // + //await t.should("remove typegraph from typegate", async () => { + // const pythonRemove = path.join(scriptsPath, "prog_remove.py"); + // const removeCommand = [ + // ...(Deno.env.get("MCLI_LOADER_PY")?.split(" ") ?? ["python3"]), + // pythonRemove, + // port.toString(), + // ]; + // const removeResult = await t.shell(removeCommand); + // if (removeResult.code !== 0) { + // console.error("Typegraph Remove Script Failed: ", removeResult.stderr); + // } + // assertEquals( + // removeResult.stdout, + // "{'data': {'removeTypegraphs': True}}\n", + // ); + //}); }, ); @@ -54,37 +55,38 @@ Meta.test( name: "Programmatic deployment test - TS SDK", }, async (t: MetaTest) => { - const port = t.port; - const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); - - await t.should("deploy typegraph to typegate", async () => { - const tsDeploy = path.join(scriptsPath, "prog_deploy.ts"); - const deployCommand = [ - "deno", - "run", - "-A", - tsDeploy, - scriptsPath, - port.toString(), - ]; - const deployResult = await t.shell(deployCommand); - if (deployResult.code !== 0) { - console.error("Typegraph Deploy Script Failed: ", deployResult.stderr); - } - assertExists(deployResult.stdout, "Typegraph is serialized"); - }); - - await t.should("remove typegraph from typegate", async () => { - const tsRemove = path.join(scriptsPath, "prog_remove.ts"); - const removeCommand = ["deno", "run", "-A", tsRemove, port.toString()]; - const removeResult = await t.shell(removeCommand); - if (removeResult.code !== 0) { - console.error("Typegraph Remove Script Failed: ", removeResult.stderr); - } - assertEquals( - removeResult.stdout, - "{ data: { removeTypegraphs: true } }\n", - ); - }); + throw new Error("Unimplemented"); + //const port = t.port; + //const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); + // + //await t.should("deploy typegraph to typegate", async () => { + // const tsDeploy = path.join(scriptsPath, "prog_deploy.ts"); + // const deployCommand = [ + // "deno", + // "run", + // "-A", + // tsDeploy, + // scriptsPath, + // port.toString(), + // ]; + // const deployResult = await t.shell(deployCommand); + // if (deployResult.code !== 0) { + // console.error("Typegraph Deploy Script Failed: ", deployResult.stderr); + // } + // assertExists(deployResult.stdout, "Typegraph is serialized"); + //}); + // + //await t.should("remove typegraph from typegate", async () => { + // const tsRemove = path.join(scriptsPath, "prog_remove.ts"); + // const removeCommand = ["deno", "run", "-A", tsRemove, port.toString()]; + // const removeResult = await t.shell(removeCommand); + // if (removeResult.code !== 0) { + // console.error("Typegraph Remove Script Failed: ", removeResult.stderr); + // } + // assertEquals( + // removeResult.stdout, + // "{ data: { removeTypegraphs: true } }\n", + // ); + //}); }, ); diff --git a/tests/e2e/nextjs/typegraph/apollo.py b/tests/e2e/nextjs/typegraph/apollo.py index fcf770f934..58b36006e1 100644 --- a/tests/e2e/nextjs/typegraph/apollo.py +++ b/tests/e2e/nextjs/typegraph/apollo.py @@ -3,7 +3,7 @@ from typegraph.providers.aws import S3Runtime -@typegraph(cors=Cors(allow_origin="*")) +@typegraph(cors=Cors(allow_origin=["*"])) def apollo(g: Graph): public = Policy.public() diff --git a/tests/e2e/self_deploy/self_deploy_test.ts b/tests/e2e/self_deploy/self_deploy_test.ts index 933cee8668..7f16178984 100644 --- a/tests/e2e/self_deploy/self_deploy_test.ts +++ b/tests/e2e/self_deploy/self_deploy_test.ts @@ -14,31 +14,32 @@ Meta.test( name: "deploy and undeploy typegraph without meta-cli", }, async (t) => { - const gate = `http://localhost:${t.port}`; - const auth = new BasicAuth("admin", "password"); - const cwdDir = join(testDir, "e2e", "self_deploy"); - - const { serialized, response: gateResponseAdd } = await tgDeploy(tg, { - typegate: { url: gate, auth }, - secrets: {}, - typegraphPath: path.join(cwdDir, "self_deploy.mjs"), - migrationsDir: `${cwdDir}/prisma-migrations`, - defaultMigrationAction: { - apply: true, - create: true, - reset: false, - }, - }); - assertExists(serialized, "serialized has a value"); - assertEquals(gateResponseAdd, { - name: "self-deploy", - messages: [], - migrations: [], - }); - // pass the typegraph name - const { typegate: gateResponseRem } = await tgRemove(tg.name, { - typegate: { url: gate, auth }, - }); - assertEquals(gateResponseRem, { data: { removeTypegraphs: true } }); + throw new Error("Unimplemented"); + //const gate = `http://localhost:${t.port}`; + //const auth = new BasicAuth("admin", "password"); + //const cwdDir = join(testDir, "e2e", "self_deploy"); + // + //const { serialized, response: gateResponseAdd } = await tgDeploy(tg, { + // typegate: { url: gate, auth }, + // secrets: {}, + // typegraphPath: path.join(cwdDir, "self_deploy.mjs"), + // migrationsDir: `${cwdDir}/prisma-migrations`, + // defaultMigrationAction: { + // apply: true, + // create: true, + // reset: false, + // }, + //}); + //assertExists(serialized, "serialized has a value"); + //assertEquals(gateResponseAdd, { + // name: "self-deploy", + // messages: [], + // migrations: [], + //}); + //// pass the typegraph name + //const { typegate: gateResponseRem } = await tgRemove(tg.name, { + // typegate: { url: gate, auth }, + //}); + //assertEquals(gateResponseRem, { data: { removeTypegraphs: true } }); }, ); From ad4070b211d4f2e5c227f0aeeac51e7b6fd24aa5 Mon Sep 17 00:00:00 2001 From: Natoandro Date: Tue, 12 Nov 2024 13:40:06 +0300 Subject: [PATCH 19/39] fix prisma_test.ts, fix pre-commit --- .gitignore | 1 - .pre-commit-config.yaml | 1 + poetry.lock | 196 +++++--- src/meta-cli/src/deploy/actors/task/deploy.rs | 2 +- .../src/deploy/actors/task_manager/report.rs | 27 +- src/meta-cli/src/typegraph/rpc/aws.rs | 61 ++- src/meta-cli/src/typegraph/rpc/core.rs | 217 ++++++--- src/meta-cli/src/typegraph/rpc/mod.rs | 4 +- src/meta-cli/src/typegraph/rpc/runtimes.rs | 434 ++++++++++++++---- src/meta-cli/src/typegraph/rpc/utils.rs | 126 +++-- src/typegraph/core/src/types/mod.rs | 1 + .../specs/codegen/src/lib/rust_lib.ts | 10 +- .../prisma/20240711030527_init/migration.sql | 52 --- .../prisma/20240711030719_init/migration.sql | 52 --- .../prisma/20240711033036_init/migration.sql | 52 --- .../prisma/20240711033536_init/migration.sql | 52 --- .../prisma/20240711030413_init/migration.sql | 10 - .../prisma/20240711032926_init/migration.sql | 10 - .../prisma/20240814052852_init/migration.sql | 10 - .../injection/prisma/migration_lock.toml | 3 - .../prisma/20240711030744_init/migration.sql | 7 - .../prisma/20240711033545_init/migration.sql | 7 - .../mixed-runtime/prisma/migration_lock.toml | 3 - .../prisma/20240711033549_init/migration.sql | 34 -- .../prisma/migration_lock.toml | 3 - .../db1/20240711030754_init/migration.sql | 7 - .../db1/20240711033554_init/migration.sql | 7 - .../multiple-runtimes/db1/migration_lock.toml | 3 - .../db2/20240711030754_init/migration.sql | 7 - .../db2/20240711033555_init/migration.sql | 7 - .../multiple-runtimes/db2/migration_lock.toml | 3 - .../prisma/20240711030805_init/migration.sql | 20 - .../prisma/20240711033609_init/migration.sql | 20 - .../normal-1-1/prisma/migration_lock.toml | 3 - .../prisma/20240711030809_init/migration.sql | 20 - .../prisma/20240711033612_init/migration.sql | 20 - .../optional-1-1/prisma/migration_lock.toml | 3 - .../prisma/20240711030756_init/migration.sql | 30 -- .../prisma/20240711033601_init/migration.sql | 30 -- .../optional-1-n/prisma/migration_lock.toml | 3 - .../prisma/20240711030805_init/migration.sql | 12 - .../prisma/20240711033617_init/migration.sql | 12 - .../prisma/migration_lock.toml | 3 - .../20241112084630_generated}/migration.sql | 28 +- .../prisma/migration_lock.toml | 0 .../prisma/20240711030807_init/migration.sql | 20 - .../prisma/20240711033610_init/migration.sql | 20 - .../prisma_normal/prisma/migration_lock.toml | 3 - .../prisma/20240711030758_init/migration.sql | 30 -- .../prisma/20240711033603_init/migration.sql | 30 -- .../prisma_opt_1/prisma/migration_lock.toml | 3 - .../prisma/20240711031129_init/migration.sql | 6 - .../prisma/20240711034130_init/migration.sql | 6 - .../typename/prisma/migration_lock.toml | 3 - tests/runtimes/prisma/prisma_test.ts | 10 +- tests/utils/test.ts | 60 ++- tools/consts.ts | 4 - 57 files changed, 858 insertions(+), 950 deletions(-) delete mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/20240711030527_init/migration.sql delete mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/20240711030719_init/migration.sql delete mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/20240711033036_init/migration.sql delete mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/20240711033536_init/migration.sql delete mode 100644 tests/prisma-migrations/injection/prisma/20240711030413_init/migration.sql delete mode 100644 tests/prisma-migrations/injection/prisma/20240711032926_init/migration.sql delete mode 100644 tests/prisma-migrations/injection/prisma/20240814052852_init/migration.sql delete mode 100644 tests/prisma-migrations/injection/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/mixed-runtime/prisma/20240711030744_init/migration.sql delete mode 100644 tests/prisma-migrations/mixed-runtime/prisma/20240711033545_init/migration.sql delete mode 100644 tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/multi-relations/prisma/20240711033549_init/migration.sql delete mode 100644 tests/prisma-migrations/multi-relations/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/multiple-runtimes/db1/20240711030754_init/migration.sql delete mode 100644 tests/prisma-migrations/multiple-runtimes/db1/20240711033554_init/migration.sql delete mode 100644 tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml delete mode 100644 tests/prisma-migrations/multiple-runtimes/db2/20240711030754_init/migration.sql delete mode 100644 tests/prisma-migrations/multiple-runtimes/db2/20240711033555_init/migration.sql delete mode 100644 tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml delete mode 100644 tests/prisma-migrations/normal-1-1/prisma/20240711030805_init/migration.sql delete mode 100644 tests/prisma-migrations/normal-1-1/prisma/20240711033609_init/migration.sql delete mode 100644 tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/optional-1-1/prisma/20240711030809_init/migration.sql delete mode 100644 tests/prisma-migrations/optional-1-1/prisma/20240711033612_init/migration.sql delete mode 100644 tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/optional-1-n/prisma/20240711030756_init/migration.sql delete mode 100644 tests/prisma-migrations/optional-1-n/prisma/20240711033601_init/migration.sql delete mode 100644 tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/prisma-edgecases/prisma/20240711030805_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma-edgecases/prisma/20240711033617_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml rename tests/prisma-migrations/{multi-relations/prisma/20240711030744_init => prisma/prisma/20241112084630_generated}/migration.sql (51%) rename tests/prisma-migrations/{full-prisma-mapping => prisma}/prisma/migration_lock.toml (100%) delete mode 100644 tests/prisma-migrations/prisma_normal/prisma/20240711030807_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma_normal/prisma/20240711033610_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/prisma_opt_1/prisma/20240711030758_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma_opt_1/prisma/20240711033603_init/migration.sql delete mode 100644 tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml delete mode 100644 tests/prisma-migrations/typename/prisma/20240711031129_init/migration.sql delete mode 100644 tests/prisma-migrations/typename/prisma/20240711034130_init/migration.sql delete mode 100644 tests/prisma-migrations/typename/prisma/migration_lock.toml diff --git a/.gitignore b/.gitignore index c2e4beabe7..2c8c2027e0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,6 @@ src/meta-lsp/*.vsix src/typegate/workers src/typegate/codegen -tests/prisma-migrations tests/e2e/cli/prisma-migrations tests/importers/copy/ tests/**/*.wasm diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0d648d2c1..4a4ea3e072 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,6 +88,7 @@ repos: CHANGELOG.md| .*\.snap$| typegate/src/typegraphs/.*\.json| + src/typegraph/core/src/types/sdk/.*\.rs| website/docs/reference/| libs/pyrt_wit_wire/pyrt| migration_lock.toml| diff --git a/poetry.lock b/poetry.lock index e6a9ec73b1..41821530c9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,14 +1,25 @@ # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + [[package]] name = "anyio" -version = "4.6.0" +version = "4.6.2.post1" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.0-py3-none-any.whl", hash = "sha256:c7d2e9d63e31599eeb636c8c5c03a7e108d73b345f064f1c19fdc87b79036a9a"}, - {file = "anyio-4.6.0.tar.gz", hash = "sha256:137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb"}, + {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, + {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, ] [package.dependencies] @@ -19,7 +30,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.21.0b1)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -134,26 +145,128 @@ files = [ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] -name = "importlib-resources" -version = "6.4.5" -description = "Read resources from Python packages" +name = "pydantic" +version = "2.9.2" +description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717"}, - {file = "importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065"}, + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, ] [package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} +annotated-types = ">=0.6.0" +pydantic-core = "2.23.4" +typing-extensions = [ + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, +] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] -type = ["pytest-mypy"] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.23.4" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, + {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, + {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, + {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, + {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, + {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, + {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, + {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, + {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, + {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, + {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "python-box" @@ -290,7 +403,7 @@ files = [ [[package]] name = "typegraph" -version = "0.4.11-rc.0" +version = "0.5.0-rc.4" description = "Declarative API development platform. Build backend components with WASM, Typescript and Python, no matter where and how your (legacy) systems are." optional = false python-versions = ">=3.9,<4.0" @@ -299,9 +412,9 @@ develop = true [package.dependencies] astunparse = "^1.6.3" +pydantic = "^2.9.2" python-box = "^7.1.1" typing-extensions = "^4.8.0" -wasmtime = "^25.0.0" [package.source] type = "directory" @@ -318,61 +431,20 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -[[package]] -name = "wasmtime" -version = "25.0.0" -description = "A WebAssembly runtime powered by Wasmtime" -optional = false -python-versions = ">=3.8" -files = [ - {file = "wasmtime-25.0.0-py3-none-any.whl", hash = "sha256:22aa59fc6e01deec8a6703046f82466090d5811096a3bb5c169907e36c842af1"}, - {file = "wasmtime-25.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:13e9a718e9d580c1738782cc19f4dcb9fb068f7e51778ea621fd664f4433525b"}, - {file = "wasmtime-25.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5bdf1214ee3ee78a4a8a92da339f4c4c8c109e65af881b37f4adfc05d02af426"}, - {file = "wasmtime-25.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:b4364e14d44e3b7afe6a40bf608e9d0d2c40b09dece441d20f4f6e31906b729c"}, - {file = "wasmtime-25.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:a07445073cf36a6e5d1dc28246a897dcbdaa537ba8be8805be65422ecca297eb"}, - {file = "wasmtime-25.0.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:53d5f614348a28aabdf80ae4f6fdfa803031af1f74ada03826fd4fd43aeee6c8"}, - {file = "wasmtime-25.0.0-py3-none-win_amd64.whl", hash = "sha256:f8a2a213b9179965db2d2eedececd69a37e287e902330509afae51c71a3a6842"}, -] - -[package.dependencies] -importlib-resources = ">=5.10" - -[package.extras] -testing = ["componentize-py", "coverage", "pycparser", "pytest", "pytest-mypy"] - [[package]] name = "wheel" -version = "0.44.0" +version = "0.45.0" description = "A built-package format for Python" optional = false python-versions = ">=3.8" files = [ - {file = "wheel-0.44.0-py3-none-any.whl", hash = "sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f"}, - {file = "wheel-0.44.0.tar.gz", hash = "sha256:a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49"}, + {file = "wheel-0.45.0-py3-none-any.whl", hash = "sha256:52f0baa5e6522155090a09c6bd95718cc46956d1b51d537ea5454249edb671c7"}, + {file = "wheel-0.45.0.tar.gz", hash = "sha256:a57353941a3183b3d5365346b567a260a0602a0f8a635926a7dede41b94c674a"}, ] [package.extras] test = ["pytest (>=6.0.0)", "setuptools (>=65)"] -[[package]] -name = "zipp" -version = "3.20.2" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, - {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] -type = ["pytest-mypy"] - [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" diff --git a/src/meta-cli/src/deploy/actors/task/deploy.rs b/src/meta-cli/src/deploy/actors/task/deploy.rs index c64fbdb9da..784aefcfb4 100644 --- a/src/meta-cli/src/deploy/actors/task/deploy.rs +++ b/src/meta-cli/src/deploy/actors/task/deploy.rs @@ -166,7 +166,7 @@ pub enum RpcCall { typegraph: String, }, #[serde(untagged)] - TypegraphCall(TypegraphRpcCall), + TypegraphCall(Box), } struct ResetDatabase(PrismaRuntimeId); diff --git a/src/meta-cli/src/deploy/actors/task_manager/report.rs b/src/meta-cli/src/deploy/actors/task_manager/report.rs index 7f97268753..f77281a080 100644 --- a/src/meta-cli/src/deploy/actors/task_manager/report.rs +++ b/src/meta-cli/src/deploy/actors/task_manager/report.rs @@ -54,20 +54,31 @@ impl ReportEntry { let success = results .iter() .filter(|(_, res)| res.as_ref().ok().map(|r| r.is_success()).unwrap_or(false)) - .count(); + .map(|(name, _)| name.clone()) + .collect::>(); let total = results.len(); + let success_count = success.len(); let mut res = String::new(); - if success > 0 { - res.push_str(&format!("{}/{} success", success, total).green().to_string()); + if success_count > 0 { + res.push_str( + &format!("{}/{} success", success_count, total) + .green() + .to_string(), + ); + res.push_str(&format!(" ({})", success.join(", "))); } - let failure = total - success; - if failure > 0 { - if success > 0 { + let failure_count = total - success_count; + if failure_count > 0 { + if success_count > 0 { res.push_str(" "); } - res.push_str(&format!("{}/{} failure", failure, total).red().to_string()); + res.push_str( + &format!("{}/{} failure", failure_count, total) + .red() + .to_string(), + ); } - Some((res, success == total)) + Some((res, success_count == total)) } TaskFinishStatus::::Error => Some(("failed".to_string(), false)), TaskFinishStatus::::Cancelled => Some(("cancelled".to_string(), true)), diff --git a/src/meta-cli/src/typegraph/rpc/aws.rs b/src/meta-cli/src/typegraph/rpc/aws.rs index 94cbcc5cc6..0e81e54bf8 100644 --- a/src/meta-cli/src/typegraph/rpc/aws.rs +++ b/src/meta-cli/src/typegraph/rpc/aws.rs @@ -1,30 +1,59 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use serde_json::Value; -use typegraph_core::{errors::Result, Lib}; use typegraph_core::sdk::aws::*; #[allow(unused)] use typegraph_core::sdk::core::{MaterializerId, RuntimeId}; +use typegraph_core::{errors::Result, Lib}; #[derive(Debug, Serialize, Deserialize)] -#[serde(tag = "method", content = "params", rename_all="snake_case")] +#[serde(tag = "method", content = "params", rename_all = "snake_case")] pub enum RpcCall { - RegisterS3Runtime { data: S3RuntimeData }, - S3PresignGet { runtime: RuntimeId, data: S3PresignGetParams }, - S3PresignPut { runtime: RuntimeId, data: S3PresignPutParams }, - S3List { runtime: RuntimeId, bucket: String }, - S3Upload { runtime: RuntimeId, bucket: String }, - S3UploadAll { runtime: RuntimeId, bucket: String }, + RegisterS3Runtime { + data: S3RuntimeData, + }, + S3PresignGet { + runtime: RuntimeId, + data: S3PresignGetParams, + }, + S3PresignPut { + runtime: RuntimeId, + data: S3PresignPutParams, + }, + S3List { + runtime: RuntimeId, + bucket: String, + }, + S3Upload { + runtime: RuntimeId, + bucket: String, + }, + S3UploadAll { + runtime: RuntimeId, + bucket: String, + }, } impl super::RpcDispatch for RpcCall { fn dispatch(self) -> Result { match self { - Self::RegisterS3Runtime { data } => Lib::register_s3_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::S3PresignGet { runtime, data } => Lib::s3_presign_get(runtime, data).map(|res| serde_json::to_value(res).unwrap()), - Self::S3PresignPut { runtime, data } => Lib::s3_presign_put(runtime, data).map(|res| serde_json::to_value(res).unwrap()), - Self::S3List { runtime, bucket } => Lib::s3_list(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), - Self::S3Upload { runtime, bucket } => Lib::s3_upload(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), - Self::S3UploadAll { runtime, bucket } => Lib::s3_upload_all(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterS3Runtime { data } => { + Lib::register_s3_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::S3PresignGet { runtime, data } => { + Lib::s3_presign_get(runtime, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::S3PresignPut { runtime, data } => { + Lib::s3_presign_put(runtime, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::S3List { runtime, bucket } => { + Lib::s3_list(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()) + } + Self::S3Upload { runtime, bucket } => { + Lib::s3_upload(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()) + } + Self::S3UploadAll { runtime, bucket } => { + Lib::s3_upload_all(runtime, bucket).map(|res| serde_json::to_value(res).unwrap()) + } } } -} \ No newline at end of file +} diff --git a/src/meta-cli/src/typegraph/rpc/core.rs b/src/meta-cli/src/typegraph/rpc/core.rs index 59d54527df..a4d53d70cc 100644 --- a/src/meta-cli/src/typegraph/rpc/core.rs +++ b/src/meta-cli/src/typegraph/rpc/core.rs @@ -1,72 +1,183 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use serde_json::Value; -use typegraph_core::{errors::Result, Lib}; use typegraph_core::sdk::core::*; +use typegraph_core::{errors::Result, Lib}; #[derive(Debug, Serialize, Deserialize)] -#[serde(tag = "method", content = "params", rename_all="snake_case")] +#[serde(tag = "method", content = "params", rename_all = "snake_case")] pub enum RpcCall { - InitTypegraph { params: TypegraphInitParams }, - SerializeTypegraph { params: SerializeParams }, - WithInjection { type_id: TypeId, injection: String }, - WithConfig { type_id: TypeId, config: String }, - Refb { name: String, attributes: Option }, - Floatb { data: TypeFloat }, - Integerb { data: TypeInteger }, + InitTypegraph { + params: TypegraphInitParams, + }, + SerializeTypegraph { + params: SerializeParams, + }, + WithInjection { + type_id: TypeId, + injection: String, + }, + WithConfig { + type_id: TypeId, + config: String, + }, + Refb { + name: String, + attributes: Option, + }, + Floatb { + data: TypeFloat, + }, + Integerb { + data: TypeInteger, + }, Booleanb, - Stringb { data: TypeString }, - AsId { id: TypeId, composite: bool }, - Fileb { data: TypeFile }, - Listb { data: TypeList }, - Optionalb { data: TypeOptional }, - Unionb { data: TypeUnion }, - Eitherb { data: TypeEither }, - Structb { data: TypeStruct }, - ExtendStruct { tpe: TypeId, props: Vec<(String, TypeId)> }, - GetTypeRepr { id: TypeId }, - Funcb { data: TypeFunc }, - GetTransformData { resolver_input: TypeId, transform_tree: String }, - RegisterPolicy { pol: Policy }, - WithPolicy { type_id: TypeId, policy_chain: Vec }, + Stringb { + data: TypeString, + }, + AsId { + id: TypeId, + composite: bool, + }, + Fileb { + data: TypeFile, + }, + Listb { + data: TypeList, + }, + Optionalb { + data: TypeOptional, + }, + Unionb { + data: TypeUnion, + }, + Eitherb { + data: TypeEither, + }, + Structb { + data: TypeStruct, + }, + ExtendStruct { + tpe: TypeId, + props: Vec<(String, TypeId)>, + }, + GetTypeRepr { + id: TypeId, + }, + Funcb { + data: TypeFunc, + }, + GetTransformData { + resolver_input: TypeId, + transform_tree: String, + }, + RegisterPolicy { + pol: Policy, + }, + WithPolicy { + type_id: TypeId, + policy_chain: Vec, + }, GetPublicPolicy, GetInternalPolicy, - RegisterContextPolicy { key: String, check: ContextCheck }, - RenameType { tpe: TypeId, new_name: String }, - Expose { fns: Vec<(String, TypeId)>, default_policy: Option> }, - SetSeed { seed: Option }, + RegisterContextPolicy { + key: String, + check: ContextCheck, + }, + RenameType { + tpe: TypeId, + new_name: String, + }, + Expose { + fns: Vec<(String, TypeId)>, + default_policy: Option>, + }, + SetSeed { + seed: Option, + }, } impl super::RpcDispatch for RpcCall { fn dispatch(self) -> Result { match self { - Self::InitTypegraph { params } => Lib::init_typegraph(params).map(|res| serde_json::to_value(res).unwrap()), - Self::SerializeTypegraph { params } => Lib::serialize_typegraph(params).map(|res| serde_json::to_value(res).unwrap()), - Self::WithInjection { type_id, injection } => Lib::with_injection(type_id, injection).map(|res| serde_json::to_value(res).unwrap()), - Self::WithConfig { type_id, config } => Lib::with_config(type_id, config).map(|res| serde_json::to_value(res).unwrap()), - Self::Refb { name, attributes } => Lib::refb(name, attributes).map(|res| serde_json::to_value(res).unwrap()), - Self::Floatb { data } => Lib::floatb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Integerb { data } => Lib::integerb(data).map(|res| serde_json::to_value(res).unwrap()), + Self::InitTypegraph { params } => { + Lib::init_typegraph(params).map(|res| serde_json::to_value(res).unwrap()) + } + Self::SerializeTypegraph { params } => { + Lib::serialize_typegraph(params).map(|res| serde_json::to_value(res).unwrap()) + } + Self::WithInjection { type_id, injection } => Lib::with_injection(type_id, injection) + .map(|res| serde_json::to_value(res).unwrap()), + Self::WithConfig { type_id, config } => { + Lib::with_config(type_id, config).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Refb { name, attributes } => { + Lib::refb(name, attributes).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Floatb { data } => { + Lib::floatb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Integerb { data } => { + Lib::integerb(data).map(|res| serde_json::to_value(res).unwrap()) + } Self::Booleanb => Lib::booleanb().map(|res| serde_json::to_value(res).unwrap()), - Self::Stringb { data } => Lib::stringb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::AsId { id, composite } => Lib::as_id(id, composite).map(|res| serde_json::to_value(res).unwrap()), + Self::Stringb { data } => { + Lib::stringb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::AsId { id, composite } => { + Lib::as_id(id, composite).map(|res| serde_json::to_value(res).unwrap()) + } Self::Fileb { data } => Lib::fileb(data).map(|res| serde_json::to_value(res).unwrap()), Self::Listb { data } => Lib::listb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Optionalb { data } => Lib::optionalb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Unionb { data } => Lib::unionb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Eitherb { data } => Lib::eitherb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Structb { data } => Lib::structb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::ExtendStruct { tpe, props } => Lib::extend_struct(tpe, props).map(|res| serde_json::to_value(res).unwrap()), - Self::GetTypeRepr { id } => Lib::get_type_repr(id).map(|res| serde_json::to_value(res).unwrap()), + Self::Optionalb { data } => { + Lib::optionalb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Unionb { data } => { + Lib::unionb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Eitherb { data } => { + Lib::eitherb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Structb { data } => { + Lib::structb(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::ExtendStruct { tpe, props } => { + Lib::extend_struct(tpe, props).map(|res| serde_json::to_value(res).unwrap()) + } + Self::GetTypeRepr { id } => { + Lib::get_type_repr(id).map(|res| serde_json::to_value(res).unwrap()) + } Self::Funcb { data } => Lib::funcb(data).map(|res| serde_json::to_value(res).unwrap()), - Self::GetTransformData { resolver_input, transform_tree } => Lib::get_transform_data(resolver_input, transform_tree).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterPolicy { pol } => Lib::register_policy(pol).map(|res| serde_json::to_value(res).unwrap()), - Self::WithPolicy { type_id, policy_chain } => Lib::with_policy(type_id, policy_chain).map(|res| serde_json::to_value(res).unwrap()), - Self::GetPublicPolicy => Lib::get_public_policy().map(|res| serde_json::to_value(res).unwrap()), - Self::GetInternalPolicy => Lib::get_internal_policy().map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterContextPolicy { key, check } => Lib::register_context_policy(key, check).map(|res| serde_json::to_value(res).unwrap()), - Self::RenameType { tpe, new_name } => Lib::rename_type(tpe, new_name).map(|res| serde_json::to_value(res).unwrap()), - Self::Expose { fns, default_policy } => Lib::expose(fns, default_policy).map(|res| serde_json::to_value(res).unwrap()), - Self::SetSeed { seed } => Lib::set_seed(seed).map(|res| serde_json::to_value(res).unwrap()), + Self::GetTransformData { + resolver_input, + transform_tree, + } => Lib::get_transform_data(resolver_input, transform_tree) + .map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterPolicy { pol } => { + Lib::register_policy(pol).map(|res| serde_json::to_value(res).unwrap()) + } + Self::WithPolicy { + type_id, + policy_chain, + } => Lib::with_policy(type_id, policy_chain) + .map(|res| serde_json::to_value(res).unwrap()), + Self::GetPublicPolicy => { + Lib::get_public_policy().map(|res| serde_json::to_value(res).unwrap()) + } + Self::GetInternalPolicy => { + Lib::get_internal_policy().map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterContextPolicy { key, check } => Lib::register_context_policy(key, check) + .map(|res| serde_json::to_value(res).unwrap()), + Self::RenameType { tpe, new_name } => { + Lib::rename_type(tpe, new_name).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Expose { + fns, + default_policy, + } => Lib::expose(fns, default_policy).map(|res| serde_json::to_value(res).unwrap()), + Self::SetSeed { seed } => { + Lib::set_seed(seed).map(|res| serde_json::to_value(res).unwrap()) + } } } -} \ No newline at end of file +} diff --git a/src/meta-cli/src/typegraph/rpc/mod.rs b/src/meta-cli/src/typegraph/rpc/mod.rs index 69054ff957..af5a284cd6 100644 --- a/src/meta-cli/src/typegraph/rpc/mod.rs +++ b/src/meta-cli/src/typegraph/rpc/mod.rs @@ -4,7 +4,7 @@ pub mod runtimes; pub mod utils; use enum_dispatch::enum_dispatch; -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use serde_json::Value; use typegraph_core::errors::Result; @@ -21,4 +21,4 @@ pub enum RpcCall { Core(core::RpcCall), Runtimes(runtimes::RpcCall), Utils(utils::RpcCall), -} \ No newline at end of file +} diff --git a/src/meta-cli/src/typegraph/rpc/runtimes.rs b/src/meta-cli/src/typegraph/rpc/runtimes.rs index 0918a0ee86..44f060858a 100644 --- a/src/meta-cli/src/typegraph/rpc/runtimes.rs +++ b/src/meta-cli/src/typegraph/rpc/runtimes.rs @@ -1,116 +1,348 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use serde_json::Value; -use typegraph_core::{errors::Result, Lib}; -use typegraph_core::sdk::runtimes::*; #[allow(unused)] use typegraph_core::sdk::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; +use typegraph_core::sdk::runtimes::*; +use typegraph_core::{errors::Result, Lib}; #[derive(Debug, Serialize, Deserialize)] -#[serde(tag = "method", content = "params", rename_all="snake_case")] +#[serde(tag = "method", content = "params", rename_all = "snake_case")] pub enum RpcCall { GetDenoRuntime, - RegisterDenoFunc { data: MaterializerDenoFunc, effect: Effect }, - RegisterDenoStatic { data: MaterializerDenoStatic, type_id: TypeId }, - GetPredefinedDenoFunc { data: MaterializerDenoPredefined }, - ImportDenoFunction { data: MaterializerDenoImport, effect: Effect }, - RegisterGraphqlRuntime { data: GraphqlRuntimeData }, - GraphqlQuery { base: BaseMaterializer, data: MaterializerGraphqlQuery }, - GraphqlMutation { base: BaseMaterializer, data: MaterializerGraphqlQuery }, - RegisterHttpRuntime { data: HttpRuntimeData }, - HttpRequest { base: BaseMaterializer, data: MaterializerHttpRequest }, + RegisterDenoFunc { + data: MaterializerDenoFunc, + effect: Effect, + }, + RegisterDenoStatic { + data: MaterializerDenoStatic, + type_id: TypeId, + }, + GetPredefinedDenoFunc { + data: MaterializerDenoPredefined, + }, + ImportDenoFunction { + data: MaterializerDenoImport, + effect: Effect, + }, + RegisterGraphqlRuntime { + data: GraphqlRuntimeData, + }, + GraphqlQuery { + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + }, + GraphqlMutation { + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + }, + RegisterHttpRuntime { + data: HttpRuntimeData, + }, + HttpRequest { + base: BaseMaterializer, + data: MaterializerHttpRequest, + }, RegisterPythonRuntime, - FromPythonLambda { base: BaseMaterializer, data: MaterializerPythonLambda }, - FromPythonDef { base: BaseMaterializer, data: MaterializerPythonDef }, - FromPythonModule { base: BaseMaterializer, data: MaterializerPythonModule }, - FromPythonImport { base: BaseMaterializer, data: MaterializerPythonImport }, - RegisterRandomRuntime { data: RandomRuntimeData }, - CreateRandomMat { base: BaseMaterializer, data: MaterializerRandom }, - RegisterWasmReflectedRuntime { data: WasmRuntimeData }, - FromWasmReflectedFunc { base: BaseMaterializer, data: MaterializerWasmReflectedFunc }, - RegisterWasmWireRuntime { data: WasmRuntimeData }, - FromWasmWireHandler { base: BaseMaterializer, data: MaterializerWasmWireHandler }, - RegisterPrismaRuntime { data: PrismaRuntimeData }, - PrismaFindUnique { runtime: RuntimeId, model: TypeId }, - PrismaFindMany { runtime: RuntimeId, model: TypeId }, - PrismaFindFirst { runtime: RuntimeId, model: TypeId }, - PrismaAggregate { runtime: RuntimeId, model: TypeId }, - PrismaCount { runtime: RuntimeId, model: TypeId }, - PrismaGroupBy { runtime: RuntimeId, model: TypeId }, - PrismaCreateOne { runtime: RuntimeId, model: TypeId }, - PrismaCreateMany { runtime: RuntimeId, model: TypeId }, - PrismaUpdateOne { runtime: RuntimeId, model: TypeId }, - PrismaUpdateMany { runtime: RuntimeId, model: TypeId }, - PrismaUpsertOne { runtime: RuntimeId, model: TypeId }, - PrismaDeleteOne { runtime: RuntimeId, model: TypeId }, - PrismaDeleteMany { runtime: RuntimeId, model: TypeId }, - PrismaExecute { runtime: RuntimeId, query: String, param: TypeId, effect: Effect }, - PrismaQueryRaw { runtime: RuntimeId, query: String, out: TypeId, param: Option }, - PrismaLink { data: PrismaLinkData }, - PrismaMigration { operation: PrismaMigrationOperation }, - RegisterTemporalRuntime { data: TemporalRuntimeData }, - GenerateTemporalOperation { runtime: RuntimeId, data: TemporalOperationData }, - RegisterTypegateMaterializer { operation: TypegateOperation }, - RegisterTypegraphMaterializer { operation: TypegraphOperation }, - RegisterSubstantialRuntime { data: SubstantialRuntimeData }, - GenerateSubstantialOperation { runtime: RuntimeId, data: SubstantialOperationData }, - RegisterKvRuntime { data: KvRuntimeData }, - KvOperation { base: BaseMaterializer, data: KvMaterializer }, - RegisterGrpcRuntime { data: GrpcRuntimeData }, - CallGrpcMethod { runtime: RuntimeId, data: GrpcData }, + FromPythonLambda { + base: BaseMaterializer, + data: MaterializerPythonLambda, + }, + FromPythonDef { + base: BaseMaterializer, + data: MaterializerPythonDef, + }, + FromPythonModule { + base: BaseMaterializer, + data: MaterializerPythonModule, + }, + FromPythonImport { + base: BaseMaterializer, + data: MaterializerPythonImport, + }, + RegisterRandomRuntime { + data: RandomRuntimeData, + }, + CreateRandomMat { + base: BaseMaterializer, + data: MaterializerRandom, + }, + RegisterWasmReflectedRuntime { + data: WasmRuntimeData, + }, + FromWasmReflectedFunc { + base: BaseMaterializer, + data: MaterializerWasmReflectedFunc, + }, + RegisterWasmWireRuntime { + data: WasmRuntimeData, + }, + FromWasmWireHandler { + base: BaseMaterializer, + data: MaterializerWasmWireHandler, + }, + RegisterPrismaRuntime { + data: PrismaRuntimeData, + }, + PrismaFindUnique { + runtime: RuntimeId, + model: TypeId, + }, + PrismaFindMany { + runtime: RuntimeId, + model: TypeId, + }, + PrismaFindFirst { + runtime: RuntimeId, + model: TypeId, + }, + PrismaAggregate { + runtime: RuntimeId, + model: TypeId, + }, + PrismaCount { + runtime: RuntimeId, + model: TypeId, + }, + PrismaGroupBy { + runtime: RuntimeId, + model: TypeId, + }, + PrismaCreateOne { + runtime: RuntimeId, + model: TypeId, + }, + PrismaCreateMany { + runtime: RuntimeId, + model: TypeId, + }, + PrismaUpdateOne { + runtime: RuntimeId, + model: TypeId, + }, + PrismaUpdateMany { + runtime: RuntimeId, + model: TypeId, + }, + PrismaUpsertOne { + runtime: RuntimeId, + model: TypeId, + }, + PrismaDeleteOne { + runtime: RuntimeId, + model: TypeId, + }, + PrismaDeleteMany { + runtime: RuntimeId, + model: TypeId, + }, + PrismaExecute { + runtime: RuntimeId, + query: String, + param: TypeId, + effect: Effect, + }, + PrismaQueryRaw { + runtime: RuntimeId, + query: String, + out: TypeId, + param: Option, + }, + PrismaLink { + data: PrismaLinkData, + }, + PrismaMigration { + operation: PrismaMigrationOperation, + }, + RegisterTemporalRuntime { + data: TemporalRuntimeData, + }, + GenerateTemporalOperation { + runtime: RuntimeId, + data: TemporalOperationData, + }, + RegisterTypegateMaterializer { + operation: TypegateOperation, + }, + RegisterTypegraphMaterializer { + operation: TypegraphOperation, + }, + RegisterSubstantialRuntime { + data: SubstantialRuntimeData, + }, + GenerateSubstantialOperation { + runtime: RuntimeId, + data: SubstantialOperationData, + }, + RegisterKvRuntime { + data: KvRuntimeData, + }, + KvOperation { + base: BaseMaterializer, + data: KvMaterializer, + }, + RegisterGrpcRuntime { + data: GrpcRuntimeData, + }, + CallGrpcMethod { + runtime: RuntimeId, + data: GrpcData, + }, } impl super::RpcDispatch for RpcCall { fn dispatch(self) -> Result { match self { - Self::GetDenoRuntime => Lib::get_deno_runtime().map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterDenoFunc { data, effect } => Lib::register_deno_func(data, effect).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterDenoStatic { data, type_id } => Lib::register_deno_static(data, type_id).map(|res| serde_json::to_value(res).unwrap()), - Self::GetPredefinedDenoFunc { data } => Lib::get_predefined_deno_func(data).map(|res| serde_json::to_value(res).unwrap()), - Self::ImportDenoFunction { data, effect } => Lib::import_deno_function(data, effect).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterGraphqlRuntime { data } => Lib::register_graphql_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::GraphqlQuery { base, data } => Lib::graphql_query(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::GraphqlMutation { base, data } => Lib::graphql_mutation(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterHttpRuntime { data } => Lib::register_http_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::HttpRequest { base, data } => Lib::http_request(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterPythonRuntime => Lib::register_python_runtime().map(|res| serde_json::to_value(res).unwrap()), - Self::FromPythonLambda { base, data } => Lib::from_python_lambda(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::FromPythonDef { base, data } => Lib::from_python_def(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::FromPythonModule { base, data } => Lib::from_python_module(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::FromPythonImport { base, data } => Lib::from_python_import(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterRandomRuntime { data } => Lib::register_random_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::CreateRandomMat { base, data } => Lib::create_random_mat(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterWasmReflectedRuntime { data } => Lib::register_wasm_reflected_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::FromWasmReflectedFunc { base, data } => Lib::from_wasm_reflected_func(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterWasmWireRuntime { data } => Lib::register_wasm_wire_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::FromWasmWireHandler { base, data } => Lib::from_wasm_wire_handler(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterPrismaRuntime { data } => Lib::register_prisma_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaFindUnique { runtime, model } => Lib::prisma_find_unique(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaFindMany { runtime, model } => Lib::prisma_find_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaFindFirst { runtime, model } => Lib::prisma_find_first(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaAggregate { runtime, model } => Lib::prisma_aggregate(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaCount { runtime, model } => Lib::prisma_count(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaGroupBy { runtime, model } => Lib::prisma_group_by(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaCreateOne { runtime, model } => Lib::prisma_create_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaCreateMany { runtime, model } => Lib::prisma_create_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaUpdateOne { runtime, model } => Lib::prisma_update_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaUpdateMany { runtime, model } => Lib::prisma_update_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaUpsertOne { runtime, model } => Lib::prisma_upsert_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaDeleteOne { runtime, model } => Lib::prisma_delete_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaDeleteMany { runtime, model } => Lib::prisma_delete_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaExecute { runtime, query, param, effect } => Lib::prisma_execute(runtime, query, param, effect).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaQueryRaw { runtime, query, out, param } => Lib::prisma_query_raw(runtime, query, out, param).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaLink { data } => Lib::prisma_link(data).map(|res| serde_json::to_value(res).unwrap()), - Self::PrismaMigration { operation } => Lib::prisma_migration(operation).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterTemporalRuntime { data } => Lib::register_temporal_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::GenerateTemporalOperation { runtime, data } => Lib::generate_temporal_operation(runtime, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterTypegateMaterializer { operation } => Lib::register_typegate_materializer(operation).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterTypegraphMaterializer { operation } => Lib::register_typegraph_materializer(operation).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterSubstantialRuntime { data } => Lib::register_substantial_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::GenerateSubstantialOperation { runtime, data } => Lib::generate_substantial_operation(runtime, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterKvRuntime { data } => Lib::register_kv_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::KvOperation { base, data } => Lib::kv_operation(base, data).map(|res| serde_json::to_value(res).unwrap()), - Self::RegisterGrpcRuntime { data } => Lib::register_grpc_runtime(data).map(|res| serde_json::to_value(res).unwrap()), - Self::CallGrpcMethod { runtime, data } => Lib::call_grpc_method(runtime, data).map(|res| serde_json::to_value(res).unwrap()), + Self::GetDenoRuntime => { + Lib::get_deno_runtime().map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterDenoFunc { data, effect } => { + Lib::register_deno_func(data, effect).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterDenoStatic { data, type_id } => Lib::register_deno_static(data, type_id) + .map(|res| serde_json::to_value(res).unwrap()), + Self::GetPredefinedDenoFunc { data } => { + Lib::get_predefined_deno_func(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::ImportDenoFunction { data, effect } => Lib::import_deno_function(data, effect) + .map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterGraphqlRuntime { data } => { + Lib::register_graphql_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::GraphqlQuery { base, data } => { + Lib::graphql_query(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::GraphqlMutation { base, data } => { + Lib::graphql_mutation(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterHttpRuntime { data } => { + Lib::register_http_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::HttpRequest { base, data } => { + Lib::http_request(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterPythonRuntime => { + Lib::register_python_runtime().map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromPythonLambda { base, data } => { + Lib::from_python_lambda(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromPythonDef { base, data } => { + Lib::from_python_def(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromPythonModule { base, data } => { + Lib::from_python_module(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromPythonImport { base, data } => { + Lib::from_python_import(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterRandomRuntime { data } => { + Lib::register_random_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::CreateRandomMat { base, data } => { + Lib::create_random_mat(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterWasmReflectedRuntime { data } => { + Lib::register_wasm_reflected_runtime(data) + .map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromWasmReflectedFunc { base, data } => Lib::from_wasm_reflected_func(base, data) + .map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterWasmWireRuntime { data } => { + Lib::register_wasm_wire_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::FromWasmWireHandler { base, data } => Lib::from_wasm_wire_handler(base, data) + .map(|res| serde_json::to_value(res).unwrap()), + Self::RegisterPrismaRuntime { data } => { + Lib::register_prisma_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaFindUnique { runtime, model } => Lib::prisma_find_unique(runtime, model) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaFindMany { runtime, model } => { + Lib::prisma_find_many(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaFindFirst { runtime, model } => { + Lib::prisma_find_first(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaAggregate { runtime, model } => { + Lib::prisma_aggregate(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaCount { runtime, model } => { + Lib::prisma_count(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaGroupBy { runtime, model } => { + Lib::prisma_group_by(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaCreateOne { runtime, model } => { + Lib::prisma_create_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaCreateMany { runtime, model } => Lib::prisma_create_many(runtime, model) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaUpdateOne { runtime, model } => { + Lib::prisma_update_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaUpdateMany { runtime, model } => Lib::prisma_update_many(runtime, model) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaUpsertOne { runtime, model } => { + Lib::prisma_upsert_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaDeleteOne { runtime, model } => { + Lib::prisma_delete_one(runtime, model).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaDeleteMany { runtime, model } => Lib::prisma_delete_many(runtime, model) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaExecute { + runtime, + query, + param, + effect, + } => Lib::prisma_execute(runtime, query, param, effect) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaQueryRaw { + runtime, + query, + out, + param, + } => Lib::prisma_query_raw(runtime, query, out, param) + .map(|res| serde_json::to_value(res).unwrap()), + Self::PrismaLink { data } => { + Lib::prisma_link(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::PrismaMigration { operation } => { + Lib::prisma_migration(operation).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterTemporalRuntime { data } => { + Lib::register_temporal_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::GenerateTemporalOperation { runtime, data } => { + Lib::generate_temporal_operation(runtime, data) + .map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterTypegateMaterializer { operation } => { + Lib::register_typegate_materializer(operation) + .map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterTypegraphMaterializer { operation } => { + Lib::register_typegraph_materializer(operation) + .map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterSubstantialRuntime { data } => Lib::register_substantial_runtime(data) + .map(|res| serde_json::to_value(res).unwrap()), + Self::GenerateSubstantialOperation { runtime, data } => { + Lib::generate_substantial_operation(runtime, data) + .map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterKvRuntime { data } => { + Lib::register_kv_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::KvOperation { base, data } => { + Lib::kv_operation(base, data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::RegisterGrpcRuntime { data } => { + Lib::register_grpc_runtime(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::CallGrpcMethod { runtime, data } => { + Lib::call_grpc_method(runtime, data).map(|res| serde_json::to_value(res).unwrap()) + } } } -} \ No newline at end of file +} diff --git a/src/meta-cli/src/typegraph/rpc/utils.rs b/src/meta-cli/src/typegraph/rpc/utils.rs index 87a04ed659..ce67f4e4ef 100644 --- a/src/meta-cli/src/typegraph/rpc/utils.rs +++ b/src/meta-cli/src/typegraph/rpc/utils.rs @@ -1,42 +1,110 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use serde_json::Value; -use typegraph_core::{errors::Result, Lib}; -use typegraph_core::sdk::utils::*; #[allow(unused)] use typegraph_core::sdk::core::TypeId; +use typegraph_core::sdk::utils::*; +use typegraph_core::{errors::Result, Lib}; #[derive(Debug, Serialize, Deserialize)] -#[serde(tag = "method", content = "params", rename_all="snake_case")] +#[serde(tag = "method", content = "params", rename_all = "snake_case")] pub enum RpcCall { - Reduceb { super_type_id: TypeId, entries: Vec }, - AddGraphqlEndpoint { graphql: String }, - AddAuth { data: Auth }, - AddRawAuth { data: String }, - Oauth2 { service_name: String, scopes: String }, - Oauth2WithoutProfiler { service_name: String, scopes: String }, - Oauth2WithExtendedProfiler { service_name: String, scopes: String, extension: String }, - Oauth2WithCustomProfiler { service_name: String, scopes: String, profiler: TypeId }, - GqlDeployQuery { params: QueryDeployParams }, - GqlRemoveQuery { tg_name: Vec }, - MetagenExec { config: FdkConfig }, - MetagenWriteFiles { items: Vec, typegraph_dir: String }, + Reduceb { + super_type_id: TypeId, + entries: Vec, + }, + AddGraphqlEndpoint { + graphql: String, + }, + AddAuth { + data: Auth, + }, + AddRawAuth { + data: String, + }, + Oauth2 { + service_name: String, + scopes: String, + }, + Oauth2WithoutProfiler { + service_name: String, + scopes: String, + }, + Oauth2WithExtendedProfiler { + service_name: String, + scopes: String, + extension: String, + }, + Oauth2WithCustomProfiler { + service_name: String, + scopes: String, + profiler: TypeId, + }, + GqlDeployQuery { + params: QueryDeployParams, + }, + GqlRemoveQuery { + tg_name: Vec, + }, + MetagenExec { + config: FdkConfig, + }, + MetagenWriteFiles { + items: Vec, + typegraph_dir: String, + }, } impl super::RpcDispatch for RpcCall { fn dispatch(self) -> Result { match self { - Self::Reduceb { super_type_id, entries } => Lib::reduceb(super_type_id, entries).map(|res| serde_json::to_value(res).unwrap()), - Self::AddGraphqlEndpoint { graphql } => Lib::add_graphql_endpoint(graphql).map(|res| serde_json::to_value(res).unwrap()), - Self::AddAuth { data } => Lib::add_auth(data).map(|res| serde_json::to_value(res).unwrap()), - Self::AddRawAuth { data } => Lib::add_raw_auth(data).map(|res| serde_json::to_value(res).unwrap()), - Self::Oauth2 { service_name, scopes } => Lib::oauth2(service_name, scopes).map(|res| serde_json::to_value(res).unwrap()), - Self::Oauth2WithoutProfiler { service_name, scopes } => Lib::oauth2_without_profiler(service_name, scopes).map(|res| serde_json::to_value(res).unwrap()), - Self::Oauth2WithExtendedProfiler { service_name, scopes, extension } => Lib::oauth2_with_extended_profiler(service_name, scopes, extension).map(|res| serde_json::to_value(res).unwrap()), - Self::Oauth2WithCustomProfiler { service_name, scopes, profiler } => Lib::oauth2_with_custom_profiler(service_name, scopes, profiler).map(|res| serde_json::to_value(res).unwrap()), - Self::GqlDeployQuery { params } => Lib::gql_deploy_query(params).map(|res| serde_json::to_value(res).unwrap()), - Self::GqlRemoveQuery { tg_name } => Lib::gql_remove_query(tg_name).map(|res| serde_json::to_value(res).unwrap()), - Self::MetagenExec { config } => Lib::metagen_exec(config).map(|res| serde_json::to_value(res).unwrap()), - Self::MetagenWriteFiles { items, typegraph_dir } => Lib::metagen_write_files(items, typegraph_dir).map(|res| serde_json::to_value(res).unwrap()), + Self::Reduceb { + super_type_id, + entries, + } => Lib::reduceb(super_type_id, entries).map(|res| serde_json::to_value(res).unwrap()), + Self::AddGraphqlEndpoint { graphql } => { + Lib::add_graphql_endpoint(graphql).map(|res| serde_json::to_value(res).unwrap()) + } + Self::AddAuth { data } => { + Lib::add_auth(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::AddRawAuth { data } => { + Lib::add_raw_auth(data).map(|res| serde_json::to_value(res).unwrap()) + } + Self::Oauth2 { + service_name, + scopes, + } => Lib::oauth2(service_name, scopes).map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithoutProfiler { + service_name, + scopes, + } => Lib::oauth2_without_profiler(service_name, scopes) + .map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithExtendedProfiler { + service_name, + scopes, + extension, + } => Lib::oauth2_with_extended_profiler(service_name, scopes, extension) + .map(|res| serde_json::to_value(res).unwrap()), + Self::Oauth2WithCustomProfiler { + service_name, + scopes, + profiler, + } => Lib::oauth2_with_custom_profiler(service_name, scopes, profiler) + .map(|res| serde_json::to_value(res).unwrap()), + Self::GqlDeployQuery { params } => { + Lib::gql_deploy_query(params).map(|res| serde_json::to_value(res).unwrap()) + } + Self::GqlRemoveQuery { tg_name } => { + Lib::gql_remove_query(tg_name).map(|res| serde_json::to_value(res).unwrap()) + } + Self::MetagenExec { config } => { + Lib::metagen_exec(config).map(|res| serde_json::to_value(res).unwrap()) + } + Self::MetagenWriteFiles { + items, + typegraph_dir, + } => Lib::metagen_write_files(items, typegraph_dir) + .map(|res| serde_json::to_value(res).unwrap()), } } -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/mod.rs b/src/typegraph/core/src/types/mod.rs index a4e80729e3..ceaaded264 100644 --- a/src/typegraph/core/src/types/mod.rs +++ b/src/typegraph/core/src/types/mod.rs @@ -1,6 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 +#[rustfmt::skip] pub mod sdk; pub mod type_def; pub mod type_id; diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts index 661300ef31..5776cb2488 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_lib.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -5,8 +5,8 @@ import type { AliasTypeDef, FuncDef, RecordTypeDef, - UnionTypeDef, TypeDefSource, + UnionTypeDef, } from "./base.ts"; const typeMap = { @@ -39,7 +39,9 @@ class RustLibCodeGenerator extends TypeDefProcessor { const imports = this.imports.map( ({ imports, source }) => - `use super::${source}::${imports.length > 1 ? `{${imports.join(", ")}}` : imports};`, + `use super::${source}::${ + imports.length > 1 ? `{${imports.join(", ")}}` : imports + };`, ); return [baseImport, ...imports].filter(Boolean).join("\n"); @@ -67,7 +69,9 @@ ${props} const variants = def.variants .map( (v) => - ` ${v.value ? `${toPascalCase(v.tag)}(${v.value})` : toPascalCase(v.tag)},`, + ` ${ + v.value ? `${toPascalCase(v.tag)}(${v.value})` : toPascalCase(v.tag) + },`, ) .join("\n"); diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030527_init/migration.sql b/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030527_init/migration.sql deleted file mode 100644 index a70c01a4c2..0000000000 --- a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030527_init/migration.sql +++ /dev/null @@ -1,52 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "coinflips" BOOLEAN[], - "city" TEXT NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL, - "title" TEXT NOT NULL, - "views" INTEGER NOT NULL, - "likes" INTEGER NOT NULL, - "published" BOOLEAN NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Post_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Comment" ( - "id" INTEGER NOT NULL, - "content" TEXT NOT NULL, - "related_postId" INTEGER NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "ExtendedProfile" ( - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "ExtendedProfile_pkey" PRIMARY KEY ("userId") -); - --- AddForeignKey -ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_related_postId_fkey" FOREIGN KEY ("related_postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "ExtendedProfile" ADD CONSTRAINT "ExtendedProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030719_init/migration.sql b/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030719_init/migration.sql deleted file mode 100644 index a70c01a4c2..0000000000 --- a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711030719_init/migration.sql +++ /dev/null @@ -1,52 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "coinflips" BOOLEAN[], - "city" TEXT NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL, - "title" TEXT NOT NULL, - "views" INTEGER NOT NULL, - "likes" INTEGER NOT NULL, - "published" BOOLEAN NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Post_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Comment" ( - "id" INTEGER NOT NULL, - "content" TEXT NOT NULL, - "related_postId" INTEGER NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "ExtendedProfile" ( - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "ExtendedProfile_pkey" PRIMARY KEY ("userId") -); - --- AddForeignKey -ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_related_postId_fkey" FOREIGN KEY ("related_postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "ExtendedProfile" ADD CONSTRAINT "ExtendedProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033036_init/migration.sql b/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033036_init/migration.sql deleted file mode 100644 index a70c01a4c2..0000000000 --- a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033036_init/migration.sql +++ /dev/null @@ -1,52 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "coinflips" BOOLEAN[], - "city" TEXT NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL, - "title" TEXT NOT NULL, - "views" INTEGER NOT NULL, - "likes" INTEGER NOT NULL, - "published" BOOLEAN NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Post_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Comment" ( - "id" INTEGER NOT NULL, - "content" TEXT NOT NULL, - "related_postId" INTEGER NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "ExtendedProfile" ( - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "ExtendedProfile_pkey" PRIMARY KEY ("userId") -); - --- AddForeignKey -ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_related_postId_fkey" FOREIGN KEY ("related_postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "ExtendedProfile" ADD CONSTRAINT "ExtendedProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033536_init/migration.sql b/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033536_init/migration.sql deleted file mode 100644 index a70c01a4c2..0000000000 --- a/tests/prisma-migrations/full-prisma-mapping/prisma/20240711033536_init/migration.sql +++ /dev/null @@ -1,52 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "coinflips" BOOLEAN[], - "city" TEXT NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL, - "title" TEXT NOT NULL, - "views" INTEGER NOT NULL, - "likes" INTEGER NOT NULL, - "published" BOOLEAN NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Post_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Comment" ( - "id" INTEGER NOT NULL, - "content" TEXT NOT NULL, - "related_postId" INTEGER NOT NULL, - "authorId" INTEGER NOT NULL, - - CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "ExtendedProfile" ( - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "ExtendedProfile_pkey" PRIMARY KEY ("userId") -); - --- AddForeignKey -ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_related_postId_fkey" FOREIGN KEY ("related_postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "ExtendedProfile" ADD CONSTRAINT "ExtendedProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/injection/prisma/20240711030413_init/migration.sql b/tests/prisma-migrations/injection/prisma/20240711030413_init/migration.sql deleted file mode 100644 index d4647cea5d..0000000000 --- a/tests/prisma-migrations/injection/prisma/20240711030413_init/migration.sql +++ /dev/null @@ -1,10 +0,0 @@ --- CreateTable -CREATE TABLE "Messages" ( - "id" UUID NOT NULL, - "time" TIMESTAMP(3) NOT NULL, - "text" TEXT NOT NULL, - "senderId" INTEGER NOT NULL, - "recipientId" INTEGER NOT NULL, - - CONSTRAINT "Messages_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/injection/prisma/20240711032926_init/migration.sql b/tests/prisma-migrations/injection/prisma/20240711032926_init/migration.sql deleted file mode 100644 index d4647cea5d..0000000000 --- a/tests/prisma-migrations/injection/prisma/20240711032926_init/migration.sql +++ /dev/null @@ -1,10 +0,0 @@ --- CreateTable -CREATE TABLE "Messages" ( - "id" UUID NOT NULL, - "time" TIMESTAMP(3) NOT NULL, - "text" TEXT NOT NULL, - "senderId" INTEGER NOT NULL, - "recipientId" INTEGER NOT NULL, - - CONSTRAINT "Messages_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/injection/prisma/20240814052852_init/migration.sql b/tests/prisma-migrations/injection/prisma/20240814052852_init/migration.sql deleted file mode 100644 index d4647cea5d..0000000000 --- a/tests/prisma-migrations/injection/prisma/20240814052852_init/migration.sql +++ /dev/null @@ -1,10 +0,0 @@ --- CreateTable -CREATE TABLE "Messages" ( - "id" UUID NOT NULL, - "time" TIMESTAMP(3) NOT NULL, - "text" TEXT NOT NULL, - "senderId" INTEGER NOT NULL, - "recipientId" INTEGER NOT NULL, - - CONSTRAINT "Messages_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/injection/prisma/migration_lock.toml b/tests/prisma-migrations/injection/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/injection/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/mixed-runtime/prisma/20240711030744_init/migration.sql b/tests/prisma-migrations/mixed-runtime/prisma/20240711030744_init/migration.sql deleted file mode 100644 index e582d572b6..0000000000 --- a/tests/prisma-migrations/mixed-runtime/prisma/20240711030744_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "Record" ( - "id" SERIAL NOT NULL, - "description" TEXT NOT NULL, - - CONSTRAINT "Record_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/mixed-runtime/prisma/20240711033545_init/migration.sql b/tests/prisma-migrations/mixed-runtime/prisma/20240711033545_init/migration.sql deleted file mode 100644 index e582d572b6..0000000000 --- a/tests/prisma-migrations/mixed-runtime/prisma/20240711033545_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "Record" ( - "id" SERIAL NOT NULL, - "description" TEXT NOT NULL, - - CONSTRAINT "Record_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml b/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multi-relations/prisma/20240711033549_init/migration.sql b/tests/prisma-migrations/multi-relations/prisma/20240711033549_init/migration.sql deleted file mode 100644 index 9585fb67e5..0000000000 --- a/tests/prisma-migrations/multi-relations/prisma/20240711033549_init/migration.sql +++ /dev/null @@ -1,34 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" INTEGER NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER NOT NULL, - "recipientId" INTEGER NOT NULL, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_recipientId_fkey" FOREIGN KEY ("recipientId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml b/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multiple-runtimes/db1/20240711030754_init/migration.sql b/tests/prisma-migrations/multiple-runtimes/db1/20240711030754_init/migration.sql deleted file mode 100644 index febded207f..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db1/20240711030754_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "User1" ( - "id" SERIAL NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "User1_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/multiple-runtimes/db1/20240711033554_init/migration.sql b/tests/prisma-migrations/multiple-runtimes/db1/20240711033554_init/migration.sql deleted file mode 100644 index febded207f..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db1/20240711033554_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "User1" ( - "id" SERIAL NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "User1_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml b/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multiple-runtimes/db2/20240711030754_init/migration.sql b/tests/prisma-migrations/multiple-runtimes/db2/20240711030754_init/migration.sql deleted file mode 100644 index 2a8d3d74b5..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db2/20240711030754_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "User2" ( - "id" SERIAL NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "User2_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/multiple-runtimes/db2/20240711033555_init/migration.sql b/tests/prisma-migrations/multiple-runtimes/db2/20240711033555_init/migration.sql deleted file mode 100644 index 2a8d3d74b5..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db2/20240711033555_init/migration.sql +++ /dev/null @@ -1,7 +0,0 @@ --- CreateTable -CREATE TABLE "User2" ( - "id" SERIAL NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "User2_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml b/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/normal-1-1/prisma/20240711030805_init/migration.sql b/tests/prisma-migrations/normal-1-1/prisma/20240711030805_init/migration.sql deleted file mode 100644 index 479083e26c..0000000000 --- a/tests/prisma-migrations/normal-1-1/prisma/20240711030805_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/normal-1-1/prisma/20240711033609_init/migration.sql b/tests/prisma-migrations/normal-1-1/prisma/20240711033609_init/migration.sql deleted file mode 100644 index 479083e26c..0000000000 --- a/tests/prisma-migrations/normal-1-1/prisma/20240711033609_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml b/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/optional-1-1/prisma/20240711030809_init/migration.sql b/tests/prisma-migrations/optional-1-1/prisma/20240711030809_init/migration.sql deleted file mode 100644 index c90244cae9..0000000000 --- a/tests/prisma-migrations/optional-1-1/prisma/20240711030809_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-1/prisma/20240711033612_init/migration.sql b/tests/prisma-migrations/optional-1-1/prisma/20240711033612_init/migration.sql deleted file mode 100644 index c90244cae9..0000000000 --- a/tests/prisma-migrations/optional-1-1/prisma/20240711033612_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml b/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/optional-1-n/prisma/20240711030756_init/migration.sql b/tests/prisma-migrations/optional-1-n/prisma/20240711030756_init/migration.sql deleted file mode 100644 index 3892421b99..0000000000 --- a/tests/prisma-migrations/optional-1-n/prisma/20240711030756_init/migration.sql +++ /dev/null @@ -1,30 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" SERIAL NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-n/prisma/20240711033601_init/migration.sql b/tests/prisma-migrations/optional-1-n/prisma/20240711033601_init/migration.sql deleted file mode 100644 index 3892421b99..0000000000 --- a/tests/prisma-migrations/optional-1-n/prisma/20240711033601_init/migration.sql +++ /dev/null @@ -1,30 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" SERIAL NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml b/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/prisma-edgecases/prisma/20240711030805_init/migration.sql b/tests/prisma-migrations/prisma-edgecases/prisma/20240711030805_init/migration.sql deleted file mode 100644 index 224f5d7831..0000000000 --- a/tests/prisma-migrations/prisma-edgecases/prisma/20240711030805_init/migration.sql +++ /dev/null @@ -1,12 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" SERIAL NOT NULL, - "pseudo" TEXT NOT NULL, - "email" TEXT NOT NULL, - "firstname" VARCHAR(20) NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "User_pseudo_key" ON "User"("pseudo"); diff --git a/tests/prisma-migrations/prisma-edgecases/prisma/20240711033617_init/migration.sql b/tests/prisma-migrations/prisma-edgecases/prisma/20240711033617_init/migration.sql deleted file mode 100644 index 224f5d7831..0000000000 --- a/tests/prisma-migrations/prisma-edgecases/prisma/20240711033617_init/migration.sql +++ /dev/null @@ -1,12 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" SERIAL NOT NULL, - "pseudo" TEXT NOT NULL, - "email" TEXT NOT NULL, - "firstname" VARCHAR(20) NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "User_pseudo_key" ON "User"("pseudo"); diff --git a/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml b/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multi-relations/prisma/20240711030744_init/migration.sql b/tests/prisma-migrations/prisma/prisma/20241112084630_generated/migration.sql similarity index 51% rename from tests/prisma-migrations/multi-relations/prisma/20240711030744_init/migration.sql rename to tests/prisma-migrations/prisma/prisma/20241112084630_generated/migration.sql index 9585fb67e5..6b2e1c2a8c 100644 --- a/tests/prisma-migrations/multi-relations/prisma/20240711030744_init/migration.sql +++ b/tests/prisma-migrations/prisma/prisma/20241112084630_generated/migration.sql @@ -3,32 +3,52 @@ CREATE TABLE "record" ( "id" UUID NOT NULL, "name" TEXT NOT NULL, "age" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT "record_pkey" PRIMARY KEY ("id") ); +-- CreateTable +CREATE TABLE "renamed_record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "renamed_record_pkey" PRIMARY KEY ("id") +); + -- CreateTable CREATE TABLE "users" ( - "id" INTEGER NOT NULL, + "id" SERIAL NOT NULL, "email" TEXT NOT NULL, "name" TEXT NOT NULL, CONSTRAINT "users_pkey" PRIMARY KEY ("id") ); +-- CreateTable +CREATE TABLE "user_identity" ( + "id" UUID NOT NULL, + "provider" TEXT NOT NULL, + "identifier" TEXT NOT NULL, + "userId" INTEGER NOT NULL, + + CONSTRAINT "user_identity_pkey" PRIMARY KEY ("id") +); + -- CreateTable CREATE TABLE "messages" ( "id" INTEGER NOT NULL, "time" INTEGER NOT NULL, "message" TEXT NOT NULL, "senderId" INTEGER NOT NULL, - "recipientId" INTEGER NOT NULL, CONSTRAINT "messages_pkey" PRIMARY KEY ("id") ); -- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE "user_identity" ADD CONSTRAINT "user_identity_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_recipientId_fkey" FOREIGN KEY ("recipientId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml b/tests/prisma-migrations/prisma/prisma/migration_lock.toml similarity index 100% rename from tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml rename to tests/prisma-migrations/prisma/prisma/migration_lock.toml diff --git a/tests/prisma-migrations/prisma_normal/prisma/20240711030807_init/migration.sql b/tests/prisma-migrations/prisma_normal/prisma/20240711030807_init/migration.sql deleted file mode 100644 index 479083e26c..0000000000 --- a/tests/prisma-migrations/prisma_normal/prisma/20240711030807_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_normal/prisma/20240711033610_init/migration.sql b/tests/prisma-migrations/prisma_normal/prisma/20240711033610_init/migration.sql deleted file mode 100644 index 479083e26c..0000000000 --- a/tests/prisma-migrations/prisma_normal/prisma/20240711033610_init/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- AddForeignKey -ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml b/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/prisma_opt_1/prisma/20240711030758_init/migration.sql b/tests/prisma-migrations/prisma_opt_1/prisma/20240711030758_init/migration.sql deleted file mode 100644 index 3892421b99..0000000000 --- a/tests/prisma-migrations/prisma_opt_1/prisma/20240711030758_init/migration.sql +++ /dev/null @@ -1,30 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" SERIAL NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_opt_1/prisma/20240711033603_init/migration.sql b/tests/prisma-migrations/prisma_opt_1/prisma/20240711033603_init/migration.sql deleted file mode 100644 index 3892421b99..0000000000 --- a/tests/prisma-migrations/prisma_opt_1/prisma/20240711033603_init/migration.sql +++ /dev/null @@ -1,30 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" SERIAL NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml b/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml deleted file mode 100644 index fbffa92c2b..0000000000 --- a/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/typename/prisma/20240711031129_init/migration.sql b/tests/prisma-migrations/typename/prisma/20240711031129_init/migration.sql deleted file mode 100644 index 8195a541ec..0000000000 --- a/tests/prisma-migrations/typename/prisma/20240711031129_init/migration.sql +++ /dev/null @@ -1,6 +0,0 @@ --- CreateTable -CREATE TABLE "userprisma" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "userprisma_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/typename/prisma/20240711034130_init/migration.sql b/tests/prisma-migrations/typename/prisma/20240711034130_init/migration.sql deleted file mode 100644 index 8195a541ec..0000000000 --- a/tests/prisma-migrations/typename/prisma/20240711034130_init/migration.sql +++ /dev/null @@ -1,6 +0,0 @@ --- CreateTable -CREATE TABLE "userprisma" ( - "id" INTEGER NOT NULL, - - CONSTRAINT "userprisma_pkey" PRIMARY KEY ("id") -); diff --git a/tests/prisma-migrations/typename/prisma/migration_lock.toml b/tests/prisma-migrations/typename/prisma/migration_lock.toml deleted file mode 100644 index 99e4f20090..0000000000 --- a/tests/prisma-migrations/typename/prisma/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" diff --git a/tests/runtimes/prisma/prisma_test.ts b/tests/runtimes/prisma/prisma_test.ts index bf2e3b5b49..926f681bc6 100644 --- a/tests/runtimes/prisma/prisma_test.ts +++ b/tests/runtimes/prisma/prisma_test.ts @@ -3,19 +3,17 @@ import { v4 } from "@std/uuid"; import { assert } from "@std/assert"; -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; -import { randomPGConnStr } from "../../utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema, randomPGConnStr } from "test-utils/database.ts"; Meta.test("prisma", async (t) => { - const { connStr, schema: _ } = randomPGConnStr(); + const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine("runtimes/prisma/prisma.py", { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(e); - await recreateMigrations(e); await t.should("return null for findUnique for invalid key", async () => { await gql` diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 4d5ec0e30a..c5b8c8686a 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -23,6 +23,8 @@ import { Typegraph } from "@metatype/typegate/typegraph/types.ts"; import { ArtifactUploader } from "@typegraph/sdk/tg_artifact_upload.ts"; import { BasicAuth } from "@typegraph/sdk/tg_deploy.ts"; import { exists } from "@std/fs/exists"; +import { metaCli } from "test-utils/meta.ts"; +import { $ } from "@david/dax"; export interface ParseOptions { deploy?: boolean; @@ -218,42 +220,32 @@ export class MetaTest { } async engine(path: string, opts: ParseOptions = {}) { - const args = ["serialize", "--file", path, "--quiet"]; - const tgArgs = opts.typegraph ? ["--typegraph", opts.typegraph] : ["-1"]; - const { code, stdout, stderr } = await this.meta(args.concat(tgArgs)); - - if (code !== 0) { - throw new Error(stderr); + console.log("t.engine", this.port, opts); + const secrets = opts.secrets ?? {}; + const optSecrets = Object.entries(secrets).map(([name, value]) => { + return `--secret=${name}=${value}`; + }); + const { stdout } = await metaCli( + "deploy", + "--target=dev", + `--gate=http://localhost:${this.port}`, + "--allow-dirty", + "--create-migration", + ...optSecrets, + `--file=${path}`, + ); + console.log({ stdout: $.stripAnsi(stdout) }); + const matches = stdout.match(/\((.*)\)/); + const typegraphs = matches?.[1].split(", ") ?? []; + if (typegraphs.length == 0) { + throw new Error("No typegraph"); } - - // FIXME: meta cli prints debug output to stdout - const output = stdout.trim(); - const startIndex = output.search(/\{/); - const tgString = output.slice(startIndex); - const tg = await TypeGraph.parseJson(tgString); - - // FIXME: hack waiting for MET-738 or a better way to create an engine - tg.meta.prefix = opts.prefix; - - const artifacts = Object.values(tg.meta.artifacts); - const tgUrl = `http://localhost:${this.port}`; - const tgName = TypeGraph.formatName(tg); - const auth = new BasicAuth("username", "password"); - const headers = new Headers(); - - if (artifacts.length > 0) { - const artifactUploader = new ArtifactUploader( - tgUrl, - artifacts, - tgName, - auth, - headers, - join(this.workingDir, path), - ); - await artifactUploader.uploadArtifacts(); + if (typegraphs.length > 1) { + throw new Error("Multiple typegraphs"); } - - return await this.#engineFromTypegraph(tg, opts.secrets ?? {}); + const tgName = typegraphs[0]; + const engine = this.typegate.register.get(tgName)!; + return engine; } async unregister(engine: QueryEngine) { diff --git a/tools/consts.ts b/tools/consts.ts index e3314d7a97..d6fd7ba375 100644 --- a/tools/consts.ts +++ b/tools/consts.ts @@ -79,10 +79,6 @@ export const sedLockLines: Record = { ['( GHJK_VERSION: ").+(")', GHJK_VERSION], ], "docs/metatype.dev/docusaurus.config.js": [['( tagline: ").+(",)', TAGLINE]], - "**/pyproject.toml": [ - ['(version = ").+(")', METATYPE_VERSION], - [/(wasmtime = "\^).+(")/, WASMTIME_PY_VERSION], - ], "examples/templates/**/compose.yml": [ ["( image: ghcr.io/metatypedev/typegate:v).+()", METATYPE_VERSION], ], From 0a1626f9f657ce0e9675bbe01de887d6815190fa Mon Sep 17 00:00:00 2001 From: Natoandro Date: Tue, 12 Nov 2024 14:19:13 +0300 Subject: [PATCH 20/39] fix other tests --- tests/e2e/cli/deploy_test.ts | 11 ++-- tests/injection/injection_test.ts | 16 +++--- tests/planner/default_args_test.ts | 6 +-- .../20241112104505_generated/migration.sql | 52 ++++++++++++++++++ .../prisma/migration_lock.toml | 3 ++ .../20241112104922_generated/migration.sql | 7 +++ .../mixed-runtime/prisma/migration_lock.toml | 3 ++ .../20241112105926_generated/migration.sql | 34 ++++++++++++ .../prisma/migration_lock.toml | 3 ++ .../20241112105121_generated/migration.sql | 7 +++ .../multiple-runtimes/db1/migration_lock.toml | 3 ++ .../20241112105122_generated/migration.sql | 7 +++ .../multiple-runtimes/db2/migration_lock.toml | 3 ++ .../20241112105451_generated/migration.sql | 20 +++++++ .../normal-1-1/prisma/migration_lock.toml | 3 ++ .../20241112105454_generated/migration.sql | 20 +++++++ .../optional-1-1/prisma/migration_lock.toml | 3 ++ .../20241112105933_generated/migration.sql | 30 +++++++++++ .../optional-1-n/prisma/migration_lock.toml | 3 ++ .../20241112105704_generated/migration.sql | 12 +++++ .../prisma/migration_lock.toml | 3 ++ .../migration.sql | 54 +++++++++++++++++++ .../20241112105453_generated/migration.sql | 20 +++++++ .../prisma_normal/prisma/migration_lock.toml | 3 ++ .../20241112105936_generated/migration.sql | 30 +++++++++++ .../prisma_opt_1/prisma/migration_lock.toml | 3 ++ tests/runtimes/graphql/graphql_test.ts | 12 ++--- .../prisma/full_prisma_mapping_test.ts | 8 ++- .../runtimes/prisma/graphql_variables_test.ts | 8 ++- tests/runtimes/prisma/mixed_runtime_test.ts | 8 ++- tests/runtimes/prisma/multi_relations_test.ts | 8 ++- .../runtimes/prisma/multiple_runtimes_test.ts | 9 ++-- tests/runtimes/prisma/one_to_many_test.ts | 11 ++-- tests/runtimes/prisma/one_to_one_test.ts | 15 +++--- .../runtimes/prisma/prisma_edgecases_test.ts | 8 ++- tests/runtimes/prisma/query_builder_test.ts | 7 +-- .../runtimes/prisma/schema_generation_test.ts | 4 +- .../runtimes/typegate/typegate_prisma_test.ts | 12 ++--- .../typegate/typegate_runtime_test.ts | 12 ++--- tests/typecheck/type_alias_test.ts | 8 ++- tests/utils/database.ts | 2 +- 41 files changed, 394 insertions(+), 97 deletions(-) create mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/20241112104505_generated/migration.sql create mode 100644 tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/mixed-runtime/prisma/20241112104922_generated/migration.sql create mode 100644 tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/multi-relations/prisma/20241112105926_generated/migration.sql create mode 100644 tests/prisma-migrations/multi-relations/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/multiple-runtimes/db1/20241112105121_generated/migration.sql create mode 100644 tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml create mode 100644 tests/prisma-migrations/multiple-runtimes/db2/20241112105122_generated/migration.sql create mode 100644 tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml create mode 100644 tests/prisma-migrations/normal-1-1/prisma/20241112105451_generated/migration.sql create mode 100644 tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/optional-1-1/prisma/20241112105454_generated/migration.sql create mode 100644 tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/optional-1-n/prisma/20241112105933_generated/migration.sql create mode 100644 tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/prisma-edgecases/prisma/20241112105704_generated/migration.sql create mode 100644 tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql create mode 100644 tests/prisma-migrations/prisma_normal/prisma/20241112105453_generated/migration.sql create mode 100644 tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml create mode 100644 tests/prisma-migrations/prisma_opt_1/prisma/20241112105936_generated/migration.sql create mode 100644 tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml diff --git a/tests/e2e/cli/deploy_test.ts b/tests/e2e/cli/deploy_test.ts index e45312c34a..3eeaf19735 100644 --- a/tests/e2e/cli/deploy_test.ts +++ b/tests/e2e/cli/deploy_test.ts @@ -3,9 +3,8 @@ import { gql, Meta } from "../../utils/mod.ts"; import { TestModule } from "../../utils/test_module.ts"; -import { dropSchemas, removeMigrations } from "test-utils/migrations.ts"; import { assertRejects, assertStringIncludes } from "@std/assert"; -import { randomPGConnStr, reset } from "test-utils/database.ts"; +import { dropSchema, randomPGConnStr, reset } from "test-utils/database.ts"; const m = new TestModule(import.meta); @@ -212,15 +211,13 @@ Meta.test( async (t) => { const port = t.port!; const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine("prisma.py", { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(e); - await removeMigrations(e); - const nodeConfigs = [ "--target", "dev", @@ -312,6 +309,7 @@ Meta.test( }, async (t) => { const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine("prisma.py", { secrets: { POSTGRES: connStr, @@ -319,9 +317,6 @@ Meta.test( prefix: "pref-", }); - await dropSchemas(e); - await removeMigrations(e); - const nodeConfigs = [ "-t", "with_prefix", diff --git a/tests/injection/injection_test.ts b/tests/injection/injection_test.ts index 8831ebad1f..a4ae3488a4 100644 --- a/tests/injection/injection_test.ts +++ b/tests/injection/injection_test.ts @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { gql, Meta } from "../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; import { assertRejects } from "@std/assert"; import { buildSchema, graphql } from "graphql"; import * as mf from "test/mock_fetch"; -import { dropSchemas, recreateMigrations } from "../utils/migrations.ts"; -import { freezeDate, unfreezeDate } from "../utils/date.ts"; +import { freezeDate, unfreezeDate } from "test-utils/date.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test("Missing env var", async (t) => { await assertRejects( @@ -27,10 +27,12 @@ const schema = buildSchema(` } `); +const schemaName = "injection_test_prisma"; const POSTGRES = - "postgresql://postgres:password@localhost:5432/db?schema=injection_test_prisma"; + `postgresql://postgres:password@localhost:5432/db?schema=${schema}`; Meta.test("Injected values", async (t) => { + await dropSchema(schemaName); const e = await t.engine("injection/injection.py", { secrets: { TEST_VAR: "3", POSTGRES }, }); @@ -158,13 +160,11 @@ mf.mock("POST@/api/graphql", async (req) => { }); Meta.test("Injection from/into graphql", async (t) => { + await dropSchema(schemaName); const e = await t.engine("injection/injection.py", { secrets: { TEST_VAR: "3", POSTGRES }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("inject params to graphql", async () => { await gql` query { @@ -239,6 +239,7 @@ Meta.test("Injection from/into graphql", async (t) => { }); Meta.test("dynamic value injection", async (t) => { + await dropSchema(schemaName); const e = await t.engine("injection/injection.py", { secrets: { TEST_VAR: "3", POSTGRES }, }); @@ -317,6 +318,7 @@ Meta.test("Deno: value injection", async (t) => { }); Meta.test("Injection from nested context", async (t) => { + await dropSchema(schemaName); const e = await t.engine("injection/nested_context.py"); await t.should("access injected nested context", async () => { diff --git a/tests/planner/default_args_test.ts b/tests/planner/default_args_test.ts index 4a0bb847e6..857c1d1fa9 100644 --- a/tests/planner/default_args_test.ts +++ b/tests/planner/default_args_test.ts @@ -1,10 +1,11 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "test-utils/migrations.ts"; import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test("prisma", async (t) => { + await dropSchema("prisma_default_args"); const e = await t.engine("runtimes/prisma/full_prisma_mapping.py", { secrets: { POSTGRES: @@ -12,9 +13,6 @@ Meta.test("prisma", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("fail", async () => { await gql` query CommentedAuthors { diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/20241112104505_generated/migration.sql b/tests/prisma-migrations/full-prisma-mapping/prisma/20241112104505_generated/migration.sql new file mode 100644 index 0000000000..a70c01a4c2 --- /dev/null +++ b/tests/prisma-migrations/full-prisma-mapping/prisma/20241112104505_generated/migration.sql @@ -0,0 +1,52 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + "coinflips" BOOLEAN[], + "city" TEXT NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Post" ( + "id" INTEGER NOT NULL, + "title" TEXT NOT NULL, + "views" INTEGER NOT NULL, + "likes" INTEGER NOT NULL, + "published" BOOLEAN NOT NULL, + "authorId" INTEGER NOT NULL, + + CONSTRAINT "Post_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Comment" ( + "id" INTEGER NOT NULL, + "content" TEXT NOT NULL, + "related_postId" INTEGER NOT NULL, + "authorId" INTEGER NOT NULL, + + CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ExtendedProfile" ( + "bio" TEXT NOT NULL, + "userId" INTEGER NOT NULL, + + CONSTRAINT "ExtendedProfile_pkey" PRIMARY KEY ("userId") +); + +-- AddForeignKey +ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Comment" ADD CONSTRAINT "Comment_related_postId_fkey" FOREIGN KEY ("related_postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ExtendedProfile" ADD CONSTRAINT "ExtendedProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml b/tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/full-prisma-mapping/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/mixed-runtime/prisma/20241112104922_generated/migration.sql b/tests/prisma-migrations/mixed-runtime/prisma/20241112104922_generated/migration.sql new file mode 100644 index 0000000000..e582d572b6 --- /dev/null +++ b/tests/prisma-migrations/mixed-runtime/prisma/20241112104922_generated/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "Record" ( + "id" SERIAL NOT NULL, + "description" TEXT NOT NULL, + + CONSTRAINT "Record_pkey" PRIMARY KEY ("id") +); diff --git a/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml b/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/mixed-runtime/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multi-relations/prisma/20241112105926_generated/migration.sql b/tests/prisma-migrations/multi-relations/prisma/20241112105926_generated/migration.sql new file mode 100644 index 0000000000..9585fb67e5 --- /dev/null +++ b/tests/prisma-migrations/multi-relations/prisma/20241112105926_generated/migration.sql @@ -0,0 +1,34 @@ +-- CreateTable +CREATE TABLE "record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + + CONSTRAINT "record_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" INTEGER NOT NULL, + "email" TEXT NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "messages" ( + "id" INTEGER NOT NULL, + "time" INTEGER NOT NULL, + "message" TEXT NOT NULL, + "senderId" INTEGER NOT NULL, + "recipientId" INTEGER NOT NULL, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "messages" ADD CONSTRAINT "messages_recipientId_fkey" FOREIGN KEY ("recipientId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml b/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/multi-relations/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multiple-runtimes/db1/20241112105121_generated/migration.sql b/tests/prisma-migrations/multiple-runtimes/db1/20241112105121_generated/migration.sql new file mode 100644 index 0000000000..febded207f --- /dev/null +++ b/tests/prisma-migrations/multiple-runtimes/db1/20241112105121_generated/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "User1" ( + "id" SERIAL NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "User1_pkey" PRIMARY KEY ("id") +); diff --git a/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml b/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/multiple-runtimes/db1/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/multiple-runtimes/db2/20241112105122_generated/migration.sql b/tests/prisma-migrations/multiple-runtimes/db2/20241112105122_generated/migration.sql new file mode 100644 index 0000000000..2a8d3d74b5 --- /dev/null +++ b/tests/prisma-migrations/multiple-runtimes/db2/20241112105122_generated/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "User2" ( + "id" SERIAL NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "User2_pkey" PRIMARY KEY ("id") +); diff --git a/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml b/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/multiple-runtimes/db2/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/normal-1-1/prisma/20241112105451_generated/migration.sql b/tests/prisma-migrations/normal-1-1/prisma/20241112105451_generated/migration.sql new file mode 100644 index 0000000000..479083e26c --- /dev/null +++ b/tests/prisma-migrations/normal-1-1/prisma/20241112105451_generated/migration.sql @@ -0,0 +1,20 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" INTEGER NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Profile" ( + "id" INTEGER NOT NULL, + "userId" INTEGER NOT NULL, + + CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); + +-- AddForeignKey +ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml b/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/normal-1-1/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/optional-1-1/prisma/20241112105454_generated/migration.sql b/tests/prisma-migrations/optional-1-1/prisma/20241112105454_generated/migration.sql new file mode 100644 index 0000000000..c90244cae9 --- /dev/null +++ b/tests/prisma-migrations/optional-1-1/prisma/20241112105454_generated/migration.sql @@ -0,0 +1,20 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" INTEGER NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Profile" ( + "id" INTEGER NOT NULL, + "userId" INTEGER, + + CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); + +-- AddForeignKey +ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml b/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/optional-1-1/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/optional-1-n/prisma/20241112105933_generated/migration.sql b/tests/prisma-migrations/optional-1-n/prisma/20241112105933_generated/migration.sql new file mode 100644 index 0000000000..3892421b99 --- /dev/null +++ b/tests/prisma-migrations/optional-1-n/prisma/20241112105933_generated/migration.sql @@ -0,0 +1,30 @@ +-- CreateTable +CREATE TABLE "record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + + CONSTRAINT "record_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" SERIAL NOT NULL, + "email" TEXT NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "messages" ( + "id" INTEGER NOT NULL, + "time" INTEGER NOT NULL, + "message" TEXT NOT NULL, + "senderId" INTEGER, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml b/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/optional-1-n/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/prisma-edgecases/prisma/20241112105704_generated/migration.sql b/tests/prisma-migrations/prisma-edgecases/prisma/20241112105704_generated/migration.sql new file mode 100644 index 0000000000..224f5d7831 --- /dev/null +++ b/tests/prisma-migrations/prisma-edgecases/prisma/20241112105704_generated/migration.sql @@ -0,0 +1,12 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" SERIAL NOT NULL, + "pseudo" TEXT NOT NULL, + "email" TEXT NOT NULL, + "firstname" VARCHAR(20) NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_pseudo_key" ON "User"("pseudo"); diff --git a/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml b/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/prisma-edgecases/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql b/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql new file mode 100644 index 0000000000..6b2e1c2a8c --- /dev/null +++ b/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql @@ -0,0 +1,54 @@ +-- CreateTable +CREATE TABLE "record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "record_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "renamed_record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "renamed_record_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" SERIAL NOT NULL, + "email" TEXT NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "user_identity" ( + "id" UUID NOT NULL, + "provider" TEXT NOT NULL, + "identifier" TEXT NOT NULL, + "userId" INTEGER NOT NULL, + + CONSTRAINT "user_identity_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "messages" ( + "id" INTEGER NOT NULL, + "time" INTEGER NOT NULL, + "message" TEXT NOT NULL, + "senderId" INTEGER NOT NULL, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "user_identity" ADD CONSTRAINT "user_identity_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_normal/prisma/20241112105453_generated/migration.sql b/tests/prisma-migrations/prisma_normal/prisma/20241112105453_generated/migration.sql new file mode 100644 index 0000000000..479083e26c --- /dev/null +++ b/tests/prisma-migrations/prisma_normal/prisma/20241112105453_generated/migration.sql @@ -0,0 +1,20 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" INTEGER NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Profile" ( + "id" INTEGER NOT NULL, + "userId" INTEGER NOT NULL, + + CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); + +-- AddForeignKey +ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml b/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/prisma_normal/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/prisma-migrations/prisma_opt_1/prisma/20241112105936_generated/migration.sql b/tests/prisma-migrations/prisma_opt_1/prisma/20241112105936_generated/migration.sql new file mode 100644 index 0000000000..3892421b99 --- /dev/null +++ b/tests/prisma-migrations/prisma_opt_1/prisma/20241112105936_generated/migration.sql @@ -0,0 +1,30 @@ +-- CreateTable +CREATE TABLE "record" ( + "id" UUID NOT NULL, + "name" TEXT NOT NULL, + "age" INTEGER, + + CONSTRAINT "record_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" SERIAL NOT NULL, + "email" TEXT NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "messages" ( + "id" INTEGER NOT NULL, + "time" INTEGER NOT NULL, + "message" TEXT NOT NULL, + "senderId" INTEGER, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml b/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml new file mode 100644 index 0000000000..fbffa92c2b --- /dev/null +++ b/tests/prisma-migrations/prisma_opt_1/prisma/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/tests/runtimes/graphql/graphql_test.ts b/tests/runtimes/graphql/graphql_test.ts index 42fa61f826..6523645159 100644 --- a/tests/runtimes/graphql/graphql_test.ts +++ b/tests/runtimes/graphql/graphql_test.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Elastic-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; -import { removeMigrations } from "../../utils/migrations.ts"; -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { removeMigrations } from "test-utils/migrations.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; const PYTHON_TG_PATH = "runtimes/graphql/typegraphs/python/graphql.py"; const TS_TG_PATH = "runtimes/graphql/typegraphs/deno/graphql.ts"; @@ -169,13 +169,12 @@ Meta.test( const connStr = `postgresql://postgres:password@localhost:5432/db?schema=${schema}`; + await dropSchema(schema); const engine = await t.engine(PYTHON_TG_PATH, { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(engine); - await recreateMigrations(engine); await t.should( "work when fetching data using GraphQL Runtime", @@ -195,13 +194,12 @@ Meta.test( const schema = "graphql-ts"; const connStr = `postgresql://postgres:password@localhost:5432/db?schema=${schema}`; + await dropSchema(schema); const engine = await t.engine(TS_TG_PATH, { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(engine); - await recreateMigrations(engine); await t.should( "work when fetching data through graphql request", diff --git a/tests/runtimes/prisma/full_prisma_mapping_test.ts b/tests/runtimes/prisma/full_prisma_mapping_test.ts index 1cbc92e6f5..4f30b484e8 100644 --- a/tests/runtimes/prisma/full_prisma_mapping_test.ts +++ b/tests/runtimes/prisma/full_prisma_mapping_test.ts @@ -1,10 +1,11 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; Meta.test("prisma full mapping", async (t) => { + await dropSchema("prisma-full"); const e = await t.engine("runtimes/prisma/full_prisma_mapping.py", { secrets: { POSTGRES: @@ -12,9 +13,6 @@ Meta.test("prisma full mapping", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - // create test data await t.should("insert a record with nested object", async () => { await gql` diff --git a/tests/runtimes/prisma/graphql_variables_test.ts b/tests/runtimes/prisma/graphql_variables_test.ts index 47a3d20cb0..a9c72cab70 100644 --- a/tests/runtimes/prisma/graphql_variables_test.ts +++ b/tests/runtimes/prisma/graphql_variables_test.ts @@ -3,10 +3,11 @@ import { v4 } from "@std/uuid"; import { assert } from "@std/assert"; -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test("GraphQL variables", async (t) => { + await dropSchema("prisma-vars"); const e = await t.engine("runtimes/prisma/prisma.py", { secrets: { POSTGRES: @@ -14,9 +15,6 @@ Meta.test("GraphQL variables", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("work with top-level variables", async () => { await gql` mutation CreateRecord($data: recordCreateInput!) { diff --git a/tests/runtimes/prisma/mixed_runtime_test.ts b/tests/runtimes/prisma/mixed_runtime_test.ts index 8c1607dd45..048947c11e 100644 --- a/tests/runtimes/prisma/mixed_runtime_test.ts +++ b/tests/runtimes/prisma/mixed_runtime_test.ts @@ -1,13 +1,14 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; import * as mf from "test/mock_fetch"; mf.install(); Meta.test("prisma mixed runtime", async (t) => { + await dropSchema("prisma-mixed"); const e = await t.engine("runtimes/prisma/mixed_runtime.py", { secrets: { POSTGRES: @@ -15,9 +16,6 @@ Meta.test("prisma mixed runtime", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should( "insert a record without considering fields owned by other runtimes", async () => { diff --git a/tests/runtimes/prisma/multi_relations_test.ts b/tests/runtimes/prisma/multi_relations_test.ts index 17a8037ede..3a6fcb9c71 100644 --- a/tests/runtimes/prisma/multi_relations_test.ts +++ b/tests/runtimes/prisma/multi_relations_test.ts @@ -1,10 +1,11 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test("multiple relationships", async (t) => { + await dropSchema("prisma-multi"); const e = await t.engine("runtimes/prisma/multi_relations.py", { secrets: { POSTGRES: @@ -12,9 +13,6 @@ Meta.test("multiple relationships", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("insert a simple record", async () => { await gql` mutation q { diff --git a/tests/runtimes/prisma/multiple_runtimes_test.ts b/tests/runtimes/prisma/multiple_runtimes_test.ts index a4f1edc916..959d89fc7e 100644 --- a/tests/runtimes/prisma/multiple_runtimes_test.ts +++ b/tests/runtimes/prisma/multiple_runtimes_test.ts @@ -1,10 +1,12 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; Meta.test("prisma", async (t) => { + await dropSchema("prisma-multi-a"); + await dropSchema("prisma-multi-b"); const tgPath = "runtimes/prisma/multiple_runtimes.py"; const e = await t.engine(tgPath, { secrets: { @@ -15,9 +17,6 @@ Meta.test("prisma", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("succeed queries", async () => { await gql` mutation { diff --git a/tests/runtimes/prisma/one_to_many_test.ts b/tests/runtimes/prisma/one_to_many_test.ts index 8bb9457063..3bad0f229a 100644 --- a/tests/runtimes/prisma/one_to_many_test.ts +++ b/tests/runtimes/prisma/one_to_many_test.ts @@ -1,22 +1,19 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { randomPGConnStr } from "../../utils/database.ts"; -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema, randomPGConnStr } from "test-utils/database.ts"; function runTest(tgPath: string, name: string) { Meta.test(name, async (t) => { - const { connStr, schema: _ } = randomPGConnStr(); + const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine(tgPath, { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(e); - await recreateMigrations(e); - await t.should("insert a record with nested object", async () => { await gql` mutation q { diff --git a/tests/runtimes/prisma/one_to_one_test.ts b/tests/runtimes/prisma/one_to_one_test.ts index d919d6f032..08ba5b61b1 100644 --- a/tests/runtimes/prisma/one_to_one_test.ts +++ b/tests/runtimes/prisma/one_to_one_test.ts @@ -2,10 +2,9 @@ // SPDX-License-Identifier: Elastic-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; -import { randomPGConnStr } from "../../utils/database.ts"; -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; -import { MetaTest } from "../../utils/test.ts"; +import { dropSchema, randomPGConnStr } from "test-utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { MetaTest } from "test-utils/test.ts"; async function runCommonTestSteps(t: MetaTest, e: QueryEngine) { await t.should("create a record with a nested object", async () => { @@ -52,14 +51,13 @@ Meta.test("required 1-1 relationships", async (t) => { ]; for (const tg of typegraphs) { - const { connStr, schema: _ } = randomPGConnStr(); + const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine(tg.file, { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(e); - await recreateMigrations(e); await runCommonTestSteps(t, e); @@ -81,14 +79,13 @@ Meta.test("required 1-1 relationships", async (t) => { }); Meta.test("optional 1-1 relationships", async (t) => { + await dropSchema("prisma-1-1"); const e = await t.engine("runtimes/prisma/optional_1_1.py", { secrets: { POSTGRES: "postgresql://postgres:password@localhost:5432/db?schema=prisma-1-1", }, }); - await dropSchemas(e); - await recreateMigrations(e); await runCommonTestSteps(t, e); diff --git a/tests/runtimes/prisma/prisma_edgecases_test.ts b/tests/runtimes/prisma/prisma_edgecases_test.ts index d021316c9e..9cc497f940 100644 --- a/tests/runtimes/prisma/prisma_edgecases_test.ts +++ b/tests/runtimes/prisma/prisma_edgecases_test.ts @@ -1,10 +1,11 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test("prisma critical edgecases", async (t) => { + await dropSchema("prisma-edgecases"); const e = await t.engine("runtimes/prisma/prisma_edgecases.py", { secrets: { POSTGRES: @@ -12,9 +13,6 @@ Meta.test("prisma critical edgecases", async (t) => { }, }); - await dropSchemas(e); - await recreateMigrations(e); - // create test data await t.should("insert a record with nested object", async () => { await gql` diff --git a/tests/runtimes/prisma/query_builder_test.ts b/tests/runtimes/prisma/query_builder_test.ts index 52c5115240..e769f10c61 100644 --- a/tests/runtimes/prisma/query_builder_test.ts +++ b/tests/runtimes/prisma/query_builder_test.ts @@ -3,11 +3,12 @@ import { assertEquals } from "@std/assert"; import { PrismaRuntime } from "@metatype/typegate/runtimes/prisma/prisma.ts"; -import { gql, Meta } from "../../utils/mod.ts"; -import { randomPGConnStr } from "../../utils/database.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema, randomPGConnStr } from "test-utils/database.ts"; Meta.test("prisma query builder", async (t) => { - const { connStr, schema: _ } = randomPGConnStr(); + const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine("runtimes/prisma/prisma.py", { secrets: { POSTGRES: connStr, diff --git a/tests/runtimes/prisma/schema_generation_test.ts b/tests/runtimes/prisma/schema_generation_test.ts index dabbe3ea6e..4a53b84eaa 100644 --- a/tests/runtimes/prisma/schema_generation_test.ts +++ b/tests/runtimes/prisma/schema_generation_test.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Meta } from "../../utils/mod.ts"; -import { serialize } from "../../utils/meta.ts"; +import { Meta } from "test-utils/mod.ts"; +import { serialize } from "test-utils/meta.ts"; import { SchemaGenerator } from "@metatype/typegate/runtimes/prisma/hooks/generate_schema.ts"; import * as PrismaRT from "@metatype/typegate/runtimes/prisma/types.ts"; import { assertEquals } from "@std/assert"; diff --git a/tests/runtimes/typegate/typegate_prisma_test.ts b/tests/runtimes/typegate/typegate_prisma_test.ts index bd85fff456..95f23258f6 100644 --- a/tests/runtimes/typegate/typegate_prisma_test.ts +++ b/tests/runtimes/typegate/typegate_prisma_test.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; const adminHeaders = { "Authorization": `Basic ${btoa("admin:password")}`, @@ -11,16 +11,14 @@ const adminHeaders = { Meta.test({ name: "typegate: find available operations", }, async (t) => { - const prismaEngine = await t.engine("runtimes/prisma/prisma.py", { + await dropSchema("prisma_tg_test"); + const _prismaEngine = await t.engine("runtimes/prisma/prisma.py", { secrets: { POSTGRES: - "postgresql://postgres:password@localhost:5432/postgres?schema=prisma_tg_test", + "postgresql://postgres:password@localhost:5432/db?schema=prisma_tg_test", }, }); - await dropSchemas(prismaEngine); - await recreateMigrations(prismaEngine); - const e = t.getTypegraphEngine("typegate"); if (e === undefined) { throw new Error("typegate engine not found"); diff --git a/tests/runtimes/typegate/typegate_runtime_test.ts b/tests/runtimes/typegate/typegate_runtime_test.ts index 951661bfae..490f4a25fc 100644 --- a/tests/runtimes/typegate/typegate_runtime_test.ts +++ b/tests/runtimes/typegate/typegate_runtime_test.ts @@ -1,22 +1,20 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; -import { gql, Meta } from "../../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchema } from "test-utils/database.ts"; Meta.test({ name: "typegate: find available operations", }, async (t) => { - const prismaEngine = await t.engine("runtimes/prisma/prisma.py", { + await dropSchema("prisma_rt_test"); + const _prismaEngine = await t.engine("runtimes/prisma/prisma.py", { secrets: { POSTGRES: - "postgresql://postgres:password@localhost:5432/postgres?schema=prisma_rt_test", + "postgresql://postgres:password@localhost:5432/db?schema=prisma_rt_test", }, }); - await dropSchemas(prismaEngine); - await recreateMigrations(prismaEngine); - const e = t.getTypegraphEngine("typegate"); if (e === undefined) { throw new Error("typegate engine not found"); diff --git a/tests/typecheck/type_alias_test.ts b/tests/typecheck/type_alias_test.ts index b0a7691a1d..8462746722 100644 --- a/tests/typecheck/type_alias_test.ts +++ b/tests/typecheck/type_alias_test.ts @@ -2,18 +2,16 @@ // SPDX-License-Identifier: Elastic-2.0 import { gql, Meta } from "test-utils/mod.ts"; -import { dropSchemas, recreateMigrations } from "test-utils/migrations.ts"; -import { randomPGConnStr } from "test-utils/database.ts"; +import { dropSchema, randomPGConnStr } from "test-utils/database.ts"; Meta.test("Random", async (t) => { - const { connStr } = randomPGConnStr(); + const { connStr, schema } = randomPGConnStr(); + await dropSchema(schema); const e = await t.engine("typecheck/type_alias.py", { secrets: { POSTGRES: connStr, }, }); - await dropSchemas(e); - await recreateMigrations(e); await t.should("validate and work with a basic alias", async () => { await gql` diff --git a/tests/utils/database.ts b/tests/utils/database.ts index 74dc7d57d3..6a021150de 100644 --- a/tests/utils/database.ts +++ b/tests/utils/database.ts @@ -10,7 +10,7 @@ export async function dropSchema(schema: string) { connectionString: "postgresql://postgres:password@localhost:5432/db", }); await client.connect(); - await client.query(`DROP SCHEMA IF EXISTS ${schema} CASCADE`); + await client.query(`DROP SCHEMA IF EXISTS "${schema}" CASCADE`); await client.end(); } From 89a91f96f63ca265461c6aeb812128b87e3d3180 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 12 Nov 2024 15:56:37 +0300 Subject: [PATCH 21/39] wip: more fixes --- src/meta-cli/src/cli/deploy.rs | 17 ++++----- src/meta-cli/src/cli/serialize.rs | 11 +++--- src/meta-cli/src/deploy/actors/task_io.rs | 35 ++++++++++++++++--- .../src/deploy/actors/task_manager.rs | 4 +++ src/typegraph/core/src/global_store.rs | 3 ++ src/typegraph/deno/src/io.ts | 8 +++-- src/typegraph/deno/src/typegraph.ts | 2 +- .../specs/codegen/rpc/typescript/client.ts | 8 +++-- 8 files changed, 61 insertions(+), 27 deletions(-) diff --git a/src/meta-cli/src/cli/deploy.rs b/src/meta-cli/src/cli/deploy.rs index e1ae254975..438887388a 100644 --- a/src/meta-cli/src/cli/deploy.rs +++ b/src/meta-cli/src/cli/deploy.rs @@ -80,6 +80,7 @@ pub struct DeployOptions { /// FIXME: restructure the typegraph core to handle multiple threads /// maximum number of concurrent deployment tasks + #[allow(unused)] #[clap(skip = None)] pub threads: Option, @@ -221,7 +222,7 @@ mod default_mode { deploy.options.allow_destructive, ); - let mut init = TaskManagerInit::::new( + let init = TaskManagerInit::::new( deploy.config.clone(), action_generator, console.clone(), @@ -234,11 +235,9 @@ mod default_mode { .retry( deploy.options.retry.unwrap_or(0), deploy.options.retry_interval_ms.map(Duration::from_millis), - ); + ) + .max_parallel_tasks(1); // FIXME: make the server work with multiple threads - if let Some(max_parallel_tasks) = deploy.options.threads { - init = init.max_parallel_tasks(max_parallel_tasks); - } let report = init.run().await; let summary = report.summary(); @@ -335,7 +334,7 @@ mod watch_mode { deploy.options.allow_destructive, ); - let mut init = TaskManagerInit::::new( + let init = TaskManagerInit::::new( deploy.config.clone(), action_generator.clone(), console.clone(), @@ -344,11 +343,9 @@ mod watch_mode { .retry( deploy.options.retry.unwrap_or(3), deploy.options.retry_interval_ms.map(Duration::from_millis), - ); + ) + .max_parallel_tasks(1); // FIXME: make the server work with multiple threads - if let Some(max_parallel_tasks) = deploy.options.threads { - init = init.max_parallel_tasks(max_parallel_tasks); - } let report = init.run().await; match report.stop_reason { diff --git a/src/meta-cli/src/cli/serialize.rs b/src/meta-cli/src/cli/serialize.rs index 96ee4db8af..82acf8c207 100644 --- a/src/meta-cli/src/cli/serialize.rs +++ b/src/meta-cli/src/cli/serialize.rs @@ -43,7 +43,8 @@ pub struct Serialize { #[clap(short, long)] prefix: Option, - /// FIXME: restructure the typegraph core to handle multiple threads + // FIXME: restructure the typegraph core to handle multiple threads + #[allow(unused)] #[clap(skip = None)] max_parallel_loads: Option, } @@ -79,15 +80,13 @@ impl Action for Serialize { } // TODO fail_fast - let mut init = TaskManagerInit::::new( + let init = TaskManagerInit::::new( config.clone(), action_generator, console, TaskSource::Static(self.files.clone()), - ); - if let Some(max_parallel_tasks) = self.max_parallel_loads { - init = init.max_parallel_tasks(max_parallel_tasks); - } + ) + .max_parallel_tasks(1); // FIXME: make the server work with multiple threads let report = init.run().await; diff --git a/src/meta-cli/src/deploy/actors/task_io.rs b/src/meta-cli/src/deploy/actors/task_io.rs index e396157e5c..61cd0c4f3d 100644 --- a/src/meta-cli/src/deploy/actors/task_io.rs +++ b/src/meta-cli/src/deploy/actors/task_io.rs @@ -59,7 +59,17 @@ impl RpcRequest { RpcResponse { jsonrpc: JsonRpcVersion::V2, id: self.id, - result, + body: RpcBody::Ok { result }, + } + } + + fn error(&self, message: String) -> RpcResponse { + RpcResponse { + jsonrpc: JsonRpcVersion::V2, + id: self.id, + body: RpcBody::Err { + error: RpcError { message }, + }, } } } @@ -68,7 +78,21 @@ impl RpcRequest { struct RpcResponse { jsonrpc: JsonRpcVersion, id: u32, - result: serde_json::Value, + #[serde(flatten)] + body: RpcBody, +} + +#[derive(Serialize, Debug)] +#[serde(untagged)] +enum RpcBody { + Ok { result: serde_json::Value }, + Err { error: RpcError }, +} + +#[derive(Serialize, Debug)] +struct RpcError { + //code: i32, + message: String, } pub(super) struct TaskIoActor { @@ -262,9 +286,10 @@ impl TaskIoActor { self_addr.do_send(message::SendRpcResponse(req.response(response))); } Err(err) => { - console.error(format!( - "{scope} failed to handle jsonrpc call {req:?}: {err}" - )); + //console.error(format!( + // "{scope} failed to handle jsonrpc call {req:?}: {err}" + //)); + self_addr.do_send(message::SendRpcResponse(req.error(err.to_string()))); // TODO fail task? } } diff --git a/src/meta-cli/src/deploy/actors/task_manager.rs b/src/meta-cli/src/deploy/actors/task_manager.rs index 1e679d393c..69eecca4a8 100644 --- a/src/meta-cli/src/deploy/actors/task_manager.rs +++ b/src/meta-cli/src/deploy/actors/task_manager.rs @@ -13,6 +13,7 @@ use signal_handler::set_stop_recipient; use std::collections::VecDeque; use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::Duration; +use typegraph_core::Lib; pub mod report; pub use report::Report; @@ -355,6 +356,9 @@ impl Handler for TaskManager { return; }; + // FIXME: Temporary workaround until refactoring the global state in core + Lib::reset(); + if let Some(stop_reason) = &self.stop_reason { match stop_reason { StopReason::Natural => {} diff --git a/src/typegraph/core/src/global_store.rs b/src/typegraph/core/src/global_store.rs index 010154c1c6..10dbc60d74 100644 --- a/src/typegraph/core/src/global_store.rs +++ b/src/typegraph/core/src/global_store.rs @@ -150,6 +150,9 @@ impl Store { s.materializers.truncate(saved_state.materializers); s.policies.truncate(saved_state.policies); s.deno_modules.truncate(saved_state.deno_modules); + s.graphql_endpoints.clear(); + s.auths.clear(); + s.random_seed.take(); }) } diff --git a/src/typegraph/deno/src/io.ts b/src/typegraph/deno/src/io.ts index 1cbe3b6293..27fb6c19ab 100644 --- a/src/typegraph/deno/src/io.ts +++ b/src/typegraph/deno/src/io.ts @@ -76,7 +76,9 @@ export interface DeployData { export const rpc = { getDeployTarget: () => rpcCall("GetDeployTarget") as Promise, getDeployData: (typegraph: string) => - rpcRequest("GetDeployData", { - typegraph, - }), + rpcRequest( + "GetDeployData", + { typegraph }, + false, // Don't transform object keys + ), }; diff --git a/src/typegraph/deno/src/typegraph.ts b/src/typegraph/deno/src/typegraph.ts index 3de550d07b..fbd878b8e8 100644 --- a/src/typegraph/deno/src/typegraph.ts +++ b/src/typegraph/deno/src/typegraph.ts @@ -227,7 +227,7 @@ export async function typegraph( if (err.payload && !err.cause) { err.cause = err.payload; } - if ("stack" in err.cause) { + if (err.cause && "stack" in err.cause) { console.error(`Error in typegraph '${name}':`); for (const msg of err.cause.stack) { console.error(`- ${msg}`); diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index eccbd57e06..9e44f0b688 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -68,7 +68,7 @@ function readResponse() { return decoder.decode(content); } -function rpcRequest(method: string, params?: P) { +function rpcRequest(method: string, params?: P, transform = true) { const request = { jsonrpc: "2.0", method, @@ -89,7 +89,11 @@ function rpcRequest(method: string, params?: P) { throw new Error(jsonResponse.error.message); } - return transformKeys(jsonResponse.result, toCamelCase) as R; + if (transform) { + return transformKeys(jsonResponse.result, toCamelCase) as R; + } else { + return jsonResponse.result as R; + } } export { rpcRequest }; From f9d32d0f76a6f3e4a524fcd495015f82dadc4cb9 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 12 Nov 2024 21:19:00 +0300 Subject: [PATCH 22/39] fix: snapshot test --- src/meta-cli/src/deploy/actors/task_io.rs | 6 +++--- src/typegraph/core/src/errors.rs | 10 +++++++++- .../__snapshots__/type_comparison_test.ts.snap | 3 +-- tests/schema_validation/type_comparison_test.ts | 3 ++- tests/utils/test.ts | 7 ++++++- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/meta-cli/src/deploy/actors/task_io.rs b/src/meta-cli/src/deploy/actors/task_io.rs index 61cd0c4f3d..90d90f524e 100644 --- a/src/meta-cli/src/deploy/actors/task_io.rs +++ b/src/meta-cli/src/deploy/actors/task_io.rs @@ -286,9 +286,9 @@ impl TaskIoActor { self_addr.do_send(message::SendRpcResponse(req.response(response))); } Err(err) => { - //console.error(format!( - // "{scope} failed to handle jsonrpc call {req:?}: {err}" - //)); + console.error(format!( + "{scope} failed to handle jsonrpc call {req:?}: {err}" + )); self_addr.do_send(message::SendRpcResponse(req.error(err.to_string()))); // TODO fail task? } diff --git a/src/typegraph/core/src/errors.rs b/src/typegraph/core/src/errors.rs index 7ca65001ed..90b08f37b6 100644 --- a/src/typegraph/core/src/errors.rs +++ b/src/typegraph/core/src/errors.rs @@ -9,7 +9,15 @@ pub type Result = std::result::Result; impl std::fmt::Display for TgError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.stack.join("\n")) + write!( + f, + "{}", + self.stack + .iter() + .map(|err| format!("- {err}")) + .collect::>() + .join("\n") + ) } } diff --git a/tests/schema_validation/__snapshots__/type_comparison_test.ts.snap b/tests/schema_validation/__snapshots__/type_comparison_test.ts.snap index e894470e7d..03b01de907 100644 --- a/tests/schema_validation/__snapshots__/type_comparison_test.ts.snap +++ b/tests/schema_validation/__snapshots__/type_comparison_test.ts.snap @@ -49,6 +49,5 @@ snapshot[`type comparison errors 1`] = ` - at type-comparison:/enum_fail_1_test_type/[out]/injected/[in]/field: from_parent injection: - Expected all enum values to be defined on the supertype - at type-comparison:/enum_fail_1_test_type/[out]/injected/[in]/field: from_parent injection: - - Value "\\\\"c\\\\"" (#2) is not defined on the supertype - at type-comparison:/enum_fail_2_test_type/[out]/injected/[in]/field: from_parent injection: Expected the subtype to be an enum -- Typegraph type-comparison failed validation -\` +- Typegraph type-comparison failed validation\` `; diff --git a/tests/schema_validation/type_comparison_test.ts b/tests/schema_validation/type_comparison_test.ts index 7ca64b02ce..e2173439eb 100644 --- a/tests/schema_validation/type_comparison_test.ts +++ b/tests/schema_validation/type_comparison_test.ts @@ -8,9 +8,10 @@ Meta.test("type comparison test", async (t) => { if (!err.stderr) { throw err; } - const errStart = "typegraph.wit.ErrorStack: "; + const errStart = "Exception: "; const errOutput = err.stderr.slice( err.stderr.indexOf(errStart) + errStart.length, + err.stderr.indexOf("\n\n"), ); await t.assertSnapshot(errOutput, { name: "type comparison errors", diff --git a/tests/utils/test.ts b/tests/utils/test.ts index c5b8c8686a..3b851e85ac 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -243,8 +243,13 @@ export class MetaTest { if (typegraphs.length > 1) { throw new Error("Multiple typegraphs"); } - const tgName = typegraphs[0]; + const tgName = opts.typegraph ?? typegraphs[0]; const engine = this.typegate.register.get(tgName)!; + + if (!engine) { + throw new Error(`Typegate engine '${tgName}' not found`); + } + return engine; } From d9cacb2bcd3940dfee065f699a2ab41fb24a8e2b Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 13 Nov 2024 07:12:09 +0300 Subject: [PATCH 23/39] fix: build & merge conflicts --- src/typegraph/core/src/lib.rs | 17 ------ src/typegraph/core/src/params/apply.rs | 2 +- .../core/src/runtimes/substantial.rs | 17 +++--- src/typegraph/core/src/types/sdk/runtimes.rs | 23 ++++---- .../deno/src/runtimes/substantial.ts | 41 +++++--------- .../python/typegraph/runtimes/substantial.py | 55 +++++++------------ .../specs/codegen/src/lib/rust_lib.ts | 7 +++ .../specs/codegen/src/lib/rust_rpc.ts | 7 +++ src/typegraph/specs/types/runtimes.d.ts | 22 ++++---- tools/tasks/build.ts | 19 ++++++- 10 files changed, 92 insertions(+), 118 deletions(-) diff --git a/src/typegraph/core/src/lib.rs b/src/typegraph/core/src/lib.rs index 3f1f49372b..0d1262f163 100644 --- a/src/typegraph/core/src/lib.rs +++ b/src/typegraph/core/src/lib.rs @@ -41,23 +41,6 @@ use types::{ WithRuntimeConfig as _, }; -use wit::core::{ - Artifact, ContextCheck, Policy, PolicyId, PolicySpec, SerializeParams, TransformData, - TypeEither, TypeFile, TypeFloat, TypeFunc, TypeId as CoreTypeId, TypeInteger, TypeList, - TypeOptional, TypeString, TypeStruct, TypeUnion, TypegraphInitParams, -}; -use wit::runtimes::{Guest, MaterializerDenoFunc}; - -pub mod wit { - wit_bindgen::generate!({ - - world: "typegraph" - }); - use crate::Lib; - pub use exports::metatype::typegraph::{aws, core, runtimes, utils}; - export!(Lib); -} - pub struct Lib {} impl sdk::core::Handler for Lib { diff --git a/src/typegraph/core/src/params/apply.rs b/src/typegraph/core/src/params/apply.rs index 7c750e1023..ed6e82c966 100644 --- a/src/typegraph/core/src/params/apply.rs +++ b/src/typegraph/core/src/params/apply.rs @@ -4,7 +4,7 @@ use crate::errors::{ErrorContext, Result, TgError}; use crate::sdk::core::{ParameterTransform, TransformData}; use crate::t::{self, TypeBuilder}; -use crate::types::{Type, TypeDef, TypeId}; +use crate::types::{AsTypeDefEx, TypeDef, TypeId}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt::Write; diff --git a/src/typegraph/core/src/runtimes/substantial.rs b/src/typegraph/core/src/runtimes/substantial.rs index 0801a4481c..7a800acd11 100644 --- a/src/typegraph/core/src/runtimes/substantial.rs +++ b/src/typegraph/core/src/runtimes/substantial.rs @@ -5,10 +5,7 @@ use crate::conversion::runtimes::MaterializerConverter; use crate::errors::Result; use crate::global_store::Store; use crate::sdk::core::FuncParams; -use crate::sdk::{ - core::RuntimeId, runtimes::Effect, runtimes::SubstantialOperationData, - runtimes::SubstantialOperationType, -}; +use crate::sdk::{core::RuntimeId, runtimes::Effect, runtimes::SubstantialOperationData}; use crate::t::{self, TypeBuilder}; use crate::typegraph::TypegraphContext; use crate::types::WithRuntimeConfig; @@ -83,7 +80,7 @@ pub fn substantial_operation( ); ( - WitEffect::Create(true), + Effect::Create(true), SubstantialMaterializer::Start { secrets: data.secrets, }, @@ -95,7 +92,7 @@ pub fn substantial_operation( inp.prop("kwargs", t_json_string()?.into()); ( - WitEffect::Create(true), + Effect::Create(true), SubstantialMaterializer::StartRaw { secrets: data.secrets, }, @@ -121,7 +118,7 @@ pub fn substantial_operation( inp.prop("event", event); ( - WitEffect::Create(false), + Effect::Create(false), SubstantialMaterializer::Send, t::string().build()?, ) @@ -136,7 +133,7 @@ pub fn substantial_operation( inp.prop("event", event); ( - WitEffect::Create(false), + Effect::Create(false), SubstantialMaterializer::SendRaw, t::string().build()?, ) @@ -163,7 +160,7 @@ pub fn substantial_operation( SubstantialOperationData::Results(data) => { inp.prop("name", t::string().build()?); ( - WitEffect::Read, + Effect::Read, SubstantialMaterializer::Results, results_op_results_ty(data)?, ) @@ -171,7 +168,7 @@ pub fn substantial_operation( SubstantialOperationData::ResultsRaw => { inp.prop("name", t::string().build()?); ( - WitEffect::Read, + Effect::Read, SubstantialMaterializer::ResultsRaw, results_op_results_ty(t_json_string()?)?, ) diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs index fbf1b33487..4d47008055 100644 --- a/src/typegraph/core/src/types/sdk/runtimes.rs +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -243,27 +243,26 @@ pub struct SubstantialRuntimeData { pub file_descriptions: Vec, } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SubstantialStartData { + pub func_arg: Option, + pub secrets: Vec, +} + #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] -pub enum SubstantialOperationType { - Start, - StartRaw, +pub enum SubstantialOperationData { + Start(SubstantialStartData), + StartRaw(SubstantialStartData), Stop, - Send, + Send(TypeId), SendRaw, Resources, - Results, + Results(TypeId), ResultsRaw, InternalLinkParentChild, } -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct SubstantialOperationData { - pub func_arg: Option, - pub func_out: Option, - pub operation: SubstantialOperationType, -} - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct KvRuntimeData { pub url: String, diff --git a/src/typegraph/deno/src/runtimes/substantial.ts b/src/typegraph/deno/src/runtimes/substantial.ts index 105b459f79..8edcba47e6 100644 --- a/src/typegraph/deno/src/runtimes/substantial.ts +++ b/src/typegraph/deno/src/runtimes/substantial.ts @@ -41,20 +41,14 @@ export class SubstantialRuntime extends Runtime { kwargs: Typedef, { secrets }: StartFunc = {}, ): Func { - return this._genericSubstantialFunc( - { - tag: "start", - val: { secrets: secrets ?? [], funcArg: kwargs._id }, - }, - ); + return this._genericSubstantialFunc({ + start: { secrets: secrets ?? [], funcArg: kwargs._id }, + }); } - startRaw( - { secrets }: StartFunc = {}, - ): Func { + startRaw({ secrets }: StartFunc = {}): Func { return this._genericSubstantialFunc({ - tag: "start-raw", - val: { secrets: secrets ?? [] }, + startRaw: { secrets: secrets ?? [] }, }); } @@ -63,12 +57,9 @@ export class SubstantialRuntime extends Runtime { } send(payload: Typedef): Func { - return this._genericSubstantialFunc( - { - tag: "send", - val: payload._id, - }, - ); + return this._genericSubstantialFunc({ + send: payload._id, + }); } sendRaw(): Func { @@ -80,12 +71,9 @@ export class SubstantialRuntime extends Runtime { } queryResults(output: Typedef): Func { - return this._genericSubstantialFunc( - { - tag: "results", - val: output._id, - }, - ); + return this._genericSubstantialFunc({ + results: output._id, + }); } queryResultsRaw(): Func { @@ -109,17 +97,16 @@ export class SubstantialRuntime extends Runtime { export class Backend { static devMemory(): SubstantialBackend { - return { tag: "memory" }; + return "memory"; } static devFs(): SubstantialBackend { - return { tag: "fs" }; + return "fs"; } static redis(connectionStringSecret: string): SubstantialBackend { return { - tag: "redis", - val: { + redis: { connectionStringSecret, }, }; diff --git a/src/typegraph/python/typegraph/runtimes/substantial.py b/src/typegraph/python/typegraph/runtimes/substantial.py index 715694af66..9ff28af272 100644 --- a/src/typegraph/python/typegraph/runtimes/substantial.py +++ b/src/typegraph/python/typegraph/runtimes/substantial.py @@ -7,17 +7,8 @@ RedisBackend, SubstantialBackend, SubstantialOperationData, - SubstantialOperationDataInternalLinkParentChild, - SubstantialOperationDataResources, - SubstantialOperationDataResults, - SubstantialOperationDataResultsRaw, - SubstantialOperationDataSend, - SubstantialOperationDataSendRaw, - SubstantialOperationDataStart, - SubstantialOperationDataStartRaw, - SubstantialOperationDataStop, - SubstantialRuntimeData, SubstantialStartData, + SubstantialRuntimeData, WorkflowFileDescription, WorkflowKind, ) @@ -32,56 +23,48 @@ def __init__( file_descriptions: List[WorkflowFileDescription], ): data = SubstantialRuntimeData(backend, file_descriptions) - res = runtimes.register_substantial_runtime(store, data) - if isinstance(res, Err): - raise Exception(res.value) - super().__init__(res.value) + res = runtimes.register_substantial_runtime(data) + super().__init__(res) self.backend = backend def _generic_substantial_func( self, data: SubstantialOperationData, ): - func_data = runtimes.generate_substantial_operation(store, self.id, data) + func_data = runtimes.generate_substantial_operation(self.id, data) return t.func.from_type_func(func_data) def start(self, kwargs: "t.struct", *, secrets: Optional[List[str]] = None): return self._generic_substantial_func( - SubstantialOperationDataStart( - SubstantialStartData(kwargs._id, secrets or []) - ) + {"start": SubstantialStartData(kwargs._id, secrets or [])} ) def start_raw(self, *, secrets: Optional[List[str]] = None): return self._generic_substantial_func( - SubstantialOperationDataStartRaw(SubstantialStartData(None, secrets or [])) + {"start_raw": SubstantialStartData(None, secrets or [])} ) def stop(self): - return self._generic_substantial_func(SubstantialOperationDataStop()) + return self._generic_substantial_func("stop") def send(self, payload: "t.typedef"): - return self._generic_substantial_func(SubstantialOperationDataSend(payload._id)) + return self._generic_substantial_func({"send": payload._id}) def send_raw(self): - return self._generic_substantial_func(SubstantialOperationDataSendRaw()) + return self._generic_substantial_func("send_raw") def query_resources(self): - return self._generic_substantial_func(SubstantialOperationDataResources()) + return self._generic_substantial_func("resources") def query_results(self, output: "t.typedef"): - return self._generic_substantial_func( - SubstantialOperationDataResults(output._id) - ) + return self._generic_substantial_func({"results": output._id}) def query_results_raw(self): - return self._generic_substantial_func(SubstantialOperationDataResultsRaw()) + return self._generic_substantial_func("results_raw") def _internal_link_parent_child(self): - return self._generic_substantial_func( - SubstantialOperationDataInternalLinkParentChild() - ) + return self._generic_substantial_func("internal_link_parent_child") def internals(self): return { @@ -95,16 +78,16 @@ def internals(self): class Backend: @staticmethod - def dev_memory(): - return SubstantialBackendMemory() + def dev_memory() -> SubstantialBackend: + return "memory" @staticmethod - def dev_fs(): - return SubstantialBackendFs() + def dev_fs() -> SubstantialBackend: + return "fs" @staticmethod - def redis(connection_string_secret: str): - return SubstantialBackendRedis(value=RedisBackend(connection_string_secret)) + def redis(connection_string_secret: str) -> SubstantialBackend: + return {"redis": RedisBackend(connection_string_secret)} class WorkflowFile: diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts index 5776cb2488..d101c9f2f8 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_lib.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -104,6 +104,13 @@ ${this.funcDefs.map((f) => ` ${this.formatFuncDef(f)}`).join("\n")} Deno.writeTextFileSync(path.join(outDir, "mod.rs"), imports); + const cmd = new Deno.Command("cargo", { + cwd: outDir, + args: ["fmt", "-p", "typegraph_core"], + }); + + cmd.outputSync(); + console.log("mod.rs was created"); } } diff --git a/src/typegraph/specs/codegen/src/lib/rust_rpc.ts b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts index c27bbbda2e..c0b1c8ec76 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_rpc.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts @@ -99,6 +99,13 @@ ${sources.map(({ moduleName }) => ` ${toPascalCase(moduleName)}(${moduleName} Deno.writeTextFileSync(path.join(outDir, "mod.rs"), fileContent); + const cmd = new Deno.Command("cargo", { + cwd: outDir, + args: ["fmt", "-p", "meta-cli"], + }); + + cmd.outputSync(); + console.log("mod.rs was created"); } } diff --git a/src/typegraph/specs/types/runtimes.d.ts b/src/typegraph/specs/types/runtimes.d.ts index f1c83ffa17..ebcb11c517 100644 --- a/src/typegraph/specs/types/runtimes.d.ts +++ b/src/typegraph/specs/types/runtimes.d.ts @@ -186,23 +186,22 @@ type SubstantialRuntimeData = { file_descriptions: WorkflowFileDescription[]; }; -type SubstantialOperationType = - | "start" - | "start_raw" +type SubstantialStartData = { + func_arg?: TypeId; + secrets: string[]; +}; + +type SubstantialOperationData = + | { start: SubstantialStartData } + | { start_raw: SubstantialStartData } | "stop" - | "send" + | { send: TypeId } | "send_raw" | "resources" - | "results" + | { results: TypeId } | "results_raw" | "internal_link_parent_child"; -type SubstantialOperationData = { - func_arg?: TypeId; - func_out?: TypeId; - operation: SubstantialOperationType; -}; - type KvRuntimeData = { url: string; }; @@ -415,7 +414,6 @@ export type { WorkflowKind, WorkflowFileDescription, SubstantialRuntimeData, - SubstantialOperationType, SubstantialOperationData, KvRuntimeData, KvMaterializer, diff --git a/tools/tasks/build.ts b/tools/tasks/build.ts index c3fedbc7b9..e4d80984d1 100644 --- a/tools/tasks/build.ts +++ b/tools/tasks/build.ts @@ -39,7 +39,6 @@ export default { }, }, "build-tgraph-ts": { - dependsOn: "build-tgraph-core", inherit: ["build-tgraph-core", "_ecma"], async fn($) { const genPath = await $.removeIfExists( @@ -49,6 +48,16 @@ export default { await $`$TG_CODEGEN typescript ${genPath}`; }, }, + "build-tgraph-rpc": { + inherit: ["build-tgraph-core", "_rust"], + async fn($) { + const genPath = await $.removeIfExists( + $.workingDir.join("src/meta-cli/src/typegraph/rpc"), + ); + + await $`$TG_CODEGEN rust-rpc ${genPath}`; + }, + }, "build-tgraph-ts-node": { dependsOn: "build-tgraph-ts", inherit: ["build-tgraph-ts"], @@ -62,7 +71,6 @@ export default { }, }, "build-tgraph-py": { - dependsOn: "build-tgraph-core", inherit: ["build-tgraph-core", "_python"], async fn($) { const genPath = await $.removeIfExists( @@ -74,7 +82,12 @@ export default { }, }, "build-tgraph": { - dependsOn: ["build-tgraph-py", "build-tgraph-ts-node"], + dependsOn: [ + "build-tgraph-core", + "build-tgraph-rpc", + "build-tgraph-py", + "build-tgraph-ts-node", + ], }, "build-pyrt": { inherit: "_wasm", From 0a709c2da31a16cf2159d731d3f195244728b29b Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 13 Nov 2024 07:23:16 +0300 Subject: [PATCH 24/39] fixup: missing import --- src/meta-cli/src/deploy/actors/task_manager.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/meta-cli/src/deploy/actors/task_manager.rs b/src/meta-cli/src/deploy/actors/task_manager.rs index 821e346bc2..353e329353 100644 --- a/src/meta-cli/src/deploy/actors/task_manager.rs +++ b/src/meta-cli/src/deploy/actors/task_manager.rs @@ -3,6 +3,7 @@ use super::console::{Console, ConsoleActor}; use super::discovery::DiscoveryActor; use super::task::action::{TaskAction, TaskActionGenerator}; +use super::task::deploy::TypegraphData; use super::task::{self, TaskActor, TaskFinishStatus}; use super::watcher::{self, WatcherActor}; use crate::{config::Config, interlude::*}; From 87b6774e705bbe5bf9b12140054d0448b6837360 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 13 Nov 2024 07:37:40 +0300 Subject: [PATCH 25/39] fix: jsonrpc prefix --- src/typegraph/specs/codegen/rpc/python/client.py | 2 +- src/typegraph/specs/codegen/rpc/typescript/client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/typegraph/specs/codegen/rpc/python/client.py b/src/typegraph/specs/codegen/rpc/python/client.py index af60b431a2..94cd646ca4 100644 --- a/src/typegraph/specs/codegen/rpc/python/client.py +++ b/src/typegraph/specs/codegen/rpc/python/client.py @@ -19,7 +19,7 @@ def rpc_request(method: str, params: Optional[Any] = None): json_request = json.dumps(request) - sys.stdout.write("jsonrpc: " + json_request + "\n") + sys.stdout.write("jsonrpc$: " + json_request + "\n") sys.stdout.flush() state["id"] += 1 diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 9e44f0b688..19d91ba4bf 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -77,7 +77,7 @@ function rpcRequest(method: string, params?: P, transform = true) { }; const jsonRequest = JSON.stringify(request); - const message = encoder.encode("jsonrpc: " + jsonRequest + "\n"); + const message = encoder.encode("jsonrpc$: " + jsonRequest + "\n"); Deno.stdout.writeSync(message); state.id += 1; From c72ddaa1122d29cf30dce1e37c3057cccb4c620d Mon Sep 17 00:00:00 2001 From: Natoandro Date: Thu, 14 Nov 2024 07:57:21 +0300 Subject: [PATCH 26/39] lint (pre-commit) --- src/typegraph/core/src/types/sdk/aws.rs | 14 ++- src/typegraph/core/src/types/sdk/core.rs | 23 +++- src/typegraph/core/src/types/sdk/mod.rs | 2 +- src/typegraph/core/src/types/sdk/runtimes.rs | 114 ++++++++++++++---- src/typegraph/core/src/types/sdk/utils.rs | 26 +++- src/typegraph/deno/src/runtimes/deno.ts | 10 +- src/typegraph/deno/src/runtimes/http.ts | 6 +- src/typegraph/deno/src/sdk.ts | 2 +- src/typegraph/deno/src/tg_artifact_upload.ts | 3 +- src/typegraph/deno/src/typegraph.ts | 10 +- src/typegraph/deno/src/types.ts | 20 +-- src/typegraph/deno/src/utils/func_utils.ts | 4 +- .../specs/codegen/rpc/python/client.py | 2 +- .../specs/codegen/src/lib/rust_lib.ts | 2 +- tools/jsr/deno2node.ts | 12 +- 15 files changed, 177 insertions(+), 73 deletions(-) diff --git a/src/typegraph/core/src/types/sdk/aws.rs b/src/typegraph/core/src/types/sdk/aws.rs index f39fa4155e..08475ec9b1 100644 --- a/src/typegraph/core/src/types/sdk/aws.rs +++ b/src/typegraph/core/src/types/sdk/aws.rs @@ -1,5 +1,5 @@ -use serde::{Serialize, Deserialize}; use super::core::{MaterializerId, RuntimeId}; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct S3RuntimeData { @@ -25,9 +25,15 @@ pub struct S3PresignPutParams { pub trait Handler { fn register_s3_runtime(data: S3RuntimeData) -> Result; - fn s3_presign_get(runtime: RuntimeId, data: S3PresignGetParams) -> Result; - fn s3_presign_put(runtime: RuntimeId, data: S3PresignPutParams) -> Result; + fn s3_presign_get( + runtime: RuntimeId, + data: S3PresignGetParams, + ) -> Result; + fn s3_presign_put( + runtime: RuntimeId, + data: S3PresignPutParams, + ) -> Result; fn s3_list(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload_all(runtime: RuntimeId, bucket: String) -> Result; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/core.rs b/src/typegraph/core/src/types/sdk/core.rs index f4c33fb951..d612dfd6c9 100644 --- a/src/typegraph/core/src/types/sdk/core.rs +++ b/src/typegraph/core/src/types/sdk/core.rs @@ -1,4 +1,4 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Error { @@ -218,7 +218,9 @@ pub struct FuncParams { pub trait Handler { fn init_typegraph(params: TypegraphInitParams) -> Result<(), super::Error>; - fn serialize_typegraph(params: SerializeParams) -> Result<(String, Vec), super::Error>; + fn serialize_typegraph( + params: SerializeParams, + ) -> Result<(String, Vec), super::Error>; fn with_injection(type_id: TypeId, injection: String) -> Result; fn with_config(type_id: TypeId, config: String) -> Result; fn refb(name: String, attributes: Option) -> Result; @@ -236,13 +238,22 @@ pub trait Handler { fn extend_struct(tpe: TypeId, props: Vec<(String, TypeId)>) -> Result; fn get_type_repr(id: TypeId) -> Result; fn funcb(data: TypeFunc) -> Result; - fn get_transform_data(resolver_input: TypeId, transform_tree: String) -> Result; + fn get_transform_data( + resolver_input: TypeId, + transform_tree: String, + ) -> Result; fn register_policy(pol: Policy) -> Result; fn with_policy(type_id: TypeId, policy_chain: Vec) -> Result; fn get_public_policy() -> Result<(PolicyId, String), super::Error>; fn get_internal_policy() -> Result<(PolicyId, String), super::Error>; - fn register_context_policy(key: String, check: ContextCheck) -> Result<(PolicyId, String), super::Error>; + fn register_context_policy( + key: String, + check: ContextCheck, + ) -> Result<(PolicyId, String), super::Error>; fn rename_type(tpe: TypeId, new_name: String) -> Result; - fn expose(fns: Vec<(String, TypeId)>, default_policy: Option>) -> Result<(), super::Error>; + fn expose( + fns: Vec<(String, TypeId)>, + default_policy: Option>, + ) -> Result<(), super::Error>; fn set_seed(seed: Option) -> Result<(), super::Error>; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs index 7e6a739737..fa6efef03e 100644 --- a/src/typegraph/core/src/types/sdk/mod.rs +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -2,4 +2,4 @@ pub mod aws; pub mod core; pub mod runtimes; pub mod utils; -pub use core::Error; \ No newline at end of file +pub use self::core::Error; diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs index 4d47008055..d4622face2 100644 --- a/src/typegraph/core/src/types/sdk/runtimes.rs +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -1,5 +1,5 @@ -use serde::{Serialize, Deserialize}; use super::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; +use serde::{Deserialize, Serialize}; pub type Idempotency = bool; @@ -291,26 +291,67 @@ pub struct GrpcData { pub trait Handler { fn get_deno_runtime() -> Result; - fn register_deno_func(data: MaterializerDenoFunc, effect: Effect) -> Result; - fn register_deno_static(data: MaterializerDenoStatic, type_id: TypeId) -> Result; - fn get_predefined_deno_func(data: MaterializerDenoPredefined) -> Result; - fn import_deno_function(data: MaterializerDenoImport, effect: Effect) -> Result; + fn register_deno_func( + data: MaterializerDenoFunc, + effect: Effect, + ) -> Result; + fn register_deno_static( + data: MaterializerDenoStatic, + type_id: TypeId, + ) -> Result; + fn get_predefined_deno_func( + data: MaterializerDenoPredefined, + ) -> Result; + fn import_deno_function( + data: MaterializerDenoImport, + effect: Effect, + ) -> Result; fn register_graphql_runtime(data: GraphqlRuntimeData) -> Result; - fn graphql_query(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; - fn graphql_mutation(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; + fn graphql_query( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + ) -> Result; + fn graphql_mutation( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + ) -> Result; fn register_http_runtime(data: HttpRuntimeData) -> Result; - fn http_request(base: BaseMaterializer, data: MaterializerHttpRequest) -> Result; + fn http_request( + base: BaseMaterializer, + data: MaterializerHttpRequest, + ) -> Result; fn register_python_runtime() -> Result; - fn from_python_lambda(base: BaseMaterializer, data: MaterializerPythonLambda) -> Result; - fn from_python_def(base: BaseMaterializer, data: MaterializerPythonDef) -> Result; - fn from_python_module(base: BaseMaterializer, data: MaterializerPythonModule) -> Result; - fn from_python_import(base: BaseMaterializer, data: MaterializerPythonImport) -> Result; + fn from_python_lambda( + base: BaseMaterializer, + data: MaterializerPythonLambda, + ) -> Result; + fn from_python_def( + base: BaseMaterializer, + data: MaterializerPythonDef, + ) -> Result; + fn from_python_module( + base: BaseMaterializer, + data: MaterializerPythonModule, + ) -> Result; + fn from_python_import( + base: BaseMaterializer, + data: MaterializerPythonImport, + ) -> Result; fn register_random_runtime(data: RandomRuntimeData) -> Result; - fn create_random_mat(base: BaseMaterializer, data: MaterializerRandom) -> Result; + fn create_random_mat( + base: BaseMaterializer, + data: MaterializerRandom, + ) -> Result; fn register_wasm_reflected_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_reflected_func(base: BaseMaterializer, data: MaterializerWasmReflectedFunc) -> Result; + fn from_wasm_reflected_func( + base: BaseMaterializer, + data: MaterializerWasmReflectedFunc, + ) -> Result; fn register_wasm_wire_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_wire_handler(base: BaseMaterializer, data: MaterializerWasmWireHandler) -> Result; + fn from_wasm_wire_handler( + base: BaseMaterializer, + data: MaterializerWasmWireHandler, + ) -> Result; fn register_prisma_runtime(data: PrismaRuntimeData) -> Result; fn prisma_find_unique(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_find_many(runtime: RuntimeId, model: TypeId) -> Result; @@ -325,18 +366,43 @@ pub trait Handler { fn prisma_upsert_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_many(runtime: RuntimeId, model: TypeId) -> Result; - fn prisma_execute(runtime: RuntimeId, query: String, param: TypeId, effect: Effect) -> Result; - fn prisma_query_raw(runtime: RuntimeId, query: String, out: TypeId, param: Option) -> Result; + fn prisma_execute( + runtime: RuntimeId, + query: String, + param: TypeId, + effect: Effect, + ) -> Result; + fn prisma_query_raw( + runtime: RuntimeId, + query: String, + out: TypeId, + param: Option, + ) -> Result; fn prisma_link(data: PrismaLinkData) -> Result; fn prisma_migration(operation: PrismaMigrationOperation) -> Result; fn register_temporal_runtime(data: TemporalRuntimeData) -> Result; - fn generate_temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Result; - fn register_typegate_materializer(operation: TypegateOperation) -> Result; - fn register_typegraph_materializer(operation: TypegraphOperation) -> Result; - fn register_substantial_runtime(data: SubstantialRuntimeData) -> Result; - fn generate_substantial_operation(runtime: RuntimeId, data: SubstantialOperationData) -> Result; + fn generate_temporal_operation( + runtime: RuntimeId, + data: TemporalOperationData, + ) -> Result; + fn register_typegate_materializer( + operation: TypegateOperation, + ) -> Result; + fn register_typegraph_materializer( + operation: TypegraphOperation, + ) -> Result; + fn register_substantial_runtime( + data: SubstantialRuntimeData, + ) -> Result; + fn generate_substantial_operation( + runtime: RuntimeId, + data: SubstantialOperationData, + ) -> Result; fn register_kv_runtime(data: KvRuntimeData) -> Result; - fn kv_operation(base: BaseMaterializer, data: KvMaterializer) -> Result; + fn kv_operation( + base: BaseMaterializer, + data: KvMaterializer, + ) -> Result; fn register_grpc_runtime(data: GrpcRuntimeData) -> Result; fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/utils.rs b/src/typegraph/core/src/types/sdk/utils.rs index e05f8d789c..2581e4396b 100644 --- a/src/typegraph/core/src/types/sdk/utils.rs +++ b/src/typegraph/core/src/types/sdk/utils.rs @@ -1,5 +1,5 @@ -use serde::{Serialize, Deserialize}; use super::core::TypeId; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ReduceEntry { @@ -49,11 +49,25 @@ pub trait Handler { fn add_auth(data: Auth) -> Result; fn add_raw_auth(data: String) -> Result; fn oauth2(service_name: String, scopes: String) -> Result; - fn oauth2_without_profiler(service_name: String, scopes: String) -> Result; - fn oauth2_with_extended_profiler(service_name: String, scopes: String, extension: String) -> Result; - fn oauth2_with_custom_profiler(service_name: String, scopes: String, profiler: TypeId) -> Result; + fn oauth2_without_profiler( + service_name: String, + scopes: String, + ) -> Result; + fn oauth2_with_extended_profiler( + service_name: String, + scopes: String, + extension: String, + ) -> Result; + fn oauth2_with_custom_profiler( + service_name: String, + scopes: String, + profiler: TypeId, + ) -> Result; fn gql_deploy_query(params: QueryDeployParams) -> Result; fn gql_remove_query(tg_name: Vec) -> Result; fn metagen_exec(config: FdkConfig) -> Result, super::Error>; - fn metagen_write_files(items: Vec, typegraph_dir: String) -> Result<(), super::Error>; -} \ No newline at end of file + fn metagen_write_files( + items: Vec, + typegraph_dir: String, + ) -> Result<(), super::Error>; +} diff --git a/src/typegraph/deno/src/runtimes/deno.ts b/src/typegraph/deno/src/runtimes/deno.ts index f0190da552..56bd6dcb87 100644 --- a/src/typegraph/deno/src/runtimes/deno.ts +++ b/src/typegraph/deno/src/runtimes/deno.ts @@ -130,10 +130,9 @@ export class DenoRuntime extends Runtime { policy(name: string, _code: string): Policy; policy(name: string, data: Omit): Policy; policy(name: string, data: string | Omit): Policy { - const params = - typeof data === "string" - ? { code: data, secrets: [] } - : { secrets: [], ...data }; + const params = typeof data === "string" + ? { code: data, secrets: [] } + : { secrets: [], ...data }; return Policy.create( name, @@ -145,8 +144,7 @@ export class DenoRuntime extends Runtime { } importPolicy(data: Omit, name?: string): Policy { - const policyName = - name ?? + const policyName = name ?? `__imp_${data.module}_${data.name}`.replace(/[^a-zA-Z0-9_]/g, "_"); return Policy.create( policyName, diff --git a/src/typegraph/deno/src/runtimes/http.ts b/src/typegraph/deno/src/runtimes/http.ts index 94e8aa395a..009e285ac8 100644 --- a/src/typegraph/deno/src/runtimes/http.ts +++ b/src/typegraph/deno/src/runtimes/http.ts @@ -11,8 +11,10 @@ import { runtimes } from "../sdk.ts"; import { Materializer, Runtime } from "./mod.ts"; import { fx } from "../index.ts"; -type HttpRequestMat = Materializer & - Omit & { +type HttpRequestMat = + & Materializer + & Omit + & { method: M; }; diff --git a/src/typegraph/deno/src/sdk.ts b/src/typegraph/deno/src/sdk.ts index 095a8e20e5..69d60f8cab 100644 --- a/src/typegraph/deno/src/sdk.ts +++ b/src/typegraph/deno/src/sdk.ts @@ -6,7 +6,7 @@ import * as runtimes from "./gen/runtimes.ts"; import * as aws from "./gen/aws.ts"; import * as sdkUtils from "./gen/utils.ts"; -export { core, runtimes, aws, sdkUtils }; +export { aws, core, runtimes, sdkUtils }; export type { Cors, Rate } from "./gen/core.ts"; export type { Auth, AuthProtocol } from "./gen/utils.ts"; diff --git a/src/typegraph/deno/src/tg_artifact_upload.ts b/src/typegraph/deno/src/tg_artifact_upload.ts index 34e6f83594..2d3c1ae44c 100644 --- a/src/typegraph/deno/src/tg_artifact_upload.ts +++ b/src/typegraph/deno/src/tg_artifact_upload.ts @@ -49,7 +49,8 @@ export class ArtifactUploader { // const uploadUrls: Array = await response.json(); if (uploadUrls.length !== artifactMetas.length) { - const diff = `array length mismatch: ${uploadUrls.length} !== ${artifactMetas.length}`; + const diff = + `array length mismatch: ${uploadUrls.length} !== ${artifactMetas.length}`; throw new Error(`Failed to get upload URLs for all artifacts: ${diff}`); } diff --git a/src/typegraph/deno/src/typegraph.ts b/src/typegraph/deno/src/typegraph.ts index fbd878b8e8..30a7f862b3 100644 --- a/src/typegraph/deno/src/typegraph.ts +++ b/src/typegraph/deno/src/typegraph.ts @@ -156,12 +156,14 @@ export async function typegraph( maybeBuilder?: TypegraphBuilder, ): Promise { ++counter; - const args = - typeof nameOrArgs === "string" ? { name: nameOrArgs } : nameOrArgs; + const args = typeof nameOrArgs === "string" + ? { name: nameOrArgs } + : nameOrArgs; const { name, dynamic, cors, prefix, rate, secrets } = args; - const builder = - "builder" in args ? (args.builder as TypegraphBuilder) : maybeBuilder!; + const builder = "builder" in args + ? (args.builder as TypegraphBuilder) + : maybeBuilder!; const file = caller(); if (!file) { diff --git a/src/typegraph/deno/src/types.ts b/src/typegraph/deno/src/types.ts index feaa4b3792..3bd060fa9d 100644 --- a/src/typegraph/deno/src/types.ts +++ b/src/typegraph/deno/src/types.ts @@ -46,18 +46,20 @@ export type PolicySpec = | Policy | PolicyPerEffectObject | { - none: Policy; - create: Policy; - update: Policy; - delete: Policy; - }; + none: Policy; + create: Policy; + update: Policy; + delete: Policy; + }; export type Simplified = Omit; -export type SimplifiedNumericData = { enumeration?: number[] } & Omit< - T, - "enumeration" ->; +export type SimplifiedNumericData = + & { enumeration?: number[] } + & Omit< + T, + "enumeration" + >; export function getPolicyChain( policy: PolicySpec[] | PolicySpec, diff --git a/src/typegraph/deno/src/utils/func_utils.ts b/src/typegraph/deno/src/utils/func_utils.ts index 0c0cb300f2..299c87b628 100644 --- a/src/typegraph/deno/src/utils/func_utils.ts +++ b/src/typegraph/deno/src/utils/func_utils.ts @@ -153,8 +153,8 @@ export function freezeTgOutput( config: SerializeParams, tgOutput: TypegraphOutput, ): TypegraphOutput { - frozenMemo[tgOutput.name] = - frozenMemo[tgOutput.name] ?? tgOutput.serialize(config); + frozenMemo[tgOutput.name] = frozenMemo[tgOutput.name] ?? + tgOutput.serialize(config); return { ...tgOutput, serialize: () => frozenMemo[tgOutput.name], diff --git a/src/typegraph/specs/codegen/rpc/python/client.py b/src/typegraph/specs/codegen/rpc/python/client.py index 94cd646ca4..e792d7ec0a 100644 --- a/src/typegraph/specs/codegen/rpc/python/client.py +++ b/src/typegraph/specs/codegen/rpc/python/client.py @@ -14,7 +14,7 @@ def rpc_request(method: str, params: Optional[Any] = None): "id": state["id"], } - if params != None: + if params is not None: request["params"] = params json_request = json.dumps(request) diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts index d101c9f2f8..1416cfa984 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_lib.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -99,7 +99,7 @@ ${this.funcDefs.map((f) => ` ${this.formatFuncDef(f)}`).join("\n")} override postGenerate(sources: TypeDefSource[], outDir: string) { const imports = sources .map(({ moduleName }) => `pub mod ${moduleName};`) - .concat("pub use core::Error;") + .concat("pub use self::core::Error;\n") .join("\n"); Deno.writeTextFileSync(path.join(outDir, "mod.rs"), imports); diff --git a/tools/jsr/deno2node.ts b/tools/jsr/deno2node.ts index e12cc988e3..96de977529 100644 --- a/tools/jsr/deno2node.ts +++ b/tools/jsr/deno2node.ts @@ -15,11 +15,13 @@ console.log("deno2node"); await dnt.emptyDir(outDir); const entryPoints: dnt.BuildOptions["entryPoints"] = [join(srcDir, "index.ts")]; -for (const { name, path } of expandGlobSync("./**/*.*", { - root: srcDir, - includeDirs: false, - globstar: true, -})) { +for ( + const { name, path } of expandGlobSync("./**/*.*", { + root: srcDir, + includeDirs: false, + globstar: true, + }) +) { if (path.endsWith(".d.ts")) { continue; } From 1f9f15961b09e0b333d468b4a90959c89809ac6e Mon Sep 17 00:00:00 2001 From: Natoandro Date: Thu, 14 Nov 2024 09:11:04 +0300 Subject: [PATCH 27/39] remove conflicting migrations --- .../migration.sql | 54 ------------------- .../migration.sql | 0 2 files changed, 54 deletions(-) delete mode 100644 tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql rename tests/prisma-migrations/prisma/prisma/{20241112084630_generated => 20241114060926_generated}/migration.sql (100%) diff --git a/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql b/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql deleted file mode 100644 index 6b2e1c2a8c..0000000000 --- a/tests/prisma-migrations/prisma/prisma/20241112111545_initial_migration_renamed/migration.sql +++ /dev/null @@ -1,54 +0,0 @@ --- CreateTable -CREATE TABLE "record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "renamed_record" ( - "id" UUID NOT NULL, - "name" TEXT NOT NULL, - "age" INTEGER, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "renamed_record_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "users" ( - "id" SERIAL NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "users_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_identity" ( - "id" UUID NOT NULL, - "provider" TEXT NOT NULL, - "identifier" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - - CONSTRAINT "user_identity_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "messages" ( - "id" INTEGER NOT NULL, - "time" INTEGER NOT NULL, - "message" TEXT NOT NULL, - "senderId" INTEGER NOT NULL, - - CONSTRAINT "messages_pkey" PRIMARY KEY ("id") -); - --- AddForeignKey -ALTER TABLE "user_identity" ADD CONSTRAINT "user_identity_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "messages" ADD CONSTRAINT "messages_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/tests/prisma-migrations/prisma/prisma/20241112084630_generated/migration.sql b/tests/prisma-migrations/prisma/prisma/20241114060926_generated/migration.sql similarity index 100% rename from tests/prisma-migrations/prisma/prisma/20241112084630_generated/migration.sql rename to tests/prisma-migrations/prisma/prisma/20241114060926_generated/migration.sql From b54bdf144f9e8eebcf857cae73cdde2aff9dc5e3 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Thu, 14 Nov 2024 15:41:20 +0300 Subject: [PATCH 28/39] fix: build & some tests --- .ghjk/lock.json | 248 +++++++++++-------- src/meta-cli/src/typegraph/rpc/mod.rs | 2 +- src/meta-cli/src/typegraph/rpc/runtimes.rs | 7 - src/typegraph/core/src/global_store.rs | 12 +- src/typegraph/core/src/typegraph.rs | 5 +- src/typegraph/core/src/types/sdk/aws.rs | 14 +- src/typegraph/core/src/types/sdk/core.rs | 23 +- src/typegraph/core/src/types/sdk/mod.rs | 2 +- src/typegraph/core/src/types/sdk/runtimes.rs | 115 ++------- src/typegraph/core/src/types/sdk/utils.rs | 26 +- src/typegraph/specs/types/runtimes.d.ts | 3 - tests/utils/test.ts | 10 +- 12 files changed, 204 insertions(+), 263 deletions(-) diff --git a/.ghjk/lock.json b/.ghjk/lock.json index 2167f3c765..9b833e6723 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -913,6 +913,14 @@ ], "allowedBuildDeps": "bciqek3tmrhm4iohl6tvdzlhxwhv7b52makvvgehltxv52d3l7rbki3y" }, + "ghjkEnvProvInstSet_______task_env_build-tgraph-rpc": { + "installs": [ + "bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy", + "bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y", + "bciqminqcmgw3fbbhibwc7tf6mrupttheic7kpiykadbowqmnzhmzo5a" + ], + "allowedBuildDeps": "bciqek3tmrhm4iohl6tvdzlhxwhv7b52makvvgehltxv52d3l7rbki3y" + }, "ghjkEnvProvInstSet_______task_env_build-tgraph-ts": { "installs": [ "bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy", @@ -946,106 +954,106 @@ "ty": "denoFile@v1", "key": "clean-node", "desc": "Remove all node_modules directories in tree and other js artifacts.", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "clean-rust": { "ty": "denoFile@v1", "key": "clean-rust", "desc": "Clean cache of all cargo workspaces in repo.", - "envKey": "bciqp6dugoxl3avklj2uwl77sfbiixbo2vzduaohoeusqjktc63dshzy" + "envKey": "bciqof7ogmp2lx2bzmkbrtmdmrmj7seytb6bl2sb4uhnsxkf5v24m75i" }, "version-bump": { "ty": "denoFile@v1", "key": "version-bump", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "version-print": { "ty": "denoFile@v1", "key": "version-print", "desc": "Print $METATYPE_VERSION", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "test-lsp": { "ty": "denoFile@v1", "key": "test-lsp", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "test-rust": { "ty": "denoFile@v1", "key": "test-rust", - "envKey": "bciqcctzik23xr7nadelnnusqesxpvkau6f5inuhqaggouuczqgevxfq" + "envKey": "bciqc4wyajjcgt24t2uhjf7zkzhq6gy2iektcnmjrnrkj3u2mhlzhcma" }, "test-website": { "ty": "denoFile@v1", "key": "test-website", "workingDir": "./docs/metatype.dev", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "test-e2e": { "ty": "denoFile@v1", "key": "test-e2e", "desc": "Shorthand for `tools/test.ts`", - "envKey": "bciqniih3pp536jhouqduhilkpdas6uoesz6b2ckvstng6t7rlxz7jjq" + "envKey": "bciqbjavwy7rbire3zwlpgo2ifwzgnm6ywxqswnh6qxezwuvc4bqhrca" }, "lock-sed": { "ty": "denoFile@v1", "key": "lock-sed", "desc": "Update versions", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "lint-deno": { "ty": "denoFile@v1", "key": "lint-deno", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "lint-udeps": { "ty": "denoFile@v1", "key": "lint-udeps", "desc": "Check for unused cargo depenencies", - "envKey": "bciqhppphe2gyonum75xce4zlcglvswdte32hlpm6eulnwtuzc665tgq" + "envKey": "bciqkfzynmgivxtsz2qoytkbvn4rwxe3ngzodvhxvvlqqlt4b62miuyy" }, "install-wasi-adapter": { "ty": "denoFile@v1", "key": "install-wasi-adapter", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "install-lsp": { "ty": "denoFile@v1", "key": "install-lsp", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "install-website": { "ty": "denoFile@v1", "key": "install-website", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "install-ts": { "ty": "denoFile@v1", "key": "install-ts", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "install-py": { "ty": "denoFile@v1", "key": "install-py", - "envKey": "bciqea2qrlw3rmfp2edgo2o7utf5ahjpa4r6y4nrw2pbmqm2g2rabviy" + "envKey": "bciqovedn2du5h56q6t4nolxi47yddf76bgaobbexfcxsjyuzj465tri" }, "install-sys": { "ty": "denoFile@v1", "key": "install-sys", "desc": "Print a command you can use to install system items", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "gen-subs-protoc": { "ty": "denoFile@v1", "key": "gen-subs-protoc", "workingDir": "src/substantial", "desc": "Regenerate substantial types", - "envKey": "bciqpunhgxn3npmv6lwplhckwyn5zls7crj3vodn6we6ihuhu4y7djcy" + "envKey": "bciqifnqvvzjvxnddwvnxomtrjtti2f5iefaj2l3aoz732lrnmg4utvq" }, "gen-pyrt-bind": { "ty": "denoFile@v1", "key": "gen-pyrt-bind", - "envKey": "bciqdpiup27tflfkq26oirbutkz53wrp34entiq423upf47za7zoq4za" + "envKey": "bciqa4zotbgmulpg3cutg6nu3ptq5merbt2gbf5a26twwcfe7djxchsi" }, "build-pyrt": { "ty": "denoFile@v1", @@ -1053,100 +1061,94 @@ "dependsOn": [ "gen-pyrt-bind" ], - "envKey": "bciqdpiup27tflfkq26oirbutkz53wrp34entiq423upf47za7zoq4za" + "envKey": "bciqa4zotbgmulpg3cutg6nu3ptq5merbt2gbf5a26twwcfe7djxchsi" }, "fetch-deno": { "ty": "denoFile@v1", "key": "fetch-deno", "desc": "Cache remote deno modules.", - "envKey": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma" + "envKey": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a" }, "dev-website": { "ty": "denoFile@v1", "key": "dev-website", "workingDir": "./docs/metatype.dev", "desc": "Launch the website", - "envKey": "bciqmkhbtdu3anjuk2oyegq2sb3ogzeljgadytenbtt6izyzfqinxdna" + "envKey": "bciqgrksux7l63plnyfryiqoth7wghawzcxmptsdw7qlbxpeytpot6fq" }, "dev-gate6": { "ty": "denoFile@v1", "key": "dev-gate6", "desc": "Launch the typegate from a locally found meta bin.", - "envKey": "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q" + "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" }, "dev-gate5": { "ty": "denoFile@v1", "key": "dev-gate5", "desc": "Launch the typegate from the latests published image.", - "envKey": "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q" + "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" }, "dev-gate4": { "ty": "denoFile@v1", "key": "dev-gate4", "desc": "Launch the typegate from the locally built typegate image.", - "envKey": "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q" + "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" }, "dev-gate3": { "ty": "denoFile@v1", "key": "dev-gate3", "desc": "Launch the typegate from meta-cli cmd.", - "envKey": "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q" + "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" }, "dev-gate2": { "ty": "denoFile@v1", "key": "dev-gate2", "desc": "Launch the typegate in sync mode.", - "envKey": "bciqgjkrsledgw64yjp4hkj2lpf26pnamtuhsyho7bd55742yprtyv4y" + "envKey": "bciqgfe63ayh7e7kzg4f47bmaleew7jcdukchs3cg45tvdiwoxotxzfy" }, "dev-gate1": { "ty": "denoFile@v1", "key": "dev-gate1", "desc": "Launch the typegate in single-instance mode.", - "envKey": "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q" + "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" }, "dev-eg-tgraphs": { "ty": "denoFile@v1", "key": "dev-eg-tgraphs", "desc": "meta dev example/typegraphs", - "envKey": "bciqns7jnxsdugrzboolqtwsh4ohiq5u3p46dezn7huqgo5rq4ps2gja" + "envKey": "bciqlb6jtozvezqdgkfkfxlztreqi2j6lxqdk5zvvlbc2o5ka7qtljji" }, "dev-compose": { "ty": "denoFile@v1", "key": "dev-compose", "desc": "Wrapper around docker compose to manage runtime dependencies", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "dev": { "ty": "denoFile@v1", "key": "dev", "desc": "Execute tools/*.ts scripts.", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, - "build-tgraph-ts-jsr": { + "build-tgraph-py": { "ty": "denoFile@v1", - "key": "build-tgraph-ts-jsr", - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "key": "build-tgraph-py", + "envKey": "bciqbk2kwzvfc2c5ti6x7z2pju22i3qkhn76hei4patfnwqv6xr4umlq" }, - "build-tgraph-core": { + "build-tgraph-ts-jsr": { "ty": "denoFile@v1", - "key": "build-tgraph-core", - "envKey": "bciqjqpgdwvbvonak3vsozretaksktub273tf3ipzah6sd7ut3kexqzi" + "key": "build-tgraph-ts-jsr", + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, - "build-tgraph-py": { + "build-tgraph-rpc": { "ty": "denoFile@v1", - "key": "build-tgraph-py", - "dependsOn": [ - "build-tgraph-core" - ], - "envKey": "bciqitmhilz5ixbiasuhoeqboakq4cy2snb7llbcfwman6yqlq2p6rqy" + "key": "build-tgraph-rpc", + "envKey": "bciqeeh6cx5grefrnieyki54emcwuxb57ahioapdi6opi47dyg6hxgki" }, "build-tgraph-ts": { "ty": "denoFile@v1", "key": "build-tgraph-ts", - "dependsOn": [ - "build-tgraph-core" - ], - "envKey": "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy" + "envKey": "bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy" }, "build-tgraph-ts-node": { "ty": "denoFile@v1", @@ -1154,21 +1156,28 @@ "dependsOn": [ "build-tgraph-ts" ], - "envKey": "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy" + "envKey": "bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy" + }, + "build-tgraph-core": { + "ty": "denoFile@v1", + "key": "build-tgraph-core", + "envKey": "bciqlndcuvoua6nwkocqwfmugmbzrpk5yfr5wfv7mzazugh3ofyptv2a" }, "build-tgraph": { "ty": "denoFile@v1", "key": "build-tgraph", "dependsOn": [ + "build-tgraph-core", + "build-tgraph-rpc", "build-tgraph-py", "build-tgraph-ts-node" ], - "envKey": "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq" + "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, "build-sys-tgraphs": { "ty": "denoFile@v1", "key": "build-sys-tgraphs", - "envKey": "bciqont2hfpi4wf7ul7acfxfdzwt4q4xm4sqpt2x6rvfc3kxxrtguj6i" + "envKey": "bciqeby2w3rophwmqawnkmicgymgudbcdqjirrz3r7oltu44uqp4emsq" } }, "tasksNamed": [ @@ -1203,11 +1212,12 @@ "dev-eg-tgraphs", "dev-compose", "dev", - "build-tgraph-ts-jsr", - "build-tgraph-core", "build-tgraph-py", + "build-tgraph-ts-jsr", + "build-tgraph-rpc", "build-tgraph-ts", "build-tgraph-ts-node", + "build-tgraph-core", "build-tgraph", "build-sys-tgraphs" ] @@ -1217,13 +1227,13 @@ "id": "envs", "config": { "envs": { - "bciqiaaqxx3azvrkvlj2eknjj6awsczu4gdcohccrvjpwk3vmkrnyfpi": { + "bciqacae7toziicv72e7ugl6kuv25bbxl5ygu5dugtczoojzqkwayp6q": { "desc": "the default default environment.", "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1251,12 +1261,12 @@ } ] }, - "bciqipocpp2avwxmyj6rxrkpukmkjgwtzafiwnqwtlum62mho2mtcbgq": { + "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1284,12 +1294,12 @@ } ] }, - "bciqhppphe2gyonum75xce4zlcglvswdte32hlpm6eulnwtuzc665tgq": { + "bciqkfzynmgivxtsz2qoytkbvn4rwxe3ngzodvhxvvlqqlt4b62miuyy": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1317,12 +1327,12 @@ } ] }, - "bciqdpiup27tflfkq26oirbutkz53wrp34entiq423upf47za7zoq4za": { + "bciqa4zotbgmulpg3cutg6nu3ptq5merbt2gbf5a26twwcfe7djxchsi": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1350,12 +1360,12 @@ } ] }, - "bciqea2qrlw3rmfp2edgo2o7utf5ahjpa4r6y4nrw2pbmqm2g2rabviy": { + "bciqovedn2du5h56q6t4nolxi47yddf76bgaobbexfcxsjyuzj465tri": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1383,12 +1393,12 @@ } ] }, - "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma": { + "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1416,12 +1426,12 @@ } ] }, - "bciqmkhbtdu3anjuk2oyegq2sb3ogzeljgadytenbtt6izyzfqinxdna": { + "bciqgrksux7l63plnyfryiqoth7wghawzcxmptsdw7qlbxpeytpot6fq": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1454,12 +1464,12 @@ } ] }, - "bciqp6dugoxl3avklj2uwl77sfbiixbo2vzduaohoeusqjktc63dshzy": { + "bciqof7ogmp2lx2bzmkbrtmdmrmj7seytb6bl2sb4uhnsxkf5v24m75i": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1487,12 +1497,12 @@ } ] }, - "bciqcctzik23xr7nadelnnusqesxpvkau6f5inuhqaggouuczqgevxfq": { + "bciqc4wyajjcgt24t2uhjf7zkzhq6gy2iektcnmjrnrkj3u2mhlzhcma": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1520,12 +1530,12 @@ } ] }, - "bciqpunhgxn3npmv6lwplhckwyn5zls7crj3vodn6we6ihuhu4y7djcy": { + "bciqifnqvvzjvxnddwvnxomtrjtti2f5iefaj2l3aoz732lrnmg4utvq": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1553,12 +1563,12 @@ } ] }, - "bciqd6zbaarkdhf3u74bcxlzvmi2ywirr2sjtrzh7thrbnc3ijz3sq4q": { + "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1621,12 +1631,12 @@ } ] }, - "bciqgjkrsledgw64yjp4hkj2lpf26pnamtuhsyho7bd55742yprtyv4y": { + "bciqgfe63ayh7e7kzg4f47bmaleew7jcdukchs3cg45tvdiwoxotxzfy": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1724,12 +1734,12 @@ } ] }, - "bciqns7jnxsdugrzboolqtwsh4ohiq5u3p46dezn7huqgo5rq4ps2gja": { + "bciqlb6jtozvezqdgkfkfxlztreqi2j6lxqdk5zvvlbc2o5ka7qtljji": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1757,12 +1767,12 @@ } ] }, - "bciqjqpgdwvbvonak3vsozretaksktub273tf3ipzah6sd7ut3kexqzi": { + "bciqlndcuvoua6nwkocqwfmugmbzrpk5yfr5wfv7mzazugh3ofyptv2a": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1795,12 +1805,12 @@ } ] }, - "bciqitmhilz5ixbiasuhoeqboakq4cy2snb7llbcfwman6yqlq2p6rqy": { + "bciqbk2kwzvfc2c5ti6x7z2pju22i3qkhn76hei4patfnwqv6xr4umlq": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1833,12 +1843,50 @@ } ] }, - "bciqagtqx6ldqxfvggedxo7gt7pfej5nn7vcib7l3akots7upidojlgy": { + "bciqeeh6cx5grefrnieyki54emcwuxb57ahioapdi6opi47dyg6hxgki": { + "provides": [ + { + "ty": "posix.envVar", + "key": "RUST_LOG", + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" + }, + { + "ty": "posix.envVar", + "key": "TYPEGRAPH_VERSION", + "val": "0.0.3" + }, + { + "ty": "posix.envVar", + "key": "CLICOLOR_FORCE", + "val": "1" + }, + { + "ty": "posix.envVar", + "key": "CROSS_CONFIG", + "val": "tools/Cross.toml" + }, + { + "ty": "posix.envVar", + "key": "GIT_CLIFF_CONFIG", + "val": "tools/cliff.toml" + }, + { + "ty": "posix.envVar", + "key": "TG_CODEGEN", + "val": "src/typegraph/specs/codegen/tg-codegen" + }, + { + "ty": "ghjk.ports.InstallSetRef", + "setId": "ghjkEnvProvInstSet_______task_env_build-tgraph-rpc" + } + ] + }, + "bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1871,12 +1919,12 @@ } ] }, - "bciqont2hfpi4wf7ul7acfxfdzwt4q4xm4sqpt2x6rvfc3kxxrtguj6i": { + "bciqeby2w3rophwmqawnkmicgymgudbcdqjirrz3r7oltu44uqp4emsq": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1904,12 +1952,12 @@ } ] }, - "bciqniih3pp536jhouqduhilkpdas6uoesz6b2ckvstng6t7rlxz7jjq": { + "bciqbjavwy7rbire3zwlpgo2ifwzgnm6ywxqswnh6qxezwuvc4bqhrca": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1937,12 +1985,12 @@ } ] }, - "bciqcsmfpk6r2kxk4hruhogwj2ddpjmaoftdxu2vtjsfjyawvvb5t5ga": { + "bciqkxr25pjywutrwjgdbuqvhukulifkffcybdcswmbdp6g57uyxalty": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -1975,12 +2023,12 @@ } ] }, - "bciqajdl35eujx4j3ufkysnsqzaisaqtu247kaydoi2x7tvsqig6bzmq": { + "bciqmkulmynzdor24gykcjc2vtu2vmzcgavyyytftuf4sibd7yutzmvy": { "provides": [ { "ty": "posix.envVar", "key": "RUST_LOG", - "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off" + "val": "info,typegate=debug,deno=warn,swc_ecma_codegen=off,tracing::span=off,quaint=off" }, { "ty": "posix.envVar", @@ -2011,14 +2059,14 @@ }, "defaultEnv": "dev", "envsNamed": { - "main": "bciqiaaqxx3azvrkvlj2eknjj6awsczu4gdcohccrvjpwk3vmkrnyfpi", - "_wasm": "bciqdpiup27tflfkq26oirbutkz53wrp34entiq423upf47za7zoq4za", - "_python": "bciqea2qrlw3rmfp2edgo2o7utf5ahjpa4r6y4nrw2pbmqm2g2rabviy", - "_ecma": "bciqcm5whsy4tzjafjheomwtxzjxz2avqxwgb6ss5kav6fxmmy3lu4ma", - "_rust": "bciqp6dugoxl3avklj2uwl77sfbiixbo2vzduaohoeusqjktc63dshzy", - "ci": "bciqniih3pp536jhouqduhilkpdas6uoesz6b2ckvstng6t7rlxz7jjq", - "dev": "bciqcsmfpk6r2kxk4hruhogwj2ddpjmaoftdxu2vtjsfjyawvvb5t5ga", - "oci": "bciqajdl35eujx4j3ufkysnsqzaisaqtu247kaydoi2x7tvsqig6bzmq" + "main": "bciqacae7toziicv72e7ugl6kuv25bbxl5ygu5dugtczoojzqkwayp6q", + "_wasm": "bciqa4zotbgmulpg3cutg6nu3ptq5merbt2gbf5a26twwcfe7djxchsi", + "_python": "bciqovedn2du5h56q6t4nolxi47yddf76bgaobbexfcxsjyuzj465tri", + "_ecma": "bciqcqqs4e5l7nqt57e4bku3gjdxs2iruhfdl2ocayrkkcs4otx7ig7a", + "_rust": "bciqof7ogmp2lx2bzmkbrtmdmrmj7seytb6bl2sb4uhnsxkf5v24m75i", + "ci": "bciqbjavwy7rbire3zwlpgo2ifwzgnm6ywxqswnh6qxezwuvc4bqhrca", + "dev": "bciqkxr25pjywutrwjgdbuqvhukulifkffcybdcswmbdp6g57uyxalty", + "oci": "bciqmkulmynzdor24gykcjc2vtu2vmzcgavyyytftuf4sibd7yutzmvy" } } } diff --git a/src/meta-cli/src/typegraph/rpc/mod.rs b/src/meta-cli/src/typegraph/rpc/mod.rs index af5a284cd6..b0550cdbce 100644 --- a/src/meta-cli/src/typegraph/rpc/mod.rs +++ b/src/meta-cli/src/typegraph/rpc/mod.rs @@ -19,6 +19,6 @@ pub trait RpcDispatch { pub enum RpcCall { Aws(aws::RpcCall), Core(core::RpcCall), - Runtimes(runtimes::RpcCall), Utils(utils::RpcCall), + Runtimes(runtimes::RpcCall), } diff --git a/src/meta-cli/src/typegraph/rpc/runtimes.rs b/src/meta-cli/src/typegraph/rpc/runtimes.rs index 44f060858a..7565cf7974 100644 --- a/src/meta-cli/src/typegraph/rpc/runtimes.rs +++ b/src/meta-cli/src/typegraph/rpc/runtimes.rs @@ -99,10 +99,6 @@ pub enum RpcCall { runtime: RuntimeId, model: TypeId, }, - PrismaCount { - runtime: RuntimeId, - model: TypeId, - }, PrismaGroupBy { runtime: RuntimeId, model: TypeId, @@ -266,9 +262,6 @@ impl super::RpcDispatch for RpcCall { Self::PrismaAggregate { runtime, model } => { Lib::prisma_aggregate(runtime, model).map(|res| serde_json::to_value(res).unwrap()) } - Self::PrismaCount { runtime, model } => { - Lib::prisma_count(runtime, model).map(|res| serde_json::to_value(res).unwrap()) - } Self::PrismaGroupBy { runtime, model } => { Lib::prisma_group_by(runtime, model).map(|res| serde_json::to_value(res).unwrap()) } diff --git a/src/typegraph/core/src/global_store.rs b/src/typegraph/core/src/global_store.rs index c715c1ad23..6a6e5c1a2a 100644 --- a/src/typegraph/core/src/global_store.rs +++ b/src/typegraph/core/src/global_store.rs @@ -122,14 +122,6 @@ pub fn get_sdk_version() -> String { SDK_VERSION.with(|v| v.clone()) } -#[cfg(test)] -impl Store { - pub fn reset() { - let _ = crate::typegraph::serialize(Default::default()); - with_store_mut(|s| *s = Store::new()); - } -} - impl Store { pub fn save() -> SavedState { with_store(|s| SavedState { @@ -156,6 +148,10 @@ impl Store { }) } + pub fn reset() { + with_store_mut(|s| *s = Store::new()); + } + pub fn get_type_by_name(name: &str) -> Option { with_store(|s| s.type_by_names.get(name).map(|id| id.0.clone())) } diff --git a/src/typegraph/core/src/typegraph.rs b/src/typegraph/core/src/typegraph.rs index 10334611eb..2ef047b950 100644 --- a/src/typegraph/core/src/typegraph.rs +++ b/src/typegraph/core/src/typegraph.rs @@ -518,8 +518,7 @@ pub fn current_typegraph_dir() -> Result { pub fn reset() { TG.with_borrow_mut(|tg| { - if let Some(ctx) = tg.take() { - Store::restore(ctx.saved_store_state.unwrap()); - } + tg.take(); + Store::reset(); }); } diff --git a/src/typegraph/core/src/types/sdk/aws.rs b/src/typegraph/core/src/types/sdk/aws.rs index 08475ec9b1..f39fa4155e 100644 --- a/src/typegraph/core/src/types/sdk/aws.rs +++ b/src/typegraph/core/src/types/sdk/aws.rs @@ -1,5 +1,5 @@ +use serde::{Serialize, Deserialize}; use super::core::{MaterializerId, RuntimeId}; -use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct S3RuntimeData { @@ -25,15 +25,9 @@ pub struct S3PresignPutParams { pub trait Handler { fn register_s3_runtime(data: S3RuntimeData) -> Result; - fn s3_presign_get( - runtime: RuntimeId, - data: S3PresignGetParams, - ) -> Result; - fn s3_presign_put( - runtime: RuntimeId, - data: S3PresignPutParams, - ) -> Result; + fn s3_presign_get(runtime: RuntimeId, data: S3PresignGetParams) -> Result; + fn s3_presign_put(runtime: RuntimeId, data: S3PresignPutParams) -> Result; fn s3_list(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload_all(runtime: RuntimeId, bucket: String) -> Result; -} +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/core.rs b/src/typegraph/core/src/types/sdk/core.rs index d612dfd6c9..f4c33fb951 100644 --- a/src/typegraph/core/src/types/sdk/core.rs +++ b/src/typegraph/core/src/types/sdk/core.rs @@ -1,4 +1,4 @@ -use serde::{Deserialize, Serialize}; +use serde::{Serialize, Deserialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Error { @@ -218,9 +218,7 @@ pub struct FuncParams { pub trait Handler { fn init_typegraph(params: TypegraphInitParams) -> Result<(), super::Error>; - fn serialize_typegraph( - params: SerializeParams, - ) -> Result<(String, Vec), super::Error>; + fn serialize_typegraph(params: SerializeParams) -> Result<(String, Vec), super::Error>; fn with_injection(type_id: TypeId, injection: String) -> Result; fn with_config(type_id: TypeId, config: String) -> Result; fn refb(name: String, attributes: Option) -> Result; @@ -238,22 +236,13 @@ pub trait Handler { fn extend_struct(tpe: TypeId, props: Vec<(String, TypeId)>) -> Result; fn get_type_repr(id: TypeId) -> Result; fn funcb(data: TypeFunc) -> Result; - fn get_transform_data( - resolver_input: TypeId, - transform_tree: String, - ) -> Result; + fn get_transform_data(resolver_input: TypeId, transform_tree: String) -> Result; fn register_policy(pol: Policy) -> Result; fn with_policy(type_id: TypeId, policy_chain: Vec) -> Result; fn get_public_policy() -> Result<(PolicyId, String), super::Error>; fn get_internal_policy() -> Result<(PolicyId, String), super::Error>; - fn register_context_policy( - key: String, - check: ContextCheck, - ) -> Result<(PolicyId, String), super::Error>; + fn register_context_policy(key: String, check: ContextCheck) -> Result<(PolicyId, String), super::Error>; fn rename_type(tpe: TypeId, new_name: String) -> Result; - fn expose( - fns: Vec<(String, TypeId)>, - default_policy: Option>, - ) -> Result<(), super::Error>; + fn expose(fns: Vec<(String, TypeId)>, default_policy: Option>) -> Result<(), super::Error>; fn set_seed(seed: Option) -> Result<(), super::Error>; -} +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs index fa6efef03e..85e31fdc1f 100644 --- a/src/typegraph/core/src/types/sdk/mod.rs +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -1,5 +1,5 @@ pub mod aws; pub mod core; -pub mod runtimes; pub mod utils; +pub mod runtimes; pub use self::core::Error; diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs index d4622face2..f762590891 100644 --- a/src/typegraph/core/src/types/sdk/runtimes.rs +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -1,5 +1,5 @@ +use serde::{Serialize, Deserialize}; use super::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; -use serde::{Deserialize, Serialize}; pub type Idempotency = bool; @@ -291,73 +291,31 @@ pub struct GrpcData { pub trait Handler { fn get_deno_runtime() -> Result; - fn register_deno_func( - data: MaterializerDenoFunc, - effect: Effect, - ) -> Result; - fn register_deno_static( - data: MaterializerDenoStatic, - type_id: TypeId, - ) -> Result; - fn get_predefined_deno_func( - data: MaterializerDenoPredefined, - ) -> Result; - fn import_deno_function( - data: MaterializerDenoImport, - effect: Effect, - ) -> Result; + fn register_deno_func(data: MaterializerDenoFunc, effect: Effect) -> Result; + fn register_deno_static(data: MaterializerDenoStatic, type_id: TypeId) -> Result; + fn get_predefined_deno_func(data: MaterializerDenoPredefined) -> Result; + fn import_deno_function(data: MaterializerDenoImport, effect: Effect) -> Result; fn register_graphql_runtime(data: GraphqlRuntimeData) -> Result; - fn graphql_query( - base: BaseMaterializer, - data: MaterializerGraphqlQuery, - ) -> Result; - fn graphql_mutation( - base: BaseMaterializer, - data: MaterializerGraphqlQuery, - ) -> Result; + fn graphql_query(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; + fn graphql_mutation(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; fn register_http_runtime(data: HttpRuntimeData) -> Result; - fn http_request( - base: BaseMaterializer, - data: MaterializerHttpRequest, - ) -> Result; + fn http_request(base: BaseMaterializer, data: MaterializerHttpRequest) -> Result; fn register_python_runtime() -> Result; - fn from_python_lambda( - base: BaseMaterializer, - data: MaterializerPythonLambda, - ) -> Result; - fn from_python_def( - base: BaseMaterializer, - data: MaterializerPythonDef, - ) -> Result; - fn from_python_module( - base: BaseMaterializer, - data: MaterializerPythonModule, - ) -> Result; - fn from_python_import( - base: BaseMaterializer, - data: MaterializerPythonImport, - ) -> Result; + fn from_python_lambda(base: BaseMaterializer, data: MaterializerPythonLambda) -> Result; + fn from_python_def(base: BaseMaterializer, data: MaterializerPythonDef) -> Result; + fn from_python_module(base: BaseMaterializer, data: MaterializerPythonModule) -> Result; + fn from_python_import(base: BaseMaterializer, data: MaterializerPythonImport) -> Result; fn register_random_runtime(data: RandomRuntimeData) -> Result; - fn create_random_mat( - base: BaseMaterializer, - data: MaterializerRandom, - ) -> Result; + fn create_random_mat(base: BaseMaterializer, data: MaterializerRandom) -> Result; fn register_wasm_reflected_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_reflected_func( - base: BaseMaterializer, - data: MaterializerWasmReflectedFunc, - ) -> Result; + fn from_wasm_reflected_func(base: BaseMaterializer, data: MaterializerWasmReflectedFunc) -> Result; fn register_wasm_wire_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_wire_handler( - base: BaseMaterializer, - data: MaterializerWasmWireHandler, - ) -> Result; + fn from_wasm_wire_handler(base: BaseMaterializer, data: MaterializerWasmWireHandler) -> Result; fn register_prisma_runtime(data: PrismaRuntimeData) -> Result; fn prisma_find_unique(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_find_many(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_find_first(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_aggregate(runtime: RuntimeId, model: TypeId) -> Result; - fn prisma_count(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_group_by(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_create_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_create_many(runtime: RuntimeId, model: TypeId) -> Result; @@ -366,43 +324,18 @@ pub trait Handler { fn prisma_upsert_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_many(runtime: RuntimeId, model: TypeId) -> Result; - fn prisma_execute( - runtime: RuntimeId, - query: String, - param: TypeId, - effect: Effect, - ) -> Result; - fn prisma_query_raw( - runtime: RuntimeId, - query: String, - out: TypeId, - param: Option, - ) -> Result; + fn prisma_execute(runtime: RuntimeId, query: String, param: TypeId, effect: Effect) -> Result; + fn prisma_query_raw(runtime: RuntimeId, query: String, out: TypeId, param: Option) -> Result; fn prisma_link(data: PrismaLinkData) -> Result; fn prisma_migration(operation: PrismaMigrationOperation) -> Result; fn register_temporal_runtime(data: TemporalRuntimeData) -> Result; - fn generate_temporal_operation( - runtime: RuntimeId, - data: TemporalOperationData, - ) -> Result; - fn register_typegate_materializer( - operation: TypegateOperation, - ) -> Result; - fn register_typegraph_materializer( - operation: TypegraphOperation, - ) -> Result; - fn register_substantial_runtime( - data: SubstantialRuntimeData, - ) -> Result; - fn generate_substantial_operation( - runtime: RuntimeId, - data: SubstantialOperationData, - ) -> Result; + fn generate_temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Result; + fn register_typegate_materializer(operation: TypegateOperation) -> Result; + fn register_typegraph_materializer(operation: TypegraphOperation) -> Result; + fn register_substantial_runtime(data: SubstantialRuntimeData) -> Result; + fn generate_substantial_operation(runtime: RuntimeId, data: SubstantialOperationData) -> Result; fn register_kv_runtime(data: KvRuntimeData) -> Result; - fn kv_operation( - base: BaseMaterializer, - data: KvMaterializer, - ) -> Result; + fn kv_operation(base: BaseMaterializer, data: KvMaterializer) -> Result; fn register_grpc_runtime(data: GrpcRuntimeData) -> Result; fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result; -} +} \ No newline at end of file diff --git a/src/typegraph/core/src/types/sdk/utils.rs b/src/typegraph/core/src/types/sdk/utils.rs index 2581e4396b..e05f8d789c 100644 --- a/src/typegraph/core/src/types/sdk/utils.rs +++ b/src/typegraph/core/src/types/sdk/utils.rs @@ -1,5 +1,5 @@ +use serde::{Serialize, Deserialize}; use super::core::TypeId; -use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ReduceEntry { @@ -49,25 +49,11 @@ pub trait Handler { fn add_auth(data: Auth) -> Result; fn add_raw_auth(data: String) -> Result; fn oauth2(service_name: String, scopes: String) -> Result; - fn oauth2_without_profiler( - service_name: String, - scopes: String, - ) -> Result; - fn oauth2_with_extended_profiler( - service_name: String, - scopes: String, - extension: String, - ) -> Result; - fn oauth2_with_custom_profiler( - service_name: String, - scopes: String, - profiler: TypeId, - ) -> Result; + fn oauth2_without_profiler(service_name: String, scopes: String) -> Result; + fn oauth2_with_extended_profiler(service_name: String, scopes: String, extension: String) -> Result; + fn oauth2_with_custom_profiler(service_name: String, scopes: String, profiler: TypeId) -> Result; fn gql_deploy_query(params: QueryDeployParams) -> Result; fn gql_remove_query(tg_name: Vec) -> Result; fn metagen_exec(config: FdkConfig) -> Result, super::Error>; - fn metagen_write_files( - items: Vec, - typegraph_dir: String, - ) -> Result<(), super::Error>; -} + fn metagen_write_files(items: Vec, typegraph_dir: String) -> Result<(), super::Error>; +} \ No newline at end of file diff --git a/src/typegraph/specs/types/runtimes.d.ts b/src/typegraph/specs/types/runtimes.d.ts index ebcb11c517..a13edb6445 100644 --- a/src/typegraph/specs/types/runtimes.d.ts +++ b/src/typegraph/specs/types/runtimes.d.ts @@ -310,8 +310,6 @@ type prisma_find_first = (runtime: RuntimeId, model: TypeId) => FuncParams; type prisma_aggregate = (runtime: RuntimeId, model: TypeId) => FuncParams; -type prisma_count = (runtime: RuntimeId, model: TypeId) => FuncParams; - type prisma_group_by = (runtime: RuntimeId, model: TypeId) => FuncParams; type prisma_create_one = (runtime: RuntimeId, model: TypeId) => FuncParams; @@ -445,7 +443,6 @@ export type { prisma_find_many, prisma_find_first, prisma_aggregate, - prisma_count, prisma_group_by, prisma_create_one, prisma_create_many, diff --git a/tests/utils/test.ts b/tests/utils/test.ts index e11152129a..234c6603a5 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -225,7 +225,7 @@ export class MetaTest { const optSecrets = Object.entries(secrets).map(([name, value]) => { return `--secret=${name}=${value}`; }); - const { stdout } = await metaCli( + const args = [ "deploy", "--target=dev", `--gate=http://localhost:${this.port}`, @@ -233,7 +233,13 @@ export class MetaTest { "--create-migration", ...optSecrets, `--file=${path}`, - ); + ]; + + if (opts.prefix) { + args.push("--prefix", opts.prefix); + } + + const { stdout } = await metaCli(...args); console.log({ stdout: $.stripAnsi(stdout) }); const matches = stdout.match(/\((.*)\)/); const typegraphs = matches?.[1].split(", ") ?? []; From 39f7b3a93eb551419bac9149629e91a16960b108 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Fri, 15 Nov 2024 08:17:54 +0300 Subject: [PATCH 29/39] fix: validation test --- .../src/deploy/actors/task/serialize.rs | 2 +- src/meta-cli/src/deploy/actors/task_io.rs | 6 +-- .../__snapshots__/validator_test.ts.snap | 54 +++++++++---------- tests/utils/test.ts | 31 ++--------- 4 files changed, 36 insertions(+), 57 deletions(-) diff --git a/src/meta-cli/src/deploy/actors/task/serialize.rs b/src/meta-cli/src/deploy/actors/task/serialize.rs index 0bcc8858e2..465c49929d 100644 --- a/src/meta-cli/src/deploy/actors/task/serialize.rs +++ b/src/meta-cli/src/deploy/actors/task/serialize.rs @@ -162,7 +162,7 @@ impl TaskAction for SerializeAction { path = self.task_ref.path.display().yellow(), )); for err in output.errors.iter() { - ctx.console.error(format!("- {err}")); + ctx.console.error(err.to_string()); } } } diff --git a/src/meta-cli/src/deploy/actors/task_io.rs b/src/meta-cli/src/deploy/actors/task_io.rs index f1344dcca7..5cfa0add24 100644 --- a/src/meta-cli/src/deploy/actors/task_io.rs +++ b/src/meta-cli/src/deploy/actors/task_io.rs @@ -221,8 +221,7 @@ impl Handler for TaskIoActor { None => { // a log message that were not outputted with the log library // on the typegraph client - // --> as a debug message - console.debug(format!("{scope}$>{line}")); + console.info(format!("{scope}$>{line}")); } } } @@ -340,7 +339,8 @@ impl TaskIoActor { self_addr.do_send(message::SendRpcResponse(req.response(response))); } Err(err) => { - console.error(format!( + // Handle error on the client side + console.debug(format!( "{scope} failed to handle jsonrpc call {req:?}: {err}" )); self_addr.do_send(message::SendRpcResponse(req.error(err.to_string()))); diff --git a/tests/e2e/typegraph/__snapshots__/validator_test.ts.snap b/tests/e2e/typegraph/__snapshots__/validator_test.ts.snap index a0b514f582..ce41bb17a1 100644 --- a/tests/e2e/typegraph/__snapshots__/validator_test.ts.snap +++ b/tests/e2e/typegraph/__snapshots__/validator_test.ts.snap @@ -3,33 +3,33 @@ export const snapshot = {}; snapshot[`typegraph validation 1`] = ` \`ERROR meta::deploy::actors::console: ✗ failed to serialize typegraph validator from validator.py ERROR meta::deploy::actors::console: - at validator:/test/[in]/a: Expected number got '"1"' -ERROR meta::deploy::actors::console: - at validator:/test/[in]/b: Expected a string, got '["h","e","l","l","o"]' -ERROR meta::deploy::actors::console: - at validator:/test/[in]/c: Expected a minimum value of 2, got 0 -ERROR meta::deploy::actors::console: - at validator:/test/[in]/d: Expected a maximun length of 4, got "hello" (len=5) -ERROR meta::deploy::actors::console: - at validator:/test/[in]/e: Required field "a" not found in object '{}' -ERROR meta::deploy::actors::console: - at validator:/test/[in]/f: Required field "a" not found in object '{"b":1}' -ERROR meta::deploy::actors::console: - at validator:/test/[in]/g: Unexpected fields "b" in object "{\\\\"a\\\\":2,\\\\"b\\\\":1}" -ERROR meta::deploy::actors::console: - at validator:/testEnums/[in]/a: Expected a minimum length of 4, got "hi" (len=2) -ERROR meta::deploy::actors::console: - at validator:/testEnums/[in]/a: Expected a string, got '12' -ERROR meta::deploy::actors::console: - at validator:/testEnums/[in]/b: Expected float got '"13"' -ERROR meta::deploy::actors::console: - at validator:/testEnums/[out]/a: Expected a minimum length of 4, got "hi" (len=2) -ERROR meta::deploy::actors::console: - at validator:/testEnums/[out]/a: Expected a string, got '12' -ERROR meta::deploy::actors::console: - at validator:/testEnums/[out]/b: Expected float got '"13"' -ERROR meta::deploy::actors::console: - at validator:/testFromParent/[out]/nested/[in]/a: from_parent injection: Type mismatch: integer to string -ERROR meta::deploy::actors::console: - at validator:/testFromParent/[out]/nested/[in]/b: from_parent injection: 'minimum_length' is required on the subtype if it is defined on the supertype -ERROR meta::deploy::actors::console: - at validator:/testFromParent/[out]/nested/[in]/b: from_parent injection: 'maximum_length' cannot be higher on the subtype: 20 > 16 -ERROR meta::deploy::actors::console: - at validator:/testFromParent/[out]/nested/[in]/c: from_parent injection: property b is not allowed: it is not defined in the supertype -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/a: Invalid either type: variant #0 ('integer') is a subtype of variant #1 ('float') -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/b: Invalid either type: variant #0 ('string') is a subtype of variant #1 ('string') -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/d: Invalid either type: variant #0 ('list') is a subtype of variant #1 ('list') -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/f: Invalid either type: variant #0 ('string') is a subtype of variant #1 ('string') -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/g: Invalid either type: variant #1 ('object') is a subtype of variant #0 ('object') -ERROR meta::deploy::actors::console: - at validator:/testEither/[out]/h: Invalid either type: variant #0 ('list') is a subtype of variant #1 ('list') -ERROR meta::deploy::actors::console: - at validator:/testUnion/[in]/a: Value '25' did not match any of the variants of the union -ERROR meta::deploy::actors::console: - at validator:/testUnion/[in]/c: Value '{"x":1,"y":"test","z":"not a boolean"}' did not match any of the variants of the union -ERROR meta::deploy::actors::console: - at validator:/testUnion/[in]/d: Value '[1,"2",3]' did not match any of the variants of the union -ERROR meta::deploy::actors::console: - at validator:/testUnion/[out]/b: Invalid union type: variant #0 ('string') is the same type as variant #1 ('string') -ERROR meta::deploy::actors::console: - Typegraph validator failed validation +- at validator:/test/[in]/b: Expected a string, got '["h","e","l","l","o"]' +- at validator:/test/[in]/c: Expected a minimum value of 2, got 0 +- at validator:/test/[in]/d: Expected a maximun length of 4, got "hello" (len=5) +- at validator:/test/[in]/e: Required field "a" not found in object '{}' +- at validator:/test/[in]/f: Required field "a" not found in object '{"b":1}' +- at validator:/test/[in]/g: Unexpected fields "b" in object "{\\\\"a\\\\":2,\\\\"b\\\\":1}" +- at validator:/testEnums/[in]/a: Expected a minimum length of 4, got "hi" (len=2) +- at validator:/testEnums/[in]/a: Expected a string, got '12' +- at validator:/testEnums/[in]/b: Expected float got '"13"' +- at validator:/testEnums/[out]/a: Expected a minimum length of 4, got "hi" (len=2) +- at validator:/testEnums/[out]/a: Expected a string, got '12' +- at validator:/testEnums/[out]/b: Expected float got '"13"' +- at validator:/testFromParent/[out]/nested/[in]/a: from_parent injection: Type mismatch: integer to string +- at validator:/testFromParent/[out]/nested/[in]/b: from_parent injection: 'minimum_length' is required on the subtype if it is defined on the supertype +- at validator:/testFromParent/[out]/nested/[in]/b: from_parent injection: 'maximum_length' cannot be higher on the subtype: 20 > 16 +- at validator:/testFromParent/[out]/nested/[in]/c: from_parent injection: property b is not allowed: it is not defined in the supertype +- at validator:/testEither/[out]/a: Invalid either type: variant #0 ('integer') is a subtype of variant #1 ('float') +- at validator:/testEither/[out]/b: Invalid either type: variant #0 ('string') is a subtype of variant #1 ('string') +- at validator:/testEither/[out]/d: Invalid either type: variant #0 ('list') is a subtype of variant #1 ('list') +- at validator:/testEither/[out]/f: Invalid either type: variant #0 ('string') is a subtype of variant #1 ('string') +- at validator:/testEither/[out]/g: Invalid either type: variant #1 ('object') is a subtype of variant #0 ('object') +- at validator:/testEither/[out]/h: Invalid either type: variant #0 ('list') is a subtype of variant #1 ('list') +- at validator:/testUnion/[in]/a: Value '25' did not match any of the variants of the union +- at validator:/testUnion/[in]/c: Value '{"x":1,"y":"test","z":"not a boolean"}' did not match any of the variants of the union +- at validator:/testUnion/[in]/d: Value '[1,"2",3]' did not match any of the variants of the union +- at validator:/testUnion/[out]/b: Invalid union type: variant #0 ('string') is the same type as variant #1 ('string') +- Typegraph validator failed validation Error: 0: failed diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 234c6603a5..744a632576 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 import { SystemTypegraph } from "@metatype/typegate/system_typegraphs.ts"; -import { basename, dirname, extname, join } from "@std/path"; +import { dirname, join } from "@std/path"; import { newTempDir, testDir } from "./dir.ts"; import { shell, ShellOptions } from "./shell.ts"; import { assertSnapshot } from "@std/testing/snapshot"; @@ -11,7 +11,6 @@ import { assertEquals, assertNotEquals } from "@std/assert"; import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { Typegate } from "@metatype/typegate/typegate/mod.ts"; import { createMetaCli } from "./meta.ts"; -import { TypeGraph } from "@metatype/typegate/typegraph/mod.ts"; import { defaultTypegateConfigBase, getTypegateConfig, @@ -20,9 +19,6 @@ import { // until deno supports it... import { AsyncDisposableStack } from "dispose"; import { Typegraph } from "@metatype/typegate/typegraph/types.ts"; -import { ArtifactUploader } from "@typegraph/sdk/tg_artifact_upload.ts"; -import { BasicAuth } from "@typegraph/sdk/tg_deploy.ts"; -import { exists } from "@std/fs/exists"; import { metaCli } from "test-utils/meta.ts"; import { $ } from "@david/dax"; @@ -231,12 +227,13 @@ export class MetaTest { `--gate=http://localhost:${this.port}`, "--allow-dirty", "--create-migration", + //"--allow-destructive", ...optSecrets, `--file=${path}`, ]; if (opts.prefix) { - args.push("--prefix", opts.prefix); + args.push(`--prefix=${opts.prefix}`); } const { stdout } = await metaCli(...args); @@ -246,11 +243,9 @@ export class MetaTest { if (typegraphs.length == 0) { throw new Error("No typegraph"); } - if (typegraphs.length > 1) { - throw new Error("Multiple typegraphs"); - } const tgName = opts.typegraph ?? typegraphs[0]; - const engine = this.typegate.register.get(tgName)!; + const typegate = this.typegate; + const engine = typegate.register.get(tgName)!; if (!engine) { throw new Error(`Typegate engine '${tgName}' not found`); @@ -330,22 +325,6 @@ export class MetaTest { } } -function extractJsonFromStdout(stdout: string): string | null { - let jsonStart = null; - let inJson = false; - - for (const line of stdout.split("\n")) { - if (inJson) { - jsonStart += "\n" + line; - } else if (line.startsWith("{")) { - jsonStart = line; - inJson = true; - } - } - - return jsonStart; -} - interface TempGitRepo { content: Record; } From b6f7c396ebc1301fb4d2ff882a7d53ce66bd133b Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Fri, 15 Nov 2024 08:45:11 +0300 Subject: [PATCH 30/39] fix: deno.lock --- deno.lock | 2055 ++++++----------------------------------------------- 1 file changed, 221 insertions(+), 1834 deletions(-) diff --git a/deno.lock b/deno.lock index 61d002f35d..e7f7435dab 100644 --- a/deno.lock +++ b/deno.lock @@ -4,58 +4,46 @@ "specifiers": { "jsr:@david/dax@0.41.0": "jsr:@david/dax@0.41.0", "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", - "jsr:@std/archive@^0.225.0": "jsr:@std/archive@0.225.1", - "jsr:@std/assert": "jsr:@std/assert@1.0.6", + "jsr:@std/archive@^0.225.0": "jsr:@std/archive@0.225.4", "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", - "jsr:@std/assert@^1.0.2": "jsr:@std/assert@1.0.4", - "jsr:@std/assert@^1.0.4": "jsr:@std/assert@1.0.6", "jsr:@std/assert@^1.0.6": "jsr:@std/assert@1.0.6", - "jsr:@std/async@^1.0.3": "jsr:@std/async@1.0.3", + "jsr:@std/async@^1.0.3": "jsr:@std/async@1.0.7", "jsr:@std/bytes@^0.221.0": "jsr:@std/bytes@0.221.0", "jsr:@std/bytes@^1.0.2": "jsr:@std/bytes@1.0.2", - "jsr:@std/bytes@^1.0.2-rc.3": "jsr:@std/bytes@1.0.2", - "jsr:@std/cli@^1.0.3": "jsr:@std/cli@1.0.4", - "jsr:@std/cli@^1.0.4": "jsr:@std/cli@1.0.4", - "jsr:@std/collections@^1.0.5": "jsr:@std/collections@1.0.5", + "jsr:@std/cli@^1.0.3": "jsr:@std/cli@1.0.6", + "jsr:@std/cli@^1.0.4": "jsr:@std/cli@1.0.6", + "jsr:@std/collections@^1.0.5": "jsr:@std/collections@1.0.9", "jsr:@std/crypto@^1.0.2": "jsr:@std/crypto@1.0.3", - "jsr:@std/crypto@^1.0.2-rc.1": "jsr:@std/crypto@1.0.2", "jsr:@std/crypto@^1.0.3": "jsr:@std/crypto@1.0.3", - "jsr:@std/encoding@^1.0.2": "jsr:@std/encoding@1.0.3", + "jsr:@std/encoding@^1.0.2": "jsr:@std/encoding@1.0.5", "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", - "jsr:@std/fmt@^1.0.0": "jsr:@std/fmt@1.0.1", - "jsr:@std/fmt@^1.0.1": "jsr:@std/fmt@1.0.1", + "jsr:@std/fmt@^1.0.0": "jsr:@std/fmt@1.0.2", + "jsr:@std/fmt@^1.0.2": "jsr:@std/fmt@1.0.2", "jsr:@std/fs@0.221.0": "jsr:@std/fs@0.221.0", - "jsr:@std/fs@^1.0.0-rc.5": "jsr:@std/fs@1.0.1", - "jsr:@std/fs@^1.0.1": "jsr:@std/fs@1.0.3", - "jsr:@std/fs@^1.0.2": "jsr:@std/fs@1.0.3", - "jsr:@std/fs@^1.0.3": "jsr:@std/fs@1.0.3", - "jsr:@std/http@^1.0.3": "jsr:@std/http@1.0.4", - "jsr:@std/internal@^1.0.1": "jsr:@std/internal@1.0.1", - "jsr:@std/internal@^1.0.3": "jsr:@std/internal@1.0.4", + "jsr:@std/fs@^1.0.1": "jsr:@std/fs@1.0.4", + "jsr:@std/fs@^1.0.4": "jsr:@std/fs@1.0.4", + "jsr:@std/http@^1.0.3": "jsr:@std/http@1.0.9", "jsr:@std/internal@^1.0.4": "jsr:@std/internal@1.0.4", "jsr:@std/io@0.221.0": "jsr:@std/io@0.221.0", "jsr:@std/io@^0.221.0": "jsr:@std/io@0.221.0", - "jsr:@std/io@^0.224.3": "jsr:@std/io@0.224.5", - "jsr:@std/io@^0.224.4": "jsr:@std/io@0.224.5", - "jsr:@std/io@^0.224.5": "jsr:@std/io@0.224.6", - "jsr:@std/io@^0.224.6": "jsr:@std/io@0.224.6", - "jsr:@std/log@^0.224.5": "jsr:@std/log@0.224.6", - "jsr:@std/path": "jsr:@std/path@1.0.4", + "jsr:@std/io@^0.224.5": "jsr:@std/io@0.224.9", + "jsr:@std/io@^0.224.9": "jsr:@std/io@0.224.9", + "jsr:@std/io@^0.225.0": "jsr:@std/io@0.225.0", + "jsr:@std/log@^0.224.5": "jsr:@std/log@0.224.9", "jsr:@std/path@0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", - "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.4", - "jsr:@std/path@^1.0.3": "jsr:@std/path@1.0.4", - "jsr:@std/path@^1.0.4": "jsr:@std/path@1.0.4", - "jsr:@std/semver@^1.0.1": "jsr:@std/semver@1.0.2", + "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.6", + "jsr:@std/path@^1.0.4": "jsr:@std/path@1.0.6", + "jsr:@std/path@^1.0.6": "jsr:@std/path@1.0.6", + "jsr:@std/semver@^1.0.1": "jsr:@std/semver@1.0.3", "jsr:@std/streams@0.221.0": "jsr:@std/streams@0.221.0", - "jsr:@std/streams@1": "jsr:@std/streams@1.0.4", - "jsr:@std/streams@^1.0.2": "jsr:@std/streams@1.0.4", - "jsr:@std/testing@^1.0.1": "jsr:@std/testing@1.0.2", + "jsr:@std/streams@1": "jsr:@std/streams@1.0.7", + "jsr:@std/streams@^1.0.2": "jsr:@std/streams@1.0.7", + "jsr:@std/testing@^1.0.1": "jsr:@std/testing@1.0.3", "jsr:@std/text@^1.0.7": "jsr:@std/text@1.0.8", - "jsr:@std/url@^0.225.0": "jsr:@std/url@0.225.0", - "jsr:@std/uuid@^1.0.1": "jsr:@std/uuid@1.0.2", + "jsr:@std/url@^0.225.0": "jsr:@std/url@0.225.1", + "jsr:@std/uuid@^1.0.1": "jsr:@std/uuid@1.0.4", "jsr:@std/yaml@^1.0.4": "jsr:@std/yaml@1.0.5", - "jsr:@typegraph/sdk@0.4.10-rc1": "jsr:@typegraph/sdk@0.4.10-rc1", "npm:@noble/hashes@1.4.0": "npm:@noble/hashes@1.4.0", "npm:@sentry/node@7.70.0": "npm:@sentry/node@7.70.0", "npm:@types/node": "npm:@types/node@18.16.19", @@ -87,41 +75,23 @@ "@david/which@0.4.1": { "integrity": "896a682b111f92ab866cc70c5b4afab2f5899d2f9bde31ed00203b9c250f225e" }, - "@std/archive@0.225.0": { - "integrity": "cacdf278ee1c8cd89e67917bd0588c5eab16ef21b0e884c721bd0eef5179cf6f", + "@std/archive@0.225.4": { + "integrity": "59fe5d1834cbb6a2a7913b102d41c11d51475328d5b843bea75b94a40b44a115", "dependencies": [ - "jsr:@std/io@^0.224.4" - ] - }, - "@std/archive@0.225.1": { - "integrity": "5316b97c0641e01b1e5cf3cce7e1c7056271f23ea81a519da862414c9659fe1d", - "dependencies": [ - "jsr:@std/io@^0.224.6" + "jsr:@std/io@^0.224.9" ] }, "@std/assert@0.221.0": { "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" }, - "@std/assert@1.0.2": { - "integrity": "ccacec332958126deaceb5c63ff8b4eaf9f5ed0eac9feccf124110435e59e49c", - "dependencies": [ - "jsr:@std/internal@^1.0.1" - ] - }, - "@std/assert@1.0.4": { - "integrity": "d4c767ea578e5bc09c15b6e503376003e5b2d1f4c0cdf08524a92101ff4d7b96", - "dependencies": [ - "jsr:@std/internal@^1.0.3" - ] - }, "@std/assert@1.0.6": { "integrity": "1904c05806a25d94fe791d6d883b685c9e2dcd60e4f9fc30f4fc5cf010c72207", "dependencies": [ "jsr:@std/internal@^1.0.4" ] }, - "@std/async@1.0.3": { - "integrity": "6ed64678db43451683c6c176a21426a2ccd21ba0269ebb2c36133ede3f165792" + "@std/async@1.0.7": { + "integrity": "f4fadc0124432e37cba11e8b3880164661a664de00a65118d976848f32f96290" }, "@std/bytes@0.221.0": { "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" @@ -129,35 +99,23 @@ "@std/bytes@1.0.2": { "integrity": "fbdee322bbd8c599a6af186a1603b3355e59a5fb1baa139f8f4c3c9a1b3e3d57" }, - "@std/cli@1.0.3": { - "integrity": "9a0488b5d2e58d29dce106a941eecec7181fae996bf0d2225563f1ca7e4b100c" - }, - "@std/cli@1.0.4": { - "integrity": "79ca75add572a99a8ba93ae37ccbd8d43fb4e2b635a8a7ebebb4f2d092048764" - }, - "@std/collections@1.0.5": { - "integrity": "ab9eac23b57a0c0b89ba45134e61561f69f3d001f37235a248ed40be260c0c10" + "@std/cli@1.0.6": { + "integrity": "d22d8b38c66c666d7ad1f2a66c5b122da1704f985d3c47f01129f05abb6c5d3d" }, - "@std/crypto@1.0.2": { - "integrity": "bb515dbcd4d67aacf0ffece643a434811ea06e5b544f03c33ba58552fbdb87c7" + "@std/collections@1.0.9": { + "integrity": "4f58104ead08a04a2199374247f07befe50ba01d9cca8cbb23ab9a0419921e71" }, "@std/crypto@1.0.3": { "integrity": "a2a32f51ddef632d299e3879cd027c630dcd4d1d9a5285d6e6788072f4e51e7f" }, - "@std/encoding@1.0.2": { - "integrity": "7ed640c777e3275550e2cd937c440acdbebfdcd2d13ef67052f0536bf43e707f" - }, - "@std/encoding@1.0.3": { - "integrity": "5dbc2d7f5aa6062de7e19862ea856ac7a0dcce0b6fb46bb7b332d3bdcd4408b7" + "@std/encoding@1.0.5": { + "integrity": "ecf363d4fc25bd85bd915ff6733a7e79b67e0e7806334af15f4645c569fefc04" }, "@std/fmt@0.221.0": { "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" }, - "@std/fmt@1.0.0": { - "integrity": "8a95c9fdbb61559418ccbc0f536080cf43341655e1444f9d375a66886ceaaa3d" - }, - "@std/fmt@1.0.1": { - "integrity": "ef76c37faa7720faa8c20fd8cc74583f9b1e356dfd630c8714baa716a45856ab" + "@std/fmt@1.0.2": { + "integrity": "87e9dfcdd3ca7c066e0c3c657c1f987c82888eb8103a3a3baa62684ffeb0f7a7" }, "@std/fs@0.221.0": { "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", @@ -166,44 +124,14 @@ "jsr:@std/path@^0.221.0" ] }, - "@std/fs@1.0.1": { - "integrity": "d6914ca2c21abe591f733b31dbe6331e446815e513e2451b3b9e472daddfefcb", - "dependencies": [ - "jsr:@std/path@^1.0.2" - ] - }, - "@std/fs@1.0.2": { - "integrity": "af57555c7a224a6f147d5cced5404692974f7a628ced8eda67e0d22d92d474ec", - "dependencies": [ - "jsr:@std/path@^1.0.3" - ] - }, - "@std/fs@1.0.3": { - "integrity": "3cb839b1360b0a42d8b367c3093bfe4071798e6694fa44cf1963e04a8edba4fe", - "dependencies": [ - "jsr:@std/path@^1.0.4" - ] - }, - "@std/http@1.0.3": { - "integrity": "bff3770c4df4711567de1711fe988d28db9535be0c9b0f1d2de8d0fb97e8b44c", + "@std/fs@1.0.4": { + "integrity": "2907d32d8d1d9e540588fd5fe0ec21ee638134bd51df327ad4e443aaef07123c", "dependencies": [ - "jsr:@std/cli@^1.0.3", - "jsr:@std/encoding@^1.0.2", - "jsr:@std/fmt@^1.0.0", - "jsr:@std/media-types@^1.0.2", - "jsr:@std/net@^1.0.0", - "jsr:@std/path@^1.0.2", - "jsr:@std/streams@^1.0.2" + "jsr:@std/path@^1.0.6" ] }, - "@std/http@1.0.4": { - "integrity": "1a8142217907d49c4687f90ef3d257e7df2baf344c5122c322d7316df09df453" - }, - "@std/internal@1.0.1": { - "integrity": "6f8c7544d06a11dd256c8d6ba54b11ed870aac6c5aeafff499892662c57673e6" - }, - "@std/internal@1.0.3": { - "integrity": "208e9b94a3d5649bd880e9ca38b885ab7651ab5b5303a56ed25de4755fb7b11e" + "@std/http@1.0.9": { + "integrity": "d409fc319a5e8d4a154e576c758752e9700282d74f31357a12fec6420f9ecb6c" }, "@std/internal@1.0.4": { "integrity": "62e8e4911527e5e4f307741a795c0b0a9e6958d0b3790716ae71ce085f755422" @@ -215,27 +143,21 @@ "jsr:@std/bytes@^0.221.0" ] }, - "@std/io@0.224.5": { - "integrity": "cb84fe655d1273fca94efcff411465027a8b0b4225203f19d6ee98d9c8920a2d", - "dependencies": [ - "jsr:@std/bytes@^1.0.2-rc.3" - ] - }, - "@std/io@0.224.6": { - "integrity": "eefe034a370be34daf066c8634dd645635d099bb21eccf110f0bdc28d9040891", + "@std/io@0.224.9": { + "integrity": "4414664b6926f665102e73c969cfda06d2c4c59bd5d0c603fd4f1b1c840d6ee3", "dependencies": [ "jsr:@std/bytes@^1.0.2" ] }, - "@std/log@0.224.5": { - "integrity": "4612a45189438441bbd923a4cad1cce5c44c6c4a039195a3e8d831ce38894eee" + "@std/io@0.225.0": { + "integrity": "c1db7c5e5a231629b32d64b9a53139445b2ca640d828c26bf23e1c55f8c079b3" }, - "@std/log@0.224.6": { - "integrity": "c34e7b69fe84b2152ce2b0a1b5e211b26e6a1ce6a6b68a217b9342fd13ed95a4", + "@std/log@0.224.9": { + "integrity": "419d04e4d93e6b1a0205ac3f94809621cfec3d328d09fec9ec59cafa3b3fcaee", "dependencies": [ - "jsr:@std/fmt@^1.0.1", - "jsr:@std/fs@^1.0.2", - "jsr:@std/io@^0.224.6" + "jsr:@std/fmt@^1.0.2", + "jsr:@std/fs@^1.0.4", + "jsr:@std/io@^0.225.0" ] }, "@std/path@0.221.0": { @@ -244,20 +166,11 @@ "jsr:@std/assert@^0.221.0" ] }, - "@std/path@1.0.2": { - "integrity": "a452174603f8c620bd278a380c596437a9eef50c891c64b85812f735245d9ec7" + "@std/path@1.0.6": { + "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" }, - "@std/path@1.0.3": { - "integrity": "cd89d014ce7eb3742f2147b990f6753ee51d95276bfc211bc50c860c1bc7df6f" - }, - "@std/path@1.0.4": { - "integrity": "48dd5d8389bcfcd619338a01bdf862cb7799933390146a54ae59356a0acc7105" - }, - "@std/semver@1.0.1": { - "integrity": "f0c9b41b70e27e8cdfe9252b486c55a727d66ead72625e0fa1aae75f45ca15e1" - }, - "@std/semver@1.0.2": { - "integrity": "1e5fd337c687ca64c0809253eca4d4815874ced59b04f0882da5ff9a302f8129" + "@std/semver@1.0.3": { + "integrity": "7c139c6076a080eeaa4252c78b95ca5302818d7eafab0470d34cafd9930c13c8" }, "@std/streams@0.221.0": { "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", @@ -265,45 +178,32 @@ "jsr:@std/io@^0.221.0" ] }, - "@std/streams@1.0.2": { - "integrity": "187c3c875675221f5355807a735e51b0f8769caade2cbca6d7f4fa710ea4ace4", - "dependencies": [ - "jsr:@std/bytes@^1.0.2-rc.3" - ] - }, - "@std/streams@1.0.4": { - "integrity": "a1a5b01c74ca1d2dcaacfe1d4bbb91392e765946d82a3471bd95539adc6da83a", + "@std/streams@1.0.7": { + "integrity": "1a93917ca0c58c01b2bfb93647189229b1702677f169b6fb61ad6241cd2e499b", "dependencies": [ "jsr:@std/bytes@^1.0.2" ] }, - "@std/testing@1.0.2": { - "integrity": "9e8a7f4e26c219addabe7942d09c3450fa0a74e9662341961bc0ef502274dec3", + "@std/testing@1.0.3": { + "integrity": "f98c2bee53860a5916727d7e7d3abe920dd6f9edace022e2d059f00d05c2cf42", "dependencies": [ - "jsr:@std/assert@^1.0.4", - "jsr:@std/fs@^1.0.3", - "jsr:@std/internal@^1.0.3", - "jsr:@std/path@^1.0.4" + "jsr:@std/assert@^1.0.6", + "jsr:@std/fs@^1.0.4", + "jsr:@std/internal@^1.0.4", + "jsr:@std/path@^1.0.6" ] }, "@std/text@1.0.8": { "integrity": "40ba34caa095f393e78796e5eda37b8b4e2cc6cfd6f51f34658ad7487b1451e4" }, - "@std/url@0.225.0": { - "integrity": "fc854cc8a720e9c974904071140b462880d8347030006f43193935ae06c7a0f9", - "dependencies": [ - "jsr:@std/path@^1.0.2" - ] - }, - "@std/uuid@1.0.1": { - "integrity": "26f834b1e1f95b581f5f654f6b2c34c2031832fb4f598dbb1332520aa63a6740", + "@std/url@0.225.1": { + "integrity": "7961f62f0a3cd2c7aa5b785822874132760b50bbf5ed0ccfded8668f203e7a95", "dependencies": [ - "jsr:@std/bytes@^1.0.2-rc.3", - "jsr:@std/crypto@^1.0.2-rc.1" + "jsr:@std/path@^1.0.4" ] }, - "@std/uuid@1.0.2": { - "integrity": "2224284cdb031b54a9b2b1640254e2e78bd4541e956297d651cdd6f7a8157f4d", + "@std/uuid@1.0.4": { + "integrity": "f4233149cc8b4753cc3763fd83a7c4101699491f55c7be78dc7b30281946d7a0", "dependencies": [ "jsr:@std/bytes@^1.0.2", "jsr:@std/crypto@^1.0.3" @@ -311,14 +211,11 @@ }, "@std/yaml@1.0.5": { "integrity": "71ba3d334305ee2149391931508b2c293a8490f94a337eef3a09cade1a2a2742" - }, - "@typegraph/sdk@0.4.10-rc1": { - "integrity": "e9cbe5d456e6caa022e06a2d907cc64d3722220d01d22bb402a790052e069178" } }, "npm": { - "@babel/runtime@7.25.0": { - "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "@babel/runtime@7.26.0": { + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { "regenerator-runtime": "regenerator-runtime@0.14.1" } @@ -333,7 +230,7 @@ "@sentry/core": "@sentry/core@7.70.0", "@sentry/types": "@sentry/types@7.70.0", "@sentry/utils": "@sentry/utils@7.70.0", - "tslib": "tslib@2.6.3" + "tslib": "tslib@2.8.0" } }, "@sentry/core@7.70.0": { @@ -341,7 +238,7 @@ "dependencies": { "@sentry/types": "@sentry/types@7.70.0", "@sentry/utils": "@sentry/utils@7.70.0", - "tslib": "tslib@2.6.3" + "tslib": "tslib@2.8.0" } }, "@sentry/node@7.70.0": { @@ -354,7 +251,7 @@ "cookie": "cookie@0.5.0", "https-proxy-agent": "https-proxy-agent@5.0.1", "lru_map": "lru_map@0.3.3", - "tslib": "tslib@2.6.3" + "tslib": "tslib@2.8.0" } }, "@sentry/types@7.70.0": { @@ -365,7 +262,7 @@ "integrity": "sha512-0cChMH0lsGp+5I3D4wOHWwjFN19HVrGUs7iWTLTO5St3EaVbdeLbI1vFXHxMxvopbwgpeZafbreHw/loIdZKpw==", "dependencies": { "@sentry/types": "@sentry/types@7.70.0", - "tslib": "tslib@2.6.3" + "tslib": "tslib@2.8.0" } }, "@types/node@18.16.19": { @@ -375,7 +272,7 @@ "agent-base@6.0.2": { "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dependencies": { - "debug": "debug@4.3.6" + "debug": "debug@4.3.7" } }, "argparse@1.0.10": { @@ -392,18 +289,18 @@ "integrity": "sha512-kqTg3WWywappJPqtgrdvbA380VoXO2eu9VCV895JgbyHsaErXdyHK9LOZ911OvAk6L0obK7kDk9CGs8+oBawVA==", "dependencies": {} }, - "complex.js@2.1.1": { - "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg==", + "complex.js@2.3.0": { + "integrity": "sha512-wWHzifVdUPbPBhh+ObvpVGIzrAQjTvmnnEJKBfLW5YbyAB6OXQ0r+Q92fByMIrSSlxUuCujqxriJSR6R/kVxPA==", "dependencies": {} }, "cookie@0.5.0": { "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dependencies": {} }, - "debug@4.3.6": { - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "debug@4.3.7": { + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "ms@2.1.2" + "ms": "ms@2.1.3" } }, "decimal.js@10.4.3": { @@ -434,7 +331,7 @@ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dependencies": { "agent-base": "agent-base@6.0.2", - "debug": "debug@4.3.6" + "debug": "debug@4.3.7" } }, "javascript-natural-sort@0.7.1": { @@ -478,8 +375,8 @@ "mathjs@11.11.1": { "integrity": "sha512-uWrwMrhU31TCqHKmm1yFz0C352njGUVr/I1UnpMOxI/VBTTbCktx/mREUXx5Vyg11xrFdg/F3wnMM7Ql/csVsQ==", "dependencies": { - "@babel/runtime": "@babel/runtime@7.25.0", - "complex.js": "complex.js@2.1.1", + "@babel/runtime": "@babel/runtime@7.26.0", + "complex.js": "complex.js@2.3.0", "decimal.js": "decimal.js@10.4.3", "escape-latex": "escape-latex@1.2.0", "fraction.js": "fraction.js@4.3.4", @@ -489,14 +386,22 @@ "typed-function": "typed-function@4.2.1" } }, - "ms@2.1.2": { - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "ms@2.1.3": { + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dependencies": {} }, "multiformats@13.1.0": { "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==", "dependencies": {} }, + "node-addon-api@8.2.1": { + "integrity": "sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==", + "dependencies": {} + }, + "node-gyp-build@4.8.2": { + "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "dependencies": {} + }, "ono@4.0.11": { "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", "dependencies": { @@ -507,22 +412,22 @@ "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", "dependencies": {} }, - "pg-connection-string@2.6.4": { - "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", + "pg-connection-string@2.7.0": { + "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==", "dependencies": {} }, "pg-int8@1.0.1": { "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", "dependencies": {} }, - "pg-pool@3.6.2_pg@8.12.0": { - "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", + "pg-pool@3.7.0_pg@8.12.0": { + "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==", "dependencies": { "pg": "pg@8.12.0" } }, - "pg-protocol@1.6.1": { - "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", + "pg-protocol@1.7.0": { + "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==", "dependencies": {} }, "pg-types@2.2.0": { @@ -539,9 +444,9 @@ "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", "dependencies": { "pg-cloudflare": "pg-cloudflare@1.1.1", - "pg-connection-string": "pg-connection-string@2.6.4", - "pg-pool": "pg-pool@3.6.2_pg@8.12.0", - "pg-protocol": "pg-protocol@1.6.1", + "pg-connection-string": "pg-connection-string@2.7.0", + "pg-pool": "pg-pool@3.7.0_pg@8.12.0", + "pg-protocol": "pg-protocol@1.7.0", "pg-types": "pg-types@2.2.0", "pgpass": "pgpass@1.0.5" } @@ -605,8 +510,8 @@ "node-gyp-build": "node-gyp-build@4.8.2" } }, - "tslib@2.6.3": { - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "tslib@2.8.0": { + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "dependencies": {} }, "typed-function@4.2.1": { @@ -635,9 +540,7 @@ }, "redirects": { "https://cdn.pika.dev/big.js/^5.2.2": "https://cdn.skypack.dev/big.js@^5.2.2", - "https://esm.sh/@aws-sdk/s3-request-presigner": "https://esm.sh/@aws-sdk/s3-request-presigner@3.645.0", - "https://github.com/levibostian/deno-udd/raw/ignore-prerelease/mod.ts": "https://raw.githubusercontent.com/levibostian/deno-udd/ignore-prerelease/mod.ts", - "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1//mod.ts": "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/mod.ts" + "https://github.com/levibostian/deno-udd/raw/ignore-prerelease/mod.ts": "https://raw.githubusercontent.com/levibostian/deno-udd/ignore-prerelease/mod.ts" }, "remote": { "https://cdn.skypack.dev/-/big.js@v5.2.2-sUR8fKsGHRxsJyqyvOSP/dist=es2019,mode=imports/optimized/bigjs.js": "b6d8e6af0c1f7bdc7e8cd0890819ecee2dcbb0776ec4089eae281de8ebd7b2bd", @@ -746,9 +649,6 @@ "https://deno.land/std@0.140.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", "https://deno.land/std@0.140.0/path/win32.ts": "31811536855e19ba37a999cd8d1b62078235548d67902ece4aa6b814596dd757", "https://deno.land/std@0.140.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", "https://deno.land/std@0.161.0/encoding/base64.ts": "c57868ca7fa2fbe919f57f88a623ad34e3d970d675bdc1ff3a9d02bba7409db2", "https://deno.land/std@0.166.0/_util/asserts.ts": "d0844e9b62510f89ce1f9878b046f6a57bf88f208a10304aab50efcb48365272", "https://deno.land/std@0.166.0/_util/os.ts": "8a33345f74990e627b9dfe2de9b040004b08ea5146c7c9e8fe9a29070d193934", @@ -1036,207 +936,6 @@ "https://deno.land/std@0.213.0/url/join.ts": "00c7e9088cafaa24963ce4081119e58b3afe2c58f033701383f359ea02620dd2", "https://deno.land/std@0.213.0/url/mod.ts": "e2621f6a0db6fdbe7fbbd240064095bb203014657e5e1ab81db1c44d80dce6c9", "https://deno.land/std@0.213.0/url/normalize.ts": "6328c75df0fab300f74bc4a1c255062a0db882240e15ab646606d0009e7e40d7", - "https://deno.land/std@0.219.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", - "https://deno.land/std@0.219.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8", - "https://deno.land/std@0.219.0/bytes/concat.ts": "9cac3b4376afbef98ff03588eb3cf948e0d1eb6c27cfe81a7651ab6dd3adc54a", - "https://deno.land/std@0.219.0/bytes/copy.ts": "f29c03168853720dfe82eaa57793d0b9e3543ebfe5306684182f0f1e3bfd422a", - "https://deno.land/std@0.219.0/cli/mod.ts": "58f75df8ce43fb8266bdd26ec4465f73176b910316d72eb8e090b6a0549391da", - "https://deno.land/std@0.219.0/cli/parse_args.ts": "475b3edc8105c9acea09b83b100afc383d7bddbba9828da3f0c4adced006607a", - "https://deno.land/std@0.219.0/cli/prompt_secret.ts": "831cfb4efa83bfaf9bfd320ddbfd619e03cd87e81260909f93ca199ebe214ec2", - "https://deno.land/std@0.219.0/cli/spinner.ts": "005395c4e00b1086bfa2ae44e8c9413c1231c4741a08a55aa0d3c9ea267cecb5", - "https://deno.land/std@0.219.0/fmt/colors.ts": "d239d84620b921ea520125d778947881f62c50e78deef2657073840b8af9559a", - "https://deno.land/std@0.219.0/fmt/duration.ts": "606f8c2bbbadd7f7a122868a478c9ad31f2e66b1e19e0a9769655585414fced6", - "https://deno.land/std@0.219.0/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412", - "https://deno.land/std@0.219.0/fs/_get_file_info_type.ts": "da7bec18a7661dba360a1db475b826b18977582ce6fc9b25f3d4ee0403fe8cbd", - "https://deno.land/std@0.219.0/fs/_is_same_path.ts": "709c95868345fea051c58b9e96af95cff94e6ae98dfcff2b66dee0c212c4221f", - "https://deno.land/std@0.219.0/fs/_is_subdir.ts": "c68b309d46cc8568ed83c000f608a61bbdba0943b7524e7a30f9e450cf67eecd", - "https://deno.land/std@0.219.0/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e", - "https://deno.land/std@0.219.0/fs/copy.ts": "dc0f68c4b6c3b090bfdb909387e309f6169b746bd713927c9507c9ef545d71f6", - "https://deno.land/std@0.219.0/fs/empty_dir.ts": "4f01e6d56e2aa8d90ad60f20bc25601f516b00f6c3044cdf6863a058791d91aa", - "https://deno.land/std@0.219.0/fs/ensure_dir.ts": "dffff68de0d10799b5aa9e39dec4e327e12bbd29e762292193684542648c4aeb", - "https://deno.land/std@0.219.0/fs/ensure_file.ts": "ac5cfde94786b0284d2c8e9f7f9425269bea1b2140612b4aea1f20b508870f59", - "https://deno.land/std@0.219.0/fs/ensure_link.ts": "d42af2edefeaa9817873ec6e46dc5d209ac4d744f8c69c5ecc2dffade78465b6", - "https://deno.land/std@0.219.0/fs/ensure_symlink.ts": "1f64d7bdd191f7d9b71264e191902fcae5cec86305d54659897944caea70f814", - "https://deno.land/std@0.219.0/fs/eol.ts": "c9807291f78361d49fd986a9be04654610c615c5e2ec63d748976197d30ff206", - "https://deno.land/std@0.219.0/fs/exists.ts": "d2757ef764eaf5c6c5af7228e8447db2de42ab084a2dae540097f905723d83f5", - "https://deno.land/std@0.219.0/fs/expand_glob.ts": "a1ce02b05ed7b96985b0665067c9f1018f3f2ade7ee0fb0d629231050260b158", - "https://deno.land/std@0.219.0/fs/mod.ts": "107f5afa4424c2d3ce2f7e9266173198da30302c69af662c720115fe504dc5ee", - "https://deno.land/std@0.219.0/fs/move.ts": "39e0d7ccb88a566d20b949712020e766b15ef1ec19159573d11f949bd677909c", - "https://deno.land/std@0.219.0/fs/walk.ts": "78e1d01a9f75715614bf8d6e58bd77d9fafb1222c41194e607cd3849d7a0e771", - "https://deno.land/std@0.219.0/io/_common.ts": "36705cdb4dfcd338d6131bca1b16e48a4d5bf0d1dada6ce397268e88c17a5835", - "https://deno.land/std@0.219.0/io/_constants.ts": "3c7ad4695832e6e4a32e35f218c70376b62bc78621ef069a4a0a3d55739f8856", - "https://deno.land/std@0.219.0/io/buffer.ts": "4d1f805f350433e418002accec798bc6c33ce18f614afa65f987c202d7b2234e", - "https://deno.land/std@0.219.0/io/iterate_reader.ts": "1e5e4fea22d8965afb7df4ee9ab9adda0a0fc581adbea31bc2f2d25453f8a6e9", - "https://deno.land/std@0.219.0/io/reader_from_stream_reader.ts": "a75bbc93f39df8b0e372cc1fbdc416a7cbf2a39fc4c09ddb057f1241100191c5", - "https://deno.land/std@0.219.0/io/to_readable_stream.ts": "ed03a44a1ec1cc55a85a857acf6cac472035298f6f3b6207ea209f93b4aefb39", - "https://deno.land/std@0.219.0/io/to_writable_stream.ts": "ef422e0425963c8a1e0481674e66c3023da50f0acbe5ef51ec9789efc3c1e2ed", - "https://deno.land/std@0.219.0/io/types.ts": "acecb3074c730b5ff487ba4fe9ce51e67bd982aa07c95e5f5679b7b2f24ad129", - "https://deno.land/std@0.219.0/io/write_all.ts": "24aac2312bb21096ae3ae0b102b22c26164d3249dff96dbac130958aa736f038", - "https://deno.land/std@0.219.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", - "https://deno.land/std@0.219.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", - "https://deno.land/std@0.219.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", - "https://deno.land/std@0.219.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", - "https://deno.land/std@0.219.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.219.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", - "https://deno.land/std@0.219.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", - "https://deno.land/std@0.219.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", - "https://deno.land/std@0.219.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.219.0/path/_common/normalize_string.ts": "dfdf657a1b1a7db7999f7c575ee7e6b0551d9c20f19486c6c3f5ff428384c965", - "https://deno.land/std@0.219.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", - "https://deno.land/std@0.219.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", - "https://deno.land/std@0.219.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", - "https://deno.land/std@0.219.0/path/_interface.ts": "a1419fcf45c0ceb8acdccc94394e3e94f99e18cfd32d509aab514c8841799600", - "https://deno.land/std@0.219.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", - "https://deno.land/std@0.219.0/path/basename.ts": "5d341aadb7ada266e2280561692c165771d071c98746fcb66da928870cd47668", - "https://deno.land/std@0.219.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", - "https://deno.land/std@0.219.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", - "https://deno.land/std@0.219.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", - "https://deno.land/std@0.219.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", - "https://deno.land/std@0.219.0/path/format.ts": "42a2f3201343df77061207e6aaf78c95bafce7f711dcb7fe1e5840311c505778", - "https://deno.land/std@0.219.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", - "https://deno.land/std@0.219.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", - "https://deno.land/std@0.219.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", - "https://deno.land/std@0.219.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", - "https://deno.land/std@0.219.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", - "https://deno.land/std@0.219.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", - "https://deno.land/std@0.219.0/path/mod.ts": "2821a1bb3a4148a0ffe79c92aa41aa9319fef73c6d6f5178f52b2c720d3eb02d", - "https://deno.land/std@0.219.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", - "https://deno.land/std@0.219.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", - "https://deno.land/std@0.219.0/path/parse.ts": "65e8e285f1a63b714e19ef24b68f56e76934c3df0b6e65fd440d3991f4f8aefb", - "https://deno.land/std@0.219.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", - "https://deno.land/std@0.219.0/path/posix/basename.ts": "39ee27a29f1f35935d3603ccf01d53f3d6e0c5d4d0f84421e65bd1afeff42843", - "https://deno.land/std@0.219.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.219.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", - "https://deno.land/std@0.219.0/path/posix/dirname.ts": "6535d2bdd566118963537b9dda8867ba9e2a361015540dc91f5afbb65c0cce8b", - "https://deno.land/std@0.219.0/path/posix/extname.ts": "8d36ae0082063c5e1191639699e6f77d3acf501600a3d87b74943f0ae5327427", - "https://deno.land/std@0.219.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", - "https://deno.land/std@0.219.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", - "https://deno.land/std@0.219.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", - "https://deno.land/std@0.219.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", - "https://deno.land/std@0.219.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.219.0/path/posix/join.ts": "744fadcbee7047688696455c7cbb368a9625ffde67fc3058a61c98948fcd04de", - "https://deno.land/std@0.219.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.219.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.219.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", - "https://deno.land/std@0.219.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.219.0/path/posix/parse.ts": "0b1fc4cb890dbb699ec1d2c232d274843b4a7142e1ad976b69fe51c954eb6080", - "https://deno.land/std@0.219.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", - "https://deno.land/std@0.219.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", - "https://deno.land/std@0.219.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", - "https://deno.land/std@0.219.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", - "https://deno.land/std@0.219.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", - "https://deno.land/std@0.219.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", - "https://deno.land/std@0.219.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", - "https://deno.land/std@0.219.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", - "https://deno.land/std@0.219.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", - "https://deno.land/std@0.219.0/path/windows/basename.ts": "e2dbf31d1d6385bfab1ce38c333aa290b6d7ae9e0ecb8234a654e583cf22f8fe", - "https://deno.land/std@0.219.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.219.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", - "https://deno.land/std@0.219.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", - "https://deno.land/std@0.219.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", - "https://deno.land/std@0.219.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", - "https://deno.land/std@0.219.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", - "https://deno.land/std@0.219.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", - "https://deno.land/std@0.219.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", - "https://deno.land/std@0.219.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.219.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", - "https://deno.land/std@0.219.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.219.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.219.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", - "https://deno.land/std@0.219.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.219.0/path/windows/parse.ts": "dbdfe2bc6db482d755b5f63f7207cd019240fcac02ad2efa582adf67ff10553a", - "https://deno.land/std@0.219.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", - "https://deno.land/std@0.219.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", - "https://deno.land/std@0.219.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", - "https://deno.land/std@0.219.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", - "https://deno.land/std@0.219.0/semver/_constants.ts": "5ef89c5f33e6095546ae3e57920592feefcb8372d4cc05542f6bf15a1977e3c9", - "https://deno.land/std@0.219.0/semver/_shared.ts": "5c53a675225cba9ad74ae2e17c124e333728fc2b551a13e8a32b99433b90c1c2", - "https://deno.land/std@0.219.0/semver/can_parse.ts": "d4a26f74be078f3ab10293b07bf022021a2f362b3e21b58422c214e7268110b2", - "https://deno.land/std@0.219.0/semver/compare.ts": "e8871844a35cc8fe16e883c16e5237e06a93aa4830ae10d06501abe63586fc57", - "https://deno.land/std@0.219.0/semver/constants.ts": "a0daa58502949654af044928f86288d8b27bd1880218e9faba7733ec0bde63ab", - "https://deno.land/std@0.219.0/semver/difference.ts": "be4f01b7745406408a16b708185a48c1c652cc87e0244b12a5ca75c5585db668", - "https://deno.land/std@0.219.0/semver/equals.ts": "8b9b18260c9a55feee9d3f9250fba345be922380f2e8f8009e455c394ce5e81d", - "https://deno.land/std@0.219.0/semver/format.ts": "26d3a357ac5abd73dee0fe7dbbac6107fbdce0a844370c7b1bcb673c92e46bf6", - "https://deno.land/std@0.219.0/semver/format_range.ts": "6ad2d0c27aac63dfb7efca6286a6ab7742accfb986cc53662047740f17dacfe5", - "https://deno.land/std@0.219.0/semver/greater_or_equal.ts": "89c26f68070896944676eb9704cbb617febc6ed693720282741d6859c3d1fe80", - "https://deno.land/std@0.219.0/semver/greater_than.ts": "d8c4a227cd28ea80a1de9c80215d7f3f95786fe1b196f0cb5ec91d6567adad27", - "https://deno.land/std@0.219.0/semver/increment.ts": "427a043be71d6481e45c1a3939b955e800924d70779cb297b872d9cbf9f0e46d", - "https://deno.land/std@0.219.0/semver/is_range.ts": "15dd9a8d6a8dee56dea6799d8c8210e06c0a38cc1a9aa6152aeea39ce45e2111", - "https://deno.land/std@0.219.0/semver/is_semver.ts": "57914027d6141e593eb04418aaabbfd6f4562a1c53c6c33a1743fa50ada8d849", - "https://deno.land/std@0.219.0/semver/less_or_equal.ts": "7dbf8190f37f3281048c30cf11e072a7af18685534ae88d295baa170b485bd90", - "https://deno.land/std@0.219.0/semver/less_than.ts": "b0c7902c54cecadcc7c1c80afc2f6a0f1bf0b3f53c8d2bfd11f01a3a414cccfe", - "https://deno.land/std@0.219.0/semver/max_satisfying.ts": "03e5182a7424c308ddbb410e4b927da0dabc4e07d4b5a72f7e9b26fb18a02152", - "https://deno.land/std@0.219.0/semver/min_satisfying.ts": "b6fadc9af17278289481c416e1eb135614f88063f4fc2b7b72b43eb3baa2f08f", - "https://deno.land/std@0.219.0/semver/mod.ts": "6e1f8854cec50c027037a597d3dd54af72e063f763ec0cbc4ea1e534a627ffae", - "https://deno.land/std@0.219.0/semver/not_equals.ts": "17147a6f68b9d14f4643c1e2150378ccf6954710309f9618f75b411752a8e13d", - "https://deno.land/std@0.219.0/semver/parse.ts": "b64052ff8ce0b0bba9ed97b835a224c828fc7ad227585c3e8c2bac72a07bf572", - "https://deno.land/std@0.219.0/semver/parse_range.ts": "5190afffc90cc14410ce2478fb81ed83b55d7e96b6fbbd69fc715c457082ec94", - "https://deno.land/std@0.219.0/semver/range_intersects.ts": "2c358f7c27b51960a9889be5462ec1cac44feeb5e40041a5c5a03700c0ddc017", - "https://deno.land/std@0.219.0/semver/range_max.ts": "4c43d018841ba67d018e515f0aef32658dab611a39fdc74e31b1e48709be281c", - "https://deno.land/std@0.219.0/semver/range_min.ts": "37c5e3dac7bd63812ae249add9ea815a351826f510d2baf391c225d1d8272d17", - "https://deno.land/std@0.219.0/semver/test_range.ts": "72ba2af827e4ad94db9a29e22e86cbec9b3f8519fc36fd6ce0d4308717536c70", - "https://deno.land/std@0.219.0/semver/try_parse.ts": "7e2a3594212445d9d6f6154f02288d66a0c0b79ce3e859c41f3d47e29dfa439a", - "https://deno.land/std@0.219.0/semver/try_parse_range.ts": "4f211f0ff4f5fdaa85622ab96c360123bbcf0e5a91a57eb7a8258af6b7a3c704", - "https://deno.land/std@0.219.0/semver/types.ts": "13e1e0c64a4ac76f0add74afee6240c92a7dba184e63e0bd4cb456afed8c7291", - "https://deno.land/std@0.219.0/streams/_common.ts": "948735ef6d140cd6916dca861197b88fc57db52c2f923c392b7a14033d8fed4b", - "https://deno.land/std@0.219.0/streams/buffer.ts": "e012de72a53ad17c56512488e9afb6f4b6ed046b32fc1415ae7a4e6fc0efce38", - "https://deno.land/std@0.219.0/streams/byte_slice_stream.ts": "5bbdcadb118390affa9b3d0a0f73ef8e83754f59bb89df349add669dd9369713", - "https://deno.land/std@0.219.0/streams/delimiter_stream.ts": "4e4050740ff27a8824defa6c96126229ef9d794c4ace4ef9cabb10b5ad4a5d14", - "https://deno.land/std@0.219.0/streams/early_zip_readable_streams.ts": "21f5cf6dd36381c6a50c31a7727b5bd219f6382bbb7a413418595c3e466c4d14", - "https://deno.land/std@0.219.0/streams/iterate_reader.ts": "a50bed95514736c3c554e4c69ea2d8d2699252e4e74507769999d22c3886c777", - "https://deno.land/std@0.219.0/streams/limited_bytes_transform_stream.ts": "b22a45a337374e863c4eb1867ec6b8ad3e68620a6c52fe837746060ea610e6f1", - "https://deno.land/std@0.219.0/streams/limited_transform_stream.ts": "4c47da5ca38a30fa9f33b0f1a61d4548e7f52a9a58c294b0f430f680e44cc543", - "https://deno.land/std@0.219.0/streams/merge_readable_streams.ts": "73eed8ff54c9111b8b974b11a5a11c1ed0b7800e0157c39277ccac3ed14721e2", - "https://deno.land/std@0.219.0/streams/mod.ts": "d56624832b9649b680c74ab9c77e746e8be81ae1a24756cc04623e25a0d43ce9", - "https://deno.land/std@0.219.0/streams/readable_stream_from_reader.ts": "4289a63836f73901441c1879f2be76eea2a983920f4b10a4a9b8a6d8c29ece56", - "https://deno.land/std@0.219.0/streams/reader_from_iterable.ts": "82f1ecef32ec70c7841ca2a54b09c73167d940f0578bec91e874bb8cd42ba8f3", - "https://deno.land/std@0.219.0/streams/reader_from_stream_reader.ts": "dda702bd365a133be8bdbc5a1ba96c67b350c3504410632f3a833895bfc7bae3", - "https://deno.land/std@0.219.0/streams/text_delimiter_stream.ts": "94dfc900204e306496c1b58c80473db57b6097afdcb8ea9eaff453a193a659f1", - "https://deno.land/std@0.219.0/streams/text_line_stream.ts": "21f33d3922e019ec1a1676474beb543929cb564ec99b69cd2654e029e0f45bd5", - "https://deno.land/std@0.219.0/streams/to_array_buffer.ts": "1a9c07c4a396ce557ab205c44415815ab13b614fed94a12f62b80f8e650c726d", - "https://deno.land/std@0.219.0/streams/to_blob.ts": "bf5daaae50fa8f57e0c8bfd7474ebac16ac09e130e3d01ef2947ae5153912b4a", - "https://deno.land/std@0.219.0/streams/to_json.ts": "b6a908d0da7cd30956e5fbbfa7460747e50b8f307d1041282ed6fe9070d579ee", - "https://deno.land/std@0.219.0/streams/to_text.ts": "6f93593bdfc2cea5cca39755ea5caf0d4092580c0a713dfe04a1e85c60df331f", - "https://deno.land/std@0.219.0/streams/to_transform_stream.ts": "4c4836455ef89bab9ece55975ee3a819f07d3d8b0e43101ec7f4ed033c8a2b61", - "https://deno.land/std@0.219.0/streams/writable_stream_from_writer.ts": "62f2712d3a7bebd981fca8bd5140192c37450f9c4aa94283f7ca833e46bc7485", - "https://deno.land/std@0.219.0/streams/writer_from_stream_writer.ts": "b0e39ef607dfdc5abdfb627edf61a9672809463e2bb022afcbaf0cd006c40feb", - "https://deno.land/std@0.219.0/streams/zip_readable_streams.ts": "53eb10d7557539b489bd858907aab6dd28247f074b3446573801de3150cb932e", - "https://deno.land/std@0.219.0/yaml/_dumper/dumper.ts": "5a7b9b18e5b3f5e88b84d040c530b1f8e814c3565dfff7b7a5d16279bdf15ca4", - "https://deno.land/std@0.219.0/yaml/_dumper/dumper_state.ts": "ea262b459dc891c4828a0f814841abfe12d160d319c4b57eb11ed0c768cfcb6b", - "https://deno.land/std@0.219.0/yaml/_error.ts": "f38cdebdb69cde16903d9aa2f3b8a3dd9d13e5f7f3570bf662bfaca69fef669e", - "https://deno.land/std@0.219.0/yaml/_loader/loader.ts": "959c2ab7bbf5fb565bc3f3344f5e92b2712d39ea77a1e57039591696335c6d29", - "https://deno.land/std@0.219.0/yaml/_loader/loader_state.ts": "ee216de6040551940b85473c3185fdb7a6f3030b77153f87a6b7f63f82e489ea", - "https://deno.land/std@0.219.0/yaml/_mark.ts": "1d9d071f8c62d19f284ca4a5aae41680e67653a06a2a4b0eccf931fc5719afa1", - "https://deno.land/std@0.219.0/yaml/_state.ts": "f3b1c1fd11860302f1f33e35e9ce089bf069d4943e8d67516cd6bedbba058c13", - "https://deno.land/std@0.219.0/yaml/_type/binary.ts": "26216e8f306e62401ba00e306e93cdd5fb88da361cdaa567e63ee216dc3ebf93", - "https://deno.land/std@0.219.0/yaml/_type/bool.ts": "121743b23ba82a27ad6a3ec6298c7f5b0908f90e52707f8644a91f7ad51ed2ef", - "https://deno.land/std@0.219.0/yaml/_type/float.ts": "73295b7d8cc24edadfea5041e2255a6332e3491715e884e3bb7d03b563a90a81", - "https://deno.land/std@0.219.0/yaml/_type/function.ts": "bbf705058942bf3370604b37eb77a10aadd72f986c237c9f69b43378a42202c1", - "https://deno.land/std@0.219.0/yaml/_type/int.ts": "c2dc88438a60fccc8d2226042bd18b9967753adaf6bd145feb8b99d567e432ce", - "https://deno.land/std@0.219.0/yaml/_type/map.ts": "ae2acb1cb837fb8e96c75c98611cfd45af847d0114ab5336333c318e7d4b12f4", - "https://deno.land/std@0.219.0/yaml/_type/merge.ts": "ad0d971f91d2fb9f4ab3eba0c837eae357b1804d6b798adc99dc917bc5306b11", - "https://deno.land/std@0.219.0/yaml/_type/mod.ts": "e8929d7b1c969a74f76338d4eb380ef8c4a26cd6441117d521f076b766e9c265", - "https://deno.land/std@0.219.0/yaml/_type/nil.ts": "cbe4387d02d5933322c21b25d8955c5e6228c492e391a6fb82dcf4f498cc421c", - "https://deno.land/std@0.219.0/yaml/_type/omap.ts": "cda915105ab22ba9e1d6317adacee8eec2d8ddaf864cc2f814e3e476946e72c6", - "https://deno.land/std@0.219.0/yaml/_type/pairs.ts": "f97d7dc2b3fa18e246763f44147f6df0d6036c7e122af3e7b6692e4a6b0e289f", - "https://deno.land/std@0.219.0/yaml/_type/regexp.ts": "e49eb9e1c9356fd142bc15f7f323820d411fcc537b5ba3896df9a8b812d270a4", - "https://deno.land/std@0.219.0/yaml/_type/seq.ts": "2deffc7f970869bc01a1541b4961d076329a1c2b30b95e07918f3132db7c3fe2", - "https://deno.land/std@0.219.0/yaml/_type/set.ts": "be8a9e7237a7ffc92dfbe7f5e552d84b7eeba60f3f73cc77fc3c59d3506c74ea", - "https://deno.land/std@0.219.0/yaml/_type/str.ts": "88f0a1ba12295520cd57e96cd78d53aa0787d53c7a1c506155f418c496c2f550", - "https://deno.land/std@0.219.0/yaml/_type/timestamp.ts": "57a6bb4a0f0bd5eab85a1f0ee5ac8820fd3125ea939dc8a037de997a2b6ad05d", - "https://deno.land/std@0.219.0/yaml/_type/undefined.ts": "9d215953c65740f1764e0bdca021007573473f0c49e087f00d9ff02817ecfc97", - "https://deno.land/std@0.219.0/yaml/_utils.ts": "91bbe28b5e7000b9594e40ff5353f8fe7a7ba914eec917e1202cbaf5ac931c58", - "https://deno.land/std@0.219.0/yaml/mod.ts": "54e9bfad77c8cd58f49b65f4d568045ff08989ed36318a2ca733a43cb6f1bc00", - "https://deno.land/std@0.219.0/yaml/parse.ts": "f45278d9ebccb789af4eceeffa5c291e194bcf1fa9aab1b34ff52c2bd4a9d886", - "https://deno.land/std@0.219.0/yaml/schema.ts": "dae089ffa1ac4a2b031176aa019e126be6f7230a3011de38463ead8639b14739", - "https://deno.land/std@0.219.0/yaml/schema/core.ts": "1222f9401e2a0c1d38e63d753da98be333e61a6032335e9c46a68bd45ecce85a", - "https://deno.land/std@0.219.0/yaml/schema/default.ts": "b77c71cfd453951dd828e5f2f02f9f37335c9c0a49c8051d1a9653fa82357740", - "https://deno.land/std@0.219.0/yaml/schema/extended.ts": "996da59626409047b5c1a2d68bdbeead43914cedede47c5923e80ae4febe7d24", - "https://deno.land/std@0.219.0/yaml/schema/failsafe.ts": "24b2b630cef6fcce7de6d29db651523b0f49e5691d690931c42ecf4823837fdb", - "https://deno.land/std@0.219.0/yaml/schema/json.ts": "0fb9268282d266c24d963e75ef77f51accbbb74f40713a99e83ad621a81bc9ae", - "https://deno.land/std@0.219.0/yaml/schema/mod.ts": "9bf7ff80c2a246f781bdcab979211d0389760831a974cf5883bf2016567e3507", - "https://deno.land/std@0.219.0/yaml/stringify.ts": "580f8b2fa56e3233424520d8242f4fc0edf41ac54a6a6d2f6f8e0b6e99cd63c0", - "https://deno.land/std@0.219.0/yaml/type.ts": "708dde5f20b01cc1096489b7155b6af79a217d585afb841128e78c3c2391eb5c", "https://deno.land/std@0.221.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", "https://deno.land/std@0.221.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8", "https://deno.land/std@0.221.0/console/_data.json": "cf2cc9d039a192b3adbfe64627167c7e6212704c888c25c769fc8f1709e1e1b8", @@ -1245,304 +944,6 @@ "https://deno.land/std@0.221.0/fmt/colors.ts": "d239d84620b921ea520125d778947881f62c50e78deef2657073840b8af9559a", "https://deno.land/std@0.221.0/text/closest_string.ts": "8a91ee8b6d69ff96addcb7c251dad53b476ac8be9c756a0ef786abe9e13a93a5", "https://deno.land/std@0.221.0/text/levenshtein_distance.ts": "24be5cc88326bbba83ca7c1ea89259af0050cffda2817ff3a6d240ad6495eae2", - "https://deno.land/std@0.224.0/archive/_common.ts": "5fcad5f7280cec1d20540b4a6e43ea9a6fd63daf9c4cf8a58c6321d07c32e317", - "https://deno.land/std@0.224.0/archive/untar.ts": "bd39dbeda737f6fd9409b5923d7172f8abd7826508f09c4a1c38886574f6da4a", - "https://deno.land/std@0.224.0/assert/_constants.ts": "a271e8ef5a573f1df8e822a6eb9d09df064ad66a4390f21b3e31f820a38e0975", - "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", - "https://deno.land/std@0.224.0/assert/assert_almost_equals.ts": "9e416114322012c9a21fa68e187637ce2d7df25bcbdbfd957cd639e65d3cf293", - "https://deno.land/std@0.224.0/assert/assert_array_includes.ts": "14c5094471bc8e4a7895fc6aa5a184300d8a1879606574cb1cd715ef36a4a3c7", - "https://deno.land/std@0.224.0/assert/assert_equals.ts": "3bbca947d85b9d374a108687b1a8ba3785a7850436b5a8930d81f34a32cb8c74", - "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd", - "https://deno.land/std@0.224.0/assert/assert_false.ts": "3e9be8e33275db00d952e9acb0cd29481a44fa0a4af6d37239ff58d79e8edeff", - "https://deno.land/std@0.224.0/assert/assert_greater.ts": "5e57b201fd51b64ced36c828e3dfd773412c1a6120c1a5a99066c9b261974e46", - "https://deno.land/std@0.224.0/assert/assert_greater_or_equal.ts": "9870030f997a08361b6f63400273c2fb1856f5db86c0c3852aab2a002e425c5b", - "https://deno.land/std@0.224.0/assert/assert_instance_of.ts": "e22343c1fdcacfaea8f37784ad782683ec1cf599ae9b1b618954e9c22f376f2c", - "https://deno.land/std@0.224.0/assert/assert_is_error.ts": "f856b3bc978a7aa6a601f3fec6603491ab6255118afa6baa84b04426dd3cc491", - "https://deno.land/std@0.224.0/assert/assert_less.ts": "60b61e13a1982865a72726a5fa86c24fad7eb27c3c08b13883fb68882b307f68", - "https://deno.land/std@0.224.0/assert/assert_less_or_equal.ts": "d2c84e17faba4afe085e6c9123a63395accf4f9e00150db899c46e67420e0ec3", - "https://deno.land/std@0.224.0/assert/assert_match.ts": "ace1710dd3b2811c391946954234b5da910c5665aed817943d086d4d4871a8b7", - "https://deno.land/std@0.224.0/assert/assert_not_equals.ts": "78d45dd46133d76ce624b2c6c09392f6110f0df9b73f911d20208a68dee2ef29", - "https://deno.land/std@0.224.0/assert/assert_not_instance_of.ts": "3434a669b4d20cdcc5359779301a0588f941ffdc2ad68803c31eabdb4890cf7a", - "https://deno.land/std@0.224.0/assert/assert_not_match.ts": "df30417240aa2d35b1ea44df7e541991348a063d9ee823430e0b58079a72242a", - "https://deno.land/std@0.224.0/assert/assert_not_strict_equals.ts": "37f73880bd672709373d6dc2c5f148691119bed161f3020fff3548a0496f71b8", - "https://deno.land/std@0.224.0/assert/assert_object_match.ts": "411450fd194fdaabc0089ae68f916b545a49d7b7e6d0026e84a54c9e7eed2693", - "https://deno.land/std@0.224.0/assert/assert_rejects.ts": "4bee1d6d565a5b623146a14668da8f9eb1f026a4f338bbf92b37e43e0aa53c31", - "https://deno.land/std@0.224.0/assert/assert_strict_equals.ts": "b4f45f0fd2e54d9029171876bd0b42dd9ed0efd8f853ab92a3f50127acfa54f5", - "https://deno.land/std@0.224.0/assert/assert_string_includes.ts": "496b9ecad84deab72c8718735373feb6cdaa071eb91a98206f6f3cb4285e71b8", - "https://deno.land/std@0.224.0/assert/assert_throws.ts": "c6508b2879d465898dab2798009299867e67c570d7d34c90a2d235e4553906eb", - "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", - "https://deno.land/std@0.224.0/assert/equal.ts": "bddf07bb5fc718e10bb72d5dc2c36c1ce5a8bdd3b647069b6319e07af181ac47", - "https://deno.land/std@0.224.0/assert/fail.ts": "0eba674ffb47dff083f02ced76d5130460bff1a9a68c6514ebe0cdea4abadb68", - "https://deno.land/std@0.224.0/assert/mod.ts": "48b8cb8a619ea0b7958ad7ee9376500fe902284bb36f0e32c598c3dc34cbd6f3", - "https://deno.land/std@0.224.0/assert/unimplemented.ts": "8c55a5793e9147b4f1ef68cd66496b7d5ba7a9e7ca30c6da070c1a58da723d73", - "https://deno.land/std@0.224.0/assert/unreachable.ts": "5ae3dbf63ef988615b93eb08d395dda771c96546565f9e521ed86f6510c29e19", - "https://deno.land/std@0.224.0/async/_util.ts": "3e94e674c974c5c9277f6b3ba2d4e8403c320ba5cebb891f50afa3af4b8e0ac9", - "https://deno.land/std@0.224.0/async/abortable.ts": "ea6ddb98c1c6f066d5b26c8fd030e2d5afa54571182674aa07929c39dfa8c5b2", - "https://deno.land/std@0.224.0/async/deadline.ts": "008929d69b1efdd11b1fa55784bb4882add6adf8722868b26e87f68e35efc573", - "https://deno.land/std@0.224.0/async/debounce.ts": "e7bcccb17b6fe34646ac5d37c2a6d3830ca049e7e3534d2aace4001596f42eff", - "https://deno.land/std@0.224.0/async/delay.ts": "f90dd685b97c2f142b8069082993e437b1602b8e2561134827eeb7c12b95c499", - "https://deno.land/std@0.224.0/async/mod.ts": "ae2b6869ad7563f825e037e02c263507da4a55563b4a0bcd9079d2c3eb2670a2", - "https://deno.land/std@0.224.0/async/mux_async_iterator.ts": "8d960e951c7bf6cb682522c2ebf5bd3e738b27c6a7ac9500ab64d27054930972", - "https://deno.land/std@0.224.0/async/pool.ts": "2b972e3643444b73f6a8bcdd19799a2d0821b28a45fbe47fd333223eb84327f0", - "https://deno.land/std@0.224.0/async/retry.ts": "29025b09259c22123c599b8c957aeff2755854272954776dc9a5846c72ea4cfe", - "https://deno.land/std@0.224.0/async/tee.ts": "34373c58950b7ac5950632dc8c9908076abeefcc9032d6299fff92194c284fbd", - "https://deno.land/std@0.224.0/bytes/concat.ts": "86161274b5546a02bdb3154652418efe7af8c9310e8d54107a68aaa148e0f5ed", - "https://deno.land/std@0.224.0/bytes/copy.ts": "08d85062240a7223e6ec4e2af193ad1a50c59a43f0d86ac3a7b16f3e0d77c028", - "https://deno.land/std@0.224.0/collections/_utils.ts": "b2ec8ada31b5a72ebb1d99774b849b4c09fe4b3a38d07794bd010bd218a16e0b", - "https://deno.land/std@0.224.0/collections/chunk.ts": "e6e533d6ae047f2082892831d463426f79cdd0d3f09ce298317a8469abf8467e", - "https://deno.land/std@0.224.0/collections/deep_merge.ts": "04f8d2a6cfa15c7580e788689bcb5e162512b9ccb18bab1241824b432a78551e", - "https://deno.land/std@0.224.0/collections/distinct.ts": "42d81633e4ccd5ea89118cb08f875bbfc683ac6620df2fa60f3d07270b177f4d", - "https://deno.land/std@0.224.0/collections/distinct_by.ts": "e895705decb0ce88b31c6679fd4e2bd08ac6d47cde7d00bf2016e3c2bac565a7", - "https://deno.land/std@0.224.0/collections/filter_keys.ts": "bf8eaae2769e6ddd34f23ba1912f7feda2b6f374253c07a6630e9a2e384ba611", - "https://deno.land/std@0.224.0/collections/filter_values.ts": "ad8fae5751977598f8c794d65f0d42c9f9e47a7d774cf82b2449cd78ff4f729a", - "https://deno.land/std@0.224.0/collections/map_keys.ts": "2fd91963117d2376ea6dbbe473d77c20ede79b72437ed0dac36161b1af62f058", - "https://deno.land/std@0.224.0/collections/map_values.ts": "91d6ece4b4dc4b94abc378f51e0e309e7f7f18b2ce4c335dab673a31ebd17c75", - "https://deno.land/std@0.224.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs": "7cd490ae1553c97459bd02de4c3f0a552768a85621949b2366003f3cf84b99d7", - "https://deno.land/std@0.224.0/crypto/_wasm/mod.ts": "e89fbbc3c4722602ff975dd85f18273c7741ec766a9b68f6de4fd1d9876409f8", - "https://deno.land/std@0.224.0/crypto/crypto.ts": "e58d78f3db111a499261dbab037ec78cc89da0516a50e1f0205665980a3417e3", - "https://deno.land/std@0.224.0/crypto/mod.ts": "9148fb70ca3d64977e9487b2002d3b1026e8ad8a2078774b807586ba3c77e3bb", - "https://deno.land/std@0.224.0/crypto/timing_safe_equal.ts": "bc3622b5aec05e2d8b735bf60633425c34333c06cfb6c4a9f102e4a0f3931ced", - "https://deno.land/std@0.224.0/crypto/unstable_keystack.ts": "c2a6f6ed67a4e78745e3c9b490ebb7c12f6066f5c2fe0c69d353961909dc82dd", - "https://deno.land/std@0.224.0/encoding/_util.ts": "beacef316c1255da9bc8e95afb1fa56ed69baef919c88dc06ae6cb7a6103d376", - "https://deno.land/std@0.224.0/encoding/base64.ts": "dd59695391584c8ffc5a296ba82bcdba6dd8a84d41a6a539fbee8e5075286eaf", - "https://deno.land/std@0.224.0/encoding/base64url.ts": "ef40e0f18315ab539f17cebcc32839779e018d86dea9df39d94d302f342a1713", - "https://deno.land/std@0.224.0/encoding/hex.ts": "6270f25e5d85f99fcf315278670ba012b04b7c94b67715b53f30d03249687c07", - "https://deno.land/std@0.224.0/flags/mod.ts": "88553267f34519c8982212185339efdb2d2e62c159ec558f47eb50c8952a6be3", - "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", - "https://deno.land/std@0.224.0/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412", - "https://deno.land/std@0.224.0/fs/_get_file_info_type.ts": "da7bec18a7661dba360a1db475b826b18977582ce6fc9b25f3d4ee0403fe8cbd", - "https://deno.land/std@0.224.0/fs/_is_same_path.ts": "709c95868345fea051c58b9e96af95cff94e6ae98dfcff2b66dee0c212c4221f", - "https://deno.land/std@0.224.0/fs/_is_subdir.ts": "c68b309d46cc8568ed83c000f608a61bbdba0943b7524e7a30f9e450cf67eecd", - "https://deno.land/std@0.224.0/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e", - "https://deno.land/std@0.224.0/fs/copy.ts": "7ab12a16adb65d155d4943c88081ca16ce3b0b5acada64c1ce93800653678039", - "https://deno.land/std@0.224.0/fs/empty_dir.ts": "e400e96e1d2c8c558a5a1712063bd43939e00619c1d1cc29959babc6f1639418", - "https://deno.land/std@0.224.0/fs/ensure_dir.ts": "51a6279016c65d2985f8803c848e2888e206d1b510686a509fa7cc34ce59d29f", - "https://deno.land/std@0.224.0/fs/ensure_file.ts": "67608cf550529f3d4aa1f8b6b36bf817bdc40b14487bf8f60e61cbf68f507cf3", - "https://deno.land/std@0.224.0/fs/ensure_link.ts": "5c98503ebfa9cc05e2f2efaa30e91e60b4dd5b43ebbda82f435c0a5c6e3ffa01", - "https://deno.land/std@0.224.0/fs/ensure_symlink.ts": "cafe904cebacb9a761977d6dbf5e3af938be946a723bb394080b9a52714fafe4", - "https://deno.land/std@0.224.0/fs/eol.ts": "18c4ac009d0318504c285879eb7f47942643f13619e0ff070a0edc59353306bd", - "https://deno.land/std@0.224.0/fs/exists.ts": "3d38cb7dcbca3cf313be343a7b8af18a87bddb4b5ca1bd2314be12d06533b50f", - "https://deno.land/std@0.224.0/fs/expand_glob.ts": "2e428d90acc6676b2aa7b5c78ef48f30641b13f1fe658e7976c9064fb4b05309", - "https://deno.land/std@0.224.0/fs/mod.ts": "c25e6802cbf27f3050f60b26b00c2d8dba1cb7fcdafe34c66006a7473b7b34d4", - "https://deno.land/std@0.224.0/fs/move.ts": "ca205d848908d7f217353bc5c623627b1333490b8b5d3ef4cab600a700c9bd8f", - "https://deno.land/std@0.224.0/fs/walk.ts": "cddf87d2705c0163bff5d7767291f05b0f46ba10b8b28f227c3849cace08d303", - "https://deno.land/std@0.224.0/http/cookie.ts": "a377fa60175ba5f61dd4b8a70b34f2bbfbc70782dfd5faf36d314c42e4306006", - "https://deno.land/std@0.224.0/internal/diff.ts": "6234a4b493ebe65dc67a18a0eb97ef683626a1166a1906232ce186ae9f65f4e6", - "https://deno.land/std@0.224.0/internal/format.ts": "0a98ee226fd3d43450245b1844b47003419d34d210fa989900861c79820d21c2", - "https://deno.land/std@0.224.0/internal/mod.ts": "534125398c8e7426183e12dc255bb635d94e06d0f93c60a297723abe69d3b22e", - "https://deno.land/std@0.224.0/io/_common.ts": "36705cdb4dfcd338d6131bca1b16e48a4d5bf0d1dada6ce397268e88c17a5835", - "https://deno.land/std@0.224.0/io/_constants.ts": "3c7ad4695832e6e4a32e35f218c70376b62bc78621ef069a4a0a3d55739f8856", - "https://deno.land/std@0.224.0/io/buf_reader.ts": "aa6d589e567c964c8ba1f582648f3feac45e88ab2e3d2cc2c9f84fd73c05d051", - "https://deno.land/std@0.224.0/io/buffer.ts": "4d1f805f350433e418002accec798bc6c33ce18f614afa65f987c202d7b2234e", - "https://deno.land/std@0.224.0/io/copy.ts": "63c6a4acf71fb1e89f5e47a7b3b2972f9d2c56dd645560975ead72db7eb23f61", - "https://deno.land/std@0.224.0/io/iterate_reader.ts": "1e5e4fea22d8965afb7df4ee9ab9adda0a0fc581adbea31bc2f2d25453f8a6e9", - "https://deno.land/std@0.224.0/io/read_all.ts": "876c1cb20adea15349c72afc86cecd3573335845ae778967aefb5e55fe5a8a4a", - "https://deno.land/std@0.224.0/io/reader_from_stream_reader.ts": "a75bbc93f39df8b0e372cc1fbdc416a7cbf2a39fc4c09ddb057f1241100191c5", - "https://deno.land/std@0.224.0/io/to_readable_stream.ts": "ed03a44a1ec1cc55a85a857acf6cac472035298f6f3b6207ea209f93b4aefb39", - "https://deno.land/std@0.224.0/io/to_writable_stream.ts": "ef422e0425963c8a1e0481674e66c3023da50f0acbe5ef51ec9789efc3c1e2ed", - "https://deno.land/std@0.224.0/io/types.ts": "acecb3074c730b5ff487ba4fe9ce51e67bd982aa07c95e5f5679b7b2f24ad129", - "https://deno.land/std@0.224.0/io/write_all.ts": "24aac2312bb21096ae3ae0b102b22c26164d3249dff96dbac130958aa736f038", - "https://deno.land/std@0.224.0/log/_config.ts": "489e11b6d3c917bf5fc954c5e914c095d3480efd924d1e85f2fc576468581c54", - "https://deno.land/std@0.224.0/log/_state.ts": "314c0c31ab9c8f4fb33326ad446757d35f75e5bb21746b7720ed4e3f3a939da1", - "https://deno.land/std@0.224.0/log/base_handler.ts": "f03f013dac9c1a226aab60c6f5751b3131cc4f2808720715285e0dab5697a54e", - "https://deno.land/std@0.224.0/log/console_handler.ts": "9b17b9025c7d94eab950a25eccca81fd9dd71d063b9f458f149e52db52ab0295", - "https://deno.land/std@0.224.0/log/critical.ts": "a8b44a4c6768629d2a506ffe1a1a048da7ae76d3146000f8a492008eac4ecba0", - "https://deno.land/std@0.224.0/log/debug.ts": "ddd63a549fedc3061deba47e41cd2170263831fc266e503a12b610b77439333b", - "https://deno.land/std@0.224.0/log/error.ts": "3979ee3aadc962345ad50eff8a5470ad3fe07c70370808ddc178ee08c3d6c89c", - "https://deno.land/std@0.224.0/log/file_handler.ts": "68d6d81ec53bdd6ba61eaceec19d12de59a8ad12ace0d7980a592a51f924a242", - "https://deno.land/std@0.224.0/log/formatters.ts": "29e0325902c3b1cbb3b9ffc1f9d77ac2d2e5af35d27b9bdfe4fdbbd83588d4a8", - "https://deno.land/std@0.224.0/log/get_logger.ts": "36a5febf5338f68aadafaf23bbe38a208e2a3150ec02ca2ec5d3c6bbaf840641", - "https://deno.land/std@0.224.0/log/info.ts": "e6c4971e35092d85cd3241fe7eccdb42999083d14db6aadc5e741f6231e275ad", - "https://deno.land/std@0.224.0/log/levels.ts": "632ba12baa2600750d004cc5cb4eabe10e410f3f2bdfcb9f7142b6d767f2fee6", - "https://deno.land/std@0.224.0/log/logger.ts": "57109848fb587fb3843a7b893f22f1a86c1b78c289172627a6305906738f238a", - "https://deno.land/std@0.224.0/log/mod.ts": "650c53c2c5d9eb05210c4ec54184ecb5bd24fb32ce28e65fad039853978f53f3", - "https://deno.land/std@0.224.0/log/rotating_file_handler.ts": "a6e7c712e568b618303273ff95483f6ab86dec0a485c73c2e399765f752b5aa8", - "https://deno.land/std@0.224.0/log/setup.ts": "42425c550da52c7def7f63a4fcc1ac01a4aec6c73336697a640978d6a324e7a6", - "https://deno.land/std@0.224.0/log/warn.ts": "f1a6bc33a481f231a0257e6d66e26c2e695b931d5e917d8de4f2b825778dfd4e", - "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", - "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", - "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", - "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", - "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", - "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", - "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", - "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", - "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", - "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", - "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", - "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", - "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", - "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", - "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", - "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", - "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", - "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", - "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", - "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", - "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", - "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", - "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", - "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", - "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", - "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", - "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", - "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", - "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", - "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", - "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", - "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", - "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", - "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", - "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", - "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", - "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", - "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", - "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", - "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", - "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", - "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", - "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", - "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", - "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", - "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", - "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", - "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", - "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", - "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", - "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", - "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", - "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", - "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", - "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", - "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", - "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", - "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", - "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", - "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", - "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", - "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", - "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", - "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", - "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", - "https://deno.land/std@0.224.0/semver/_constants.ts": "5ef89c5f33e6095546ae3e57920592feefcb8372d4cc05542f6bf15a1977e3c9", - "https://deno.land/std@0.224.0/semver/_shared.ts": "5c53a675225cba9ad74ae2e17c124e333728fc2b551a13e8a32b99433b90c1c2", - "https://deno.land/std@0.224.0/semver/_test_comparator_set.ts": "c57f3009ee30748becb15c14de8f0af518ba7f7e9c4db0dd2a31f925c5f2c811", - "https://deno.land/std@0.224.0/semver/can_parse.ts": "590094363e0ae1b97a71e9924633cda9c4582d42299efbefa643c9de5d9c754c", - "https://deno.land/std@0.224.0/semver/compare.ts": "7b5610c25ded57dc4aa41034ee02857d1a6fff609ab183afea17849284f86236", - "https://deno.land/std@0.224.0/semver/constants.ts": "bd442eb6d51d5032686e02abdf575b32dd08f2c95e653e66bbeb927e8ff54bb5", - "https://deno.land/std@0.224.0/semver/difference.ts": "460608126dd5d49b2b1b93b5d8c70f93936ee0f7049283d4050c2d691115b81c", - "https://deno.land/std@0.224.0/semver/equals.ts": "c22d79ce6f9b80fb8db9af3cb680d8103081fc2c460d57a4761ba11f82b683bd", - "https://deno.land/std@0.224.0/semver/format.ts": "a4492b55a10210a10b9307491c0ec7f0c2475cc82af33de1c2565a15083b83df", - "https://deno.land/std@0.224.0/semver/format_range.ts": "493a9916a806270fc0e4721cf3b4c6a6815cf240150e7e87c58dec23eb574aaa", - "https://deno.land/std@0.224.0/semver/greater_or_equal.ts": "d05ddd0adce43758ce74d4a4d7bc2a20b79cbd7604f01f604187c12735a65d0e", - "https://deno.land/std@0.224.0/semver/greater_than.ts": "12e7bd3790539b791147a1c10654747c60791f2699b72e07bcaba6042ac946a6", - "https://deno.land/std@0.224.0/semver/greater_than_range.ts": "6e709b6220c012660c45915e54485c90d40e3300064f2e083cbf56b636f9c419", - "https://deno.land/std@0.224.0/semver/increment.ts": "24e10e8d867bdbabd3e31d5e1caa4276329d7afb75cb5e89691e9597fdba7720", - "https://deno.land/std@0.224.0/semver/is_range.ts": "00083508729b878ba33fa919cb670d533b1e370798cced3d1e5b2068c5176fb6", - "https://deno.land/std@0.224.0/semver/is_semver.ts": "dc9c36d7a61cfe19749bce2b97d7fb808a66f7f40a2ae9ff1ee6cdc774ecff67", - "https://deno.land/std@0.224.0/semver/less_or_equal.ts": "7f2f07e2844aa8de020b265674e19e94003d00b9cf8d52bc2537007faca06627", - "https://deno.land/std@0.224.0/semver/less_than.ts": "890eb36e6294d245934a33dbe6818164c4ec6fddf3aa585a590031393f781719", - "https://deno.land/std@0.224.0/semver/less_than_range.ts": "4fc346b8151c8b5ad29da7d898ef4a80b84091c8181842d04e6058d319fcf90f", - "https://deno.land/std@0.224.0/semver/max_satisfying.ts": "3d402be276171f677b0eb2d02b9b6b9ddb170f0d52bce545c4839175e2fd0dfc", - "https://deno.land/std@0.224.0/semver/min_satisfying.ts": "f7d7d2d3cb4fa333c29f92e383dda7347ea803d0af777c23c32b4c8132be8fc0", - "https://deno.land/std@0.224.0/semver/mod.ts": "73ba48a686ac3a5df6508f518ecf97a64df1db438ff130a23bbed3cee1f567a8", - "https://deno.land/std@0.224.0/semver/not_equals.ts": "4d16649686e95c7c9bd6631c854e458d81f8c2e53f1122f0e39798239893b3b4", - "https://deno.land/std@0.224.0/semver/parse.ts": "94c09f3486643853e7438e64f2c6741462fbeb84cf141ad5bfe88b73ec4cb0f3", - "https://deno.land/std@0.224.0/semver/parse_range.ts": "f48ca42b59988d9274225b1f93c39d84005e810bb858faf564f48c0ad8431fa7", - "https://deno.land/std@0.224.0/semver/range_intersects.ts": "bfcdff2731a2ceda85f1a189ccb5909c764be3baa735f9591b319d7e0fc6b711", - "https://deno.land/std@0.224.0/semver/range_max.ts": "67a56c8851da984dd314456f834eff8cf3814a090270554464ab62bf1f026c3d", - "https://deno.land/std@0.224.0/semver/range_min.ts": "d961ba26d8f01a79c8877cb48f9f566778947fc1df0e2bdfa3b31c7dd39f7448", - "https://deno.land/std@0.224.0/semver/satisfies.ts": "8c163ca35cb05d0384bcef6b8dd2842f15b39a375d126e10c2fbec6274a215cf", - "https://deno.land/std@0.224.0/semver/test_range.ts": "e8f46ed1a11817ec9ddf691e347a1b03f8096d12e13fa5dabfafa6e459fc7799", - "https://deno.land/std@0.224.0/semver/try_parse.ts": "043204f1235243c3d02b66ffca2c37dc2941e417dbccaf6c3a15b476a33f0e24", - "https://deno.land/std@0.224.0/semver/try_parse_range.ts": "cf1e2d489bbe9ed6185de551acdf708e23e0e1bc4be0958052dfef178f763eee", - "https://deno.land/std@0.224.0/semver/types.ts": "9286e72b160e25856608f4bc5f08f8f5ccba54e6cdfc9aba8adee68a355c4b36", - "https://deno.land/std@0.224.0/streams/_common.ts": "948735ef6d140cd6916dca861197b88fc57db52c2f923c392b7a14033d8fed4b", - "https://deno.land/std@0.224.0/streams/buffer.ts": "e012de72a53ad17c56512488e9afb6f4b6ed046b32fc1415ae7a4e6fc0efce38", - "https://deno.land/std@0.224.0/streams/byte_slice_stream.ts": "5bbdcadb118390affa9b3d0a0f73ef8e83754f59bb89df349add669dd9369713", - "https://deno.land/std@0.224.0/streams/delimiter_stream.ts": "4e4050740ff27a8824defa6c96126229ef9d794c4ace4ef9cabb10b5ad4a5d14", - "https://deno.land/std@0.224.0/streams/early_zip_readable_streams.ts": "21f5cf6dd36381c6a50c31a7727b5bd219f6382bbb7a413418595c3e466c4d14", - "https://deno.land/std@0.224.0/streams/iterate_reader.ts": "a8e698d16373d49821172f90ec7ac011ef1aae7a4036ae4bace284ff99e2bc92", - "https://deno.land/std@0.224.0/streams/limited_bytes_transform_stream.ts": "b22a45a337374e863c4eb1867ec6b8ad3e68620a6c52fe837746060ea610e6f1", - "https://deno.land/std@0.224.0/streams/limited_transform_stream.ts": "4c47da5ca38a30fa9f33b0f1a61d4548e7f52a9a58c294b0f430f680e44cc543", - "https://deno.land/std@0.224.0/streams/merge_readable_streams.ts": "73eed8ff54c9111b8b974b11a5a11c1ed0b7800e0157c39277ccac3ed14721e2", - "https://deno.land/std@0.224.0/streams/mod.ts": "d56624832b9649b680c74ab9c77e746e8be81ae1a24756cc04623e25a0d43ce9", - "https://deno.land/std@0.224.0/streams/readable_stream_from_reader.ts": "64943452485bcba48e203fa8ae61c195aed9ab8b2a178e2fc6a383f761ce010a", - "https://deno.land/std@0.224.0/streams/reader_from_iterable.ts": "e7b064142b2a97bb562d958c2e4b4d129e923e9c9f2f6e003a4e16cbdcd62570", - "https://deno.land/std@0.224.0/streams/reader_from_stream_reader.ts": "b3519118ed2a32e3fb6201a4c257d5c4e58c38b5918bdc505a45fccbfa0a53f9", - "https://deno.land/std@0.224.0/streams/text_delimiter_stream.ts": "94dfc900204e306496c1b58c80473db57b6097afdcb8ea9eaff453a193a659f1", - "https://deno.land/std@0.224.0/streams/text_line_stream.ts": "21f33d3922e019ec1a1676474beb543929cb564ec99b69cd2654e029e0f45bd5", - "https://deno.land/std@0.224.0/streams/to_array_buffer.ts": "1a9c07c4a396ce557ab205c44415815ab13b614fed94a12f62b80f8e650c726d", - "https://deno.land/std@0.224.0/streams/to_blob.ts": "bf5daaae50fa8f57e0c8bfd7474ebac16ac09e130e3d01ef2947ae5153912b4a", - "https://deno.land/std@0.224.0/streams/to_json.ts": "b6a908d0da7cd30956e5fbbfa7460747e50b8f307d1041282ed6fe9070d579ee", - "https://deno.land/std@0.224.0/streams/to_text.ts": "6f93593bdfc2cea5cca39755ea5caf0d4092580c0a713dfe04a1e85c60df331f", - "https://deno.land/std@0.224.0/streams/to_transform_stream.ts": "4c4836455ef89bab9ece55975ee3a819f07d3d8b0e43101ec7f4ed033c8a2b61", - "https://deno.land/std@0.224.0/streams/writable_stream_from_writer.ts": "527fc1b136fc53a9f0b32641f04a4522c72617fa7ca3778d27ed064f9cd98932", - "https://deno.land/std@0.224.0/streams/writer_from_stream_writer.ts": "22cba4e5162fc443c7e5ef62f2054674cd6a20f5d7519a62db8d201496463931", - "https://deno.land/std@0.224.0/streams/zip_readable_streams.ts": "53eb10d7557539b489bd858907aab6dd28247f074b3446573801de3150cb932e", - "https://deno.land/std@0.224.0/testing/snapshot.ts": "35ca1c8e8bfb98d7b7e794f1b7be8d992483fcff572540e41396f22a5bddb944", - "https://deno.land/std@0.224.0/url/_strip.ts": "928fe9af16d7c5bf24816d1e90d84bfe702f3e059f9d63509b5a37087e947800", - "https://deno.land/std@0.224.0/url/basename.ts": "068260fa6da5fae5236d94beb90d4631e555e6c169d5b6dbe2142fd449c97c87", - "https://deno.land/std@0.224.0/url/dirname.ts": "e60c42ab7fd6c84074fbc4fe222a14822381a6a8539c42dbfdc1f991d3d62951", - "https://deno.land/std@0.224.0/url/extname.ts": "3c93dffcc86cab6af0473b083499849eee504dbe9d28242bc7cc8c3b526e3dbb", - "https://deno.land/std@0.224.0/url/join.ts": "ea92b72fcbc84cf7662cdba305f094faa05c2e2097bf0d21b983b148c877d384", - "https://deno.land/std@0.224.0/url/mod.ts": "bccc4e7ffe062e08e7914330b31b3e53b65d788f3702074a9ae5107e5cb6f11f", - "https://deno.land/std@0.224.0/url/normalize.ts": "4f5a06f85fca75b8bbcbdf320807da5ecf617d7fccef1c8f87a8014d2fdca9cb", - "https://deno.land/std@0.224.0/uuid/_common.ts": "05c787c5735776c4e48e30294878332c39cb7738f50b209df4eb9f2b0facce4d", - "https://deno.land/std@0.224.0/uuid/constants.ts": "eb6c96871e968adf3355507d7ae79adce71525fd6c1ca55c51d32ace0196d64e", - "https://deno.land/std@0.224.0/uuid/mod.ts": "cefc8e2f77d9e493739c8dc4ec141b12b855414bf757e778bf9b00f783506b76", - "https://deno.land/std@0.224.0/uuid/v1.ts": "cc45e7eb1d463d7d38b21a3c6e4de55ff98598ca442309321575fe841b323a54", - "https://deno.land/std@0.224.0/uuid/v3.ts": "689f2d64a9460a75877a2eed94662d9cb31bedb890d72fce0d161ef47d66cc26", - "https://deno.land/std@0.224.0/uuid/v4.ts": "1319a2eeff7259adda416ec5f7997ded80d3165ef0787012793fc8621c18c493", - "https://deno.land/std@0.224.0/uuid/v5.ts": "75f76d9e53583572fe3d4893168530986222d439b1545b56d4493c6d5d1cd81d", - "https://deno.land/std@0.224.0/yaml/_dumper/dumper.ts": "08b595b40841a2e1c75303f5096392323b6baf8e9662430a91e3b36fbe175fe9", - "https://deno.land/std@0.224.0/yaml/_dumper/dumper_state.ts": "9e29f700ea876ed230b43f11fa006fcb1a62eedc1e27d32baaeaf3210f19f1e7", - "https://deno.land/std@0.224.0/yaml/_error.ts": "f38cdebdb69cde16903d9aa2f3b8a3dd9d13e5f7f3570bf662bfaca69fef669e", - "https://deno.land/std@0.224.0/yaml/_loader/loader.ts": "bf9e8a99770b59bc887b43ebccea108cbe9146ae32d91f7ce558d62c946d3fe3", - "https://deno.land/std@0.224.0/yaml/_loader/loader_state.ts": "ee216de6040551940b85473c3185fdb7a6f3030b77153f87a6b7f63f82e489ea", - "https://deno.land/std@0.224.0/yaml/_mark.ts": "61097a614857fcebf7b2ecad057916d74c90cd160117a33c9e74bac60457410a", - "https://deno.land/std@0.224.0/yaml/_state.ts": "f3b1c1fd11860302f1f33e35e9ce089bf069d4943e8d67516cd6bedbba058c13", - "https://deno.land/std@0.224.0/yaml/_type/binary.ts": "f1a6e1d83dcc52b21cc3639cd98be44051cfc54065cc4f2a42065bce07ebc07d", - "https://deno.land/std@0.224.0/yaml/_type/bool.ts": "121743b23ba82a27ad6a3ec6298c7f5b0908f90e52707f8644a91f7ad51ed2ef", - "https://deno.land/std@0.224.0/yaml/_type/float.ts": "c5ed84b0aec1ec5dc05f6abfaaff672e8890d4d44a42120b4445c9754fca4eba", - "https://deno.land/std@0.224.0/yaml/_type/function.ts": "bbf705058942bf3370604b37eb77a10aadd72f986c237c9f69b43378a42202c1", - "https://deno.land/std@0.224.0/yaml/_type/int.ts": "c2dc88438a60fccc8d2226042bd18b9967753adaf6bd145feb8b99d567e432ce", - "https://deno.land/std@0.224.0/yaml/_type/map.ts": "ae2acb1cb837fb8e96c75c98611cfd45af847d0114ab5336333c318e7d4b12f4", - "https://deno.land/std@0.224.0/yaml/_type/merge.ts": "ad0d971f91d2fb9f4ab3eba0c837eae357b1804d6b798adc99dc917bc5306b11", - "https://deno.land/std@0.224.0/yaml/_type/mod.ts": "e8929d7b1c969a74f76338d4eb380ef8c4a26cd6441117d521f076b766e9c265", - "https://deno.land/std@0.224.0/yaml/_type/nil.ts": "cbe4387d02d5933322c21b25d8955c5e6228c492e391a6fb82dcf4f498cc421c", - "https://deno.land/std@0.224.0/yaml/_type/omap.ts": "cda915105ab22ba9e1d6317adacee8eec2d8ddaf864cc2f814e3e476946e72c6", - "https://deno.land/std@0.224.0/yaml/_type/pairs.ts": "dd39bb44c1b9abaf6172c63f73350475933151f07e05253b81f7860c9b507177", - "https://deno.land/std@0.224.0/yaml/_type/regexp.ts": "e49eb9e1c9356fd142bc15f7f323820d411fcc537b5ba3896df9a8b812d270a4", - "https://deno.land/std@0.224.0/yaml/_type/seq.ts": "2deffc7f970869bc01a1541b4961d076329a1c2b30b95e07918f3132db7c3fe2", - "https://deno.land/std@0.224.0/yaml/_type/set.ts": "be8a9e7237a7ffc92dfbe7f5e552d84b7eeba60f3f73cc77fc3c59d3506c74ea", - "https://deno.land/std@0.224.0/yaml/_type/str.ts": "88f0a1ba12295520cd57e96cd78d53aa0787d53c7a1c506155f418c496c2f550", - "https://deno.land/std@0.224.0/yaml/_type/timestamp.ts": "277a41a40fb93c3b2b3f5c373bf11b0b7856cc6a7b919e8ea130755e4029edc5", - "https://deno.land/std@0.224.0/yaml/_type/undefined.ts": "9d215953c65740f1764e0bdca021007573473f0c49e087f00d9ff02817ecfc97", - "https://deno.land/std@0.224.0/yaml/_utils.ts": "91bbe28b5e7000b9594e40ff5353f8fe7a7ba914eec917e1202cbaf5ac931c58", - "https://deno.land/std@0.224.0/yaml/mod.ts": "54e9bfad77c8cd58f49b65f4d568045ff08989ed36318a2ca733a43cb6f1bc00", - "https://deno.land/std@0.224.0/yaml/parse.ts": "f45278d9ebccb789af4eceeffa5c291e194bcf1fa9aab1b34ff52c2bd4a9d886", - "https://deno.land/std@0.224.0/yaml/schema.ts": "a0f7956d997852b5d1c6564bd73eb7352175cfba439707ac819b65b5a2ec173a", - "https://deno.land/std@0.224.0/yaml/schema/core.ts": "0a37c07710e3df4eb4edc02f4edf623bf8df5af72b34d8a7c0229d0bac2a7043", - "https://deno.land/std@0.224.0/yaml/schema/default.ts": "1367fd30420c7071ecc67e5b470838474e8259aaf64460f314af4b6bd8da497c", - "https://deno.land/std@0.224.0/yaml/schema/extended.ts": "248180c22697f37ed173057eae62ce4879865bb59f30c4908d698bed5edcc7c5", - "https://deno.land/std@0.224.0/yaml/schema/failsafe.ts": "0ac1cae5b86d8fe2c83ad0a17f8adc33106a452b7139f84e4b0bfaee2206730e", - "https://deno.land/std@0.224.0/yaml/schema/json.ts": "a0228a0c0bad7dece17ab848774fcadc2ccb5e51775c2d58d21d486917ba3ba1", - "https://deno.land/std@0.224.0/yaml/schema/mod.ts": "0e1558a4823834f106675e48ddc15338e04f6f18469d1a7d6b3f0e1ab06abcb2", - "https://deno.land/std@0.224.0/yaml/stringify.ts": "f0ed4e419cb40c807cf79ae4039d6cdf492be9a947121fff4d4b7cd1d4738bae", - "https://deno.land/std@0.224.0/yaml/type.ts": "708dde5f20b01cc1096489b7155b6af79a217d585afb841128e78c3c2391eb5c", "https://deno.land/x/cliffy@v1.0.0-rc.4/command/_argument_types.ts": "ab269dacea2030f865a07c2a1e953ec437a64419a05bad1f1ddaab3f99752ead", "https://deno.land/x/cliffy@v1.0.0-rc.4/command/_errors.ts": "d78e1b4d69d84b8b476b5f3c0b028e3906d48f21b8f1ca1d36d5abe9ccfe48bc", "https://deno.land/x/cliffy@v1.0.0-rc.4/command/_spread.ts": "0cc6eb70a6df97b5d7d26008822d39f3e8a1232ee0a27f395aa19e68de738245", @@ -1749,7 +1150,6 @@ "https://deno.land/x/ts_morph@18.0.0/common/typescript.js": "d5c598b6a2db2202d0428fca5fd79fc9a301a71880831a805d778797d2413c59", "https://deno.land/x/wasmbuild@0.15.0/cache.ts": "89eea5f3ce6035a1164b3e655c95f21300498920575ade23161421f5b01967f4", "https://deno.land/x/wasmbuild@0.15.0/loader.ts": "d98d195a715f823151cbc8baa3f32127337628379a02d9eb2a3c5902dbccfc02", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", "https://deno.land/x/zod@v3.22.2/ZodError.ts": "4de18ff525e75a0315f2c12066b77b5c2ae18c7c15ef7df7e165d63536fdf2ea", "https://deno.land/x/zod@v3.22.2/errors.ts": "5285922d2be9700cc0c70c95e4858952b07ae193aa0224be3cbd5cd5567eabef", "https://deno.land/x/zod@v3.22.2/external.ts": "a6cfbd61e9e097d5f42f8a7ed6f92f93f51ff927d29c9fbaec04f03cbce130fe", @@ -1763,231 +1163,15 @@ "https://deno.land/x/zod@v3.22.2/locales/en.ts": "a7a25cd23563ccb5e0eed214d9b31846305ddbcdb9c5c8f508b108943366ab4c", "https://deno.land/x/zod@v3.22.2/mod.ts": "64e55237cb4410e17d968cd08975566059f27638ebb0b86048031b987ba251c4", "https://deno.land/x/zod@v3.22.2/types.ts": "18cbe3d895f42977c43fa9411da214b06d0d682cf2f4c9dd26cc8c3737740d40", - "https://esm.sh/@aws-sdk/client-s3@3.335.0?pin=v131": "0633878ddbd4e8d10cb685fedd109df3480c2536e72702c62f7e3b010ab912fc", - "https://esm.sh/@aws-sdk/client-s3@3.626.0": "f10ef6e0231103f0be679550cf7f5ae8ca7d238ac3fa01e30cc14daf1d6d40e3", - "https://esm.sh/@aws-sdk/client-s3@3.626.0?pin=v131": "5358c7095e0efcd0da40c285f6b83eca439a16ae6e9b9724607d3f879e267748", "https://esm.sh/@aws-sdk/client-s3@3.626.0?pin=v135": "f10ef6e0231103f0be679550cf7f5ae8ca7d238ac3fa01e30cc14daf1d6d40e3", - "https://esm.sh/@aws-sdk/lib-storage@3.335.0": "a125e7ecb95a59708687ab532bcfbc53c725958ea6332e646f8296f074f3bbdf", - "https://esm.sh/@aws-sdk/lib-storage@3.626.0": "ff6d1c100467d3c4ff6515cb4d0b36fceef2a944ff8474412ff248ceb58ce7e6", - "https://esm.sh/@aws-sdk/lib-storage@3.626.0?pin=v131": "dec8d51517e0ef126f5ceb37bfce115b9354a3274fd49af8fc35be40c4c5e5e7", "https://esm.sh/@aws-sdk/lib-storage@3.626.0?pin=v135": "ff6d1c100467d3c4ff6515cb4d0b36fceef2a944ff8474412ff248ceb58ce7e6", - "https://esm.sh/@aws-sdk/s3-request-presigner@3.335.0?pin=v131": "f32c826ef4de3839aca3e48ed856426019a2f16cc787e1c09d2214d24dd448cb", - "https://esm.sh/@aws-sdk/s3-request-presigner@3.645.0": "03cf57cb951aece8cb946fb31f910b5d96fcb54aadc15973cee8fa079a9783a1", "https://esm.sh/@aws-sdk/s3-request-presigner@3.645.0?pin=v135": "03cf57cb951aece8cb946fb31f910b5d96fcb54aadc15973cee8fa079a9783a1", "https://esm.sh/ajv@8.12.0?pin=v131": "f8dc3d8e4d6d69f48381749333cc388e54177f66601125b43246c3e43d3145d6", "https://esm.sh/jszip@3.7.1": "f3872a819b015715edb05f81d973b5cd05d3d213d8eb28293ca5471fe7a71773", - "https://esm.sh/v131/@aws-crypto/crc32@3.0.0/denonext/crc32.mjs": "a7b2905678c9acb4294fedf6f75c0d01c2a7c4a031acea1c816fd22b1372ad4a", - "https://esm.sh/v131/@aws-crypto/crc32@5.2.0/denonext/crc32.mjs": "6c784ab21e078644f5f87f9a7a3d2de78e7405b1b72d58cba70b41d93c270cd9", - "https://esm.sh/v131/@aws-crypto/crc32c@3.0.0/denonext/crc32c.mjs": "b5b36bedb1a00f79183720f5d4c54cb672e8f9877ca820550bb333f778ce912e", - "https://esm.sh/v131/@aws-crypto/crc32c@5.2.0/denonext/crc32c.mjs": "09d65c8a62b09a20705161690e306c668c7d82c357de38ad75b8459a96e9f37c", - "https://esm.sh/v131/@aws-crypto/ie11-detection@3.0.0/denonext/ie11-detection.mjs": "7cbccafb093d6c2c1a5b9f3e8535533220cc612dfb2bf228ea793e69376f8a0f", - "https://esm.sh/v131/@aws-crypto/sha1-browser@3.0.0/denonext/sha1-browser.mjs": "8d00cbfad40fad9737dde1e190e26bd6c0f7925c1aff7c2c1685b825d817e57c", - "https://esm.sh/v131/@aws-crypto/sha1-browser@5.2.0/denonext/sha1-browser.mjs": "72270e4ffed6aba52b9ec9910e83532265a2617353f7d14a2469994689c7c182", - "https://esm.sh/v131/@aws-crypto/sha256-browser@3.0.0/denonext/sha256-browser.mjs": "55e8c7cf121d71c0001a16e8c6eae414c626f37bc894c4f43cd5796c084caf00", - "https://esm.sh/v131/@aws-crypto/sha256-browser@5.2.0/denonext/sha256-browser.mjs": "e2797579514b29e7dcd3fdc9b7935843f96f63ba0ccf6105d5368dae5451edfc", - "https://esm.sh/v131/@aws-crypto/sha256-js@3.0.0/denonext/sha256-js.mjs": "ba78960638c2969e03f6f69175ab51e0aa1167196a32f4baa2d9a3be54c7be2a", - "https://esm.sh/v131/@aws-crypto/sha256-js@5.2.0/denonext/sha256-js.mjs": "fceb989101cb09a3bbca227fcae1802e38e07e28f34a6a0f76a4e4e3f59ad699", - "https://esm.sh/v131/@aws-crypto/supports-web-crypto@3.0.0/denonext/supports-web-crypto.mjs": "361a53acba49a257feed671c9636779f9884723d590a22db56d7a00731dc435c", - "https://esm.sh/v131/@aws-crypto/supports-web-crypto@5.2.0/denonext/supports-web-crypto.mjs": "410b781e687a273ce0055e9c73f8d3f2d5152ec9eaea27b7a9266f528ef58e57", - "https://esm.sh/v131/@aws-crypto/util@3.0.0/denonext/util.mjs": "2f9527b5030c246599f883288161258583d6edb7eec6567119a9e48b0166b460", - "https://esm.sh/v131/@aws-crypto/util@5.2.0/denonext/util.mjs": "264f80066b468ffaee345665f62e584f4239727f6d894e6c5b20da372182068f", - "https://esm.sh/v131/@aws-sdk/chunked-blob-reader@3.310.0/denonext/chunked-blob-reader.mjs": "4401b1a6c954c398db355225a6d937e9403192f9e79310be7ff22c2a33e05f14", - "https://esm.sh/v131/@aws-sdk/client-s3@3.335.0/denonext/client-s3.mjs": "2990cd07204aac8c6c4046f19d5b33c71d37e36a9335ef7346025e8b2f0e1d9c", - "https://esm.sh/v131/@aws-sdk/client-s3@3.626.0/denonext/client-s3.mjs": "a0fb1f588c5ca1e4e132fb69aa39f5fee8d661b1ca854c7eaf91de4158cd19b4", - "https://esm.sh/v131/@aws-sdk/client-s3@3.651.1/denonext/client-s3.mjs": "dc49b93d54ca1c42450ff235e0911b2c0dc4646034693e1a8c0ac3c06167ccf8", - "https://esm.sh/v131/@aws-sdk/config-resolver@3.329.0/denonext/config-resolver.mjs": "00b134417c639e27b2107d74ebf91ed93c603b91733f1c4ada4cd8cf3da3527b", - "https://esm.sh/v131/@aws-sdk/core@3.624.0/denonext/client.js": "0e16e057a670adae67a98862c400f4b1e41ad70c3fa58273f8cf7aa56907972e", - "https://esm.sh/v131/@aws-sdk/core@3.624.0/denonext/core.mjs": "ab4355b11321b423e1a2215a57cf3527db17d75c173d89b822314bf0fdb75e95", - "https://esm.sh/v131/@aws-sdk/core@3.624.0/denonext/httpAuthSchemes.js": "f5497fd01c36c3c88b16397ac926dd5dc143f9a2d6e41f2c20da3d74993412f0", - "https://esm.sh/v131/@aws-sdk/core@3.624.0/denonext/protocols.js": "7e3e84b104bf939bd32f2bd501e81b99579c5b6edae72ad9587c6455328ae498", - "https://esm.sh/v131/@aws-sdk/core@3.651.1/denonext/client.js": "457e4821de42dd616efbf7cb4764b89794aba1a0e5661122de02fe9d125eb0d8", - "https://esm.sh/v131/@aws-sdk/core@3.651.1/denonext/core.mjs": "cf935dca92d7b965e1867b3b87743e0b5998a3b97e1d7730c2888c092bbc2ac2", - "https://esm.sh/v131/@aws-sdk/core@3.651.1/denonext/httpAuthSchemes.js": "ba1822cd8726b829c74e60ff8609aea8525fc5d49001f5c228c162b98bda17c0", - "https://esm.sh/v131/@aws-sdk/core@3.651.1/denonext/protocols.js": "cb88b946241c8bdeab15c7d13f30dd5bd6a72c4d00afa02bc190ded4fa66cc5b", - "https://esm.sh/v131/@aws-sdk/eventstream-codec@3.329.0/denonext/eventstream-codec.mjs": "2671176e614b701e53f3982689898875862be983427d78c69be6aab4b4a4ad53", - "https://esm.sh/v131/@aws-sdk/eventstream-serde-browser@3.329.0/denonext/eventstream-serde-browser.mjs": "40d2cdd4cd67f08266b299b36e5d1741c0a258897c565a9eecd63d3ca1d03c91", - "https://esm.sh/v131/@aws-sdk/eventstream-serde-config-resolver@3.329.0/denonext/eventstream-serde-config-resolver.mjs": "18ade7f876637f79053957e80bb0775c0bc78c357007cfa26a27a86931fc70a6", - "https://esm.sh/v131/@aws-sdk/eventstream-serde-universal@3.329.0/denonext/eventstream-serde-universal.mjs": "6a8fc6bc7d5f0801300340f8ab85ed4b7fbee303359767702791e51ea68e3457", - "https://esm.sh/v131/@aws-sdk/fetch-http-handler@3.329.0/denonext/fetch-http-handler.mjs": "d6d30c1712ac8e300af4fb082e6093a07aa607c50d0db61a7b25126bbff3a794", - "https://esm.sh/v131/@aws-sdk/hash-blob-browser@3.329.0/denonext/hash-blob-browser.mjs": "b34c3fd7f2faf2f60e99834a354d35067602f6a8d479f1a29f2196f0986ae65b", - "https://esm.sh/v131/@aws-sdk/invalid-dependency@3.329.0/denonext/invalid-dependency.mjs": "a2f92f8a138d476805c719a2c03f069460c3b6c7842ca86dc93edcedaa0206cd", - "https://esm.sh/v131/@aws-sdk/is-array-buffer@3.310.0/denonext/is-array-buffer.mjs": "6e439346764944fba7c50cc310a0d7d2242e87aaaf4fc342095422ff766bb9ee", - "https://esm.sh/v131/@aws-sdk/lib-storage@3.626.0/denonext/lib-storage.mjs": "f78fc6bc443aa3d97c42d89a66c6c320f67b3b8372f0be6ae22b6a5da68d3539", - "https://esm.sh/v131/@aws-sdk/md5-js@3.329.0/denonext/md5-js.mjs": "b835157ac7a0bfe2c88a83a2b098fe92b6dfddcc8776b4a315ca238175394a62", - "https://esm.sh/v131/@aws-sdk/middleware-content-length@3.329.0/denonext/middleware-content-length.mjs": "0f170830741c27fbd2c274deb09d5d16545ee899c1be4ab7254a43b103b96bf0", - "https://esm.sh/v131/@aws-sdk/middleware-endpoint@3.329.0/denonext/middleware-endpoint.mjs": "aa77d6acf58e7fb12585b8d0b9d42a6cd188b6046b50dd2fe9002c52abd7014b", - "https://esm.sh/v131/@aws-sdk/middleware-expect-continue@3.329.0/denonext/middleware-expect-continue.mjs": "c8eb9ae0fbb9bd182eb84d0ceb68e8142c951cc6a6e35b2b6d6e27a21048fc80", - "https://esm.sh/v131/@aws-sdk/middleware-expect-continue@3.620.0/denonext/middleware-expect-continue.mjs": "4d8bb5fe6a93e58c02b0fd1e14cd311d2a6954e48c3387b844f7253dbd63a01c", - "https://esm.sh/v131/@aws-sdk/middleware-expect-continue@3.649.0/denonext/middleware-expect-continue.mjs": "55df3fdf7d48a945ef2462a8c9ca93ff91ba605f2038367df5231a7dd21c2079", - "https://esm.sh/v131/@aws-sdk/middleware-flexible-checksums@3.331.0/denonext/middleware-flexible-checksums.mjs": "999978cc064148fe7081eaccadd3bc8ac9b063fb550620a981cf81597d1f01a7", - "https://esm.sh/v131/@aws-sdk/middleware-flexible-checksums@3.620.0/denonext/middleware-flexible-checksums.mjs": "ce17d3f387293da0d3b0090b7760dc5d9efda957936cf6cd4c0f31889aedc0ad", - "https://esm.sh/v131/@aws-sdk/middleware-flexible-checksums@3.651.1/denonext/middleware-flexible-checksums.mjs": "fec9fddea61bc4eff36e94c662548d255a11e32ca6a21f8821fd9e02af42264b", - "https://esm.sh/v131/@aws-sdk/middleware-host-header@3.329.0/denonext/middleware-host-header.mjs": "c0e33ae2c1dd2ad52ce753f5d9035e244fd7780dd15d499422ab2e4c7234e085", - "https://esm.sh/v131/@aws-sdk/middleware-host-header@3.620.0/denonext/middleware-host-header.mjs": "edb5f8c4e7899c02bdfc788ca764c6c14753aafcbcc1d9239a0902e8adb80518", - "https://esm.sh/v131/@aws-sdk/middleware-host-header@3.649.0/denonext/middleware-host-header.mjs": "753af238f274133f202bc7ccb139c9f4e3fdac5f0b94f5f22df6efebce2a2916", - "https://esm.sh/v131/@aws-sdk/middleware-location-constraint@3.329.0/denonext/middleware-location-constraint.mjs": "d58ff62eb0db60c6f3811ddc4f7a0ac48df1f76d2ba430a89fec2b829cd15cf0", - "https://esm.sh/v131/@aws-sdk/middleware-location-constraint@3.609.0/denonext/middleware-location-constraint.mjs": "ba8c934c030e5168ad09260026bae3b5f538eca8c50b528fb3b6e945967b7f36", - "https://esm.sh/v131/@aws-sdk/middleware-location-constraint@3.649.0/denonext/middleware-location-constraint.mjs": "21e3237d4b3f5ab8cf1e48c8d9aa8f78960872e328f9fe387c97b544d9c2e320", - "https://esm.sh/v131/@aws-sdk/middleware-logger@3.329.0/denonext/middleware-logger.mjs": "3edceb18bf204dbc9a0fc4e9801f8aea23b5652dbb920fd05d3a70b37ff83d09", - "https://esm.sh/v131/@aws-sdk/middleware-logger@3.609.0/denonext/middleware-logger.mjs": "2105c33b2e62ed2567b20a71438f8f1409220f7bd0426910b0bccf5b84316b84", - "https://esm.sh/v131/@aws-sdk/middleware-logger@3.649.0/denonext/middleware-logger.mjs": "36f7fdcfc98cb5c7146e33f8a7e71c7907082888b30d5c3efb1a4310470f0590", - "https://esm.sh/v131/@aws-sdk/middleware-recursion-detection@3.329.0/denonext/middleware-recursion-detection.mjs": "1998b36c65ed29e70cafc9b7dbad528a345ff7078d3e73e7ae9b6b838af942a5", - "https://esm.sh/v131/@aws-sdk/middleware-recursion-detection@3.620.0/denonext/middleware-recursion-detection.mjs": "62aab89a1f101d9be0cdab460d94659c07ecf05e43515f932d6b8a435abfa6e7", - "https://esm.sh/v131/@aws-sdk/middleware-recursion-detection@3.649.0/denonext/middleware-recursion-detection.mjs": "f024103f5525854daa3b8b713f0f2a1ef20fe1c4adbf494946130ad1dd686088", - "https://esm.sh/v131/@aws-sdk/middleware-retry@3.329.0/denonext/middleware-retry.mjs": "2f7e543d69c95305999b2aa7b079c23a02d870b18d85d6d44ffbab001ded7e81", - "https://esm.sh/v131/@aws-sdk/middleware-sdk-s3@3.329.0/denonext/middleware-sdk-s3.mjs": "8084087a54dba109fd3e29782f25da7996d4f1f4bae5517c9d2fbaf3b36d8d2a", - "https://esm.sh/v131/@aws-sdk/middleware-sdk-s3@3.626.0/denonext/middleware-sdk-s3.mjs": "7d3a4a59bf55f1a5cac96efafdc69dd71f3c309234206eee333573136a52d674", - "https://esm.sh/v131/@aws-sdk/middleware-sdk-s3@3.651.1/denonext/middleware-sdk-s3.mjs": "9f6fdff9676620937594129b08eea31700806d50bd7955352bf2f1769ea47873", - "https://esm.sh/v131/@aws-sdk/middleware-serde@3.329.0/denonext/middleware-serde.mjs": "6cc2658658bbed61570b1aa86022af3c009ade420c5689a060c741a411f07306", - "https://esm.sh/v131/@aws-sdk/middleware-signing@3.329.0/denonext/middleware-signing.mjs": "caa4a5eeaac855c555cec5f51b8780ea77aa72ac7759a535d1e3a27b79e2c51c", - "https://esm.sh/v131/@aws-sdk/middleware-ssec@3.329.0/denonext/middleware-ssec.mjs": "893e62fa5b5981e8801273220f8af582974bc7ec19a75ae7be34da5fe55acfd6", - "https://esm.sh/v131/@aws-sdk/middleware-ssec@3.609.0/denonext/middleware-ssec.mjs": "55d27e9c5fcdd0f4bf2cf7b8f0c6b834d4b3cba6c044de9a57cc0419c58d64bf", - "https://esm.sh/v131/@aws-sdk/middleware-ssec@3.649.0/denonext/middleware-ssec.mjs": "b72a9a9e35891f23e9cc215182eb1a5c41ba553d25202f690adb196e444b2693", - "https://esm.sh/v131/@aws-sdk/middleware-stack@3.329.0/denonext/middleware-stack.mjs": "fb99b7b75f28f75710d7c4335eed550049b5fb3a88bb803c9144dc94027126e4", - "https://esm.sh/v131/@aws-sdk/middleware-user-agent@3.332.0/denonext/middleware-user-agent.mjs": "59435f9dd7f0fb160500eada671164fb0f4d518213f8b474a91b54106d5b54b1", - "https://esm.sh/v131/@aws-sdk/middleware-user-agent@3.620.0/denonext/middleware-user-agent.mjs": "69c22930be2096fdcabfd59bb5ec1971122a227a716fa2ba3a47e7f5f6f6b3e9", - "https://esm.sh/v131/@aws-sdk/middleware-user-agent@3.649.0/denonext/middleware-user-agent.mjs": "f502112055e953c54c966ece5fa38b04cd6d96cb53e7324726aacde3acfa85d6", - "https://esm.sh/v131/@aws-sdk/property-provider@3.329.0/denonext/property-provider.mjs": "bc96051e0fae3b0a01d011b1b8e247ebf89caa52fbd3522fab77728f4f639345", - "https://esm.sh/v131/@aws-sdk/protocol-http@3.329.0/denonext/protocol-http.mjs": "4256a8110ed08f52124aac742d8df429d84b0b55b29147ebfa5b5db44b2990f6", - "https://esm.sh/v131/@aws-sdk/querystring-builder@3.329.0/denonext/querystring-builder.mjs": "cf0776b4fcc30f0b4911011e5184eb0d996c6e1c045d63c7c0ac8f75507982f0", - "https://esm.sh/v131/@aws-sdk/querystring-parser@3.329.0/denonext/querystring-parser.mjs": "40ff8f84d555f74f8996757645b31276755755412865833e1c2b73cb3c099233", - "https://esm.sh/v131/@aws-sdk/region-config-resolver@3.614.0/denonext/region-config-resolver.mjs": "580b2f14c0d72423f166859afd2441fdf3883f7a3ab86c36d746a159029d40fd", - "https://esm.sh/v131/@aws-sdk/region-config-resolver@3.649.0/denonext/region-config-resolver.mjs": "c1b65a5fdff26ab8ca5c25778fffbaae15c484fc56671baaf68908d546347a60", - "https://esm.sh/v131/@aws-sdk/s3-request-presigner@3.335.0/denonext/s3-request-presigner.mjs": "41551ded4796e73be68e20a9be5af919979e9f15ef47808cd677e77577c69050", - "https://esm.sh/v131/@aws-sdk/service-error-classification@3.329.0/denonext/service-error-classification.mjs": "8d188836f247e51643e694518958375d6c24f38f8115438052e95a6fe11e790c", - "https://esm.sh/v131/@aws-sdk/signature-v4-crt@3.391.0/denonext/signature-v4-crt.mjs": "6791fe556546ffea4a106d0a30fa54d351a57c1a8a7ad2de071e1d194e94b683", - "https://esm.sh/v131/@aws-sdk/signature-v4-multi-region@3.329.0/denonext/signature-v4-multi-region.mjs": "c85bd24f342d6d35e4bb63beb8b5b059c557955200dcea37ab29360305b4c748", - "https://esm.sh/v131/@aws-sdk/signature-v4-multi-region@3.626.0/denonext/signature-v4-multi-region.mjs": "1f5b99bb060d106d181aa07fecfedabdcdf436a422070cb55a03ba9a529c74ad", - "https://esm.sh/v131/@aws-sdk/signature-v4-multi-region@3.651.1/denonext/signature-v4-multi-region.mjs": "5bfd407a539ab42e13d5f3417a057016648ce545e22c67924b007038c480660f", - "https://esm.sh/v131/@aws-sdk/signature-v4@3.329.0/denonext/signature-v4.mjs": "d6643233bc5e5a566b52e805a649a3eb01b7e1c87af221ccf03337a34fff1807", - "https://esm.sh/v131/@aws-sdk/smithy-client@3.329.0/denonext/smithy-client.mjs": "da930042fd268a64eeb89bf7d5d83aaedcf97ab1abd0739ed2cc493ea56992e2", - "https://esm.sh/v131/@aws-sdk/types@3.329.0/denonext/types.mjs": "f687ff69c53e1af2cc7af841af00691674fbb22889d12a2ae8cb1517600ee67c", - "https://esm.sh/v131/@aws-sdk/url-parser@3.329.0/denonext/url-parser.mjs": "d5963d8f1e62a1f73b4af00ff2e8bed11dc69a39156251b44ce5e9d59add55c1", - "https://esm.sh/v131/@aws-sdk/util-arn-parser@3.310.0/denonext/util-arn-parser.mjs": "da6927c63827861d70a20f1581d399fd5510ebb311f6ba23bb4f41ee6cb13ee4", - "https://esm.sh/v131/@aws-sdk/util-arn-parser@3.568.0/denonext/util-arn-parser.mjs": "e80995eaf790640e591f09d89d9099b022efa6d7954d6e23a1a7f5691b9b5110", - "https://esm.sh/v131/@aws-sdk/util-base64@3.310.0/denonext/util-base64.mjs": "dfaecb0f8ce33d1b670861e3eb420e12990dbb71b42574c32064ae86d17d8df0", - "https://esm.sh/v131/@aws-sdk/util-body-length-browser@3.310.0/denonext/util-body-length-browser.mjs": "606de31e860d9a8ef454bde44a42b77311340567e9246b72c42b2c2c604dbd56", - "https://esm.sh/v131/@aws-sdk/util-config-provider@3.310.0/denonext/util-config-provider.mjs": "9c3b6a127cce262b43e339c7f26d8d5444fc887ccda27cc4ca5483e050dfb2cf", - "https://esm.sh/v131/@aws-sdk/util-defaults-mode-browser@3.329.0/denonext/util-defaults-mode-browser.mjs": "acc59887a35a66d5fdcaa2101ac0dcf71141d332b243dc6808534c6ed5212f77", - "https://esm.sh/v131/@aws-sdk/util-endpoints@3.332.0/denonext/util-endpoints.mjs": "02da62ce90e11394aa5428b17b48fdfa74ff81003a689a53b522541101a9608b", - "https://esm.sh/v131/@aws-sdk/util-endpoints@3.614.0/denonext/util-endpoints.mjs": "38dd08dc9c4697f8cbc0b6990d9ce410a9b6de11c08119dc42441d8dfe89ab5a", - "https://esm.sh/v131/@aws-sdk/util-endpoints@3.649.0/denonext/util-endpoints.mjs": "1c1138d7a3e5fe688e7bacd1cd04967588c4e61a777f8547acec01b2ad4607f0", - "https://esm.sh/v131/@aws-sdk/util-format-url@3.329.0/denonext/util-format-url.mjs": "6dedc088febc86ddbb24ed628f818ae6caf13ccdedb7d369c1ecc7884e1d0e2b", - "https://esm.sh/v131/@aws-sdk/util-hex-encoding@3.310.0/denonext/util-hex-encoding.mjs": "a0eefaaeb52f512fda170d4ba78b87df41f2588efabc96bc998d12fe7af83c9e", - "https://esm.sh/v131/@aws-sdk/util-locate-window@3.310.0/denonext/util-locate-window.mjs": "894879f284b5a41fc830b8fe40e2a7038b124d5f5b7a3fde841c3314366c56c5", - "https://esm.sh/v131/@aws-sdk/util-locate-window@3.568.0/denonext/util-locate-window.mjs": "44c4acffec7669f2d0e0307ebfca7cac1f85260a6f8238dcbeb5e79f769e6f00", - "https://esm.sh/v131/@aws-sdk/util-middleware@3.329.0/denonext/util-middleware.mjs": "c9e423e7b96aa3eb038defc3b70a7db2e20260e504ec846cff5bd233f34fe09d", - "https://esm.sh/v131/@aws-sdk/util-retry@3.329.0/denonext/util-retry.mjs": "ed702a959997b4820d93bf89503decc8d5a9734729bdbe5bd247f2db693e680b", - "https://esm.sh/v131/@aws-sdk/util-stream-browser@3.329.0/denonext/util-stream-browser.mjs": "7cf71ee2a0a20b67ea57e6834e23bd5076ad74674418d65e8d924f33cc378a06", - "https://esm.sh/v131/@aws-sdk/util-uri-escape@3.310.0/denonext/util-uri-escape.mjs": "c0888b31da1e24f84ce208869244230c4f67caacddcdacdea70b3ae01c0c30bd", - "https://esm.sh/v131/@aws-sdk/util-user-agent-browser@3.329.0/denonext/util-user-agent-browser.mjs": "3fae0af61dd1d0a5764275b34f497ac9511e87529a0fa9f5a30ccfb2a2683856", - "https://esm.sh/v131/@aws-sdk/util-user-agent-browser@3.609.0/denonext/util-user-agent-browser.mjs": "7d2a0010374f42317bab7409b896a9ee9b1c90f8dd143da9e7b32baa4e83ccda", - "https://esm.sh/v131/@aws-sdk/util-user-agent-browser@3.649.0/denonext/util-user-agent-browser.mjs": "329d66fb2af25dd886069ff42d480aab100b5fa748d8727a4f6e0b1eb721b4be", - "https://esm.sh/v131/@aws-sdk/util-utf8-browser@3.259.0/denonext/util-utf8-browser.mjs": "79fc8ce5cd61204fe274363d637902a5d49ea40688e8d40cbd5b6ecf56f782b7", - "https://esm.sh/v131/@aws-sdk/util-utf8@3.310.0/denonext/util-utf8.mjs": "b988a756b1d6e53db92e105d52a25c298e6fdbd749d24e9ac70a688c96565dc8", - "https://esm.sh/v131/@aws-sdk/util-waiter@3.329.0/denonext/util-waiter.mjs": "756743c076c5ef4d9b842f239bfde5e28903641b2475c4bdbb411e01b445782f", - "https://esm.sh/v131/@aws-sdk/xml-builder@3.310.0/denonext/xml-builder.mjs": "66aa1e7ed650d5da4a99f3ca05f5026fa6efcff293f720221b6cd63102f33dad", - "https://esm.sh/v131/@aws-sdk/xml-builder@3.609.0/denonext/xml-builder.mjs": "1822a0c319298642be9cdac624fadf1c77392d02f6b33fb9e36b27738de5fcc6", - "https://esm.sh/v131/@aws-sdk/xml-builder@3.649.0/denonext/xml-builder.mjs": "a05e7d42f45bfdb8adf787fa619e6286642cce7b2b563dbdf84063b667a51b3c", - "https://esm.sh/v131/@httptoolkit/websocket-stream@6.0.1/denonext/websocket-stream.mjs": "c5819a529fab01eaa27ec17550cc7b9dae4d0e3e5552f81c0ecb37c746c025c2", - "https://esm.sh/v131/@smithy/abort-controller@3.1.2/denonext/abort-controller.mjs": "aefef04873f4d61264c8a6dad0816a881042c34f952c5a59d16934091b33ff18", - "https://esm.sh/v131/@smithy/chunked-blob-reader@3.0.0/denonext/chunked-blob-reader.mjs": "bfd33430ff0d1b7c3dc6e42401a2adfcdeaf2dbb9ac56ca6578782c99e2cb359", - "https://esm.sh/v131/@smithy/config-resolver@3.0.6/denonext/config-resolver.mjs": "2b2bbc9ed83f33d959f76ac2c361daeb32233d4876d933afeb608878b52e77f9", - "https://esm.sh/v131/@smithy/core@2.4.1/denonext/core.mjs": "98a418567a07e5655d3655ed300ae82af5406709e5d4c0e5c53608243805476a", - "https://esm.sh/v131/@smithy/eventstream-codec@2.0.2/denonext/eventstream-codec.mjs": "af08552ab22199c7071e6449046a87d5461cbb92ece49c565c11a3d01e3106bb", - "https://esm.sh/v131/@smithy/eventstream-codec@3.1.3/denonext/eventstream-codec.mjs": "42e83fceb013464f0da9222892f3b12ad2c1419553d06dda7cf5ef2a8f2c68fe", - "https://esm.sh/v131/@smithy/eventstream-serde-browser@3.0.7/denonext/eventstream-serde-browser.mjs": "b3c818d2e378f3a7b89d07c0873da305cbf16b2de5f301123e0ba38ac2f41e0d", - "https://esm.sh/v131/@smithy/eventstream-serde-config-resolver@3.0.4/denonext/eventstream-serde-config-resolver.mjs": "82a3253166780ac93190497c7842bd1c7a2ce68031a1a0e5713f2b7b42cb0305", - "https://esm.sh/v131/@smithy/eventstream-serde-universal@3.0.6/denonext/eventstream-serde-universal.mjs": "90ea0532afeab98fb3b3be83be34ecbf576411daf22311d012a96fc5550a01f2", - "https://esm.sh/v131/@smithy/fetch-http-handler@3.2.5/denonext/fetch-http-handler.mjs": "086baef922d8a85d19f58641f764373a51ab45faf406bf5d7d50fa6779b96093", - "https://esm.sh/v131/@smithy/hash-blob-browser@3.1.3/denonext/hash-blob-browser.mjs": "9a2762d5a7d33fa46f00b7636cfe880b097f735dc71c98aaab1a4bdf0276740a", - "https://esm.sh/v131/@smithy/invalid-dependency@3.0.4/denonext/invalid-dependency.mjs": "74e9867049a6ba7ac8a06e8b5fef1b7f856ca1e0de4f1ceb55b359c191fb32f0", - "https://esm.sh/v131/@smithy/is-array-buffer@2.0.0/denonext/is-array-buffer.mjs": "8fcbe490a3730ac1eac71766b5e1cb41ccba2f2abf646badb0e50a95340b3623", - "https://esm.sh/v131/@smithy/is-array-buffer@3.0.0/denonext/is-array-buffer.mjs": "f8bb7f850b646a10880d4e52c60151913b7d81911b2b1cd1355c9adef56ab3e2", - "https://esm.sh/v131/@smithy/md5-js@3.0.4/denonext/md5-js.mjs": "3af3680880d7765c9f28e383d7f619acf890989540e250dc2de4c3ebe62b0618", - "https://esm.sh/v131/@smithy/middleware-content-length@3.0.6/denonext/middleware-content-length.mjs": "d118a27cbe2b1a9473d767c59787127f1e254f75683f4468b1369fd2301d3496", - "https://esm.sh/v131/@smithy/middleware-endpoint@3.1.1/denonext/middleware-endpoint.mjs": "e47be271bca870de99c69fb5d43c44215a13736d5196cd086265fbae21b41da2", - "https://esm.sh/v131/@smithy/middleware-retry@3.0.16/denonext/middleware-retry.mjs": "3d70aaaa174ed047806fd8f49c99bd77c26dcc31bb84b8ec75214cc5e9118f0a", - "https://esm.sh/v131/@smithy/middleware-serde@3.0.4/denonext/middleware-serde.mjs": "dea17c2925402c44fdea609ad15f081ff51446a2cc559c2142c9603c0e874551", - "https://esm.sh/v131/@smithy/middleware-stack@3.0.4/denonext/middleware-stack.mjs": "219a95e8a2bbc77318c2da6b3f9026ebdf4bbc33542b32ef2afcc7024531e62d", - "https://esm.sh/v131/@smithy/property-provider@3.1.4/denonext/property-provider.mjs": "db5ed83f04a951a0552dbae98ea69c94ef147b46d3d4d1e884d002c92433c740", - "https://esm.sh/v131/@smithy/protocol-http@1.2.0/denonext/protocol-http.mjs": "29f698026fbe2c9c139d356a8ca5f7e197fe34d4f5d9fb364da0a4340729aa12", - "https://esm.sh/v131/@smithy/protocol-http@4.1.1/denonext/protocol-http.mjs": "56ab04e27acdb083eeceb91ea3f192d66d06ee77675e8e41feec944f85c2de0b", - "https://esm.sh/v131/@smithy/querystring-builder@3.0.4/denonext/querystring-builder.mjs": "a1f904376f6a92fc57e5358c04ec296286bec9ad16a2f46c100da7bdbacfd9fc", - "https://esm.sh/v131/@smithy/querystring-parser@2.0.3/denonext/querystring-parser.mjs": "2f656d24d351a2f741fbe5dbeae352f51bf73d80258a0e2d39893c69786843c8", - "https://esm.sh/v131/@smithy/querystring-parser@3.0.4/denonext/querystring-parser.mjs": "a33eab3034c316ebad88e21312a9a2f22c0720558c3d1908eed5c8a760de1892", - "https://esm.sh/v131/@smithy/service-error-classification@3.0.4/denonext/service-error-classification.mjs": "e379f60e544398c0e03565a58bc7f10164284bdcaac54c9d0e9f3220aa74a49f", - "https://esm.sh/v131/@smithy/signature-v4@2.0.1/denonext/signature-v4.mjs": "01efbf6f929d92a7d01edc68f5e4d6488684d462c22383955cbf1a7ca5f2ac8e", - "https://esm.sh/v131/@smithy/signature-v4@4.1.1/denonext/signature-v4.mjs": "f52b5b071093470716edc0eef95613d85de4dbedd444a473bcffb09b9f259df1", - "https://esm.sh/v131/@smithy/smithy-client@3.3.0/denonext/smithy-client.mjs": "415f600de78a5edecafddae6ba2d6135831b3e81246523d06cb5e06cf34acc33", - "https://esm.sh/v131/@smithy/types@1.2.0/denonext/types.mjs": "e7310b4830d09404b64c0e5512232b86d6374023aaf950049615b99caaed51ec", - "https://esm.sh/v131/@smithy/types@3.4.0/denonext/types.mjs": "7cded236a373f226179e14655d6ce1aac5b054667429bc95a0d864be949a7e58", - "https://esm.sh/v131/@smithy/url-parser@3.0.4/denonext/url-parser.mjs": "f41bef3e84a1c07227e47005e9d5d1a5bc9300afeb84786607f9f62df1f2da3f", - "https://esm.sh/v131/@smithy/util-base64@3.0.0/denonext/util-base64.mjs": "059ac3bac065ef2a3e8669434223330102a048b6c6542d4cd215e811c589e7a1", - "https://esm.sh/v131/@smithy/util-body-length-browser@3.0.0/denonext/util-body-length-browser.mjs": "d67382004d61919b97a756a454f9b312cfb0011a9727d3d1ca69ebddf1c7843a", - "https://esm.sh/v131/@smithy/util-config-provider@3.0.0/denonext/util-config-provider.mjs": "832c0ab1d3b06a51351ea23b33628bd36a37ef570e02e469f6ab39f71d88d7b1", - "https://esm.sh/v131/@smithy/util-defaults-mode-browser@3.0.16/denonext/util-defaults-mode-browser.mjs": "e9d0a83558d64f3ae691710bc4a2a79bfd1382be2b0ba26a9853173d3fc0d02b", - "https://esm.sh/v131/@smithy/util-endpoints@2.1.0/denonext/util-endpoints.mjs": "91383a4504043da2ec4a30984bc8197851bebaecc33c2c1abdff441ed71d7fbe", - "https://esm.sh/v131/@smithy/util-hex-encoding@2.0.0/denonext/util-hex-encoding.mjs": "48b73551d6dc8f87fff840debe36f207f56b04a36c3c21fe2099613457c9d22d", - "https://esm.sh/v131/@smithy/util-hex-encoding@3.0.0/denonext/util-hex-encoding.mjs": "cbdd7aabeb3903596980e2903efec3e5501f7e1259fb7b97e327a3b4e635f23c", - "https://esm.sh/v131/@smithy/util-middleware@2.0.0/denonext/util-middleware.mjs": "89a29c46c58825db0566b99d517476aa973d4cc09fcd5e82413f018599db8f26", - "https://esm.sh/v131/@smithy/util-middleware@3.0.4/denonext/util-middleware.mjs": "b8ae325f1e603bc2e706ffe4fc6095c9badab918f5a7cb6c7d0f39ef7f23e742", - "https://esm.sh/v131/@smithy/util-retry@3.0.4/denonext/util-retry.mjs": "8e9dd042f3d31eaa23f02895cb92339ac48a978fa6acb479bf24a60c7d0dbfd9", - "https://esm.sh/v131/@smithy/util-stream@3.1.4/denonext/util-stream.mjs": "7fd8fa4bc42b67f7e76314d23f27c6b47000594e489ab05c9ba862b400f80bdd", - "https://esm.sh/v131/@smithy/util-uri-escape@2.0.0/denonext/util-uri-escape.mjs": "1e46ae4ab088b9dfcb5dd73715de2a2530747e920cf5b405012aed7d944e2976", - "https://esm.sh/v131/@smithy/util-uri-escape@3.0.0/denonext/util-uri-escape.mjs": "df2c80781ede692323dee6e2da3711e7ccc4f7a1cee949b09aba8d1ce15bbe03", - "https://esm.sh/v131/@smithy/util-utf8@2.0.0/denonext/util-utf8.mjs": "c50f8d6d64a39a8717e88184dee0fec145cb2d17a0d0a456e007eae02062bae5", - "https://esm.sh/v131/@smithy/util-utf8@2.3.0/denonext/util-utf8.mjs": "10a9f2014b2b5b2e387e04c1c7974e8219332fa30a6904923f54a46c974c6c84", - "https://esm.sh/v131/@smithy/util-utf8@3.0.0/denonext/util-utf8.mjs": "abe704ed8c4266b29906116ef723b98e8729078537b252c9a213ad373559488a", - "https://esm.sh/v131/@smithy/util-waiter@3.1.3/denonext/util-waiter.mjs": "635892b5f0940d576661df64069b285d9f3356b1adda2c02f6b40606c416415d", "https://esm.sh/v131/ajv@8.12.0/denonext/ajv.mjs": "6ec3e0f3d7a95672c96274f6aece644b6b5541e8c2409aed36b59853529a01cf", - "https://esm.sh/v131/aws-crt@1.15.16/denonext/aws-crt.mjs": "382aad6bd02cf4f568160bb79b01a47d0332aa4021e1451eaed0b74498d7de9c", - "https://esm.sh/v131/axios@0.24.0/denonext/axios.mjs": "895bb627711160f383d2674e7cae963f8e2734ed90b1972918a35f81d6139675", - "https://esm.sh/v131/bl@4.1.0/denonext/bl.mjs": "77f87a325a0e68eb01e3a3b40856d42a037d0c111a6e3949a82ce6b50c24181a", - "https://esm.sh/v131/bowser@2.11.0/denonext/bowser.mjs": "3fd0c5d68c4bb8b3243c1b0ac76442fa90f5e20ee12773ce2b2f476c2e7a3615", - "https://esm.sh/v131/bufferutil@4.0.7/denonext/bufferutil.mjs": "abe42a54dfdc6365872850cd4395be09f2198b84a1d46022b88c98a6196f6e1f", - "https://esm.sh/v131/core-util-is@1.0.3/denonext/core-util-is.mjs": "f19dfe63f62278ae0c5a25bd85ffeac5bbdb099b22f005d01bbb62673505deec", - "https://esm.sh/v131/crypto-js@4.1.1/denonext/crypto-js.mjs": "b25d264259764a5c95fe9dfe04820d3aa6b22e063776db1dd1d0e7ac2e106eb3", - "https://esm.sh/v131/debug@4.3.4/denonext/debug.mjs": "892826bb4505deb6337df2f0f72b1e355e5377e702dd739b78774539d7482f5c", - "https://esm.sh/v131/duplexify@3.7.1/denonext/duplexify.mjs": "ac16b0738f66a2009a5f40e52f69e534df9577e694da65d1ba709c47081ff6e8", - "https://esm.sh/v131/duplexify@4.1.2/denonext/duplexify.mjs": "8e183775cd15c5752a4ba69439c3efbbfaa47b20c504b97a5ff4c3ef13c9f944", - "https://esm.sh/v131/end-of-stream@1.4.4/denonext/end-of-stream.mjs": "77a90d627b92ff8a6b577d3ce46e7f26ba55808557d1cfca70c540b76bd96af2", "https://esm.sh/v131/fast-deep-equal@3.1.3/denonext/fast-deep-equal.mjs": "6313b3e05436550e1c0aeb2a282206b9b8d9213b4c6f247964dd7bb4835fb9e5", - "https://esm.sh/v131/fast-xml-parser@4.1.2/denonext/fast-xml-parser.mjs": "909a019fba61593212441bfc4db1e0e8652c28f108dda2db1435a2f6203bea19", - "https://esm.sh/v131/fast-xml-parser@4.4.1/denonext/fast-xml-parser.mjs": "1b272d72a69f315be8e9c239975eca27ae9677c5b0bf4f4377c0c0f5839452fb", - "https://esm.sh/v131/inherits@2.0.4/denonext/inherits.mjs": "8095f3d6aea060c904fb24ae50f2882779c0acbe5d56814514c8b5153f3b4b3b", - "https://esm.sh/v131/isarray@1.0.0/denonext/isarray.mjs": "6368a41cf02c83843453ac571deb4c393c14e6f5e1d9ca6bbe43a4623f3856c8", - "https://esm.sh/v131/isomorphic-ws@5.0.0/denonext/isomorphic-ws.mjs": "6ebc8e183811a7b10ff098e9e76f2ceaf14682a045e199b4885a47d211e61aac", - "https://esm.sh/v131/js-sdsl@4.3.0/denonext/js-sdsl.mjs": "b9d39574526cc0ea4021040025ad9c6184efc8ba32ced483fd5c785afffa49f1", "https://esm.sh/v131/json-schema-traverse@1.0.0/denonext/json-schema-traverse.mjs": "c5da8353bc014e49ebbb1a2c0162d29969a14c325da19644e511f96ba670cc45", - "https://esm.sh/v131/lru-cache@6.0.0/denonext/lru-cache.mjs": "24583c5c6a66ad0c20393bb59f45bb5bf77a4bff6545d2f22c4718f48d943840", - "https://esm.sh/v131/mqtt-packet@6.10.0/denonext/mqtt-packet.mjs": "cbab199254918314ec410ff47ed4c2c0753a872b3749c999aad1054155570278", - "https://esm.sh/v131/mqtt@4.3.7/denonext/mqtt.mjs": "c5c3a58d1f400e1c34b985c76ed2bfe7d271488a31af8bb3d515c3995bb2ab3b", - "https://esm.sh/v131/ms@2.1.2/denonext/ms.mjs": "aa4dc45ba72554c5011168f8910cc646c37af53cfff1a15a4decced838b8eb14", - "https://esm.sh/v131/node-gyp-build@4.6.0/denonext/node-gyp-build.mjs": "58fc8e41b3ffd2f8a6b2a1694292976e6e12768d6e3895b9c8c13239562ffe64", - "https://esm.sh/v131/number-allocator@1.0.14/denonext/number-allocator.mjs": "31973164cee3564b8bc660006622bb89fde09ac1aff800ec27b4afd01bbdc74a", - "https://esm.sh/v131/once@1.4.0/denonext/once.mjs": "b4eb5beddf7f0f8ab4db5e56987d53e5f0fd77961eac5dd554ab75aa79ef0202", - "https://esm.sh/v131/process-nextick-args@2.0.1/denonext/process-nextick-args.mjs": "a57885eb600374afb2521e1d47e92df4d292d49c90c31496da5d0dde2f0d0b5f", - "https://esm.sh/v131/readable-stream@2.3.8/denonext/readable-stream.mjs": "9c2952f308e93db73ce18182be01e4e820866fdf35042a60ef29c317a4ffa72b", - "https://esm.sh/v131/readable-stream@3.6.2/denonext/readable-stream.mjs": "6d839ff306020b3a33ba1c9e46ee4f6c73a6edf453fe5c706db14a2e6ab3d987", - "https://esm.sh/v131/reinterval@1.1.0/denonext/reinterval.mjs": "6697cf544429f073376f5b8fcc5696097917bbedab45792b74d3f785e7747b58", - "https://esm.sh/v131/rfdc@1.3.0/denonext/default.js": "14b787ae4011ae4dfd0507974a9b6c11741367a1c31de2fcb3e13c92d8c4f91c", - "https://esm.sh/v131/safe-buffer@5.1.2/denonext/safe-buffer.mjs": "bf91200afdaf8be92e5c7d4c79e4dc9b5c534f76e104f1b37e5891d6f81eaca2", - "https://esm.sh/v131/safe-buffer@5.2.1/denonext/safe-buffer.mjs": "facbcb4f4622e13062978522fa12c42cae4e12f55b0e1d3fa1c4bc751bd827c7", - "https://esm.sh/v131/stream-shift@1.0.1/denonext/stream-shift.mjs": "1ec867cd3a4f89303a28e3f50e56a1d60c200b9204e9678e1a7f908f91ccccd9", - "https://esm.sh/v131/strnum@1.0.5/denonext/strnum.mjs": "1ffef4adec2f74139e36a2bfed8381880541396fe1c315779fb22e081b17468b", - "https://esm.sh/v131/tslib@1.14.1/denonext/tslib.mjs": "5e49e8960f064d11fb709e3338f5437e2ede57e7df873a09d7834c2a0bf533f7", - "https://esm.sh/v131/tslib@2.6.3/denonext/tslib.mjs": "0834c22e9fbf95f6a5659cc2017543f7d41aa880f24ab84cb11d24e6bee99303", "https://esm.sh/v131/uri-js@4.4.1/denonext/uri-js.mjs": "901d462f9db207376b39ec603d841d87e6b9e9568ce97dfaab12aa77d0f99f74", - "https://esm.sh/v131/utf-8-validate@6.0.3/denonext/utf-8-validate.mjs": "6197c86d1731c0c56002eac5d14d7dc6a23d7f8de06623eeef5587aa63aa968b", - "https://esm.sh/v131/util-deprecate@1.0.2/denonext/util-deprecate.mjs": "f69f67cf655c38428b0934e0f7c865c055834a87cc3866b629d6b2beb21005e9", - "https://esm.sh/v131/uuid@8.3.2/denonext/uuid.mjs": "2cea289bbecc01fab6f701b719513f6ac8a3c21a5e52aa3f8682cf61d70a5dc5", - "https://esm.sh/v131/uuid@9.0.1/denonext/uuid.mjs": "7d7d3aa57fa136e2540886654c416d9da10d8cfebe408bae47fd47070f0bfb2a", - "https://esm.sh/v131/wrappy@1.0.2/denonext/wrappy.mjs": "3c31e4782e0307cf56b319fcec6110f925dafe6cb47a8fa23350d480f5fa8b06", - "https://esm.sh/v131/ws@7.5.9/denonext/ws.mjs": "bb14a389271bb68778d59f498428caee8048221eea59cc7522898b44aad66d88", - "https://esm.sh/v131/ws@8.13.0/denonext/ws.mjs": "ed9425cc1b9c9b9987590c15646b9adcd8e7d4c4cfff745fdc273a46cbc2b7cc", - "https://esm.sh/v131/xtend@4.0.2/denonext/xtend.mjs": "503056f181793967e90c0566a737612694366fa7191172f4a106099b5c2a80d2", - "https://esm.sh/v131/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", "https://esm.sh/v135/@aws-crypto/crc32@5.2.0/denonext/crc32.mjs": "6a9bc8418c01e2539665b528ccea843f1319a3b32d759fcbb1d4468156c25100", "https://esm.sh/v135/@aws-crypto/crc32c@5.2.0/denonext/crc32c.mjs": "1e8985997bd2c0807d349acaf192a54147d779e5349faf6507f51aa8becb85ca", "https://esm.sh/v135/@aws-crypto/sha1-browser@5.2.0/denonext/sha1-browser.mjs": "d80868d5524769e0334b50124d547ce9875fb05f9924acca4c42ed877b41ce7f", @@ -1995,15 +1179,12 @@ "https://esm.sh/v135/@aws-crypto/sha256-js@5.2.0/denonext/sha256-js.mjs": "2e1014e03baf7b5eb5d773c8409af836dacbec2c0a522b789774f76d3eb2e5ad", "https://esm.sh/v135/@aws-crypto/supports-web-crypto@5.2.0/denonext/supports-web-crypto.mjs": "2ae3bd2aa25db0761277ad0feda7aea68cd829c89b714e8e03e07aac06345d81", "https://esm.sh/v135/@aws-crypto/util@5.2.0/denonext/util.mjs": "376903ba54e09eed466b45e243cef1133f20bf015c0505e70fc794896d1412d5", - "https://esm.sh/v135/@aws-sdk/abort-controller@3.374.0/denonext/abort-controller.mjs": "c92632814e2afd8e528c7c8ed1ad35bc64c813c16819621186a2634132eb4826", "https://esm.sh/v135/@aws-sdk/client-s3@3.626.0/denonext/client-s3.mjs": "537c83c1071313a4feea44707db22e52241f9733461970bf2c7f95eea4598349", "https://esm.sh/v135/@aws-sdk/core@3.624.0/denonext/client.js": "0e16e057a670adae67a98862c400f4b1e41ad70c3fa58273f8cf7aa56907972e", "https://esm.sh/v135/@aws-sdk/core@3.624.0/denonext/core.mjs": "c37c628e3cbb5073d8811951d0183528337a14115f9a7502ff8a7143f09fa95b", "https://esm.sh/v135/@aws-sdk/core@3.624.0/denonext/httpAuthSchemes.js": "96fe3d4ad85aec033ae455506b653c12b806c53c9d865bf3062bad02a8b96f7f", "https://esm.sh/v135/@aws-sdk/core@3.624.0/denonext/protocols.js": "d5d8b7c7d4bdab2b8c86595b361b6cb6276596c8b4b3a69c338b9c2bfe65d3dc", - "https://esm.sh/v135/@aws-sdk/lib-storage@3.335.0/denonext/lib-storage.mjs": "338562418111b43c97a6f08afede92220cd0a0e04e49ce4cf35ade96e04d1be2", "https://esm.sh/v135/@aws-sdk/lib-storage@3.626.0/denonext/lib-storage.mjs": "0bbdf69f0caeb88adeb56212c92fab68899dc9518ce7cbc60d47e24dc4c2e6cb", - "https://esm.sh/v135/@aws-sdk/middleware-endpoint@3.329.0/denonext/middleware-endpoint.mjs": "b26a2fc43052be9bcfdd92a440c2774c1b7e18d79481d1332e24357d62b7a8cd", "https://esm.sh/v135/@aws-sdk/middleware-expect-continue@3.620.0/denonext/middleware-expect-continue.mjs": "7257dc7aa9fd7a34fc44b5f8b2460cadfdd72b2e8d7a54d2027a69d1e94c902e", "https://esm.sh/v135/@aws-sdk/middleware-flexible-checksums@3.620.0/denonext/middleware-flexible-checksums.mjs": "13e3af9f03eae1deb232c6201bac2eabbf986c2bb6f5cfbd80c06988172e5cd6", "https://esm.sh/v135/@aws-sdk/middleware-host-header@3.620.0/denonext/middleware-host-header.mjs": "1e2c8804ebfb981b393e843ada215a2f2a5faf82f92ebe8906794bb0d1f09338", @@ -2012,25 +1193,18 @@ "https://esm.sh/v135/@aws-sdk/middleware-recursion-detection@3.620.0/denonext/middleware-recursion-detection.mjs": "e4b76653eb33598813018b3d924a4d7ff86243a7bd4d818ac7a194d147e7a267", "https://esm.sh/v135/@aws-sdk/middleware-sdk-s3@3.626.0/denonext/middleware-sdk-s3.mjs": "d270af31fd15039013d907d80079ffca73be4edd8d8692c50df5b5b9e4e67c11", "https://esm.sh/v135/@aws-sdk/middleware-sdk-s3@3.635.0/denonext/middleware-sdk-s3.mjs": "19d026384d6c2223ef650a5f6791da38f2cf93612a2f3f2474bca2c78c002a19", - "https://esm.sh/v135/@aws-sdk/middleware-serde@3.329.0/denonext/middleware-serde.mjs": "6cc2658658bbed61570b1aa86022af3c009ade420c5689a060c741a411f07306", "https://esm.sh/v135/@aws-sdk/middleware-ssec@3.609.0/denonext/middleware-ssec.mjs": "55d27e9c5fcdd0f4bf2cf7b8f0c6b834d4b3cba6c044de9a57cc0419c58d64bf", - "https://esm.sh/v135/@aws-sdk/middleware-stack@3.329.0/denonext/middleware-stack.mjs": "fb99b7b75f28f75710d7c4335eed550049b5fb3a88bb803c9144dc94027126e4", "https://esm.sh/v135/@aws-sdk/middleware-user-agent@3.620.0/denonext/middleware-user-agent.mjs": "0ccc85f4fc403b97c9f568e00fcfbfa8bb89cc14fd0afac361bde45fe5468e30", - "https://esm.sh/v135/@aws-sdk/querystring-parser@3.329.0/denonext/querystring-parser.mjs": "40ff8f84d555f74f8996757645b31276755755412865833e1c2b73cb3c099233", "https://esm.sh/v135/@aws-sdk/region-config-resolver@3.614.0/denonext/region-config-resolver.mjs": "580b2f14c0d72423f166859afd2441fdf3883f7a3ab86c36d746a159029d40fd", "https://esm.sh/v135/@aws-sdk/s3-request-presigner@3.645.0/denonext/s3-request-presigner.mjs": "57125a72c13a69f88078aa6505ef6088efa4c773604463a08b9be275996c38ae", "https://esm.sh/v135/@aws-sdk/signature-v4-multi-region@3.626.0/denonext/signature-v4-multi-region.mjs": "63e55b8fb9055aa0b49908b0844b6f1e363e33768ee2feb77a7b4b4592ff5d98", "https://esm.sh/v135/@aws-sdk/signature-v4-multi-region@3.635.0/denonext/signature-v4-multi-region.mjs": "de9c08397d25f620680522d022422ebb30cc534d44cc91592f31922ec3f9bc88", - "https://esm.sh/v135/@aws-sdk/smithy-client@3.329.0/denonext/smithy-client.mjs": "2fe6de061d275592329468d827aa92da5f7a5a8db94b1cc1f65a6f770f9ffa4a", - "https://esm.sh/v135/@aws-sdk/url-parser@3.329.0/denonext/url-parser.mjs": "97fa1421f7a6410586890a269fe5500a69e70ca82758e85eca7884f4a1ade163", "https://esm.sh/v135/@aws-sdk/util-arn-parser@3.568.0/denonext/util-arn-parser.mjs": "e80995eaf790640e591f09d89d9099b022efa6d7954d6e23a1a7f5691b9b5110", "https://esm.sh/v135/@aws-sdk/util-endpoints@3.614.0/denonext/util-endpoints.mjs": "9c8c4f8e1ce01df87b215a8202104e482999a94c46d46fe0d6e763296b6d59b2", "https://esm.sh/v135/@aws-sdk/util-format-url@3.609.0/denonext/util-format-url.mjs": "097aa6da9b813dfd68e0bdcd25391d7e77ae808911463309604f8022ac38ab0b", "https://esm.sh/v135/@aws-sdk/util-locate-window@3.568.0/denonext/util-locate-window.mjs": "44c4acffec7669f2d0e0307ebfca7cac1f85260a6f8238dcbeb5e79f769e6f00", - "https://esm.sh/v135/@aws-sdk/util-middleware@3.329.0/denonext/util-middleware.mjs": "c9e423e7b96aa3eb038defc3b70a7db2e20260e504ec846cff5bd233f34fe09d", "https://esm.sh/v135/@aws-sdk/util-user-agent-browser@3.609.0/denonext/util-user-agent-browser.mjs": "47329052476de081fa1bd227be1f83dd1ed360162aecae204218295bf9dc5ab5", "https://esm.sh/v135/@aws-sdk/xml-builder@3.609.0/denonext/xml-builder.mjs": "1822a0c319298642be9cdac624fadf1c77392d02f6b33fb9e36b27738de5fcc6", - "https://esm.sh/v135/@smithy/abort-controller@1.1.0/denonext/abort-controller.mjs": "e65c475315885a73dbdf844fa53b26ab472ac201b9e8417b96144e8052aeb062", "https://esm.sh/v135/@smithy/abort-controller@3.1.1/denonext/abort-controller.mjs": "dd485991596c6c38a3d35fcab735b6be8afaeef82e8c7567b89f42327ad93e40", "https://esm.sh/v135/@smithy/chunked-blob-reader@3.0.0/denonext/chunked-blob-reader.mjs": "bfd33430ff0d1b7c3dc6e42401a2adfcdeaf2dbb9ac56ca6578782c99e2cb359", "https://esm.sh/v135/@smithy/config-resolver@3.0.5/denonext/config-resolver.mjs": "0ccf80d6a6427058db95154498485b6a5ae77d12c4fdae48406c9a60b41afe2b", @@ -2163,909 +1337,122 @@ "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/unarchive.ts": "f6d0e9e75f470eeef5aecd0089169f4350fc30ebfdc05466bb7b30042294d6d3", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/url.ts": "e1ada6fd30fc796b8918c88456ea1b5bbd87a07d0a0538b092b91fd2bb9b7623", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/worker.ts": "ac4caf72a36d2e4af4f4e92f2e0a95f9fc2324b568640f24c7c2ff6dc0c11d62", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/engine/bindings.ts": "7c3e28ec60a0381030310228be6c02f1a434046b4cbcf793a537aaef47be949f", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/config/types.ts": "73357168542ef041da67997acdd98097444d92f0a1663be03ad1523fd20f768c", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/query_engine.ts": "39281c309b3d72123fcd8695700bd2831956e09d2b1c082ef899886beea6ae82", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/input.ts": "cf24fcffa1891dfc2f2af941a64aade9da069a6ef92baa432e2d7dcf5f9a8b86", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/main.ts": "f390cfd2b5b836f1a54fa9ea7d8a5f5ba80430b6e849032145c0a7c0ae7216f3", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/Runtime.ts": "cc476f09f7d32d10dec3812a9a589da2866247e2064ce149ea2dc68fca833730", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/deno/deno.ts": "bb0cdad8e785d43f6c59232e214fab82d43476acbcef740f561708b064bae172", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/deno/worker.ts": "ffeabab915301a666ac06b28989d5be4b29e600fb2932e25005ec1c9f48aac1d", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/kv.ts": "7d87409d8f93a4f684e1a0aabd020e5f3e559669fe3ca8efee9cd5045fde99dd", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "b94b09ecdc7d81ddcfd7596ae8cfb1ebbc8896d4c67207da627dcd79d19c658c", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/prisma.ts": "bc370cfcb0f2aad520b8d2fd082e18dad5d41386225b50c9ce577b6c45df55b3", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/python.ts": "77e7f683830962365ce7ce0af5fc5d326e11bc9751ab33d7add16d27feb32633", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/temporal.ts": "fef8a8f70d3f75957a5a741c275abea96cc492722784ea4aadffd9fce9cbff3f", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/runtimes/wit_wire/mod.ts": "78ff89ee3972aafd73be8965e1f682b5877c9d1fc4ec2bce0db09f7bc13a0252", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/artifacts/mod.ts": "fc931ffd49dc168da12882acf1055d3252e0cb3b666928e67d08d2a6c5be3447", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/mod.ts": "d9f10b53a40192863a431c6be541effb4fd3c012ed8a716712d5176eba8c884a", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/mod.ts": "27c917783dd8cf99d06290c0768e852ab348c3e989e47c77e648ffcc564b79fb", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/43faf1107eae75aacd3cb30d46ad0fba368eba7e/src/typegate/src/worker_utils.ts": "19f686d729b947ab3eb2f29e99ccd07578037a3bccced65fc0dce42d5338cd31", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/engine/bindings.ts": "4529b86703a1512302164bca346c29df2a246d0ebbf20248cc39ee9745490dc1", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/types.ts": "73357168542ef041da67997acdd98097444d92f0a1663be03ad1523fd20f768c", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/query_engine.ts": "dbbbe1f233f67fae4e0574ab8ceafe3f4a03f3c62fa0a9f7cc8d02c44fe79bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/main.ts": "f390cfd2b5b836f1a54fa9ea7d8a5f5ba80430b6e849032145c0a7c0ae7216f3", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/Runtime.ts": "30ec531890bc626953fe16e0a6882c61b05c9cdab8858727662fbf29998df274", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/deno.ts": "9964279b30ab39827cb1691484adb84a04d764ba2746122af0dfcba13caa39e3", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/worker.ts": "2397af9b517b332ef5df2ffea7d537170084b0c6e3155f62a045ad5c0d557a3b", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/prisma.ts": "9ec0f38674728229d053aff19b4f411852390c08c2886c0944d49c8d13ebfa2f", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/python.ts": "4a067d196fbcce2978207de7dc61c734dcdc77f0100739080ae341af3c352adf", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wit_wire/mod.ts": "ab031dcd7ad66861fe30c3bf6da8b545a7ef4a26a9610da849f73cd8a1e58fae", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/mod.ts": "13583fb57bb5280e26c50ae89834ab73b123b712eb14a1995af00267304fef97", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/mod.ts": "3401f26beae423b008480460495cf7a22791a53cce65fd0a941c34e4b65ee5b0", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/worker_utils.ts": "19f686d729b947ab3eb2f29e99ccd07578037a3bccced65fc0dce42d5338cd31", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/engine/bindings.ts": "e9391491bf5c4f682267a5cb4ae384ef33ed7c15273fcada13bea7b064cf1270", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/config.ts": "289820b743711beb9139bca83556f60774521f3c58addd5c441ae3205ef49e61", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/config/loader.ts": "f46ed5199db89c6e5ebe5accb1cd7561a22cb8a158dfc86b371956d3002662cb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/config/shared.ts": "b2cc53588d6651b5261de312c4b92f517f0b764cd95eb1b8771e46c3f46376a0", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/config/types.ts": "77f7051cece41b67b47471511496e35b76bd7eda0ba10cdcd02fda261ca0ed13", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/crypto.ts": "00efcbf7906e66105a5b18f1654cd78bc05f8b2ed755cc4be9f5755f49a577c3", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/computation_engine.ts": "9fb3033c491a17aec92757a1b7c299fa5c5197dff666b86f074beebc643d239f", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/args.ts": "2eecd557a4cde56ebdfbbdf998bff4386fcd0b79007a7ba5fc1d2c71f57f3a85", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/dependency_resolver.ts": "98c9505a700ad0cd74fac327e7258aae6bbd60cd60587a4ec56bcfe57cf6fe79", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/injection_utils.ts": "21a0b4117e00c48533a83bd2985046eb4510aba3c331c02bf64920d719d282bc", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/mod.ts": "a90671e394e0ade1e47a1d1bf65560fc06d8d14531f062f902254e761d01bdb3", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/parameter_transformer.ts": "953d7c970141e44e29be72d79cc253ab26ea5a366a2f4bcd43ec6c73203737ca", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/planner/policies.ts": "0ef1f49f06d17e1df8e8ec0108bdf1458fcf95b42be8fbdb0c1357b46a5020a2", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/query_engine.ts": "152e96d3c4f5e1161f974ca36c2034ea3d3ef56f548fa64bbb4563dd2ed7d6dc", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/code_generator.ts": "adb81b215a10bbf73f00b910d75e953dd8f630d3dd590e6c85323cae4da6b608", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/common.ts": "bf2174d58cc898f094c5e353e43988888922dfbf6878e75619594f5de5498843", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/constraints.ts": "f173ed12173c92b3eca2b306973dee34e18feeccd2c4c51f11fe98216e7d80e7", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/list.ts": "d6ea1984e6dd3e422173b5252fb5e10d27f216c7051aad1452250a0454c465d5", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/number.ts": "aebeb91359a8edcc444b1a229dbca67cefd910837e771f4f18eba0070bdd80bc", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/object.ts": "1c10be974a2ba3b2b60072c34af84497cd099f263fb8223ebe763bccb7ec451a", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/inline_validators/string.ts": "7ea1e1661e54d093a56df7be22ee8590940efd3a230317ebc80b0978a0de5ce4", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/input.ts": "f6f00f03d82288804a31852a65ec89f021134591a6888e9972ea7512bb41aecd", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/matching_variant.ts": "6a9c0232b61fd9a20bd35cc4caa2350901504655bacad839fa275b24f9292e45", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/engine/typecheck/result.ts": "494f6a0b58cf7ee9e27fbae65de71a33e1659efcff428be51dd158824096f247", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/errors.ts": "3314988ebc9d7a5e3033239a9cfba752020144b8bfd9cacd3d3fc46d0ea30644", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/log.ts": "a44dca4a37baef59ee50bd44b4ee12c77fd57bd57c0bc09aab8016c2550b1b32", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/main.ts": "af5c054d8188afa43b3f5cf3f779a3b0fe2c2bccf2cb7dbde942f469a0ebaad7", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/Runtime.ts": "6fba220b09e69aefca2e4e5a77eaf830906dece0fa4b500d878edb6c6463953c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/deno/deno.ts": "9f5c74dd2b70f0259e9891b62907720e0f77117a34e69f40efd3e080c39acc6c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/deno/deno_messenger.ts": "18ee6e6797702955744bc2a11e37e4e3cdccdbf249cc4877cbacaeb3aa66775c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/deno/shared_types.ts": "2ef1fa347c241162a8a32cebb1113b20f94326c4b20b0883e72b79bb879e5d07", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/deno/worker.ts": "fabc721575f048d8e4ca960e41dcda57b7103151b606a736ac0358dd7c418bc6", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/graphql.ts": "a03a5f3e1d538f736c9691074e67e6b4d8bfa880bd7e49918216d8dcd6226acb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/http.ts": "580b43b0db099a0c5ac3aa971c74fe78bee8e95addc2369d1a827fcc6e15033e", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/kv.ts": "22fbb14530eee945ebc85bf157f1d03fef98ec96653c945815fd85c5888ac51e", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/mod.ts": "e01fe4ae085c2170ffacc659bab6d829bbf7a513c3574b15e964c32eddf2e8d1", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "5457677d4b44abc060cb7c625a66fd4db231206df656bfc41b5a2e017833eea2", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "744b0e499ef5a8cdb10f35c5c8570984cac7a00f64d85c1374dabf00624b0397", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/patterns/messenger/types.ts": "23ddb7d12e4d049158ffefdb0b8f00ff9c8b7c1c31637b101e391f89ae6e8a97", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "70e8b612f4c771dd607233cede7036f7d343702086a8d9cd3904d8e947daac90", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "456398f2300b8da1b870db6e84524c5920e57c7bcf15d8a5f3e1323199f26170", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/migration.ts": "3dae1ae03546123ffc2bee76a5d049ab76cf8724fdf353b0c610f6e86364ab2d", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/prisma.ts": "c36709efd13ea0553d552483d8a268c2432276a932144428bcaac869e2913ca4", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/prisma/types.ts": "44e221d8143e314e8db39b62e245518a290bf4248ace208a755d0aa1a5af99bb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/python.ts": "32825eba0eb6680fa97933535a96ae80e09e7bd0d207b0385dd3da8cf843bbec", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/random.ts": "2f65216d0bd56953af78938151f697f11e7c22a1ac0c68d15f85940c5fd49a1d", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/s3.ts": "c9f027361982be38ce4b157d9779ff9a2cb6b6b686fb749eb600d0bb73447ae5", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/temporal.ts": "b31d30777e71ae4c8d2ac1cdf522b7b498d545d0c60c2fb4e76c685f3e2c49ee", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/typegate.ts": "ef7fc75335d947e9afce79418bb3802a4a174ad68b4b4b719232fe7df5d78040", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/typegraph.ts": "55b5d9b6a4a0d536a06d63b57e863f12f3dae38b2b421f205c50340424e43f7f", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/utils/graphql_forward_vars.ts": "5faf28e955a0e950a5c79bc3ceb68d9c4a14df3dd2e94dd867e063de6ae1da88", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/utils/graphql_inline_vars.ts": "f69ace5ac7509f3ce33c0b31b73597372efba42eac09948ab5e8e6d38b37e3a3", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/wasm_reflected.ts": "b3562d7cafc777625f9cc06d74fcac9634d64ab5d191f2e7742155e7426377e0", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/wasm_wire.ts": "d3e53d0eab0482bd9d222897a147d5afa4ea5e31b66b7b98d40b5f13f39e9f7b", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/runtimes/wit_wire/mod.ts": "229fe56d4ffa6aa7a2242b89712664701d6e0e75a9072d345372bc5b834645fe", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/artifact_service.ts": "b910693b1ed6b8ae4ed4036b0e4c423313870cce514cde7095c6dd8f03234bd9", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/cookies.ts": "ebe37f0ff356df71cb72911bb17c13744dba9ebcd5e0eb69abf41d73cf179ee8", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/mod.ts": "0fd5fa8dc8d2278df02a93b457fbb4042261871e57985719e70e39fe491b00f0", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/protocols/basic.ts": "a4361603e15ab387ec4db8664965ecae15457eeb6503f65bc8a11bf7f87a3a6a", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/protocols/internal.ts": "a93b3234a46f4de9e726582d024a3c73114a195560ac59a9e31ad0b3cf397f39", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/protocols/jwt.ts": "f779924412dc01fc557beb200b52198382dc01345e14deb4bf8af9324e1bdbb6", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/protocols/oauth2.ts": "3a6db9349f0e5c8210480eeea26f6c8e26bf2f5df3b5c2a509ac1f3428b214c7", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/routes/mod.ts": "70ceac64f3e868d5b00b21bd5094b149374f0be487293ad4098415663999320d", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/routes/take.ts": "21304fcbfa9e9f92f240121ac2fad677b315ca1f7e55ec5e6f2905d1ccdeb1aa", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/auth/routes/validate.ts": "f8a2a7f4fa58dac1f10f89dd76d8ec5a4d7ce7e98ddd1d8e56a178c9f6158eaa", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/graphql_service.ts": "c84b8cda35ceb0991d232ff2cfe468f5a93fb19440b594b23eb79dfb3ce31ea7", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/middlewares.ts": "b870a0f9e70880f020510b64d19e0e23450656490ac117192398bafdb00c0ccd", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/playground_service.ts": "d293851d3a5f4d3b196115a38b87d9c4826355290e42c1c1a586604bbbaffd6e", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/responses.ts": "374620f4f7bd96bacb582247f75e279906bff7dee4a1ae107364ba2fbef0b192", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/services/rest_service.ts": "316c7ece7785dc6a39b38e780915057834f3466d5274d49c849d5833bb772dcf", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/sync/replicated_map.ts": "8f7a1686ebd4c195074549771f27ca039398c6976022da79d204548c9a8e1188", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/sync/typegraph.ts": "9166892f76ca69956dc1300822834a7545886370ef83bdb61a92597dae6b6256", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/system_typegraphs.ts": "ada9d4dc74174078eb502dc707e91b628eae97fb729b90cffd7d59715dcff52f", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/graphql/gq.ts": "341e066e10eb424c17095fe8cc65bbddc9cdfcdd51ecd82dd4905a50c3db8e82", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/graphql/graphql.ts": "fd36d55366b2d0736580a2d8a7c408b6070ad7291db3cfbba37a6ed06ad01733", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/graphql/typegraph.ts": "e79b5acd4993a902ca4104f30075931bda49c140a5297920b644d6d3f4712ef2", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/graphql/utils.ts": "ab4ee0fe51e53b4b21f7f2cfc4c77513a47d641a0bfe6822ceb46a7d8128adb9", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/transports/rest/rest_schema_generator.ts": "80d22818682b9856368dd87bf3085d6d7f53b7facf3412956588666b518bb8e5", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/artifacts/local.ts": "9405ef3cb3775a25d80b12f49aace608ecce7e18c29ed59196709b1e6a408d9c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/artifacts/mod.ts": "ddc5d09342d9fe74b513fc0db52f0c6900d091d5cb9871b8434af0dbec854ae9", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/artifacts/shared.ts": "56ab2fc8250ccb7fbfaad6d586f0ea3c6422f9d76104a20af0ad51c1743bba42", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/hooks.ts": "de5f9fb6b4d6c288af0309d08147657eadde71e413513fb4607f7ee24d09d7d5", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/mod.ts": "3794b2e9a5aaf873b7636c38270bd64af8bcccc0df3d47937f9b102fc8bc2b0c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/rate_limiter.ts": "0b3126eb28284ed3ed7a9fe434a5a096745ebc03e4d8b1b354fc7b791ccccd93", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegate/register.ts": "3eabfb20967d926c5729ed9f29f454e341182def492ae13208b98d03303d9d20", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/mod.ts": "b15034cbf2d23267199ed58ee61a20be21dd7293c9ee162577918e0845d7c60e", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/type_node.ts": "76fcb35bfad244af1fcaa45798b29a7536f5a2a45e8c824ae36a0a8cb87aeab5", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/types.ts": "a3c1daa8305c709641b7e9e32f78bae5097accac93562c9a9c34d8d9c5847617", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/utils.ts": "4d751910f053f7c3f33ce0cdebdd9b19970bee04ef533f65f01788c727c371e7", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/versions.ts": "29e4415454a5095847aa12bec06bcc2ac3cdb6f1b75606dedd8f5612ce64f9f1", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraph/visitor.ts": "bbcd6204c65e841cf9facf6d7b59ce1456ca051b06935c739a9be9e57807331b", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraphs/introspection.json": "76e8796d99a71f93c6fd57e6af9708ef2d8f587f9ceca2ae9aec3f49d242e43e", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraphs/prisma_migration.json": "05bcf740259abcedb1bb2d8b34e6d62cf2ef124481e01379b93ddaf05e99b1c1", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/typegraphs/typegate.json": "99da5fb4052c82a35a65ac18f94cbce47d7e49afdf7678b8127e2f4677805cdb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/types.ts": "305a38570368838fa2cc3382e7d4fbb8717976397fe8bd4aeda201f7a1cb4b73", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/utils.ts": "17f24991ba464352c3855cd8cda6b4d330f4283f33b167e745571a780e02c8fb", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/utils/hash.ts": "2f4ce3f1736df720def3b0fc89ac9e6e29afa0a33d7a988e15cb1d1bebcf026c", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/tests/utils/memory_register.ts": "de21f1494e4e378fc43280e04ea5b59aa791d417c655d47824769cde4fc63b19", - "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/tests/utils/no_limiter.ts": "730246db1c73b5ca77e01e1838194f3870f4024cbf29a850674564b20425a7f0", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/engine/bindings.ts": "e9391491bf5c4f682267a5cb4ae384ef33ed7c15273fcada13bea7b064cf1270", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/config.ts": "2d15bf427ed74be3203e81d56d3bc5c6ecdae74bca18fdf5160482ea2b4b0385", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/config/shared.ts": "b2cc53588d6651b5261de312c4b92f517f0b764cd95eb1b8771e46c3f46376a0", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/config/types.ts": "04013979ff0c001e8a19547a14bfe2ee0a2c49dc346b22ceefd99f8c8aecb7f8", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/computation_engine.ts": "c61c224909a334e6024c2b1f929ebb2721bbd00e5418178ec68bbcdc5391090f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/args.ts": "3cea07d4c49784c1cddbd449f5dcc7e5627c2c6c5a9056b5ccadb8542d13f3ed", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/injection_utils.ts": "d7dcd7d10fe7c610731b9a98905bb97eb96d591521245d9645f8b9a8a8ad510d", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/mod.ts": "cb5ec29f08bb4617cad7581b28d453873227b246321f91175833b0264bf16ff1", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/parameter_transformer.ts": "4407bc6f75215431b8790cd2ba39ec348c25a9f9c377a80d0bd7315e72a9afb3", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/planner/policies.ts": "3c316e95ab4cc28e5684b0362afdb1e0ba198c7d49453bdfa2470fd39c44104b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/query_engine.ts": "dbbbe1f233f67fae4e0574ab8ceafe3f4a03f3c62fa0a9f7cc8d02c44fe79bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/engine/typecheck/result.ts": "b2ac55373242b157396f4b400112d02b45abb623e72d2ccfa6e168a10845211b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/log.ts": "50d9fd5a225312118b04317c89155ae5a37f66b3ff31af4b7ed92880fa7c6694", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/main.ts": "af5c054d8188afa43b3f5cf3f779a3b0fe2c2bccf2cb7dbde942f469a0ebaad7", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/Runtime.ts": "7ebf8f1903c46ddeb9b795c548561105e643ab5867319e4a9f1f72920048d14d", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/deno/deno.ts": "c540c9049261a302e0cefd510fcca6e51e5d527ac2d432a32060d98fa5202ad3", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/deno/worker.ts": "64604d323ffd85f864c4a15419077e5131561de1680504041157a05f8ad9b5eb", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/graphql.ts": "e7b1126e80c433a3fa851aff47239b2571ba4ee0b175b25bda6d85804e8b50bd", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/mod.ts": "8be5c49d628052d172da6c6d8d40d416ec3212ac9776aad658c904a9ada06d02", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "45d00aee4082e93e817f748fe27d765e5869373c69097a0186ddfcc62f0e152f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/prisma.ts": "2d9c5b0dd0805f043e7aabe4fc5ad39571a8bf01194dadc1f0ef17b121be2fc6", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/python.ts": "00fefc5201b7f8600a5788ddf7f2db1d53098b34654c24f4f37c78052056645e", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/random.ts": "8623fa125804dd6302b3c18dc882a4988ce8f2510be55cdc3ddf9af84d05b8e7", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/s3.ts": "2f028f0564d07e789923dd8811ceaf3b4c92a57e390f10d235ac5da7cf18b4e5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/typegate.ts": "3f629905c99c49f372be0e05cc8ec27a113b0959f446273134d5eb75a3da8db4", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/typegraph.ts": "075d4a054ced6424529d9b7e8770d9e2579b3bcb3362007226e6b479afaa6013", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/wasm_reflected.ts": "f27fc767b0d42d65729d7489ee61336ce2419a45cb1d52debec67ad3c1559084", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/wasm_wire.ts": "8d8ba5bc68bf6fa7842c193b7e86af0833087ff44da40d83ccf600e62a29d484", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/runtimes/wit_wire/mod.ts": "e13ca5e0384357da52744640f9d535c2f84da668c8eb92893fe454c9cd66fb2b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/artifact_service.ts": "84285d8e1e569d5f30918f6bf0c7a97011b37b2ab529787f0308194b875c4de3", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/sync/typegraph.ts": "6dca5ca5c09289512252180e7db47f6cbb2a7881fb860e158ee711f4bf9ae991", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/graphql/typegraph.ts": "d1ff14176f6ab1d6b3ba54cb2334e555ede11e769f832c4b1d6ac8ec1872185f", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/artifacts/local.ts": "11482d663545af6110e4b75a46b21675c68f6c4df625d7867e0cdab9e267065a", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/artifacts/mod.ts": "5d207550b83b865d8df4cf023f8304935f410c81b3d18894aaefb570e56fbd93", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/artifacts/shared.ts": "7f6d99bcc6499446dcf019d1c3e7735ff5a7b590bfd8fbae89a94d06ac18d9f8", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraph/mod.ts": "71503ba14d0ad1e77d320d0fa044b93cba76e43ea2800828e0833cc4f0e36401", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraph/type_node.ts": "76fcb35bfad244af1fcaa45798b29a7536f5a2a45e8c824ae36a0a8cb87aeab5", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraph/utils.ts": "04ab4bd79523a4a599275a288c8ecb37798cb1615c73e97f080a0bd79b1c2c44", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraphs/introspection.json": "76e8796d99a71f93c6fd57e6af9708ef2d8f587f9ceca2ae9aec3f49d242e43e", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraphs/prisma_migration.json": "05bcf740259abcedb1bb2d8b34e6d62cf2ef124481e01379b93ddaf05e99b1c1", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/typegraphs/typegate.json": "99da5fb4052c82a35a65ac18f94cbce47d7e49afdf7678b8127e2f4677805cdb", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/utils.ts": "51b8167e4f1d992d68e99b70cb326cc1793593b196c1e17c01775f210652871b", - "https://raw.githubusercontent.com/metatypedev/metatype/67c1d0fa3f16ec6459ef28aa750db508a1758271/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/engine/bindings.ts": "4529b86703a1512302164bca346c29df2a246d0ebbf20248cc39ee9745490dc1", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/config/types.ts": "15dbd4331e819fcf551522460413af718d9b9f379dea0d9a87ab4871b9c8d9e7", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/query_engine.ts": "dbbbe1f233f67fae4e0574ab8ceafe3f4a03f3c62fa0a9f7cc8d02c44fe79bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/main.ts": "af5c054d8188afa43b3f5cf3f779a3b0fe2c2bccf2cb7dbde942f469a0ebaad7", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/Runtime.ts": "30ec531890bc626953fe16e0a6882c61b05c9cdab8858727662fbf29998df274", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/deno/deno.ts": "9964279b30ab39827cb1691484adb84a04d764ba2746122af0dfcba13caa39e3", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/prisma.ts": "9ec0f38674728229d053aff19b4f411852390c08c2886c0944d49c8d13ebfa2f", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/python.ts": "4a067d196fbcce2978207de7dc61c734dcdc77f0100739080ae341af3c352adf", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/runtimes/wit_wire/mod.ts": "ab031dcd7ad66861fe30c3bf6da8b545a7ef4a26a9610da849f73cd8a1e58fae", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/artifacts/mod.ts": "13583fb57bb5280e26c50ae89834ab73b123b712eb14a1995af00267304fef97", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/mod.ts": "3401f26beae423b008480460495cf7a22791a53cce65fd0a941c34e4b65ee5b0", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", - "https://raw.githubusercontent.com/metatypedev/metatype/770ca5fc5e328fc88633101934bdeea989b26628/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/engine/bindings.ts": "7c3e28ec60a0381030310228be6c02f1a434046b4cbcf793a537aaef47be949f", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/config/types.ts": "73357168542ef041da67997acdd98097444d92f0a1663be03ad1523fd20f768c", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/query_engine.ts": "39281c309b3d72123fcd8695700bd2831956e09d2b1c082ef899886beea6ae82", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/input.ts": "cf24fcffa1891dfc2f2af941a64aade9da069a6ef92baa432e2d7dcf5f9a8b86", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/main.ts": "f390cfd2b5b836f1a54fa9ea7d8a5f5ba80430b6e849032145c0a7c0ae7216f3", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/Runtime.ts": "cc476f09f7d32d10dec3812a9a589da2866247e2064ce149ea2dc68fca833730", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/deno/deno.ts": "bb0cdad8e785d43f6c59232e214fab82d43476acbcef740f561708b064bae172", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/deno/worker.ts": "ffeabab915301a666ac06b28989d5be4b29e600fb2932e25005ec1c9f48aac1d", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/kv.ts": "7d87409d8f93a4f684e1a0aabd020e5f3e559669fe3ca8efee9cd5045fde99dd", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "b94b09ecdc7d81ddcfd7596ae8cfb1ebbc8896d4c67207da627dcd79d19c658c", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/prisma.ts": "bc370cfcb0f2aad520b8d2fd082e18dad5d41386225b50c9ce577b6c45df55b3", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/python.ts": "77e7f683830962365ce7ce0af5fc5d326e11bc9751ab33d7add16d27feb32633", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/temporal.ts": "fef8a8f70d3f75957a5a741c275abea96cc492722784ea4aadffd9fce9cbff3f", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/runtimes/wit_wire/mod.ts": "b40ab7bbdb225bff8738a743385251cc54a1ef44652e783a31ef7f85ed4efb18", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/artifacts/mod.ts": "fc931ffd49dc168da12882acf1055d3252e0cb3b666928e67d08d2a6c5be3447", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/mod.ts": "d9f10b53a40192863a431c6be541effb4fd3c012ed8a716712d5176eba8c884a", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/mod.ts": "27c917783dd8cf99d06290c0768e852ab348c3e989e47c77e648ffcc564b79fb", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/bb42c00169a34c4282317d50800993eea781a69d/src/typegate/src/worker_utils.ts": "19f686d729b947ab3eb2f29e99ccd07578037a3bccced65fc0dce42d5338cd31", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/engine/bindings.ts": "e9391491bf5c4f682267a5cb4ae384ef33ed7c15273fcada13bea7b064cf1270", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/config.ts": "289820b743711beb9139bca83556f60774521f3c58addd5c441ae3205ef49e61", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/config/loader.ts": "f46ed5199db89c6e5ebe5accb1cd7561a22cb8a158dfc86b371956d3002662cb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/config/shared.ts": "b2cc53588d6651b5261de312c4b92f517f0b764cd95eb1b8771e46c3f46376a0", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/config/types.ts": "77f7051cece41b67b47471511496e35b76bd7eda0ba10cdcd02fda261ca0ed13", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/crypto.ts": "00efcbf7906e66105a5b18f1654cd78bc05f8b2ed755cc4be9f5755f49a577c3", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/computation_engine.ts": "9fb3033c491a17aec92757a1b7c299fa5c5197dff666b86f074beebc643d239f", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/args.ts": "2eecd557a4cde56ebdfbbdf998bff4386fcd0b79007a7ba5fc1d2c71f57f3a85", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/dependency_resolver.ts": "98c9505a700ad0cd74fac327e7258aae6bbd60cd60587a4ec56bcfe57cf6fe79", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/injection_utils.ts": "21a0b4117e00c48533a83bd2985046eb4510aba3c331c02bf64920d719d282bc", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/mod.ts": "a90671e394e0ade1e47a1d1bf65560fc06d8d14531f062f902254e761d01bdb3", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/parameter_transformer.ts": "953d7c970141e44e29be72d79cc253ab26ea5a366a2f4bcd43ec6c73203737ca", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/planner/policies.ts": "0ef1f49f06d17e1df8e8ec0108bdf1458fcf95b42be8fbdb0c1357b46a5020a2", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/query_engine.ts": "152e96d3c4f5e1161f974ca36c2034ea3d3ef56f548fa64bbb4563dd2ed7d6dc", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/code_generator.ts": "adb81b215a10bbf73f00b910d75e953dd8f630d3dd590e6c85323cae4da6b608", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/common.ts": "bf2174d58cc898f094c5e353e43988888922dfbf6878e75619594f5de5498843", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/constraints.ts": "f173ed12173c92b3eca2b306973dee34e18feeccd2c4c51f11fe98216e7d80e7", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/list.ts": "d6ea1984e6dd3e422173b5252fb5e10d27f216c7051aad1452250a0454c465d5", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/number.ts": "aebeb91359a8edcc444b1a229dbca67cefd910837e771f4f18eba0070bdd80bc", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/object.ts": "1c10be974a2ba3b2b60072c34af84497cd099f263fb8223ebe763bccb7ec451a", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/inline_validators/string.ts": "7ea1e1661e54d093a56df7be22ee8590940efd3a230317ebc80b0978a0de5ce4", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/input.ts": "f6f00f03d82288804a31852a65ec89f021134591a6888e9972ea7512bb41aecd", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/matching_variant.ts": "6a9c0232b61fd9a20bd35cc4caa2350901504655bacad839fa275b24f9292e45", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/engine/typecheck/result.ts": "494f6a0b58cf7ee9e27fbae65de71a33e1659efcff428be51dd158824096f247", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/errors.ts": "3314988ebc9d7a5e3033239a9cfba752020144b8bfd9cacd3d3fc46d0ea30644", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/log.ts": "a44dca4a37baef59ee50bd44b4ee12c77fd57bd57c0bc09aab8016c2550b1b32", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/main.ts": "af5c054d8188afa43b3f5cf3f779a3b0fe2c2bccf2cb7dbde942f469a0ebaad7", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/Runtime.ts": "6fba220b09e69aefca2e4e5a77eaf830906dece0fa4b500d878edb6c6463953c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/deno/deno.ts": "9f5c74dd2b70f0259e9891b62907720e0f77117a34e69f40efd3e080c39acc6c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/deno/deno_messenger.ts": "18ee6e6797702955744bc2a11e37e4e3cdccdbf249cc4877cbacaeb3aa66775c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/deno/shared_types.ts": "2ef1fa347c241162a8a32cebb1113b20f94326c4b20b0883e72b79bb879e5d07", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/deno/worker.ts": "fabc721575f048d8e4ca960e41dcda57b7103151b606a736ac0358dd7c418bc6", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/graphql.ts": "a03a5f3e1d538f736c9691074e67e6b4d8bfa880bd7e49918216d8dcd6226acb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/http.ts": "580b43b0db099a0c5ac3aa971c74fe78bee8e95addc2369d1a827fcc6e15033e", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/mod.ts": "b1d8e5d42a6b382e83342e562397d8213490ce5af245e8b6b1751eeec61d79d2", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "5457677d4b44abc060cb7c625a66fd4db231206df656bfc41b5a2e017833eea2", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "744b0e499ef5a8cdb10f35c5c8570984cac7a00f64d85c1374dabf00624b0397", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/patterns/messenger/types.ts": "23ddb7d12e4d049158ffefdb0b8f00ff9c8b7c1c31637b101e391f89ae6e8a97", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "70e8b612f4c771dd607233cede7036f7d343702086a8d9cd3904d8e947daac90", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "456398f2300b8da1b870db6e84524c5920e57c7bcf15d8a5f3e1323199f26170", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/migration.ts": "3dae1ae03546123ffc2bee76a5d049ab76cf8724fdf353b0c610f6e86364ab2d", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/prisma.ts": "c36709efd13ea0553d552483d8a268c2432276a932144428bcaac869e2913ca4", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/prisma/types.ts": "44e221d8143e314e8db39b62e245518a290bf4248ace208a755d0aa1a5af99bb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/python.ts": "32825eba0eb6680fa97933535a96ae80e09e7bd0d207b0385dd3da8cf843bbec", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/random.ts": "2f65216d0bd56953af78938151f697f11e7c22a1ac0c68d15f85940c5fd49a1d", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/s3.ts": "c9f027361982be38ce4b157d9779ff9a2cb6b6b686fb749eb600d0bb73447ae5", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/temporal.ts": "b31d30777e71ae4c8d2ac1cdf522b7b498d545d0c60c2fb4e76c685f3e2c49ee", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/typegate.ts": "ef7fc75335d947e9afce79418bb3802a4a174ad68b4b4b719232fe7df5d78040", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/typegraph.ts": "55b5d9b6a4a0d536a06d63b57e863f12f3dae38b2b421f205c50340424e43f7f", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/utils/graphql_forward_vars.ts": "5faf28e955a0e950a5c79bc3ceb68d9c4a14df3dd2e94dd867e063de6ae1da88", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/utils/graphql_inline_vars.ts": "f69ace5ac7509f3ce33c0b31b73597372efba42eac09948ab5e8e6d38b37e3a3", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/wasm_reflected.ts": "b3562d7cafc777625f9cc06d74fcac9634d64ab5d191f2e7742155e7426377e0", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/wasm_wire.ts": "d3e53d0eab0482bd9d222897a147d5afa4ea5e31b66b7b98d40b5f13f39e9f7b", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/runtimes/wit_wire/mod.ts": "30749d1b2cf9fc5da5464c30194aabfafd019ec5d171f519a37040893f7ee16c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/artifact_service.ts": "b910693b1ed6b8ae4ed4036b0e4c423313870cce514cde7095c6dd8f03234bd9", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/cookies.ts": "ebe37f0ff356df71cb72911bb17c13744dba9ebcd5e0eb69abf41d73cf179ee8", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/mod.ts": "0fd5fa8dc8d2278df02a93b457fbb4042261871e57985719e70e39fe491b00f0", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/protocols/basic.ts": "a4361603e15ab387ec4db8664965ecae15457eeb6503f65bc8a11bf7f87a3a6a", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/protocols/internal.ts": "a93b3234a46f4de9e726582d024a3c73114a195560ac59a9e31ad0b3cf397f39", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/protocols/jwt.ts": "f779924412dc01fc557beb200b52198382dc01345e14deb4bf8af9324e1bdbb6", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/protocols/oauth2.ts": "3a6db9349f0e5c8210480eeea26f6c8e26bf2f5df3b5c2a509ac1f3428b214c7", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/routes/mod.ts": "70ceac64f3e868d5b00b21bd5094b149374f0be487293ad4098415663999320d", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/routes/take.ts": "21304fcbfa9e9f92f240121ac2fad677b315ca1f7e55ec5e6f2905d1ccdeb1aa", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/auth/routes/validate.ts": "f8a2a7f4fa58dac1f10f89dd76d8ec5a4d7ce7e98ddd1d8e56a178c9f6158eaa", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/graphql_service.ts": "c84b8cda35ceb0991d232ff2cfe468f5a93fb19440b594b23eb79dfb3ce31ea7", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/middlewares.ts": "b870a0f9e70880f020510b64d19e0e23450656490ac117192398bafdb00c0ccd", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/playground_service.ts": "d293851d3a5f4d3b196115a38b87d9c4826355290e42c1c1a586604bbbaffd6e", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/responses.ts": "374620f4f7bd96bacb582247f75e279906bff7dee4a1ae107364ba2fbef0b192", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/services/rest_service.ts": "316c7ece7785dc6a39b38e780915057834f3466d5274d49c849d5833bb772dcf", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/sync/replicated_map.ts": "8f7a1686ebd4c195074549771f27ca039398c6976022da79d204548c9a8e1188", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/sync/typegraph.ts": "9166892f76ca69956dc1300822834a7545886370ef83bdb61a92597dae6b6256", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/system_typegraphs.ts": "ada9d4dc74174078eb502dc707e91b628eae97fb729b90cffd7d59715dcff52f", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/graphql/gq.ts": "341e066e10eb424c17095fe8cc65bbddc9cdfcdd51ecd82dd4905a50c3db8e82", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/graphql/graphql.ts": "fd36d55366b2d0736580a2d8a7c408b6070ad7291db3cfbba37a6ed06ad01733", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/graphql/typegraph.ts": "e79b5acd4993a902ca4104f30075931bda49c140a5297920b644d6d3f4712ef2", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/graphql/utils.ts": "ab4ee0fe51e53b4b21f7f2cfc4c77513a47d641a0bfe6822ceb46a7d8128adb9", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/transports/rest/rest_schema_generator.ts": "80d22818682b9856368dd87bf3085d6d7f53b7facf3412956588666b518bb8e5", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/artifacts/local.ts": "9405ef3cb3775a25d80b12f49aace608ecce7e18c29ed59196709b1e6a408d9c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/artifacts/mod.ts": "ddc5d09342d9fe74b513fc0db52f0c6900d091d5cb9871b8434af0dbec854ae9", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/artifacts/shared.ts": "56ab2fc8250ccb7fbfaad6d586f0ea3c6422f9d76104a20af0ad51c1743bba42", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/hooks.ts": "de5f9fb6b4d6c288af0309d08147657eadde71e413513fb4607f7ee24d09d7d5", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/mod.ts": "3794b2e9a5aaf873b7636c38270bd64af8bcccc0df3d47937f9b102fc8bc2b0c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/rate_limiter.ts": "0b3126eb28284ed3ed7a9fe434a5a096745ebc03e4d8b1b354fc7b791ccccd93", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegate/register.ts": "3eabfb20967d926c5729ed9f29f454e341182def492ae13208b98d03303d9d20", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/mod.ts": "b15034cbf2d23267199ed58ee61a20be21dd7293c9ee162577918e0845d7c60e", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/type_node.ts": "76fcb35bfad244af1fcaa45798b29a7536f5a2a45e8c824ae36a0a8cb87aeab5", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/types.ts": "bbfa88cac8049c02ad220656a554e0953a04cf56af2f166174bd23e7be9cb49c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/utils.ts": "4d751910f053f7c3f33ce0cdebdd9b19970bee04ef533f65f01788c727c371e7", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/versions.ts": "29e4415454a5095847aa12bec06bcc2ac3cdb6f1b75606dedd8f5612ce64f9f1", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraph/visitor.ts": "bbcd6204c65e841cf9facf6d7b59ce1456ca051b06935c739a9be9e57807331b", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraphs/introspection.json": "76e8796d99a71f93c6fd57e6af9708ef2d8f587f9ceca2ae9aec3f49d242e43e", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraphs/prisma_migration.json": "05bcf740259abcedb1bb2d8b34e6d62cf2ef124481e01379b93ddaf05e99b1c1", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/typegraphs/typegate.json": "99da5fb4052c82a35a65ac18f94cbce47d7e49afdf7678b8127e2f4677805cdb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/types.ts": "305a38570368838fa2cc3382e7d4fbb8717976397fe8bd4aeda201f7a1cb4b73", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/utils.ts": "17f24991ba464352c3855cd8cda6b4d330f4283f33b167e745571a780e02c8fb", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/src/utils/hash.ts": "2f4ce3f1736df720def3b0fc89ac9e6e29afa0a33d7a988e15cb1d1bebcf026c", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/tests/utils/memory_register.ts": "de21f1494e4e378fc43280e04ea5b59aa791d417c655d47824769cde4fc63b19", - "https://raw.githubusercontent.com/metatypedev/metatype/db616a6ae26eb6fe04e356a777c11185613d97ad/typegate/tests/utils/no_limiter.ts": "730246db1c73b5ca77e01e1838194f3870f4024cbf29a850674564b20425a7f0", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/engine/bindings.ts": "4529b86703a1512302164bca346c29df2a246d0ebbf20248cc39ee9745490dc1", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/config/types.ts": "15dbd4331e819fcf551522460413af718d9b9f379dea0d9a87ab4871b9c8d9e7", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/args.ts": "360969f3d6f82ba94891a59db1a445161a41c764e314c8bdfcbc924beb1d2492", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/query_engine.ts": "dbbbe1f233f67fae4e0574ab8ceafe3f4a03f3c62fa0a9f7cc8d02c44fe79bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/main.ts": "af5c054d8188afa43b3f5cf3f779a3b0fe2c2bccf2cb7dbde942f469a0ebaad7", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/Runtime.ts": "30ec531890bc626953fe16e0a6882c61b05c9cdab8858727662fbf29998df274", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/deno/deno.ts": "9964279b30ab39827cb1691484adb84a04d764ba2746122af0dfcba13caa39e3", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/deno/worker.ts": "2397af9b517b332ef5df2ffea7d537170084b0c6e3155f62a045ad5c0d557a3b", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/prisma.ts": "9ec0f38674728229d053aff19b4f411852390c08c2886c0944d49c8d13ebfa2f", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/python.ts": "4a067d196fbcce2978207de7dc61c734dcdc77f0100739080ae341af3c352adf", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/runtimes/wit_wire/mod.ts": "a1b6a3e894c1ad4fefb80d3ab8302e2b1e7b8c568012976ce5c46816d0d8b966", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/artifacts/mod.ts": "13583fb57bb5280e26c50ae89834ab73b123b712eb14a1995af00267304fef97", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/mod.ts": "3401f26beae423b008480460495cf7a22791a53cce65fd0a941c34e4b65ee5b0", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/type_node.ts": "b9fe641ac3f721d36b158a2d52ffaaadd44b4a48d204242e6d57e684ebcc5fec", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", - "https://raw.githubusercontent.com/metatypedev/metatype/dcd3e2581c87ce9cbdb680443e02587f4c3b7a05/src/typegate/src/worker_utils.ts": "19f686d729b947ab3eb2f29e99ccd07578037a3bccced65fc0dce42d5338cd31" + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/engine/bindings.ts": "f74df81c428c6ac60f254ad15667efdd08f6d2a4836635c9d8c8dd98269e9df0", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/config.ts": "12c435a42969bf2dd2bbbc54f9b7bca155ca7314a6dd4f39ccb4863bd8d10a1c", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/config/loader.ts": "e901da195b255644fbd24649fc998d2c2058a104cc124dc7736cf6a2ed2ee922", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/config/shared.ts": "c880217467c6cf59ddd4ee1692f588fe38b7ebf13294b28d20eb9bb4ebffa606", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/config/types.ts": "5b433a55cb124aacfce9fbce87bb1503871f10bbbf0cf0c5c8a826a0af7b2ab8", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/crypto.ts": "9f982b57238af8200cb698afb7ee3b2b816b0cc189e7a7d6559bedb8edde1866", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/computation_engine.ts": "4b2e7fd9e21bf9c790f1b4025a745712ef69110dd899418ae9059f83d4c5e9bc", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/args.ts": "2d1ed67a5e8a66cbcbc587c468d09c4ad904a9df7f300c2ff4dec55563973731", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/dependency_resolver.ts": "6f87025830e827cba0e7e74ecd3ff663a8298fbed778e70860efbe66d3b68f9b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/injection_utils.ts": "53b78c46726be1d1a79b5046f02f4d09570606b4e2fc1191a303f28551d472cc", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/mod.ts": "470be78433a2a16493730524fc5f0bdc3e7d926d03b16f7a4610ece8994b3dcc", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/parameter_transformer.ts": "2926e403cbe7688e442d430dc407b28c659f8689fe583d1741fc244bbcb04ddd", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/planner/policies.ts": "0b489f1dd93efafdeee41b5fdaa6d32c69b615e8b23f7a12d6a53b9c8b52811d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/query_engine.ts": "089771e5249035aeae83db926b819405747b3df20fa58dec1f7818159e3aa036", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/stage_id.ts": "090aa004ee3cec27f310571c2ed838d1286346cb1c8b263a0509d2c6e53ae300", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/code_generator.ts": "41671624b36c862b5baa2d8f06b36070fb2d1d4ef97fb0dada3eff2899620d9e", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/common.ts": "2e9abb9eb039f06e336492fa6f5e9b933dcb58643ffc5de423c0b696da6ecc43", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/common.ts": "4861d3aa582275515c9b3741a15505e4431a1f14ad64d86258f22b7c5c9d42b7", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "073531c748833cfa99e003ef95183dd9d8543a160807b8046dde3317df923633", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/list.ts": "af81948b4a5847e11c0cf1782a6c608d3c060771b0ba0e7edce4478359333214", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/number.ts": "b685df3ac3a95f6b0e6d5e566ef0059fd3c4d69444268c21bc93aa738dda884d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/object.ts": "1c56e54ea19052dd3375c7eada0059a5170e5ab5f2e6b0e0e0cf721ed3145ce6", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/inline_validators/string.ts": "580d0cd8280c957acd085390af17447209ad15e994ea58fd1e7151ef4e07a40b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/input.ts": "2ab8f2737d76bbfe94265c69ebf4c4b80676cd3ce095144a523c1362936e5cc3", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/matching_variant.ts": "651c6d47d3f368a0e47ac475c9803e69265f3d58b08293e8ef8bda17ac00a589", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/engine/typecheck/result.ts": "72c0d67bc35d1d98510d3bc5a3487c7ec63d6741911738869b122cb0bfb9de02", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/errors.ts": "01c76e617934753715ec35449395931265eb663aefafbe77522f05a8a7a5bef2", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/libs/jsonpath.ts": "af90cb8918ff8f453f9482bdcf7d4078ff0cdc53523a1725b724d0b056644ff8", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/log.ts": "dbbee669aac5471f6019e533238f18be1c539fb27506169269e1c0e45c0e6b12", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/main.ts": "41dc22a0c6d2a516cc99b4858ab9781d2d149253f4d70e21006d8d251532610b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/Runtime.ts": "4bd4825b6c42cd74e9a22cccb695f78a8f3fe81a278c2b1a56123770d7e87f99", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/deno.ts": "15badd909f25aa6daee80b04d22f3e5b32333f6b98e9f24acd953a1cbea151fb", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/deno/deno.ts": "c6293dfdba696c26dbba5e5791d8703d2e1f64a5357f999fa5f52ba233123780", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/deno/deno_messenger.ts": "016b86392a3ec0348a3f62ac63372a7da1af9801cb92f625bdff0b2fce1acf96", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/deno/shared_types.ts": "3b9773ecbdf2f2fed97588e0353d02b9e01001c52b2bbb24813e6735602cf5c0", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/deno/worker.ts": "b61f3e3fa181a8cfeae8a3df152171f74a1979428acdebc6d839624bad24fc56", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/graphql.ts": "07bf52adc13086be644a98c7670a2b757cf03a88c5ee9fae6be0bcd677fc70d7", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/grpc.ts": "adc5dad80e1587cc6239f7a7d9ccb86a946f3c4190ae9bcfcafa177dd68cc437", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/http.ts": "09185d4bcc157b8c1c3f49686f8e1c94d2368b2bf510ccfdca36314256260604", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/kv.ts": "312833f6212102d330a4f2648f9e33b99fe917d12f03d397c8b86fa2a2e0191d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/mod.ts": "73e682bfce50a595711602ba166bb28f8a003fdaa3e367a5e6aa8bd6d226b161", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "a6f602889968694014a71e1e1d2c0f200a933b4cac58b3ca08c8fd56840f83ca", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "2a1f6b3b0e7b0303e1e777dbced1dabaff313d1584a591c48ea2bf439b92571e", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma.ts": "7e6098169f749f15fb0a3c117e4d746ec78cbec75a3b2e0776da92699ef47433", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "7e4710d651695ac34a98da66b9334b2eb783a82a0d5cd3001add5c145757006a", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3b7323fdbad1b2da89d405686fbe96912ea051b49fc59e35a64ae3c082d88b58", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "07be71a18464f41fbc78cb72b44d8ff8150cfbc4aa42ce3060018e4fc8df9f13", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/migration.ts": "e9eb6e3c76e616a1f7348dcb00927e53b9802ebf7edaf04c0d07db6ed30aba87", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/mod.ts": "3e1e42facac57463f227c6408a995716ac364df037a441267bf4ddc55aba1762", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/prisma.ts": "595216d17e6b5382dbf0f00fc2a94043bf12d1a0aba78b488836e4c5a070d73b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/prisma/types.ts": "7b2a668263dec4f68d7c6e0cd42e6708f1f70de77945891e4e7513bcb934abe8", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/python.ts": "f71dd91f1f6625243c331e863bdfb05d9881216f8337555961c7cc1a8fdb303d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/random.ts": "8ebb64cf887f69f1c573a386029e3368c224027ec2e3e4414ba5099f67019273", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/s3.ts": "d4bff2d98429d0226e1021163bf2097de3ddfc852b64be860e7bf917ad7494a8", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/substantial.ts": "86814908c4de67a43b676037a32a0f04c5c50fee63a62133df21f38a40c43dc6", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/substantial/agent.ts": "95623259dc8bad05f5bfa0f67d8ecb02908c79586bc5755191414a73ee29b3e3", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/substantial/types.ts": "66413dbb2234360db6eb8a78710ce9804290b2a19c1b34453b4850a135a33385", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "80ae31f21dca98af38a34cdd471d639938126bcf41e1aa395a163ca9a309a466", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/temporal.ts": "5e0bd1009a40b467c381707d3cb553dff43729f131956f3721f96e037997d19a", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/typegate.ts": "0ee368db6bc8bd3a439e36b35f753ecf6d818c3e2a3cb02c39fd20508f92baef", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/typegraph.ts": "c627209ee947e9067dd580f55759354c942ca1998877b00b6149cbbea5b2f0b7", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "466bb67f86b1c5af52f2f1a4eb02fff6f731f066e3bcd264c1c4152d0f055b5d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "c103dbe9967054132f9e1a347a3b9b6981b9bab59979ca5b7e38e8dd556959e7", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/utils/http.ts": "6ef74393421256e4f9945878bed7762af406a12866041f9286e06b2afdef4338", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/wasm_reflected.ts": "588aebf664d4179df3818d6521e3936d248b751637707be3a85ef24f5446531b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/wasm_wire.ts": "99f5de736cf2492619333d2c465308716f42f8fd493c825514ba5e25be35c48a", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/runtimes/wit_wire/mod.ts": "3b6609d452b07d0485f68ecdd96088b833ceeea6ee5ee1512b4e48f88150dfdc", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/artifact_service.ts": "ed90cb99770289c3afb5ceaaab98f56be69d1259e6e6761fd6f1f29c6561f0ea", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/cookies.ts": "194c6c17e915692ba7fceda17109c1da8f426fde3e56d6dfd15a8d077d5bf789", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/mod.ts": "e6401d8b8a9a968f8feaefd618d55fbc7eaea9a16dafe0b70af50af313d86937", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/protocols/basic.ts": "99293b05820becf203822988020568e0cb8e304a477d4a85d887a6e570cb2ea6", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/protocols/internal.ts": "4b31e4780a18a281d27f69062efddf022799a1d4b3b852419f2a78df9f4c3332", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/protocols/jwt.ts": "5792f292d73730b823cd1da3133435dd23f6e1d8a88977c12298f017c5be957c", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/protocols/oauth2.ts": "d7d24eea260c318bdf48d1b31090dd8b4aa54e5320b9bc2140f7eb7f8e19a601", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/protocols/protocol.ts": "61ca77720004360879a6e3e890ef23eca5a97b85a2dd3d8a2f2fc4521c958be3", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/routes/mod.ts": "31d27a1a8edc99db7d5bbb68400821e73447f04b8106ff28f2a633f47ffd8221", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/routes/take.ts": "b6293899b75cc6c110a61fce7a0b49c2608779a01b0f735e5cfe8febe428edc6", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/auth/routes/validate.ts": "0d36f950262b608978aef8caef62900077fce352a0b33da37abd07a1482acef6", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/graphql_service.ts": "2a0bfe4e49b78412cccf2926ba9713871438cbf285df12b6e26979e9f3668dd1", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/info_service.ts": "0c5cb5a9926644b00d8129121655b6654a884f4ab3bb2a56a1b5e33c2fadafe3", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/middlewares.ts": "c996a25dffa58efc8f50e4a8f3f9df14d93b32b2bb6269c95ad0bec3cc05de94", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/playground_service.ts": "570cd407c5000bd93ddbd0a898ca5f50bb8d5f26d67684d1c592ab2c260ffce0", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/responses.ts": "b3e7f74d02e51a719968a417202c4a307b4c4dc73a73ed93ffbb76d73eef683c", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/services/rest_service.ts": "88c0a9b409beeb936ab3fc84a90ada122f38074975644036baa69dd2cf354290", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/sync/replicated_map.ts": "1191c444af253e9afd1b5d99bb203600b318bfa42efe1bfa87f1f5a58147f117", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/sync/typegraph.ts": "69fa06eae9f4676c4e8818fdb29056f4775a5d1ce04e8662a011cb777735e44b", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/system_typegraphs.ts": "55a85dd3b14cac7989c5466b366f64c89ec56e4f4c48445b21983d7357889e1d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/graphql/gq.ts": "7150dc876b8d2c423acf6571e4f82cb28b1d84472edbf7aec8f2db3d35099730", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/graphql/graphql.ts": "db28dbff035dc4da27cbbc93596d31b9ae4c4647d8dd1ef8dd8466124dddf819", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/graphql/request_parser.ts": "f808f194897a70be6f9b4125fad793b4ac6840558cae583f757fbe9c1db5cee5", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/graphql/typegraph.ts": "f338320cca137a328aa680ecd8b7ca8e3f2bef18eeea911e1a71a53a247d2d89", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/graphql/utils.ts": "52f41e4acc8c8e1f7438ff421562909fabfa84eee509e5fa7d3d446d631711c8", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/transports/rest/rest_schema_generator.ts": "6143277aa83e620bc1b89f5cc57952c2ed4559d4926b30afd8a7c213865cc142", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/artifacts/local.ts": "67899cac544f6c451420da2e66a7f761e51930ed524be67427409188e62097e0", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/artifacts/mod.ts": "19f8c0972b4d4832d438c6fc6dfcd485c4b3c9bb1a83d3e8a51900795cdcb5f4", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/artifacts/shared.ts": "e4881b2bdd38b1f06ffeaaac6936e963c3802c2113bb97beaf574cb4ab5ef5cc", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/hooks.ts": "fd1d74f6d3a964374e4cd5cc466690f428dbcbd8960f7edff58556698a00f34e", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/memory_register.ts": "6dc0d05a471f4574b969e20ab04b21fb9aa99c8e30cbd0fe043bd8d984cee724", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/mod.ts": "628e2b460b7c309db40aa7fbc656ce36186e9713fa6e4f9c90e91b97134f3094", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/no_limiter.ts": "820f766f78cb9546c916a6db2e1713cb9288ca17b2ab590f05e2f7748d1321af", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/rate_limiter.ts": "83b4d1197acb83065481489ef3cac1a6bf0fc9aa819fc2330c5dd177f4c79302", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegate/register.ts": "864d668ae3704984077d57c05a425cd5c74ba79bb6a42a54ef0112e1560fc543", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/mod.ts": "527f6355683a64a72da041351bce46c97650c588768b51ffd1cd08f01381fa21", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/type_node.ts": "2122369b68351e336bae60a18006b1329c95a0e82b4e25795ba3e419df493d15", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/types.ts": "122af777d054b9b5e6c827fe969762888e4a6634616cd8974713fefbc7ced596", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/utils.ts": "ce1a9ac71b86ccbae4334cef66e3424395349b6517bb0fdae31f3032607ac444", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/versions.ts": "89787a9cd05f5a630831c6b05ee17d868537aa95dbd0cdf5808030e3149c272d", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraph/visitor.ts": "d3df39cb77be23f6ea6e754db43d9b9b78dcf71fa8ed4a570c69e7102495af99", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/types.ts": "c00d562e809aa2c773925f69467d42bf5b4146146d1a5e90d8704d0e1d56cfee", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/utils.ts": "37d7289fdfa897317947489c0e58ca4af919c582cec19394f3b49d377e1e3b76", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/utils/hash.ts": "1b0fc152d2b51c1acf542ba49ec383efea5236acb9d52526b7f6568fadb43dfb", + "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/worker_utils.ts": "0b7e9252a0c6449299a4f604b9a5e6eb3f33ae842d3ac7f169627ccbfb285f1a" }, "workspace": { "members": { From 323571a7239ea70879ce764c8166c4271a47b7c6 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Sat, 16 Nov 2024 19:14:44 +0300 Subject: [PATCH 31/39] fix: some fixes & cleanup --- .ghjk/lock.json | 27 +- deno.lock | 2 + src/meta-cli/src/cli/deploy.rs | 18 +- src/meta-cli/src/deploy/actors/task/deploy.rs | 9 +- src/typegraph/core/src/global_store.rs | 3 - src/typegraph/core/wit/typegraph.wit | 675 ------------------ src/typegraph/specs/codegen/deno.jsonc | 6 +- .../specs/codegen/tests/typescript.test.ts | 4 +- .../how-tos/prog_deploy/prog_deploy_test.ts | 2 +- tests/e2e/cli/deploy_test.ts | 11 +- tests/e2e/self_deploy/self_deploy_test.ts | 2 +- tests/metagen/metagen_test.ts | 489 ++++++------- tests/multi_typegraph/multi_typegraph.ts | 53 +- tests/runtimes/deno/deno_sync_test.ts | 8 +- tests/runtimes/python/python_sync_test.ts | 6 +- tests/runtimes/wasm_reflected/rust/Cargo.lock | 2 +- .../runtimes/wasm_reflected/wasm_sync_test.ts | 1 + tests/runtimes/wasm_wire/rust/fdk.rs | 2 +- tests/typename/typename_test.ts | 21 +- tests/utils/test.ts | 20 +- tests/utils/tg_deploy_script.py | 81 --- tests/utils/tg_deploy_script.ts | 62 -- tools/tasks/test.ts | 9 +- 23 files changed, 363 insertions(+), 1150 deletions(-) delete mode 100644 src/typegraph/core/wit/typegraph.wit delete mode 100644 tests/utils/tg_deploy_script.py delete mode 100644 tests/utils/tg_deploy_script.ts diff --git a/.ghjk/lock.json b/.ghjk/lock.json index f3f97549e5..0aaa14d110 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -973,6 +973,12 @@ "desc": "Print $METATYPE_VERSION", "envKey": "bciqkxvhlk6wifuxken6emvhj2cki7tw5ygccar6qq4vbartg776akqa" }, + "test-codegen": { + "ty": "denoFile@v1", + "key": "test-codegen", + "workingDir": "./src/typegraph/specs/codegen", + "envKey": "bciqbjavwy7rbire3zwlpgo2ifwzgnm6ywxqswnh6qxezwuvc4bqhrca" + }, "test-rust": { "ty": "denoFile@v1", "key": "test-rust", @@ -1070,37 +1076,37 @@ "ty": "denoFile@v1", "key": "dev-gate6", "desc": "Launch the typegate from a locally found meta bin.", - "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" + "envKey": "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq" }, "dev-gate5": { "ty": "denoFile@v1", "key": "dev-gate5", "desc": "Launch the typegate from the latests published image.", - "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" + "envKey": "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq" }, "dev-gate4": { "ty": "denoFile@v1", "key": "dev-gate4", "desc": "Launch the typegate from the locally built typegate image.", - "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" + "envKey": "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq" }, "dev-gate3": { "ty": "denoFile@v1", "key": "dev-gate3", "desc": "Launch the typegate from meta-cli cmd.", - "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" + "envKey": "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq" }, "dev-gate2": { "ty": "denoFile@v1", "key": "dev-gate2", "desc": "Launch the typegate in sync mode.", - "envKey": "bciqgfe63ayh7e7kzg4f47bmaleew7jcdukchs3cg45tvdiwoxotxzfy" + "envKey": "bciqe4fan2davv7bngzw6aygwwbrd7vjviea4rylpwikafl4kqyaxyuq" }, "dev-gate1": { "ty": "denoFile@v1", "key": "dev-gate1", "desc": "Launch the typegate in single-instance mode.", - "envKey": "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy" + "envKey": "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq" }, "dev-eg-tgraphs": { "ty": "denoFile@v1", @@ -1175,6 +1181,7 @@ "clean-rust", "version-bump", "version-print", + "test-codegen", "test-rust", "test-website", "test-e2e", @@ -1551,7 +1558,7 @@ } ] }, - "bciqcljozrbuwh7aum6v6soif6qr2nvpwr7gbyxrmob3ybh4bsxpqfyy": { + "bciqk7rioqxzcpzf572poq2vwefpcmqnboofojgkgonvpih3q6wwyldq": { "provides": [ { "ty": "posix.envVar", @@ -1586,7 +1593,7 @@ { "ty": "posix.envVar", "key": "LOG_LEVEL", - "val": "DEBUG" + "val": "DEBUG,substantial=ERROR" }, { "ty": "posix.envVar", @@ -1619,7 +1626,7 @@ } ] }, - "bciqgfe63ayh7e7kzg4f47bmaleew7jcdukchs3cg45tvdiwoxotxzfy": { + "bciqe4fan2davv7bngzw6aygwwbrd7vjviea4rylpwikafl4kqyaxyuq": { "provides": [ { "ty": "posix.envVar", @@ -1654,7 +1661,7 @@ { "ty": "posix.envVar", "key": "LOG_LEVEL", - "val": "DEBUG" + "val": "DEBUG,substantial=ERROR" }, { "ty": "posix.envVar", diff --git a/deno.lock b/deno.lock index e7f7435dab..89a3a6b3be 100644 --- a/deno.lock +++ b/deno.lock @@ -5,6 +5,7 @@ "jsr:@david/dax@0.41.0": "jsr:@david/dax@0.41.0", "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", "jsr:@std/archive@^0.225.0": "jsr:@std/archive@0.225.4", + "jsr:@std/assert": "jsr:@std/assert@1.0.6", "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", "jsr:@std/assert@^1.0.6": "jsr:@std/assert@1.0.6", "jsr:@std/async@^1.0.3": "jsr:@std/async@1.0.7", @@ -30,6 +31,7 @@ "jsr:@std/io@^0.224.9": "jsr:@std/io@0.224.9", "jsr:@std/io@^0.225.0": "jsr:@std/io@0.225.0", "jsr:@std/log@^0.224.5": "jsr:@std/log@0.224.9", + "jsr:@std/path": "jsr:@std/path@1.0.6", "jsr:@std/path@0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.6", diff --git a/src/meta-cli/src/cli/deploy.rs b/src/meta-cli/src/cli/deploy.rs index 89dcacbb21..2b18098f05 100644 --- a/src/meta-cli/src/cli/deploy.rs +++ b/src/meta-cli/src/cli/deploy.rs @@ -197,6 +197,7 @@ mod default_mode { use std::time::Duration; + use actors::task::deploy::MigrationAction; use task_manager::{TaskManagerInit, TaskSource}; use crate::config::PathOption; @@ -209,6 +210,11 @@ mod default_mode { let mut secrets = deploy.secrets.clone(); secrets.apply_overrides(&deploy.options.secrets)?; + let default_migration_action = MigrationAction { + apply: !deploy.options.no_migration, + create: deploy.options.create_migration, + reset: deploy.options.allow_destructive, + }; let action_generator = DeployActionGenerator::new( deploy.node.into(), secrets.into(), @@ -218,8 +224,7 @@ mod default_mode { .config .prisma_migrations_base_dir(PathOption::Absolute) .into(), - deploy.options.create_migration, - deploy.options.allow_destructive, + default_migration_action, ); let init = TaskManagerInit::::new( @@ -273,6 +278,7 @@ mod default_mode { mod watch_mode { use std::time::Duration; + use actors::task::deploy::MigrationAction; use task_manager::{TaskManagerInit, TaskSource}; use crate::config::PathOption; @@ -317,6 +323,11 @@ mod watch_mode { deploy_node }; + let default_migration_action = MigrationAction { + apply: !deploy.options.no_migration, + create: deploy.options.create_migration, + reset: deploy.options.allow_destructive, + }; let action_generator = DeployActionGenerator::new( deploy_node.into(), secrets.into(), @@ -326,8 +337,7 @@ mod watch_mode { .config .prisma_migrations_base_dir(PathOption::Absolute) .into(), - deploy.options.create_migration, - deploy.options.allow_destructive, + default_migration_action, ); let init = TaskManagerInit::::new( diff --git a/src/meta-cli/src/deploy/actors/task/deploy.rs b/src/meta-cli/src/deploy/actors/task/deploy.rs index 69695f93d0..40145d6fe9 100644 --- a/src/meta-cli/src/deploy/actors/task/deploy.rs +++ b/src/meta-cli/src/deploy/actors/task/deploy.rs @@ -58,8 +58,7 @@ impl DeployActionGenerator { config_dir: Arc, working_dir: Arc, migrations_dir: Arc, - create_migrations: bool, - destructive_migrations: bool, // TODO enum { Fail, Reset, Ask } + default_migration_action: MigrationAction, ) -> Self { Self { secrets, @@ -69,11 +68,7 @@ impl DeployActionGenerator { config_dir, working_dir, migrations_dir, - default_migration_action: MigrationAction { - apply: true, - create: create_migrations, - reset: destructive_migrations, - }, + default_migration_action, artifact_resolution: true, } .into(), diff --git a/src/typegraph/core/src/global_store.rs b/src/typegraph/core/src/global_store.rs index 6a6e5c1a2a..f7ea70ad8e 100644 --- a/src/typegraph/core/src/global_store.rs +++ b/src/typegraph/core/src/global_store.rs @@ -142,9 +142,6 @@ impl Store { s.materializers.truncate(saved_state.materializers); s.policies.truncate(saved_state.policies); s.deno_modules.truncate(saved_state.deno_modules); - s.graphql_endpoints.clear(); - s.auths.clear(); - s.random_seed.take(); }) } diff --git a/src/typegraph/core/wit/typegraph.wit b/src/typegraph/core/wit/typegraph.wit deleted file mode 100644 index 763ce9b2fe..0000000000 --- a/src/typegraph/core/wit/typegraph.wit +++ /dev/null @@ -1,675 +0,0 @@ -package metatype:typegraph; - - -interface core { - record error { - stack: list, - } - - // typegraph description - record cors { - allow-origin: list, - allow-headers: list, - expose-headers: list, - allow-methods: list, - allow-credentials: bool, - max-age-sec: option - } - - record rate { - window-limit: u32, - window-sec: u32, - query-limit: u32, - context-identifier: option, - local-excess: u32, - } - - record typegraph-init-params { - name: string, - dynamic: option, - path: string, - // TypeMeta - prefix: option, - cors: cors, - rate: option, - } - - record artifact { - path: string, - hash: string, - size: u32, - } - - init-typegraph: func(params: typegraph-init-params) -> result<_, error>; - - record migration-action { - apply: bool, - create: bool, - reset: bool, - } - - record prisma-migration-config { - // Path towards the migrations for the specific typegraph. - migrations-dir: string, - migration-actions: list>, - default-migration-action: migration-action, - } - - record serialize-params { - typegraph-path: string, - prefix: option, - artifact-resolution: bool, - codegen: bool, - prisma-migration: prisma-migration-config, - pretty: bool, - } - - serialize-typegraph: func(params: serialize-params) -> result>, error>; - - type type-id = u32; - - with-injection: func(type-id: type-id, injection: string) -> result; - - with-config: func(type-id: type-id, config: string) -> result; - - record type-proxy { - name: string, - extras: list>, - } - refb: func(name: string, attributes: option) -> result; - - record type-integer { - min: option, - max: option, - exclusive-minimum: option, - exclusive-maximum: option, - multiple-of: option, - enumeration: option> - } - integerb: func(data: type-integer) -> result; - - record type-float { - min: option, - max: option, - exclusive-minimum: option, - exclusive-maximum: option, - multiple-of: option, - enumeration: option> - } - floatb: func(data: type-float) -> result; - - booleanb: func() -> result; - - record type-string { - min: option, - max: option, - format: option, - pattern: option, - enumeration: option> - } - stringb: func(data: type-string) -> result; - - as-id: func(id: type-id, composite: bool) -> result; - - record type-file { - min: option, - max: option, - allow: option>, - } - fileb: func(data: type-file) -> result; - - - record type-list { - of: type-id, - min: option, - max: option, - unique-items: option - } - listb: func(data: type-list) -> result; - - record type-optional { - of: type-id, - default-item: option - } - optionalb: func(data: type-optional) -> result; - - record type-union { - variants: list, - } - unionb: func(data: type-union) -> result; - - record type-either { - variants: list, - } - eitherb: func(data: type-either) -> result; - - record type-struct { - props: list>, - additional-props: bool, - min: option, - max: option, - enumeration: option>, - } - structb: func(data: type-struct) -> result; - extend-struct: func(tpe: type-id, props: list>) -> result; - - get-type-repr: func(id: type-id) -> result; - - variant value-source { - raw(string), // json - context(string), // key - secret(string), // key - parent(string), // name - param(string), // name - } - - record parameter-transform { - resolver-input: type-id, - transform-tree: string, - } - - record type-func { - inp: type-id, - parameter-transform: option, - out: type-id, - mat: materializer-id, - rate-calls: bool, - rate-weight: option, - } - - funcb: func(data: type-func) -> result; - - record transform-data { - query-input: type-id, - parameter-transform: parameter-transform, - } - - get-transform-data: func(resolver-input: type-id, transform-tree: string) -> result; - - type policy-id = u32; - - record policy { - name: string, - materializer: materializer-id, - } - - record policy-per-effect { - read: option, - create: option, - update: option, - delete: option, - } - - variant policy-spec { - simple(policy-id), - per-effect(policy-per-effect), - } - - register-policy: func(pol: policy) -> result; - - with-policy: func(type-id: type-id, policy-chain: list) -> result; - - // policy-id, policy-name - get-public-policy: func() -> result, error>; - get-internal-policy: func() -> result, error>; - - variant context-check { - not-null, - value(string), - pattern(string), - } - register-context-policy: func(key: string, check: context-check) -> result, error>; - - rename-type: func(tpe: type-id, new-name: string) -> result; - - expose: func(fns: list>, default-policy: option>) -> result<_, error>; - - set-seed: func(seed: option) -> result<_, error>; - - type runtime-id = u32; - type materializer-id = u32; - - record func-params { - inp: type-id, - out: type-id, - mat: materializer-id, - } -} - -interface runtimes { - use core.{error, type-id, func-params, runtime-id, materializer-id, artifact}; - - get-deno-runtime: func() -> runtime-id; - - type idempotency = bool; - - variant effect { - read, - create(idempotency), - update(idempotency), - delete(idempotency), - } - - record base-materializer { - runtime: runtime-id, - effect: effect, - } - - - // deno - record materializer-deno-func { - code: string, - secrets: list, - } - - record materializer-deno-static { - value: string, - } - - record materializer-deno-predefined { - name: string, - } - - record materializer-deno-import { - func-name: string, - module: string, - deps: list, - secrets: list, - } - - register-deno-func: func(data: materializer-deno-func, effect: effect) -> result; - register-deno-static: func(data: materializer-deno-static, type-id: type-id) -> result; - - get-predefined-deno-func: func(data: materializer-deno-predefined) -> result; - import-deno-function: func(data: materializer-deno-import, effect: effect) -> result; - - - // graphql - record graphql-runtime-data { - endpoint: string, - } - - record materializer-graphql-query { - path: option>, - } - - register-graphql-runtime: func(data: graphql-runtime-data) -> result; - graphql-query: func(base: base-materializer, data: materializer-graphql-query) -> result; - graphql-mutation: func(base: base-materializer, data: materializer-graphql-query) -> result; - - record http-runtime-data { - endpoint: string, - cert-secret: option, - basic-auth-secret: option, - } - - enum http-method { - get, - post, - put, - patch, - delete, - } - - record materializer-http-request { - method: http-method, - path: string, - content-type: option, - header-prefix: option, - query-fields: option>, - rename-fields: option>>, - body-fields: option>, - auth-token-field: option, - } - - register-http-runtime: func(data: http-runtime-data) -> result; - http-request: func(base: base-materializer, data: materializer-http-request) -> result; - - // python - record materializer-python-def { - runtime: runtime-id, - name: string, - fn: string, - } - - record materializer-python-lambda { - runtime: runtime-id, - fn: string, - } - - record materializer-python-module { - runtime: runtime-id, - file: string, - deps: list, - } - - record materializer-python-import { - module: u32, - func-name: string, - secrets: list - } - - // TODO: host:port - - register-python-runtime: func() -> result; - from-python-lambda: func(base: base-materializer, data: materializer-python-lambda) -> result; - from-python-def: func(base: base-materializer, data: materializer-python-def) -> result; - from-python-module: func(base: base-materializer, data: materializer-python-module) -> result; - from-python-import: func(base: base-materializer, data: materializer-python-import) -> result; - - // random - record random-runtime-data { - seed: option, - reset: option, - } - - record materializer-random { - runtime: runtime-id, - } - - register-random-runtime: func(data: random-runtime-data) -> result; - create-random-mat: func(base: base-materializer, data: materializer-random) -> result; - - // wasm - - record wasm-runtime-data { - wasm-artifact: string, - } - - record materializer-wasm-reflected-func { - func-name: string, - } - - register-wasm-reflected-runtime: func(data: wasm-runtime-data) -> result; - from-wasm-reflected-func: func(base: base-materializer, data: materializer-wasm-reflected-func) -> result; - - record materializer-wasm-wire-handler { - func-name: string, - } - - register-wasm-wire-runtime: func(data: wasm-runtime-data) -> result; - from-wasm-wire-handler: func(base: base-materializer, data: materializer-wasm-wire-handler) -> result; - - // prisma - record prisma-runtime-data { - name: string, - connection-string-secret: string, - } - - record prisma-link-data { - target-type: type-id, - relationship-name: option, - foreign-key: option, - target-field: option, - unique: option, - } - - register-prisma-runtime: func(data: prisma-runtime-data) -> result; - prisma-find-unique: func(runtime: runtime-id, model: type-id) -> result; - prisma-find-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-find-first: func(runtime: runtime-id, model: type-id) -> result; - prisma-aggregate: func(runtime: runtime-id, model: type-id) -> result; - prisma-group-by: func(runtime: runtime-id, model: type-id) -> result; - prisma-create-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-create-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-update-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-update-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-upsert-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-delete-one: func(runtime: runtime-id, model: type-id) -> result; - prisma-delete-many: func(runtime: runtime-id, model: type-id) -> result; - prisma-execute: func(runtime: runtime-id, query: string, param: type-id, effect: effect) -> result; - prisma-query-raw: func(runtime: runtime-id, query: string, param: option, out: type-id) -> result; - prisma-link: func(data: prisma-link-data) -> result; - - - // prisma-migrate - enum prisma-migration-operation { - diff, - create, - apply, - deploy, - reset, - } - prisma-migration: func(operation: prisma-migration-operation) -> result; - - // temporal - record temporal-runtime-data { - name: string, - host-secret: string, - namespace-secret: option, - } - - variant temporal-operation-type { - start-workflow, - signal-workflow, - query-workflow, - describe-workflow - } - - record temporal-operation-data { - mat-arg: option, - func-arg: option, - func-out: option, - operation: temporal-operation-type, - } - - register-temporal-runtime: func(data: temporal-runtime-data) -> result; - generate-temporal-operation: func(runtime: runtime-id, data: temporal-operation-data) -> result; - - // typegate - enum typegate-operation { - list-typegraphs, - find-typegraph, - add-typegraph, - remove-typegraphs, - get-serialized-typegraph, - get-arg-info-by-path, - find-available-operations, - find-prisma-models, - raw-prisma-read, - raw-prisma-create, - raw-prisma-update, - raw-prisma-delete, - query-prisma-model, - } - - register-typegate-materializer: func(operation: typegate-operation) -> result; - - // typegraph (introspection) - enum typegraph-operation { - resolver, - get-type, - get-schema, - } - - register-typegraph-materializer: func(operation: typegraph-operation) -> result; - - // substantial - record redis-backend { - connection-string-secret: string, - } - - variant substantial-backend { - memory, - fs, - redis(redis-backend) - } - - - enum workflow-kind { - python, - deno - } - - record workflow-file-description { - workflows: list, - file: string, - deps: list, - kind: workflow-kind - } - - record substantial-runtime-data { - backend: substantial-backend, - file-descriptions: list - } - - record substantial-start-data { - func-arg: option, - secrets: list, - } - - variant substantial-operation-data { - start(substantial-start-data), - start-raw(substantial-start-data), - stop, - // type of send value - send(type-id), - send-raw, - resources, - // type of result - results(type-id), - results-raw, - internal-link-parent-child - } - - register-substantial-runtime: func(data: substantial-runtime-data) -> result; - generate-substantial-operation: func(runtime: runtime-id, data: substantial-operation-data) -> result; - - // kv - record kv-runtime-data { - url: string - } - - register-kv-runtime: func(data: kv-runtime-data) -> result; - - enum kv-materializer { - get, - set, - delete, - keys, - values, - } - - kv-operation: func(base: base-materializer, data: kv-materializer) -> result; - - // Grpc - record grpc-runtime-data { - proto-file: string, - endpoint: string, - } - - register-grpc-runtime: func(data: grpc-runtime-data) -> result; - - record grpc-data { - method: string, - } - - call-grpc-method: func(runtime: runtime-id, data: grpc-data) -> result; -} - -interface aws { - use core.{error, runtime-id, materializer-id}; - - record s3-runtime-data { - host-secret: string, - region-secret: string, - access-key-secret: string, - secret-key-secret: string, - path-style-secret: string, - } - - record s3-presign-get-params { - bucket: string, - expiry-secs: option, - } - - record s3-presign-put-params { - bucket: string, - expiry-secs: option, - content-type: option, - } - - register-s3-runtime: func(data: s3-runtime-data) -> result; - s3-presign-get: func(runtime: runtime-id, data: s3-presign-get-params) -> result; - s3-presign-put: func(runtime: runtime-id, data: s3-presign-put-params) -> result; - s3-list: func(runtime: runtime-id, bucket: string) -> result; - s3-upload: func(runtime: runtime-id, bucket: string) -> result; - s3-upload-all: func(runtime: runtime-id, bucket: string) -> result; -} - - -interface utils { - use core.{error}; - type type-id = u32; - - record reduce-entry { - path: list, - injection-data: string, - } - reduceb: func(fn-type-id: type-id, entries: list) -> result; - - add-graphql-endpoint: func(graphql: string) -> result; - - variant auth-protocol { - oauth2, - jwt, - basic, - } - - record auth { - name: string, - protocol: auth-protocol, - // string => json string - auth-data: list>, - } - - add-auth: func(data: auth) -> result; - add-raw-auth: func(data: string) -> result; - oauth2: func(service-name: string, scopes: string) -> result; - oauth2-without-profiler: func(service-name: string, scopes: string) -> result; - oauth2-with-extended-profiler: func(service-name: string, scopes: string, extension: string) -> result; - oauth2-with-custom-profiler: func(service-name: string, scopes: string, profiler: type-id) -> result; - - record query-deploy-params { - tg: string, - secrets: option>>, - } - - gql-deploy-query: func(params: query-deploy-params) -> result; - gql-remove-query: func(tg-name: list) -> result; - - record fdk-config { - workspace-path: string, - target-name: string, - config-json: string, - tg-json: string, - } - - record fdk-output { - path: string, - content: string, - overwrite: bool, - } - - metagen-exec: func(config: fdk-config) -> result, error>; - metagen-write-files: func(items: list, typegraph-dir: string) -> result<_, error>; -} - -interface host { - print: func(s: string); - eprint: func(s: string); - expand-path: func(root: string, exclude: list) -> result, string>; - path-exists: func(path: string) -> result; - read-file: func(path: string) -> result, string>; - write-file: func(path: string, data: list) -> result<_, string>; - get-cwd: func() -> result; -} - - -world typegraph { - export core; - export runtimes; - export utils; - export aws; - import host; -} diff --git a/src/typegraph/specs/codegen/deno.jsonc b/src/typegraph/specs/codegen/deno.jsonc index 07b0c2cc5d..ca00d40464 100644 --- a/src/typegraph/specs/codegen/deno.jsonc +++ b/src/typegraph/specs/codegen/deno.jsonc @@ -1,6 +1,6 @@ { "tasks": { - "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/scripts/main.ts", - "test": "deno test --allow-env --allow-read --allow-ffi --allow-run", - }, + "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/cmd/main.ts", + "test": "deno test --allow-env --allow-read --allow-ffi --allow-run" + } } diff --git a/src/typegraph/specs/codegen/tests/typescript.test.ts b/src/typegraph/specs/codegen/tests/typescript.test.ts index 99365a75d1..26f97dbdb6 100644 --- a/src/typegraph/specs/codegen/tests/typescript.test.ts +++ b/src/typegraph/specs/codegen/tests/typescript.test.ts @@ -22,7 +22,7 @@ Deno.test("TypeScript struct codegen", () => { const expected = `export type RecordLike = { num: number key: string - str_arr: string[] + strArr: string[] tup: [number, number] opt?: boolean comp?: [number, Something][] @@ -40,7 +40,7 @@ Deno.test("TypeScript union codegen", () => { const expected = `export type EnumLike = | "simple" | { composite: Something } - | { snake_case: boolean };`; + | { snakeCase: boolean };`; assertEquals(result, expected); }); diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts index eaed14a466..1a2505d9ad 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts @@ -11,7 +11,7 @@ Meta.test( name: "Programmatic deployment test - Python SDK", }, async (t: MetaTest) => { - throw new Error("Unimplemented"); + // FIXME: Uncomment after implementing mode B (MET-754) //const port = t.port; //const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); // diff --git a/tests/e2e/cli/deploy_test.ts b/tests/e2e/cli/deploy_test.ts index 25325bfcef..a5f65d5f15 100644 --- a/tests/e2e/cli/deploy_test.ts +++ b/tests/e2e/cli/deploy_test.ts @@ -3,6 +3,7 @@ import { gql, Meta } from "../../utils/mod.ts"; import { TestModule } from "../../utils/test_module.ts"; +import * as path from "@std/path"; import { assertRejects, assertStringIncludes } from "@std/assert"; import { dropSchema, randomPGConnStr, reset } from "test-utils/database.ts"; @@ -212,10 +213,12 @@ Meta.test( const port = t.port!; const { connStr, schema } = randomPGConnStr(); await dropSchema(schema); - const e = await t.engine("prisma.py", { + const tgPath = path.join(t.workingDir, "prisma.py"); + const e = await t.engine(tgPath, { secrets: { POSTGRES: connStr, }, + createMigration: false, }); const nodeConfigs = [ @@ -242,7 +245,7 @@ Meta.test( await t.should("fail on dirty repo", async () => { await t.shell(["bash", "-c", "touch README.md"]); await assertRejects(() => - t.meta(["deploy", ...nodeConfigs, "-f", "prisma.py"]) + t.meta(["deploy", ...nodeConfigs, "-f", "prisma.py"]), ); }); @@ -310,11 +313,13 @@ Meta.test( async (t) => { const { connStr, schema } = randomPGConnStr(); await dropSchema(schema); - const e = await t.engine("prisma.py", { + const tgPath = path.join(t.workingDir, "prisma.py"); + const e = await t.engine(tgPath, { secrets: { POSTGRES: connStr, }, prefix: "pref-", + createMigration: false, }); const nodeConfigs = [ diff --git a/tests/e2e/self_deploy/self_deploy_test.ts b/tests/e2e/self_deploy/self_deploy_test.ts index 10d21a5f64..fe216736a9 100644 --- a/tests/e2e/self_deploy/self_deploy_test.ts +++ b/tests/e2e/self_deploy/self_deploy_test.ts @@ -14,7 +14,7 @@ Meta.test( name: "deploy and undeploy typegraph without meta-cli", }, async (t) => { - throw new Error("Unimplemented"); + // FIXME: Uncomment after implementing mode B (MET-754) //const gate = `http://localhost:${t.port}`; //const auth = new BasicAuth("admin", "password"); //const cwdDir = join(testDir, "e2e", "self_deploy"); diff --git a/tests/metagen/metagen_test.ts b/tests/metagen/metagen_test.ts index 23eb5af7e2..e80339d5c4 100644 --- a/tests/metagen/metagen_test.ts +++ b/tests/metagen/metagen_test.ts @@ -102,154 +102,157 @@ metagen: ); }); -Meta.test("Metagen within sdk", async (t) => { - const workspace = "./workspace"; - const targetName = "my_target"; - const genConfig = { - targets: { - my_target: [ - { - generator: "fdk_rust", - typegraph: "example-metagen", - path: "some/base/path/rust", - stubbed_runtimes: ["python"], - }, - { - generator: "fdk_python", - typegraph: "example-metagen", - path: "some/base/path/python", - }, - { - generator: "fdk_typescript", - typegraph: "example-metagen", - path: "some/base/path/ts", - stubbed_runtimes: ["python"], - }, - { - generator: "fdk_substantial", - typegraph: "example-metagen", - path: "some/base/path/ts", - }, - ], - }, - }; - - const sdkResults = [] as Array; - - await t.should("Run metagen within typescript", async () => { - const { tg } = await import("./typegraphs/metagen.ts"); - const { Metagen } = await import("@typegraph/sdk/metagen.ts"); - const metagen = new Metagen(workspace, genConfig); - const generated = metagen.dryRun(tg, targetName); - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - }); - - await t.should("Run metagen within python", async () => { - const typegraphPath = join(import.meta.dirname!, "./typegraphs/metagen.py"); - const command = new Deno.Command("python3", { - args: [typegraphPath], - env: { - workspace_path: workspace, - gen_config: JSON.stringify(genConfig), - target_name: targetName, - }, - stderr: "piped", - stdout: "piped", - }); - - const child = command.spawn(); - const output = await child.output(); - if (output.success) { - const stdout = new TextDecoder().decode(output.stdout); - const generated = JSON.parse(stdout) as Array; - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - } else { - const err = new TextDecoder().decode(output.stderr); - throw new Error(`metagen python: ${err}`); - } - }); - - if (sdkResults.length > 0) { - await t.should("SDKs should produce same metagen output", () => { - const [fromTs, fromPy] = sdkResults; - assertEquals(fromTs, fromPy); - }); - } -}); - -Meta.test("Metagen within sdk with custom template", async (t) => { - const workspace = join(import.meta.dirname!, "typegraphs") - .slice(workspaceDir.length); - - const targetName = "my_target"; - const genConfig = { - targets: { - my_target: [ - { - generator: "fdk_python", - typegraph: "example-metagen", - path: "some/base/path/python", - template_dir: "./fdk_py_templates", - }, - ], - }, - }; - - const sdkResults = [] as Array; - - await t.should("Run metagen within typescript", async () => { - const { tg } = await import("./typegraphs/metagen.ts"); - const { Metagen } = await import("@typegraph/sdk/metagen.ts"); - const metagen = new Metagen(workspace, genConfig); - const generated = metagen.dryRun(tg, targetName); - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - }); - - await t.should("Run metagen within python", async () => { - const typegraphPath = join(import.meta.dirname!, "./typegraphs/metagen.py"); - const command = new Deno.Command("python3", { - args: [typegraphPath], - env: { - workspace_path: workspace, - gen_config: JSON.stringify(genConfig), - target_name: targetName, - }, - stderr: "piped", - stdout: "piped", - }); - - const child = command.spawn(); - const output = await child.output(); - if (output.success) { - const stdout = new TextDecoder().decode(output.stdout); - const generated = JSON.parse(stdout) as Array; - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - } else { - const err = new TextDecoder().decode(output.stderr); - throw new Error(`metagen python: ${err}`); - } - }); - - if (sdkResults.length > 0) { - await t.should("SDKs should produce same metagen output", () => { - const [fromTs, fromPy] = sdkResults; - assertEquals(fromTs, fromPy); - }); - } -}); +// FIXME: Uncomment after implementing mode B (MET-754) +//Meta.test("Metagen within sdk", async (t) => { +// const workspace = "./workspace"; +// const targetName = "my_target"; +// const genConfig = { +// targets: { +// my_target: [ +// { +// generator: "fdk_rust", +// typegraph: "example-metagen", +// path: "some/base/path/rust", +// stubbed_runtimes: ["python"], +// }, +// { +// generator: "fdk_python", +// typegraph: "example-metagen", +// path: "some/base/path/python", +// }, +// { +// generator: "fdk_typescript", +// typegraph: "example-metagen", +// path: "some/base/path/ts", +// stubbed_runtimes: ["python"], +// }, +// { +// generator: "fdk_substantial", +// typegraph: "example-metagen", +// path: "some/base/path/ts", +// }, +// ], +// }, +// }; +// +// const sdkResults = [] as Array; +// +// await t.should("Run metagen within typescript", async () => { +// const { tg } = await import("./typegraphs/metagen.ts"); +// const { Metagen } = await import("@typegraph/sdk/metagen.ts"); +// const metagen = new Metagen(workspace, genConfig); +// const generated = metagen.dryRun(tg, targetName); +// const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); +// await t.assertSnapshot(sorted); +// +// sdkResults.push(JSON.stringify(sorted, null, 2)); +// }); +// +// await t.should("Run metagen within python", async () => { +// const typegraphPath = join(import.meta.dirname!, "./typegraphs/metagen.py"); +// const command = new Deno.Command("python3", { +// args: [typegraphPath], +// env: { +// workspace_path: workspace, +// gen_config: JSON.stringify(genConfig), +// target_name: targetName, +// }, +// stderr: "piped", +// stdout: "piped", +// }); +// +// const child = command.spawn(); +// const output = await child.output(); +// if (output.success) { +// const stdout = new TextDecoder().decode(output.stdout); +// const generated = JSON.parse(stdout) as Array; +// const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); +// +// await t.assertSnapshot(sorted); +// +// sdkResults.push(JSON.stringify(sorted, null, 2)); +// } else { +// const err = new TextDecoder().decode(output.stderr); +// throw new Error(`metagen python: ${err}`); +// } +// }); +// +// if (sdkResults.length > 0) { +// await t.should("SDKs should produce same metagen output", () => { +// const [fromTs, fromPy] = sdkResults; +// assertEquals(fromTs, fromPy); +// }); +// } +//}); + +// FIXME: Uncomment after implementing mode B (MET-754) +//Meta.test("Metagen within sdk with custom template", async (t) => { +// const workspace = join(import.meta.dirname!, "typegraphs").slice( +// workspaceDir.length, +// ); +// +// const targetName = "my_target"; +// const genConfig = { +// targets: { +// my_target: [ +// { +// generator: "fdk_python", +// typegraph: "example-metagen", +// path: "some/base/path/python", +// template_dir: "./fdk_py_templates", +// }, +// ], +// }, +// }; +// +// const sdkResults = [] as Array; +// +// await t.should("Run metagen within typescript", async () => { +// const { tg } = await import("./typegraphs/metagen.ts"); +// const { Metagen } = await import("@typegraph/sdk/metagen.ts"); +// const metagen = new Metagen(workspace, genConfig); +// const generated = metagen.dryRun(tg, targetName); +// const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); +// await t.assertSnapshot(sorted); +// +// sdkResults.push(JSON.stringify(sorted, null, 2)); +// }); +// +// await t.should("Run metagen within python", async () => { +// const typegraphPath = join(import.meta.dirname!, "./typegraphs/metagen.py"); +// const command = new Deno.Command("python3", { +// args: [typegraphPath], +// env: { +// workspace_path: workspace, +// gen_config: JSON.stringify(genConfig), +// target_name: targetName, +// }, +// stderr: "piped", +// stdout: "piped", +// }); +// +// const child = command.spawn(); +// const output = await child.output(); +// if (output.success) { +// const stdout = new TextDecoder().decode(output.stdout); +// const generated = JSON.parse(stdout) as Array; +// const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); +// await t.assertSnapshot(sorted); +// +// sdkResults.push(JSON.stringify(sorted, null, 2)); +// } else { +// const err = new TextDecoder().decode(output.stderr); +// throw new Error(`metagen python: ${err}`); +// } +// }); +// +// if (sdkResults.length > 0) { +// await t.should("SDKs should produce same metagen output", () => { +// const [fromTs, fromPy] = sdkResults; +// assertEquals(fromTs, fromPy); +// }); +// } +//}); Meta.test("fdk table suite", async (metaTest) => { const scriptsPath = join(import.meta.dirname!, "typegraphs/identities"); @@ -514,104 +517,102 @@ Meta.test("fdk table suite", async (metaTest) => { } }); -Meta.test({ - name: "client table suite", -}, async (metaTest) => { - const scriptsPath = join(import.meta.dirname!, "typegraphs/sample"); +Meta.test( + { + name: "client table suite", + }, + async (metaTest) => { + const scriptsPath = join(import.meta.dirname!, "typegraphs/sample"); - assertEquals( - ( - await Meta.cli( - { - env: { - // RUST_BACKTRACE: "1", + assertEquals( + ( + await Meta.cli( + { + env: { + // RUST_BACKTRACE: "1", + }, }, - }, - ...`-C ${scriptsPath} gen`.split(" "), - ) - ).code, - 0, - ); + ...`-C ${scriptsPath} gen`.split(" "), + ) + ).code, + 0, + ); - const postSchema = zod.object({ - id: zod.string(), - slug: zod.string(), - title: zod.string(), - }); - const userSchema = zod.object({ - id: zod.string(), - email: zod.string(), - }); - const expectedSchemaQ = zod.object({ - user: userSchema.extend({ - post1: postSchema.array(), - post2: zod.object({ - // NOTE: no id - slug: zod.string(), - title: zod.string(), - }).array(), - }), - posts: postSchema, - scalarNoArgs: zod.string(), - }); - const expectedSchemaM = zod.object({ - scalarArgs: zod.string(), - compositeNoArgs: postSchema, - compositeArgs: postSchema, - }); - const expectedSchema = zod.tuple([ - expectedSchemaQ, - expectedSchemaQ, - expectedSchemaM, - expectedSchemaQ, - expectedSchemaM, - zod.object({ - scalarUnion: zod.string(), - compositeUnion1: postSchema, - compositeUnion2: zod.object({}), - mixedUnion: zod.string(), - }), - ]); - const cases = [ - { - skip: false, - name: "client_rs", - command: $`cargo run`.cwd( - join(scriptsPath, "rs"), - ), - expected: expectedSchema, - }, - { - name: "client_ts", - // NOTE: dax replaces commands to deno with - // commands to xtask so we go through bah - command: $`bash -c "deno run -A main.ts"`.cwd( - join(scriptsPath, "ts"), - ), - expected: expectedSchema, - }, - { - name: "client_py", - command: $`python3 main.py`.cwd( - join(scriptsPath, "py"), - ), - expected: expectedSchema, - }, - ]; + const postSchema = zod.object({ + id: zod.string(), + slug: zod.string(), + title: zod.string(), + }); + const userSchema = zod.object({ + id: zod.string(), + email: zod.string(), + }); + const expectedSchemaQ = zod.object({ + user: userSchema.extend({ + post1: postSchema.array(), + post2: zod + .object({ + // NOTE: no id + slug: zod.string(), + title: zod.string(), + }) + .array(), + }), + posts: postSchema, + scalarNoArgs: zod.string(), + }); + const expectedSchemaM = zod.object({ + scalarArgs: zod.string(), + compositeNoArgs: postSchema, + compositeArgs: postSchema, + }); + const expectedSchema = zod.tuple([ + expectedSchemaQ, + expectedSchemaQ, + expectedSchemaM, + expectedSchemaQ, + expectedSchemaM, + zod.object({ + scalarUnion: zod.string(), + compositeUnion1: postSchema, + compositeUnion2: zod.object({}), + mixedUnion: zod.string(), + }), + ]); + const cases = [ + { + skip: false, + name: "client_rs", + command: $`cargo run`.cwd(join(scriptsPath, "rs")), + expected: expectedSchema, + }, + { + name: "client_ts", + // NOTE: dax replaces commands to deno with + // commands to xtask so we go through bah + command: $`bash -c "deno run -A main.ts"`.cwd(join(scriptsPath, "ts")), + expected: expectedSchema, + }, + { + name: "client_py", + command: $`python3 main.py`.cwd(join(scriptsPath, "py")), + expected: expectedSchema, + }, + ]; - await using _engine = await metaTest.engine( - "metagen/typegraphs/sample.ts", - ); - for (const { name, command, expected, skip } of cases) { - if (skip) { - continue; + await using _engine = await metaTest.engine("metagen/typegraphs/sample.ts"); + for (const { name, command, expected, skip } of cases) { + if (skip) { + continue; + } + await metaTest.should(name, async () => { + // const res = await command + // .env({ "TG_PORT": metaTest.port.toString() }); + const res = await command + .env({ TG_PORT: metaTest.port.toString() }) + .text(); + expected.parse(JSON.parse(res)); + }); } - await metaTest.should(name, async () => { - // const res = await command - // .env({ "TG_PORT": metaTest.port.toString() }); - const res = await command - .env({ "TG_PORT": metaTest.port.toString() }).text(); - expected.parse(JSON.parse(res)); - }); - } -}); + }, +); diff --git a/tests/multi_typegraph/multi_typegraph.ts b/tests/multi_typegraph/multi_typegraph.ts index 6366bc82df..4701b1b359 100644 --- a/tests/multi_typegraph/multi_typegraph.ts +++ b/tests/multi_typegraph/multi_typegraph.ts @@ -13,32 +13,33 @@ function randomFunc() { export const notTg = randomFunc(); -await typegraph("temporal", (g: any) => { - const pub = Policy.public(); - const temporal = new TemporalRuntime({ - name: "test", - hostSecret: "HOST", - namespaceSecret: "NAMESPACE", - }); - g.expose({ - startKv: temporal - .startWorkflow("keyValueStore", t.struct({})) - .withPolicy(pub), - - query: temporal - .queryWorkflow("getValue", t.string(), t.string().optional()) - .withPolicy(pub), - - signal: temporal - .signalWorkflow( - "setValue", - t.struct({ key: t.string(), value: t.string() }), - ) - .withPolicy(pub), - - describe: temporal.describeWorkflow().withPolicy(pub), - }); -}); +// FIXME: Uncomment after it becomes possible to deploy a specific typegraph +// await typegraph("temporal", (g: any) => { +// const pub = Policy.public(); +// const temporal = new TemporalRuntime({ +// name: "test", +// hostSecret: "HOST", +// namespaceSecret: "NAMESPACE", +// }); +// g.expose({ +// startKv: temporal +// .startWorkflow("keyValueStore", t.struct({})) +// .withPolicy(pub), +// +// query: temporal +// .queryWorkflow("getValue", t.string(), t.string().optional()) +// .withPolicy(pub), +// +// signal: temporal +// .signalWorkflow( +// "setValue", +// t.struct({ key: t.string(), value: t.string() }), +// ) +// .withPolicy(pub), +// +// describe: temporal.describeWorkflow().withPolicy(pub), +// }); +// }); const tpe = t.struct({ a: t.string(), diff --git a/tests/runtimes/deno/deno_sync_test.ts b/tests/runtimes/deno/deno_sync_test.ts index 00278d92fc..292df018c9 100644 --- a/tests/runtimes/deno/deno_sync_test.ts +++ b/tests/runtimes/deno/deno_sync_test.ts @@ -216,7 +216,7 @@ Meta.test( Meta.test( { name: "DenoRuntime - Python SDK: multiple typegate instances in sync mode", - replicas: 1, + replicas: 3, syncConfig, async setup() { await clearSyncData(syncConfig); @@ -228,9 +228,9 @@ Meta.test( }, async (metaTest) => { const testMultipleReplica = async (instanceNumber: number) => { - const e = await metaTest.engine("runtimes/deno/deno_dep.py"); - - await sleep(5_000); + const e = await metaTest.engine("runtimes/deno/deno_dep.py", { + syncMode: true, + }); await metaTest.should( `work on the typgate instance #${instanceNumber}`, diff --git a/tests/runtimes/python/python_sync_test.ts b/tests/runtimes/python/python_sync_test.ts index e2306b3dcc..9c0feeb63b 100644 --- a/tests/runtimes/python/python_sync_test.ts +++ b/tests/runtimes/python/python_sync_test.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { gql, Meta, sleep } from "../../utils/mod.ts"; +import { gql, Meta } from "../../utils/mod.ts"; import { connect } from "redis"; import { S3Client } from "aws-sdk/client-s3"; import { createBucket, listObjects, tryDeleteBucket } from "test-utils/s3.ts"; @@ -214,9 +214,7 @@ Meta.test( }, async (t) => { const testMultipleReplica = async (instanceNumber: number) => { - const e = await t.engine("runtimes/python/python.py"); - - await sleep(5_000); + const e = await t.engine("runtimes/python/python.py", { syncMode: true }); await t.should( `work on the typgate instance #${instanceNumber}`, diff --git a/tests/runtimes/wasm_reflected/rust/Cargo.lock b/tests/runtimes/wasm_reflected/rust/Cargo.lock index 00025038db..f2a98338f6 100644 --- a/tests/runtimes/wasm_reflected/rust/Cargo.lock +++ b/tests/runtimes/wasm_reflected/rust/Cargo.lock @@ -114,7 +114,7 @@ dependencies = [ [[package]] name = "rust" -version = "0.4.11-rc.0" +version = "0.5.0-rc.6" dependencies = [ "wit-bindgen", ] diff --git a/tests/runtimes/wasm_reflected/wasm_sync_test.ts b/tests/runtimes/wasm_reflected/wasm_sync_test.ts index fa1742f455..fe02bdf5e1 100644 --- a/tests/runtimes/wasm_reflected/wasm_sync_test.ts +++ b/tests/runtimes/wasm_reflected/wasm_sync_test.ts @@ -61,6 +61,7 @@ Meta.test( await metaTest.should("work after deploying artifact to S3", async () => { const engine = await metaTest.engine( "runtimes/wasm_reflected/wasm_reflected.ts", + { syncMode: true }, ); const s3 = new S3Client(syncConfig.s3); assertEquals((await listObjects(s3, syncConfig.s3Bucket))?.length, 2); diff --git a/tests/runtimes/wasm_wire/rust/fdk.rs b/tests/runtimes/wasm_wire/rust/fdk.rs index 7b3e201923..2504a968aa 100644 --- a/tests/runtimes/wasm_wire/rust/fdk.rs +++ b/tests/runtimes/wasm_wire/rust/fdk.rs @@ -109,7 +109,7 @@ impl Router { } pub fn init(&self, args: InitArgs) -> Result { - static MT_VERSION: &str = "0.5.0-rc.3"; + static MT_VERSION: &str = "0.5.0-rc.6"; if args.metatype_version != MT_VERSION { return Err(InitError::VersionMismatch(MT_VERSION.into())); } diff --git a/tests/typename/typename_test.ts b/tests/typename/typename_test.ts index 18a9912c0e..7cfdfbae7a 100644 --- a/tests/typename/typename_test.ts +++ b/tests/typename/typename_test.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { recreateMigrations } from "../utils/migrations.ts"; +import { dropSchema } from "test-utils/database.ts"; import { gql, Meta } from "../utils/mod.ts"; const secrets = { @@ -65,23 +65,13 @@ Meta.test("Typename in random runtime", async (t) => { }); Meta.test("Typename in prisma runtime", async (t) => { + dropSchema("typename"); const e = await t.engine("typename/typename.py", { secrets }); - await gql` - mutation a { - dropSchema - } - ` - .expectData({ dropSchema: 0 }) - .on(e); - await recreateMigrations(e); - await t.should("allow querying typename in an object", async () => { await gql` mutation { - createUser (data: { - id: 1 - }) { + createUser(data: { id: 1 }) { __typename id } @@ -106,7 +96,10 @@ Meta.test("Typename on union", async (t) => { getRgbColor { color { ... on RgbColor { - r g b __typename + r + g + b + __typename } } } diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 744a632576..1e7d29bd0d 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -21,6 +21,7 @@ import { AsyncDisposableStack } from "dispose"; import { Typegraph } from "@metatype/typegate/typegraph/types.ts"; import { metaCli } from "test-utils/meta.ts"; import { $ } from "@david/dax"; +import { sleep } from "test-utils/mod.ts"; export interface ParseOptions { deploy?: boolean; @@ -30,6 +31,8 @@ export interface ParseOptions { autoSecretName?: boolean; prefix?: string; pretty?: boolean; + createMigration?: boolean; + syncMode?: boolean; } export enum SDKLangugage { @@ -226,8 +229,6 @@ export class MetaTest { "--target=dev", `--gate=http://localhost:${this.port}`, "--allow-dirty", - "--create-migration", - //"--allow-destructive", ...optSecrets, `--file=${path}`, ]; @@ -236,16 +237,29 @@ export class MetaTest { args.push(`--prefix=${opts.prefix}`); } + if (opts.createMigration === false) { + args.push("--no-migration"); + } else { + args.push("--create-migration"); + } + const { stdout } = await metaCli(...args); console.log({ stdout: $.stripAnsi(stdout) }); const matches = stdout.match(/\((.*)\)/); const typegraphs = matches?.[1].split(", ") ?? []; + if (typegraphs.length == 0) { throw new Error("No typegraph"); } + + if (opts.syncMode) { + await sleep(1000); + } + + const prefix = opts.prefix ?? ""; const tgName = opts.typegraph ?? typegraphs[0]; const typegate = this.typegate; - const engine = typegate.register.get(tgName)!; + const engine = typegate.register.get(prefix + tgName)!; if (!engine) { throw new Error(`Typegate engine '${tgName}' not found`); diff --git a/tests/utils/tg_deploy_script.py b/tests/utils/tg_deploy_script.py deleted file mode 100644 index 3707be185c..0000000000 --- a/tests/utils/tg_deploy_script.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -# SPDX-License-Identifier: MPL-2.0 - -import importlib.util as import_util -import json -import os -import sys - -from typegraph.gen.core import ( - MigrationAction, -) -from typegraph.graph.shared_types import BasicAuth -from typegraph.graph.tg_deploy import ( - TypegraphDeployParams, - tg_deploy, - TypegateConnectionOptions, -) - -# get command args -cwd = sys.argv[1] -PORT = sys.argv[2] -module_path = sys.argv[3] -secrets_str = sys.argv[4] - -tg_name = None -# if the typegraph func name is provided, -if len(sys.argv) == 6: - tg_name = sys.argv[5] - -gate = f"http://localhost:{PORT}" -auth = BasicAuth("admin", "password") - -# resolve the module -module_name = os.path.basename(module_path) -spec = import_util.spec_from_file_location(module_name, module_path) -module = import_util.module_from_spec(spec) -spec.loader.exec_module(module) - -if tg_name is None: - tg_name = module_name.split(".")[0] -if not hasattr(module, tg_name): - raise Exception( - f"Script name {module_name} doesn't have the typegraph name: {tg_name}" - ) - - -tg = getattr(module, tg_name) - -secrets = json.loads(secrets_str) - - -disable_art_resol = os.environ.get("DISABLE_ART_RES") -codegen = os.environ.get("CODEGEN") -migration_dir = os.environ.get("MIGRATION_DIR") or "prisma-migrations" -global_action_reset = os.environ.get("GLOBAL_ACTION_RESET") or False -if global_action_reset is not False: - global_action_reset = global_action_reset == "true" - -global_action_create = os.environ.get("GLOBAL_ACTION_CREATE") or True -if global_action_reset is not True: - global_action_create = global_action_create == "true" - -prefix = os.environ.get("PREFIX") - - -deploy_result = tg_deploy( - tg, - TypegraphDeployParams( - typegate=TypegateConnectionOptions(url=gate, auth=auth), - typegraph_path=os.path.join(cwd, module_name), - prefix=prefix, - secrets=secrets, - migrations_dir=migration_dir, - migration_actions=None, - default_migration_action=MigrationAction( - apply=True, reset=global_action_reset, create=global_action_create - ), - ), -) - -print(deploy_result.serialized) diff --git a/tests/utils/tg_deploy_script.ts b/tests/utils/tg_deploy_script.ts deleted file mode 100644 index 229781d3a8..0000000000 --- a/tests/utils/tg_deploy_script.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy.ts"; -import * as path from "@std/path"; - -const cwd = Deno.args[0]; -const PORT = Deno.args[1]; -const modulePathStr = Deno.args[2]; -const secretsStr = Deno.args[3]; -let tgName: string | undefined; - -// if the typegraph name is provided given there could be multiple typegraph definitions in the same file -if (Deno.args.length === 5) { - tgName = Deno.args[4]; -} - -const gate = `http://localhost:${PORT}`; -const auth = new BasicAuth("admin", "password"); - -// resolve the module -const moduleName = path.basename(modulePathStr); -const tgPath = path.join(cwd, moduleName); - -const module = await import(tgPath); -let tg; -try { - tg = tgName !== undefined ? module[tgName] : module.tg; -} catch (_) { - throw new Error(`No typegraph found in module ${moduleName}`); -} - -if (typeof tg === "function") { - tg = await tg(); -} - -const secrets = JSON.parse(secretsStr); - -const migrationDir = Deno.env.get("MIGRATION_DIR") ?? "prisma-migrations"; -let globalActionReset = Deno.env.get("GLOBAL_ACTION_RESET") ?? false; -if (globalActionReset !== false) { - globalActionReset = globalActionReset === "true"; -} -let globalActionCreate = Deno.env.get("GLOBAL_ACTION_CREATE") ?? true; -if (globalActionCreate !== true) { - globalActionCreate = globalActionCreate === "true"; -} - -const { serialized, response: _gateResponseAdd } = await tgDeploy(tg, { - typegate: { url: gate, auth }, - typegraphPath: tgPath, - prefix: Deno.env.get("PREFIX") ?? undefined, - secrets: secrets, - migrationsDir: `${cwd}/${migrationDir}`, - defaultMigrationAction: { - apply: true, - create: globalActionCreate, - reset: globalActionReset, - }, -}); - -console.log(serialized); diff --git a/tools/tasks/test.ts b/tools/tasks/test.ts index b497440b44..efde0a51f7 100644 --- a/tools/tasks/test.ts +++ b/tools/tasks/test.ts @@ -9,7 +9,7 @@ export default { inherit: "ci", desc: "Shorthand for `tools/test.ts`", fn: async ($) => { - if (await testE2eCli($.argv) != 0) { + if ((await testE2eCli($.argv)) != 0) { throw new Error("tests failed"); } }, @@ -37,4 +37,11 @@ export default { await $`cargo test --locked --package typegraph_core --tests`; }, }, + "test-codegen": { + inherit: "ci", + workingDir: "./src/typegraph/specs/codegen", + async fn($) { + await $`deno task test`; + }, + }, } satisfies Record; From 045f4a1ddb00e7874ce65b97868a2393e0ddbc35 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Sat, 16 Nov 2024 20:12:49 +0300 Subject: [PATCH 32/39] fix: additional fixes --- tests/docs/how-tos/prog_deploy/prog_deploy_test.ts | 2 +- tests/e2e/cli/deploy_test.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts index 1a2505d9ad..567c711672 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts @@ -55,7 +55,7 @@ Meta.test( name: "Programmatic deployment test - TS SDK", }, async (t: MetaTest) => { - throw new Error("Unimplemented"); + // FIXME: Uncomment after implementing mode B (MET-754) //const port = t.port; //const scriptsPath = path.join(t.workingDir, "docs/how-tos/prog_deploy"); // diff --git a/tests/e2e/cli/deploy_test.ts b/tests/e2e/cli/deploy_test.ts index a5f65d5f15..f32a126055 100644 --- a/tests/e2e/cli/deploy_test.ts +++ b/tests/e2e/cli/deploy_test.ts @@ -205,7 +205,6 @@ Meta.test( content: { "prisma.py": "runtimes/prisma/prisma.py", "metatype.yml": "metatype.yml", - "utils/tg_deploy_script.py": "utils/tg_deploy_script.py", }, }, }, @@ -306,7 +305,6 @@ Meta.test( content: { "prisma.py": "runtimes/prisma/prisma.py", "metatype.yml": "metatype.yml", - "utils/tg_deploy_script.py": "utils/tg_deploy_script.py", }, }, }, From 958a48391c1e2cc4aa4767663259ef3f2fe3ff76 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Sun, 17 Nov 2024 16:33:56 +0300 Subject: [PATCH 33/39] fix: metagen & workflow [skip ci] --- .github/workflows/tests.yml | 1 + src/meta-cli/src/typegraph/rpc/mod.rs | 2 +- src/metagen/src/lib.rs | 28 ++++++------------- src/metagen/src/tests/mod.rs | 1 + src/typegraph/core/src/types/sdk/mod.rs | 2 +- .../identities/py/handlers_types.py | 5 +++- tests/metagen/typegraphs/sample/py/client.py | 1 + tests/metagen/typegraphs/sample/rs/client.rs | 1 + tests/metagen/typegraphs/sample/ts/client.ts | 3 +- tests/utils/test.ts | 21 +------------- tools/tasks/test.ts | 2 +- 11 files changed, 23 insertions(+), 44 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44a25515b3..2813f50431 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -293,6 +293,7 @@ jobs: ghjk x dev update --cache-only ghjk x test-rust + ghjk x test-codegen ghjk x test-e2e -- --coverage=coverage diff --git a/src/meta-cli/src/typegraph/rpc/mod.rs b/src/meta-cli/src/typegraph/rpc/mod.rs index b0550cdbce..af5a284cd6 100644 --- a/src/meta-cli/src/typegraph/rpc/mod.rs +++ b/src/meta-cli/src/typegraph/rpc/mod.rs @@ -19,6 +19,6 @@ pub trait RpcDispatch { pub enum RpcCall { Aws(aws::RpcCall), Core(core::RpcCall), - Utils(utils::RpcCall), Runtimes(runtimes::RpcCall), + Utils(utils::RpcCall), } diff --git a/src/metagen/src/lib.rs b/src/metagen/src/lib.rs index 6b44ae8e2e..3effed0a78 100644 --- a/src/metagen/src/lib.rs +++ b/src/metagen/src/lib.rs @@ -47,7 +47,6 @@ mod utils; use crate::interlude::*; pub use config::*; -use futures_concurrency::future::FutureGroup; pub use shared::FdkTemplate; pub use fdk_python::DEFAULT_TEMPLATE as FDK_PYTHON_DEFAULT_TEMPLATE; @@ -216,20 +215,19 @@ impl GeneratorRunner { } } +// FIXME: Bring FutureGroup back after multithreading support for typegraph core (MET-755) pub async fn generate_target( config: &config::Config, target_name: &str, workspace_path: PathBuf, resolver: impl InputResolver + Send + Sync + Clone + 'static, ) -> anyhow::Result { - use futures_lite::StreamExt; - let target_conf = config .targets .get(target_name) .with_context(|| format!("target {target_name:?} not found in config"))?; - let mut group = FutureGroup::new(); + let mut group = Vec::new(); for config in &target_conf.0 { let gen_name = &config.generator_name; let config = config.other.to_owned(); @@ -239,28 +237,20 @@ pub async fn generate_target( let gen_impl = get_gen_op.exec(&workspace_path, config)?; let bill = gen_impl.bill_of_inputs(); - let mut resolve_group = FutureGroup::new(); + let mut resolved = Vec::new(); for (name, order) in bill.into_iter() { let resolver = resolver.clone(); - resolve_group.insert(Box::pin(async move { - anyhow::Ok((name, resolver.resolve(order).await?)) - })); + let result = resolver.resolve(order).await?; + resolved.push((name, result)); } let gen_name: Arc = gen_name[..].into(); - group.insert(Box::pin(async move { - let mut inputs = IndexMap::new(); - while let Some(res) = resolve_group.next().await { - let (name, input) = res?; - inputs.insert(name, input); - } - let out = gen_impl.generate(inputs)?; - anyhow::Ok((gen_name, out)) - })); + let inputs = IndexMap::from_iter(resolved); + let out = gen_impl.generate(inputs)?; + group.push((gen_name, out)); } let mut out = IndexMap::new(); - while let Some(res) = group.next().await { - let (gen_name, files) = res?; + for (gen_name, files) in group.into_iter() { for (path, buf) in files.0 { if let Some((src, _)) = out.get(&path) { anyhow::bail!("generators \"{src}\" and \"{gen_name}\" clashed at \"{path:?}\""); diff --git a/src/metagen/src/tests/mod.rs b/src/metagen/src/tests/mod.rs index b33d798cb9..1108cc692a 100644 --- a/src/metagen/src/tests/mod.rs +++ b/src/metagen/src/tests/mod.rs @@ -7,6 +7,7 @@ use crate::{interlude::*, *}; mod fixtures; pub use fixtures::*; +use futures_concurrency::future::FutureGroup; use futures_lite::StreamExt as _; #[derive(Clone)] diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs index 85e31fdc1f..fa6efef03e 100644 --- a/src/typegraph/core/src/types/sdk/mod.rs +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -1,5 +1,5 @@ pub mod aws; pub mod core; -pub mod utils; pub mod runtimes; +pub mod utils; pub use self::core::Error; diff --git a/tests/metagen/typegraphs/identities/py/handlers_types.py b/tests/metagen/typegraphs/identities/py/handlers_types.py index ef17a2aaeb..275a619d37 100644 --- a/tests/metagen/typegraphs/identities/py/handlers_types.py +++ b/tests/metagen/typegraphs/identities/py/handlers_types.py @@ -12,7 +12,6 @@ class Ctx: def gql(self, query: str, variables: str) -> Any: pass - class Struct: def repr(self): return asdict(self) @@ -211,12 +210,14 @@ class SimpleCycles3(Struct): FORWARD_REFS["SimpleCycles3"] = SimpleCycles3 + def __repr(value: Any): if isinstance(value, Struct): return value.repr() return value + def typed_primitives(user_fn: Callable[[PrimitivesArgs, Ctx], Primitives]): def exported_wrapper(raw_inp, ctx): inp: PrimitivesArgs = Struct.new(PrimitivesArgs, raw_inp) @@ -259,3 +260,5 @@ def exported_wrapper(raw_inp, ctx): return __repr(out) return exported_wrapper + + diff --git a/tests/metagen/typegraphs/sample/py/client.py b/tests/metagen/typegraphs/sample/py/client.py index 10a2eb34dc..e770cd6dd7 100644 --- a/tests/metagen/typegraphs/sample/py/client.py +++ b/tests/metagen/typegraphs/sample/py/client.py @@ -890,3 +890,4 @@ def mixed_union(self, args: typing.Union[RootCompositeArgsFnInput, PlaceholderAr "$q" )[0] return QueryNode(node.node_name, node.instance_name, node.args, node.sub_nodes) + diff --git a/tests/metagen/typegraphs/sample/rs/client.rs b/tests/metagen/typegraphs/sample/rs/client.rs index 924e724864..cea1a5270d 100644 --- a/tests/metagen/typegraphs/sample/rs/client.rs +++ b/tests/metagen/typegraphs/sample/rs/client.rs @@ -2522,3 +2522,4 @@ impl QueryGraph { } } } + diff --git a/tests/metagen/typegraphs/sample/ts/client.ts b/tests/metagen/typegraphs/sample/ts/client.ts index 25f0bb1d91..c2f15f17cb 100644 --- a/tests/metagen/typegraphs/sample/ts/client.ts +++ b/tests/metagen/typegraphs/sample/ts/client.ts @@ -353,7 +353,7 @@ function convertQueryNodeGql( : `${node.instanceName}: ${node.nodeName}`; const args = node.args; - if (args) { + if (args && Object.keys(args).length > 0) { out = `${out} (${ Object.entries(args) .map(([key, val]) => { @@ -951,3 +951,4 @@ export class QueryGraph extends _QueryGraphBase { return new QueryNode(inner) as QueryNode; } } + diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 1e7d29bd0d..bc09ec9042 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -18,7 +18,6 @@ import { } from "@metatype/typegate/config.ts"; // until deno supports it... import { AsyncDisposableStack } from "dispose"; -import { Typegraph } from "@metatype/typegate/typegraph/types.ts"; import { metaCli } from "test-utils/meta.ts"; import { $ } from "@david/dax"; import { sleep } from "test-utils/mod.ts"; @@ -200,24 +199,6 @@ export class MetaTest { await this.typegates.next().removeTypegraph(tgName); } - async #engineFromTypegraph( - tg: Typegraph, - secrets: Record, - ): Promise { - const { engine, response } = await this.typegate.pushTypegraph( - tg, - secrets, - this.introspection, - ); - - if (engine == null) { - throw response.failure!; - } - - this.addCleanup(() => engine[Symbol.asyncDispose]()); - return engine; - } - async engine(path: string, opts: ParseOptions = {}) { console.log("t.engine", this.port, opts); const secrets = opts.secrets ?? {}; @@ -253,7 +234,7 @@ export class MetaTest { } if (opts.syncMode) { - await sleep(1000); + await sleep(5000); } const prefix = opts.prefix ?? ""; diff --git a/tools/tasks/test.ts b/tools/tasks/test.ts index efde0a51f7..7eabe5c740 100644 --- a/tools/tasks/test.ts +++ b/tools/tasks/test.ts @@ -41,7 +41,7 @@ export default { inherit: "ci", workingDir: "./src/typegraph/specs/codegen", async fn($) { - await $`deno task test`; + await $`bash -c "deno task test"`; }, }, } satisfies Record; From af25ea4780a728faa3f1dc10422c5ceffc241a4e Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Sun, 17 Nov 2024 16:47:37 +0300 Subject: [PATCH 34/39] fix: pre-commit --- src/meta-cli/src/typegraph/rpc/aws.rs | 3 + src/meta-cli/src/typegraph/rpc/core.rs | 3 + src/meta-cli/src/typegraph/rpc/mod.rs | 3 + src/meta-cli/src/typegraph/rpc/runtimes.rs | 3 + src/meta-cli/src/typegraph/rpc/utils.rs | 3 + src/typegraph/core/src/types/sdk/aws.rs | 17 ++- src/typegraph/core/src/types/sdk/core.rs | 26 +++- src/typegraph/core/src/types/sdk/mod.rs | 3 + src/typegraph/core/src/types/sdk/runtimes.rs | 117 ++++++++++++++---- src/typegraph/core/src/types/sdk/utils.rs | 29 ++++- .../specs/codegen/rpc/python/__init__.py | 2 + .../specs/codegen/rpc/python/client.py | 3 + .../specs/codegen/rpc/python/client_mock.py | 3 + .../specs/codegen/rpc/tests/client.test.ts | 3 + .../specs/codegen/rpc/tests/utils.ts | 3 + .../specs/codegen/rpc/typescript/client.ts | 3 + .../codegen/rpc/typescript/client_mock.ts | 3 + src/typegraph/specs/codegen/src/cmd/main.ts | 3 + src/typegraph/specs/codegen/src/cmd/utils.ts | 3 + src/typegraph/specs/codegen/src/lib/base.ts | 3 + src/typegraph/specs/codegen/src/lib/python.ts | 3 + .../specs/codegen/src/lib/rust_lib.ts | 3 + .../specs/codegen/src/lib/rust_rpc.ts | 3 + .../specs/codegen/src/lib/treesitter.ts | 3 + .../specs/codegen/src/lib/typescript.ts | 3 + .../specs/codegen/tests/python.test.ts | 3 + .../specs/codegen/tests/rust_lib.test.ts | 3 + .../specs/codegen/tests/treesitter.test.ts | 3 + .../specs/codegen/tests/typescript.test.ts | 3 + src/typegraph/specs/codegen/tests/utils.ts | 3 + src/typegraph/specs/types/aws.d.ts | 3 + src/typegraph/specs/types/core.d.ts | 3 + src/typegraph/specs/types/primitives.d.ts | 3 + src/typegraph/specs/types/runtimes.d.ts | 3 + src/typegraph/specs/types/utils.d.ts | 3 + .../identities/py/handlers_types.py | 5 +- tests/metagen/typegraphs/sample/py/client.py | 1 - tests/metagen/typegraphs/sample/rs/client.rs | 1 - tests/metagen/typegraphs/sample/ts/client.ts | 1 - 39 files changed, 242 insertions(+), 47 deletions(-) diff --git a/src/meta-cli/src/typegraph/rpc/aws.rs b/src/meta-cli/src/typegraph/rpc/aws.rs index 0e81e54bf8..2a41153830 100644 --- a/src/meta-cli/src/typegraph/rpc/aws.rs +++ b/src/meta-cli/src/typegraph/rpc/aws.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use serde::{Deserialize, Serialize}; use serde_json::Value; use typegraph_core::sdk::aws::*; diff --git a/src/meta-cli/src/typegraph/rpc/core.rs b/src/meta-cli/src/typegraph/rpc/core.rs index a4d53d70cc..ded4384f92 100644 --- a/src/meta-cli/src/typegraph/rpc/core.rs +++ b/src/meta-cli/src/typegraph/rpc/core.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use serde::{Deserialize, Serialize}; use serde_json::Value; use typegraph_core::sdk::core::*; diff --git a/src/meta-cli/src/typegraph/rpc/mod.rs b/src/meta-cli/src/typegraph/rpc/mod.rs index af5a284cd6..896a0c48e8 100644 --- a/src/meta-cli/src/typegraph/rpc/mod.rs +++ b/src/meta-cli/src/typegraph/rpc/mod.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + pub mod aws; pub mod core; pub mod runtimes; diff --git a/src/meta-cli/src/typegraph/rpc/runtimes.rs b/src/meta-cli/src/typegraph/rpc/runtimes.rs index 7565cf7974..1fd2c2039d 100644 --- a/src/meta-cli/src/typegraph/rpc/runtimes.rs +++ b/src/meta-cli/src/typegraph/rpc/runtimes.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use serde::{Deserialize, Serialize}; use serde_json::Value; #[allow(unused)] diff --git a/src/meta-cli/src/typegraph/rpc/utils.rs b/src/meta-cli/src/typegraph/rpc/utils.rs index ce67f4e4ef..3ca6b0113d 100644 --- a/src/meta-cli/src/typegraph/rpc/utils.rs +++ b/src/meta-cli/src/typegraph/rpc/utils.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use serde::{Deserialize, Serialize}; use serde_json::Value; #[allow(unused)] diff --git a/src/typegraph/core/src/types/sdk/aws.rs b/src/typegraph/core/src/types/sdk/aws.rs index f39fa4155e..03c6ac11dc 100644 --- a/src/typegraph/core/src/types/sdk/aws.rs +++ b/src/typegraph/core/src/types/sdk/aws.rs @@ -1,5 +1,8 @@ -use serde::{Serialize, Deserialize}; +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use super::core::{MaterializerId, RuntimeId}; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct S3RuntimeData { @@ -25,9 +28,15 @@ pub struct S3PresignPutParams { pub trait Handler { fn register_s3_runtime(data: S3RuntimeData) -> Result; - fn s3_presign_get(runtime: RuntimeId, data: S3PresignGetParams) -> Result; - fn s3_presign_put(runtime: RuntimeId, data: S3PresignPutParams) -> Result; + fn s3_presign_get( + runtime: RuntimeId, + data: S3PresignGetParams, + ) -> Result; + fn s3_presign_put( + runtime: RuntimeId, + data: S3PresignPutParams, + ) -> Result; fn s3_list(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload(runtime: RuntimeId, bucket: String) -> Result; fn s3_upload_all(runtime: RuntimeId, bucket: String) -> Result; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/core.rs b/src/typegraph/core/src/types/sdk/core.rs index f4c33fb951..7308093ef8 100644 --- a/src/typegraph/core/src/types/sdk/core.rs +++ b/src/typegraph/core/src/types/sdk/core.rs @@ -1,4 +1,7 @@ -use serde::{Serialize, Deserialize}; +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Error { @@ -218,7 +221,9 @@ pub struct FuncParams { pub trait Handler { fn init_typegraph(params: TypegraphInitParams) -> Result<(), super::Error>; - fn serialize_typegraph(params: SerializeParams) -> Result<(String, Vec), super::Error>; + fn serialize_typegraph( + params: SerializeParams, + ) -> Result<(String, Vec), super::Error>; fn with_injection(type_id: TypeId, injection: String) -> Result; fn with_config(type_id: TypeId, config: String) -> Result; fn refb(name: String, attributes: Option) -> Result; @@ -236,13 +241,22 @@ pub trait Handler { fn extend_struct(tpe: TypeId, props: Vec<(String, TypeId)>) -> Result; fn get_type_repr(id: TypeId) -> Result; fn funcb(data: TypeFunc) -> Result; - fn get_transform_data(resolver_input: TypeId, transform_tree: String) -> Result; + fn get_transform_data( + resolver_input: TypeId, + transform_tree: String, + ) -> Result; fn register_policy(pol: Policy) -> Result; fn with_policy(type_id: TypeId, policy_chain: Vec) -> Result; fn get_public_policy() -> Result<(PolicyId, String), super::Error>; fn get_internal_policy() -> Result<(PolicyId, String), super::Error>; - fn register_context_policy(key: String, check: ContextCheck) -> Result<(PolicyId, String), super::Error>; + fn register_context_policy( + key: String, + check: ContextCheck, + ) -> Result<(PolicyId, String), super::Error>; fn rename_type(tpe: TypeId, new_name: String) -> Result; - fn expose(fns: Vec<(String, TypeId)>, default_policy: Option>) -> Result<(), super::Error>; + fn expose( + fns: Vec<(String, TypeId)>, + default_policy: Option>, + ) -> Result<(), super::Error>; fn set_seed(seed: Option) -> Result<(), super::Error>; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/mod.rs b/src/typegraph/core/src/types/sdk/mod.rs index fa6efef03e..c5c41c26c7 100644 --- a/src/typegraph/core/src/types/sdk/mod.rs +++ b/src/typegraph/core/src/types/sdk/mod.rs @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + pub mod aws; pub mod core; pub mod runtimes; diff --git a/src/typegraph/core/src/types/sdk/runtimes.rs b/src/typegraph/core/src/types/sdk/runtimes.rs index f762590891..5b2f8cdc55 100644 --- a/src/typegraph/core/src/types/sdk/runtimes.rs +++ b/src/typegraph/core/src/types/sdk/runtimes.rs @@ -1,5 +1,8 @@ -use serde::{Serialize, Deserialize}; +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use super::core::{FuncParams, MaterializerId, RuntimeId, TypeId}; +use serde::{Deserialize, Serialize}; pub type Idempotency = bool; @@ -291,26 +294,67 @@ pub struct GrpcData { pub trait Handler { fn get_deno_runtime() -> Result; - fn register_deno_func(data: MaterializerDenoFunc, effect: Effect) -> Result; - fn register_deno_static(data: MaterializerDenoStatic, type_id: TypeId) -> Result; - fn get_predefined_deno_func(data: MaterializerDenoPredefined) -> Result; - fn import_deno_function(data: MaterializerDenoImport, effect: Effect) -> Result; + fn register_deno_func( + data: MaterializerDenoFunc, + effect: Effect, + ) -> Result; + fn register_deno_static( + data: MaterializerDenoStatic, + type_id: TypeId, + ) -> Result; + fn get_predefined_deno_func( + data: MaterializerDenoPredefined, + ) -> Result; + fn import_deno_function( + data: MaterializerDenoImport, + effect: Effect, + ) -> Result; fn register_graphql_runtime(data: GraphqlRuntimeData) -> Result; - fn graphql_query(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; - fn graphql_mutation(base: BaseMaterializer, data: MaterializerGraphqlQuery) -> Result; + fn graphql_query( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + ) -> Result; + fn graphql_mutation( + base: BaseMaterializer, + data: MaterializerGraphqlQuery, + ) -> Result; fn register_http_runtime(data: HttpRuntimeData) -> Result; - fn http_request(base: BaseMaterializer, data: MaterializerHttpRequest) -> Result; + fn http_request( + base: BaseMaterializer, + data: MaterializerHttpRequest, + ) -> Result; fn register_python_runtime() -> Result; - fn from_python_lambda(base: BaseMaterializer, data: MaterializerPythonLambda) -> Result; - fn from_python_def(base: BaseMaterializer, data: MaterializerPythonDef) -> Result; - fn from_python_module(base: BaseMaterializer, data: MaterializerPythonModule) -> Result; - fn from_python_import(base: BaseMaterializer, data: MaterializerPythonImport) -> Result; + fn from_python_lambda( + base: BaseMaterializer, + data: MaterializerPythonLambda, + ) -> Result; + fn from_python_def( + base: BaseMaterializer, + data: MaterializerPythonDef, + ) -> Result; + fn from_python_module( + base: BaseMaterializer, + data: MaterializerPythonModule, + ) -> Result; + fn from_python_import( + base: BaseMaterializer, + data: MaterializerPythonImport, + ) -> Result; fn register_random_runtime(data: RandomRuntimeData) -> Result; - fn create_random_mat(base: BaseMaterializer, data: MaterializerRandom) -> Result; + fn create_random_mat( + base: BaseMaterializer, + data: MaterializerRandom, + ) -> Result; fn register_wasm_reflected_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_reflected_func(base: BaseMaterializer, data: MaterializerWasmReflectedFunc) -> Result; + fn from_wasm_reflected_func( + base: BaseMaterializer, + data: MaterializerWasmReflectedFunc, + ) -> Result; fn register_wasm_wire_runtime(data: WasmRuntimeData) -> Result; - fn from_wasm_wire_handler(base: BaseMaterializer, data: MaterializerWasmWireHandler) -> Result; + fn from_wasm_wire_handler( + base: BaseMaterializer, + data: MaterializerWasmWireHandler, + ) -> Result; fn register_prisma_runtime(data: PrismaRuntimeData) -> Result; fn prisma_find_unique(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_find_many(runtime: RuntimeId, model: TypeId) -> Result; @@ -324,18 +368,43 @@ pub trait Handler { fn prisma_upsert_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_one(runtime: RuntimeId, model: TypeId) -> Result; fn prisma_delete_many(runtime: RuntimeId, model: TypeId) -> Result; - fn prisma_execute(runtime: RuntimeId, query: String, param: TypeId, effect: Effect) -> Result; - fn prisma_query_raw(runtime: RuntimeId, query: String, out: TypeId, param: Option) -> Result; + fn prisma_execute( + runtime: RuntimeId, + query: String, + param: TypeId, + effect: Effect, + ) -> Result; + fn prisma_query_raw( + runtime: RuntimeId, + query: String, + out: TypeId, + param: Option, + ) -> Result; fn prisma_link(data: PrismaLinkData) -> Result; fn prisma_migration(operation: PrismaMigrationOperation) -> Result; fn register_temporal_runtime(data: TemporalRuntimeData) -> Result; - fn generate_temporal_operation(runtime: RuntimeId, data: TemporalOperationData) -> Result; - fn register_typegate_materializer(operation: TypegateOperation) -> Result; - fn register_typegraph_materializer(operation: TypegraphOperation) -> Result; - fn register_substantial_runtime(data: SubstantialRuntimeData) -> Result; - fn generate_substantial_operation(runtime: RuntimeId, data: SubstantialOperationData) -> Result; + fn generate_temporal_operation( + runtime: RuntimeId, + data: TemporalOperationData, + ) -> Result; + fn register_typegate_materializer( + operation: TypegateOperation, + ) -> Result; + fn register_typegraph_materializer( + operation: TypegraphOperation, + ) -> Result; + fn register_substantial_runtime( + data: SubstantialRuntimeData, + ) -> Result; + fn generate_substantial_operation( + runtime: RuntimeId, + data: SubstantialOperationData, + ) -> Result; fn register_kv_runtime(data: KvRuntimeData) -> Result; - fn kv_operation(base: BaseMaterializer, data: KvMaterializer) -> Result; + fn kv_operation( + base: BaseMaterializer, + data: KvMaterializer, + ) -> Result; fn register_grpc_runtime(data: GrpcRuntimeData) -> Result; fn call_grpc_method(runtime: RuntimeId, data: GrpcData) -> Result; -} \ No newline at end of file +} diff --git a/src/typegraph/core/src/types/sdk/utils.rs b/src/typegraph/core/src/types/sdk/utils.rs index e05f8d789c..4b9b57f75c 100644 --- a/src/typegraph/core/src/types/sdk/utils.rs +++ b/src/typegraph/core/src/types/sdk/utils.rs @@ -1,5 +1,8 @@ -use serde::{Serialize, Deserialize}; +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + use super::core::TypeId; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ReduceEntry { @@ -49,11 +52,25 @@ pub trait Handler { fn add_auth(data: Auth) -> Result; fn add_raw_auth(data: String) -> Result; fn oauth2(service_name: String, scopes: String) -> Result; - fn oauth2_without_profiler(service_name: String, scopes: String) -> Result; - fn oauth2_with_extended_profiler(service_name: String, scopes: String, extension: String) -> Result; - fn oauth2_with_custom_profiler(service_name: String, scopes: String, profiler: TypeId) -> Result; + fn oauth2_without_profiler( + service_name: String, + scopes: String, + ) -> Result; + fn oauth2_with_extended_profiler( + service_name: String, + scopes: String, + extension: String, + ) -> Result; + fn oauth2_with_custom_profiler( + service_name: String, + scopes: String, + profiler: TypeId, + ) -> Result; fn gql_deploy_query(params: QueryDeployParams) -> Result; fn gql_remove_query(tg_name: Vec) -> Result; fn metagen_exec(config: FdkConfig) -> Result, super::Error>; - fn metagen_write_files(items: Vec, typegraph_dir: String) -> Result<(), super::Error>; -} \ No newline at end of file + fn metagen_write_files( + items: Vec, + typegraph_dir: String, + ) -> Result<(), super::Error>; +} diff --git a/src/typegraph/specs/codegen/rpc/python/__init__.py b/src/typegraph/specs/codegen/rpc/python/__init__.py index e69de29bb2..8e55187b7a 100644 --- a/src/typegraph/specs/codegen/rpc/python/__init__.py +++ b/src/typegraph/specs/codegen/rpc/python/__init__.py @@ -0,0 +1,2 @@ +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 diff --git a/src/typegraph/specs/codegen/rpc/python/client.py b/src/typegraph/specs/codegen/rpc/python/client.py index e792d7ec0a..4cf703771d 100644 --- a/src/typegraph/specs/codegen/rpc/python/client.py +++ b/src/typegraph/specs/codegen/rpc/python/client.py @@ -1,3 +1,6 @@ +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 + import json import sys diff --git a/src/typegraph/specs/codegen/rpc/python/client_mock.py b/src/typegraph/specs/codegen/rpc/python/client_mock.py index d3e0d26c78..e354f814cf 100644 --- a/src/typegraph/specs/codegen/rpc/python/client_mock.py +++ b/src/typegraph/specs/codegen/rpc/python/client_mock.py @@ -1,3 +1,6 @@ +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 + import json from client import rpc_request diff --git a/src/typegraph/specs/codegen/rpc/tests/client.test.ts b/src/typegraph/specs/codegen/rpc/tests/client.test.ts index 7183d78619..fd67376bfd 100644 --- a/src/typegraph/specs/codegen/rpc/tests/client.test.ts +++ b/src/typegraph/specs/codegen/rpc/tests/client.test.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { assertEquals } from "jsr:@std/assert"; import * as path from "jsr:@std/path"; import { readOutput, writeToInput } from "./utils.ts"; diff --git a/src/typegraph/specs/codegen/rpc/tests/utils.ts b/src/typegraph/specs/codegen/rpc/tests/utils.ts index 4ab5933aa9..d2bdea3a87 100644 --- a/src/typegraph/specs/codegen/rpc/tests/utils.ts +++ b/src/typegraph/specs/codegen/rpc/tests/utils.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + async function readOutput(reader: ReadableStreamDefaultReader) { const decoder = new TextDecoder("utf-8"); const buffer = await reader.read(); diff --git a/src/typegraph/specs/codegen/rpc/typescript/client.ts b/src/typegraph/specs/codegen/rpc/typescript/client.ts index 19d91ba4bf..40b4c553b3 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import fs from "node:fs"; import { Buffer } from "node:buffer"; diff --git a/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts b/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts index f850214ce3..a29f835223 100644 --- a/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts +++ b/src/typegraph/specs/codegen/rpc/typescript/client_mock.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { rpcRequest } from "./client.ts"; const first = rpcRequest("hello", { name: "world" }); diff --git a/src/typegraph/specs/codegen/src/cmd/main.ts b/src/typegraph/specs/codegen/src/cmd/main.ts index 3648353476..5893836555 100644 --- a/src/typegraph/specs/codegen/src/cmd/main.ts +++ b/src/typegraph/specs/codegen/src/cmd/main.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as fs from "@std/fs"; import { getCodeGenerator, getTypeDefSources } from "./utils.ts"; diff --git a/src/typegraph/specs/codegen/src/cmd/utils.ts b/src/typegraph/specs/codegen/src/cmd/utils.ts index 08412a2a3b..21a9d0a392 100644 --- a/src/typegraph/specs/codegen/src/cmd/utils.ts +++ b/src/typegraph/specs/codegen/src/cmd/utils.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as path from "@std/path"; import TypeScriptCodeGenerator from "../lib/typescript.ts"; import RustLibCodeGenerator from "../lib/rust_lib.ts"; diff --git a/src/typegraph/specs/codegen/src/lib/base.ts b/src/typegraph/specs/codegen/src/lib/base.ts index 58087f2030..b8b533b471 100644 --- a/src/typegraph/specs/codegen/src/lib/base.ts +++ b/src/typegraph/specs/codegen/src/lib/base.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { SyntaxNode } from "tree-sitter"; import { getImports, diff --git a/src/typegraph/specs/codegen/src/lib/python.ts b/src/typegraph/specs/codegen/src/lib/python.ts index e6d3527968..44c76129dd 100644 --- a/src/typegraph/specs/codegen/src/lib/python.ts +++ b/src/typegraph/specs/codegen/src/lib/python.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as fs from "@std/fs"; import * as path from "@std/path"; import { TypeDefProcessor } from "./base.ts"; diff --git a/src/typegraph/specs/codegen/src/lib/rust_lib.ts b/src/typegraph/specs/codegen/src/lib/rust_lib.ts index 1416cfa984..54a4cb9151 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_lib.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_lib.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as path from "@std/path"; import { toPascalCase } from "@std/text"; import { TypeDefProcessor } from "./base.ts"; diff --git a/src/typegraph/specs/codegen/src/lib/rust_rpc.ts b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts index c0b1c8ec76..0acd2f1c22 100644 --- a/src/typegraph/specs/codegen/src/lib/rust_rpc.ts +++ b/src/typegraph/specs/codegen/src/lib/rust_rpc.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as path from "@std/path"; import { toPascalCase } from "@std/text"; import type { FuncDef, TypeDefSource } from "./base.ts"; diff --git a/src/typegraph/specs/codegen/src/lib/treesitter.ts b/src/typegraph/specs/codegen/src/lib/treesitter.ts index 1b6b0151dc..e8c5164c1b 100644 --- a/src/typegraph/specs/codegen/src/lib/treesitter.ts +++ b/src/typegraph/specs/codegen/src/lib/treesitter.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import Parser, { type SyntaxNode } from "tree-sitter"; import TypeScript from "tree-sitter-typescript"; diff --git a/src/typegraph/specs/codegen/src/lib/typescript.ts b/src/typegraph/specs/codegen/src/lib/typescript.ts index 65bcc77e90..089b78f6d1 100644 --- a/src/typegraph/specs/codegen/src/lib/typescript.ts +++ b/src/typegraph/specs/codegen/src/lib/typescript.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import * as fs from "@std/fs"; import * as path from "@std/path"; import { toCamelCase } from "@std/text"; diff --git a/src/typegraph/specs/codegen/tests/python.test.ts b/src/typegraph/specs/codegen/tests/python.test.ts index addf8df0ac..9219e4f512 100644 --- a/src/typegraph/specs/codegen/tests/python.test.ts +++ b/src/typegraph/specs/codegen/tests/python.test.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { assertEquals } from "jsr:@std/assert"; import PythonCodeGenerator from "../src/lib/python.ts"; import * as utils from "./utils.ts"; diff --git a/src/typegraph/specs/codegen/tests/rust_lib.test.ts b/src/typegraph/specs/codegen/tests/rust_lib.test.ts index 6738833e82..413a6ad467 100644 --- a/src/typegraph/specs/codegen/tests/rust_lib.test.ts +++ b/src/typegraph/specs/codegen/tests/rust_lib.test.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { assertEquals } from "jsr:@std/assert"; import RustLibCodeGenerator from "../src/lib/rust_lib.ts"; import * as utils from "./utils.ts"; diff --git a/src/typegraph/specs/codegen/tests/treesitter.test.ts b/src/typegraph/specs/codegen/tests/treesitter.test.ts index 579b5e2683..445de70145 100644 --- a/src/typegraph/specs/codegen/tests/treesitter.test.ts +++ b/src/typegraph/specs/codegen/tests/treesitter.test.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { assertEquals } from "jsr:@std/assert"; import { getTypeDefs, parseTypeScript } from "../src/lib/treesitter.ts"; diff --git a/src/typegraph/specs/codegen/tests/typescript.test.ts b/src/typegraph/specs/codegen/tests/typescript.test.ts index 26f97dbdb6..fa1126bdf4 100644 --- a/src/typegraph/specs/codegen/tests/typescript.test.ts +++ b/src/typegraph/specs/codegen/tests/typescript.test.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { assertEquals } from "jsr:@std/assert"; import TypeScriptCodeGenerator from "../src/lib/typescript.ts"; import * as utils from "./utils.ts"; diff --git a/src/typegraph/specs/codegen/tests/utils.ts b/src/typegraph/specs/codegen/tests/utils.ts index 22f8302339..4638c122a6 100644 --- a/src/typegraph/specs/codegen/tests/utils.ts +++ b/src/typegraph/specs/codegen/tests/utils.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + const typeAliasCase = ` type Foo = Bar; `; diff --git a/src/typegraph/specs/types/aws.d.ts b/src/typegraph/specs/types/aws.d.ts index 4b08cda420..716d029900 100644 --- a/src/typegraph/specs/types/aws.d.ts +++ b/src/typegraph/specs/types/aws.d.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { MaterializerId, RuntimeId } from "./core.d.ts"; import type { UInt } from "./primitives.d.ts"; diff --git a/src/typegraph/specs/types/core.d.ts b/src/typegraph/specs/types/core.d.ts index 99297e38a4..fdaaf3bf48 100644 --- a/src/typegraph/specs/types/core.d.ts +++ b/src/typegraph/specs/types/core.d.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { Float, SInt, UInt } from "./primitives.d.ts"; type Error = { diff --git a/src/typegraph/specs/types/primitives.d.ts b/src/typegraph/specs/types/primitives.d.ts index dd860eedcc..badff57f42 100644 --- a/src/typegraph/specs/types/primitives.d.ts +++ b/src/typegraph/specs/types/primitives.d.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + type UInt = number; type SInt = number; type Float = number; diff --git a/src/typegraph/specs/types/runtimes.d.ts b/src/typegraph/specs/types/runtimes.d.ts index a13edb6445..1feb7cbf4f 100644 --- a/src/typegraph/specs/types/runtimes.d.ts +++ b/src/typegraph/specs/types/runtimes.d.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { FuncParams, MaterializerId, diff --git a/src/typegraph/specs/types/utils.d.ts b/src/typegraph/specs/types/utils.d.ts index 9eda1f1194..0e1ca0dcbf 100644 --- a/src/typegraph/specs/types/utils.d.ts +++ b/src/typegraph/specs/types/utils.d.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { TypeId } from "./core.d.ts"; import type { UInt } from "./primitives.d.ts"; diff --git a/tests/metagen/typegraphs/identities/py/handlers_types.py b/tests/metagen/typegraphs/identities/py/handlers_types.py index 275a619d37..ef17a2aaeb 100644 --- a/tests/metagen/typegraphs/identities/py/handlers_types.py +++ b/tests/metagen/typegraphs/identities/py/handlers_types.py @@ -12,6 +12,7 @@ class Ctx: def gql(self, query: str, variables: str) -> Any: pass + class Struct: def repr(self): return asdict(self) @@ -210,14 +211,12 @@ class SimpleCycles3(Struct): FORWARD_REFS["SimpleCycles3"] = SimpleCycles3 - def __repr(value: Any): if isinstance(value, Struct): return value.repr() return value - def typed_primitives(user_fn: Callable[[PrimitivesArgs, Ctx], Primitives]): def exported_wrapper(raw_inp, ctx): inp: PrimitivesArgs = Struct.new(PrimitivesArgs, raw_inp) @@ -260,5 +259,3 @@ def exported_wrapper(raw_inp, ctx): return __repr(out) return exported_wrapper - - diff --git a/tests/metagen/typegraphs/sample/py/client.py b/tests/metagen/typegraphs/sample/py/client.py index e770cd6dd7..10a2eb34dc 100644 --- a/tests/metagen/typegraphs/sample/py/client.py +++ b/tests/metagen/typegraphs/sample/py/client.py @@ -890,4 +890,3 @@ def mixed_union(self, args: typing.Union[RootCompositeArgsFnInput, PlaceholderAr "$q" )[0] return QueryNode(node.node_name, node.instance_name, node.args, node.sub_nodes) - diff --git a/tests/metagen/typegraphs/sample/rs/client.rs b/tests/metagen/typegraphs/sample/rs/client.rs index cea1a5270d..924e724864 100644 --- a/tests/metagen/typegraphs/sample/rs/client.rs +++ b/tests/metagen/typegraphs/sample/rs/client.rs @@ -2522,4 +2522,3 @@ impl QueryGraph { } } } - diff --git a/tests/metagen/typegraphs/sample/ts/client.ts b/tests/metagen/typegraphs/sample/ts/client.ts index c2f15f17cb..0c2619e473 100644 --- a/tests/metagen/typegraphs/sample/ts/client.ts +++ b/tests/metagen/typegraphs/sample/ts/client.ts @@ -951,4 +951,3 @@ export class QueryGraph extends _QueryGraphBase { return new QueryNode(inner) as QueryNode; } } - From 63afdea4531e7a6af2825bf265475a2429f5d6e1 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 18 Nov 2024 14:54:45 +0300 Subject: [PATCH 35/39] fix: docker build --- tools/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Dockerfile b/tools/Dockerfile index 468d2e6fbb..4af12f77a2 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -126,6 +126,7 @@ COPY --from=builder /app/src/typegate/engine/*.js /app/src/typegate/engine/*.ts COPY --from=builder /app/src/typegate/src ./src/typegate/src/ COPY --from=builder /app/src/typegate/deno.jsonc ./src/typegate/ COPY --from=builder /app/src/typegraph/deno/deno.json ./src/typegraph/deno/ +COPY --from=builder /app/src/typegraph/specs/codegen/deno.json ./src/typegraph/specs/codegen/ COPY --from=builder /app/tests/deno.jsonc ./tests/ COPY --from=builder /app/examples/deno.jsonc ./examples/ COPY tools/LICENSE-MPL-2.0.md LICENSE.md From 055bbcdd0d765bcd36757f5be301c6c9d99ca781 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 20 Nov 2024 12:32:14 +0300 Subject: [PATCH 36/39] fix: some parts --- deno.lock | 114 ++++++++++++++++++++++++ src/typegraph/python/typegraph/utils.py | 5 -- src/typegraph/specs/codegen/deno.jsonc | 7 +- tools/Dockerfile.dockerignore | 1 + tools/tasks/test.ts | 2 +- 5 files changed, 117 insertions(+), 12 deletions(-) diff --git a/deno.lock b/deno.lock index 89a3a6b3be..4ed8824f00 100644 --- a/deno.lock +++ b/deno.lock @@ -1339,6 +1339,120 @@ "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/unarchive.ts": "f6d0e9e75f470eeef5aecd0089169f4350fc30ebfdc05466bb7b30042294d6d3", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/url.ts": "e1ada6fd30fc796b8918c88456ea1b5bbd87a07d0a0538b092b91fd2bb9b7623", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/worker.ts": "ac4caf72a36d2e4af4f4e92f2e0a95f9fc2324b568640f24c7c2ff6dc0c11d62", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/engine/bindings.ts": "4529b86703a1512302164bca346c29df2a246d0ebbf20248cc39ee9745490dc1", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/config/types.ts": "73357168542ef041da67997acdd98097444d92f0a1663be03ad1523fd20f768c", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/query_engine.ts": "39281c309b3d72123fcd8695700bd2831956e09d2b1c082ef899886beea6ae82", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/main.ts": "f390cfd2b5b836f1a54fa9ea7d8a5f5ba80430b6e849032145c0a7c0ae7216f3", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/Runtime.ts": "cc476f09f7d32d10dec3812a9a589da2866247e2064ce149ea2dc68fca833730", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/deno/deno.ts": "9964279b30ab39827cb1691484adb84a04d764ba2746122af0dfcba13caa39e3", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/prisma.ts": "528ac16fd8cf6b415bb651351581cbe71c63a3044841945297b8017a1767cb16", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/python.ts": "4a067d196fbcce2978207de7dc61c734dcdc77f0100739080ae341af3c352adf", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/runtimes/wit_wire/mod.ts": "30cc5a895f3bc3b73f1593759815b21ac3592f147048bda610ba6d1550d162e9", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/artifacts/mod.ts": "13583fb57bb5280e26c50ae89834ab73b123b712eb14a1995af00267304fef97", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/mod.ts": "3401f26beae423b008480460495cf7a22791a53cce65fd0a941c34e4b65ee5b0", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", + "https://raw.githubusercontent.com/metatypedev/metatype/042ae807f5d4aa99ab37ed6021b2c9441280adcf/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/engine/bindings.ts": "f74df81c428c6ac60f254ad15667efdd08f6d2a4836635c9d8c8dd98269e9df0", "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", "https://raw.githubusercontent.com/metatypedev/metatype/d669167ea094cfcbd9ca4fed56075bbfc882722d/src/typegate/src/config.ts": "12c435a42969bf2dd2bbbc54f9b7bca155ca7314a6dd4f39ccb4863bd8d10a1c", diff --git a/src/typegraph/python/typegraph/utils.py b/src/typegraph/python/typegraph/utils.py index 7c374b3381..f1b151b7af 100644 --- a/src/typegraph/python/typegraph/utils.py +++ b/src/typegraph/python/typegraph/utils.py @@ -73,11 +73,6 @@ def build_reduce_entries(node: Any, paths: List[ReduceEntry], curr_path: List[st raise Exception(f"unsupported type {type(node)} at {'.'.join(curr_path)}") -# FIXME: What is this? -# def unpack_tarb64(tar_b64: str, dest: str): -# return sdk_utils.unpack_tarb64(tar_b64, dest) - - frozen_memo: Dict[str, FinalizationResult] = {} diff --git a/src/typegraph/specs/codegen/deno.jsonc b/src/typegraph/specs/codegen/deno.jsonc index ca00d40464..0967ef424b 100644 --- a/src/typegraph/specs/codegen/deno.jsonc +++ b/src/typegraph/specs/codegen/deno.jsonc @@ -1,6 +1 @@ -{ - "tasks": { - "codegen": "deno run --allow-env --allow-write --allow-read --allow-ffi --allow-run ./src/cmd/main.ts", - "test": "deno test --allow-env --allow-read --allow-ffi --allow-run" - } -} +{} diff --git a/tools/Dockerfile.dockerignore b/tools/Dockerfile.dockerignore index 009d0d863c..9defd95793 100644 --- a/tools/Dockerfile.dockerignore +++ b/tools/Dockerfile.dockerignore @@ -20,6 +20,7 @@ !examples/deno.jsonc !src/typegraph/deno/deno.json !tests/deno.jsonc +!src/typegraph/specs/codegen/deno.jsonc !deno.jsonc !deno.lock diff --git a/tools/tasks/test.ts b/tools/tasks/test.ts index 7eabe5c740..dc3f471608 100644 --- a/tools/tasks/test.ts +++ b/tools/tasks/test.ts @@ -41,7 +41,7 @@ export default { inherit: "ci", workingDir: "./src/typegraph/specs/codegen", async fn($) { - await $`bash -c "deno task test"`; + await $`bash -c "deno test --allow-env --allow-read --allow-ffi --allow-run"`; }, }, } satisfies Record; From af5a9b20120de5c602828fa362d66ffdef4ba928 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Wed, 20 Nov 2024 13:14:16 +0300 Subject: [PATCH 37/39] fix: dockerfile --- tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Dockerfile b/tools/Dockerfile index 4af12f77a2..598af1e254 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -126,7 +126,7 @@ COPY --from=builder /app/src/typegate/engine/*.js /app/src/typegate/engine/*.ts COPY --from=builder /app/src/typegate/src ./src/typegate/src/ COPY --from=builder /app/src/typegate/deno.jsonc ./src/typegate/ COPY --from=builder /app/src/typegraph/deno/deno.json ./src/typegraph/deno/ -COPY --from=builder /app/src/typegraph/specs/codegen/deno.json ./src/typegraph/specs/codegen/ +COPY --from=builder /app/src/typegraph/specs/codegen/deno.jsonc ./src/typegraph/specs/codegen/ COPY --from=builder /app/tests/deno.jsonc ./tests/ COPY --from=builder /app/examples/deno.jsonc ./examples/ COPY tools/LICENSE-MPL-2.0.md LICENSE.md From aea1bca4fd8713204a06f8eeeee746aa4eec4405 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Mon, 25 Nov 2024 09:04:52 +0300 Subject: [PATCH 38/39] fix: remove logger --- src/typegraph/core/src/lib.rs | 1 - src/typegraph/core/src/logger.rs | 39 -------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 src/typegraph/core/src/logger.rs diff --git a/src/typegraph/core/src/lib.rs b/src/typegraph/core/src/lib.rs index 0d1262f163..b34ebc0f7a 100644 --- a/src/typegraph/core/src/lib.rs +++ b/src/typegraph/core/src/lib.rs @@ -6,7 +6,6 @@ pub use types::sdk; mod conversion; mod global_store; -mod logger; mod params; mod runtimes; mod t; diff --git a/src/typegraph/core/src/logger.rs b/src/typegraph/core/src/logger.rs deleted file mode 100644 index 655ef2d7e3..0000000000 --- a/src/typegraph/core/src/logger.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -#[allow(unused)] -macro_rules! debug { - ( $($arg:tt)* ) => { - println!("debug: {}", format!($($arg)*)); - }; -} - -#[allow(unused)] -macro_rules! info { - ( $($arg:tt)* ) => { - println!("info: {}", format!($($arg)*)); - }; -} - -#[allow(unused)] -macro_rules! warning { - ( $($arg:tt)* ) => { - eprintln!("warning: {}", format!($($arg)*)); - }; -} - -#[allow(unused)] -macro_rules! error { - ( $($arg:tt)* ) => { - eprintln!("error: {}", format!($($arg)*)); - }; -} - -#[allow(unused)] -pub(crate) use debug; -#[allow(unused)] -pub(crate) use error; -#[allow(unused)] -pub(crate) use info; -#[allow(unused)] -pub(crate) use warning; From fbb7287c6d9457cd090e8043e79dbfed1a0c0551 Mon Sep 17 00:00:00 2001 From: luckasRanarison Date: Tue, 3 Dec 2024 08:11:56 +0300 Subject: [PATCH 39/39] fix: metagen test --- src/typegraph/deno/deno.json | 8 ++++-- tests/metagen/metagen_test.ts | 52 +---------------------------------- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index b8882556fc..b820ce11d3 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -6,9 +6,7 @@ }, "lint": { "rules": { - "exclude": [ - "no-external-import" - ] + "exclude": ["no-external-import"] } }, "exports": { @@ -16,6 +14,10 @@ "./deps/mod.ts": "./src/deps/mod.ts", "./effects.ts": "./src/effects.ts", "./envs/cli.ts": "./src/envs/cli.ts", + "./gen/core.ts": "./src/gen/core.ts", + "./gen/runtimes.ts": "./src/gen/runtimes.ts", + "./gen/aws.ts": "./src/gen/aws.ts", + "./gen/utils.ts": "./src/gen/utils.ts", "./index.ts": "./src/index.ts", "./io.ts": "./src/io.ts", "./metagen.ts": "./src/metagen.ts", diff --git a/tests/metagen/metagen_test.ts b/tests/metagen/metagen_test.ts index b091810888..b6639e8b17 100644 --- a/tests/metagen/metagen_test.ts +++ b/tests/metagen/metagen_test.ts @@ -11,7 +11,7 @@ import { testDir } from "test-utils/dir.ts"; import $ from "@david/dax"; import { z as zod } from "zod"; import { workspaceDir } from "test-utils/dir.ts"; -import { FdkOutput } from "@typegraph/sdk/gen/typegraph_core.d.ts"; +import { FdkOutput } from "@typegraph/sdk/gen/utils.ts"; import { createBucket } from "test-utils/s3.ts"; import { S3Client } from "aws-sdk/client-s3"; @@ -213,56 +213,6 @@ metagen: // } //}); - const sdkResults = [] as Array; - - await t.should("Run metagen within typescript", async () => { - const { tg } = await import("./typegraphs/metagen.ts"); - const { Metagen } = await import("@typegraph/sdk/metagen"); - const metagen = new Metagen(workspace, genConfig); - const generated = metagen.dryRun(tg, targetName); - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - }); - - await t.should("Run metagen within python", async () => { - const typegraphPath = join(import.meta.dirname!, "./typegraphs/metagen.py"); - const command = new Deno.Command("python3", { - args: [typegraphPath], - env: { - workspace_path: workspace, - gen_config: JSON.stringify(genConfig), - target_name: targetName, - }, - stderr: "piped", - stdout: "piped", - }); - - const child = command.spawn(); - const output = await child.output(); - if (output.success) { - const stdout = new TextDecoder().decode(output.stdout); - const generated = JSON.parse(stdout) as Array; - const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); - - await t.assertSnapshot(sorted); - - sdkResults.push(JSON.stringify(sorted, null, 2)); - } else { - const err = new TextDecoder().decode(output.stderr); - throw new Error(`metagen python: ${err}`); - } - }); - - if (sdkResults.length > 0) { - await t.should("SDKs should produce same metagen output", () => { - const [fromTs, fromPy] = sdkResults; - assertEquals(fromTs, fromPy); - }); - } -}); - Meta.test("Metagen within sdk with custom template", async (t) => { const workspace = join(import.meta.dirname!, "typegraphs").slice( workspaceDir.length,