diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b81d2d21a..00a4a90f1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,23 +13,42 @@ "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], // Set *default* container specific settings.json values on container create. - "settings": { - // GO - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go", - "go.goroot": "/usr/local/go", - - // Misc - "trailing-spaces.trimOnSave": true - }, + "customizations": { + "vscode": { + "settings": { + // GO + "go.toolsManagement.checkForUpdates": "local", + "go.useLanguageServer": true, + "go.gopath": "/go", + "go.goroot": "/usr/local/go", - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "golang.Go", - "graphql.vscode-graphql", - "rust-lang.rust-analyzer" - ], + // Formatting + "editor.formatOnSave": true, + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + + // Misc + "vsicons.dontShowNewVersionMessage": true, + "workbench.iconTheme": "vscode-icons", + "git.autofetch": true + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "DavidAnson.vscode-markdownlint", + "golang.Go", + "graphql.vscode-graphql", + "GraphQL.vscode-graphql-syntax", + "HashiCorp.terraform", + "rust-lang.rust-analyzer", + "sourcegraph.sourcegraph", + "vscode-icons-team.vscode-icons", + "xaver.clang-format", + "zxh404.vscode-proto3" + ] + } + }, // Use 'forwardPorts' to make a list of ports inside the container available locally. "appPort": [ @@ -48,4 +67,4 @@ "mounts": [ "source=realm-bashhistory,target=/commandhistory,type=volume" ] -} \ No newline at end of file +} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c5e2480b..c05379201 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,17 +50,17 @@ jobs: - name: Setup Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-11-03 + toolchain: nightly-2023-09-04 default: true profile: minimal - name: rust-cache uses: Swatinem/rust-cache@v2 with: workspaces: "./implants/ -> ../target" - - name: Install latest nextest release - uses: taiki-e/install-action@nextest - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov + - name: Install latest nextest & cargo-llvm-cov release + uses: taiki-e/install-action@v2.17.7 + with: + tool: nextest,cargo-llvm-cov - name: 🔎 Run tests run: cd ./implants/ && cargo llvm-cov nextest --lcov --output-path lcov.info - name: 📶 Upload Coverage Results diff --git a/.gitignore b/.gitignore index de3ebd698..102ebf495 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ cmd/implants/Cargo.lock # Build artifacts dist/** -build/** # Binaries for programs and plugins *.exe diff --git a/docs/_docs/dev-guide/introduction.md b/docs/_docs/dev-guide/introduction.md index c5e592483..6bf56a4f6 100644 --- a/docs/_docs/dev-guide/introduction.md +++ b/docs/_docs/dev-guide/introduction.md @@ -1,6 +1,6 @@ --- title: Introduction -tags: +tags: - Dev Guide description: Read this before contributing to Realm! permalink: dev-guide/introduction @@ -15,7 +15,7 @@ Realm is under heavy active development and documentation can go stale quickly i We will do our best during code review to catch changes that require documentation updates, but sometimes things will slip by. If you notice a discrepancy between our codebase and the documentation, please kindly [file an issue](https://github.com/kcarretto/realm/issues/new?labels=documentation&title=Documentation%20Discrepancy:&body=Please%20include%20the%20location%20of%20the%20inaccurate%20documentation%20and%20a%20helpful%20description%20of%20what%20needs%20improvement.) to track it or submit a PR to correct it. You can use the ["Edit this page"](https://github.com/kcarretto/realm/edit/main/docs/_docs/dev-guide/introduction.md) feature in the right navbar of the documentation to quickly navigate to the appropriate section of documentation that requires an update. -### Testing +### Testing Realm contains code across a variety of languages and frameworks. Testing helps ensure our codebase remains stable, enables us to refactor and develop new features with confidence, and can help new Realm developers understand the expected behavior of our code. Below is an outline of the testing requirements for each portion of the codebase, as well as guidance on testing best practices. @@ -60,7 +60,7 @@ A Task represents a set of instructions to perform on a Target system. For examp References malicious code or persistence mechanisms that are deployed to compromise target systems. Some configuration information for Implants (e.g. `ImplantConfigs`) can be managed through Tavern. ### Agent -An Agent is a type of implant which retrieves execution instructions by connecting to our backend infrastructure (calling back) and querying for new tasks. +An Agent is a type of implant which retrieves execution instructions by connecting to our backend infrastructure (calling back) and querying for new tasks. # Project Structure * **[.devcontainer](https://github.com/KCarretto/realm/tree/main/.devcontainer)** contains settings required for configuring a VSCode dev container that can be used for Realm development @@ -75,9 +75,9 @@ An Agent is a type of implant which retrieves execution instructions by connecti * **[implants/lib/tavern](https://github.com/KCarretto/realm/tree/main/implants/lib/tavern)** is the source of our agents graphql API to interface with Tavern (Rust) * **[tavern](https://github.com/KCarretto/realm/tree/main/tavern)** is the parent folder of Tavern related code and packages, and stores the `main.go` executable for the service * **[tavern/auth](https://github.com/KCarretto/realm/tree/main/tavern/auth)** is a package for managing authentication for Tavern, and is used by various packages that rely on obtaining viewer information - * **[tavern/ent](https://github.com/KCarretto/realm/tree/main/tavern/ent)** contains models and related code for interacting with the database (most of this is code generated by **[entgo](https://entgo.io/))** - * **[tavern/ent/schema](https://github.com/KCarretto/realm/tree/main/tavern/ent/schema)** contains the schema definitions for our DB models - * **[tavern/graphql](https://github.com/KCarretto/realm/tree/main/tavern/graphql)** contains our GraphQL definitions and resolvers (most of this code is generated by **[entgo](https://entgo.io/)** and **[gqlgen](https://github.com/99designs/gqlgen))** + * **[tavern/internal/ent](https://github.com/KCarretto/realm/tree/main/tavern/internal/ent)** contains models and related code for interacting with the database (most of this is code generated by **[entgo](https://entgo.io/))** + * **[tavern/internal/ent/schema](https://github.com/KCarretto/realm/tree/main/tavern/internal/ent/schema)** contains the schema definitions for our DB models + * **[tavern/internal/graphql](https://github.com/KCarretto/realm/tree/main/tavern/internal/graphql)** contains our GraphQL definitions and resolvers (most of this code is generated by **[entgo](https://entgo.io/)** and **[gqlgen](https://github.com/99designs/gqlgen))** * **[tavern/internal](https://github.com/KCarretto/realm/tree/main/tavern/internal)** contains various internal packages that makeup Tavern * **[tavern/internal/www](https://github.com/KCarretto/realm/tree/main/tavern/internal/www)** contains Tavern's UI code * **[terraform](https://github.com/KCarretto/realm/tree/main/terraform)** contains the Terraform used to deploy a production ready Realm instance. See [Tavern User Guide](https://docs.realm.pub/user-guide/tavern) to learn how to use. diff --git a/docs/_docs/dev-guide/tavern.md b/docs/_docs/dev-guide/tavern.md index 2733eac1b..1b090d64b 100644 --- a/docs/_docs/dev-guide/tavern.md +++ b/docs/_docs/dev-guide/tavern.md @@ -214,10 +214,10 @@ query get_task_res { ### Creating a New Model 1. Initialize the schema `cd tavern && go run entgo.io/ent/cmd/ent init ` -2. Update the generated file in `tavern/ent/schema/.go` +2. Update the generated file in `tavern/internal/ent/schema/.go` 3. Ensure you include a `func () Annotations() []schema.Annotation` method which returns a `entgql.QueryField()` annotation to tell entgo to generate a GraphQL root query for this model (if you'd like it to be queryable from the root query) -4. Update `tavern/graphql/gqlgen.yml` to include the ent types in the `autobind:` section (e.g.`- github.com/kcarretto/realm/tavern/ent/`) -5. **Optionally** update the `models:` section of `tavern/graphql/gqlgen.yml` to bind any GraphQL enum types to their respective `entgo` generated types (e.g. `github.com/kcarretto/realm/tavern/ent/.`) +4. Update `tavern/internal/graphql/gqlgen.yml` to include the ent types in the `autobind:` section (e.g.`- github.com/kcarretto/realm/tavern/internal/ent/`) +5. **Optionally** update the `models:` section of `tavern/internal/graphql/gqlgen.yml` to bind any GraphQL enum types to their respective `entgo` generated types (e.g. `github.com/kcarretto/realm/tavern/internal/ent/.`) 6. Run `go generate ./tavern/...` from the project root 7. If you added an annotation for a root query field (see above), you will notice auto-generated the `query.resolvers.go` file has been updated with new methods to query your model (e.g. `func (r *queryResolver) s ...`) * This must be implemented (e.g. `return r.client..Query().All(ctx)` where NAME is the name of your model) @@ -225,22 +225,22 @@ query get_task_res { ### Adding Mutations 1. Update the `mutation.graphql` schema file to include your new mutation and please include it in the section for the model it's mutating if applicable (e.g. createUser should be defined near all the related User mutations) - * **Note:** Input types such as `CreateInput` or `UpdateInput` will already be generated if you [added the appropriate annotations to your ent schema](https://entgo.io/docs/tutorial-todo-gql#install-and-configure-entgql). If you require custom input mutations (e.g. `ClaimTasksInput`) then add them to the `inputs.graphql` file (Golang code will be generated in tavern/graphql/models e.g. `models.ClaimTasksInput`). + * **Note:** Input types such as `CreateInput` or `UpdateInput` will already be generated if you [added the appropriate annotations to your ent schema](https://entgo.io/docs/tutorial-todo-gql#install-and-configure-entgql). If you require custom input mutations (e.g. `ClaimTasksInput`) then add them to the `inputs.graphql` file (Golang code will be generated in tavern/internal/graphql/models e.g. `models.ClaimTasksInput`). 2. Run `go generate ./...` -3. Implement generated the generated mutation resolver method in `tavern/graphql/mutation.resolvers.go` +3. Implement generated the generated mutation resolver method in `tavern/internal/graphql/mutation.resolvers.go` * Depending on the mutation you're trying to implement, a one liner such as `return r.client..Create().SetInput(input).Save(ctx)` might be sufficient -4. Please write a unit test for your new mutation by defining YAML test cases in a new `testdata/mutations` subdirectory with your mutations name (e.g. `tavern/graphql/testdata/mutations/mymutation/SomeTest.yml`) +4. Please write a unit test for your new mutation by defining YAML test cases in a new `testdata/mutations` subdirectory with your mutations name (e.g. `tavern/internal/graphql/testdata/mutations/mymutation/SomeTest.yml`) ### Code Generation Reference * After making a change, remember to run `go generate ./...` from the project root. -* `tavern/ent/schema` is a directory which defines our graph using database models (ents) and the relations between them +* `tavern/internal/ent/schema` is a directory which defines our graph using database models (ents) and the relations between them * `tavern/generate.go` is responsible for generating ents defined by the ent schema as well as updating the GraphQL schema and generating related code -* `tavern/ent/entc.go` is responsible for generating code for the entgo <-> 99designs/gqlgen GraphQL integration -* `tavern/graphql/schema/mutation.graphql` defines all mutations supported by our API -* `tavern/graphql/schema/query.graphql` is a GraphQL schema automatically generated by ent, providing useful types derived from our ent schemas as well as root-level queries defined by entgo annotations -* `tavern/graphql/schema/scalars.graphql` defines scalar GraphQL types that can be used to help with Go bindings (See [gqlgen docs](https://gqlgen.com/reference/scalars/) for more info) -* `tavern/graphql/schema/inputs.graphql` defines custom GraphQL inputs that can be used with your mutations (e.g. outside of the default auto-generated CRUD inputs) +* `tavern/internal/ent/entc.go` is responsible for generating code for the entgo <-> 99designs/gqlgen GraphQL integration +* `tavern/internal/graphql/schema/mutation.graphql` defines all mutations supported by our API +* `tavern/internal/graphql/schema/query.graphql` is a GraphQL schema automatically generated by ent, providing useful types derived from our ent schemas as well as root-level queries defined by entgo annotations +* `tavern/internal/graphql/schema/scalars.graphql` defines scalar GraphQL types that can be used to help with Go bindings (See [gqlgen docs](https://gqlgen.com/reference/scalars/) for more info) +* `tavern/internal/graphql/schema/inputs.graphql` defines custom GraphQL inputs that can be used with your mutations (e.g. outside of the default auto-generated CRUD inputs) ### YAML Test Reference @@ -274,7 +274,7 @@ This however restricts the available transport methods the agent may use to comm ### GraphQL Example -GraphQL mutations enable clients to _mutate_ or modify backend data. Tavern supports a variety of different mutations for interacting with the graph ([see schema](https://github.com/KCarretto/realm/blob/main/tavern/graphql/schema/mutation.graphql)). The two mutations agents rely on are `claimTasks` and `submitTaskResult` (covered in more detail below). GraphQL requests are submitted as HTTP POST requests to Tavern, with a JSON body including the GraphQL mutation. Below is an example JSON body that may be sent to the Tavern GraphQL API: +GraphQL mutations enable clients to _mutate_ or modify backend data. Tavern supports a variety of different mutations for interacting with the graph ([see schema](https://github.com/KCarretto/realm/blob/main/tavern/internal/graphql/schema/mutation.graphql)). The two mutations agents rely on are `claimTasks` and `submitTaskResult` (covered in more detail below). GraphQL requests are submitted as HTTP POST requests to Tavern, with a JSON body including the GraphQL mutation. Below is an example JSON body that may be sent to the Tavern GraphQL API: ```json { diff --git a/docs/_docs/user-guide/eldritch.md b/docs/_docs/user-guide/eldritch.md index 2e47bc264..d2a621679 100644 --- a/docs/_docs/user-guide/eldritch.md +++ b/docs/_docs/user-guide/eldritch.md @@ -56,6 +56,7 @@ It currently contains five modules: - `pivot` - Used to identify and move between systems. - `process` - Used to interact with processes on the system. - `sys` - General system capabilities can include loading libraries, or information about the current context. +- `crypto` - Used to encrypt/decrypt or hash data. Functions fall into one of these five modules. This is done to improve clarity about function use. @@ -143,7 +144,7 @@ The file.list method returns a list of files at the specified path. The p Each file is represented by a Dict type. Here is an example of the Dict layout: -```JSON +```json [ { "file_name": "implants", @@ -230,6 +231,28 @@ If a file or directory already exists at this path, the method will fail. `pivot.arp_scan(target_cidrs: List) -> List` The pivot.arp_scan method is being proposed to allow users to enumerate hosts on their network without using TCP connect or ping. +- `target_cidrs` must be in a CIDR format eg. `127.0.0.1/32`. Domains and single IPs `example.com` / `127.0.0.1` cannot be passed. +- Must be running as `root` to use. +- Not supported on Windows + +Results will be in the format: + +```python +$> pivot.arp_scan(["192.168.1.1/32"]) +``` +**Success** + +```json +[ + { "ip": "192.168.1.1", "mac": "ab:cd:ef:01:23:45", "interface": "eno0" } +] +``` + +**Failure** + +```json +[] +``` ### pivot.bind_proxy `pivot.bind_proxy(listen_address: str, listen_port: int, username: str, password: str ) -> None` @@ -255,7 +278,7 @@ Inputs: Results will be in the format: -```JSON +```json [ { "ip": "127.0.0.1", "port": 22, "protocol": "tcp", "status": "open"}, { "ip": "127.0.0.1", "port": 21, "protocol": "tcp", "status": "closed"}, @@ -366,12 +389,25 @@ sys.execute("/bin/bash",["-c", "ls /nofile"]) } ``` +### sys.get_env +`sys.get_env() -> Dict` + +The sys.get_env method returns a dictionary that describes the current process's environment variables. +An example is below: + +```json +{ + "FOO": "BAR", + "CWD": "/" +} +``` + ### sys.get_ip `sys.get_ip() -> List` The sys.get_ip method returns a list of network interfaces as a dictionary. An example is available below: -```JSON +```json [ { "name": "eth0", @@ -403,6 +439,44 @@ An example is below: "distro": "Debian GNU/Linux 10 (buster)", "platform": "Linux" } +``` + +### sys.get_pid +`sys.get_pid() -> int` + +The sys.get_pid method returns the process ID of the current process. +An example is below: + +```python +$> sys.get_pid() +123456 +``` + +### sys.get_user +`sys.get_user() -> Dict` + +The sys.get_user method returns a dictionary that describes the current process's running user. +On *Nix, will return UID, EUID, GID, EGID, and detailed user info for the UID and EUID mappings. +For users, will return name and groups of user. + +```json +{ + "uid": { + "uid": 0, + "name": "root", + "gid": 0, + "groups": ["root"] + }, + "euid": { + "uid": 0, + "name": "root", + "gid": 0, + "groups": ["root"] + }, + "gid": 0, + "egid": 0 +} +``` ### sys.is_linux `sys.is_linux() -> bool` @@ -439,3 +513,27 @@ sys.shell("ls /nofile") } ``` +## Crypto +### crypto.aes_encrypt_file +`crypto.aes_encrypt_file(src: str, dst: str, key: str) -> None` + +The crypto.aes_encrypt_file method encrypts the given src file, encrypts it using the given key and writes it to disk at the dst location. + +Key must be 16 Bytes (Characters) + +### crypto.aes_decrypt_file +`crypto.aes_decrypt_file(src: str, dst: str, key: str) -> None` + +The crypto.aes_decrypt_file method decrypts the given src file using the given key and writes it to disk at the dst location. + +Key must be 16 Bytes (Characters) + +### crypto.hash_file +`crypto.hash_file(file: str, algo: str) -> str` + +The crypto.hash_file method will produce the hash of the given file's contents. Valid algorithms include: + +- MD5 +- SHA1 +- SHA256 +- SHA512 diff --git a/go.sum b/go.sum index d84f9705e..5295fa87f 100644 --- a/go.sum +++ b/go.sum @@ -88,14 +88,12 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.24.4 h1:0gyJJEBYtCV87zI/x2nZCPyDxD51K6xM8SkwjHFCNEU= github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/zclconf/go-cty v1.13.0 h1:It5dfKTTZHe9aeppbNOda3mN7Ag7sg6QkBNm6TkyFa0= github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/implants/Cargo.toml b/implants/Cargo.toml index 166fbe8f7..4c76c8dd4 100644 --- a/implants/Cargo.toml +++ b/implants/Cargo.toml @@ -7,8 +7,9 @@ members = [ ] [workspace.dependencies] -allocative = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "acf638430a00ca3855862e8c669670e1adaa42aa" } -allocative_derive = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "acf638430a00ca3855862e8c669670e1adaa42aa" } +aes = "0.8.3" +allocative = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "1109aaf9b700d7cdd7ba48986aa650221b70a22f" } +allocative_derive = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "1109aaf9b700d7cdd7ba48986aa650221b70a22f" } anyhow = "1.0.65" assert_cmd = "2.0.6" async-recursion = "1.0.0" @@ -22,26 +23,33 @@ eval = "0.4.3" flate2 = "1.0.24" gazebo = "0.8.1" graphql_client = "0.12.0" +hex-literal = "0.4.1" httptest = "0.15.4" +ipnetwork = "0.20.0" itertools = "0.10" lsp-types = "0.93.0" +md5 = "0.7.0" network-interface = "1.0.1" nix = "0.26.1" -openssl = "0.10" +openssl = "0.10.55" +pnet = "0.34.0" predicates = "2.1" rand = "0.8.5" regex = "1.5.5" -reqwest = "0.11.4" +reqwest = "0.11.18" russh = "0.37.1" russh-keys = "0.37.1" rust-embed = "6.6.0" serde = "1.0" serde_json = "1.0.87" +sha1 = "0.10.5" +sha2 = "0.10.7" sha256 = "1.0.3" -starlark = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "acf638430a00ca3855862e8c669670e1adaa42aa" } +starlark = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "1109aaf9b700d7cdd7ba48986aa650221b70a22f" } +starlark_derive = { git = "https://github.com/facebookexperimental/starlark-rust", rev = "1109aaf9b700d7cdd7ba48986aa650221b70a22f" } structopt = "0.3.23" sys-info = "0.9.1" -sysinfo = "0.28.4" +sysinfo = "0.29.7" tar = "0.4.38" tavern = { path = "./lib/tavern" } tempfile = "3.3.0" @@ -59,4 +67,4 @@ strip = true # Automatically strip symbols from the binary. opt-level = "z" # Optimize for size. lto = true codegen-units = 1 -panic = "abort" \ No newline at end of file +panic = "abort" diff --git a/implants/golem/src/inter.rs b/implants/golem/src/inter.rs index 6a40a6525..053f7c3c6 100644 --- a/implants/golem/src/inter.rs +++ b/implants/golem/src/inter.rs @@ -99,7 +99,7 @@ fn drain(xs: impl Iterator, json: bool, stats: &mut Stats) { } fn interactive(ctx: &Context) -> anyhow::Result<()> { - let mut rl = ReadLine::new("STARLARK_RUST_HISTFILE"); + let mut rl = ReadLine::new("STARLARK_RUST_HISTFILE")?; loop { match rl.read_line("$> ")? { Some(line) => { diff --git a/implants/golem/src/inter/eval.rs b/implants/golem/src/inter/eval.rs index 8c970db3a..faec8f93c 100644 --- a/implants/golem/src/inter/eval.rs +++ b/implants/golem/src/inter/eval.rs @@ -31,6 +31,7 @@ use starlark::docs::render_docs_as_code; use starlark::docs::Doc; use starlark::docs::DocItem; + use starlark::docs::DocModule; use starlark::environment::FrozenModule; use starlark::environment::Globals; use starlark::environment::Module; @@ -136,15 +137,17 @@ } fn url_for_doc(doc: &Doc) -> LspUrl { - let url = match &doc.item { - DocItem::Module(_) => Url::parse("starlark:/native/builtins.bzl").unwrap(), - DocItem::Object(_) => { - Url::parse(&format!("starlark:/native/builtins/{}.bzl", doc.id.name)).unwrap() - } - DocItem::Function(_) => Url::parse("starlark:/native/builtins.bzl").unwrap(), - }; - LspUrl::try_from(url).unwrap() - } + let url = match &doc.item { + DocItem::Module(_) => Url::parse("starlark:/native/builtins.bzl").unwrap(), + DocItem::Object(_) => { + Url::parse(&format!("starlark:/native/builtins/{}.bzl", doc.id.name)).unwrap() + } + DocItem::Function(_) | DocItem::Property(_) => { + Url::parse("starlark:/native/builtins.bzl").unwrap() + } + }; + LspUrl::try_from(url).unwrap() + } fn new_module(prelude: &[FrozenModule]) -> Module { let module = Module::new(); @@ -273,51 +276,58 @@ } } - impl LspContext for Context { - fn parse_file_with_contents(&self, uri: &LspUrl, content: String) -> LspEvalResult { - match uri { - LspUrl::File(uri) => { - let EvalResult { messages, ast } = - self.file_with_contents(&uri.to_string_lossy(), content); - LspEvalResult { - diagnostics: messages.map(Diagnostic::from).collect(), - ast, - } - } - _ => LspEvalResult::default(), - } - } +impl LspContext for Context { + fn parse_file_with_contents(&self, uri: &LspUrl, content: String) -> LspEvalResult { + match uri { + LspUrl::File(uri) => { + let EvalResult { messages, ast } = + self.file_with_contents(&uri.to_string_lossy(), content); + LspEvalResult { + diagnostics: messages.map(Diagnostic::from).collect(), + ast, + } + } + _ => LspEvalResult::default(), + } + } - fn resolve_load(&self, path: &str, current_file: &LspUrl) -> anyhow::Result { - let path = PathBuf::from(path); - match current_file { - LspUrl::File(current_file_path) => { - let current_file_dir = current_file_path.parent(); - let absolute_path = match (current_file_dir, path.is_absolute()) { - (_, true) => Ok(path), - (Some(current_file_dir), false) => Ok(current_file_dir.join(&path)), - (None, false) => Err(ResolveLoadError::MissingCurrentFilePath(path)), - }?; - Ok(Url::from_file_path(absolute_path).unwrap().try_into()?) - } - _ => Err( - ResolveLoadError::WrongScheme("file://".to_owned(), current_file.clone()).into(), - ), - } - } + fn resolve_load( + &self, + path: &str, + current_file: &LspUrl, + _workspace_root: Option<&Path>, + ) -> anyhow::Result { + let path = PathBuf::from(path); + match current_file { + LspUrl::File(current_file_path) => { + let current_file_dir = current_file_path.parent(); + let absolute_path = match (current_file_dir, path.is_absolute()) { + (_, true) => Ok(path), + (Some(current_file_dir), false) => Ok(current_file_dir.join(&path)), + (None, false) => Err(ResolveLoadError::MissingCurrentFilePath(path)), + }?; + Ok(Url::from_file_path(absolute_path).unwrap().try_into()?) + } + _ => Err( + ResolveLoadError::WrongScheme("file://".to_owned(), current_file.clone()).into(), + ), + } + } fn resolve_string_literal( - &self, - literal: &str, - current_file: &LspUrl, - ) -> anyhow::Result> { - self.resolve_load(literal, current_file).map(|url| { - Some(StringLiteralResult { - url, - location_finder: None, - }) - }) - } + &self, + literal: &str, + current_file: &LspUrl, + workspace_root: Option<&Path>, + ) -> anyhow::Result> { + self.resolve_load(literal, current_file, workspace_root) + .map(|url| { + Some(StringLiteralResult { + url, + location_finder: None, + }) + }) + } fn get_load_contents(&self, uri: &LspUrl) -> anyhow::Result> { match uri { @@ -341,6 +351,19 @@ ) -> anyhow::Result> { Ok(self.builtin_symbols.get(symbol).cloned()) } + + fn render_as_load( + &self, + _target: &LspUrl, + _current_file: &LspUrl, + _workspace_root: Option<&Path>, + ) -> anyhow::Result { + Err(anyhow::anyhow!("Not yet implemented, render_as_load")) + } + + fn get_environment(&self, _uri: &LspUrl) -> DocModule { + DocModule::default() + } } pub(crate) fn globals() -> Globals { diff --git a/implants/golem/tests/cli.rs b/implants/golem/tests/cli.rs index 3452be463..c4ee8c492 100644 --- a/implants/golem/tests/cli.rs +++ b/implants/golem/tests/cli.rs @@ -30,7 +30,7 @@ fn test_golem_main_syntax_fail() -> anyhow::Result<()> { cmd.arg("../../tests/golem_cli_test/syntax_fail.tome"); cmd.assert() .failure() - .stderr(predicate::str::contains("[TASK ERROR] ../../tests/golem_cli_test/syntax_fail.tome: [eldritch] Unable to parse eldritch tome: error: Parse error: unexpected string literal \'win\' here")); + .stderr(predicate::str::contains("[TASK ERROR] ../../tests/golem_cli_test/syntax_fail.tome: [eldritch] Unable to parse eldritch tome: error: Parse error: unexpected string literal \"win\" here")); Ok(()) } diff --git a/implants/lib/eldritch/Cargo.toml b/implants/lib/eldritch/Cargo.toml index bb69e104c..33145598a 100644 --- a/implants/lib/eldritch/Cargo.toml +++ b/implants/lib/eldritch/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] +aes = { workspace = true } allocative = { workspace = true } allocative_derive = { workspace = true } anyhow = { workspace = true } @@ -14,7 +15,9 @@ derive_more = { workspace = true } eval = { workspace = true } flate2 = { workspace = true } gazebo = { workspace = true } -network-interface = { workspace = true } +hex-literal = { workspace = true } +ipnetwork = { workspace = true } +md5 = { workspace = true } nix = { workspace = true } regex = { workspace = true } reqwest = { workspace = true , features = ["blocking", "stream"] } @@ -23,6 +26,8 @@ russh-keys = { workspace = true } rust-embed = { workspace = true } serde = { version = "1.0", features = ["derive"] } serde_json = { workspace = true } +sha1 = { workspace = true } +sha2 = { workspace = true } sha256 = { workspace = true } starlark = { workspace = true } sysinfo = { workspace = true } @@ -41,5 +46,11 @@ windows-sys = { workspace = true, features = [ ]} whoami = { workspace = true } +[target.'cfg(windows)'.dependencies] +network-interface = { workspace = true } + +[target.'cfg(not(windows))'.dependencies] +pnet = { workspace = true } + [dev-dependencies] httptest = { workspace = true } diff --git a/implants/lib/eldritch/src/assets.rs b/implants/lib/eldritch/src/assets.rs index 7ae52f730..26616c9e2 100644 --- a/implants/lib/eldritch/src/assets.rs +++ b/implants/lib/eldritch/src/assets.rs @@ -8,8 +8,8 @@ use derive_more::Display; use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; use starlark::values::none::NoneType; -use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType}; -use starlark::{starlark_type, starlark_simple_value, starlark_module}; +use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, starlark_value}; +use starlark::{starlark_simple_value, starlark_module}; use serde::{Serialize,Serializer}; use rust_embed::RustEmbed; @@ -30,9 +30,9 @@ pub struct Asset; pub struct AssetsLibrary(); starlark_simple_value!(AssetsLibrary); +#[allow(non_upper_case_globals)] +#[starlark_value(type = "assets_library")] impl<'v> StarlarkValue<'v> for AssetsLibrary { - starlark_type!("assets_library"); - fn get_methods() -> Option<&'static Methods> { static RES: MethodsStatic = MethodsStatic::new(); RES.methods(methods) diff --git a/implants/lib/eldritch/src/crypto.rs b/implants/lib/eldritch/src/crypto.rs new file mode 100644 index 000000000..94c5aae37 --- /dev/null +++ b/implants/lib/eldritch/src/crypto.rs @@ -0,0 +1,67 @@ +mod aes_encrypt_file_impl; +mod aes_decrypt_file_impl; +mod hash_file_impl; + +use allocative::Allocative; +use derive_more::Display; + +use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; +use starlark::values::none::NoneType; +use starlark::values::starlark_value; +use starlark::values::{StarlarkValue, Value, Heap, dict::Dict, UnpackValue, ValueLike, ProvidesStaticType}; +use starlark::{starlark_simple_value, starlark_module}; + +use serde::{Serialize,Serializer}; + +#[derive(Copy, Clone, Debug, PartialEq, Display, ProvidesStaticType, Allocative)] +#[display(fmt = "CryptoLibrary")] +pub struct CryptoLibrary(); +starlark_simple_value!(CryptoLibrary); + +#[allow(non_upper_case_globals)] +#[starlark_value(type = "sys_library")] +impl<'v> StarlarkValue<'v> for CryptoLibrary { + + fn get_methods() -> Option<&'static Methods> { + static RES: MethodsStatic = MethodsStatic::new(); + RES.methods(methods) + } +} + +impl Serialize for CryptoLibrary { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_none() + } +} + +impl<'v> UnpackValue<'v> for CryptoLibrary { + fn expected() -> String { + CryptoLibrary::get_type_value_static().as_str().to_owned() + } + + fn unpack_value(value: Value<'v>) -> Option { + Some(*value.downcast_ref::().unwrap()) + } +} + +// This is where all of the "crypto.X" impl methods are bound +#[starlark_module] +fn methods(builder: &mut MethodsBuilder) { + fn aes_encrypt_file<'v>(this: CryptoLibrary, src: String, dst: String, key: String) -> anyhow::Result { + if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } + aes_encrypt_file_impl::encrypt_file(src, dst, key)?; + Ok(NoneType{}) + } + fn aes_decrypt_file<'v>(this: CryptoLibrary, src: String, dst: String, key: String) -> anyhow::Result { + if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } + aes_decrypt_file_impl::decrypt_file(src, dst, key)?; + Ok(NoneType{}) + } + fn hash_file<'v>(this: CryptoLibrary, file: String, algo: String) -> anyhow::Result { + if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } + hash_file_impl::hash_file(file, algo) + } +} diff --git a/implants/lib/eldritch/src/crypto/aes_decrypt_file_impl.rs b/implants/lib/eldritch/src/crypto/aes_decrypt_file_impl.rs new file mode 100644 index 000000000..fafff4d70 --- /dev/null +++ b/implants/lib/eldritch/src/crypto/aes_decrypt_file_impl.rs @@ -0,0 +1,126 @@ +use std::fs::{File, rename}; +use std::io::{Read, Write}; +use std::path::Path; +use aes::cipher::BlockSizeUser; +use anyhow::{anyhow, Result}; +use tempfile::NamedTempFile; + +use aes::Aes128; +use aes::cipher::{ + BlockDecrypt, KeyInit, + generic_array::GenericArray, +}; + +pub fn decrypt_file(src: String, dst: String, key: String) -> Result<()> { + if !Path::new(&dst).exists() { + File::create(dst.clone())?; + } + let key_bytes = key.as_bytes(); + if key_bytes.len() != 16 { + return Err(anyhow!("Key size must be 16 bytes (characters)")); + } + let key_bytes: [u8; 16] = key_bytes[..16].try_into()?; + let key = GenericArray::from(key_bytes); + let mut block = GenericArray::from([0u8; 16]); + let cipher = Aes128::new(&key); + let mut src_file = File::open(src.clone())?; + let mut src_len = src_file.metadata()?.len(); + if src_len % Aes128::block_size() as u64 != 0 { + return Err(anyhow!("File size must be a multiple of 16 bytes")); + } + let mut out_file = NamedTempFile::new()?; + while let Ok(_n) = src_file.read(&mut block[..]) { + if src_len == 0 { + break; + } + cipher.decrypt_block(&mut block); + src_len -= 16; + if src_len == 0 { + let last_byte = block[15]; + if last_byte < 16 && last_byte > 0 { + let suspected_padding = &block[(16 - last_byte) as usize ..=15]; + let mut invalid = false; + for byte in suspected_padding { + if byte != &last_byte { + invalid = true; + break; + } + } + if !invalid { + out_file.write(&block[..(16 - last_byte) as usize])?; + continue; + } + } + } + out_file.write(&block)?; + block = GenericArray::from([0u8; 16]); + } + drop(src_file); + rename(out_file.path(), dst)?; + Ok(()) +} + +#[cfg(test)] +mod tests { + use std::{fs::File, io::{Write, Read}}; + + use tempfile::TempDir; + use anyhow::Result; + + use super::decrypt_file; + + use sha1::{Sha1, Digest}; + use hex_literal::hex; + + #[test] + fn test_decrypt() -> Result<()> { + let lorem_encrypted = hex!("9c0a 9d0b bf63 8f19 e8bd f28f f742 9513 fdbb c517 4c9a 8e29 473d a80e 4c38 f052 386b 4bf4 b432 e270 3090 f4dd 4cf6 dfb5 1802 9c49 e5e7 32e3 ec6e fe2a 3ba9 1bba 78bd 6752 08ea 520d 5ee4 a116 b24d 889e 0d5a 6da2 6baf 5d55 6122 28f6 1741 4035 eeed 2fab 2597 5de6 80f6 cff4 5308 06c6 c2e1 30ba 88e6 0654 80f5 af9a 03bf 0af6 2940 7a2b e1a4 ab09 8551 98e5 f455 235b 6094 18aa a388 974f 9580 39fa eed1 20f8 2754 5666 cb25 4b24 9dd8 7cf7 9c8a 4161 f4ef dc44 3d2a 1b9a ab66 5b4d 8bfd 82aa 70a9 cbba ede3 af9a 2e78 04d5 ecb4 5387 6594 8662 dd7a 90ad b03d 9a57 c7a4 d17d 4373 29b1 d073 92b2 9ae5 6da9 af4d 9ba7 edd8 2e82 1846 1355 9cc0 9707 c946 b805 ca7f e9bb 6f0e 64fe bfda de74 f61d 9138 7b8b 48f0 4d48 78f0 1c35 6970 f7b7 22ed da6e dddb 0d1f 2e21 b952 a592 bcde 0823 7329 372a 8c0c e824 58d9 ad36 2282 dfa6 48b1 0e50 fc77 cbd9 3b02 f80c ca2d cf46 194d d1b7 0f36 f7e6 6abb fbd1 13e2 083a ab0f 2835 b7bd d820 052e f7cf f6cb c30f c22e be5b 7372 a8c1 f4e0 8a2a 1602 d43e de29 3282 ecd6 1aee 4bbb a2b8 9bbf 7693 5e21 3c02 4bc0 910d e01c 1228 d219 b7e1 895e 303e 0c85 c375 7de3 bd3f 4b5f da33 82bf 34db 298b 06d2 40a6 81c0 a70f 4e1f"); + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + let test_dec_path = tmp_dir.path().join("test.txt.dec"); + { + let mut tmp_file = File::create(test_path.clone())?; + tmp_file.write(&lorem_encrypted)?; + } + decrypt_file(test_path.to_str().unwrap().to_owned(), test_dec_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!".to_string())?; + + let mut hasher = Sha1::new(); + let mut dec_f = File::open(test_dec_path)?; + let mut dec_f_content = Vec::new(); + dec_f.read_to_end(&mut dec_f_content)?; + hasher.update(dec_f_content); + let result = hasher.finalize(); + + assert_eq!(result[..], hex!("4518012e1b365e504001dbc94120624f15b8bbd5")); + Ok(()) + } + + #[test] + fn test_decrypt_bad_password() -> Result<()> { + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + assert!(decrypt_file(test_path.to_str().unwrap().to_owned(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!!".to_string()).is_err()); + assert!(decrypt_file(test_path.to_str().unwrap().to_owned(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD".to_string()).is_err()); + Ok(()) + } + + #[test] + fn test_decrypt_no_file() -> Result<()> { + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + assert!(decrypt_file("/I/Dont/Exist".to_string(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!".to_string()).is_err()); + Ok(()) + } + + #[test] + fn test_decrypt_bad_size() -> Result<()> { + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + { + let mut tmp_file = File::create(test_path.clone())?; + tmp_file.write(&[0u8; 15])?; + } + assert!(decrypt_file(test_path.to_str().unwrap().to_owned(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!".to_string()).is_err()); + Ok(()) + } +} diff --git a/implants/lib/eldritch/src/crypto/aes_encrypt_file_impl.rs b/implants/lib/eldritch/src/crypto/aes_encrypt_file_impl.rs new file mode 100644 index 000000000..94bb5268b --- /dev/null +++ b/implants/lib/eldritch/src/crypto/aes_encrypt_file_impl.rs @@ -0,0 +1,101 @@ +use std::fs::{File, rename}; +use std::io::{Read, Write}; +use std::path::Path; +use anyhow::{anyhow, Result}; +use tempfile::NamedTempFile; +use aes::Aes128; +use aes::cipher::{ + BlockEncrypt, KeyInit, + generic_array::GenericArray, +}; + +pub fn encrypt_file(src: String, dst: String, key: String) -> Result<()> { + if !Path::new(&dst).exists() { + File::create(dst.clone())?; + } + let key_bytes = key.as_bytes(); + if key_bytes.len() != 16 { + return Err(anyhow!("Key size must be 16 bytes (characters)")); + } + let key_bytes: [u8; 16] = key_bytes[..16].try_into()?; + let key = GenericArray::from(key_bytes); + + let mut block = GenericArray::from([0; 16]); + let cipher = Aes128::new(&key); + let mut src_file = File::open(src.clone())?; + let mut out_file = NamedTempFile::new()?; + while let Ok(n) = src_file.read(&mut block[..]) { + if n == 0 { + break; + } + if n != 16 { + let mut short_buffer = Vec::with_capacity(n); + for i in 0..n { + short_buffer.push(block[i]); + } + for _ in 0..(16-n) { + short_buffer.push((16 - n).try_into()?); + } + block = GenericArray::from_iter(short_buffer); + } + cipher.encrypt_block(&mut block); + out_file.write(&block)?; + block = GenericArray::from([0u8; 16]); + } + drop(src_file); + rename(out_file.path(), dst)?; + Ok(()) +} + +#[cfg(test)] +mod tests { + use std::{fs::File, io::{Write, Read}}; + + use tempfile::TempDir; + use anyhow::Result; + + use super::encrypt_file; + + use sha1::{Sha1, Digest}; + use hex_literal::hex; + + #[test] + fn test_encrypt() -> Result<()> { + let lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n"; + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + let test_enc_path = tmp_dir.path().join("test.txt.enc"); + { + let mut tmp_file = File::create(test_path.clone())?; + write!(tmp_file, "{}", lorem)?; + } + encrypt_file(test_path.to_str().unwrap().to_owned(), test_enc_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!".to_string())?; + + let mut hasher = Sha1::new(); + let mut enc_f = File::open(test_enc_path)?; + let mut enc_f_content = Vec::new(); + enc_f.read_to_end(&mut enc_f_content)?; + hasher.update(enc_f_content); + let result = hasher.finalize(); + + assert_eq!(result[..], hex!("df8a71c3a05157dc6dfc3ea3a82811e1a45e6b9c")); + Ok(()) + } + + #[test] + fn test_encrypt_bad_password() -> Result<()> { + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + assert!(encrypt_file(test_path.to_str().unwrap().to_owned(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!!".to_string()).is_err()); + assert!(encrypt_file(test_path.to_str().unwrap().to_owned(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD".to_string()).is_err()); + Ok(()) + } + + #[test] + fn test_encrypt_no_file() -> Result<()> { + let tmp_dir = TempDir::new()?; + let test_path = tmp_dir.path().join("test.txt"); + assert!(encrypt_file("/I/Dont/Exist".to_string(), test_path.to_str().unwrap().to_owned(), "TESTINGPASSWORD!".to_string()).is_err()); + Ok(()) + } +} diff --git a/implants/lib/eldritch/src/crypto/hash_file_impl.rs b/implants/lib/eldritch/src/crypto/hash_file_impl.rs new file mode 100644 index 000000000..1117c20b9 --- /dev/null +++ b/implants/lib/eldritch/src/crypto/hash_file_impl.rs @@ -0,0 +1,83 @@ +use std::fs::File; +use std::io::Read; + +use sha1::{Sha1, Digest}; +use sha2::{Sha256, Sha512}; + +use anyhow::{anyhow, Result}; + +pub fn hash_file(file: String, algo: String) -> Result { + let mut file_data = String::new(); + File::open(file)?.read_to_string(&mut file_data)?; + match algo.to_lowercase().as_str() { + "md5" => { + Ok(format!("{:02x}", md5::compute(file_data.as_bytes()))) + }, + "sha1" => { + let mut hasher = Sha1::new(); + hasher.update(&file_data); + Ok(format!("{:02x}", hasher.finalize())) + }, + "sha256" => { + let mut hasher = Sha256::new(); + hasher.update(&file_data); + Ok(format!("{:02x}", hasher.finalize())) + }, + "sha512" => { + let mut hasher = Sha512::new(); + hasher.update(&file_data); + Ok(format!("{:02x}", hasher.finalize())) + }, + _ => Err(anyhow!("Unknown algorithm: {}", algo)) + } +} + +#[cfg(test)] +mod tests { + use anyhow::Result; + use std::{fs::File, io::Write}; + + use tempfile::NamedTempFile; + + use super::hash_file; + + #[test] + fn test_hash() -> Result<()> { + let lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + let lorem_hash_md5 = "db89bb5ceab87f9c0fcc2ab36c189c2c"; + let lorem_hash_sha1 = "cd36b370758a259b34845084a6cc38473cb95e27"; + let lorem_hash_sha256 = "2d8c2f6d978ca21712b5f6de36c9d31fa8e96a4fa5d8ff8b0188dfb9e7c171bb"; + let lorem_hash_sha512 = "8ba760cac29cb2b2ce66858ead169174057aa1298ccd581514e6db6dee3285280ee6e3a54c9319071dc8165ff061d77783100d449c937ff1fb4cd1bb516a69b9"; + let tmp_file = NamedTempFile::new()?; + let path = String::from(tmp_file.path().to_str().unwrap()).clone(); + { + let mut f = File::create(path.clone())?; + write!(f, "{}", lorem)?; + } + + assert_eq!(hash_file(path.clone(), "md5".to_string())?, lorem_hash_md5); + assert_eq!(hash_file(path.clone(), "sha1".to_string())?, lorem_hash_sha1); + assert_eq!(hash_file(path.clone(), "sha256".to_string())?, lorem_hash_sha256); + assert_eq!(hash_file(path.clone(), "sha512".to_string())?, lorem_hash_sha512); + Ok(()) + } + + #[test] + fn test_hash_invalid() -> Result<()> { + let lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + let tmp_file = NamedTempFile::new()?; + let path = String::from(tmp_file.path().to_str().unwrap()).clone(); + { + let mut f = File::create(path.clone())?; + write!(f, "{}", lorem)?; + } + assert!(hash_file(path.clone(), "not_an_algo".to_string()).is_err()); + Ok(()) + } + + #[test] + fn test_hash_no_file() -> Result<()> { + assert!(hash_file("/I/Dont/Exist".to_string(), "md5".to_string()).is_err()); + Ok(()) + } +} diff --git a/implants/lib/eldritch/src/file.rs b/implants/lib/eldritch/src/file.rs index cd91c72ff..69fbed898 100644 --- a/implants/lib/eldritch/src/file.rs +++ b/implants/lib/eldritch/src/file.rs @@ -17,8 +17,6 @@ mod template_impl; mod timestomp_impl; mod write_impl; -use std::fmt; - use allocative::Allocative; use derive_more::Display; @@ -26,8 +24,8 @@ use starlark::values::dict::Dict; use starlark::collections::SmallMap; use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; use starlark::values::none::NoneType; -use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap}; -use starlark::{starlark_type, starlark_simple_value, starlark_module}; +use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap, starlark_value}; +use starlark::{starlark_simple_value, starlark_module}; use serde::{Serialize,Serializer}; #[derive(Copy, Clone, Debug, PartialEq, Display, ProvidesStaticType, Allocative)] @@ -35,8 +33,9 @@ use serde::{Serialize,Serializer}; pub struct FileLibrary(); starlark_simple_value!(FileLibrary); +#[allow(non_upper_case_globals)] +#[starlark_value(type = "file_library")] impl<'v> StarlarkValue<'v> for FileLibrary { - starlark_type!("file_library"); fn get_methods() -> Option<&'static Methods> { static RES: MethodsStatic = MethodsStatic::new(); diff --git a/implants/lib/eldritch/src/file/list_impl.rs b/implants/lib/eldritch/src/file/list_impl.rs index 9620bb308..3693497a3 100644 --- a/implants/lib/eldritch/src/file/list_impl.rs +++ b/implants/lib/eldritch/src/file/list_impl.rs @@ -132,7 +132,7 @@ fn create_dict_from_file(starlark_heap: &Heap, file: File) -> Result{ tmp_res.insert_hashed(const_frozen_string!("file_name").to_value().get_hashed().unwrap(), tmp_value1.to_value()); let file_size = file.size as i32; - tmp_res.insert_hashed(const_frozen_string!("size").to_value().get_hashed().unwrap(), Value::new_int(file_size)); + tmp_res.insert_hashed(const_frozen_string!("size").to_value().get_hashed().unwrap(), starlark_heap.alloc(file_size)); let tmp_value2 = starlark_heap.alloc_str(&file.owner); tmp_res.insert_hashed(const_frozen_string!("owner").to_value().get_hashed().unwrap(), tmp_value2.to_value()); diff --git a/implants/lib/eldritch/src/file/template_impl.rs b/implants/lib/eldritch/src/file/template_impl.rs index 16ba43303..b8914f4e1 100644 --- a/implants/lib/eldritch/src/file/template_impl.rs +++ b/implants/lib/eldritch/src/file/template_impl.rs @@ -25,7 +25,7 @@ pub fn template(template_path: String, dst_path: String, args: SmallMap anyhow::Result<()>{ + let heap = Heap::new(); let mut map: SmallMap = SmallMap::new(); map.insert("name".to_string(), const_frozen_string!("greg").to_value()); - map.insert("age".to_string(), Value::new_int(29)); + map.insert("age".to_string(), heap.alloc(29)); map.insert("admin".to_string(), Value::new_bool(true)); let res = build_context(map)?; @@ -51,6 +52,8 @@ mod tests { let dst_path = String::from(tmp_file.path().to_str().unwrap()); dst_tmp_file.close()?; + let heap = Heap::new(); + // Write out template fs::write(path.clone(), r#"Hello {{ name }}, @@ -61,7 +64,7 @@ Congratulations on making it that far. // Setup our args let mut dict_data: SmallMap = SmallMap::new(); dict_data.insert("name".to_string(), const_frozen_string!("test123").to_value()); - dict_data.insert("age".to_string(), Value::new_int(22)); + dict_data.insert("age".to_string(), heap.alloc(22)); // Run our code template(path, dst_path.clone(), dict_data, true)?; diff --git a/implants/lib/eldritch/src/lib.rs b/implants/lib/eldritch/src/lib.rs index ffd8ff9c4..9bb99c5ba 100644 --- a/implants/lib/eldritch/src/lib.rs +++ b/implants/lib/eldritch/src/lib.rs @@ -3,12 +3,13 @@ pub mod process; pub mod sys; pub mod pivot; pub mod assets; +pub mod crypto; -use std::sync::mpsc::{Sender}; +use std::sync::mpsc::Sender; use serde_json::Map; use starlark::collections::SmallMap; use starlark::{starlark_module, PrintHandler}; -use starlark::environment::{GlobalsBuilder, Module, Globals}; +use starlark::environment::{GlobalsBuilder, Module, Globals, LibraryExtension}; use starlark::syntax::{AstModule, Dialect}; use starlark::eval::Evaluator; use starlark::values::dict::Dict; @@ -19,6 +20,7 @@ use process::ProcessLibrary; use sys::SysLibrary; use assets::AssetsLibrary; use pivot::PivotLibrary; +use crate::crypto::CryptoLibrary; pub fn get_eldritch() -> anyhow::Result { #[starlark_module] @@ -28,9 +30,26 @@ pub fn get_eldritch() -> anyhow::Result { const sys: SysLibrary = SysLibrary(); const pivot: PivotLibrary = PivotLibrary(); const assets: AssetsLibrary = AssetsLibrary(); + const crypto: CryptoLibrary = CryptoLibrary(); } - let globals = GlobalsBuilder::extended().with(eldritch).build(); + let globals = GlobalsBuilder::extended_by( + &[ + LibraryExtension::StructType, + LibraryExtension::RecordType, + LibraryExtension::EnumType, + LibraryExtension::Map, + LibraryExtension::Filter, + LibraryExtension::Partial, + LibraryExtension::ExperimentalRegex, + LibraryExtension::Debug, + LibraryExtension::Print, + LibraryExtension::Breakpoint, + LibraryExtension::Json, + LibraryExtension::Abs, + LibraryExtension::Typing, + ] + ).with(eldritch).build(); return Ok(globals); } @@ -64,7 +83,7 @@ pub fn eldritch_run(tome_filename: String, tome_contents: String, tome_parameter let ast = match AstModule::parse( &tome_filename, tome_contents.as_str().to_owned(), - &Dialect::Standard + &Dialect::Extended ) { Ok(res) => res, Err(err) => return Err(anyhow::anyhow!("[eldritch] Unable to parse eldritch tome: {}: {} {}", err.to_string(), tome_filename.as_str(), tome_contents.as_str())), @@ -132,7 +151,7 @@ pub fn eldritch_run(tome_filename: String, tome_contents: String, tome_parameter }, None => i32::MAX.into(), }; - new_value = Value::new_int(tmp_value); + new_value = module.heap().alloc(tmp_value); } let hashed_key = match new_key.to_value().get_hashed() { Ok(local_hashed_key) => local_hashed_key, @@ -172,9 +191,10 @@ mod tests { r#" dir(file) == ["append", "compress", "copy", "download", "exists", "hash", "is_dir", "is_file", "list", "mkdir", "read", "remove", "rename", "replace", "replace_all", "template", "timestomp", "write"] dir(process) == ["kill", "list", "name"] -dir(sys) == ["dll_inject", "exec", "get_ip", "get_os", "is_linux", "is_macos", "is_windows", "shell"] +dir(sys) == ["dll_inject", "exec", "get_env", "get_ip", "get_os", "get_pid", "get_user", "is_linux", "is_macos", "is_windows", "shell"] dir(pivot) == ["arp_scan", "bind_proxy", "ncat", "port_forward", "port_scan", "smb_exec", "ssh_exec", "ssh_password_spray"] dir(assets) == ["copy","list","read","read_binary"] +dir(crypto) == ["aes_decrypt_file", "aes_encrypt_file", "hash_file"] "#, ); } diff --git a/implants/lib/eldritch/src/pivot.rs b/implants/lib/eldritch/src/pivot.rs index c516d2143..e135b48a6 100644 --- a/implants/lib/eldritch/src/pivot.rs +++ b/implants/lib/eldritch/src/pivot.rs @@ -19,19 +19,19 @@ use russh_keys::{key, decode_secret_key}; use starlark::values::dict::Dict; use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; use starlark::values::none::NoneType; -use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap}; -use starlark::{starlark_type, starlark_simple_value, starlark_module}; +use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap, starlark_value}; +use starlark::{starlark_simple_value, starlark_module}; use serde::{Serialize,Serializer}; -use tokio::net::ToSocketAddrs; #[derive(Copy, Clone, Debug, PartialEq, Display, ProvidesStaticType, Allocative)] #[display(fmt = "PivotLibrary")] pub struct PivotLibrary(); starlark_simple_value!(PivotLibrary); +#[allow(non_upper_case_globals)] +#[starlark_value(type = "pivot_library")] impl<'v> StarlarkValue<'v> for PivotLibrary { - starlark_type!("pivot_library"); fn get_methods() -> Option<&'static Methods> { static RES: MethodsStatic = MethodsStatic::new(); @@ -78,9 +78,13 @@ fn methods(builder: &mut MethodsBuilder) { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } port_scan_impl::port_scan(starlark_heap, target_cidrs, ports, protocol, timeout) } - fn arp_scan(this: PivotLibrary, target_cidrs: Vec) -> anyhow::Result> { + fn arp_scan<'v>( + this: PivotLibrary, + starlark_heap: &'v Heap, + target_cidrs: Vec, + ) -> anyhow::Result>> { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } - arp_scan_impl::arp_scan(target_cidrs) + arp_scan_impl::arp_scan(starlark_heap, target_cidrs) } fn port_forward(this: PivotLibrary, listen_address: String, listen_port: i32, forward_address: String, forward_port: i32, protocol: String) -> anyhow::Result { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } diff --git a/implants/lib/eldritch/src/pivot/arp_scan_impl.rs b/implants/lib/eldritch/src/pivot/arp_scan_impl.rs index 740bbdf9e..9312d9724 100644 --- a/implants/lib/eldritch/src/pivot/arp_scan_impl.rs +++ b/implants/lib/eldritch/src/pivot/arp_scan_impl.rs @@ -1,5 +1,311 @@ -use anyhow::Result; +use anyhow::{anyhow, Result}; +use ipnetwork::{IpNetwork, Ipv4Network}; +#[cfg(not(target_os = "windows"))] +use pnet::{ + datalink::{self, channel, Channel::Ethernet, NetworkInterface}, + packet::{ + arp::{ArpOperations, ArpPacket, MutableArpPacket}, + ethernet::{EtherType, EthernetPacket, MutableEthernetPacket}, + Packet, + }, + util::MacAddr, +}; +use starlark::collections::SmallMap; +use starlark::const_frozen_string; +use starlark::values::{dict::Dict, Heap}; +use std::collections::HashMap; +use std::net::{IpAddr, Ipv4Addr}; +use std::str::FromStr; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, SystemTime}; -pub fn arp_scan(_target_cidrs: Vec) -> Result> { - unimplemented!("Method unimplemented") -} \ No newline at end of file +#[cfg(not(target_os = "windows"))] +#[derive(Debug, Clone, PartialEq)] +pub struct ArpResponse { + _source_ip: Ipv4Addr, + source_mac: MacAddr, + interface: String, +} + +#[cfg(not(target_os = "windows"))] +fn start_listener( + interface: NetworkInterface, + data: Arc>>>, +) -> Result<()> { + if interface.ips.iter().filter(|ip| ip.is_ipv4()).count() == 0 { + return Err(anyhow!("Interface does not have a v4 address")); + } + let mac = interface.mac.ok_or(anyhow!("Could not obtain MAC of interface"))?; + let (mut tx, mut rx) = match channel(&interface, Default::default()) { + Ok(Ethernet(tx, rx)) => (tx, rx), + Ok(_) => return Err(anyhow!("Unhandled channel type")), + Err(e) => { + return Err(anyhow!("Error creating channel: {}", e)); + } + }; + let ips = match data.lock() { + Ok(lock) => lock.keys().cloned().collect::>(), + Err(err) => { + return Err(anyhow!("Failed to get lock on ips: {}", err)); + } + }; + for ip in ips { + let ip_to_use = match interface + .ips + .iter() + .find(|interface_ip| interface_ip.contains(IpAddr::V4(ip))) + { + Some(IpNetwork::V4(ipnet)) => ipnet, + Some(_) => continue, + None => continue, + }; + let mut arp_packet = [0u8; 28]; + let mut arp = match MutableArpPacket::new(&mut arp_packet) { + Some(arp) => arp, + None => { + return Err(anyhow!("Failed to create MutableArpPacket to send.")); + } + }; + arp.set_hardware_type(pnet::packet::arp::ArpHardwareType(1)); + arp.set_protocol_type(pnet::packet::ethernet::EtherType(0x0800)); + arp.set_hw_addr_len(6); + arp.set_proto_addr_len(4); + arp.set_operation(ArpOperations::Request); + arp.set_sender_hw_addr(mac); + arp.set_sender_proto_addr(ip_to_use.ip()); + arp.set_target_hw_addr(MacAddr::zero()); + arp.set_target_proto_addr(ip); + let mut eth_packet = [0u8; 60]; + let mut eth = match MutableEthernetPacket::new(&mut eth_packet) { + Some(eth) => eth, + None => { + return Err(anyhow!("Failed to create MutableEthernetPacket to send.")); + } + }; + eth.set_destination(MacAddr::broadcast()); + eth.set_source(mac); + eth.set_ethertype(EtherType(0x0806)); + eth.set_payload(arp.packet()); + match tx.send_to(eth.packet(), None) { + Some(Ok(_)) => {} + Some(Err(err)) => { + return Err(anyhow!("Failed to tx on {}: {}", interface.name, err)); + } + None => { + return Err(anyhow!("Failed to tx on {}: Returned None", interface.name)); + } + }; + let now = SystemTime::now(); + loop { + let elapsed = match now.elapsed() { + Ok(elapsed) => elapsed, + Err(err) => { + return Err(anyhow!("Failed to get elapsed time on {}: {}", interface.name, err)); + } + }; + if elapsed > Duration::from_secs(5) { + break; + } + match rx.next() { + Ok(packet) => { + let eth = match EthernetPacket::new(packet) { + Some(eth) => eth, + None => continue, + }; + let arp = match ArpPacket::new(eth.payload()) { + Some(arp) => arp, + None => continue, + }; + if arp.get_operation() != ArpOperations::Reply { + continue; + } + let source_ip = arp.get_sender_proto_addr(); + let source_mac = arp.get_sender_hw_addr(); + if source_ip == ip { + match data.lock() { + Ok(mut lock) => { + if let Some(target) = lock.get_mut(&ip) { + *target = Some(ArpResponse { + _source_ip: source_ip, + source_mac, + interface: interface.name.clone(), + }); + break; + } + return Err(anyhow!("Failed to find {} in HashMap", ip)); + } + Err(err) => { + return Err(anyhow!("Failed to get lock on data: {}", err)); + } + } + } + } + Err(e) => { + if e.kind() == std::io::ErrorKind::TimedOut { + continue; + } + return Err(anyhow!("Error receiving packet: {}", e)); + } + } + } + } + Ok(()) +} + +#[cfg(not(target_os = "windows"))] +pub fn handle_arp_scan( + target_cidrs: Vec, +) -> Result>> { + let listener_out: Arc>>> = + Arc::new(Mutex::new(HashMap::new())); + let target_cidrs = target_cidrs + .iter() + .map(|cidr| { + let (addr, prefix) = cidr.split_at( + cidr.find('/') + .ok_or(anyhow::anyhow!("Failed to find / in Network {}", cidr))?, + ); + let addr = match Ipv4Addr::from_str(addr) { + Ok(addr) => addr, + Err(_) => { + return Err(anyhow::anyhow!("Invalid IPv4 address: {}", addr)); + } + }; + let prefix: u8 = match prefix[1..].parse() { + Ok(prefix) => prefix, + Err(_) => { + return Err(anyhow::anyhow!("Invalid CIDR prefix: {}", prefix)); + } + }; + let network = match Ipv4Network::new(addr, prefix) { + Ok(network) => network, + Err(_) => { + return Err(anyhow::anyhow!("Invalid CIDR: {}", cidr)); + } + }; + Ok(network) + }) + .collect::>>()?; + for target_cidr in target_cidrs { + for ip in target_cidr.iter() { + match listener_out.lock() { + Ok(mut listener_lock) => { + listener_lock.insert(ip, None); + } + Err(err) => return Err(anyhow::anyhow!("Failed to get lock on IP List: {}", err)), + } + } + } + let interfaces = datalink::interfaces(); + for interface in interfaces { + let inner_out = listener_out.clone(); + let inner_interface = interface.clone(); + let thread = std::thread::spawn(move || { + match start_listener(inner_interface.clone(), inner_out) { + Ok(_) => {}, + Err(err) => { + #[cfg(debug_assertions)] + println!("Listener on {} failed: {}", inner_interface.name, err); + } + } + }); + thread.join().map_err(|err| { + anyhow::anyhow!( + "Failed to join thread for interface {}: {:?}", + interface.name, + err + ) + })? + } + let out = listener_out + .lock() + .map_err(|err| anyhow::anyhow!("Failed to get final lock when returning results: {}", err))? + .clone(); + Ok(out) +} + +#[cfg(not(target_os = "windows"))] +pub fn arp_scan(starlark_heap: &Heap, target_cidrs: Vec) -> Result> { + let mut out: Vec = Vec::new(); + let final_listener_output = handle_arp_scan(target_cidrs)?; + for (ipaddr, res) in final_listener_output { + if let Some(res) = res { + let hit_small_map = SmallMap::new(); + let mut hit_dict = Dict::new(hit_small_map); + let ipaddr_value = starlark_heap.alloc_str(&ipaddr.to_string()); + let source_mac_value = starlark_heap.alloc_str(&res.source_mac.to_string()); + let interface_value = starlark_heap.alloc_str(&res.interface.to_string()); + hit_dict.insert_hashed( + const_frozen_string!("ip").to_value().get_hashed()?, + ipaddr_value.to_value(), + ); + hit_dict.insert_hashed( + const_frozen_string!("mac").to_value().get_hashed()?, + source_mac_value.to_value(), + ); + hit_dict.insert_hashed( + const_frozen_string!("interface").to_value().get_hashed()?, + interface_value.to_value(), + ); + out.push(hit_dict); + } + } + Ok(out) +} + +#[cfg(target_os = "windows")] +pub fn arp_scan(starlark_heap: &Heap, target_cidrs: Vec) -> Result> { + Err(anyhow::anyhow!("ARP Scanning is not available on Windows.")) +} + +#[cfg(not(target_os = "windows"))] +#[cfg(test)] +mod tests { + use std::{collections::HashMap, sync::{Mutex, Arc}, net::Ipv4Addr, thread, time::Duration}; + use pnet::datalink::interfaces; + + use crate::pivot::arp_scan_impl::{handle_arp_scan, ArpResponse, start_listener}; + + #[test] + fn test_positive() { + assert_eq!( + handle_arp_scan(Vec::from(["127.0.0.1/32".to_string()])).unwrap(), + HashMap::from([("127.0.0.1".parse().unwrap(), None)]) + ); + } + + #[test] + fn test_no_slash() { + assert!(handle_arp_scan(Vec::from(["127.0.0.1".to_string()])).is_err()); + } + + #[test] + fn test_invalid_ipv4() { + assert!(handle_arp_scan(Vec::from(["127.0.0.256".to_string()])).is_err()); + } + + #[test] + fn test_invalid_cidr() { + assert!(handle_arp_scan(Vec::from(["127.0.0.1/33".to_string()])).is_err()); + } + + #[test] + fn test_lock_failure() { + let data = Arc::from(Mutex::from(HashMap::>::from([(Ipv4Addr::LOCALHOST, None)]))); + let data_clone = data.clone(); + thread::spawn(move || { + let _x = data_clone.lock().unwrap(); + panic!("Need to panic"); + }); + thread::sleep(Duration::from_secs(3)); + let loopback = { + let interfaces = interfaces(); + interfaces.iter().filter(|x| x.is_loopback()).next().unwrap().clone() + }; + assert!( + start_listener(loopback, data).is_err() + ); + } + + +} diff --git a/implants/lib/eldritch/src/pivot/port_scan_impl.rs b/implants/lib/eldritch/src/pivot/port_scan_impl.rs index 2412a2921..493b4f41a 100644 --- a/implants/lib/eldritch/src/pivot/port_scan_impl.rs +++ b/implants/lib/eldritch/src/pivot/port_scan_impl.rs @@ -362,7 +362,7 @@ pub fn port_scan(starlark_heap: &Heap, target_cidrs: Vec, ports: Vec ast = res, Err(err) => return Err(err), @@ -623,7 +623,7 @@ res } } - let globals = GlobalsBuilder::extended().with(func_port_scan).build(); + let globals = GlobalsBuilder::standard().with(func_port_scan).build(); let module: Module = Module::new(); let mut eval: Evaluator = Evaluator::new(&module); diff --git a/implants/lib/eldritch/src/pivot/ssh_exec_impl.rs b/implants/lib/eldritch/src/pivot/ssh_exec_impl.rs index 6ef2f64e8..5ac3feaca 100644 --- a/implants/lib/eldritch/src/pivot/ssh_exec_impl.rs +++ b/implants/lib/eldritch/src/pivot/ssh_exec_impl.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use starlark::{values::{dict::Dict, Heap, Value}, collections::SmallMap, const_frozen_string}; +use starlark::{values::{dict::Dict, Heap}, collections::SmallMap, const_frozen_string}; use super::Session; @@ -47,7 +47,7 @@ pub fn ssh_exec(starlark_heap: &Heap, target: String, port: i32, command: String let stdout_value = starlark_heap.alloc_str(&cmd_res.stdout); dict_res.insert_hashed(const_frozen_string!("stdout").to_value().get_hashed().unwrap(), stdout_value.to_value()); - let status_value = Value::new_int(cmd_res.status); + let status_value = starlark_heap.alloc(cmd_res.status); dict_res.insert_hashed(const_frozen_string!("status").to_value().get_hashed().unwrap(), status_value); Ok(dict_res) @@ -185,7 +185,7 @@ mod tests { #[tokio::test] async fn test_pivot_ssh_exec() -> anyhow::Result<()> { - let ssh_port = allocate_localhost_unused_ports().await? as u16;; + let ssh_port = allocate_localhost_unused_ports().await? as u16; let ssh_host = "127.0.0.1".to_string(); let ssh_command = r#"echo "hello world""#.to_string(); let test_server_task = task::spawn( diff --git a/implants/lib/eldritch/src/process.rs b/implants/lib/eldritch/src/process.rs index f3d0c5afe..ee23e7d6b 100644 --- a/implants/lib/eldritch/src/process.rs +++ b/implants/lib/eldritch/src/process.rs @@ -8,8 +8,8 @@ use derive_more::Display; use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; use starlark::values::dict::Dict; use starlark::values::none::NoneType; -use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap}; -use starlark::{starlark_type, starlark_simple_value, starlark_module}; +use starlark::values::{StarlarkValue, Value, UnpackValue, ValueLike, ProvidesStaticType, Heap, starlark_value}; +use starlark::{starlark_simple_value, starlark_module}; use serde::{Serialize,Serializer}; @@ -18,8 +18,9 @@ use serde::{Serialize,Serializer}; pub struct ProcessLibrary(); starlark_simple_value!(ProcessLibrary); +#[allow(non_upper_case_globals)] +#[starlark_value(type = "process_library")] impl<'v> StarlarkValue<'v> for ProcessLibrary { - starlark_type!("process_library"); fn get_methods() -> Option<&'static Methods> { static RES: MethodsStatic = MethodsStatic::new(); diff --git a/implants/lib/eldritch/src/process/list_impl.rs b/implants/lib/eldritch/src/process/list_impl.rs index 5d6cf9e41..85192ee55 100644 --- a/implants/lib/eldritch/src/process/list_impl.rs +++ b/implants/lib/eldritch/src/process/list_impl.rs @@ -34,11 +34,11 @@ pub fn list(starlark_heap: &Heap) -> Result> { // Create Dict type. let mut tmp_res = Dict::new(res); - tmp_res.insert_hashed(const_frozen_string!("pid").to_value().get_hashed().unwrap(), Value::new_int(match pid.as_u32().try_into() { + tmp_res.insert_hashed(const_frozen_string!("pid").to_value().get_hashed().unwrap(), starlark_heap.alloc(match pid.as_u32().try_into() { Ok(local_int) => local_int, Err(_) => -1, })); - tmp_res.insert_hashed(const_frozen_string!("ppid").to_value().get_hashed().unwrap(), Value::new_int(match tmp_ppid.try_into() { + tmp_res.insert_hashed(const_frozen_string!("ppid").to_value().get_hashed().unwrap(), starlark_heap.alloc(match tmp_ppid.try_into() { Ok(local_int) => local_int, Err(_) => -1, })); @@ -58,6 +58,8 @@ pub fn list(starlark_heap: &Heap) -> Result> { #[cfg(test)] mod tests { + use anyhow::Context; + use super::*; use std::process::Command; @@ -76,7 +78,7 @@ mod tests { let res = list(&binding)?; for proc in res{ let cur_pid = match proc.get(const_frozen_string!("pid").to_value())? { - Some(local_cur_pid) => local_cur_pid.to_int()?, + Some(local_cur_pid) => local_cur_pid.unpack_i32().context("Failed to unpack starlark int to i32")?, None => return Err(anyhow::anyhow!("pid couldn't be unwrapped")), }; if cur_pid as u32 == child.id() { diff --git a/implants/lib/eldritch/src/sys.rs b/implants/lib/eldritch/src/sys.rs index ecf819497..d28524ba5 100644 --- a/implants/lib/eldritch/src/sys.rs +++ b/implants/lib/eldritch/src/sys.rs @@ -1,6 +1,9 @@ mod exec_impl; +mod get_env_impl; mod get_ip_impl; mod get_os_impl; +mod get_pid_impl; +mod get_user_impl; mod is_linux_impl; mod is_windows_impl; mod is_macos_impl; @@ -12,8 +15,9 @@ use derive_more::Display; use starlark::environment::{Methods, MethodsBuilder, MethodsStatic}; use starlark::values::none::NoneType; +use starlark::values::starlark_value; use starlark::values::{StarlarkValue, Value, Heap, dict::Dict, UnpackValue, ValueLike, ProvidesStaticType}; -use starlark::{starlark_type, starlark_simple_value, starlark_module}; +use starlark::{starlark_simple_value, starlark_module}; use serde::{Serialize,Serializer}; @@ -28,8 +32,9 @@ struct CommandOutput { pub struct SysLibrary(); starlark_simple_value!(SysLibrary); +#[allow(non_upper_case_globals)] +#[starlark_value(type = "sys_library")] impl<'v> StarlarkValue<'v> for SysLibrary { - starlark_type!("sys_library"); fn get_methods() -> Option<&'static Methods> { static RES: MethodsStatic = MethodsStatic::new(); @@ -71,10 +76,27 @@ fn methods(builder: &mut MethodsBuilder) { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } dll_inject_impl::dll_inject(dll_path, pid) } + fn get_env<'v>(this: SysLibrary, starlark_heap: &'v Heap) -> anyhow::Result> { + if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } + get_env_impl::get_env(starlark_heap) + } fn get_ip<'v>(this: SysLibrary, starlark_heap: &'v Heap) -> anyhow::Result>> { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } get_ip_impl::get_ip(starlark_heap) } + fn get_pid<'v>(this: SysLibrary, starlark_heap: &'v Heap) -> anyhow::Result { + if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } + get_pid_impl::get_pid(starlark_heap) + } + fn get_user<'v>(this: SysLibrary, starlark_heap: &'v Heap) -> anyhow::Result> { + if false { + println!( + "Ignore unused this var. _this isn't allowed by starlark. {:?}", + this + ); + } + get_user_impl::get_user(starlark_heap) + } fn is_linux(this: SysLibrary) -> anyhow::Result { if false { println!("Ignore unused this var. _this isn't allowed by starlark. {:?}", this); } is_linux_impl::is_linux() diff --git a/implants/lib/eldritch/src/sys/exec_impl.rs b/implants/lib/eldritch/src/sys/exec_impl.rs index 5f7da2a98..dace385e4 100644 --- a/implants/lib/eldritch/src/sys/exec_impl.rs +++ b/implants/lib/eldritch/src/sys/exec_impl.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use starlark::{values::{Heap, dict::Dict, Value}, collections::SmallMap, const_frozen_string}; +use starlark::{values::{Heap, dict::Dict}, collections::SmallMap, const_frozen_string}; use std::process::Command; #[cfg(any(target_os = "linux", target_os = "macos"))] use nix::{sys::wait::waitpid, unistd::{fork, ForkResult}}; @@ -22,7 +22,7 @@ pub fn exec(starlark_heap: &Heap, path: String, args: Vec, disown: Optio let stderr_value = starlark_heap.alloc_str(cmd_res.stderr.as_str()); dict_res.insert_hashed(const_frozen_string!("stderr").to_value().get_hashed().unwrap(), stderr_value.to_value()); - let status_value = Value::new_int(cmd_res.status); + let status_value = starlark_heap.alloc(cmd_res.status); dict_res.insert_hashed(const_frozen_string!("status").to_value().get_hashed().unwrap(), status_value); Ok(dict_res) diff --git a/implants/lib/eldritch/src/sys/get_env_impl.rs b/implants/lib/eldritch/src/sys/get_env_impl.rs new file mode 100644 index 000000000..295b509c2 --- /dev/null +++ b/implants/lib/eldritch/src/sys/get_env_impl.rs @@ -0,0 +1,42 @@ +use anyhow::Result; +use starlark::collections::SmallMap; +use starlark::values::dict::Dict; +use starlark::values::Heap; +use std::env; + +pub fn get_env(starlark_heap: &Heap) -> Result { + let res = SmallMap::new(); + let mut dict_res = Dict::new(res); + + for (key, val) in env::vars() { + let key_value = starlark_heap.alloc_str(&key); + let val_value = starlark_heap.alloc_str(&val); + dict_res.insert_hashed( + match key_value.to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc name information: {}", e)), + }, + val_value.to_value(), + ); + } + + Ok(dict_res) +} + +#[cfg(test)] +mod tests { + use starlark::{values::Value, const_frozen_string}; + use anyhow::Result; + use std::env; + use super::*; + + #[test] + fn test_get_env() -> Result<()> { + env::set_var("FOO", "BAR"); + let test_heap = Heap::new(); + let res = get_env(&test_heap)?; + let val: Value<'_> = res.get(const_frozen_string!("FOO").to_value())?.unwrap(); + assert_eq!(val.unpack_str().unwrap(), "BAR"); + Ok(()) + } +} diff --git a/implants/lib/eldritch/src/sys/get_ip_impl.rs b/implants/lib/eldritch/src/sys/get_ip_impl.rs index b1621270d..d054c4e06 100644 --- a/implants/lib/eldritch/src/sys/get_ip_impl.rs +++ b/implants/lib/eldritch/src/sys/get_ip_impl.rs @@ -1,16 +1,21 @@ -use anyhow::Result; +use anyhow::{anyhow, Result}; +#[cfg(target_os = "windows")] use network_interface::{NetworkInterfaceConfig, NetworkInterface}; +#[cfg(not(target_os = "windows"))] +use pnet::datalink::{interfaces, NetworkInterface}; use starlark::{values::{dict::Dict, Heap, Value}, collections::SmallMap, const_frozen_string}; const UNKNOWN: &str = "UNKNOWN"; #[derive(Debug)] +#[cfg(target_os = "windows")] struct NetInterface { name: String, ips: Vec, //IPv6 and IPv4 Addresses on the itnerface mac: String, } +#[cfg(target_os = "windows")] fn handle_get_ip() -> Result> { let mut res = Vec::new(); for network_interface in NetworkInterface::show()? { @@ -34,6 +39,12 @@ fn handle_get_ip() -> Result> { Ok(res) } +#[cfg(not(target_os = "windows"))] +fn handle_get_ip() -> Result> { + Ok(interfaces()) +} + +#[cfg(target_os = "windows")] fn create_dict_from_interface(starlark_heap: &Heap, interface: NetInterface) -> Result{ let res: SmallMap = SmallMap::new(); let mut tmp_res = Dict::new(res); @@ -55,6 +66,27 @@ fn create_dict_from_interface(starlark_heap: &Heap, interface: NetInterface) -> Ok(tmp_res) } +#[cfg(not(target_os = "windows"))] +fn create_dict_from_interface(starlark_heap: &Heap, interface: NetworkInterface) -> Result{ + let res: SmallMap = SmallMap::new(); + let mut tmp_res = Dict::new(res); + + let tmp_value1 = starlark_heap.alloc_str(&interface.name); + tmp_res.insert_hashed(const_frozen_string!("name").to_value().get_hashed().unwrap(), tmp_value1.to_value()); + + let mut tmp_value2_arr = Vec::::new(); + for ip in interface.ips { + tmp_value2_arr.push(starlark_heap.alloc_str(&ip.to_string()).to_value()); + } + let tmp_value2 = starlark_heap.alloc(tmp_value2_arr); + tmp_res.insert_hashed(const_frozen_string!("ips").to_value().get_hashed().unwrap(), tmp_value2); + + let tmp_value3 = starlark_heap.alloc_str(&interface.mac.map(|mac| mac.to_string()).unwrap_or(UNKNOWN.to_string())); + tmp_res.insert_hashed(const_frozen_string!("mac").to_value().get_hashed().unwrap(), tmp_value3.to_value()); + + + Ok(tmp_res) +} pub fn get_ip(starlark_heap: &Heap) -> Result> { let mut final_res: Vec = Vec::new(); diff --git a/implants/lib/eldritch/src/sys/get_pid_impl.rs b/implants/lib/eldritch/src/sys/get_pid_impl.rs new file mode 100644 index 000000000..0129c1261 --- /dev/null +++ b/implants/lib/eldritch/src/sys/get_pid_impl.rs @@ -0,0 +1,19 @@ +use anyhow::Result; +use std::process; +use starlark::values::Heap; + +pub fn get_pid(starlark_heap: &Heap) -> Result { + Ok(process::id()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_sys_get_pid() { + let starlark_heap = Heap::new(); + let res = get_pid(&starlark_heap).unwrap(); + assert_eq!(res, process::id()); + } +} diff --git a/implants/lib/eldritch/src/sys/get_user_impl.rs b/implants/lib/eldritch/src/sys/get_user_impl.rs new file mode 100644 index 000000000..90dfb40d7 --- /dev/null +++ b/implants/lib/eldritch/src/sys/get_user_impl.rs @@ -0,0 +1,186 @@ +use anyhow::Result; +use starlark::collections::SmallMap; +use starlark::values::dict::Dict; +use starlark::values::Heap; +use starlark::{const_frozen_string, values::ValueLike}; +use std::process; +use sysinfo::{Pid, ProcessExt, System, SystemExt, UserExt}; + +pub fn get_user(starlark_heap: &Heap) -> Result { + let res = SmallMap::new(); + let mut dict_res = Dict::new(res); + let user = SmallMap::new(); + let mut dict_user = Dict::new(user); + + + let sys = System::new_all(); + let pid = process::id() as usize; + if let Some(process) = sys.process(Pid::from(pid)) { + let uid = match process.user_id() { + Some(uid) => uid, + None => return Err(anyhow::anyhow!("Failed to get uid")), + }; + #[cfg(target_os="windows")] + let uid_value = starlark_heap.alloc(uid.to_string()); + #[cfg(not(target_os="windows"))] + let uid_value = starlark_heap.alloc(**uid); + dict_user.insert_hashed( + match const_frozen_string!("uid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc uid information: {}", e)), + }, + uid_value.to_value(), + ); + let user = match sys.get_user_by_id(uid) { + Some(user) => user, + None => return Err(anyhow::anyhow!("Failed to get user")), + }; + let user_name_value = starlark_heap.alloc_str(user.name()); + dict_user.insert_hashed( + match const_frozen_string!("name").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc name information: {}", e)), + }, + user_name_value.to_value(), + ); + let user_gid_value = starlark_heap.alloc(*user.group_id()); + dict_user.insert_hashed( + match const_frozen_string!("gid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc gid information: {}", e)), + }, + user_gid_value.to_value(), + ); + let user_groups_value = starlark_heap.alloc(Vec::from(user.groups())); + dict_user.insert_hashed( + match const_frozen_string!("groups").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc groups information: {}", e)), + }, + user_groups_value.to_value(), + ); + #[cfg(not(target_os="windows"))] + { + let euser = SmallMap::new(); + let mut dict_euser = Dict::new(euser); + let euid = match process.effective_user_id() { + Some(euid) => euid, + None => return Err(anyhow::anyhow!("Failed to get euid")), + }; + let euid_value = starlark_heap.alloc(**euid); + dict_euser.insert_hashed( + match const_frozen_string!("uid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc uid information: {}", e)), + }, + euid_value.to_value(), + ); + let euser = match sys.get_user_by_id(euid) { + Some(euser) => euser, + None => return Err(anyhow::anyhow!("Failed to get euser")), + }; + let euser_name_value = starlark_heap.alloc_str(euser.name()); + dict_euser.insert_hashed( + match const_frozen_string!("name").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc name information: {}", e)), + }, + euser_name_value.to_value(), + ); + let euser_gid_value = starlark_heap.alloc(*euser.group_id()); + dict_euser.insert_hashed( + match const_frozen_string!("gid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc gid information: {}", e)), + }, + euser_gid_value.to_value(), + ); + let euser_groups_value = starlark_heap.alloc(Vec::from(euser.groups())); + dict_euser.insert_hashed( + match const_frozen_string!("groups").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc groups information: {}", e)), + }, + euser_groups_value.to_value(), + ); + let dict_euser_value = starlark_heap.alloc(dict_euser); + dict_res.insert_hashed( + match const_frozen_string!("euid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc euid information: {}", e)), + }, + dict_euser_value, + ); + let gid = match process.group_id() { + Some(gid) => gid, + None => return Err(anyhow::anyhow!("Failed to get gid")), + }; + let gid_value = starlark_heap.alloc(*gid); + let egid = match process.effective_group_id() { + Some(egid) => egid, + None => return Err(anyhow::anyhow!("Failed to get egid")), + }; + let egid_value = starlark_heap.alloc(*egid); + dict_res.insert_hashed( + match const_frozen_string!("gid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc gid information: {}", e)), + }, + gid_value.to_value(), + ); + dict_res.insert_hashed( + match const_frozen_string!("egid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc egid information: {}", e)), + }, + egid_value.to_value(), + ); + } + let dict_user_value = starlark_heap.alloc(dict_user); + dict_res.insert_hashed( + match const_frozen_string!("uid").to_value().get_hashed() { + Ok(val) => val, + Err(e) => return Err(anyhow::anyhow!("Failed to alloc uid information: {}", e)), + }, + dict_user_value, + ); + return Ok(dict_res); + } + Err(anyhow::anyhow!("Failed to obtain process information")) +} + +#[cfg(test)] +mod tests { + use starlark::values::{UnpackValue, Value}; + use super::*; + + #[test] + fn test_sys_get_user() -> anyhow::Result<()>{ + let test_heap = Heap::new(); + let res = get_user(&test_heap)?; + let keys: Vec<&str> = res.keys().map(|key| key.unpack_str().unwrap()).collect(); + assert!(keys.contains(&"uid")); + if !cfg!(target_os="windows") { + assert!(keys.contains(&"euid")); + assert!(keys.contains(&"egid")); + assert!(keys.contains(&"gid")); + } + let uid_data: Value<'_> = res.get(const_frozen_string!("uid").to_value())?.unwrap(); + let uid_data_map: SmallMap> = SmallMap::unpack_value(uid_data).unwrap(); + let uid_data_keys: Vec<&str> = uid_data_map.keys().map(|key| &key[..]).collect(); + assert!(uid_data_keys.contains(&"uid")); + assert!(uid_data_keys.contains(&"name")); + assert!(uid_data_keys.contains(&"gid")); + assert!(uid_data_keys.contains(&"groups")); + if !cfg!(target_os="windows") { + let euid_data: Value<'_> = res.get(const_frozen_string!("euid").to_value())?.unwrap(); + let euid_data_map: SmallMap> = SmallMap::unpack_value(euid_data).unwrap(); + let euid_data_keys: Vec<&str> = euid_data_map.keys().map(|key| &key[..]).collect(); + assert!(euid_data_keys.contains(&"uid")); + assert!(euid_data_keys.contains(&"name")); + assert!(euid_data_keys.contains(&"gid")); + assert!(euid_data_keys.contains(&"groups")); + } + Ok(()) + } +} \ No newline at end of file diff --git a/implants/lib/eldritch/src/sys/shell_impl.rs b/implants/lib/eldritch/src/sys/shell_impl.rs index 2dd8a2d42..0d68234b0 100644 --- a/implants/lib/eldritch/src/sys/shell_impl.rs +++ b/implants/lib/eldritch/src/sys/shell_impl.rs @@ -1,9 +1,9 @@ use anyhow::Result; use starlark::collections::SmallMap; use starlark::const_frozen_string; -use starlark::values::{Heap, Value}; +use starlark::values::Heap; use starlark::values::dict::Dict; -use std::process::{Command}; +use std::process::Command; use std::str; use super::CommandOutput; @@ -20,7 +20,7 @@ pub fn shell(starlark_heap: &Heap, cmd: String) -> Result { let stderr_value = starlark_heap.alloc_str(cmd_res.stderr.as_str()); dict_res.insert_hashed(const_frozen_string!("stderr").to_value().get_hashed().unwrap(), stderr_value.to_value()); - let status_value = Value::new_int(cmd_res.status); + let status_value = starlark_heap.alloc(cmd_res.status); dict_res.insert_hashed(const_frozen_string!("status").to_value().get_hashed().unwrap(), status_value); Ok(dict_res) @@ -117,7 +117,7 @@ func_shell("whoami") } } - let globals = GlobalsBuilder::extended().with(func_shell).build(); + let globals = GlobalsBuilder::standard().with(func_shell).build(); let module: Module = Module::new(); let mut eval: Evaluator = Evaluator::new(&module); diff --git a/implants/lib/tavern/graphql/schema.graphql b/implants/lib/tavern/graphql/schema.graphql index aed90d9d6..c3cec5ff6 100644 --- a/implants/lib/tavern/graphql/schema.graphql +++ b/implants/lib/tavern/graphql/schema.graphql @@ -29,7 +29,7 @@ type Beacon implements Node { tasks: [Task!] } """BeaconHostPlatform is enum for the field host_platform""" -enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/ent/beacon.HostPlatform") { +enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/beacon.HostPlatform") { Windows Linux MacOS @@ -337,6 +337,47 @@ input FileWhereInput { hashEqualFold: String hashContainsFold: String } +""" +An object with an ID. +Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) +""" +interface Node @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent.Noder") { + """The id of the object.""" + id: ID! +} +"""Possible directions in which to order a list of items when provided an `orderBy` argument.""" +enum OrderDirection { + """Specifies an ascending order for a given `orderBy` argument.""" + ASC + """Specifies a descending order for a given `orderBy` argument.""" + DESC +} +""" +Information about pagination in a connection. +https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo +""" +type PageInfo { + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + """When paginating backwards, the cursor to continue.""" + startCursor: Cursor + """When paginating forwards, the cursor to continue.""" + endCursor: Cursor +} +type Query { + """Fetches an object given its ID.""" + node( + """ID of the object.""" + id: ID! + ): Node + """Lookup nodes by a list of IDs.""" + nodes( + """The list of node IDs.""" + ids: [ID!]! + ): [Node]! +} type Quest implements Node { id: ID! """Timestamp of when this ent was created""" @@ -443,47 +484,6 @@ input QuestWhereInput { hasCreator: Boolean hasCreatorWith: [UserWhereInput!] } -""" -An object with an ID. -Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) -""" -interface Node @goModel(model: "github.com/kcarretto/realm/tavern/ent.Noder") { - """The id of the object.""" - id: ID! -} -"""Possible directions in which to order a list of items when provided an `orderBy` argument.""" -enum OrderDirection { - """Specifies an ascending order for a given `orderBy` argument.""" - ASC - """Specifies a descending order for a given `orderBy` argument.""" - DESC -} -""" -Information about pagination in a connection. -https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo -""" -type PageInfo { - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor -} -type Query { - """Fetches an object given its ID.""" - node( - """ID of the object.""" - id: ID! - ): Node - """Lookup nodes by a list of IDs.""" - nodes( - """The list of node IDs.""" - ids: [ID!]! - ): [Node]! -} type Tag implements Node { id: ID! """Name of the tag""" @@ -493,7 +493,7 @@ type Tag implements Node { beacons: [Beacon!] } """TagKind is enum for the field kind""" -enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/ent/tag.Kind") { +enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/tag.Kind") { group service } diff --git a/implants/lib/tavern/src/http.rs b/implants/lib/tavern/src/http.rs index 8935ef42f..9a365caf8 100644 --- a/implants/lib/tavern/src/http.rs +++ b/implants/lib/tavern/src/http.rs @@ -51,7 +51,6 @@ impl crate::Executor for Transport { async fn exec(&self, query: QueryBody) -> Result { let req: reqwest::RequestBuilder = self.http.post(self.url.as_str()) .json(&query) - .header("Content-Type", "application/json") .header(AUTH_HEADER, self.auth_token.as_str()); let resp = req.send().await?; let gql_resp = resp.json::().await?; diff --git a/implants/rust-toolchain b/implants/rust-toolchain index e317e9277..354c59772 100644 --- a/implants/rust-toolchain +++ b/implants/rust-toolchain @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2022-11-03" \ No newline at end of file +channel = "nightly-2023-09-04" \ No newline at end of file diff --git a/tavern/app.go b/tavern/app.go index 5114a2c1f..6f56eb2ba 100644 --- a/tavern/app.go +++ b/tavern/app.go @@ -10,17 +10,18 @@ import ( "net/http" "os" + "entgo.io/contrib/entgql" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/kcarretto/realm/tavern/tomes" - "entgo.io/contrib/entgql" gqlgraphql "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/playground" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/migrate" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" "github.com/kcarretto/realm/tavern/internal/cdn" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/migrate" + "github.com/kcarretto/realm/tavern/internal/www" "github.com/urfave/cli" ) @@ -105,45 +106,16 @@ func NewServer(ctx context.Context, options ...func(*Config)) (*Server, error) { createTestData(ctx, client) } - // Create GraphQL Handler - srv := handler.NewDefaultServer(graphql.NewSchema(client)) - srv.Use(entgql.Transactioner{TxOpener: client}) - - // GraphQL Logging - gqlLogger := log.New(os.Stderr, "[GraphQL] ", log.Flags()) - srv.AroundOperations(func(ctx context.Context, next gqlgraphql.OperationHandler) gqlgraphql.ResponseHandler { - oc := gqlgraphql.GetOperationContext(ctx) - reqVars, err := json.Marshal(oc.Variables) - if err != nil { - gqlLogger.Printf("[ERROR] failed to marshal variables to JSON: %v", err) - return next(ctx) - } - - authName := "unknown" - id := auth.IdentityFromContext(ctx) - if id != nil { - authName = id.String() - } - - gqlLogger.Printf("%s (%s): %s", oc.OperationName, authName, string(reqVars)) - return next(ctx) - }) - - // Setup HTTP Handler + // Setup HTTP Handlers router := http.NewServeMux() router.Handle("/status", newStatusHandler()) - router.Handle("/", - playground.Handler("Tavern", "/graphql"), - ) - router.Handle("/graphql", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Headers", "*") - srv.ServeHTTP(w, req) - })) router.Handle("/oauth/login", auth.NewOAuthLoginHandler(cfg.oauth, privKey)) router.Handle("/oauth/authorize", auth.NewOAuthAuthorizationHandler(cfg.oauth, pubKey, client, "https://www.googleapis.com/oauth2/v3/userinfo")) + router.Handle("/graphql", newGraphQLHandler(client)) router.Handle("/cdn/", cdn.NewDownloadHandler(client)) router.Handle("/cdn/upload", cdn.NewUploadHandler(client)) + router.Handle("/", auth.WithLoginRedirect("/oauth/login", www.NewAppHandler())) + router.Handle("/playground", auth.WithLoginRedirect("/oauth/login", playground.Handler("Tavern", "/graphql"))) // Log Middleware httpLogger := log.New(os.Stderr, "[HTTP] ", log.Flags()) @@ -181,3 +153,34 @@ func NewServer(ctx context.Context, options ...func(*Config)) (*Server, error) { client: client, }, nil } + +func newGraphQLHandler(client *ent.Client) http.Handler { + srv := handler.NewDefaultServer(graphql.NewSchema(client)) + srv.Use(entgql.Transactioner{TxOpener: client}) + + // GraphQL Logging + gqlLogger := log.New(os.Stderr, "[GraphQL] ", log.Flags()) + srv.AroundOperations(func(ctx context.Context, next gqlgraphql.OperationHandler) gqlgraphql.ResponseHandler { + oc := gqlgraphql.GetOperationContext(ctx) + reqVars, err := json.Marshal(oc.Variables) + if err != nil { + gqlLogger.Printf("[ERROR] failed to marshal variables to JSON: %v", err) + return next(ctx) + } + + authName := "unknown" + id := auth.IdentityFromContext(ctx) + if id != nil { + authName = id.String() + } + + gqlLogger.Printf("%s (%s): %s", oc.OperationName, authName, string(reqVars)) + return next(ctx) + }) + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Headers", "*") + srv.ServeHTTP(w, req) + }) +} diff --git a/tavern/config.go b/tavern/config.go index 24f1b9808..0a8ee1862 100644 --- a/tavern/config.go +++ b/tavern/config.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" "golang.org/x/oauth2" "golang.org/x/oauth2/google" diff --git a/tavern/config_test.go b/tavern/config_test.go index e6caba060..d7c8b64e7 100644 --- a/tavern/config_test.go +++ b/tavern/config_test.go @@ -6,8 +6,8 @@ import ( "os" "testing" - "github.com/kcarretto/realm/tavern/ent/migrate" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/migrate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/oauth2" diff --git a/tavern/e2e_test.go b/tavern/e2e_test.go index 7ad8dd6ac..d544aa3cb 100644 --- a/tavern/e2e_test.go +++ b/tavern/e2e_test.go @@ -11,10 +11,10 @@ import ( "testing" tavern "github.com/kcarretto/realm/tavern" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/ent/quest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/ent/entc.go b/tavern/ent/entc.go deleted file mode 100644 index 90c585afe..000000000 --- a/tavern/ent/entc.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build ignore - -package main - -import ( - "log" - - "entgo.io/contrib/entgql" - "entgo.io/ent/entc" - "entgo.io/ent/entc/gen" -) - -func main() { - extensions, err := entgql.NewExtension( - entgql.WithSchemaGenerator(), - entgql.WithWhereInputs(true), - entgql.WithSchemaPath("./graphql/schema/ent.graphql"), - entgql.WithConfigPath("./graphql/gqlgen.yml"), - ) - if err != nil { - log.Fatalf("creating entgql extension: %v", err) - } - opts := []entc.Option{ - entc.Extensions(extensions), - entc.FeatureNames("privacy"), - } - - if err := entc.Generate( - "./ent/schema", - &gen.Config{}, - opts..., - ); err != nil { - log.Fatalf("running ent codegen: %v", err) - } -} diff --git a/tavern/generate.go b/tavern/generate.go deleted file mode 100644 index 42552e93e..000000000 --- a/tavern/generate.go +++ /dev/null @@ -1,8 +0,0 @@ -package main - -//go:generate go run -mod=mod ./ent/entc.go -//go:generate /bin/sh -c "cd ./graphql && go run -mod=mod github.com/99designs/gqlgen" - -//go:generate /bin/sh -c "cat ./graphql/schema/* > ./graphql/schema.graphql" -//go:generate /bin/sh -c "cp ./graphql/schema.graphql ../implants/lib/tavern/graphql/schema.graphql" -//go:generate /bin/sh -c "cd ../implants/lib/tavern && ./codegen.sh" diff --git a/tavern/auth/context.go b/tavern/internal/auth/context.go similarity index 97% rename from tavern/auth/context.go rename to tavern/internal/auth/context.go index 39eb4f2aa..c263c8bb3 100644 --- a/tavern/auth/context.go +++ b/tavern/internal/auth/context.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) var ( diff --git a/tavern/auth/middleware.go b/tavern/internal/auth/middleware.go similarity index 81% rename from tavern/auth/middleware.go rename to tavern/internal/auth/middleware.go index 5080efc73..58912313e 100644 --- a/tavern/auth/middleware.go +++ b/tavern/internal/auth/middleware.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" ) // AuthDisabledMiddleware should only be used when authentication has been disabled. @@ -82,3 +82,15 @@ func Middleware(handler http.Handler, graph *ent.Client) http.HandlerFunc { handler.ServeHTTP(w, r) }) } + +// WithLoginRedirect will redirect requests for the provided handler to the provided redirect URL if the request is unauthenticated. +func WithLoginRedirect(redirect string, handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if !IsAuthenticatedContext(req.Context()) { + http.Redirect(w, req, redirect, http.StatusFound) + return + } + handler.ServeHTTP(w, req) + }) + +} diff --git a/tavern/auth/oauth.go b/tavern/internal/auth/oauth.go similarity index 98% rename from tavern/auth/oauth.go rename to tavern/internal/auth/oauth.go index 5b5d21612..6b16a61de 100644 --- a/tavern/auth/oauth.go +++ b/tavern/internal/auth/oauth.go @@ -12,8 +12,8 @@ import ( "time" "github.com/golang-jwt/jwt" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/user" "golang.org/x/oauth2" ) diff --git a/tavern/auth/oauth_test.go b/tavern/internal/auth/oauth_test.go similarity index 97% rename from tavern/auth/oauth_test.go rename to tavern/internal/auth/oauth_test.go index cc3a5caa7..1cd3ced5c 100644 --- a/tavern/auth/oauth_test.go +++ b/tavern/internal/auth/oauth_test.go @@ -13,9 +13,9 @@ import ( "time" "github.com/golang-jwt/jwt" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/ent/user" _ "github.com/mattn/go-sqlite3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tavern/internal/cdn/download.go b/tavern/internal/cdn/download.go index 82279327b..db4c182e9 100644 --- a/tavern/internal/cdn/download.go +++ b/tavern/internal/cdn/download.go @@ -5,8 +5,8 @@ import ( "net/http" "path/filepath" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/file" "github.com/kcarretto/realm/tavern/internal/errors" ) diff --git a/tavern/internal/cdn/download_test.go b/tavern/internal/cdn/download_test.go index 9c0cfa0db..bd9c0234a 100644 --- a/tavern/internal/cdn/download_test.go +++ b/tavern/internal/cdn/download_test.go @@ -7,9 +7,9 @@ import ( "net/http/httptest" "testing" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" "github.com/kcarretto/realm/tavern/internal/cdn" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" "github.com/kcarretto/realm/tavern/internal/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tavern/internal/cdn/upload.go b/tavern/internal/cdn/upload.go index d9ce8f004..395b1d28b 100644 --- a/tavern/internal/cdn/upload.go +++ b/tavern/internal/cdn/upload.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "net/http" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/file" "github.com/kcarretto/realm/tavern/internal/errors" ) diff --git a/tavern/internal/cdn/upload_test.go b/tavern/internal/cdn/upload_test.go index 21088af62..a7363f16c 100644 --- a/tavern/internal/cdn/upload_test.go +++ b/tavern/internal/cdn/upload_test.go @@ -11,9 +11,9 @@ import ( "net/http/httptest" "testing" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" "github.com/kcarretto/realm/tavern/internal/cdn" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" _ "github.com/mattn/go-sqlite3" "github.com/stretchr/testify/assert" diff --git a/tavern/ent/beacon.go b/tavern/internal/ent/beacon.go similarity index 99% rename from tavern/ent/beacon.go rename to tavern/internal/ent/beacon.go index 9eb9bd63b..88cc2b59e 100644 --- a/tavern/ent/beacon.go +++ b/tavern/internal/ent/beacon.go @@ -8,7 +8,7 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" ) // Beacon is the model entity for the Beacon schema. diff --git a/tavern/ent/beacon/beacon.go b/tavern/internal/ent/beacon/beacon.go similarity index 100% rename from tavern/ent/beacon/beacon.go rename to tavern/internal/ent/beacon/beacon.go diff --git a/tavern/ent/beacon/where.go b/tavern/internal/ent/beacon/where.go similarity index 99% rename from tavern/ent/beacon/where.go rename to tavern/internal/ent/beacon/where.go index 1982f776a..a23b02953 100644 --- a/tavern/ent/beacon/where.go +++ b/tavern/internal/ent/beacon/where.go @@ -7,7 +7,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/beacon_create.go b/tavern/internal/ent/beacon_create.go similarity index 98% rename from tavern/ent/beacon_create.go rename to tavern/internal/ent/beacon_create.go index a15c6b53c..40a027533 100644 --- a/tavern/ent/beacon_create.go +++ b/tavern/internal/ent/beacon_create.go @@ -10,9 +10,9 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // BeaconCreate is the builder for creating a Beacon entity. diff --git a/tavern/ent/beacon_delete.go b/tavern/internal/ent/beacon_delete.go similarity index 94% rename from tavern/ent/beacon_delete.go rename to tavern/internal/ent/beacon_delete.go index b7b5690a8..39db8e3ae 100644 --- a/tavern/ent/beacon_delete.go +++ b/tavern/internal/ent/beacon_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // BeaconDelete is the builder for deleting a Beacon entity. diff --git a/tavern/ent/beacon_query.go b/tavern/internal/ent/beacon_query.go similarity index 98% rename from tavern/ent/beacon_query.go rename to tavern/internal/ent/beacon_query.go index a6332bf6c..923901480 100644 --- a/tavern/ent/beacon_query.go +++ b/tavern/internal/ent/beacon_query.go @@ -11,10 +11,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // BeaconQuery is the builder for querying Beacon entities. diff --git a/tavern/ent/beacon_update.go b/tavern/internal/ent/beacon_update.go similarity index 99% rename from tavern/ent/beacon_update.go rename to tavern/internal/ent/beacon_update.go index 988503faa..b52e09f81 100644 --- a/tavern/ent/beacon_update.go +++ b/tavern/internal/ent/beacon_update.go @@ -11,10 +11,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // BeaconUpdate is the builder for updating Beacon entities. diff --git a/tavern/ent/client.go b/tavern/internal/ent/client.go similarity index 98% rename from tavern/ent/client.go rename to tavern/internal/ent/client.go index 311f23397..310b05abd 100644 --- a/tavern/ent/client.go +++ b/tavern/internal/ent/client.go @@ -8,19 +8,19 @@ import ( "fmt" "log" - "github.com/kcarretto/realm/tavern/ent/migrate" + "github.com/kcarretto/realm/tavern/internal/ent/migrate" "entgo.io/ent" "entgo.io/ent/dialect" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // Client is the client that holds all ent builders. diff --git a/tavern/ent/ent.go b/tavern/internal/ent/ent.go similarity index 97% rename from tavern/ent/ent.go rename to tavern/internal/ent/ent.go index 47d857f4e..bbc346262 100644 --- a/tavern/ent/ent.go +++ b/tavern/internal/ent/ent.go @@ -11,13 +11,13 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // ent aliases to avoid import conflicts in user's code. diff --git a/tavern/ent/enttest/enttest.go b/tavern/internal/ent/enttest/enttest.go similarity index 91% rename from tavern/ent/enttest/enttest.go rename to tavern/internal/ent/enttest/enttest.go index a20eed131..89e0bd91c 100644 --- a/tavern/ent/enttest/enttest.go +++ b/tavern/internal/ent/enttest/enttest.go @@ -5,12 +5,12 @@ package enttest import ( "context" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" // required by schema hooks. - _ "github.com/kcarretto/realm/tavern/ent/runtime" + _ "github.com/kcarretto/realm/tavern/internal/ent/runtime" "entgo.io/ent/dialect/sql/schema" - "github.com/kcarretto/realm/tavern/ent/migrate" + "github.com/kcarretto/realm/tavern/internal/ent/migrate" ) type ( diff --git a/tavern/ent/file.go b/tavern/internal/ent/file.go similarity index 98% rename from tavern/ent/file.go rename to tavern/internal/ent/file.go index 21f0abfeb..87ae1767e 100644 --- a/tavern/ent/file.go +++ b/tavern/internal/ent/file.go @@ -8,7 +8,7 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/file" ) // File is the model entity for the File schema. diff --git a/tavern/ent/file/file.go b/tavern/internal/ent/file/file.go similarity index 97% rename from tavern/ent/file/file.go rename to tavern/internal/ent/file/file.go index 98e1b1ff6..4fd05bdf2 100644 --- a/tavern/ent/file/file.go +++ b/tavern/internal/ent/file/file.go @@ -65,7 +65,7 @@ func ValidColumn(column string) bool { // package on the initialization of the application. Therefore, // it should be imported in the main as follows: // -// import _ "github.com/kcarretto/realm/tavern/ent/runtime" +// import _ "github.com/kcarretto/realm/tavern/internal/ent/runtime" var ( Hooks [1]ent.Hook // DefaultCreatedAt holds the default value on creation for the "created_at" field. diff --git a/tavern/ent/file/where.go b/tavern/internal/ent/file/where.go similarity index 99% rename from tavern/ent/file/where.go rename to tavern/internal/ent/file/where.go index daba25069..486d028bb 100644 --- a/tavern/ent/file/where.go +++ b/tavern/internal/ent/file/where.go @@ -6,7 +6,7 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/file_create.go b/tavern/internal/ent/file_create.go similarity index 99% rename from tavern/ent/file_create.go rename to tavern/internal/ent/file_create.go index ef83abd17..e5aba4c40 100644 --- a/tavern/ent/file_create.go +++ b/tavern/internal/ent/file_create.go @@ -10,7 +10,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/file" ) // FileCreate is the builder for creating a File entity. diff --git a/tavern/ent/file_delete.go b/tavern/internal/ent/file_delete.go similarity index 94% rename from tavern/ent/file_delete.go rename to tavern/internal/ent/file_delete.go index 7dfcc5ea4..225d0e8d9 100644 --- a/tavern/ent/file_delete.go +++ b/tavern/internal/ent/file_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // FileDelete is the builder for deleting a File entity. diff --git a/tavern/ent/file_query.go b/tavern/internal/ent/file_query.go similarity index 99% rename from tavern/ent/file_query.go rename to tavern/internal/ent/file_query.go index 6cabf18c7..55457a936 100644 --- a/tavern/ent/file_query.go +++ b/tavern/internal/ent/file_query.go @@ -10,8 +10,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // FileQuery is the builder for querying File entities. diff --git a/tavern/ent/file_update.go b/tavern/internal/ent/file_update.go similarity index 98% rename from tavern/ent/file_update.go rename to tavern/internal/ent/file_update.go index e036a080d..34c5fc556 100644 --- a/tavern/ent/file_update.go +++ b/tavern/internal/ent/file_update.go @@ -11,8 +11,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // FileUpdate is the builder for updating File entities. diff --git a/tavern/internal/ent/generate.go b/tavern/internal/ent/generate.go new file mode 100644 index 000000000..d72fb28bd --- /dev/null +++ b/tavern/internal/ent/generate.go @@ -0,0 +1,43 @@ +//go:build ignore + +package main + +import ( + "log" + + "entgo.io/contrib/entgql" + "entgo.io/ent/entc" + "entgo.io/ent/entc/gen" +) + +//go:generate go run -mod=mod generate.go +//go:generate /bin/sh -c "cd ../graphql && go run -mod=mod github.com/99designs/gqlgen" +//go:generate /bin/sh -c "cat ../graphql/schema/* > ../graphql/schema.graphql" +//go:generate /bin/sh -c "cp ../graphql/schema.graphql ../www/schema.graphql" +//go:generate /bin/sh -c "cp ../graphql/schema.graphql ../../../implants/lib/tavern/graphql/schema.graphql" +//go:generate /bin/sh -c "cd ../../../implants/lib/tavern && ./codegen.sh" + +func main() { + log.Println("generating entgo") + extensions, err := entgql.NewExtension( + entgql.WithSchemaGenerator(), + entgql.WithWhereInputs(true), + entgql.WithSchemaPath("../graphql/schema/ent.graphql"), + entgql.WithConfigPath("../graphql/gqlgen.yml"), + ) + if err != nil { + log.Fatalf("creating entgql extension: %v", err) + } + opts := []entc.Option{ + entc.Extensions(extensions), + entc.FeatureNames("privacy"), + } + + if err := entc.Generate( + "./schema", + &gen.Config{}, + opts..., + ); err != nil { + log.Fatalf("running ent codegen: %v", err) + } +} diff --git a/tavern/ent/gql_collection.go b/tavern/internal/ent/gql_collection.go similarity index 100% rename from tavern/ent/gql_collection.go rename to tavern/internal/ent/gql_collection.go diff --git a/tavern/ent/gql_edge.go b/tavern/internal/ent/gql_edge.go similarity index 100% rename from tavern/ent/gql_edge.go rename to tavern/internal/ent/gql_edge.go diff --git a/tavern/ent/gql_mutation_input.go b/tavern/internal/ent/gql_mutation_input.go similarity index 98% rename from tavern/ent/gql_mutation_input.go rename to tavern/internal/ent/gql_mutation_input.go index 7258bc59c..97b9b9682 100644 --- a/tavern/ent/gql_mutation_input.go +++ b/tavern/internal/ent/gql_mutation_input.go @@ -3,7 +3,7 @@ package ent import ( - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // UpdateBeaconInput represents a mutation input for updating beacons. diff --git a/tavern/ent/gql_node.go b/tavern/internal/ent/gql_node.go similarity index 96% rename from tavern/ent/gql_node.go rename to tavern/internal/ent/gql_node.go index fe682fc6f..2256469df 100644 --- a/tavern/ent/gql_node.go +++ b/tavern/internal/ent/gql_node.go @@ -14,13 +14,13 @@ import ( "entgo.io/ent/dialect/sql/schema" "github.com/99designs/gqlgen/graphql" "github.com/hashicorp/go-multierror" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" "golang.org/x/sync/semaphore" ) diff --git a/tavern/ent/gql_pagination.go b/tavern/internal/ent/gql_pagination.go similarity index 99% rename from tavern/ent/gql_pagination.go rename to tavern/internal/ent/gql_pagination.go index 6ceb10f9d..3bd3b051f 100644 --- a/tavern/ent/gql_pagination.go +++ b/tavern/internal/ent/gql_pagination.go @@ -14,13 +14,13 @@ import ( "entgo.io/ent/dialect/sql" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" "github.com/vektah/gqlparser/v2/gqlerror" "github.com/vmihailenco/msgpack/v5" ) diff --git a/tavern/ent/gql_transaction.go b/tavern/internal/ent/gql_transaction.go similarity index 100% rename from tavern/ent/gql_transaction.go rename to tavern/internal/ent/gql_transaction.go diff --git a/tavern/ent/gql_where_input.go b/tavern/internal/ent/gql_where_input.go similarity index 99% rename from tavern/ent/gql_where_input.go rename to tavern/internal/ent/gql_where_input.go index cfee3aafe..261d06ca2 100644 --- a/tavern/ent/gql_where_input.go +++ b/tavern/internal/ent/gql_where_input.go @@ -7,14 +7,14 @@ import ( "fmt" "time" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // BeaconWhereInput represents a where input for filtering Beacon queries. diff --git a/tavern/ent/hook/hook.go b/tavern/internal/ent/hook/hook.go similarity index 99% rename from tavern/ent/hook/hook.go rename to tavern/internal/ent/hook/hook.go index 9da956750..81ca305ea 100644 --- a/tavern/ent/hook/hook.go +++ b/tavern/internal/ent/hook/hook.go @@ -6,7 +6,7 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" ) // The BeaconFunc type is an adapter to allow the use of ordinary diff --git a/tavern/ent/migrate/migrate.go b/tavern/internal/ent/migrate/migrate.go similarity index 100% rename from tavern/ent/migrate/migrate.go rename to tavern/internal/ent/migrate/migrate.go diff --git a/tavern/ent/migrate/schema.go b/tavern/internal/ent/migrate/schema.go similarity index 100% rename from tavern/ent/migrate/schema.go rename to tavern/internal/ent/migrate/schema.go diff --git a/tavern/ent/mutation.go b/tavern/internal/ent/mutation.go similarity index 99% rename from tavern/ent/mutation.go rename to tavern/internal/ent/mutation.go index 6b89c8eb4..0241f34dc 100644 --- a/tavern/ent/mutation.go +++ b/tavern/internal/ent/mutation.go @@ -11,14 +11,14 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) const ( diff --git a/tavern/ent/predicate/predicate.go b/tavern/internal/ent/predicate/predicate.go similarity index 100% rename from tavern/ent/predicate/predicate.go rename to tavern/internal/ent/predicate/predicate.go diff --git a/tavern/ent/privacy/privacy.go b/tavern/internal/ent/privacy/privacy.go similarity index 99% rename from tavern/ent/privacy/privacy.go rename to tavern/internal/ent/privacy/privacy.go index 6a48a96ca..d1ceaa24c 100644 --- a/tavern/ent/privacy/privacy.go +++ b/tavern/internal/ent/privacy/privacy.go @@ -6,7 +6,7 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" "entgo.io/ent/privacy" ) diff --git a/tavern/ent/quest.go b/tavern/internal/ent/quest.go similarity index 97% rename from tavern/ent/quest.go rename to tavern/internal/ent/quest.go index f3946075b..b1fe5895f 100644 --- a/tavern/ent/quest.go +++ b/tavern/internal/ent/quest.go @@ -8,10 +8,10 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // Quest is the model entity for the Quest schema. diff --git a/tavern/ent/quest/quest.go b/tavern/internal/ent/quest/quest.go similarity index 100% rename from tavern/ent/quest/quest.go rename to tavern/internal/ent/quest/quest.go diff --git a/tavern/ent/quest/where.go b/tavern/internal/ent/quest/where.go similarity index 99% rename from tavern/ent/quest/where.go rename to tavern/internal/ent/quest/where.go index 5bbf0bba5..f16c8285a 100644 --- a/tavern/ent/quest/where.go +++ b/tavern/internal/ent/quest/where.go @@ -7,7 +7,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/quest_create.go b/tavern/internal/ent/quest_create.go similarity index 97% rename from tavern/ent/quest_create.go rename to tavern/internal/ent/quest_create.go index f52d4804a..3a3ab6642 100644 --- a/tavern/ent/quest_create.go +++ b/tavern/internal/ent/quest_create.go @@ -10,11 +10,11 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // QuestCreate is the builder for creating a Quest entity. diff --git a/tavern/ent/quest_delete.go b/tavern/internal/ent/quest_delete.go similarity index 94% rename from tavern/ent/quest_delete.go rename to tavern/internal/ent/quest_delete.go index 4e9604bef..9bc1f1be2 100644 --- a/tavern/ent/quest_delete.go +++ b/tavern/internal/ent/quest_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" ) // QuestDelete is the builder for deleting a Quest entity. diff --git a/tavern/ent/quest_query.go b/tavern/internal/ent/quest_query.go similarity index 98% rename from tavern/ent/quest_query.go rename to tavern/internal/ent/quest_query.go index 20e7c3688..7a9a917d8 100644 --- a/tavern/ent/quest_query.go +++ b/tavern/internal/ent/quest_query.go @@ -11,12 +11,12 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // QuestQuery is the builder for querying Quest entities. diff --git a/tavern/ent/quest_update.go b/tavern/internal/ent/quest_update.go similarity index 98% rename from tavern/ent/quest_update.go rename to tavern/internal/ent/quest_update.go index 979e75f98..b2a6c6941 100644 --- a/tavern/ent/quest_update.go +++ b/tavern/internal/ent/quest_update.go @@ -11,12 +11,12 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // QuestUpdate is the builder for updating Quest entities. diff --git a/tavern/ent/runtime.go b/tavern/internal/ent/runtime.go similarity index 70% rename from tavern/ent/runtime.go rename to tavern/internal/ent/runtime.go index d543f9470..3881f9547 100644 --- a/tavern/ent/runtime.go +++ b/tavern/internal/ent/runtime.go @@ -2,4 +2,4 @@ package ent -// The schema-stitching logic is generated in github.com/kcarretto/realm/tavern/ent/runtime/runtime.go +// The schema-stitching logic is generated in github.com/kcarretto/realm/tavern/internal/ent/runtime/runtime.go diff --git a/tavern/ent/runtime/runtime.go b/tavern/internal/ent/runtime/runtime.go similarity index 95% rename from tavern/ent/runtime/runtime.go rename to tavern/internal/ent/runtime/runtime.go index b53cfa6ad..2b8ce4379 100644 --- a/tavern/ent/runtime/runtime.go +++ b/tavern/internal/ent/runtime/runtime.go @@ -5,14 +5,14 @@ package runtime import ( "time" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/schema" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/ent/tome" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/schema" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // The init function reads all schema descriptors with runtime code diff --git a/tavern/ent/schema/beacon.go b/tavern/internal/ent/schema/beacon.go similarity index 98% rename from tavern/ent/schema/beacon.go rename to tavern/internal/ent/schema/beacon.go index c62191af4..15ffd3a9e 100644 --- a/tavern/ent/schema/beacon.go +++ b/tavern/internal/ent/schema/beacon.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/kcarretto/realm/tavern/namegen" + "github.com/kcarretto/realm/tavern/internal/namegen" "entgo.io/contrib/entgql" "entgo.io/ent" diff --git a/tavern/ent/schema/file.go b/tavern/internal/ent/schema/file.go similarity index 97% rename from tavern/ent/schema/file.go rename to tavern/internal/ent/schema/file.go index 7fa4e2569..9e7c16679 100644 --- a/tavern/ent/schema/file.go +++ b/tavern/internal/ent/schema/file.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/ent/hook" + "github.com/kcarretto/realm/tavern/internal/ent/hook" "golang.org/x/crypto/sha3" "entgo.io/contrib/entgql" diff --git a/tavern/ent/schema/file_test.go b/tavern/internal/ent/schema/file_test.go similarity index 92% rename from tavern/ent/schema/file_test.go rename to tavern/internal/ent/schema/file_test.go index 9391bcfe0..e67483898 100644 --- a/tavern/ent/schema/file_test.go +++ b/tavern/internal/ent/schema/file_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" _ "github.com/mattn/go-sqlite3" "github.com/stretchr/testify/assert" ) diff --git a/tavern/ent/schema/mixin_history.go b/tavern/internal/ent/schema/mixin_history.go similarity index 100% rename from tavern/ent/schema/mixin_history.go rename to tavern/internal/ent/schema/mixin_history.go diff --git a/tavern/ent/schema/quest.go b/tavern/internal/ent/schema/quest.go similarity index 100% rename from tavern/ent/schema/quest.go rename to tavern/internal/ent/schema/quest.go diff --git a/tavern/ent/schema/tag.go b/tavern/internal/ent/schema/tag.go similarity index 100% rename from tavern/ent/schema/tag.go rename to tavern/internal/ent/schema/tag.go diff --git a/tavern/ent/schema/task.go b/tavern/internal/ent/schema/task.go similarity index 100% rename from tavern/ent/schema/task.go rename to tavern/internal/ent/schema/task.go diff --git a/tavern/ent/schema/tome.go b/tavern/internal/ent/schema/tome.go similarity index 97% rename from tavern/ent/schema/tome.go rename to tavern/internal/ent/schema/tome.go index 02b010a5c..12770d4ad 100644 --- a/tavern/ent/schema/tome.go +++ b/tavern/internal/ent/schema/tome.go @@ -10,7 +10,7 @@ import ( "entgo.io/ent/schema" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/hook" + "github.com/kcarretto/realm/tavern/internal/ent/hook" "golang.org/x/crypto/sha3" ) diff --git a/tavern/ent/schema/user.go b/tavern/internal/ent/schema/user.go similarity index 100% rename from tavern/ent/schema/user.go rename to tavern/internal/ent/schema/user.go diff --git a/tavern/ent/tag.go b/tavern/internal/ent/tag.go similarity index 98% rename from tavern/ent/tag.go rename to tavern/internal/ent/tag.go index 635c67a98..cad6485e6 100644 --- a/tavern/ent/tag.go +++ b/tavern/internal/ent/tag.go @@ -7,7 +7,7 @@ import ( "strings" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // Tag is the model entity for the Tag schema. diff --git a/tavern/ent/tag/tag.go b/tavern/internal/ent/tag/tag.go similarity index 100% rename from tavern/ent/tag/tag.go rename to tavern/internal/ent/tag/tag.go diff --git a/tavern/ent/tag/where.go b/tavern/internal/ent/tag/where.go similarity index 98% rename from tavern/ent/tag/where.go rename to tavern/internal/ent/tag/where.go index 883dcdc81..29af05ec4 100644 --- a/tavern/ent/tag/where.go +++ b/tavern/internal/ent/tag/where.go @@ -5,7 +5,7 @@ package tag import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/tag_create.go b/tavern/internal/ent/tag_create.go similarity index 98% rename from tavern/ent/tag_create.go rename to tavern/internal/ent/tag_create.go index 1c1f235ad..931731890 100644 --- a/tavern/ent/tag_create.go +++ b/tavern/internal/ent/tag_create.go @@ -9,8 +9,8 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // TagCreate is the builder for creating a Tag entity. diff --git a/tavern/ent/tag_delete.go b/tavern/internal/ent/tag_delete.go similarity index 94% rename from tavern/ent/tag_delete.go rename to tavern/internal/ent/tag_delete.go index 90090f0b0..7624275e4 100644 --- a/tavern/ent/tag_delete.go +++ b/tavern/internal/ent/tag_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // TagDelete is the builder for deleting a Tag entity. diff --git a/tavern/ent/tag_query.go b/tavern/internal/ent/tag_query.go similarity index 99% rename from tavern/ent/tag_query.go rename to tavern/internal/ent/tag_query.go index b628e2642..6a1a6afeb 100644 --- a/tavern/ent/tag_query.go +++ b/tavern/internal/ent/tag_query.go @@ -11,9 +11,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // TagQuery is the builder for querying Tag entities. diff --git a/tavern/ent/tag_update.go b/tavern/internal/ent/tag_update.go similarity index 98% rename from tavern/ent/tag_update.go rename to tavern/internal/ent/tag_update.go index 152c2baea..268425464 100644 --- a/tavern/ent/tag_update.go +++ b/tavern/internal/ent/tag_update.go @@ -10,9 +10,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tag" ) // TagUpdate is the builder for updating Tag entities. diff --git a/tavern/ent/task.go b/tavern/internal/ent/task.go similarity index 97% rename from tavern/ent/task.go rename to tavern/internal/ent/task.go index 421a7d576..df3aa0bb6 100644 --- a/tavern/ent/task.go +++ b/tavern/internal/ent/task.go @@ -8,9 +8,9 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // Task is the model entity for the Task schema. diff --git a/tavern/ent/task/task.go b/tavern/internal/ent/task/task.go similarity index 100% rename from tavern/ent/task/task.go rename to tavern/internal/ent/task/task.go diff --git a/tavern/ent/task/where.go b/tavern/internal/ent/task/where.go similarity index 99% rename from tavern/ent/task/where.go rename to tavern/internal/ent/task/where.go index 124c94e6b..a9b009e38 100644 --- a/tavern/ent/task/where.go +++ b/tavern/internal/ent/task/where.go @@ -7,7 +7,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/task_create.go b/tavern/internal/ent/task_create.go similarity index 98% rename from tavern/ent/task_create.go rename to tavern/internal/ent/task_create.go index 75b81e169..c96f1a0ce 100644 --- a/tavern/ent/task_create.go +++ b/tavern/internal/ent/task_create.go @@ -10,9 +10,9 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // TaskCreate is the builder for creating a Task entity. diff --git a/tavern/ent/task_delete.go b/tavern/internal/ent/task_delete.go similarity index 94% rename from tavern/ent/task_delete.go rename to tavern/internal/ent/task_delete.go index 861528977..be8aa9f3d 100644 --- a/tavern/ent/task_delete.go +++ b/tavern/internal/ent/task_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // TaskDelete is the builder for deleting a Task entity. diff --git a/tavern/ent/task_query.go b/tavern/internal/ent/task_query.go similarity index 98% rename from tavern/ent/task_query.go rename to tavern/internal/ent/task_query.go index 860d3f31e..33ddfaed0 100644 --- a/tavern/ent/task_query.go +++ b/tavern/internal/ent/task_query.go @@ -10,10 +10,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // TaskQuery is the builder for querying Task entities. diff --git a/tavern/ent/task_update.go b/tavern/internal/ent/task_update.go similarity index 98% rename from tavern/ent/task_update.go rename to tavern/internal/ent/task_update.go index 8039de4c8..d25415d35 100644 --- a/tavern/ent/task_update.go +++ b/tavern/internal/ent/task_update.go @@ -11,10 +11,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/quest" - "github.com/kcarretto/realm/tavern/ent/task" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/quest" + "github.com/kcarretto/realm/tavern/internal/ent/task" ) // TaskUpdate is the builder for updating Task entities. diff --git a/tavern/ent/tome.go b/tavern/internal/ent/tome.go similarity index 99% rename from tavern/ent/tome.go rename to tavern/internal/ent/tome.go index 097f7f080..bf40b0ce3 100644 --- a/tavern/ent/tome.go +++ b/tavern/internal/ent/tome.go @@ -8,7 +8,7 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/tome" ) // Tome is the model entity for the Tome schema. diff --git a/tavern/ent/tome/tome.go b/tavern/internal/ent/tome/tome.go similarity index 97% rename from tavern/ent/tome/tome.go rename to tavern/internal/ent/tome/tome.go index 8aace3377..08ac248f4 100644 --- a/tavern/ent/tome/tome.go +++ b/tavern/internal/ent/tome/tome.go @@ -66,7 +66,7 @@ func ValidColumn(column string) bool { // package on the initialization of the application. Therefore, // it should be imported in the main as follows: // -// import _ "github.com/kcarretto/realm/tavern/ent/runtime" +// import _ "github.com/kcarretto/realm/tavern/internal/ent/runtime" var ( Hooks [1]ent.Hook // DefaultCreatedAt holds the default value on creation for the "created_at" field. diff --git a/tavern/ent/tome/where.go b/tavern/internal/ent/tome/where.go similarity index 99% rename from tavern/ent/tome/where.go rename to tavern/internal/ent/tome/where.go index 0f865f58d..c4946fac4 100644 --- a/tavern/ent/tome/where.go +++ b/tavern/internal/ent/tome/where.go @@ -7,7 +7,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/tome_create.go b/tavern/internal/ent/tome_create.go similarity index 98% rename from tavern/ent/tome_create.go rename to tavern/internal/ent/tome_create.go index ef26f456a..81ab762fe 100644 --- a/tavern/ent/tome_create.go +++ b/tavern/internal/ent/tome_create.go @@ -10,8 +10,8 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/tome" ) // TomeCreate is the builder for creating a Tome entity. diff --git a/tavern/ent/tome_delete.go b/tavern/internal/ent/tome_delete.go similarity index 94% rename from tavern/ent/tome_delete.go rename to tavern/internal/ent/tome_delete.go index 376369e16..c6ea3e02e 100644 --- a/tavern/ent/tome_delete.go +++ b/tavern/internal/ent/tome_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tome" ) // TomeDelete is the builder for deleting a Tome entity. diff --git a/tavern/ent/tome_query.go b/tavern/internal/ent/tome_query.go similarity index 99% rename from tavern/ent/tome_query.go rename to tavern/internal/ent/tome_query.go index 501f67806..42d3869a8 100644 --- a/tavern/ent/tome_query.go +++ b/tavern/internal/ent/tome_query.go @@ -11,9 +11,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tome" ) // TomeQuery is the builder for querying Tome entities. diff --git a/tavern/ent/tome_update.go b/tavern/internal/ent/tome_update.go similarity index 98% rename from tavern/ent/tome_update.go rename to tavern/internal/ent/tome_update.go index 4890f28be..341e495d1 100644 --- a/tavern/ent/tome_update.go +++ b/tavern/internal/ent/tome_update.go @@ -11,9 +11,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/tome" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/tome" ) // TomeUpdate is the builder for updating Tome entities. diff --git a/tavern/ent/tx.go b/tavern/internal/ent/tx.go similarity index 100% rename from tavern/ent/tx.go rename to tavern/internal/ent/tx.go diff --git a/tavern/ent/user.go b/tavern/internal/ent/user.go similarity index 98% rename from tavern/ent/user.go rename to tavern/internal/ent/user.go index d38accecd..83dc63213 100644 --- a/tavern/ent/user.go +++ b/tavern/internal/ent/user.go @@ -7,7 +7,7 @@ import ( "strings" "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // User is the model entity for the User schema. diff --git a/tavern/ent/user/user.go b/tavern/internal/ent/user/user.go similarity index 100% rename from tavern/ent/user/user.go rename to tavern/internal/ent/user/user.go diff --git a/tavern/ent/user/where.go b/tavern/internal/ent/user/where.go similarity index 99% rename from tavern/ent/user/where.go rename to tavern/internal/ent/user/where.go index e24ac83b9..9bc642d27 100644 --- a/tavern/ent/user/where.go +++ b/tavern/internal/ent/user/where.go @@ -4,7 +4,7 @@ package user import ( "entgo.io/ent/dialect/sql" - "github.com/kcarretto/realm/tavern/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/tavern/ent/user_create.go b/tavern/internal/ent/user_create.go similarity index 99% rename from tavern/ent/user_create.go rename to tavern/internal/ent/user_create.go index a7f2311e4..cbfcc3bec 100644 --- a/tavern/ent/user_create.go +++ b/tavern/internal/ent/user_create.go @@ -9,7 +9,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // UserCreate is the builder for creating a User entity. diff --git a/tavern/ent/user_delete.go b/tavern/internal/ent/user_delete.go similarity index 94% rename from tavern/ent/user_delete.go rename to tavern/internal/ent/user_delete.go index 72d58c91f..c6def70bf 100644 --- a/tavern/ent/user_delete.go +++ b/tavern/internal/ent/user_delete.go @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // UserDelete is the builder for deleting a User entity. diff --git a/tavern/ent/user_query.go b/tavern/internal/ent/user_query.go similarity index 99% rename from tavern/ent/user_query.go rename to tavern/internal/ent/user_query.go index da2a5bc1d..156adbe21 100644 --- a/tavern/ent/user_query.go +++ b/tavern/internal/ent/user_query.go @@ -10,8 +10,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // UserQuery is the builder for querying User entities. diff --git a/tavern/ent/user_update.go b/tavern/internal/ent/user_update.go similarity index 98% rename from tavern/ent/user_update.go rename to tavern/internal/ent/user_update.go index 152287199..2d651cfce 100644 --- a/tavern/ent/user_update.go +++ b/tavern/internal/ent/user_update.go @@ -10,8 +10,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/kcarretto/realm/tavern/ent/predicate" - "github.com/kcarretto/realm/tavern/ent/user" + "github.com/kcarretto/realm/tavern/internal/ent/predicate" + "github.com/kcarretto/realm/tavern/internal/ent/user" ) // UserUpdate is the builder for updating User entities. diff --git a/tavern/graphql/api_test.go b/tavern/internal/graphql/api_test.go similarity index 95% rename from tavern/graphql/api_test.go rename to tavern/internal/graphql/api_test.go index a3197a37e..72471357b 100644 --- a/tavern/graphql/api_test.go +++ b/tavern/internal/graphql/api_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tavern/graphql/beacon_test.go b/tavern/internal/graphql/beacon_test.go similarity index 96% rename from tavern/graphql/beacon_test.go rename to tavern/internal/graphql/beacon_test.go index e44a484d3..8461d83e2 100644 --- a/tavern/graphql/beacon_test.go +++ b/tavern/internal/graphql/beacon_test.go @@ -8,12 +8,12 @@ import ( "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql/handler" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/graphql/bundle.go b/tavern/internal/graphql/bundle.go similarity index 95% rename from tavern/graphql/bundle.go rename to tavern/internal/graphql/bundle.go index 88e287305..5098ed915 100644 --- a/tavern/graphql/bundle.go +++ b/tavern/internal/graphql/bundle.go @@ -9,8 +9,8 @@ import ( "fmt" "strings" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/file" "golang.org/x/crypto/sha3" ) diff --git a/tavern/graphql/ent.resolvers.go b/tavern/internal/graphql/ent.resolvers.go similarity index 87% rename from tavern/graphql/ent.resolvers.go rename to tavern/internal/graphql/ent.resolvers.go index d1ca800b0..523e1aef5 100644 --- a/tavern/graphql/ent.resolvers.go +++ b/tavern/internal/graphql/ent.resolvers.go @@ -7,8 +7,8 @@ package graphql import ( "context" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/graphql/generated" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/graphql/generated" ) // Node is the resolver for the node field. diff --git a/tavern/graphql/generated/directives.generated.go b/tavern/internal/graphql/generated/directives.generated.go similarity index 85% rename from tavern/graphql/generated/directives.generated.go rename to tavern/internal/graphql/generated/directives.generated.go index f6de16ecb..9f0dbc0f2 100644 --- a/tavern/graphql/generated/directives.generated.go +++ b/tavern/internal/graphql/generated/directives.generated.go @@ -6,7 +6,7 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/graphql/models" "github.com/vektah/gqlparser/v2/ast" ) @@ -22,7 +22,7 @@ func (ec *executionContext) dir_requireRole_args(ctx context.Context, rawArgs ma var arg0 models.Role if tmp, ok := rawArgs["role"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role")) - arg0, err = ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, tmp) + arg0, err = ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, tmp) if err != nil { return nil, err } @@ -55,13 +55,13 @@ func (ec *executionContext) dir_requireRole_args(ctx context.Context, rawArgs ma // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx context.Context, v interface{}) (models.Role, error) { +func (ec *executionContext) unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, v interface{}) (models.Role, error) { var res models.Role err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx context.Context, sel ast.SelectionSet, v models.Role) graphql.Marshaler { +func (ec *executionContext) marshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, sel ast.SelectionSet, v models.Role) graphql.Marshaler { return v } diff --git a/tavern/graphql/generated/ent.generated.go b/tavern/internal/graphql/generated/ent.generated.go similarity index 94% rename from tavern/graphql/generated/ent.generated.go rename to tavern/internal/graphql/generated/ent.generated.go index 8a288807d..8e30a2c91 100644 --- a/tavern/graphql/generated/ent.generated.go +++ b/tavern/internal/graphql/generated/ent.generated.go @@ -13,9 +13,9 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/tag" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/tag" "github.com/vektah/gqlparser/v2/ast" ) @@ -57,7 +57,7 @@ func (ec *executionContext) field_Query_beacons_args(ctx context.Context, rawArg var arg0 *ent.BeaconWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -72,7 +72,7 @@ func (ec *executionContext) field_Query_files_args(ctx context.Context, rawArgs var arg0 *ent.FileWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -117,7 +117,7 @@ func (ec *executionContext) field_Query_quests_args(ctx context.Context, rawArgs var arg0 *ent.QuestWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -132,7 +132,7 @@ func (ec *executionContext) field_Query_tags_args(ctx context.Context, rawArgs m var arg0 *ent.TagWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -147,7 +147,7 @@ func (ec *executionContext) field_Query_tomes_args(ctx context.Context, rawArgs var arg0 *ent.TomeWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -162,7 +162,7 @@ func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs var arg0 *ent.UserWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -544,7 +544,7 @@ func (ec *executionContext) _Beacon_hostPlatform(ctx context.Context, field grap } res := resTmp.(beacon.HostPlatform) fc.Result = res - return ec.marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, field.Selections, res) + return ec.marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Beacon_hostPlatform(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -626,7 +626,7 @@ func (ec *executionContext) _Beacon_tags(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Tag) fc.Result = res - return ec.marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagᚄ(ctx, field.Selections, res) + return ec.marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Beacon_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -677,7 +677,7 @@ func (ec *executionContext) _Beacon_tasks(ctx context.Context, field graphql.Col } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Beacon_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1092,7 +1092,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra } res := resTmp.(*ent.Cursor) fc.Result = res - return ec.marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐCursor(ctx, field.Selections, res) + return ec.marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCursor(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1133,7 +1133,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph } res := resTmp.(*ent.Cursor) fc.Result = res - return ec.marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐCursor(ctx, field.Selections, res) + return ec.marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCursor(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1174,7 +1174,7 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle } res := resTmp.(ent.Noder) fc.Result = res - return ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1229,7 +1229,7 @@ func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.Coll } res := resTmp.([]ent.Noder) fc.Result = res - return ec.marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1284,7 +1284,7 @@ func (ec *executionContext) _Query_files(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.File) fc.Result = res - return ec.marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileᚄ(ctx, field.Selections, res) + return ec.marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1353,7 +1353,7 @@ func (ec *executionContext) _Query_quests(ctx context.Context, field graphql.Col } res := resTmp.([]*ent.Quest) fc.Result = res - return ec.marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestᚄ(ctx, field.Selections, res) + return ec.marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_quests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1428,7 +1428,7 @@ func (ec *executionContext) _Query_beacons(ctx context.Context, field graphql.Co } res := resTmp.([]*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconᚄ(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_beacons(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1509,7 +1509,7 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle } res := resTmp.([]*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagᚄ(ctx, field.Selections, res) + return ec.marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1574,7 +1574,7 @@ func (ec *executionContext) _Query_tomes(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeᚄ(ctx, field.Selections, res) + return ec.marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_tomes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1647,7 +1647,7 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.User) fc.Result = res - return ec.marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserᚄ(ctx, field.Selections, res) + return ec.marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_users(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2060,7 +2060,7 @@ func (ec *executionContext) _Quest_tome(ctx context.Context, field graphql.Colle } res := resTmp.(*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTome(ctx, field.Selections, res) + return ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_tome(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2119,7 +2119,7 @@ func (ec *executionContext) _Quest_bundle(ctx context.Context, field graphql.Col } res := resTmp.(*ent.File) fc.Result = res - return ec.marshalOFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFile(ctx, field.Selections, res) + return ec.marshalOFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_bundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2174,7 +2174,7 @@ func (ec *executionContext) _Quest_tasks(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2237,7 +2237,7 @@ func (ec *executionContext) _Quest_creator(ctx context.Context, field graphql.Co } res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2381,7 +2381,7 @@ func (ec *executionContext) _Tag_kind(ctx context.Context, field graphql.Collect } res := resTmp.(tag.Kind) fc.Result = res - return ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, field.Selections, res) + return ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tag_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2422,7 +2422,7 @@ func (ec *executionContext) _Tag_beacons(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Beacon) fc.Result = res - return ec.marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconᚄ(ctx, field.Selections, res) + return ec.marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tag_beacons(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2829,7 +2829,7 @@ func (ec *executionContext) _Task_quest(ctx context.Context, field graphql.Colle } res := resTmp.(*ent.Quest) fc.Result = res - return ec.marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuest(ctx, field.Selections, res) + return ec.marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Task_quest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2893,7 +2893,7 @@ func (ec *executionContext) _Task_beacon(ctx context.Context, field graphql.Coll } res := resTmp.(*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Task_beacon(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3265,7 +3265,7 @@ func (ec *executionContext) _Tome_files(ctx context.Context, field graphql.Colle } res := resTmp.([]*ent.File) fc.Result = res - return ec.marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileᚄ(ctx, field.Selections, res) + return ec.marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tome_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3541,7 +3541,7 @@ func (ec *executionContext) unmarshalInputBeaconOrder(ctx context.Context, obj i var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -3549,7 +3549,7 @@ func (ec *executionContext) unmarshalInputBeaconOrder(ctx context.Context, obj i var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconOrderField(ctx, v) + it.Field, err = ec.unmarshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx, v) if err != nil { return it, err } @@ -3577,7 +3577,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInput(ctx, v) + it.Not, err = ec.unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, v) if err != nil { return it, err } @@ -3585,7 +3585,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -3593,7 +3593,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -4473,7 +4473,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatform")) - it.HostPlatform, err = ec.unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, v) + it.HostPlatform, err = ec.unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, v) if err != nil { return it, err } @@ -4481,7 +4481,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatformNEQ")) - it.HostPlatformNEQ, err = ec.unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, v) + it.HostPlatformNEQ, err = ec.unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, v) if err != nil { return it, err } @@ -4489,7 +4489,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatformIn")) - it.HostPlatformIn, err = ec.unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatformᚄ(ctx, v) + it.HostPlatformIn, err = ec.unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatformᚄ(ctx, v) if err != nil { return it, err } @@ -4497,7 +4497,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatformNotIn")) - it.HostPlatformNotIn, err = ec.unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatformᚄ(ctx, v) + it.HostPlatformNotIn, err = ec.unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatformᚄ(ctx, v) if err != nil { return it, err } @@ -4593,7 +4593,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTagsWith")) - it.HasTagsWith, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInputᚄ(ctx, v) + it.HasTagsWith, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -4609,7 +4609,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTasksWith")) - it.HasTasksWith, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInputᚄ(ctx, v) + it.HasTasksWith, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -4689,7 +4689,7 @@ func (ec *executionContext) unmarshalInputCreateTagInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - it.Kind, err = ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, v) + it.Kind, err = ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -4789,7 +4789,7 @@ func (ec *executionContext) unmarshalInputFileOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -4797,7 +4797,7 @@ func (ec *executionContext) unmarshalInputFileOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileOrderField(ctx, v) + it.Field, err = ec.unmarshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx, v) if err != nil { return it, err } @@ -4825,7 +4825,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInput(ctx, v) + it.Not, err = ec.unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, v) if err != nil { return it, err } @@ -4833,7 +4833,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -4841,7 +4841,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5337,7 +5337,7 @@ func (ec *executionContext) unmarshalInputQuestOrder(ctx context.Context, obj in var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -5345,7 +5345,7 @@ func (ec *executionContext) unmarshalInputQuestOrder(ctx context.Context, obj in var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestOrderField(ctx, v) + it.Field, err = ec.unmarshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx, v) if err != nil { return it, err } @@ -5373,7 +5373,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInput(ctx, v) + it.Not, err = ec.unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, v) if err != nil { return it, err } @@ -5381,7 +5381,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5389,7 +5389,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5821,7 +5821,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTomeWith")) - it.HasTomeWith, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInputᚄ(ctx, v) + it.HasTomeWith, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5837,7 +5837,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBundleWith")) - it.HasBundleWith, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInputᚄ(ctx, v) + it.HasBundleWith, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5853,7 +5853,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTasksWith")) - it.HasTasksWith, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInputᚄ(ctx, v) + it.HasTasksWith, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5869,7 +5869,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasCreatorWith")) - it.HasCreatorWith, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInputᚄ(ctx, v) + it.HasCreatorWith, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5901,7 +5901,7 @@ func (ec *executionContext) unmarshalInputTagOrder(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -5909,7 +5909,7 @@ func (ec *executionContext) unmarshalInputTagOrder(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagOrderField(ctx, v) + it.Field, err = ec.unmarshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx, v) if err != nil { return it, err } @@ -5937,7 +5937,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInput(ctx, v) + it.Not, err = ec.unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, v) if err != nil { return it, err } @@ -5945,7 +5945,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5953,7 +5953,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6129,7 +6129,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - it.Kind, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, v) + it.Kind, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -6137,7 +6137,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindNEQ")) - it.KindNEQ, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, v) + it.KindNEQ, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -6145,7 +6145,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindIn")) - it.KindIn, err = ec.unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKindᚄ(ctx, v) + it.KindIn, err = ec.unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) if err != nil { return it, err } @@ -6153,7 +6153,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindNotIn")) - it.KindNotIn, err = ec.unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKindᚄ(ctx, v) + it.KindNotIn, err = ec.unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) if err != nil { return it, err } @@ -6169,7 +6169,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBeaconsWith")) - it.HasBeaconsWith, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInputᚄ(ctx, v) + it.HasBeaconsWith, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6201,7 +6201,7 @@ func (ec *executionContext) unmarshalInputTaskOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -6209,7 +6209,7 @@ func (ec *executionContext) unmarshalInputTaskOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskOrderField(ctx, v) + it.Field, err = ec.unmarshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx, v) if err != nil { return it, err } @@ -6237,7 +6237,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInput(ctx, v) + it.Not, err = ec.unmarshalOTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, v) if err != nil { return it, err } @@ -6245,7 +6245,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6253,7 +6253,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6941,7 +6941,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasQuestWith")) - it.HasQuestWith, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInputᚄ(ctx, v) + it.HasQuestWith, err = ec.unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6957,7 +6957,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBeaconWith")) - it.HasBeaconWith, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInputᚄ(ctx, v) + it.HasBeaconWith, err = ec.unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6989,7 +6989,7 @@ func (ec *executionContext) unmarshalInputTomeOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx, v) + it.Direction, err = ec.unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx, v) if err != nil { return it, err } @@ -6997,7 +6997,7 @@ func (ec *executionContext) unmarshalInputTomeOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - it.Field, err = ec.unmarshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeOrderField(ctx, v) + it.Field, err = ec.unmarshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx, v) if err != nil { return it, err } @@ -7025,7 +7025,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInput(ctx, v) + it.Not, err = ec.unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, v) if err != nil { return it, err } @@ -7033,7 +7033,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7041,7 +7041,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7681,7 +7681,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasFilesWith")) - it.HasFilesWith, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInputᚄ(ctx, v) + it.HasFilesWith, err = ec.unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7785,7 +7785,7 @@ func (ec *executionContext) unmarshalInputUpdateTagInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - it.Kind, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, v) + it.Kind, err = ec.unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -7889,7 +7889,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInput(ctx, v) + it.Not, err = ec.unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, v) if err != nil { return it, err } @@ -7897,7 +7897,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInputᚄ(ctx, v) + it.And, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7905,7 +7905,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInputᚄ(ctx, v) + it.Or, err = ec.unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -9136,11 +9136,11 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNBeacon2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v ent.Beacon) graphql.Marshaler { return ec._Beacon(ctx, sel, &v) } -func (ec *executionContext) marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9164,7 +9164,7 @@ func (ec *executionContext) marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋreal if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx, sel, v[i]) + ret[i] = ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9184,7 +9184,7 @@ func (ec *executionContext) marshalNBeacon2ᚕᚖgithub.comᚋkcarrettoᚋreal return ret } -func (ec *executionContext) marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v *ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v *ent.Beacon) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9194,23 +9194,23 @@ func (ec *executionContext) marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealm return ec._Beacon(ctx, sel, v) } -func (ec *executionContext) unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx context.Context, v interface{}) (beacon.HostPlatform, error) { +func (ec *executionContext) unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx context.Context, v interface{}) (beacon.HostPlatform, error) { var res beacon.HostPlatform err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx context.Context, sel ast.SelectionSet, v beacon.HostPlatform) graphql.Marshaler { +func (ec *executionContext) marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx context.Context, sel ast.SelectionSet, v beacon.HostPlatform) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconOrderField(ctx context.Context, v interface{}) (*ent.BeaconOrderField, error) { +func (ec *executionContext) unmarshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, v interface{}) (*ent.BeaconOrderField, error) { var res = new(ent.BeaconOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.BeaconOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNBeaconOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.BeaconOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9220,27 +9220,27 @@ func (ec *executionContext) marshalNBeaconOrderField2ᚖgithub.comᚋkcarretto return v } -func (ec *executionContext) unmarshalNBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalNBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { res, err := ec.unmarshalInputBeaconWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateQuestInput(ctx context.Context, v interface{}) (ent.CreateQuestInput, error) { +func (ec *executionContext) unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx context.Context, v interface{}) (ent.CreateQuestInput, error) { res, err := ec.unmarshalInputCreateQuestInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateTagInput(ctx context.Context, v interface{}) (ent.CreateTagInput, error) { +func (ec *executionContext) unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx context.Context, v interface{}) (ent.CreateTagInput, error) { res, err := ec.unmarshalInputCreateTagInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateTomeInput(ctx context.Context, v interface{}) (ent.CreateTomeInput, error) { +func (ec *executionContext) unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx context.Context, v interface{}) (ent.CreateTomeInput, error) { res, err := ec.unmarshalInputCreateTomeInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { +func (ec *executionContext) marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9264,7 +9264,7 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFile(ctx, sel, v[i]) + ret[i] = ec.marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9284,7 +9284,7 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { +func (ec *executionContext) marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9294,13 +9294,13 @@ func (ec *executionContext) marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋt return ec._File(ctx, sel, v) } -func (ec *executionContext) unmarshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileOrderField(ctx context.Context, v interface{}) (*ent.FileOrderField, error) { +func (ec *executionContext) unmarshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, v interface{}) (*ent.FileOrderField, error) { var res = new(ent.FileOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.FileOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNFileOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.FileOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9310,12 +9310,12 @@ func (ec *executionContext) marshalNFileOrderField2ᚖgithub.comᚋkcarretto return v } -func (ec *executionContext) unmarshalNFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalNFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { res, err := ec.unmarshalInputFileWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v []ent.Noder) graphql.Marshaler { +func (ec *executionContext) marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v []ent.Noder) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9339,7 +9339,7 @@ func (ec *executionContext) marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋt if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐNoder(ctx, sel, v[i]) + ret[i] = ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9353,17 +9353,17 @@ func (ec *executionContext) marshalNNode2ᚕgithub.comᚋkcarrettoᚋrealmᚋt return ret } -func (ec *executionContext) unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx context.Context, v interface{}) (ent.OrderDirection, error) { +func (ec *executionContext) unmarshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx context.Context, v interface{}) (ent.OrderDirection, error) { var res ent.OrderDirection err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐOrderDirection(ctx context.Context, sel ast.SelectionSet, v ent.OrderDirection) graphql.Marshaler { +func (ec *executionContext) marshalNOrderDirection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐOrderDirection(ctx context.Context, sel ast.SelectionSet, v ent.OrderDirection) graphql.Marshaler { return v } -func (ec *executionContext) marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Quest) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9387,7 +9387,7 @@ func (ec *executionContext) marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuest(ctx, sel, v[i]) + ret[i] = ec.marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9407,7 +9407,7 @@ func (ec *executionContext) marshalNQuest2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9417,13 +9417,13 @@ func (ec *executionContext) marshalNQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋ return ec._Quest(ctx, sel, v) } -func (ec *executionContext) unmarshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestOrderField(ctx context.Context, v interface{}) (*ent.QuestOrderField, error) { +func (ec *executionContext) unmarshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, v interface{}) (*ent.QuestOrderField, error) { var res = new(ent.QuestOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.QuestOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNQuestOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.QuestOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9433,16 +9433,16 @@ func (ec *executionContext) marshalNQuestOrderField2ᚖgithub.comᚋkcarretto return v } -func (ec *executionContext) unmarshalNQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalNQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { res, err := ec.unmarshalInputQuestWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTag2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v ent.Tag) graphql.Marshaler { return ec._Tag(ctx, sel, &v) } -func (ec *executionContext) marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9466,7 +9466,7 @@ func (ec *executionContext) marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx, sel, v[i]) + ret[i] = ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9486,7 +9486,7 @@ func (ec *executionContext) marshalNTag2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v *ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v *ent.Tag) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9496,23 +9496,23 @@ func (ec *executionContext) marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋta return ec._Tag(ctx, sel, v) } -func (ec *executionContext) unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (tag.Kind, error) { +func (ec *executionContext) unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (tag.Kind, error) { var res tag.Kind err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v tag.Kind) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagOrderField(ctx context.Context, v interface{}) (*ent.TagOrderField, error) { +func (ec *executionContext) unmarshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, v interface{}) (*ent.TagOrderField, error) { var res = new(ent.TagOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TagOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TagOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9522,12 +9522,12 @@ func (ec *executionContext) marshalNTagOrderField2ᚖgithub.comᚋkcarrettoᚋ return v } -func (ec *executionContext) unmarshalNTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalNTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { res, err := ec.unmarshalInputTagWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9551,7 +9551,7 @@ func (ec *executionContext) marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTask(ctx, sel, v[i]) + ret[i] = ec.marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9571,7 +9571,7 @@ func (ec *executionContext) marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9581,13 +9581,13 @@ func (ec *executionContext) marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋt return ec._Task(ctx, sel, v) } -func (ec *executionContext) unmarshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskOrderField(ctx context.Context, v interface{}) (*ent.TaskOrderField, error) { +func (ec *executionContext) unmarshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, v interface{}) (*ent.TaskOrderField, error) { var res = new(ent.TaskOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TaskOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTaskOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TaskOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9597,16 +9597,16 @@ func (ec *executionContext) marshalNTaskOrderField2ᚖgithub.comᚋkcarretto return v } -func (ec *executionContext) unmarshalNTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalNTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { res, err := ec.unmarshalInputTaskWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTome2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v ent.Tome) graphql.Marshaler { return ec._Tome(ctx, sel, &v) } -func (ec *executionContext) marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tome) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9630,7 +9630,7 @@ func (ec *executionContext) marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTome(ctx, sel, v[i]) + ret[i] = ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9650,7 +9650,7 @@ func (ec *executionContext) marshalNTome2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v *ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v *ent.Tome) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9660,13 +9660,13 @@ func (ec *executionContext) marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋt return ec._Tome(ctx, sel, v) } -func (ec *executionContext) unmarshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeOrderField(ctx context.Context, v interface{}) (*ent.TomeOrderField, error) { +func (ec *executionContext) unmarshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, v interface{}) (*ent.TomeOrderField, error) { var res = new(ent.TomeOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TomeOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTomeOrderField2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TomeOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9676,27 +9676,27 @@ func (ec *executionContext) marshalNTomeOrderField2ᚖgithub.comᚋkcarretto return v } -func (ec *executionContext) unmarshalNTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalNTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { res, err := ec.unmarshalInputTomeWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateBeaconInput(ctx context.Context, v interface{}) (ent.UpdateBeaconInput, error) { +func (ec *executionContext) unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx context.Context, v interface{}) (ent.UpdateBeaconInput, error) { res, err := ec.unmarshalInputUpdateBeaconInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateTagInput(ctx context.Context, v interface{}) (ent.UpdateTagInput, error) { +func (ec *executionContext) unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx context.Context, v interface{}) (ent.UpdateTagInput, error) { res, err := ec.unmarshalInputUpdateTagInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateUserInput(ctx context.Context, v interface{}) (ent.UpdateUserInput, error) { +func (ec *executionContext) unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx context.Context, v interface{}) (ent.UpdateUserInput, error) { res, err := ec.unmarshalInputUpdateUserInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.User) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9720,7 +9720,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUser(ctx, sel, v[i]) + ret[i] = ec.marshalNUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9740,7 +9740,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -9750,12 +9750,12 @@ func (ec *executionContext) marshalNUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋt return ec._User(ctx, sel, v) } -func (ec *executionContext) unmarshalNUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalNUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { res, err := ec.unmarshalInputUserWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9782,7 +9782,7 @@ func (ec *executionContext) marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋreal if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx, sel, v[i]) + ret[i] = ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9802,7 +9802,7 @@ func (ec *executionContext) marshalOBeacon2ᚕᚖgithub.comᚋkcarrettoᚋreal return ret } -func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatformᚄ(ctx context.Context, v interface{}) ([]beacon.HostPlatform, error) { +func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatformᚄ(ctx context.Context, v interface{}) ([]beacon.HostPlatform, error) { if v == nil { return nil, nil } @@ -9814,7 +9814,7 @@ func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarr res := make([]beacon.HostPlatform, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, vSlice[i]) + res[i], err = ec.unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, vSlice[i]) if err != nil { return nil, err } @@ -9822,7 +9822,7 @@ func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚕgithub.comᚋkcarr return res, nil } -func (ec *executionContext) marshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatformᚄ(ctx context.Context, sel ast.SelectionSet, v []beacon.HostPlatform) graphql.Marshaler { +func (ec *executionContext) marshalOBeaconHostPlatform2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatformᚄ(ctx context.Context, sel ast.SelectionSet, v []beacon.HostPlatform) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9849,7 +9849,7 @@ func (ec *executionContext) marshalOBeaconHostPlatform2ᚕgithub.comᚋkcarret if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, sel, v[i]) + ret[i] = ec.marshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9869,7 +9869,7 @@ func (ec *executionContext) marshalOBeaconHostPlatform2ᚕgithub.comᚋkcarret return ret } -func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx context.Context, v interface{}) (*beacon.HostPlatform, error) { +func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx context.Context, v interface{}) (*beacon.HostPlatform, error) { if v == nil { return nil, nil } @@ -9878,14 +9878,14 @@ func (ec *executionContext) unmarshalOBeaconHostPlatform2ᚖgithub.comᚋkcarr return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx context.Context, sel ast.SelectionSet, v *beacon.HostPlatform) graphql.Marshaler { +func (ec *executionContext) marshalOBeaconHostPlatform2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx context.Context, sel ast.SelectionSet, v *beacon.HostPlatform) graphql.Marshaler { if v == nil { return graphql.Null } return v } -func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.BeaconWhereInput, error) { if v == nil { return nil, nil } @@ -9897,7 +9897,7 @@ func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcar res := make([]*ent.BeaconWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -9905,7 +9905,7 @@ func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithub.comᚋkcar return res, nil } -func (ec *executionContext) unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { if v == nil { return nil, nil } @@ -9913,7 +9913,7 @@ func (ec *executionContext) unmarshalOBeaconWhereInput2ᚖgithub.comᚋkcarret return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐCursor(ctx context.Context, v interface{}) (*ent.Cursor, error) { +func (ec *executionContext) unmarshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCursor(ctx context.Context, v interface{}) (*ent.Cursor, error) { if v == nil { return nil, nil } @@ -9922,14 +9922,14 @@ func (ec *executionContext) unmarshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealm return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐCursor(ctx context.Context, sel ast.SelectionSet, v *ent.Cursor) graphql.Marshaler { +func (ec *executionContext) marshalOCursor2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCursor(ctx context.Context, sel ast.SelectionSet, v *ent.Cursor) graphql.Marshaler { if v == nil { return graphql.Null } return v } -func (ec *executionContext) marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { +func (ec *executionContext) marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9956,7 +9956,7 @@ func (ec *executionContext) marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFile(ctx, sel, v[i]) + ret[i] = ec.marshalNFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9976,14 +9976,14 @@ func (ec *executionContext) marshalOFile2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalOFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { +func (ec *executionContext) marshalOFile2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { if v == nil { return graphql.Null } return ec._File(ctx, sel, v) } -func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.FileWhereInput, error) { if v == nil { return nil, nil } @@ -9995,7 +9995,7 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarre res := make([]*ent.FileWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10003,7 +10003,7 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithub.comᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalOFileWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { if v == nil { return nil, nil } @@ -10011,21 +10011,21 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚖgithub.comᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v ent.Noder) graphql.Marshaler { +func (ec *executionContext) marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v ent.Noder) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Node(ctx, sel, v) } -func (ec *executionContext) marshalOQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalOQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Quest(ctx, sel, v) } -func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.QuestWhereInput, error) { if v == nil { return nil, nil } @@ -10037,7 +10037,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarr res := make([]*ent.QuestWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10045,7 +10045,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithub.comᚋkcarr return res, nil } -func (ec *executionContext) unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { if v == nil { return nil, nil } @@ -10053,7 +10053,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚖgithub.comᚋkcarrett return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { if v == nil { return graphql.Null } @@ -10080,7 +10080,7 @@ func (ec *executionContext) marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx, sel, v[i]) + ret[i] = ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) } if isLen1 { f(i) @@ -10100,7 +10100,7 @@ func (ec *executionContext) marshalOTag2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKindᚄ(ctx context.Context, v interface{}) ([]tag.Kind, error) { +func (ec *executionContext) unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, v interface{}) ([]tag.Kind, error) { if v == nil { return nil, nil } @@ -10112,7 +10112,7 @@ func (ec *executionContext) unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋreal res := make([]tag.Kind, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10120,7 +10120,7 @@ func (ec *executionContext) unmarshalOTagKind2ᚕgithub.comᚋkcarrettoᚋreal return res, nil } -func (ec *executionContext) marshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKindᚄ(ctx context.Context, sel ast.SelectionSet, v []tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, sel ast.SelectionSet, v []tag.Kind) graphql.Marshaler { if v == nil { return graphql.Null } @@ -10147,7 +10147,7 @@ func (ec *executionContext) marshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx, sel, v[i]) + ret[i] = ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, sel, v[i]) } if isLen1 { f(i) @@ -10167,7 +10167,7 @@ func (ec *executionContext) marshalOTagKind2ᚕgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (*tag.Kind, error) { +func (ec *executionContext) unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (*tag.Kind, error) { if v == nil { return nil, nil } @@ -10176,14 +10176,14 @@ func (ec *executionContext) unmarshalOTagKind2ᚖgithub.comᚋkcarrettoᚋreal return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v *tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalOTagKind2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v *tag.Kind) graphql.Marshaler { if v == nil { return graphql.Null } return v } -func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TagWhereInput, error) { if v == nil { return nil, nil } @@ -10195,7 +10195,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarret res := make([]*ent.TagWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10203,7 +10203,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithub.comᚋkcarret return res, nil } -func (ec *executionContext) unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalOTagWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { if v == nil { return nil, nil } @@ -10211,7 +10211,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚖgithub.comᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { if v == nil { return graphql.Null } @@ -10238,7 +10238,7 @@ func (ec *executionContext) marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTask(ctx, sel, v[i]) + ret[i] = ec.marshalNTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) } if isLen1 { f(i) @@ -10258,14 +10258,14 @@ func (ec *executionContext) marshalOTask2ᚕᚖgithub.comᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalOTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalOTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Task(ctx, sel, v) } -func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TaskWhereInput, error) { if v == nil { return nil, nil } @@ -10277,7 +10277,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarre res := make([]*ent.TaskWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10285,7 +10285,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithub.comᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalOTaskWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { if v == nil { return nil, nil } @@ -10293,7 +10293,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚖgithub.comᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TomeWhereInput, error) { if v == nil { return nil, nil } @@ -10305,7 +10305,7 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarre res := make([]*ent.TomeWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10313,7 +10313,7 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithub.comᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { if v == nil { return nil, nil } @@ -10321,14 +10321,14 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚖgithub.comᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { +func (ec *executionContext) marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { if v == nil { return graphql.Null } return ec._User(ctx, sel, v) } -func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.UserWhereInput, error) { if v == nil { return nil, nil } @@ -10340,7 +10340,7 @@ func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarre res := make([]*ent.UserWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -10348,7 +10348,7 @@ func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithub.comᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalOUserWhereInput2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { if v == nil { return nil, nil } diff --git a/tavern/graphql/generated/inputs.generated.go b/tavern/internal/graphql/generated/inputs.generated.go similarity index 92% rename from tavern/graphql/generated/inputs.generated.go rename to tavern/internal/graphql/generated/inputs.generated.go index 2958949ae..a9647e1c2 100644 --- a/tavern/graphql/generated/inputs.generated.go +++ b/tavern/internal/graphql/generated/inputs.generated.go @@ -6,7 +6,7 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/graphql/models" ) // region ************************** generated!.gotpl ************************** @@ -61,7 +61,7 @@ func (ec *executionContext) unmarshalInputClaimTasksInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatform")) - it.HostPlatform, err = ec.unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚋbeaconᚐHostPlatform(ctx, v) + it.HostPlatform, err = ec.unmarshalNBeaconHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋbeaconᚐHostPlatform(ctx, v) if err != nil { return it, err } @@ -175,12 +175,12 @@ func (ec *executionContext) unmarshalInputSubmitTaskResultInput(ctx context.Cont // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx context.Context, v interface{}) (models.ClaimTasksInput, error) { +func (ec *executionContext) unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx context.Context, v interface{}) (models.ClaimTasksInput, error) { res, err := ec.unmarshalInputClaimTasksInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx context.Context, v interface{}) (models.SubmitTaskResultInput, error) { +func (ec *executionContext) unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx context.Context, v interface{}) (models.SubmitTaskResultInput, error) { res, err := ec.unmarshalInputSubmitTaskResultInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } diff --git a/tavern/graphql/generated/mutation.generated.go b/tavern/internal/graphql/generated/mutation.generated.go similarity index 94% rename from tavern/graphql/generated/mutation.generated.go rename to tavern/internal/graphql/generated/mutation.generated.go index 5a6cf07a0..53b390daa 100644 --- a/tavern/graphql/generated/mutation.generated.go +++ b/tavern/internal/graphql/generated/mutation.generated.go @@ -9,8 +9,8 @@ import ( "strconv" "github.com/99designs/gqlgen/graphql" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/graphql/models" "github.com/vektah/gqlparser/v2/ast" ) @@ -37,7 +37,7 @@ func (ec *executionContext) field_Mutation_claimTasks_args(ctx context.Context, var arg0 models.ClaimTasksInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx, tmp) + arg0, err = ec.unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx, tmp) if err != nil { return nil, err } @@ -61,7 +61,7 @@ func (ec *executionContext) field_Mutation_createQuest_args(ctx context.Context, var arg1 ent.CreateQuestInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateQuestInput(ctx, tmp) + arg1, err = ec.unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx, tmp) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func (ec *executionContext) field_Mutation_createTag_args(ctx context.Context, r var arg0 ent.CreateTagInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateTagInput(ctx, tmp) + arg0, err = ec.unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx, tmp) if err != nil { return nil, err } @@ -91,7 +91,7 @@ func (ec *executionContext) field_Mutation_createTome_args(ctx context.Context, var arg0 ent.CreateTomeInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐCreateTomeInput(ctx, tmp) + arg0, err = ec.unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx, tmp) if err != nil { return nil, err } @@ -106,7 +106,7 @@ func (ec *executionContext) field_Mutation_submitTaskResult_args(ctx context.Con var arg0 models.SubmitTaskResultInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx, tmp) + arg0, err = ec.unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx, tmp) if err != nil { return nil, err } @@ -130,7 +130,7 @@ func (ec *executionContext) field_Mutation_updateBeacon_args(ctx context.Context var arg1 ent.UpdateBeaconInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateBeaconInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx, tmp) if err != nil { return nil, err } @@ -154,7 +154,7 @@ func (ec *executionContext) field_Mutation_updateTag_args(ctx context.Context, r var arg1 ent.UpdateTagInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateTagInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx, tmp) if err != nil { return nil, err } @@ -178,7 +178,7 @@ func (ec *executionContext) field_Mutation_updateUser_args(ctx context.Context, var arg1 ent.UpdateUserInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋentᚐUpdateUserInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx, tmp) if err != nil { return nil, err } @@ -213,7 +213,7 @@ func (ec *executionContext) _Mutation_createQuest(ctx context.Context, field gra return ec.resolvers.Mutation().CreateQuest(rctx, fc.Args["beaconIDs"].([]int), fc.Args["input"].(ent.CreateQuestInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -233,7 +233,7 @@ func (ec *executionContext) _Mutation_createQuest(ctx context.Context, field gra if data, ok := tmp.(*ent.Quest); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.Quest`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.Quest`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -244,7 +244,7 @@ func (ec *executionContext) _Mutation_createQuest(ctx context.Context, field gra } res := resTmp.(*ent.Quest) fc.Result = res - return ec.marshalOQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐQuest(ctx, field.Selections, res) + return ec.marshalOQuest2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createQuest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -309,7 +309,7 @@ func (ec *executionContext) _Mutation_updateBeacon(ctx context.Context, field gr return ec.resolvers.Mutation().UpdateBeacon(rctx, fc.Args["beaconID"].(int), fc.Args["input"].(ent.UpdateBeaconInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -329,7 +329,7 @@ func (ec *executionContext) _Mutation_updateBeacon(ctx context.Context, field gr if data, ok := tmp.(*ent.Beacon); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.Beacon`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.Beacon`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -343,7 +343,7 @@ func (ec *executionContext) _Mutation_updateBeacon(ctx context.Context, field gr } res := resTmp.(*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐBeacon(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateBeacon(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -414,7 +414,7 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph return ec.resolvers.Mutation().CreateTag(rctx, fc.Args["input"].(ent.CreateTagInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") if err != nil { return nil, err } @@ -434,7 +434,7 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph if data, ok := tmp.(*ent.Tag); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.Tag`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.Tag`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -448,7 +448,7 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph } res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -503,7 +503,7 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph return ec.resolvers.Mutation().UpdateTag(rctx, fc.Args["tagID"].(int), fc.Args["input"].(ent.UpdateTagInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -523,7 +523,7 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph if data, ok := tmp.(*ent.Tag); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.Tag`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.Tag`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -537,7 +537,7 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph } res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNTag2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -602,7 +602,7 @@ func (ec *executionContext) _Mutation_claimTasks(ctx context.Context, field grap } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalNTask2ᚕᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_claimTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -676,7 +676,7 @@ func (ec *executionContext) _Mutation_submitTaskResult(ctx context.Context, fiel } res := resTmp.(*ent.Task) fc.Result = res - return ec.marshalOTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTask(ctx, field.Selections, res) + return ec.marshalOTask2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_submitTaskResult(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -743,7 +743,7 @@ func (ec *executionContext) _Mutation_createTome(ctx context.Context, field grap return ec.resolvers.Mutation().CreateTome(rctx, fc.Args["input"].(ent.CreateTomeInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -763,7 +763,7 @@ func (ec *executionContext) _Mutation_createTome(ctx context.Context, field grap if data, ok := tmp.(*ent.Tome); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.Tome`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.Tome`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -777,7 +777,7 @@ func (ec *executionContext) _Mutation_createTome(ctx context.Context, field grap } res := resTmp.(*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐTome(ctx, field.Selections, res) + return ec.marshalNTome2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createTome(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -840,7 +840,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["userID"].(int), fc.Args["input"].(ent.UpdateUserInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") + role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") if err != nil { return nil, err } @@ -860,7 +860,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap if data, ok := tmp.(*ent.User); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/ent.User`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kcarretto/realm/tavern/internal/ent.User`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -871,7 +871,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap } res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOUser2ᚖgithub.comᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { diff --git a/tavern/graphql/generated/prelude.generated.go b/tavern/internal/graphql/generated/prelude.generated.go similarity index 100% rename from tavern/graphql/generated/prelude.generated.go rename to tavern/internal/graphql/generated/prelude.generated.go diff --git a/tavern/graphql/generated/root_.generated.go b/tavern/internal/graphql/generated/root_.generated.go similarity index 99% rename from tavern/graphql/generated/root_.generated.go rename to tavern/internal/graphql/generated/root_.generated.go index 4088290e1..a112ad3e6 100644 --- a/tavern/graphql/generated/root_.generated.go +++ b/tavern/internal/graphql/generated/root_.generated.go @@ -9,8 +9,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/graphql/models" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -879,7 +879,7 @@ type Beacon implements Node { tasks: [Task!] } """BeaconHostPlatform is enum for the field host_platform""" -enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/ent/beacon.HostPlatform") { +enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/beacon.HostPlatform") { Windows Linux MacOS @@ -1191,7 +1191,7 @@ input FileWhereInput { An object with an ID. Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) """ -interface Node @goModel(model: "github.com/kcarretto/realm/tavern/ent.Noder") { +interface Node @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent.Noder") { """The id of the object.""" id: ID! } @@ -1343,7 +1343,7 @@ type Tag implements Node { beacons: [Beacon!] } """TagKind is enum for the field kind""" -enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/ent/tag.Kind") { +enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/tag.Kind") { group service } diff --git a/tavern/graphql/generated/scalars.generated.go b/tavern/internal/graphql/generated/scalars.generated.go similarity index 100% rename from tavern/graphql/generated/scalars.generated.go rename to tavern/internal/graphql/generated/scalars.generated.go diff --git a/tavern/graphql/gqlgen.yml b/tavern/internal/graphql/gqlgen.yml similarity index 57% rename from tavern/graphql/gqlgen.yml rename to tavern/internal/graphql/gqlgen.yml index b4ba279bf..0c2ba23b4 100644 --- a/tavern/graphql/gqlgen.yml +++ b/tavern/internal/graphql/gqlgen.yml @@ -24,14 +24,14 @@ resolver: # gqlgen will search for any type names in the schema in the generated # ent package. If they match it will use them, otherwise it will new ones. autobind: - - github.com/kcarretto/realm/tavern/ent - - github.com/kcarretto/realm/tavern/ent/file - - github.com/kcarretto/realm/tavern/ent/user - - github.com/kcarretto/realm/tavern/ent/tag - - github.com/kcarretto/realm/tavern/ent/beacon - - github.com/kcarretto/realm/tavern/ent/quest - - github.com/kcarretto/realm/tavern/ent/task - - github.com/kcarretto/realm/tavern/ent/tome + - github.com/kcarretto/realm/tavern/internal/ent + - github.com/kcarretto/realm/tavern/internal/ent/file + - github.com/kcarretto/realm/tavern/internal/ent/user + - github.com/kcarretto/realm/tavern/internal/ent/tag + - github.com/kcarretto/realm/tavern/internal/ent/beacon + - github.com/kcarretto/realm/tavern/internal/ent/quest + - github.com/kcarretto/realm/tavern/internal/ent/task + - github.com/kcarretto/realm/tavern/internal/ent/tome struct_tag: json @@ -42,13 +42,13 @@ models: Node: model: # ent.Noder is the new interface generated by the Node template. - - github.com/kcarretto/realm/tavern/ent.Noder + - github.com/kcarretto/realm/tavern/internal/ent.Noder # - entgo.io/contrib/entgql/internal/todo/ent.Noder # Enums Kind: model: - - github.com/kcarretto/realm/tavern/ent/tag.Kind + - github.com/kcarretto/realm/tavern/internal/ent/tag.Kind HostPlatform: model: - - github.com/kcarretto/realm/tavern/ent/beacon.HostPlatform + - github.com/kcarretto/realm/tavern/internal/ent/beacon.HostPlatform diff --git a/tavern/graphql/graphql_test.go b/tavern/internal/graphql/graphql_test.go similarity index 100% rename from tavern/graphql/graphql_test.go rename to tavern/internal/graphql/graphql_test.go diff --git a/tavern/graphql/models/gqlgen_models.go b/tavern/internal/graphql/models/gqlgen_models.go similarity index 97% rename from tavern/graphql/models/gqlgen_models.go rename to tavern/internal/graphql/models/gqlgen_models.go index b4ae2928a..aa177b029 100644 --- a/tavern/graphql/models/gqlgen_models.go +++ b/tavern/internal/graphql/models/gqlgen_models.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/kcarretto/realm/tavern/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" ) type ClaimTasksInput struct { diff --git a/tavern/graphql/mutation.resolvers.go b/tavern/internal/graphql/mutation.resolvers.go similarity index 95% rename from tavern/graphql/mutation.resolvers.go rename to tavern/internal/graphql/mutation.resolvers.go index dd04e365c..c6a6fb478 100644 --- a/tavern/graphql/mutation.resolvers.go +++ b/tavern/internal/graphql/mutation.resolvers.go @@ -9,13 +9,13 @@ import ( "fmt" "time" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/beacon" - "github.com/kcarretto/realm/tavern/ent/file" - "github.com/kcarretto/realm/tavern/ent/task" - "github.com/kcarretto/realm/tavern/graphql/generated" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/beacon" + "github.com/kcarretto/realm/tavern/internal/ent/file" + "github.com/kcarretto/realm/tavern/internal/ent/task" + "github.com/kcarretto/realm/tavern/internal/graphql/generated" + "github.com/kcarretto/realm/tavern/internal/graphql/models" ) // CreateQuest is the resolver for the createQuest field. diff --git a/tavern/graphql/query.resolvers.go b/tavern/internal/graphql/query.resolvers.go similarity index 98% rename from tavern/graphql/query.resolvers.go rename to tavern/internal/graphql/query.resolvers.go index 553f621df..ac94c245e 100644 --- a/tavern/graphql/query.resolvers.go +++ b/tavern/internal/graphql/query.resolvers.go @@ -8,7 +8,7 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" ) // Files is the resolver for the files field. diff --git a/tavern/graphql/query_test.go b/tavern/internal/graphql/query_test.go similarity index 93% rename from tavern/graphql/query_test.go rename to tavern/internal/graphql/query_test.go index 00358d3ad..ca7d76030 100644 --- a/tavern/graphql/query_test.go +++ b/tavern/internal/graphql/query_test.go @@ -6,10 +6,10 @@ import ( "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql/handler" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/graphql/quest_test.go b/tavern/internal/graphql/quest_test.go similarity index 96% rename from tavern/graphql/quest_test.go rename to tavern/internal/graphql/quest_test.go index b0ba83d50..f043fff66 100644 --- a/tavern/graphql/quest_test.go +++ b/tavern/internal/graphql/quest_test.go @@ -11,10 +11,10 @@ import ( "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql/handler" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/graphql/resolver.go b/tavern/internal/graphql/resolver.go similarity index 84% rename from tavern/graphql/resolver.go rename to tavern/internal/graphql/resolver.go index 2f24c7add..0fda8da72 100644 --- a/tavern/graphql/resolver.go +++ b/tavern/internal/graphql/resolver.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/graphql/generated" - "github.com/kcarretto/realm/tavern/graphql/models" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/graphql/generated" + "github.com/kcarretto/realm/tavern/internal/graphql/models" "github.com/99designs/gqlgen/graphql" ) diff --git a/tavern/graphql/rollback.go b/tavern/internal/graphql/rollback.go similarity index 78% rename from tavern/graphql/rollback.go rename to tavern/internal/graphql/rollback.go index 41f5bfcd9..7d36c5173 100644 --- a/tavern/graphql/rollback.go +++ b/tavern/internal/graphql/rollback.go @@ -3,7 +3,7 @@ package graphql import ( "fmt" - "github.com/kcarretto/realm/tavern/ent" + "github.com/kcarretto/realm/tavern/internal/ent" ) func rollback(tx *ent.Tx, err error) error { diff --git a/tavern/graphql/schema.graphql b/tavern/internal/graphql/schema.graphql similarity index 99% rename from tavern/graphql/schema.graphql rename to tavern/internal/graphql/schema.graphql index aed90d9d6..c3cec5ff6 100644 --- a/tavern/graphql/schema.graphql +++ b/tavern/internal/graphql/schema.graphql @@ -29,7 +29,7 @@ type Beacon implements Node { tasks: [Task!] } """BeaconHostPlatform is enum for the field host_platform""" -enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/ent/beacon.HostPlatform") { +enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/beacon.HostPlatform") { Windows Linux MacOS @@ -337,6 +337,47 @@ input FileWhereInput { hashEqualFold: String hashContainsFold: String } +""" +An object with an ID. +Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) +""" +interface Node @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent.Noder") { + """The id of the object.""" + id: ID! +} +"""Possible directions in which to order a list of items when provided an `orderBy` argument.""" +enum OrderDirection { + """Specifies an ascending order for a given `orderBy` argument.""" + ASC + """Specifies a descending order for a given `orderBy` argument.""" + DESC +} +""" +Information about pagination in a connection. +https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo +""" +type PageInfo { + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + """When paginating backwards, the cursor to continue.""" + startCursor: Cursor + """When paginating forwards, the cursor to continue.""" + endCursor: Cursor +} +type Query { + """Fetches an object given its ID.""" + node( + """ID of the object.""" + id: ID! + ): Node + """Lookup nodes by a list of IDs.""" + nodes( + """The list of node IDs.""" + ids: [ID!]! + ): [Node]! +} type Quest implements Node { id: ID! """Timestamp of when this ent was created""" @@ -443,47 +484,6 @@ input QuestWhereInput { hasCreator: Boolean hasCreatorWith: [UserWhereInput!] } -""" -An object with an ID. -Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) -""" -interface Node @goModel(model: "github.com/kcarretto/realm/tavern/ent.Noder") { - """The id of the object.""" - id: ID! -} -"""Possible directions in which to order a list of items when provided an `orderBy` argument.""" -enum OrderDirection { - """Specifies an ascending order for a given `orderBy` argument.""" - ASC - """Specifies a descending order for a given `orderBy` argument.""" - DESC -} -""" -Information about pagination in a connection. -https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo -""" -type PageInfo { - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor -} -type Query { - """Fetches an object given its ID.""" - node( - """ID of the object.""" - id: ID! - ): Node - """Lookup nodes by a list of IDs.""" - nodes( - """The list of node IDs.""" - ids: [ID!]! - ): [Node]! -} type Tag implements Node { id: ID! """Name of the tag""" @@ -493,7 +493,7 @@ type Tag implements Node { beacons: [Beacon!] } """TagKind is enum for the field kind""" -enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/ent/tag.Kind") { +enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/tag.Kind") { group service } diff --git a/tavern/graphql/schema/directives.graphql b/tavern/internal/graphql/schema/directives.graphql similarity index 100% rename from tavern/graphql/schema/directives.graphql rename to tavern/internal/graphql/schema/directives.graphql diff --git a/tavern/graphql/schema/ent.graphql b/tavern/internal/graphql/schema/ent.graphql similarity index 99% rename from tavern/graphql/schema/ent.graphql rename to tavern/internal/graphql/schema/ent.graphql index 8a2a1a038..548a58b76 100644 --- a/tavern/graphql/schema/ent.graphql +++ b/tavern/internal/graphql/schema/ent.graphql @@ -24,7 +24,7 @@ type Beacon implements Node { tasks: [Task!] } """BeaconHostPlatform is enum for the field host_platform""" -enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/ent/beacon.HostPlatform") { +enum BeaconHostPlatform @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/beacon.HostPlatform") { Windows Linux MacOS @@ -336,7 +336,7 @@ input FileWhereInput { An object with an ID. Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) """ -interface Node @goModel(model: "github.com/kcarretto/realm/tavern/ent.Noder") { +interface Node @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent.Noder") { """The id of the object.""" id: ID! } @@ -488,7 +488,7 @@ type Tag implements Node { beacons: [Beacon!] } """TagKind is enum for the field kind""" -enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/ent/tag.Kind") { +enum TagKind @goModel(model: "github.com/kcarretto/realm/tavern/internal/ent/tag.Kind") { group service } diff --git a/tavern/graphql/schema/inputs.graphql b/tavern/internal/graphql/schema/inputs.graphql similarity index 100% rename from tavern/graphql/schema/inputs.graphql rename to tavern/internal/graphql/schema/inputs.graphql diff --git a/tavern/graphql/schema/mutation.graphql b/tavern/internal/graphql/schema/mutation.graphql similarity index 100% rename from tavern/graphql/schema/mutation.graphql rename to tavern/internal/graphql/schema/mutation.graphql diff --git a/tavern/graphql/schema/query.graphql b/tavern/internal/graphql/schema/query.graphql similarity index 100% rename from tavern/graphql/schema/query.graphql rename to tavern/internal/graphql/schema/query.graphql diff --git a/tavern/graphql/schema/scalars.graphql b/tavern/internal/graphql/schema/scalars.graphql similarity index 100% rename from tavern/graphql/schema/scalars.graphql rename to tavern/internal/graphql/schema/scalars.graphql diff --git a/tavern/graphql/tag_test.go b/tavern/internal/graphql/tag_test.go similarity index 93% rename from tavern/graphql/tag_test.go rename to tavern/internal/graphql/tag_test.go index b823c8dfd..dbce7dc0d 100644 --- a/tavern/graphql/tag_test.go +++ b/tavern/internal/graphql/tag_test.go @@ -7,11 +7,11 @@ import ( "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql/handler" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/ent/tag" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/ent/tag" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/graphql/testdata/example.yml b/tavern/internal/graphql/testdata/example.yml similarity index 100% rename from tavern/graphql/testdata/example.yml rename to tavern/internal/graphql/testdata/example.yml diff --git a/tavern/graphql/testdata/mutations/claimTasks/ExistingBeacon.yml b/tavern/internal/graphql/testdata/mutations/claimTasks/ExistingBeacon.yml similarity index 100% rename from tavern/graphql/testdata/mutations/claimTasks/ExistingBeacon.yml rename to tavern/internal/graphql/testdata/mutations/claimTasks/ExistingBeacon.yml diff --git a/tavern/graphql/testdata/mutations/claimTasks/Filters.yml b/tavern/internal/graphql/testdata/mutations/claimTasks/Filters.yml similarity index 100% rename from tavern/graphql/testdata/mutations/claimTasks/Filters.yml rename to tavern/internal/graphql/testdata/mutations/claimTasks/Filters.yml diff --git a/tavern/graphql/testdata/mutations/claimTasks/MultiTask.yml b/tavern/internal/graphql/testdata/mutations/claimTasks/MultiTask.yml similarity index 100% rename from tavern/graphql/testdata/mutations/claimTasks/MultiTask.yml rename to tavern/internal/graphql/testdata/mutations/claimTasks/MultiTask.yml diff --git a/tavern/graphql/testdata/mutations/claimTasks/NewBeacon.yml b/tavern/internal/graphql/testdata/mutations/claimTasks/NewBeacon.yml similarity index 100% rename from tavern/graphql/testdata/mutations/claimTasks/NewBeacon.yml rename to tavern/internal/graphql/testdata/mutations/claimTasks/NewBeacon.yml diff --git a/tavern/graphql/testdata/mutations/claimTasks/OneTask.yml b/tavern/internal/graphql/testdata/mutations/claimTasks/OneTask.yml similarity index 100% rename from tavern/graphql/testdata/mutations/claimTasks/OneTask.yml rename to tavern/internal/graphql/testdata/mutations/claimTasks/OneTask.yml diff --git a/tavern/graphql/testdata/mutations/createQuest/NoFiles.yml b/tavern/internal/graphql/testdata/mutations/createQuest/NoFiles.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createQuest/NoFiles.yml rename to tavern/internal/graphql/testdata/mutations/createQuest/NoFiles.yml diff --git a/tavern/graphql/testdata/mutations/createQuest/WithFiles.yml b/tavern/internal/graphql/testdata/mutations/createQuest/WithFiles.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createQuest/WithFiles.yml rename to tavern/internal/graphql/testdata/mutations/createQuest/WithFiles.yml diff --git a/tavern/graphql/testdata/mutations/createTag/Group.yml b/tavern/internal/graphql/testdata/mutations/createTag/Group.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createTag/Group.yml rename to tavern/internal/graphql/testdata/mutations/createTag/Group.yml diff --git a/tavern/graphql/testdata/mutations/createTag/MultipleBeacons.yml b/tavern/internal/graphql/testdata/mutations/createTag/MultipleBeacons.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createTag/MultipleBeacons.yml rename to tavern/internal/graphql/testdata/mutations/createTag/MultipleBeacons.yml diff --git a/tavern/graphql/testdata/mutations/createTag/Service.yml b/tavern/internal/graphql/testdata/mutations/createTag/Service.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createTag/Service.yml rename to tavern/internal/graphql/testdata/mutations/createTag/Service.yml diff --git a/tavern/graphql/testdata/mutations/createTome/NoFiles.yml b/tavern/internal/graphql/testdata/mutations/createTome/NoFiles.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createTome/NoFiles.yml rename to tavern/internal/graphql/testdata/mutations/createTome/NoFiles.yml diff --git a/tavern/graphql/testdata/mutations/createTome/WithFiles.yml b/tavern/internal/graphql/testdata/mutations/createTome/WithFiles.yml similarity index 100% rename from tavern/graphql/testdata/mutations/createTome/WithFiles.yml rename to tavern/internal/graphql/testdata/mutations/createTome/WithFiles.yml diff --git a/tavern/graphql/testdata/mutations/submitTaskResult/Append.yml b/tavern/internal/graphql/testdata/mutations/submitTaskResult/Append.yml similarity index 100% rename from tavern/graphql/testdata/mutations/submitTaskResult/Append.yml rename to tavern/internal/graphql/testdata/mutations/submitTaskResult/Append.yml diff --git a/tavern/graphql/testdata/mutations/submitTaskResult/OneAndDone.yml b/tavern/internal/graphql/testdata/mutations/submitTaskResult/OneAndDone.yml similarity index 100% rename from tavern/graphql/testdata/mutations/submitTaskResult/OneAndDone.yml rename to tavern/internal/graphql/testdata/mutations/submitTaskResult/OneAndDone.yml diff --git a/tavern/graphql/testdata/mutations/updateBeacon/AddTag.yml b/tavern/internal/graphql/testdata/mutations/updateBeacon/AddTag.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateBeacon/AddTag.yml rename to tavern/internal/graphql/testdata/mutations/updateBeacon/AddTag.yml diff --git a/tavern/graphql/testdata/mutations/updateBeacon/ChangeHostname.yml b/tavern/internal/graphql/testdata/mutations/updateBeacon/ChangeHostname.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateBeacon/ChangeHostname.yml rename to tavern/internal/graphql/testdata/mutations/updateBeacon/ChangeHostname.yml diff --git a/tavern/graphql/testdata/mutations/updateBeacon/RemoveTag.yml b/tavern/internal/graphql/testdata/mutations/updateBeacon/RemoveTag.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateBeacon/RemoveTag.yml rename to tavern/internal/graphql/testdata/mutations/updateBeacon/RemoveTag.yml diff --git a/tavern/graphql/testdata/mutations/updateTag/ChangeName.yml b/tavern/internal/graphql/testdata/mutations/updateTag/ChangeName.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateTag/ChangeName.yml rename to tavern/internal/graphql/testdata/mutations/updateTag/ChangeName.yml diff --git a/tavern/graphql/testdata/mutations/updateUser/ChangeUsername.yml b/tavern/internal/graphql/testdata/mutations/updateUser/ChangeUsername.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateUser/ChangeUsername.yml rename to tavern/internal/graphql/testdata/mutations/updateUser/ChangeUsername.yml diff --git a/tavern/graphql/testdata/mutations/updateUser/PermissionDenied.yml b/tavern/internal/graphql/testdata/mutations/updateUser/PermissionDenied.yml similarity index 100% rename from tavern/graphql/testdata/mutations/updateUser/PermissionDenied.yml rename to tavern/internal/graphql/testdata/mutations/updateUser/PermissionDenied.yml diff --git a/tavern/graphql/testdata/queries/beacons/FilterByID.yml b/tavern/internal/graphql/testdata/queries/beacons/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/beacons/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/beacons/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/beacons/Singular.yml b/tavern/internal/graphql/testdata/queries/beacons/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/beacons/Singular.yml rename to tavern/internal/graphql/testdata/queries/beacons/Singular.yml diff --git a/tavern/graphql/testdata/queries/files/FilterByID.yml b/tavern/internal/graphql/testdata/queries/files/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/files/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/files/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/files/Singular.yml b/tavern/internal/graphql/testdata/queries/files/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/files/Singular.yml rename to tavern/internal/graphql/testdata/queries/files/Singular.yml diff --git a/tavern/graphql/testdata/queries/quests/FilterByID.yml b/tavern/internal/graphql/testdata/queries/quests/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/quests/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/quests/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/quests/Singular.yml b/tavern/internal/graphql/testdata/queries/quests/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/quests/Singular.yml rename to tavern/internal/graphql/testdata/queries/quests/Singular.yml diff --git a/tavern/graphql/testdata/queries/tags/FilterByID.yml b/tavern/internal/graphql/testdata/queries/tags/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/tags/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/tags/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/tags/FilterByKind.yml b/tavern/internal/graphql/testdata/queries/tags/FilterByKind.yml similarity index 100% rename from tavern/graphql/testdata/queries/tags/FilterByKind.yml rename to tavern/internal/graphql/testdata/queries/tags/FilterByKind.yml diff --git a/tavern/graphql/testdata/queries/tags/Singular.yml b/tavern/internal/graphql/testdata/queries/tags/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/tags/Singular.yml rename to tavern/internal/graphql/testdata/queries/tags/Singular.yml diff --git a/tavern/graphql/testdata/queries/tomes/FilterByID.yml b/tavern/internal/graphql/testdata/queries/tomes/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/tomes/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/tomes/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/tomes/Singular.yml b/tavern/internal/graphql/testdata/queries/tomes/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/tomes/Singular.yml rename to tavern/internal/graphql/testdata/queries/tomes/Singular.yml diff --git a/tavern/graphql/testdata/queries/users/FilterByID.yml b/tavern/internal/graphql/testdata/queries/users/FilterByID.yml similarity index 100% rename from tavern/graphql/testdata/queries/users/FilterByID.yml rename to tavern/internal/graphql/testdata/queries/users/FilterByID.yml diff --git a/tavern/graphql/testdata/queries/users/Singular.yml b/tavern/internal/graphql/testdata/queries/users/Singular.yml similarity index 100% rename from tavern/graphql/testdata/queries/users/Singular.yml rename to tavern/internal/graphql/testdata/queries/users/Singular.yml diff --git a/tavern/graphql/tome_test.go b/tavern/internal/graphql/tome_test.go similarity index 93% rename from tavern/graphql/tome_test.go rename to tavern/internal/graphql/tome_test.go index 468bb234f..53332f37f 100644 --- a/tavern/graphql/tome_test.go +++ b/tavern/internal/graphql/tome_test.go @@ -6,10 +6,10 @@ import ( "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql/handler" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/graphql/user_test.go b/tavern/internal/graphql/user_test.go similarity index 91% rename from tavern/graphql/user_test.go rename to tavern/internal/graphql/user_test.go index 1ea52f5cc..932326a73 100644 --- a/tavern/graphql/user_test.go +++ b/tavern/internal/graphql/user_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/kcarretto/realm/tavern/auth" - "github.com/kcarretto/realm/tavern/ent" - "github.com/kcarretto/realm/tavern/ent/enttest" - "github.com/kcarretto/realm/tavern/graphql" + "github.com/kcarretto/realm/tavern/internal/auth" + "github.com/kcarretto/realm/tavern/internal/ent" + "github.com/kcarretto/realm/tavern/internal/ent/enttest" + "github.com/kcarretto/realm/tavern/internal/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tavern/namegen/namegen.go b/tavern/internal/namegen/namegen.go similarity index 100% rename from tavern/namegen/namegen.go rename to tavern/internal/namegen/namegen.go diff --git a/tavern/namegen/namegen_test.go b/tavern/internal/namegen/namegen_test.go similarity index 92% rename from tavern/namegen/namegen_test.go rename to tavern/internal/namegen/namegen_test.go index 87aa02081..b8f3756bd 100644 --- a/tavern/namegen/namegen_test.go +++ b/tavern/internal/namegen/namegen_test.go @@ -3,7 +3,7 @@ package namegen_test import ( "testing" - "github.com/kcarretto/realm/tavern/namegen" + "github.com/kcarretto/realm/tavern/internal/namegen" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tavern/internal/www/README.md b/tavern/internal/www/README.md index c6617f437..f42ec4b56 100644 --- a/tavern/internal/www/README.md +++ b/tavern/internal/www/README.md @@ -16,3 +16,7 @@ _If this is your first time contributing WWW changes in this dev environment, re 2. Run `go run ./tavern` to start the teamserver (for the GraphQL API) run in the project root * Note: to run the teamserver with test data (useful for UI development), run `ENABLE_TEST_DATA=1 go run ./tavern` instead 3. In a separate terminal, navigate to the [UI Root /cmd/tavern/internal/www](https://github.com/KCarretto/realm/tree/main/cmd/tavern/internal/www) and run `npm start` + +## Building the Application + +When you're ready to include changes to the UI in the tavern binary, you'll need to run `npm build` to update files in the `build/` directory. These files will automatically be bundled into new compliations of the tavern binary. diff --git a/tavern/internal/www/build/asset-manifest.json b/tavern/internal/www/build/asset-manifest.json new file mode 100644 index 000000000..a1608f660 --- /dev/null +++ b/tavern/internal/www/build/asset-manifest.json @@ -0,0 +1,16 @@ +{ + "files": { + "main.css": "/static/css/main.ed062423.css", + "main.js": "/static/js/main.1ffa92c8.js", + "static/js/787.4af0fb89.chunk.js": "/static/js/787.4af0fb89.chunk.js", + "static/media/eldrich.png": "/static/media/eldrich.a80c74e8249d2461e174.png", + "index.html": "/index.html", + "main.ed062423.css.map": "/static/css/main.ed062423.css.map", + "main.1ffa92c8.js.map": "/static/js/main.1ffa92c8.js.map", + "787.4af0fb89.chunk.js.map": "/static/js/787.4af0fb89.chunk.js.map" + }, + "entrypoints": [ + "static/css/main.ed062423.css", + "static/js/main.1ffa92c8.js" + ] +} \ No newline at end of file diff --git a/tavern/internal/www/build/embed.go b/tavern/internal/www/build/embed.go new file mode 100644 index 000000000..d515f5c9c --- /dev/null +++ b/tavern/internal/www/build/embed.go @@ -0,0 +1,9 @@ +package build + +import "embed" + +// Content embedded from the application's build directory, includes the latest build of the UI. +// +//go:embed *.png *.html *.json *.txt *.ico +//go:embed static/* +var Content embed.FS diff --git a/tavern/internal/www/build/favicon.ico b/tavern/internal/www/build/favicon.ico new file mode 100644 index 000000000..a11777cc4 Binary files /dev/null and b/tavern/internal/www/build/favicon.ico differ diff --git a/tavern/internal/www/build/index.html b/tavern/internal/www/build/index.html new file mode 100644 index 000000000..e6958d3c7 --- /dev/null +++ b/tavern/internal/www/build/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/tavern/internal/www/build/logo192.png b/tavern/internal/www/build/logo192.png new file mode 100644 index 000000000..4652f3695 --- /dev/null +++ b/tavern/internal/www/build/logo192.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c386396ec70db3608075b5fbfaac4ab1ccaa86ba05a68ab393ec551eb66c3e00 +size 5347 diff --git a/tavern/internal/www/build/logo512.png b/tavern/internal/www/build/logo512.png new file mode 100644 index 000000000..ba6e512c9 --- /dev/null +++ b/tavern/internal/www/build/logo512.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ea4f4da7050c0cc408926f6a39c253624e9babb1d43c7977cd821445a60b461 +size 9664 diff --git a/tavern/internal/www/build/manifest.json b/tavern/internal/www/build/manifest.json new file mode 100644 index 000000000..080d6c77a --- /dev/null +++ b/tavern/internal/www/build/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/tavern/internal/www/build/robots.txt b/tavern/internal/www/build/robots.txt new file mode 100644 index 000000000..e9e57dc4d --- /dev/null +++ b/tavern/internal/www/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/tavern/internal/www/build/static/css/main.ed062423.css b/tavern/internal/www/build/static/css/main.ed062423.css new file mode 100644 index 000000000..a02ca098c --- /dev/null +++ b/tavern/internal/www/build/static/css/main.ed062423.css @@ -0,0 +1,4 @@ +/* +! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com +*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{-webkit-font-feature-settings:inherit;font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.btn-primary{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);align-items:center;background-color:rgb(126 34 206/var(--tw-bg-opacity));border-radius:.375rem;box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity));display:inline-flex;font-size:.875rem;font-weight:600;line-height:1.25rem;padding:.75rem 1rem}.btn-primary:focus-visible{outline-color:#7e22ce;outline-offset:2px;outline-style:solid;outline-width:2px}.btn-primary:hover:enabled{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{inset:0}.left-4{left:1rem}.left-full{left:100%}.top-0{top:0}.top-4{top:1rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.col-span-3{grid-column:span 3/span 3}.col-span-9{grid-column:span 9/span 9}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-px{margin-left:-1px}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-16{margin-right:4rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.w-0{width:0}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0}.max-w-xs{max-width:20rem}.flex-1{flex:1 1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.translate-x-0{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.transform{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-3{-webkit-column-gap:.75rem;column-gap:.75rem}.gap-x-6{-webkit-column-gap:1.5rem;column-gap:1.5rem}.gap-y-5{row-gap:1.25rem}.gap-y-7{row-gap:1.75rem}.-space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(-1px*var(--tw-space-y-reverse));margin-top:calc(-1px*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:rgba(17,24,39,.8)}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pt-1{padding-top:.25rem}.pt-5{padding-top:1.25rem}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.tracking-wide{letter-spacing:.025em}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.placeholder-gray-500::-webkit-input-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-inset{--tw-ring-inset:inset}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-purple-700{--tw-ring-opacity:1;--tw-ring-color:rgb(126 34 206/var(--tw-ring-opacity))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-offset-2{--tw-ring-offset-width:2px}.filter{-webkit-filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.md-scroll-container,.option-container{background-color:#edf2f7;width:100%}.md-scroll-container{height:400px;overflow-y:scroll}.max-width{width:100%}.placeholder\:text-gray-400::-webkit-input-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.hover\:bg-purple-100:hover{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity))}.hover\:bg-purple-600:hover{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset:inset}.focus\:ring-indigo-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-gray-300:focus-visible{outline-color:#d1d5db}.focus-visible\:outline-purple-700:focus-visible{outline-color:#7e22ce}.group:hover .group-hover\:bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity))}@media (min-width:640px){.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-1{padding-bottom:.25rem;padding-top:.25rem}.sm\:py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width:1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{bottom:0;top:0}.lg\:z-50{z-index:50}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:flex-col{flex-direction:column}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pl-72{padding-left:18rem}}.ReactVirtualized__Table__headerRow{font-weight:700;text-transform:uppercase}.ReactVirtualized__Table__headerRow,.ReactVirtualized__Table__row{align-items:center;display:flex;flex-direction:row}.ReactVirtualized__Table__headerTruncatedText{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ReactVirtualized__Table__headerColumn,.ReactVirtualized__Table__rowColumn{margin-right:10px;min-width:0}.ReactVirtualized__Table__rowColumn{text-overflow:ellipsis;white-space:nowrap}.ReactVirtualized__Table__headerColumn:first-of-type,.ReactVirtualized__Table__rowColumn:first-of-type{margin-left:10px}.ReactVirtualized__Table__sortableHeaderColumn{cursor:pointer}.ReactVirtualized__Table__sortableHeaderIconContainer{align-items:center;display:flex}.ReactVirtualized__Table__sortableHeaderIcon{fill:currentColor;flex:0 0 24px;height:1em;width:1em} +/*# sourceMappingURL=main.ed062423.css.map*/ \ No newline at end of file diff --git a/tavern/internal/www/build/static/css/main.ed062423.css.map b/tavern/internal/www/build/static/css/main.ed062423.css.map new file mode 100644 index 000000000..e24a812ec --- /dev/null +++ b/tavern/internal/www/build/static/css/main.ed062423.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.ed062423.css","mappings":"AAAA;;CAAc,CAAd,uCAAc,CAAd,qBAAc,CAAd,8BAAc,CAAd,kCAAc,CAAd,oCAAc,CAAd,4BAAc,CAAd,gMAAc,CAAd,8BAAc,CAAd,eAAc,CAAd,UAAc,CAAd,wBAAc,CAAd,QAAc,CAAd,uBAAc,CAAd,aAAc,CAAd,QAAc,CAAd,4DAAc,CAAd,gCAAc,CAAd,mCAAc,CAAd,mBAAc,CAAd,eAAc,CAAd,uBAAc,CAAd,2BAAc,CAAd,qHAAc,CAAd,aAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,aAAc,CAAd,iBAAc,CAAd,sBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,8BAAc,CAAd,oBAAc,CAAd,aAAc,CAAd,2EAAc,CAAd,6BAAc,CAAd,aAAc,CAAd,mBAAc,CAAd,cAAc,CAAd,+BAAc,CAAd,mBAAc,CAAd,mBAAc,CAAd,QAAc,CAAd,SAAc,CAAd,iCAAc,CAAd,yEAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,4BAAc,CAAd,gCAAc,CAAd,+BAAc,CAAd,mEAAc,CAAd,0CAAc,CAAd,mBAAc,CAAd,mDAAc,CAAd,sDAAc,CAAd,YAAc,CAAd,yBAAc,CAAd,2DAAc,CAAd,iBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,QAAc,CAAd,SAAc,CAAd,gBAAc,CAAd,wBAAc,CAAd,kFAAc,CAAd,SAAc,CAAd,sDAAc,CAAd,SAAc,CAAd,mCAAc,CAAd,wBAAc,CAAd,4DAAc,CAAd,qBAAc,CAAd,qBAAc,CAAd,cAAc,CAAd,qBAAc,CAAd,wCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,6BAAc,CAAd,4BAAc,CAAd,2BAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,0CAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,6BAAc,CAAd,4BAAc,CAAd,2BAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,kCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,6BAAc,CAAd,4BAAc,CAAd,2BAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CACd,iCAAoB,CAApB,qBAAoB,CAApB,+DAAoB,CAApB,0BAAoB,EAApB,+DAAoB,CAApB,0BAAoB,EAApB,iEAAoB,CAApB,2BAAoB,EAApB,iEAAoB,CAApB,2BAAoB,EAApB,iEAAoB,CAApB,2BAAoB,EAmBd,8BAAuS,CAAvS,mBAAuS,CAAvS,uCAAuS,CAAvS,sDAAuS,CAAvS,kBAAuS,CAAvS,qDAAuS,CAAvS,qBAAuS,CAAvS,+CAAuS,CAAvS,gJAAuS,CAAvS,mBAAuS,CAAvS,iBAAuS,CAAvS,eAAuS,CAAvS,mBAAuS,CAAvS,mBAAuS,CAAvS,mEAAuS,CAAvS,mBAAuS,CAAvS,iBAAuS,CAAvS,4CAAuS,CAAvS,qDAAuS,CAAvS,wCAAuS,CAAvS,UAAuS,CAlB7S,2BAAmB,CAAnB,yBAAmB,CAAnB,WAAmB,CAAnB,eAAmB,CAAnB,SAAmB,CAAnB,iBAAmB,CAAnB,kBAAmB,CAAnB,SAAmB,CAAnB,qBAAmB,CAAnB,2BAAmB,CAAnB,2BAAmB,CAAnB,+BAAmB,CAAnB,eAAmB,CAAnB,gBAAmB,CAAnB,iBAAmB,CAAnB,oBAAmB,CAAnB,YAAmB,CAAnB,eAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,qCAAmB,CAAnB,qCAAmB,CAAnB,mBAAmB,CAAnB,wBAAmB,CAAnB,yBAAmB,CAAnB,mBAAmB,CAAnB,oBAAmB,CAAnB,8BAAmB,CAAnB,wBAAmB,CAAnB,wBAAmB,CAAnB,sBAAmB,CAAnB,wBAAmB,CAAnB,kBAAmB,CAAnB,2BAAmB,CAAnB,sBAAmB,CAAnB,uBAAmB,CAAnB,qBAAmB,CAAnB,oBAAmB,CAAnB,kBAAmB,CAAnB,gCAAmB,CAAnB,kBAAmB,CAAnB,oBAAmB,CAAnB,kBAAmB,CAAnB,sBAAmB,CAAnB,iBAAmB,CAAnB,iBAAmB,CAAnB,iBAAmB,CAAnB,sBAAmB,CAAnB,iBAAmB,CAAnB,gBAAmB,CAAnB,mBAAmB,CAAnB,kBAAmB,CAAnB,gBAAmB,CAAnB,mBAAmB,CAAnB,mBAAmB,CAAnB,YAAmB,CAAnB,qBAAmB,CAAnB,iBAAmB,CAAnB,qBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,qBAAmB,CAAnB,eAAmB,CAAnB,kBAAmB,CAAnB,iBAAmB,CAAnB,eAAmB,CAAnB,kBAAmB,CAAnB,kBAAmB,CAAnB,oBAAmB,CAAnB,yBAAmB,CAAnB,gBAAmB,CAAnB,uBAAmB,CAAnB,iBAAmB,CAAnB,yCAAmB,CAAnB,uOAAmB,CAAnB,6LAAmB,CAAnB,mCAAmB,CAAnB,gNAAmB,CAAnB,6LAAmB,CAAnB,8BAAmB,CAAnB,4DAAmB,CAAnB,4BAAmB,CAAnB,+BAAmB,CAAnB,mCAAmB,CAAnB,+BAAmB,CAAnB,gCAAmB,CAAnB,qCAAmB,CAAnB,sCAAmB,CAAnB,8CAAmB,CAAnB,gBAAmB,CAAnB,eAAmB,CAAnB,iBAAmB,CAAnB,eAAmB,CAAnB,kCAAmB,CAAnB,iBAAmB,CAAnB,kCAAmB,CAAnB,iBAAmB,CAAnB,wBAAmB,CAAnB,wBAAmB,CAAnB,iEAAmB,CAAnB,wGAAmB,CAAnB,+DAAmB,CAAnB,4GAAmB,CAAnB,6BAAmB,CAAnB,gCAAmB,CAAnB,gCAAmB,CAAnB,kCAAmB,CAAnB,iCAAmB,CAAnB,gDAAmB,CAAnB,iDAAmB,CAAnB,6CAAmB,CAAnB,8CAAmB,CAAnB,wBAAmB,CAAnB,wBAAmB,CAAnB,0BAAmB,CAAnB,iCAAmB,CAAnB,sCAAmB,CAAnB,sDAAmB,CAAnB,sCAAmB,CAAnB,sDAAmB,CAAnB,wCAAmB,CAAnB,sDAAmB,CAAnB,wCAAmB,CAAnB,qDAAmB,CAAnB,4CAAmB,CAAnB,8BAAmB,CAAnB,sDAAmB,CAAnB,6BAAmB,CAAnB,sDAAmB,CAAnB,8BAAmB,CAAnB,mDAAmB,CAAnB,8BAAmB,CAAnB,mDAAmB,CAAnB,mDAAmB,CAAnB,+BAAmB,CAAnB,sDAAmB,CAAnB,gCAAmB,CAAnB,qDAAmB,CAAnB,wCAAmB,CAAnB,2BAAmB,CAAnB,sDAAmB,CAAnB,kBAAmB,CAAnB,uBAAmB,CAAnB,iBAAmB,CAAnB,uBAAmB,CAAnB,kBAAmB,CAAnB,yBAAmB,CAAnB,oBAAmB,CAAnB,+CAAmB,CAAnB,8CAAmB,CAAnB,0CAAmB,CAAnB,8CAAmB,CAAnB,4BAAmB,CAAnB,0BAAmB,CAAnB,4BAAmB,CAAnB,2BAAmB,CAAnB,wBAAmB,CAAnB,yBAAmB,CAAnB,4BAAmB,CAAnB,0BAAmB,CAAnB,gBAAmB,CAAnB,yBAAmB,CAAnB,kBAAmB,CAAnB,0BAAmB,CAAnB,mBAAmB,CAAnB,0BAAmB,CAAnB,mBAAmB,CAAnB,4BAAmB,CAAnB,8BAAmB,CAAnB,6BAAmB,CAAnB,oCAAmB,CAAnB,kCAAmB,CAAnB,6CAAmB,CAAnB,kCAAmB,CAAnB,6CAAmB,CAAnB,kCAAmB,CAAnB,0CAAmB,CAAnB,oCAAmB,CAAnB,4CAAmB,CAAnB,oCAAmB,CAAnB,4CAAmB,CAAnB,oCAAmB,CAAnB,2CAAmB,CAAnB,+BAAmB,CAAnB,6CAAmB,CAAnB,2EAAmB,CAAnB,oDAAmB,CAAnB,6DAAmB,CAAnB,oDAAmB,CAAnB,oBAAmB,CAAnB,sBAAmB,CAAnB,kDAAmB,CAAnB,sDAAmB,CAAnB,+CAAmB,CAAnB,kGAAmB,CAAnB,kHAAmB,CAAnB,wGAAmB,CAAnB,uFAAmB,CAAnB,wFAAmB,CAAnB,kHAAmB,CAAnB,wGAAmB,CAAnB,iCAAmB,CAAnB,kCAAmB,CAAnB,uDAAmB,CAAnB,oCAAmB,CAAnB,sDAAmB,CAAnB,kDAAmB,CAAnB,yCAAmB,CAAnB,gMAAmB,CAAnB,gLAAmB,CAAnB,0MAAmB,CAAnB,6IAAmB,CAAnB,sMAAmB,CAAnB,kDAAmB,CAAnB,wEAAmB,CAAnB,kDAAmB,CAAnB,qCAAmB,CAAnB,+DAAmB,CAAnB,8CAAmB,CAMnB,uCAFE,wBAAyB,CADzB,UAQF,CALA,qBAEI,YAAa,CACb,iBAEJ,CACA,WACI,UACJ,CAhBA,wH,CAAA,0G,CAAA,iG,CAAA,+F,CAAA,oG,CAAA,mG,CAAA,0F,CAAA,2E,CAAA,yY,CAAA,8C,CAAA,uG,CAAA,yD,CAAA,yD,CAAA,iE,CAAA,oE,CAAA,sE,CAAA,gH,CAAA,mD,CAAA,sB,CAAA,sB,CAAA,oC,CAAA,kD,CAAA,kD,CAAA,kD,CAAA,uD,CAAA,kD,CAAA,iC,EAAA,mD,CAAA,6B,CAAA,oB,CAAA,sB,CAAA,wB,CAAA,qB,CAAA,mC,CAAA,8C,CAAA,6B,ECwBA,oCACE,eAAgB,CAChB,wBAIF,CACA,kEAFE,kBAAmB,CAFnB,YAAa,CACb,kBAOF,CAEA,8CACE,oBAAqB,CACrB,cAAe,CAGf,eAAgB,CADhB,sBAAuB,CADvB,kBAGF,CAEA,2EAEE,iBAAkB,CAClB,WACF,CACA,oCACE,sBAAuB,CACvB,kBACF,CAEA,uGAEE,gBACF,CACA,+CACE,cACF,CAEA,sDAEE,kBAAmB,CADnB,YAEF,CACA,6CAIE,iBAAkB,CAHlB,aAAc,CACd,UAAW,CACX,SAEF","sources":["style.css","../node_modules/react-virtualized/source/styles.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n.option-container{\n width: 100%;\n background-color: #EDF2F7;\n}\n.md-scroll-container{\n width: 100%;\n height: 400px;\n overflow-y: scroll;\n background-color: #EDF2F7;\n}\n.max-width{\n width: 100%;\n}\n\n@layer components {\n .btn-primary {\n @apply inline-flex items-center rounded-md bg-purple-700 px-4 py-3 text-sm font-semibold text-white shadow-sm enabled:hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700 disabled:opacity-50 disabled:cursor-not-allowed;\n }\n }","/* Collection default theme */\n\n.ReactVirtualized__Collection {\n}\n\n.ReactVirtualized__Collection__innerScrollContainer {\n}\n\n/* Grid default theme */\n\n.ReactVirtualized__Grid {\n}\n\n.ReactVirtualized__Grid__innerScrollContainer {\n}\n\n/* Table default theme */\n\n.ReactVirtualized__Table {\n}\n\n.ReactVirtualized__Table__Grid {\n}\n\n.ReactVirtualized__Table__headerRow {\n font-weight: 700;\n text-transform: uppercase;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ReactVirtualized__Table__row {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.ReactVirtualized__Table__headerTruncatedText {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.ReactVirtualized__Table__headerColumn,\n.ReactVirtualized__Table__rowColumn {\n margin-right: 10px;\n min-width: 0px;\n}\n.ReactVirtualized__Table__rowColumn {\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.ReactVirtualized__Table__headerColumn:first-of-type,\n.ReactVirtualized__Table__rowColumn:first-of-type {\n margin-left: 10px;\n}\n.ReactVirtualized__Table__sortableHeaderColumn {\n cursor: pointer;\n}\n\n.ReactVirtualized__Table__sortableHeaderIconContainer {\n display: flex;\n align-items: center;\n}\n.ReactVirtualized__Table__sortableHeaderIcon {\n flex: 0 0 24px;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\n/* List default theme */\n\n.ReactVirtualized__List {\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js b/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js new file mode 100644 index 000000000..ea101a24b --- /dev/null +++ b/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[787],{787:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return w},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},f=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){f((function(e){var t=e.timeStamp;v=t}),!0)},l=function(){return v<0&&(v=p(),d(),s((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},p=c("layout-shift",v);p&&(n=m(i,r,t),f((function(){p.takeRecords().map(v),n(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},y={passive:!0,capture:!0},E=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(t,e):L(t,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,y)}))},C=function(e,t){var n,a=l(),v=u("FID"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}}}]); +//# sourceMappingURL=787.4af0fb89.chunk.js.map \ No newline at end of file diff --git a/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js.map b/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js.map new file mode 100644 index 000000000..51d51e083 --- /dev/null +++ b/tavern/internal/www/build/static/js/787.4af0fb89.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/787.4af0fb89.chunk.js","mappings":"2PAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAM,IAASL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAM,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,GAAG,gBAAgBA,KAAK,2BAA2BoB,MAAM,OAAO,IAAIlB,EAAE,IAAIe,qBAAqB,SAASjB,GAAG,OAAOA,EAAEqB,aAAaC,IAAIrB,EAAE,IAAI,OAAOC,EAAEqB,QAAQ,CAACC,KAAKxB,EAAEyB,UAAS,IAAKvB,CAAC,CAAC,CAAC,MAAMF,GAAG,CAAC,EAAE0B,EAAE,SAAS1B,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEqB,MAAM,WAAWG,SAASC,kBAAkB5B,EAAEG,GAAGF,IAAI4B,oBAAoB,mBAAmB3B,GAAE,GAAI2B,oBAAoB,WAAW3B,GAAE,IAAK,EAAE4B,iBAAiB,mBAAmB5B,GAAE,GAAI4B,iBAAiB,WAAW5B,GAAE,EAAG,EAAE6B,EAAE,SAAS/B,GAAG8B,iBAAiB,YAAY,SAAS7B,GAAGA,EAAE+B,WAAWhC,EAAEC,EAAE,IAAG,EAAG,EAAEgC,EAAE,SAASjC,EAAEC,EAAEC,GAAG,IAAIC,EAAE,OAAO,SAASC,GAAGH,EAAEK,OAAO,IAAIF,GAAGF,KAAKD,EAAEM,MAAMN,EAAEK,OAAOH,GAAG,IAAIF,EAAEM,YAAO,IAASJ,KAAKA,EAAEF,EAAEK,MAAMN,EAAEC,IAAI,CAAC,EAAEiC,GAAG,EAAEC,EAAE,WAAW,MAAM,WAAWR,SAASC,gBAAgB,EAAE,GAAG,EAAEQ,EAAE,WAAWV,GAAG,SAAS1B,GAAG,IAAIC,EAAED,EAAEqC,UAAUH,EAAEjC,CAAC,IAAG,EAAG,EAAEqC,EAAE,WAAW,OAAOJ,EAAE,IAAIA,EAAEC,IAAIC,IAAIL,GAAG,WAAWQ,YAAY,WAAWL,EAAEC,IAAIC,GAAG,GAAG,EAAE,KAAK,CAAKI,sBAAkB,OAAON,CAAC,EAAE,EAAEO,EAAE,SAASzC,EAAEC,GAAG,IAAIC,EAAEC,EAAEmC,IAAIZ,EAAEtB,EAAE,OAAO8B,EAAE,SAASlC,GAAG,2BAA2BA,EAAEK,OAAO+B,GAAGA,EAAEM,aAAa1C,EAAE2C,UAAUxC,EAAEqC,kBAAkBd,EAAEpB,MAAMN,EAAE2C,UAAUjB,EAAElB,QAAQoC,KAAK5C,GAAGE,GAAE,IAAK,EAAEiC,EAAEU,OAAOC,aAAaA,YAAYC,kBAAkBD,YAAYC,iBAAiB,0BAA0B,GAAGX,EAAED,EAAE,KAAKnB,EAAE,QAAQkB,IAAIC,GAAGC,KAAKlC,EAAE+B,EAAEjC,EAAE0B,EAAEzB,GAAGkC,GAAGD,EAAEC,GAAGJ,GAAG,SAAS5B,GAAGuB,EAAEtB,EAAE,OAAOF,EAAE+B,EAAEjC,EAAE0B,EAAEzB,GAAG+C,uBAAuB,WAAWA,uBAAuB,WAAWtB,EAAEpB,MAAMwC,YAAYlC,MAAMT,EAAEkC,UAAUnC,GAAE,EAAG,GAAG,GAAG,IAAI,EAAE+C,GAAE,EAAGC,GAAG,EAAEC,EAAE,SAASnD,EAAEC,GAAGgD,IAAIR,GAAG,SAASzC,GAAGkD,EAAElD,EAAEM,KAAK,IAAI2C,GAAE,GAAI,IAAI/C,EAAEC,EAAE,SAASF,GAAGiD,GAAG,GAAGlD,EAAEC,EAAE,EAAEiC,EAAE9B,EAAE,MAAM,GAAG+B,EAAE,EAAEC,EAAE,GAAGE,EAAE,SAAStC,GAAG,IAAIA,EAAEoD,eAAe,CAAC,IAAInD,EAAEmC,EAAE,GAAGjC,EAAEiC,EAAEA,EAAEiB,OAAO,GAAGlB,GAAGnC,EAAE2C,UAAUxC,EAAEwC,UAAU,KAAK3C,EAAE2C,UAAU1C,EAAE0C,UAAU,KAAKR,GAAGnC,EAAEM,MAAM8B,EAAEQ,KAAK5C,KAAKmC,EAAEnC,EAAEM,MAAM8B,EAAE,CAACpC,IAAImC,EAAED,EAAE5B,QAAQ4B,EAAE5B,MAAM6B,EAAED,EAAE1B,QAAQ4B,EAAElC,IAAI,CAAC,EAAEiD,EAAEnC,EAAE,eAAesB,GAAGa,IAAIjD,EAAE+B,EAAE9B,EAAE+B,EAAEjC,GAAGyB,GAAG,WAAWyB,EAAEG,cAAchC,IAAIgB,GAAGpC,GAAE,EAAG,IAAI6B,GAAG,WAAWI,EAAE,EAAEe,GAAG,EAAEhB,EAAE9B,EAAE,MAAM,GAAGF,EAAE+B,EAAE9B,EAAE+B,EAAEjC,EAAE,IAAI,EAAEsD,EAAE,CAACC,SAAQ,EAAGC,SAAQ,GAAIC,EAAE,IAAI/C,KAAKgD,EAAE,SAASxD,EAAEC,GAAGJ,IAAIA,EAAEI,EAAEH,EAAEE,EAAED,EAAE,IAAIS,KAAKiD,EAAE/B,qBAAqBgC,IAAI,EAAEA,EAAE,WAAW,GAAG5D,GAAG,GAAGA,EAAEC,EAAEwD,EAAE,CAAC,IAAItD,EAAE,CAAC0D,UAAU,cAAczD,KAAKL,EAAEwB,KAAKuC,OAAO/D,EAAE+D,OAAOC,WAAWhE,EAAEgE,WAAWrB,UAAU3C,EAAEqC,UAAU4B,gBAAgBjE,EAAEqC,UAAUpC,GAAGE,EAAE+D,SAAS,SAASlE,GAAGA,EAAEI,EAAE,IAAID,EAAE,EAAE,CAAC,EAAEgE,EAAE,SAASnE,GAAG,GAAGA,EAAEgE,WAAW,CAAC,IAAI/D,GAAGD,EAAEqC,UAAU,KAAK,IAAI1B,KAAKmC,YAAYlC,OAAOZ,EAAEqC,UAAU,eAAerC,EAAEwB,KAAK,SAASxB,EAAEC,GAAG,IAAIC,EAAE,WAAWyD,EAAE3D,EAAEC,GAAGG,GAAG,EAAED,EAAE,WAAWC,GAAG,EAAEA,EAAE,WAAWyB,oBAAoB,YAAY3B,EAAEqD,GAAG1B,oBAAoB,gBAAgB1B,EAAEoD,EAAE,EAAEzB,iBAAiB,YAAY5B,EAAEqD,GAAGzB,iBAAiB,gBAAgB3B,EAAEoD,EAAE,CAAhO,CAAkOtD,EAAED,GAAG2D,EAAE1D,EAAED,EAAE,CAAC,EAAE4D,EAAE,SAAS5D,GAAG,CAAC,YAAY,UAAU,aAAa,eAAekE,SAAS,SAASjE,GAAG,OAAOD,EAAEC,EAAEkE,EAAEZ,EAAE,GAAG,EAAEa,EAAE,SAASlE,EAAEgC,GAAG,IAAIC,EAAEC,EAAEE,IAAIG,EAAErC,EAAE,OAAO6C,EAAE,SAASjD,GAAGA,EAAE2C,UAAUP,EAAEI,kBAAkBC,EAAEnC,MAAMN,EAAEiE,gBAAgBjE,EAAE2C,UAAUF,EAAEjC,QAAQoC,KAAK5C,GAAGmC,GAAE,GAAI,EAAEe,EAAElC,EAAE,cAAciC,GAAGd,EAAEF,EAAE/B,EAAEuC,EAAEP,GAAGgB,GAAGxB,GAAG,WAAWwB,EAAEI,cAAchC,IAAI2B,GAAGC,EAAER,YAAY,IAAG,GAAIQ,GAAGnB,GAAG,WAAW,IAAIf,EAAEyB,EAAErC,EAAE,OAAO+B,EAAEF,EAAE/B,EAAEuC,EAAEP,GAAG/B,EAAE,GAAGF,GAAG,EAAED,EAAE,KAAK4D,EAAE9B,kBAAkBd,EAAEiC,EAAE9C,EAAEyC,KAAK5B,GAAG6C,GAAG,GAAG,EAAEQ,EAAE,CAAC,EAAEC,EAAE,SAAStE,EAAEC,GAAG,IAAIC,EAAEC,EAAEmC,IAAIJ,EAAE9B,EAAE,OAAO+B,EAAE,SAASnC,GAAG,IAAIC,EAAED,EAAE2C,UAAU1C,EAAEE,EAAEqC,kBAAkBN,EAAE5B,MAAML,EAAEiC,EAAE1B,QAAQoC,KAAK5C,GAAGE,IAAI,EAAEkC,EAAEpB,EAAE,2BAA2BmB,GAAG,GAAGC,EAAE,CAAClC,EAAE+B,EAAEjC,EAAEkC,EAAEjC,GAAG,IAAIwC,EAAE,WAAW4B,EAAEnC,EAAEzB,MAAM2B,EAAEkB,cAAchC,IAAIa,GAAGC,EAAEM,aAAa2B,EAAEnC,EAAEzB,KAAI,EAAGP,GAAE,GAAI,EAAE,CAAC,UAAU,SAASgE,SAAS,SAASlE,GAAG8B,iBAAiB9B,EAAEyC,EAAE,CAAC8B,MAAK,EAAGd,SAAQ,GAAI,IAAI/B,EAAEe,GAAE,GAAIV,GAAG,SAAS5B,GAAG+B,EAAE9B,EAAE,OAAOF,EAAE+B,EAAEjC,EAAEkC,EAAEjC,GAAG+C,uBAAuB,WAAWA,uBAAuB,WAAWd,EAAE5B,MAAMwC,YAAYlC,MAAMT,EAAEkC,UAAUgC,EAAEnC,EAAEzB,KAAI,EAAGP,GAAE,EAAG,GAAG,GAAG,GAAG,CAAC,EAAEsE,EAAE,SAASxE,GAAG,IAAIC,EAAEC,EAAEE,EAAE,QAAQH,EAAE,WAAW,IAAI,IAAIA,EAAE6C,YAAY2B,iBAAiB,cAAc,IAAI,WAAW,IAAIzE,EAAE8C,YAAY4B,OAAOzE,EAAE,CAAC6D,UAAU,aAAanB,UAAU,GAAG,IAAI,IAAIzC,KAAKF,EAAE,oBAAoBE,GAAG,WAAWA,IAAID,EAAEC,GAAGW,KAAK8D,IAAI3E,EAAEE,GAAGF,EAAE4E,gBAAgB,IAAI,OAAO3E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE4E,cAAc3E,EAAEI,MAAM,GAAGJ,EAAEI,MAAMwC,YAAYlC,MAAM,OAAOV,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAE,CAAC,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASmD,WAAWvC,WAAWtC,EAAE,GAAG6B,iBAAiB,QAAQ,WAAW,OAAOS,WAAWtC,EAAE,EAAE,GAAG,C","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},u=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},c=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),u((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},d=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=c(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),u((function(){s=0,l=-1,f=r(\"CLS\",0),n=c(i,f,t)})))},T={passive:!0,capture:!0},y=new Date,g=function(i,r){e||(e=r,t=i,n=new Date,w(removeEventListener),E())},E=function(){if(t>=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){g(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,T),removeEventListener(\"pointercancel\",i,T)};addEventListener(\"pointerup\",n,T),addEventListener(\"pointercancel\",i,T)}(t,e):g(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,S,T)}))},L=function(n,f){var s,m=v(),d=r(\"FID\"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"load\",(function(){return setTimeout(t,0)}))};export{h as getCLS,d as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","u","persisted","c","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","d","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","p","l","h","hadRecentInput","length","takeRecords","T","passive","capture","y","g","w","E","entryType","target","cancelable","processingStart","forEach","S","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""} \ No newline at end of file diff --git a/tavern/internal/www/build/static/js/main.1ffa92c8.js b/tavern/internal/www/build/static/js/main.1ffa92c8.js new file mode 100644 index 000000000..d529219d8 --- /dev/null +++ b/tavern/internal/www/build/static/js/main.1ffa92c8.js @@ -0,0 +1,3 @@ +/*! For license information please see main.1ffa92c8.js.LICENSE.txt */ +!function(){var e={457:function(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,o="undefined"!==typeof Element;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var l,s,u,c=t(e),d=t(a);if(c&&d){if((s=e.length)!=a.length)return!1;for(l=s;0!==l--;)if(!i(e[l],a[l]))return!1;return!0}if(c!=d)return!1;var f=e instanceof Date,p=a instanceof Date;if(f!=p)return!1;if(f&&p)return e.getTime()==a.getTime();var h=e instanceof RegExp,v=a instanceof RegExp;if(h!=v)return!1;if(h&&v)return e.toString()==a.toString();var m=n(e);if((s=m.length)!==n(a).length)return!1;for(l=s;0!==l--;)if(!r.call(a,m[l]))return!1;if(o&&e instanceof Element&&a instanceof Element)return e===a;for(l=s;0!==l--;)if(("_owner"!==(u=m[l])||!e.$$typeof)&&!i(e[u],a[u]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return i(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},110:function(e,t,n){"use strict";var r=n(441),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var l=s(t),v=s(n),m=0;m-1},ee.prototype.set=function(e,t){var n=this.__data__,r=ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(K||ee),string:new Z}},te.prototype.delete=function(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return ge(this,e).get(e)},te.prototype.has=function(e){return ge(this,e).has(e)},te.prototype.set=function(e,t){var n=ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ne.prototype.clear=function(){this.__data__=new ee,this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ne.prototype.get=function(e){return this.__data__.get(e)},ne.prototype.has=function(e){return this.__data__.has(e)},ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new te(r)}return n.set(e,t),this.size=n.size,this};var se,ue=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[se?a:++r];if(!1===t(o[l],l,o))break}return e};function ce(e){return null==e?void 0===e?f:u:q&&q in Object(e)?function(e){var t=A.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(i){}var o=D.call(e);r&&(t?e[q]=n:delete e[q]);return o}(e):function(e){return D.call(e)}(e)}function de(e){return Pe(e)&&ce(e)==i}function fe(e){return!(!Ie(e)||function(e){return!!M&&M in e}(e))&&(Oe(e)?L:p).test(function(e){if(null!=e){try{return P.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function pe(e){if(!Ie(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=we(e),n=[];for(var r in e)("constructor"!=r||!t&&A.call(e,r))&&n.push(r);return n}function he(e,t,n,r,o){e!==t&&ue(t,(function(i,a){if(o||(o=new ne),Ie(i))!function(e,t,n,r,o,i,a){var l=xe(e,n),s=xe(t,n),u=a.get(s);if(u)return void oe(e,n,u);var d=i?i(l,s,n+"",e,t,a):void 0,f=void 0===d;if(f){var p=Ce(s),h=!p&&Te(s),v=!p&&!h&&Ae(s);d=s,p||h||v?Ce(l)?d=l:Pe(m=l)&&Ee(m)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(me);function _e(e,t){return e===t||e!==e&&t!==t}var ke=de(function(){return arguments}())?de:function(e){return Pe(e)&&A.call(e,"callee")&&!W.call(e,"callee")},Ce=Array.isArray;function Ee(e){return null!=e&&Re(e.length)&&!Oe(e)}var Te=Q||function(){return!1};function Oe(e){if(!Ie(e))return!1;var t=ce(e);return t==l||t==s||t==a||t==d}function Re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ie(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pe(e){return null!=e&&"object"==typeof e}var Ae=k?function(e){return function(t){return e(t)}}(k):function(e){return Pe(e)&&Re(e.length)&&!!v[ce(e)]};function Me(e){return Ee(e)?re(e,!0):pe(e)}var De,je=(De=function(e,t,n,r){he(e,t,n,r)},ve((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=De.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Ie(n))return!1;var r=typeof t;return!!("number"==r?Ee(n)&&be(t,n.length):"string"==r&&t in n)&&_e(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n