Skip to content

Commit

Permalink
Merge branch 'main' into metagen-client-file
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/metagen/typegraphs/identities/rs/fdk.rs
  • Loading branch information
Natoandro committed Oct 30, 2024
2 parents 0e4f78b + bb42c00 commit 9f2c050
Show file tree
Hide file tree
Showing 65 changed files with 310 additions and 200 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Having a good title and description is important for the users to get readable c

#### Migration notes

...
---

- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ jobs:
- build-docker
- pub-docker
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -357,3 +360,8 @@ jobs:
title: "chore(release): prepare for ${{ steps.bump.outputs.version }}"
body: "Automatic suggested bump"
base: main
# since PRs created from workflows won't have actions run
# on them, we create it as a draft PR
# the actions will then run when it's readied for review
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
draft: always-true
12 changes: 11 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
# exclude all generated files
exclude: (?x)( .ghjk/.* |.*deno.lock |.*\.snap$|typegate/src/typegraphs/.*\.json |website/docs/reference/ |libs/pyrt_wit_wire/pyrt | migration_lock.toml | tests/metagen/typegraphs/sample/[rs|ts|py]/client\.[rs|ts|py])
exclude: (?x)(
.ghjk/.*|
.*deno.lock|
CHANGELOG.md|
.*\.snap$|
typegate/src/typegraphs/.*\.json|
website/docs/reference/|
libs/pyrt_wit_wire/pyrt|
migration_lock.toml|
tests/metagen/typegraphs/sample/[rs|ts|py]/client\.[rs|ts|py]
)
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exclude = [
]

[workspace.package]
version = "0.5.0-rc.2"
version = "0.5.0-rc.3"
edition = "2021"

[workspace.dependencies]
Expand Down
81 changes: 81 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ typegate:
secrets:
example:
POSTGRES: "postgresql://postgres:password@postgres:5432/db"
MONGO: "mongodb://root:password@mongo:27017/db"
HOST: "http://localhost:7233"
NAMESPACE: "default"
```
Expand Down
3 changes: 2 additions & 1 deletion docs/metatype.dev/docs/tutorials/metatype-basics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ docker compose version

...and if not, the official installation guide can be found [here](https://docs.docker.com/compose/install/).

If you have your docker runtime installed and running correctly, you will be able to launch the `compose.yml` file that's bundled in every template. The compose file by default includes the `postgres` and `mongo` databases. You can disable the latter by commenting it out or removing it as we'll not be needing it for this tutorial.
If you have your docker runtime installed and running correctly, you will be able to launch the `compose.yml` file that's bundled in every template.
The compose file also includes the `postgres` databases that we'll be using.

To launch the services, navigate your shell to the project directory and run the following command:

Expand Down
8 changes: 4 additions & 4 deletions docs/metatype.dev/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ function TryIt(): JSX.Element {
}

const runtimeList = [
{
/* {
name: "MongoDB",
logo: "/images/runtimes/mongodb.svg",
},
}, */
{
name: "GraphQL",
logo: "/images/runtimes/graphql.svg",
Expand Down Expand Up @@ -333,10 +333,10 @@ const runtimeList = [
name: "Google APIs Explorer",
logo: "/images/runtimes/google-apis-explorer.svg",
},
{
/* {
name: "MariaDB",
logo: "/images/runtimes/mariadb.svg",
},
}, */
{
name: "Python",
logo: "/images/runtimes/python.svg",
Expand Down
6 changes: 3 additions & 3 deletions examples/templates/deno/api/example.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Policy, t, typegraph } from "jsr:@typegraph/[email protected].2/index.ts";
import { PythonRuntime } from "jsr:@typegraph/[email protected].2/runtimes/python.ts";
import { DenoRuntime } from "jsr:@typegraph/[email protected].2/runtimes/deno.ts";
import { Policy, t, typegraph } from "jsr:@typegraph/[email protected].3/index.ts";
import { PythonRuntime } from "jsr:@typegraph/[email protected].3/runtimes/python.ts";
import { DenoRuntime } from "jsr:@typegraph/[email protected].3/runtimes/deno.ts";

await typegraph("example", (g) => {
const pub = Policy.public();
Expand Down
17 changes: 1 addition & 16 deletions examples/templates/deno/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
typegate:
image: ghcr.io/metatypedev/typegate:v0.5.0-rc.2
image: ghcr.io/metatypedev/typegate:v0.5.0-rc.3
restart: always
ports:
- "7890:7890"
Expand Down Expand Up @@ -35,20 +35,5 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data

# for prisma runtime with mongo
# mongodb://root:password@mongo:27017/db
# see metatype.yml
mongo:
image: mongo:7
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "27017:27017"
volumes:
- mongodata:/data/db

volumes:
pgdata:
mongodata:
2 changes: 0 additions & 2 deletions examples/templates/deno/metatype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ typegates:
secrets:
example:
POSTGRES: "postgresql://postgres:password@postgres:5432/db"
MONGO: "mongodb://root:password@mongo:27017/db"
deploy:
url: "https://cloud.metatype.dev"
username: admin
password: password
secrets:
example:
POSTGRES: "postgresql://postgres:password@localhost:5432/db"
MONGO: "mongodb://root:password@mongo:27017/db"
17 changes: 1 addition & 16 deletions examples/templates/node/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
typegate:
image: ghcr.io/metatypedev/typegate:v0.5.0-rc.2
image: ghcr.io/metatypedev/typegate:v0.5.0-rc.3
restart: always
ports:
- "7890:7890"
Expand Down Expand Up @@ -34,20 +34,5 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data

# for prisma runtime with mongo
# mongodb://root:password@mongo:27017/db
# see metatype.yml
mongo:
image: mongo:7
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "27017:27017"
volumes:
- mongodata:/data/db

volumes:
pgdata:
mongodata:
Loading

0 comments on commit 9f2c050

Please sign in to comment.