Releases: metatypedev/metatype
v0.3.6
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.
Migration notes
_No Migrations 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
(python-wasi) Fix for vm not initialized after consecutive deploy (#617)
Bug fix for typegate throwing vm not initialized
after reload
Motivation and context
Bug fix
Migration notes
No Migrations 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
Apply from context (#616)
Fix type validators for apply from context.
Motivation and context
Bug.
Migration notes
N/A
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
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
Typegraph is too big sometimes.
Migration notes
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
Miscellaneous Tasks
Prepare release v0.3.6 (#626)
Prepare release v0.3.6
Motivation and context
N/A
Migration notes
N/A
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
v0.3.5
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
bug fix
Migration notes
No changes 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
(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
.
Migration notes
No changes 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
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).
Migration notes
No changes 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
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)
Fixes and enables the broken job.
Motivation and context
Job was disabled earlier to mysterious breakages.
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
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.
Migration notes
No changes 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
(sdk) Testing framework integration 2 (#579)
Motivation and context
Continuation of #566 , focused on prisma runtime.
Migration notes
N/A
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
(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.
Motivation and context
This feature enables the user to inject random values for a field(Type
Node) when defining a Typegraph.
Migration notes
No changes 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
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
This feature enables simpler APIs (input types) on top of runtimes
(e.g.: prisma).
Migration notes
No changes 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
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
- 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
(release) Bump 0.3.5 (#613)
Ready for release of v0.3.5
Motivation and context
Required by console.
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
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.
Migration notes
N/A
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
v0.3.4
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.
This PR addresses them. It also fixes the cross-compilation issues with
the meta-cli
job in the release workflow.
Motivation and context
Issue
in release workflow.
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
(ci) Minor typo in `release.yml/docker` (#576)
Small typo blocking the job that pushes the images to ghcr.io.
Motivation and context
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
(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.
Motivation and context
The image for 0.3.3 has some files missing.
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
(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 thetypegate
images. - Removes
cross
usage for all but theaarch64-unknown-linux-gnu
target in themeta-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 thefull
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
.
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
Remove unallowed fields (#569)
Skip fields with policies in findListQueries
.
Motivation and context
Console.
Migration notes
N/A
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
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
The typegate
images currently have the wrong target and thus the wrong
entrypoint
command.
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
Documentation
(website) Cleanup (#521)
Describe your change
This mainly shuffles around the existing docs for better structure.
Still a lot to be done. The following pages are also empty as I lack the
info regarding their topics:
- Architecture
- Query engine
Super open to feedback. Bring up any points that you think should be
mentioned on each page and I'll add them.
Getting started guide for the vscode extension (#578)
Motivation and context
Documentation is missing.
Migration notes
No changes 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
Features
(sdk) Testing framework integration (#566)
Motivation and context
Enable deploying directly from the typegraph instead of always relying
on meta-cli.
Migration notes
N/A
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
v0.3.3
v0.3.3 - 2024-01-31
Bug Fixes
(ci) Bug in `typegraph` release job (#545)
Motivation and context
jco
output path is wrong.
Migration notes
N/A
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
(ci) Typo in release.yml (#548)
Fix small typo. Surprised act
didn't catch this, it must evaluate
expressions lazily.
(ci) Force/skip push to registries on manual release (#549)
What it says on the tin can. Also fixes a typo in the vscode-extension
job.
Motivation and context
Manual re-release breaks otherwise as seen
here.
(ci) Typos in release.yml (#550)
Oof, I can't believe I missed these. The publish steps are hard to test
locally with act
so ig they require extra scrutiny.
Motivation and context
Bug on manual dispatch of releasae
wflow.
(ci) Mismatch in location of `$AZURE_DEVOPS_TOKEN` (#551)
Another minor issue with the release workflow.
Motivation and context
Failure in release run
here.
(ci,release) Hack for broken arm64 builds, bump deno to 1.40.1, bump to 0.3.3 (#565)
This provides a temporary fix for the broken build on arm64. The issue's
related to wasm-opt
builds not being availaible for install by
ghjk/cargo-binstall. This PR uses cargo install
directly instead when
in the dockerfile.
It also:
- bumps metatype version to 0.3.3 to ready the next release
- bumps the deno version to 1.40.1 (which comes with some changes)
Motivation and context
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
(cli) Bad conditionals in loader detection (#559) - BREAKING: bad conditionals in loader detection (#559)
- Fix bug in js typegraph loader detection.
- FIx bug where the cwd for loader was overridden in
loader_cmd
despite being set inget_loader_cmd
. - Update to latest ghjk
- Refresh
setup
task inwhiz.yaml
Motivation and context
The old conditionals were faulty.
Migration notes
node
andbun
loaders are now run with thecwd
set to the
directory of the typegraph as opposed to themetatype.yml
file. This
should resolve settings to the nearestpackage.json
despite location.
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
(cli, typegate) Explicitly import DenoRuntime.import modules from path (#564)
When using the dynamic import
function, if you provide it a raw path
like /foo/bar/baz
and deno detects the current module's loaded from a
remote host, it'll convert it to a http url. Reasonable behavior but it
turned out to be the cause of #560.
This pr fixes this issue along with:
- Puts contents of
main.ts
in a try/catch block for better error
logging. - Fixes minor permission bugs with the bundled runtime.
Motivation and context
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
(oauth2-profiler) Fix OAuth2 profiler params (#562)
Pass the appropriate request URL and headers to the profiler resolver.
Motivation and context
It used the provider url instead of the (typegate) request URL, causing
internal queries to fail.
Migration notes
N/A
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
(template/node) Update sdk version to 0.3.2 + add `deno.static` (#558)
Motivation and context
Sync template examples with latest 0.3.2.
Added missing deno.static
and func.rate(...)
on node.
Migration notes
N/A
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
(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
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.
Migration notes
N/A
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
(node) Node fontend missing features (#557)
Motivation and context
Easier translation from python to typescript typegraph.
Migration notes
N/A
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
(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
- Unique constraint on struct (foreign key)
Motivation and context
Support these kind of construct:
user = t.struct(
{
"authProvider": t.string().from_context("provider"),
"profileId": t.string().from_context("profile.id"),
# ...
},
config={"id": ["authProvider", "profileId"]},
).rename("User")
project = t.struct(
{
"id": t.uuid(as_id=True, config=["auto"]),
"owner": g.ref("Account"),
"name": t.string(min=3, pattern="^[A-Za-z_-]$"),
},
config={"unique": [["owner", "name"]]}
).rename("Project")
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
(typegate) Oauth2 token validation endpoint (#567)
Create an oauth2 token validation endpoint: /:tgName/auth/validate
.
Motivation and context
Migration notes
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
(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
.
Motivation and context
Console.
Migration notes
N/A
Checklist
- The change come with new or m...
v0.3.2
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
workflow to clone the full git history.
Motivation and context
The updates to the release workflow that introduce git
cliff based changelogs (back in #487) don't
appear to be in effect.
Migration notes
No end user 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
(website) Fix docusaurus warnings (#526)
Describe your change
Fix docusaurus warnings on the website
Motivation and context
Solves
MET-307
Migration notes
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
Fix stage iteration (#540)
Describe your change
- Fix the
iterChildStages
function. It does not yield accurate values
in some edge cases. - Update the testing framework to enable planning without executing on
theGraphQLQuery
object.
Motivation and context
Sibling stages can be falsely registered as children, for example with
the following stages:
getUser.id
getUser.identity
getUser.ideas
Migration notes
No migration needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments (N/A)
- End-user documentation is updated to reflect the change (N/A)
Features
(cli) Interactive deployment for prisma (#527)
Describe your change
Make the CLI interactive for migration options to development and
production databases.
Motivation and context
Migration notes
This creates some breaking changes if you use the CLI in a
non-interactive way.
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
(gate) Redis-less mode (#528)
Describe your change
Fallback to MemoryRegister
and NoLimiter
if typegate is unable to
connect to Redis.
Motivation and context
Enable Redis-Less mode.
Migration notes
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
(lsp) Simple diagnostics (#496)
Describe your change
Adds a simple LSP implementation for diagnostics.
Motivation and context
Better DX, catch potential errors while editing the typegraph module.
Migration notes
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
(prisma) Connect/create many relation (#522)
Describe your change
- Add missing
create: [ ... ]
andconnect: [ ... ]
Motivation and context
Solves
MET-304
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
(python_wasi) Vm docking (#520)
Describe your change
- Bump all WasmEdge dependencies to latest version
- Replace
wasmedge_sdk_bindgen
withVmDock
Motivation and context
wasmedge_sdk_bindgen
is deprecated, VmDock
replaces it entirely.
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
(sdk/node) Move js deno to node (#539)
Describe your change
Change deno frontend to pure node
Motivation and context
Easier integration.
Migration notes
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
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)
Describe your change
Limit the number of parallel loads.
The default max is the number of CPU cores, but it can be set with the
option --max-parallel-loads=N
.
Motivation and context
When we have a high number of typegraphs, the loader processes exhaust
the CPU load.
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
Miscellaneous Tasks
(release) Bump 0.3.2 (#543)
Bump the version of all metatype libs to 0.3.2.
Motivation and context
About to tag the next version.
Migration notes
Change their manifests to point at the new version.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to refl...
v0.3.1
v0.3.0
What's Changed
- chore: prepare release 0.2.5-0+dev by @github-actions in #469
- refactor: sdk dx by @afmika in #470
- feat(prisma/migrations): Default value on new column by @Natoandro in #465
- chore(deps): Bump the deps group with 2 updates by @dependabot in #478
- chore(deps-dev): Bump the deps group with 1 update by @dependabot in #472
- feat:
mt_deno
by @Yohe-Am in #466 - refactor: replace
deno_bindgen
ffi with v8Extension
ffi by @Yohe-Am in #481 - refactor: three binaries by @Yohe-Am in #483
- fix(tests): Use temporary directories for test git repositories by @Natoandro in #485
- feat: docs update + project structure by @zifeo in #487
- fix(xtask): add support for end of flags and typechecking by @Yohe-Am in #493
- refactor(typegraph/core): Remove wrapper types by @Natoandro in #489
- test: Move cli e2e test to typegate/tests/e2e by @Natoandro in #492
- fix: small fixes by @afmika in #486
- test: Fix tests by @Natoandro in #507
- feat(cli): Actor model by @Natoandro in #471
- fix: Remove
meta prisma
subcommand by @Natoandro in #490 - fix: typed result and similar by @afmika in #509
- fix(gate): pushing a typegraph must not timeout by @afmika in #511
- fix: Fix default argument computation for objects by @Natoandro in #510
- feat(cli): nodejs loader by @Yohe-Am in #515
- feat(cli): meta undeploy subcommand by @Natoandro in #508
- feat(sdk,gate): node information by path by @afmika in #498
- fix: Revert deno to 1.38.1 by @Natoandro in #516
Full Changelog: v0.2.4...v0.3.0
v0.2.4
What's Changed
New features 🎉
- chore: prepare release 0.2.4-0+dev by @github-actions in #458
- fix: Fix lock.yml by @Natoandro in #459
- feat: Pre-registered public policy by @Natoandro in #461
- fix: Fix doc typegraphs deployment by @Natoandro in #462
- fix(sdk): reduce union/either variant if required in apply syntax by @afmika in #463
- fix: Set metatype version to v0.2.4 by @Natoandro in #467
Full Changelog: v0.2.3...v0.2.4
v0.2.3
What's Changed
New features 🎉
- chore: prepare release 0.2.3-0+dev by @github-actions in #446
- feat(gate,sdk): update auth interface, better oauth2 by @afmika in #447
- fix(gate): explicit null on query arg by @afmika in #453
- feat: Remove injected fields from generated types for prisma operations by @Natoandro in #448
- chore: Upgrade wasm-opt by @Natoandro in #456
Full Changelog: v0.2.2...v0.2.3
v0.2.2
What's Changed
New features 🎉
- fix(gate): script reload while gate is running by @afmika in #441
- feat: stability fixes by @zifeo in #442
- feat(sdk): change rest queries interface by @afmika in #444
- feat: wasm + change effect none to read by @zifeo in #443
Change required
effects.none()
has been renamed into effects.read()
and a new shortcut is available for effect fx
instead of effects
.
Full Changelog: v0.2.1...v0.2.2