From 97caf658f577a412f202c86da29ae38fd9961233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl?= Date: Mon, 18 Mar 2024 10:47:13 +0300 Subject: [PATCH] feat(cli): long running discovery (#599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Delegate serialize, deploy, undeploy, unpack work to SDK. #### Motivation and context Remove duplicate logic, thinking of cli as a convenience on top of the SDK. #### Migration notes When meta cli is used, Migration files are unpacked/resolved relative to the typegraph's path, not the process's `workdir`. ### Checklist - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change --------- Signed-off-by: Michaël --- .gitignore | 1 + CHANGELOG.md | 2521 ++- Cargo.lock | 225 +- dev/lock.yml | 4 +- examples/deploy/deploy.mjs | 22 +- examples/deploy/deploy.py | 17 +- examples/templates/deno/api/example.ts | 8 +- examples/templates/node/package.json | 2 +- examples/typegraphs/authentication.ts | 2 +- examples/typegraphs/backend-for-frontend.ts | 2 +- examples/typegraphs/basic.ts | 2 +- examples/typegraphs/cors.ts | 2 +- examples/typegraphs/database.ts | 2 +- examples/typegraphs/deno.ts | 2 +- examples/typegraphs/example_rest.ts | 2 +- examples/typegraphs/execute.ts | 2 +- examples/typegraphs/faas-runner.ts | 2 +- examples/typegraphs/files-upload.ts | 2 +- examples/typegraphs/first-typegraph.ts | 2 +- examples/typegraphs/func.ts | 2 +- examples/typegraphs/graphql-server.ts | 2 +- examples/typegraphs/graphql.ts | 2 +- examples/typegraphs/iam-provider.ts | 2 +- examples/typegraphs/index.ts | 2 +- examples/typegraphs/jwt.ts | 2 +- examples/typegraphs/math.ts | 2 +- .../typegraphs/microservice-orchestration.ts | 2 +- examples/typegraphs/oauth2.ts | 2 +- examples/typegraphs/policies.ts | 2 +- ...o-sugar.py => prisma-no-sugar.py.disabled} | 0 examples/typegraphs/prisma-runtime.ts | 2 +- examples/typegraphs/prisma.ts | 2 +- .../typegraphs/programmable-api-gateway.ts | 2 +- examples/typegraphs/rate.ts | 2 +- examples/typegraphs/reduce.ts | 2 +- examples/typegraphs/rest.ts | 2 +- examples/typegraphs/roadmap-policies.ts | 2 +- .../{random.py => roadmap-random.py} | 0 .../{random.ts => roadmap-random.ts} | 2 +- examples/typegraphs/triggers.ts | 2 +- libs/common/src/archive.rs | 9 + libs/common/src/node.rs | 9 +- meta-cli/Cargo.toml | 1 + meta-cli/src/cli/codegen.rs | 54 +- meta-cli/src/cli/completion.rs | 3 +- meta-cli/src/cli/deploy.rs | 184 +- meta-cli/src/cli/dev.rs | 5 +- meta-cli/src/cli/doctor.rs | 3 +- meta-cli/src/cli/mod.rs | 3 +- meta-cli/src/cli/new.rs | 3 +- meta-cli/src/cli/serialize.rs | 37 +- meta-cli/src/cli/typegate.rs | 3 +- meta-cli/src/cli/undeploy.rs | 5 +- meta-cli/src/cli/upgrade.rs | 3 +- meta-cli/src/codegen/deno.rs | 130 +- meta-cli/src/com/mod.rs | 6 + meta-cli/src/com/responses.rs | 69 + meta-cli/src/com/server.rs | 163 + meta-cli/src/com/store.rs | 179 + meta-cli/src/config.rs | 39 +- meta-cli/src/deploy/actors/console/input.rs | 15 +- meta-cli/src/deploy/actors/loader.rs | 100 +- meta-cli/src/deploy/actors/mod.rs | 2 - meta-cli/src/deploy/actors/push_manager.rs | 507 - meta-cli/src/deploy/actors/pusher.rs | 537 - .../src/deploy/push/migration_resolution.rs | 141 +- meta-cli/src/deploy/push/mod.rs | 1 + meta-cli/src/deploy/push/pusher.rs | 359 + meta-cli/src/main.rs | 33 +- meta-cli/src/tests/utils.rs | 2 + meta-cli/src/typegraph/loader/discovery.rs | 2 +- meta-cli/src/typegraph/loader/mod.rs | 120 +- meta-cli/src/typegraph/postprocess.rs | 252 +- meta-cli/src/utils/mod.rs | 8 - typegate/deno.lock | 2 + typegate/src/runtimes/typegate.ts | 8 +- typegate/src/typegraphs/typegate.json | 2 +- typegate/src/typegraphs/typegate.py | 6 +- typegate/tests/e2e/cli/dev_test.ts | 1 + .../tests/e2e/self_deploy/self_deploy.mjs | 3 +- .../tests/e2e/self_deploy/self_deploy_test.ts | 5 +- .../tests/e2e/templates/templates_test.ts | 5 +- .../__snapshots__/typegraph_test.ts.snap | 4 +- .../__snapshots__/validator_test.ts.snap | 19 +- .../tests/random/{random.py => random_.py} | 0 typegate/tests/random/random_test.ts | 2 +- .../tests/runtimes/http/{http.py => http_.py} | 0 typegate/tests/runtimes/http/http_test.ts | 2 +- .../tests/runtimes/wasmedge/rust/Cargo.lock | 12711 +++++++++++++++- typegraph/core/src/errors.rs | 6 + typegraph/core/src/global_store.rs | 9 +- typegraph/core/src/lib.rs | 18 +- typegraph/core/src/typegraph.rs | 29 +- typegraph/core/src/utils/fs_host.rs | 64 +- typegraph/core/src/utils/mod.rs | 8 +- .../core/src/utils/postprocess/deno_rt.rs | 2 +- typegraph/core/src/utils/postprocess/mod.rs | 48 +- .../core/src/utils/postprocess/prisma_rt.rs | 41 +- .../core/src/utils/postprocess/python_rt.rs | 2 +- .../core/src/utils/postprocess/validation.rs | 25 + .../core/src/utils/postprocess/wasmedge_rt.rs | 2 +- typegraph/core/wit/typegraph.wit | 16 +- typegraph/node/sdk/src/host/host.ts | 2 +- typegraph/node/sdk/src/tg_deploy.ts | 6 +- typegraph/node/sdk/src/tg_manage.ts | 166 + typegraph/node/sdk/src/typegraph.ts | 49 +- typegraph/node/sdk/src/utils/func_utils.ts | 16 + .../python/typegraph/graph/shared_types.py | 25 + typegraph/python/typegraph/graph/tg_deploy.py | 20 +- typegraph/python/typegraph/graph/tg_manage.py | 192 + typegraph/python/typegraph/graph/typegraph.py | 43 +- typegraph/python/typegraph/host/host.py | 4 +- .../docs/reference/runtimes/prisma/index.mdx | 4 +- 113 files changed, 16107 insertions(+), 3307 deletions(-) rename examples/typegraphs/{prisma-no-sugar.py => prisma-no-sugar.py.disabled} (100%) rename examples/typegraphs/{random.py => roadmap-random.py} (100%) rename examples/typegraphs/{random.ts => roadmap-random.ts} (98%) create mode 100644 meta-cli/src/com/mod.rs create mode 100644 meta-cli/src/com/responses.rs create mode 100644 meta-cli/src/com/server.rs create mode 100644 meta-cli/src/com/store.rs delete mode 100644 meta-cli/src/deploy/actors/push_manager.rs delete mode 100644 meta-cli/src/deploy/actors/pusher.rs create mode 100644 meta-cli/src/deploy/push/pusher.rs rename typegate/tests/random/{random.py => random_.py} (100%) rename typegate/tests/runtimes/http/{http.py => http_.py} (100%) create mode 100644 typegraph/core/src/utils/postprocess/validation.rs create mode 100644 typegraph/node/sdk/src/tg_manage.ts create mode 100644 typegraph/python/typegraph/graph/shared_types.py create mode 100644 typegraph/python/typegraph/graph/tg_manage.py diff --git a/.gitignore b/.gitignore index 2a2f16c925..2b40558223 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ dev-tools/*.vsix typegate/workers typegate/codegen typegate/tests/prisma-migrations +typegate/tests/e2e/cli/prisma-migrations typegate/tests/importers/copy/ .env typegate/native/bindings.json diff --git a/CHANGELOG.md b/CHANGELOG.md index ddbbedde03..3524270e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,21 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -## [v0.3.6](https://github.com/metatypedev/metatype/releases/tag/v0.3.6) - 2024-03-14 - -### Bug Fixes - -
- -(gate) `RandomRuntime` does not consider `enum`, `either`, `union` variants (#619) - - -add either, enum, struct and union type support in Random Runtime. +# Changelog + +All notable changes to this project will be documented in this file. + +## [v0.3.6](https://github.com/metatypedev/metatype/releases/tag/v0.3.6) - 2024-03-14 + +### Bug Fixes + +
+ +(gate) `RandomRuntime` does not consider `enum`, `either`, `union` variants (#619) + + +add either, enum, struct and union type support in Random Runtime. #### Motivation and context -generating random values for enums, either and union types was failing. +generating random values for enums, either and union types was failing. #### Migration notes @@ -25,14 +25,14 @@ _No Migrations Needed - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(python-wasi) Fix for vm not initialized after consecutive deploy (#617) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(python-wasi) Fix for vm not initialized after consecutive deploy (#617) + + Bug fix for typegate throwing `vm not initialized` after reload #### Motivation and context @@ -47,14 +47,14 @@ No Migrations Needed - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Apply from context (#616) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Apply from context (#616) + + Fix type validators for apply from context. #### Motivation and context @@ -69,18 +69,17 @@ _N/A_ - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Optimize typegraph size (#618) - - -- Hash all type data to compare them on the conversion phase in -typegraph/core: remove duplicate types from type final typegraph -(duplicate: same value for all the fields except for the "random" -name/title). +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Optimize typegraph size (#618) + + +- Hash all type data to compare them on the conversion phase in typegraph/core: + remove duplicate types from type final typegraph (duplicate: same value for + all the fields except for the "random" name/title). - Skip unreferenced types in `.apply` #### Motivation and context @@ -95,18 +94,17 @@ Typegraph is too big sometimes. - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Miscellaneous Tasks - -
- -Prepare release v0.3.6 (#626) - - +- [ ] End-user documentation is updated to reflect the change + +
+ +### Miscellaneous Tasks + +
+ +Prepare release v0.3.6 (#626) + + Prepare release v0.3.6 #### Motivation and context @@ -121,22 +119,20 @@ _N/A_ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -## [v0.3.5](https://github.com/metatypedev/metatype/releases/tag/v0.3.5) - 2024-03-05 - -### Bug Fixes - -
- -(cli) Fix for `meta-cli deploy` exit with code `0` on failure (#600) - - -fix the issue where `meta-cli deploy` command exits with code 0 on -failure. +- [ ] End-user documentation is updated to reflect the change + +
+ +## [v0.3.5](https://github.com/metatypedev/metatype/releases/tag/v0.3.5) - 2024-03-05 + +### Bug Fixes + +
+ +(cli) Fix for `meta-cli deploy` exit with code `0` on failure (#600) + + +fix the issue where `meta-cli deploy` command exits with code 0 on failure. #### Motivation and context @@ -150,43 +146,43 @@ No changes needed. - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(typegate,typegraph) Minor bugs (#596) - - -Just a few very minor bugs I'd encountered this week. Tests pending. - -#### Motivation and context - -Bugs. - -#### Migration notes - -_No changes required_ - -### Checklist - -- [ ] The change come with new or modified tests -- [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Show error message for unregistered type name (#594) - - -Check and throw the error for the `expose` function when called from the -Python SDK. +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(typegate,typegraph) Minor bugs (#596) + + +Just a few very minor bugs I'd encountered this week. Tests pending. + +#### Motivation and context + +Bugs. + +#### Migration notes + +_No changes required_ + +### Checklist + +- [ ] The change come with new or modified tests +- [ ] Hard-to-understand functions have explanatory comments +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Show error message for unregistered type name (#594) + + +Check and throw the error for the `expose` function when called from the Python +SDK. #### Motivation and context -We got a finalization failure when there are some unregistered type -referenced with `g.ref`. +We got a finalization failure when there are some unregistered type referenced +with `g.ref`. #### Migration notes @@ -196,20 +192,19 @@ _No changes needed._ - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [x] End-user documentation is updated to reflect the change - -
-
- -Remove injections from prisma output types (#597) - - +- [x] End-user documentation is updated to reflect the change + +
+
+ +Remove injections from prisma output types (#597) + + Remove injections from generated output types for prisma operations. #### Motivation and context -Generated types fail validations (_injection not allowed in output -types_). +Generated types fail validations (_injection not allowed in output types_). #### Migration notes @@ -219,25 +214,25 @@ _No changes needed_. - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Esm customizer for typegate deno ext (#606) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Esm customizer for typegate deno ext (#606) + + Enables v8 snapshots integration for `meta typegate` subcommand and the standalone typegate. Also bumps deno to 1.41.0. -#### Motivation and context - -
-
- -Re-enable macos-latest cli-compat test job (#608) - - +#### Motivation and context + +
+
+ +Re-enable macos-latest cli-compat test job (#608) + + Fixes and enables the broken job. #### Motivation and context @@ -246,31 +241,30 @@ Job was disabled earlier to mysterious breakages. #### Migration notes -__No changes required__ +**No changes required** ### Checklist - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Features - -
- -(deno/sdk) Native function embedding in typescript (#598) - - -Add support for function or lambda definition typescript sdk for -`deno.func` similarly to how `python.from_def` in python sdk works. +- [ ] End-user documentation is updated to reflect the change + +
+ +### Features + +
+ +(deno/sdk) Native function embedding in typescript (#598) + + +Add support for function or lambda definition typescript sdk for `deno.func` +similarly to how `python.from_def` in python sdk works. #### Motivation and context -Providing a string is a bit impractical and counter-intuitive espcially -when the sdk language matches with runtime's language. +Providing a string is a bit impractical and counter-intuitive espcially when the +sdk language matches with runtime's language. #### Migration notes @@ -282,14 +276,14 @@ No changes needed. - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change ---------- - -
-
- -(sdk) Testing framework integration 2 (#579) - - +--- + +
+
+ +(sdk) Testing framework integration 2 (#579) + + #### Motivation and context Continuation of #566 , focused on prisma runtime. @@ -304,14 +298,14 @@ N/A - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change ---------- - -
-
- -(sdk) From_random injection (#593) - - +--- + +
+
+ +(sdk) From_random injection (#593) + + -This change includes changes in StringFormats(added some string -formats), logic to provide random values for type nodes and tests to -validate the changes. -The changes are mostly in the typegraph sdk. + +This change includes changes in StringFormats(added some string formats), logic +to provide random values for type nodes and tests to validate the changes. The +changes are mostly in the typegraph sdk. #### Motivation and context -This feature enables the user to inject random values for a field(**Type -Node**) when defining a **Typegraph**. + +This feature enables the user to inject random values for a field(**Type Node**) +when defining a **Typegraph**. #### Migration notes + _No changes needed_. @@ -343,79 +339,75 @@ _No changes needed_. - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Remove obsolete restrictions on prisma (#592) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Remove obsolete restrictions on prisma (#592) + + +#### Motivation and context + +Since v5, where on unique queries exposes all the fields, not just unique +fields. + +
+
+ +Parameter transformation (#587) + + +Enable parameter transformation with the `.apply()` method. It has more or less +the same logic as `.reduce()` with the ability to flatten the input type. + #### Motivation and context -Since v5, where on unique queries exposes all the fields, not just -unique fields. - -
-
- -Parameter transformation (#587) - - -Enable parameter transformation with the `.apply()` method. -It has more or less the same logic as `.reduce()` with the ability to -flatten the input type. - - -#### Motivation and context - -This feature enables simpler APIs (input types) on top of runtimes -(e.g.: prisma). - -#### Migration notes - -_No changes needed_. - -### Checklist - -- [x] The change come with new or modified tests -- [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Nested context query (#595) - - BREAKING: Nested context query (#595) - - -- Revert context flattening -- Enable jsonpath-like key to access nested object fields or array items -on the context. - -#### Migration notes - -If you access the context directly in your application (through the -token), access to nested fields shall be updated. -E.g. the expression `context["profile.id"]` have to turned to -`context.profile.id`. - -### Checklist - -- [x] The change come with new or modified tests -- [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Miscellaneous Tasks - -
- -(release) Bump 0.3.5 (#613) - - +This feature enables simpler APIs (input types) on top of runtimes (e.g.: +prisma). + +#### Migration notes + +_No changes needed_. + +### Checklist + +- [x] The change come with new or modified tests +- [x] Hard-to-understand functions have explanatory comments +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Nested context query (#595) + - BREAKING: Nested context query (#595) + + +- Revert context flattening +- Enable jsonpath-like key to access nested object fields or array items on the + context. + +#### Migration notes + +If you access the context directly in your application (through the token), +access to nested fields shall be updated. E.g. the expression +`context["profile.id"]` have to turned to `context.profile.id`. + +### Checklist + +- [x] The change come with new or modified tests +- [x] Hard-to-understand functions have explanatory comments +- [ ] End-user documentation is updated to reflect the change + +
+ +### Miscellaneous Tasks + +
+ +(release) Bump 0.3.5 (#613) + + Ready for release of v0.3.5 #### Motivation and context @@ -430,22 +422,21 @@ _No changes required__. - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Refactor - -
- -(sdk) Move post-processing functions to the typegate (#586) - - +- [ ] End-user documentation is updated to reflect the change + +
+ +### Refactor + +
+ +(sdk) Move post-processing functions to the typegate (#586) + + #### Motivation and context -Depends on #579 -Compiled `wasm` bin size is too large, goal is to reduce it to ~3MB. +Depends on #579 Compiled `wasm` bin size is too large, goal is to reduce it to +~3MB. #### Migration notes @@ -457,40 +448,37 @@ N/A - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change ---------- - -
-
- -Make fat `meta-cli` the default (#607) - - BREAKING: make fat `meta-cli` the default (#607) - - -Switch the default `meta-cli` release to the fat version (the one that -includes the `typegate` subcommand). - -#### Motivation and context - -
- - -## [v0.3.4](https://github.com/metatypedev/metatype/releases/tag/v0.3.4) - 2024-02-10 - -### Bug Fixes - -
- -(ci) `upload-artifact@v4` migration, `cross` compilation for meta + typegate (#571) - - -The recent update to `upload-artifact@v4` has some breaking changes as -described -[here](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md). -This PR addresses them. It also fixes the cross-compilation issues with -the `meta-cli` job in the release workflow. +--- + +
+
+ +Make fat `meta-cli` the default (#607) + - BREAKING: make fat `meta-cli` the default (#607) + + +Switch the default `meta-cli` release to the fat version (the one that includes +the `typegate` subcommand). #### Motivation and context +
+ +## [v0.3.4](https://github.com/metatypedev/metatype/releases/tag/v0.3.4) - 2024-02-10 + +### Bug Fixes + +
+ +(ci) `upload-artifact@v4` migration, `cross` compilation for meta + typegate (#571) + + +The recent update to `upload-artifact@v4` has some breaking changes as described +[here](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md). +This PR addresses them. It also fixes the cross-compilation issues with the +`meta-cli` job in the release workflow. + +#### Motivation and context [Issue](https://github.com/metatypedev/metatype/actions/runs/7719983991/job/21044171984) in release workflow. @@ -503,20 +491,19 @@ _No changes required._ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(ci) Minor typo in `release.yml/docker` (#576) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(ci) Minor typo in `release.yml/docker` (#576) + + Small typo blocking the job that pushes the images to ghcr.io. #### Motivation and context -[Broken -run.](https://github.com/metatypedev/metatype/actions/runs/7748712325/job/21132659221) +[Broken run.](https://github.com/metatypedev/metatype/actions/runs/7748712325/job/21132659221) #### Migration notes @@ -526,14 +513,14 @@ _No changes required._ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(ci) Missing ts modules from `typegate` image (#577) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(ci) Missing ts modules from `typegate` image (#577) + + Adds a check step to the `typegate`'s `Dockerfile` and converts the `.dockerignore` to be a whitelist. @@ -549,28 +536,26 @@ _No changes required_ - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(typegate) Fix `tmp` dir issue, bump to 0.3.4 (#583) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(typegate) Fix `tmp` dir issue, bump to 0.3.4 (#583) + + - Fixes an issue with the prisma migration code being unable to properly -`mktmpd` when running in the `typegate` images. -- Removes `cross` usage for all but the `aarch64-unknown-linux-gnu` -target in the `meta-cli` release jobs. Deno doesn't like being cross -compiled, doesn't like being built by the cross toolchain in general -(even for the native target). The consequence of all this is that the -`aarch64-unknown-linux-gnu` target will temporarily lack the `full` -version builds. + `mktmpd` when running in the `typegate` images. +- Removes `cross` usage for all but the `aarch64-unknown-linux-gnu` target in + the `meta-cli` release jobs. Deno doesn't like being cross compiled, doesn't + like being built by the cross toolchain in general (even for the native + target). The consequence of all this is that the `aarch64-unknown-linux-gnu` + target will temporarily lack the `full` version builds. - This also bumps the version of the 0.3.4 to get the fix out. #### Motivation and context -The main `TMP_DIR` was not created properly in the `typegate` -`Dockerfile`. +The main `TMP_DIR` was not created properly in the `typegate` `Dockerfile`. #### Migration notes @@ -580,42 +565,41 @@ _No changes required_ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Remove unallowed fields (#569) - - -Skip fields with policies in `findListQueries`. - -#### Motivation and context - -Console. - -#### Migration notes - -_N/A_ - -### Checklist - -- [x] The change come with new or modified tests -- [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Hotfix typo in `release.yml` (#580) - - -Yes, another one lol. This removes the `target` param from the release -builder which will default to the last stage of the Dockerfile, the -`epoint` stage. I elected to remove the parameter rather than replacing -the value in order to remove one more place future changes will have to -consider. (convention better than configuration the saying goes (i -think)). +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Remove unallowed fields (#569) + + +Skip fields with policies in `findListQueries`. + +#### Motivation and context + +Console. + +#### Migration notes + +_N/A_ + +### Checklist + +- [x] The change come with new or modified tests +- [x] Hard-to-understand functions have explanatory comments +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Hotfix typo in `release.yml` (#580) + + +Yes, another one lol. This removes the `target` param from the release builder +which will default to the last stage of the Dockerfile, the `epoint` stage. I +elected to remove the parameter rather than replacing the value in order to +remove one more place future changes will have to consider. (convention better +than configuration the saying goes (i think)). #### Motivation and context @@ -630,18 +614,17 @@ _No changes required_ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Documentation - -
- -(website) Cleanup (#521) - - +- [ ] End-user documentation is updated to reflect the change + +
+ +### Documentation + +
+ +(website) Cleanup (#521) + + - -- Change the publisher name to **metatypedev** to match the account name -on Azure Devops. -- Add dev-tools projects to `dev/lock.yml` for automatic versioning. - -#### Motivation and context - -* -[Failure](https://github.com/metatypedev/metatype/actions/runs/7522189733/job/20473888302) -to publish the extension. -* Non-matching version. - -#### Migration notes - -_Blank_ - -### Checklist - -- [ ] ~The change come with new or modified tests~ _(N/A)_ -- [ ] ~Hard-to-understand functions have explanatory comments~ _(N/A)_ -- [ ] ~End-user documentation is updated to reflect the change~ _(N/A)_ - -
- - -### Documentation - -
- -(website) Move typegraphs in separate folder + add ts version (#552) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(vscode-extension) Fix publisher name and version (#553) + + + + +- Change the publisher name to **metatypedev** to match the account name on + Azure Devops. +- Add dev-tools projects to `dev/lock.yml` for automatic versioning. + +#### Motivation and context + +- + +[Failure](https://github.com/metatypedev/metatype/actions/runs/7522189733/job/20473888302) +to publish the extension. + +- Non-matching version. + +#### Migration notes + +_Blank_ + +### Checklist + +- [ ] ~~The change come with new or modified tests~~ _(N/A)_ +- [ ] ~~Hard-to-understand functions have explanatory comments~~ _(N/A)_ +- [ ] ~~End-user documentation is updated to reflect the change~~ _(N/A)_ + +
+ +### Documentation + +
+ +(website) Move typegraphs in separate folder + add ts version (#552) + + #### Motivation and context Better organization + typescript examples. @@ -975,18 +956,17 @@ N/A - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [x] End-user documentation is updated to reflect the change - -
- - -### Features - -
- -(node) Node fontend missing features (#557) - - +- [x] End-user documentation is updated to reflect the change + +
+ +### Features + +
+ +(node) Node fontend missing features (#557) + + #### Motivation and context Easier translation from python to typescript typegraph. @@ -999,15 +979,16 @@ N/A - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(prisma) Add support multi-field ids and id on struct (#556) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(prisma) Add support multi-field ids and id on struct (#556) + + Adds support for more advanced id fields and unique constraints: + - Multi-field id - Id on struct (foreign key) - Multi-field unique constraints @@ -1037,7 +1018,6 @@ project = t.struct( ).rename("Project") ``` - #### Migration notes _No migration needed._ @@ -1046,16 +1026,15 @@ _No migration needed._ - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(typegate) Oauth2 token validation endpoint (#567) - - -Create an oauth2 token validation endpoint: `/:tgName/auth/validate`. +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(typegate) Oauth2 token validation endpoint (#567) + +Create an oauth2 token validation endpoint: `/:tgName/auth/validate`. #### Motivation and context @@ -1069,17 +1048,17 @@ Create an oauth2 token validation endpoint: `/:tgName/auth/validate`. - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(typegate-rt) Extend typegate runtime (#561) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(typegate-rt) Extend typegate runtime (#561) + + Extend the typegate runtime with the following queries: -- `findListQueries`: find all the queries that returns a list of -`t.struct`. + +- `findListQueries`: find all the queries that returns a list of `t.struct`. #### Motivation and context @@ -1093,26 +1072,27 @@ _N/A_ - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(vscode-ext) Logo, README, display name, description (#554) - - -- Added a better display name and description -- Added logo and README - -
-
- -Flattened context (#555) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(vscode-ext) Logo, README, display name, description (#554) + + +- Added a better display name and description +- Added logo and README + +
+
+ +Flattened context (#555) + + Flatten profile fields in the context. So instead of + ```js { provider: 'github', @@ -1126,6 +1106,7 @@ So instead of ``` we would have: + ```js { provider: 'github', @@ -1140,8 +1121,8 @@ we would have: #### Motivation and context -It was impossible to get the nested id into a `from_context` injection. -Now we can inject `.from_context("profile.id")`. +It was impossible to get the nested id into a `from_context` injection. Now we +can inject `.from_context("profile.id")`. #### Migration notes @@ -1151,18 +1132,17 @@ Now we can inject `.from_context("profile.id")`. - [ ] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -### Refactor - -
- -(ci) `workflow_dispatch` for release wflow (#546) - - +- [ ] End-user documentation is updated to reflect the change + +
+ +### Refactor + +
+ +(ci) `workflow_dispatch` for release wflow (#546) + + - Manual trigger for release wflow - Adds missing ghjk step for `vscode-extension` release job @@ -1178,20 +1158,19 @@ Doesn't affect end users. - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
- - -## [v0.3.2](https://github.com/metatypedev/metatype/releases/tag/v0.3.2) - 2024-01-12 - -### Bug Fixes - -
- -(ci) Release changelog generation (#542) - - +- [ ] End-user documentation is updated to reflect the change + +
+ +## [v0.3.2](https://github.com/metatypedev/metatype/releases/tag/v0.3.2) - 2024-01-12 + +### Bug Fixes + +
+ +(ci) Release changelog generation (#542) + + #### Describe your change Configures the `checkout` action step in the workflow that generates the @@ -1199,9 +1178,9 @@ workflow to clone the full git history. #### Motivation and context -The updates to the release workflow that introduce [git -cliff](https://git-cliff.org/) based changelogs (back in #487) don't -appear to be in effect. +The updates to the release workflow that introduce +[git cliff](https://git-cliff.org/) based changelogs (back in #487) don't appear +to be in effect. #### Migration notes @@ -1211,14 +1190,14 @@ No end user changes required. - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -(website) Fix docusaurus warnings (#526) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +(website) Fix docusaurus warnings (#526) + + ### Describe your change Fix docusaurus warnings on the website @@ -1236,14 +1215,14 @@ Solves - [ ] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments -- [x] End-user documentation is updated to reflect the change - -
-
- -Fix stage iteration (#540) - - +- [x] End-user documentation is updated to reflect the change + +
+
+ +Fix stage iteration (#540) + + - -### Describe your change - -Enable custom profiler for the std (predefined) Oauth2 providers: -- Default profiler -- No profiler -- Extended default profiler -- Custom profiler - -### Motivation and context - -We may want for example to add the Github login in the profile in -addition to the id. - -### Migration notes - -_No migration needed._ - -### Checklist - -- [ ] The change come with new or modified tests -- [ ] Hard-to-understand functions have explanatory comments -- [ ] End-user documentation is updated to reflect the change - -
-
- -Limited parallel loads (#537) - - +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Customizable oauth2 profiler (#538) + + + + +### Describe your change + +Enable custom profiler for the std (predefined) Oauth2 providers: + +- Default profiler +- No profiler +- Extended default profiler +- Custom profiler + +### Motivation and context + +We may want for example to add the Github login in the profile in addition to +the id. + +### Migration notes + +_No migration needed._ + +### Checklist + +- [ ] The change come with new or modified tests +- [ ] Hard-to-understand functions have explanatory comments +- [ ] End-user documentation is updated to reflect the change + +
+
+ +Limited parallel loads (#537) + + ### Migration notes @@ -1722,28 +1695,25 @@ Bug. - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change ---------- - -
-
- -Git cliff - - - - -
- - -## [v0.3.0](https://github.com/metatypedev/metatype/releases/tag/v0.3.0) - 2023-12-08 - -### Bug Fixes - -
- -(gate) Pushing a typegraph must not timeout (#511) - - +--- + +
+
+ +Git cliff + + +
+ +## [v0.3.0](https://github.com/metatypedev/metatype/releases/tag/v0.3.0) - 2023-12-08 + +### Bug Fixes + +
+ +(gate) Pushing a typegraph must not timeout (#511) + +