From 3f43eb3b0f3f008fc70a6e00b7d484e987283178 Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Fri, 29 Mar 2024 05:02:40 +0300 Subject: [PATCH] feat(metagen): metagen mdk rust (#624) Implements the general framework for metagen including a generator for rust based wasm mat functions modules. #### Motivation and context MET-420 #### Migration notes __No breaking changes__ ### Checklist - [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 --- .ghjk/.gitignore | 2 +- .ghjk/deno.lock | 171 +- .ghjk/lock.json | 2509 ++++++++----------- .github/workflows/publish-website.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 4 +- .pre-commit-config.yaml | 4 +- Cargo.lock | 539 ++-- Cargo.toml | 13 + dev/Dockerfile | 2 +- dev/cross.Dockerfile | 2 +- dev/lock.yml | 2 +- ghjk.ts | 14 +- libs/common/Cargo.toml | 11 +- libs/common/src/graphql.rs | 24 +- libs/common/src/node.rs | 40 +- libs/common/src/typegraph/runtimes/mod.rs | 22 + libs/deno/Cargo.toml | 4 +- libs/metagen/Cargo.toml | 23 + libs/metagen/src/config.rs | 34 + libs/metagen/src/lib.rs | 148 ++ libs/metagen/src/mdk/mdk.wit | 42 + libs/metagen/src/mdk/mod.rs | 59 + libs/metagen/src/mdk_rust/mod.rs | 206 ++ libs/metagen/src/mdk_rust/static/Cargo.toml | 14 + libs/metagen/src/mdk_rust/static/mod.rs | 37 + libs/metagen/src/mdk_rust/stubs.rs | 155 ++ libs/metagen/src/mdk_rust/types.rs | 685 +++++ libs/metagen/src/mdk_rust/utils.rs | 52 + libs/metagen/src/tests/fixtures.rs | 100 + libs/metagen/src/tests/mod.rs | 118 + libs/metagen/src/utils.rs | 22 + libs/metagen/tests/mat_rust/Cargo.toml | 14 + libs/metagen/tests/mat_rust/lib.rs | 9 + libs/metagen/tests/package.json | 10 + libs/metagen/tests/tg.ts | 37 + libs/typescript/Cargo.toml | 2 +- libs/xtask/Cargo.toml | 6 +- meta-cli/Cargo.toml | 14 +- rust-toolchain.toml | 2 +- typegate/engine/Cargo.toml | 14 +- typegate/standalone/Cargo.toml | 2 +- typegraph/core/Cargo.toml | 14 +- whiz.yaml | 2 +- 44 files changed, 3411 insertions(+), 1777 deletions(-) create mode 100644 libs/metagen/Cargo.toml create mode 100644 libs/metagen/src/config.rs create mode 100644 libs/metagen/src/lib.rs create mode 100644 libs/metagen/src/mdk/mdk.wit create mode 100644 libs/metagen/src/mdk/mod.rs create mode 100644 libs/metagen/src/mdk_rust/mod.rs create mode 100644 libs/metagen/src/mdk_rust/static/Cargo.toml create mode 100644 libs/metagen/src/mdk_rust/static/mod.rs create mode 100644 libs/metagen/src/mdk_rust/stubs.rs create mode 100644 libs/metagen/src/mdk_rust/types.rs create mode 100644 libs/metagen/src/mdk_rust/utils.rs create mode 100644 libs/metagen/src/tests/fixtures.rs create mode 100644 libs/metagen/src/tests/mod.rs create mode 100644 libs/metagen/src/utils.rs create mode 100644 libs/metagen/tests/mat_rust/Cargo.toml create mode 100644 libs/metagen/tests/mat_rust/lib.rs create mode 100644 libs/metagen/tests/package.json create mode 100644 libs/metagen/tests/tg.ts diff --git a/.ghjk/.gitignore b/.ghjk/.gitignore index 996b9f8c22..abf95c1618 100644 --- a/.ghjk/.gitignore +++ b/.ghjk/.gitignore @@ -1,2 +1,2 @@ envs -hash.json +hash.json \ No newline at end of file diff --git a/.ghjk/deno.lock b/.ghjk/deno.lock index 36372d8826..2932b4e27d 100644 --- a/.ghjk/deno.lock +++ b/.ghjk/deno.lock @@ -1,8 +1,8 @@ { "version": "3", "redirects": { - "https://raw.github.com/metatypedev/ghjk/f380522/mod.ts": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/mod.ts", - "https://raw.github.com/metatypedev/ghjk/f380522/ports/mod.ts": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/mod.ts" + "https://raw.github.com/metatypedev/ghjk/423d38/mod.ts": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/mod.ts", + "https://raw.github.com/metatypedev/ghjk/423d38/ports/mod.ts": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/mod.ts" }, "remote": { "https://deno.land/std@0.116.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58", @@ -23,27 +23,6 @@ "https://deno.land/std@0.120.0/crypto/mod.ts": "5760510eaa0b250f78cce81ce92d83cf8c40e9bb3c3efeedd4ef1a5bb0801ef4", "https://deno.land/std@0.120.0/encoding/ascii85.ts": "b42b041e9c668afa356dd07ccf69a6b3ee49b9ae080fdf3b03f0ac3981f4d1e6", "https://deno.land/std@0.120.0/encoding/base64.ts": "0b58bd6477214838bf711eef43eac21e47ba9e5c81b2ce185fe25d9ecab3ebb3", - "https://deno.land/std@0.129.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", - "https://deno.land/std@0.129.0/archive/tar.ts": "35ea1baddec7988cc4034765a2cee7613bc8074bd40940d3f5e98f63070a716a", - "https://deno.land/std@0.129.0/async/deferred.ts": "bc18e28108252c9f67dfca2bbc4587c3cbf3aeb6e155f8c864ca8ecff992b98a", - "https://deno.land/std@0.129.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", - "https://deno.land/std@0.129.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", - "https://deno.land/std@0.129.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", - "https://deno.land/std@0.129.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", - "https://deno.land/std@0.129.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", - "https://deno.land/std@0.129.0/io/files.ts": "d199ef64e918a256320ba8d8d44ae91de87c9077df8f8d6cca013f1b9fbbe285", - "https://deno.land/std@0.129.0/io/mod.ts": "1a4e8d19d42745fb2ff68d6ffa801657a4a15713bf7e7173df2da4737f5c5450", - "https://deno.land/std@0.129.0/io/readers.ts": "679471f3b9929b54393c9cd75b6bd178b4bc6d9aab5c0f1f9538f862cf4746fe", - "https://deno.land/std@0.129.0/io/streams.ts": "988a19155b52161f0035ce539e2f1d12edbc4c389fa7633da832a64e6edbe1a0", - "https://deno.land/std@0.129.0/io/util.ts": "078da53bba767bec0d45f7da44411f6dbf269e51ef7fcfea5e3714e04681c674", - "https://deno.land/std@0.129.0/io/writers.ts": "5db9995d2afc7ed391c88c6b441457df6fad6a0b09653e54c1dcd0387ab947fd", - "https://deno.land/std@0.129.0/streams/buffer.ts": "ee47194022d47fa23d4749b8afbadc83c237c4595467a9bddb322af0dd205815", - "https://deno.land/std@0.129.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", - "https://deno.land/std@0.129.0/streams/delimiter.ts": "75595345f14eb268d2f5edfd20600c9956f61499a36697baabef8043897bc50b", - "https://deno.land/std@0.129.0/streams/merge.ts": "89faf7dcda7e010f1e01dfc555d609c66d9fb2c834b7aa457a63cc70a25c3817", - "https://deno.land/std@0.129.0/streams/mod.ts": "5f47811c2e983518cc0c82f323924b6a9bb1f5bf948cd6d498ff6aed77ada51c", - "https://deno.land/std@0.129.0/testing/_diff.ts": "9d849cd6877694152e01775b2d93f9d6b7aef7e24bfe3bfafc4d7a1ac8e9f392", - "https://deno.land/std@0.129.0/testing/asserts.ts": "0a95d9e8076dd3e7f0eeb605a67c148078b4b11f4abcd5eef115b0361b0736a2", "https://deno.land/std@0.196.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", "https://deno.land/std@0.196.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", "https://deno.land/std@0.196.0/console/_data.json": "cf2cc9d039a192b3adbfe64627167c7e6212704c888c25c769fc8f1709e1e1b8", @@ -246,6 +225,8 @@ "https://deno.land/std@0.205.0/url/join.ts": "fbc3488c641c38832f0c900fcf99cb970164d8e32b84f1427581bb83cf35efeb", "https://deno.land/std@0.205.0/url/mod.ts": "d4e4db2f85a4a1613d824367b750f36bbd1c0ff791daae2eb74795d292c722bb", "https://deno.land/std@0.205.0/url/normalize.ts": "5c5803452521a36faec1a91bdb665e1cbdf7ce22bc0482388ad79f229b74cd45", + "https://deno.land/std@0.213.0/archive/_common.ts": "85edd5cdd4324833f613c1bc055f8e2f935cc9229c6b3044421268d9959997ef", + "https://deno.land/std@0.213.0/archive/untar.ts": "7677c136f2188cd8c33363ccaaee6e77d4ca656cca3e2093d08de8f294d4353d", "https://deno.land/std@0.213.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", "https://deno.land/std@0.213.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8", "https://deno.land/std@0.213.0/bytes/concat.ts": "9cac3b4376afbef98ff03588eb3cf948e0d1eb6c27cfe81a7651ab6dd3adc54a", @@ -268,10 +249,31 @@ "https://deno.land/std@0.213.0/fs/mod.ts": "107f5afa4424c2d3ce2f7e9266173198da30302c69af662c720115fe504dc5ee", "https://deno.land/std@0.213.0/fs/move.ts": "39e0d7ccb88a566d20b949712020e766b15ef1ec19159573d11f949bd677909c", "https://deno.land/std@0.213.0/fs/walk.ts": "f04cc83ad3b27b5a5d078c831a01c7406069474bf280d5db015d937149a60128", + "https://deno.land/std@0.213.0/internal/warn_on_deprecated_api.ts": "0708590b803a3c4462bbd89ee8b9a1b3fe941a7679ee3cfc332227a69b5c36f1", + "https://deno.land/std@0.213.0/io/_common.ts": "36705cdb4dfcd338d6131bca1b16e48a4d5bf0d1dada6ce397268e88c17a5835", "https://deno.land/std@0.213.0/io/_constants.ts": "3c7ad4695832e6e4a32e35f218c70376b62bc78621ef069a4a0a3d55739f8856", "https://deno.land/std@0.213.0/io/buf_reader.ts": "ccbd43ace0a9eebbd5e1b4765724b79da79d1e28b90c2b08537b99192da4a1f7", + "https://deno.land/std@0.213.0/io/buf_writer.ts": "bf68b9c74b1bccf51b9960c54db5eec60e7e3d922c7c62781b0d3971770021ba", "https://deno.land/std@0.213.0/io/buffer.ts": "79182995c8340ece2fa8763a8da86d282c507e854921d0a4c2ba7425c63609ef", + "https://deno.land/std@0.213.0/io/copy.ts": "63c6a4acf71fb1e89f5e47a7b3b2972f9d2c56dd645560975ead72db7eb23f61", + "https://deno.land/std@0.213.0/io/copy_n.ts": "e4a169b8965b69e6a05175d06bf14565caa91266143ec895e54e95b6cdb27cf2", + "https://deno.land/std@0.213.0/io/limited_reader.ts": "2b3e6c2d134bbbabbc918584db5fd2f8b21091843357f75af0d9f262cb5c94c1", + "https://deno.land/std@0.213.0/io/mod.ts": "571384032c5f60530542a28f2e8b0e73e47e87eca77056ba7e2363f4d4a4573a", + "https://deno.land/std@0.213.0/io/multi_reader.ts": "ca8a7813208a3393dfaed75894d955fe58a38c21b880e69839a4e0547eadbf61", "https://deno.land/std@0.213.0/io/read_all.ts": "876c1cb20adea15349c72afc86cecd3573335845ae778967aefb5e55fe5a8a4a", + "https://deno.land/std@0.213.0/io/read_delim.ts": "fb0884d97adc398877c6f59e1d1450be12e078790f52845fae7876dc119bb8f6", + "https://deno.land/std@0.213.0/io/read_int.ts": "6ada4e0eec5044982df530e4de804e32ae757a2c318b57eba622d893841ffe2a", + "https://deno.land/std@0.213.0/io/read_lines.ts": "34555eaa25269f6cfb9a842a03daedc9eae4f8295c8f933bd2b1639274ce89e3", + "https://deno.land/std@0.213.0/io/read_long.ts": "199cba44526464f8499e1f3d96008d513bcadc8e5665356a9b84425cac6b16ad", + "https://deno.land/std@0.213.0/io/read_range.ts": "a0c930ea61fdc3ea5520be4df34a7927fe8a2d6da9b04bfaa7b9588ef2e1a718", + "https://deno.land/std@0.213.0/io/read_short.ts": "73777709ad41b6faeff3638c275a329cc820c1082f4dad07909f48875a35a71d", + "https://deno.land/std@0.213.0/io/read_string_delim.ts": "8c604ceea5c3c7ab244583570b467ce194238ace6d49b1d47f25d4f75de86d59", + "https://deno.land/std@0.213.0/io/slice_long_to_bytes.ts": "9769174a8f3b4449f1e1af1a79f78e58ef84d0aaf2f457e1fdc31a01f92439b7", + "https://deno.land/std@0.213.0/io/string_reader.ts": "b0176211e61e235a684abef722e7ecc7a6481238ba264f1a7b199b8a1d2a62f5", + "https://deno.land/std@0.213.0/io/string_writer.ts": "4fe4dcbdadff11c726bf79b0239e14fa9b1e8468a795b465622e4dbd6c1f819c", + "https://deno.land/std@0.213.0/io/to_readable_stream.ts": "ed03a44a1ec1cc55a85a857acf6cac472035298f6f3b6207ea209f93b4aefb39", + "https://deno.land/std@0.213.0/io/to_writable_stream.ts": "ef422e0425963c8a1e0481674e66c3023da50f0acbe5ef51ec9789efc3c1e2ed", + "https://deno.land/std@0.213.0/io/types.ts": "748bbb3ac96abda03594ef5a0db15ce5450dcc6c0d841c8906f8b10ac8d32c96", "https://deno.land/std@0.213.0/io/write_all.ts": "24aac2312bb21096ae3ae0b102b22c26164d3249dff96dbac130958aa736f038", "https://deno.land/std@0.213.0/log/base_handler.ts": "924b370558d561f4e728295ebcb392224e36061542c7ad2e5b48c8e29614c27f", "https://deno.land/std@0.213.0/log/console_handler.ts": "75653acd6932fb97c7121f63336b39de3f072e329874d66f05abcb2a7f514558", @@ -407,8 +409,32 @@ "https://deno.land/std@0.213.0/semver/test_comparator.ts": "85476901a71fe8a09520902d85e1c573ce60a353846f8bbf6667e9518686591b", "https://deno.land/std@0.213.0/semver/test_range.ts": "88de9dab0d61c82fd0861d50eabe72f0f27f29f3df4d50e83f36e09c1c3cd8a6", "https://deno.land/std@0.213.0/semver/types.ts": "c85eb042ba22c69d62194ea7e535c3c104d0e9af75316b6315379101b4a7ef66", + "https://deno.land/std@0.213.0/streams/_common.ts": "4f9f2958d853b9a456be033631dabb7519daa68ee4d02caf53e2ecbffaf5805f", + "https://deno.land/std@0.213.0/streams/buffer.ts": "71120cceddacab2eb47a2f2908c64e82e79ac089506649bd41412042fcc97773", + "https://deno.land/std@0.213.0/streams/byte_slice_stream.ts": "5bbdcadb118390affa9b3d0a0f73ef8e83754f59bb89df349add669dd9369713", + "https://deno.land/std@0.213.0/streams/copy.ts": "442d1d647ce7daf350dd989797dd2eea51ec8ad3b3a6851fcdaf7ef44a387c71", + "https://deno.land/std@0.213.0/streams/delimiter_stream.ts": "45271f9db844e8e501a6df75b946cd2a5e01663de0e9ccf26b92996983e0cdbe", + "https://deno.land/std@0.213.0/streams/early_zip_readable_streams.ts": "21f5cf6dd36381c6a50c31a7727b5bd219f6382bbb7a413418595c3e466c4d14", + "https://deno.land/std@0.213.0/streams/iterate_reader.ts": "bd79a18de211449e5140e8f705e195c3e0e79020d752a64cd0a1d4b829b14633", + "https://deno.land/std@0.213.0/streams/limited_bytes_transform_stream.ts": "b22a45a337374e863c4eb1867ec6b8ad3e68620a6c52fe837746060ea610e6f1", + "https://deno.land/std@0.213.0/streams/limited_transform_stream.ts": "4c47da5ca38a30fa9f33b0f1a61d4548e7f52a9a58c294b0f430f680e44cc543", + "https://deno.land/std@0.213.0/streams/merge_readable_streams.ts": "9c541012e130d6e36086b6b8c197078a6053f5446367e33f233b71858a2c03cc", + "https://deno.land/std@0.213.0/streams/mod.ts": "cbe5466def4eb5e44a628df7be4700f7e2f88ac8b7d82cf3d769cfef5233aca4", + "https://deno.land/std@0.213.0/streams/read_all.ts": "b39b7d56b3ef9c0f78bbde82244ab3663b4adc1dee1be6ec97c0117f033c884c", + "https://deno.land/std@0.213.0/streams/readable_stream_from_reader.ts": "4289a63836f73901441c1879f2be76eea2a983920f4b10a4a9b8a6d8c29ece56", + "https://deno.land/std@0.213.0/streams/reader_from_iterable.ts": "cf7785e518beaaba1dfb3ff4ae854bb76499bbc1f013910af6402ec7643bf769", "https://deno.land/std@0.213.0/streams/reader_from_stream_reader.ts": "f981cf94a42133e5c6ace8c3b500565750806c4fc9802262ee63746abc528b0d", + "https://deno.land/std@0.213.0/streams/text_delimiter_stream.ts": "ef0d7898cea4a9fff850173ed9f3d2cf9e42ba858d8175bd89fe851c8dfa6a6e", + "https://deno.land/std@0.213.0/streams/text_line_stream.ts": "21f33d3922e019ec1a1676474beb543929cb564ec99b69cd2654e029e0f45bd5", + "https://deno.land/std@0.213.0/streams/to_array_buffer.ts": "1a9c07c4a396ce557ab205c44415815ab13b614fed94a12f62b80f8e650c726d", + "https://deno.land/std@0.213.0/streams/to_blob.ts": "bf5daaae50fa8f57e0c8bfd7474ebac16ac09e130e3d01ef2947ae5153912b4a", + "https://deno.land/std@0.213.0/streams/to_json.ts": "b6a908d0da7cd30956e5fbbfa7460747e50b8f307d1041282ed6fe9070d579ee", + "https://deno.land/std@0.213.0/streams/to_text.ts": "6f93593bdfc2cea5cca39755ea5caf0d4092580c0a713dfe04a1e85c60df331f", + "https://deno.land/std@0.213.0/streams/to_transform_stream.ts": "4c4836455ef89bab9ece55975ee3a819f07d3d8b0e43101ec7f4ed033c8a2b61", + "https://deno.land/std@0.213.0/streams/writable_stream_from_writer.ts": "62f2712d3a7bebd981fca8bd5140192c37450f9c4aa94283f7ca833e46bc7485", + "https://deno.land/std@0.213.0/streams/write_all.ts": "3170620e750c1eaf43ac9e216669f55df762e2dc827d8b8a920b4f64a803c362", "https://deno.land/std@0.213.0/streams/writer_from_stream_writer.ts": "b0e39ef607dfdc5abdfb627edf61a9672809463e2bb022afcbaf0cd006c40feb", + "https://deno.land/std@0.213.0/streams/zip_readable_streams.ts": "53eb10d7557539b489bd858907aab6dd28247f074b3446573801de3150cb932e", "https://deno.land/std@0.213.0/url/_strip.ts": "928fe9af16d7c5bf24816d1e90d84bfe702f3e059f9d63509b5a37087e947800", "https://deno.land/std@0.213.0/url/basename.ts": "a2e6ef35d44da3764551cbc61cdd39004c778aaedc7a6c2559e571f018c42daa", "https://deno.land/std@0.213.0/url/dirname.ts": "0915864aac7d2d0413c90dff7841b18b29c83ed102fa340e760af1fb2c0ad26c", @@ -416,6 +442,11 @@ "https://deno.land/std@0.213.0/url/join.ts": "00c7e9088cafaa24963ce4081119e58b3afe2c58f033701383f359ea02620dd2", "https://deno.land/std@0.213.0/url/mod.ts": "e2621f6a0db6fdbe7fbbd240064095bb203014657e5e1ab81db1c44d80dce6c9", "https://deno.land/std@0.213.0/url/normalize.ts": "6328c75df0fab300f74bc4a1c255062a0db882240e15ab646606d0009e7e40d7", + "https://deno.land/std@0.76.0/encoding/base64.ts": "b1d8f99b778981548457ec74bc6273ad785ffd6f61b2233bd5b30925345b565d", + "https://deno.land/std@0.76.0/encoding/hex.ts": "07a03ba41c96060a4ed4ba272e50b9e23f3c5b3839f4b069cdebc24d57434386", + "https://deno.land/std@0.76.0/hash/_wasm/hash.ts": "005f64c4d9343ecbc91e0da9ae5e800f146c20930ad829bbb872c5c06bd89c5f", + "https://deno.land/std@0.76.0/hash/_wasm/wasm.js": "5ac48aa0c3931d7f31dba628be5ab0aa4e786354197eb4d7d0583f9b50be1397", + "https://deno.land/std@0.76.0/hash/mod.ts": "e764a6a9ab2f5519a97f928e17cc13d984e3dd5c7f742ff9c1c8fb3114790f0c", "https://deno.land/x/cliffy@v1.0.0-rc.3/_utils/distance.ts": "02af166952c7c358ac83beae397aa2fbca4ad630aecfcd38d92edb1ea429f004", "https://deno.land/x/cliffy@v1.0.0-rc.3/command/_argument_types.ts": "ab269dacea2030f865a07c2a1e953ec437a64419a05bad1f1ddaab3f99752ead", "https://deno.land/x/cliffy@v1.0.0-rc.3/command/_errors.ts": "12d513ff401020287a344e0830e1297ce1c80c077ecb91e0ac5db44d04a6019c", @@ -561,6 +592,8 @@ "https://deno.land/x/json_hash@0.2.0/merkle.ts": "cf48004b45fdf0412afd48fea0ba8bb16bf78f717a66a5ff505f6400a88c08cf", "https://deno.land/x/json_hash@0.2.0/mod.ts": "b0fdd79a540d3fc6aa3e0a9a93fe6735b1a174d9ba2aba103e4a18ee4872acad", "https://deno.land/x/jszip@0.11.0/mod.ts": "5661ddc18e9ac9c07e3c5d2483bc912a7022b6af0d784bb7b05035973e640ba1", + "https://deno.land/x/object_hash@2.0.3/index.ts": "74b20a0065dc0066c60510174626db1d18e53ec966edb6f76fa33a67aa0c44e3", + "https://deno.land/x/object_hash@2.0.3/mod.ts": "648559bcafb54b930d4b6a283cc2eef20afa54de471371a97c2ccf8116941148", "https://deno.land/x/outdent@v0.8.0/src/index.ts": "6dc3df4108d5d6fedcdb974844d321037ca81eaaa16be6073235ff3268841a22", "https://deno.land/x/which@0.3.0/mod.ts": "3e10d07953c14e4ddc809742a3447cef14202cdfe9be6678a1dfc8769c4487e6", "https://deno.land/x/zod@v3.22.4/ZodError.ts": "4de18ff525e75a0315f2c12066b77b5c2ae18c7c15ef7df7e165d63536fdf2ea", @@ -578,23 +611,73 @@ "https://deno.land/x/zod@v3.22.4/types.ts": "724185522fafe43ee56a52333958764c8c8cd6ad4effa27b42651df873fc151e", "https://esm.sh/jszip@3.7.1": "f3872a819b015715edb05f81d973b5cd05d3d213d8eb28293ca5471fe7a71773", "https://esm.sh/v135/jszip@3.7.1/denonext/jszip.mjs": "d31d7f9e0de9c6db3c07ca93f7301b756273d4dccb41b600461978fc313504c9", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/deps/cli.ts": "4eacc555cf80686b487e7502db63a4cfbc2060a7b847d15b14cf1cc008a3b65c", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/deps/common.ts": "46d30782086ccc79e4a2633fe859723e7686ebc5adb4101e76c4bf2d6d2e94ff", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/deps/ports.ts": "3c60d1f7ab626ffdd81b37f4e83a780910936480da8fe24f4ccceaefa207d339", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/host/types.ts": "22c06b190172d08092717ad788ed04b050af58af0cf3f8c78b1511984101e9e4", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/mod.ts": "7a78701c53b9ba6ba16f4dc6a45ea316b5d6818fda520751088a87c09fd82464", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/mod.ts": "6aa0b765ce5684842ea531e026926836ffde7d2513e62457bffe9cb4ec7eb0df", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/ambient.ts": "25623410c535e2bfaf51fca1e582e7325a00a7690d5b5e763a12be9407f619cf", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/base.ts": "8ef8a8de372420bddcd63a1b363937f43d898059e99478a58621e8432bcd5891", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/db.ts": "3f4541d6874c434f2f869774a17fd41c3d86914ed190d412e2f63f564b58ce95", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/ghrel.ts": "e94d53507feedb8f8456aed91b034621951def4f83102490e18eb5a367f2ee64", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/mod.ts": "e38ad2d3599b6a5522da436b52e5945bb85cabba2aca27f633eae43e465b5794", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/std.ts": "985902519aafef6e8e6aecc8922e70abdea5b8e97d5439bf94338b93242fe11f", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/sync.ts": "46447c2c51c085193f567ddcd2451b14bb33ee2d761edeb91a6153e2ba642f42", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/types.ts": "b3967d9d75def187b3b55f2b0b1357c9cb69a70e475a9280fc66717193b8b43c", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/types/platform.ts": "0ecffeda71919293f9ffdb6c564ddea4f23bc85c4e640b08ea78225d34387fdc", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/ports/worker.ts": "25c01e3afddd97d48af89d9c97a9a5188e7db09fceb26a69eac4dabacd8ac4fc", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/std.ts": "ddb2c134c080bb0e762a78f2f2edd69536991cc4257bd29a6fc95944b2f105a9", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/tasks/deno.ts": "f988a4d1062364b99272087fa0c7d54e699944ead3790c5b83140577bda089de", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/tasks/exec.ts": "7a07f2cce79fe16e86f0b74df6d57f0160bac75a8c6d58a03f2883a5ecccddf0", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/tasks/mod.ts": "0edbe1ce953a44b6b0fd45aa9c9dd52c11b12053eef21307eac3b24b6db4745e", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/tasks/types.ts": "536495a17c7a917bdd1c316ecc98ce2947b4959a713f92a175d372196dcaafc0", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/modules/types.ts": "b44609942d7ad66c925c24485057c5b4b2ffcad20c0a94e14dc6af34cf9e8241", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/port.ts": "3ff65c42a3ba34cf811c0a952432a6505b32582fc12fbcaac1df4de266c6c156", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/act.ts": "a42bcd3e68ee476ccf30d99cdb7bc487cfad00d2e8fbf152e5776a32ccb29c76", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/asdf.ts": "70033efcd24b7d2b836e1bc36754597de69a4a1771174d3fbc2fdda6c45f5d0a", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/asdf_plugin_git.ts": "946e051218a7681bb9b6cc8834b8795aef2713ec6cb331e30440073e68161e2b", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargo-binstall.ts": "014ead93f46ed8463c4d620c958ed6b8df5f9e4c223b1d76ea8f27ac0575707b", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargobi.ts": "f3b84615cba7778d502d0ad4415ae1ff527337cd39801f25b5fae5804c05e5a2", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cpy_bs.ts": "3b81db32b0ad83669a8197c2f21b552f2ae77e1334136dcde769a5bd955db1a7", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/curl.ts": "58acd2a158187f448d940f45bfcd87c9b4884db127dcbaaaef27258bb4ebce92", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/earthly.ts": "7a3c8cae1631f670105a63bc41c47a49da6fc777968c0e9546c55d43fa418619", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/git.ts": "2e68f1fa5ba534ee32db204bcc357f987437dffe5d87c1a0a9c47850fa654419", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/infisical.ts": "7e60029b1f73fa72c38aa8d134f9bd62ba488c5e23b6cb7a568acb79a7027e04", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/meta_cli_ghrel.ts": "4831c77e0ae1802b1f39f684d2e0b14463f29bf982bd060d3a67f19955f1f0a0", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/mod.ts": "efa0fb9ad264a2f4d9b60b1ee2b21187faf5c2d577d6b6e5c84ac3c2ed9d55bc", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/mold.ts": "0b91d6a73992d175a0cae048aa4c0547ad68906cd2b18377121b86dd318ab650", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/node.ts": "f68993de9d67168f68c4c950c73273d26eeea0a617852f59676cc64577afa6c8", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/npmi.ts": "05e69eb75f5b0350b988fd06ddc7fd47707b4027482b254c1a6d5d5d1c90cc95", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/opentofu_ghrel.ts": "46ef05d30772d36b91d88a2dc1aae31e096c59ba6ecf82af08359996c1476725", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pipi.ts": "7feece45b8fe0a8cb0735cb07c3f935f36ca7dac654d58f8ead098932a9dd202", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pnpm.ts": "41e7f473a687123ae96ab14a3a04f67ef0c4b44eea6747448826dbdae00bfdde", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/protoc.ts": "ef93af8f37d8186c2220b6d2f760b5da10decaa3e9fe7768003ee319d32335bf", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/ruff.ts": "d9a4d22224bec2829a794a718d275580a6b2836f970ba6c5923ff485016931d0", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/rust.ts": "72ca49bc8419b556af836d464ba62829e7fd961a9c3f5305c258f8562e242885", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/rustup.ts": "a3918809c59fb4681222a22279b03ea0333de42114e12ede3b1cb11f7bd5f59a", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/tar.ts": "c3c43a99f8a9b1c160286cbc6240f59658d994856eeacaee479f645ece44d6c4", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/temporal_cli.ts": "d2a99eb0f47abf69d5f08d360a289311a92977f6e2898a836688b280b12f96dc", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/terraform.ts": "0da89441ae69647cc63306fe92fc36c35c34eb17620e785a64d069f20d25d647", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/unzip.ts": "c4559c627246f9c051571bbdff8c63ab15780ffd9e71656a9055488cc3bf32c3", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/wasmedge.ts": "ea80044069a75ca9ce938bc72b2504955fa3747949f680cdcd64ce172c723545", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/zstd.ts": "fb8334b7b43ef34ba60ad391460e2fabb62889f77eade7798c823b14842cea45", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/setup_logger.ts": "f8a206bda0595497d6f4718032d4a959000b32ef3346d4b507777eec6a169458", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/utils/logger.ts": "86fdf651123d00ea1081bf8001ed9039cd41a79940e6ebadb8484952ab390e73", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/utils/mod.ts": "1ee68d9390259c065144c10663f6e360d29aec36db2af38d02647e304eeeaedc", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/utils/unarchive.ts": "3f66464c445d67b003e792cdefea9c529e2fd527df19d3fc52000d91d43a65b2", + "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/utils/url.ts": "e1ada6fd30fc796b8918c88456ea1b5bbd87a07d0a0538b092b91fd2bb9b7623", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/deps/cli.ts": "4eacc555cf80686b487e7502db63a4cfbc2060a7b847d15b14cf1cc008a3b65c", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/deps/common.ts": "f98dc86acce3a8c369b1fbd96dc754e345c32caf125d4f3648aaa427f2200561", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/deps/ports.ts": "dcad4dada6a66297ebbda9828473a4a1da3a0ea9f1dd9b5a9b06afd9b10c7ddc", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/host/deno.ts": "330c62197c7af0a01d3ec96705367b789d538f3c820b730c63bb2820fabda7d7", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/host/mod.ts": "31000f8b6a839ba50dc5859b656e59a29bba00b3ef1e55ab3d5e20698499c03f", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/host/types.ts": "b9be5124f203f95407fe20bb03f45e2132d835f5edb1afeefaeb4345a72382e4", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/host/worker.ts": "88f75d038b3f4d5d78efbff2648099c1adeda4c5e48e36260ad8624bbb1fb6d0", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/main.ts": "8d6985e59db0b5baf67c9dc330bf8b25ad556341b9ef6088038e8ebb37ed75e5", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/mod.ts": "744f1ade57bbd3fb3cce8eef03665f0f9b971b0bdf3b2a97212e0e42e0be62e8", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/mod.ts": "ab81f133b219eff549b9873f9990ad480bb24257fd22e69208877dfb9b64dc06", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/ambient.ts": "25623410c535e2bfaf51fca1e582e7325a00a7690d5b5e763a12be9407f619cf", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/base.ts": "8ef8a8de372420bddcd63a1b363937f43d898059e99478a58621e8432bcd5891", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/cargo-binstall.ts": "2517f519e350120cdb5eaa56517eb53d09215219edb9e7b9c32b4328bed43b9e", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/db.ts": "3f4541d6874c434f2f869774a17fd41c3d86914ed190d412e2f63f564b58ce95", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/ghrel.ts": "e4762625cb081c58edb95ddf4915a0ced104e3045d9b5d2dd49dd033ae683e5d", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/mod.ts": "8360332b0eb9867e76ff7f249b4ba13c980f9c852432e729f5f5ee25290028b3", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/std.ts": "b9024fed56dd545483f0e01aa2858df3b8c58483dcc455713be29ef3d04c99f2", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/sync.ts": "c352db6ff158b06cd361bfdacf4e60bea0a6711e38a7f8046cb19d4544381516", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/types.ts": "d20230474a1df43022516f1cbd18999df59eff5ecc4dc4f0489ddbac4a1d5fea", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/ports/worker.ts": "eaac07a21d9cf43a1d59a3888931904cd751bd07f92a9fcca760ac2b66820df1", @@ -604,36 +687,8 @@ "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/tasks/mod.ts": "e2540631eb95ed0b4e33d1cdac45dd839ac68ed5d7fca0da50f6a0a41f60565b", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/tasks/types.ts": "ae12c354643f7f9948830d244c62cc1ea547270e175b5434ff29d8626f4867d9", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/modules/types.ts": "b44609942d7ad66c925c24485057c5b4b2ffcad20c0a94e14dc6af34cf9e8241", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/port.ts": "7dbc715c609d6615531aa5beab75ca28655a23bc3b49ef98f924777e47aca86a", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/act.ts": "a42bcd3e68ee476ccf30d99cdb7bc487cfad00d2e8fbf152e5776a32ccb29c76", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/asdf.ts": "70033efcd24b7d2b836e1bc36754597de69a4a1771174d3fbc2fdda6c45f5d0a", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/asdf_plugin_git.ts": "946e051218a7681bb9b6cc8834b8795aef2713ec6cb331e30440073e68161e2b", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cargo-binstall.ts": "014ead93f46ed8463c4d620c958ed6b8df5f9e4c223b1d76ea8f27ac0575707b", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cargo-insta.ts": "0e26927b515248f2ddc20a138449c4888de7b29097ac51bbc74e43ee22a965a6", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cpy_bs.ts": "3b81db32b0ad83669a8197c2f21b552f2ae77e1334136dcde769a5bd955db1a7", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/curl.ts": "58acd2a158187f448d940f45bfcd87c9b4884db127dcbaaaef27258bb4ebce92", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/earthly.ts": "7a3c8cae1631f670105a63bc41c47a49da6fc777968c0e9546c55d43fa418619", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/git.ts": "2e68f1fa5ba534ee32db204bcc357f987437dffe5d87c1a0a9c47850fa654419", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/infisical.ts": "7e60029b1f73fa72c38aa8d134f9bd62ba488c5e23b6cb7a568acb79a7027e04", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/mod.ts": "d1ed859f920bdbfeb85a77f6a8a1172d937a258b801e22c1ed9e9a7d2da269ff", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/mold.ts": "0b91d6a73992d175a0cae048aa4c0547ad68906cd2b18377121b86dd318ab650", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/node.ts": "f68993de9d67168f68c4c950c73273d26eeea0a617852f59676cc64577afa6c8", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/npmi.ts": "05e69eb75f5b0350b988fd06ddc7fd47707b4027482b254c1a6d5d5d1c90cc95", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pipi.ts": "7feece45b8fe0a8cb0735cb07c3f935f36ca7dac654d58f8ead098932a9dd202", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pnpm.ts": "41e7f473a687123ae96ab14a3a04f67ef0c4b44eea6747448826dbdae00bfdde", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/protoc.ts": "ef93af8f37d8186c2220b6d2f760b5da10decaa3e9fe7768003ee319d32335bf", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/ruff.ts": "eab7a5b723ff83ee29d9f91dcc4baf00d8bafc9471aeef6ba6b5f01d22e1cb9a", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/tar.ts": "c3c43a99f8a9b1c160286cbc6240f59658d994856eeacaee479f645ece44d6c4", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/terraform.ts": "c588d47790c37adabb8758d04bbfbd1780debd9259d6d1030c80907f14cf72be", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/unzip.ts": "c4559c627246f9c051571bbdff8c63ab15780ffd9e71656a9055488cc3bf32c3", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-opt.ts": "7b47195bcca52bdb3308db27d4f444a914b47be2d37e2dc5a668cfefb47278cd", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-tools.ts": "a4f8538ca9bc56f10b01f5c65452a319a76db2fb417cb0eda2d00b20997e27ab", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasmedge.ts": "ea80044069a75ca9ce938bc72b2504955fa3747949f680cdcd64ce172c723545", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/whiz.ts": "a1b4a2e5b923c5b6fe44eeef13abb2e8fc298ca44c29b182e389f97c9d3427fd", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/zstd.ts": "fb8334b7b43ef34ba60ad391460e2fabb62889f77eade7798c823b14842cea45", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/setup_logger.ts": "f8a206bda0595497d6f4718032d4a959000b32ef3346d4b507777eec6a169458", "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/utils/logger.ts": "ab00d943850332819ef1f7be3fedbb01f42d9168c4561d4f715bae20206a650a", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/utils/mod.ts": "9a184770058ced82bc35884e9a461487b0d1f5c4c497b4d0d2bbb4b85fb9e573", - "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/utils/unarchive.ts": "fe754f7b0147ad730a6e5d518479c9172a598ff0185e72e43cb9c808ee1e24d5" + "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/utils/mod.ts": "9a184770058ced82bc35884e9a461487b0d1f5c4c497b4d0d2bbb4b85fb9e573" } } diff --git a/.ghjk/lock.json b/.ghjk/lock.json index 5fa29adf49..0c512f696c 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -1,9 +1,6 @@ { "version": "0", - "platform": [ - "linux", - "x86_64" - ], + "platform": "x86_64-linux", "moduleEntries": { "ports": { "version": "0", @@ -24,49 +21,6 @@ "depConfigs": {}, "portRef": "tar_aa@0.1.0" }, - "1b51fcb17016f9514e8bbcfec4c5154711261e69203c3a89fac8914f55bfb4cf": { - "version": "v8.8.0", - "depConfigs": {}, - "portRef": "pnpm_ghrel@0.1.0" - }, - "bee3466d0efadb81e940abf5af5600fbf5c0fb8f3da091d0ef0f018edcf2cbff": { - "version": "1.0.53", - "depConfigs": { - "cargo_binstall_ghrel": { - "version": "v1.5.0", - "depConfigs": {}, - "portRef": "cargo_binstall_ghrel@0.1.0" - } - }, - "portRef": "wasm_tools_cbinst@0.1.0" - }, - "402fae54fb94ffdba9cd2617602c7b33c55002275f3c3bb588615b01ff0c3c26": { - "version": "v1.5.0", - "depConfigs": {}, - "portRef": "cargo_binstall_ghrel@0.1.0" - }, - "c131aa1d44cbef793ebbc9230c7b4b1527ff7737f09827db8f38ec5bbf81ea7d": { - "version": "0.116.0", - "depConfigs": { - "cargo_binstall_ghrel": { - "version": "v1.5.0", - "depConfigs": {}, - "portRef": "cargo_binstall_ghrel@0.1.0" - } - }, - "portRef": "wasm_opt_cbinst@0.1.0" - }, - "7949920b78ca2c84f31ff8021653b9ff4e271453b4b993d7246027385934ab98": { - "version": "1.33.0", - "depConfigs": { - "cargo_binstall_ghrel": { - "version": "v1.5.0", - "depConfigs": {}, - "portRef": "cargo_binstall_ghrel@0.1.0" - } - }, - "portRef": "cargo_insta_cbinst@0.1.0" - }, "5155b24a1a756a5b91108ba34188d8bc4f5d6744f5ac29454450d6275663df86": { "version": "v24.1", "depConfigs": {}, @@ -130,131 +84,166 @@ "portRef": "asdf_plugin_git@0.1.0", "pluginRepo": "https://github.com/asdf-community/asdf-cmake" }, - "cda344fa6703598428b27ecadd873e4a7eef27b3daec54bde60fd5ea946ad83e": { - "version": "0.12.1", + "402fae54fb94ffdba9cd2617602c7b33c55002275f3c3bb588615b01ff0c3c26": { + "version": "v1.6.4", + "depConfigs": {}, + "portRef": "cargo_binstall_ghrel@0.1.0" + }, + "f6c92b4425a3c13dfde7fe516efd376287e66cfa74aefd7b6a7a7bb0f3547a47": { + "version": "0.116.0", "depConfigs": { - "node_org": { - "version": "v21.5.0", + "cargo_binstall_ghrel": { + "version": "v1.6.4", + "depConfigs": {}, + "portRef": "cargo_binstall_ghrel@0.1.0" + }, + "rust_rustup": { + "version": "1.76.0", "depConfigs": { - "tar_aa": { - "version": "1.34", - "depConfigs": {}, - "portRef": "tar_aa@0.1.0" + "rustup_rustlang": { + "version": "1.27.0", + "depConfigs": { + "git_aa": { + "version": "2.40.1", + "depConfigs": {}, + "portRef": "git_aa@0.1.0" + } + }, + "portRef": "rustup_rustlang@0.1.0" } }, - "portRef": "node_org@0.1.0" + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" } }, - "portRef": "jco_npm@0.1.0" + "portRef": "cargobi_cratesio@0.1.0", + "crateName": "wasm-opt" }, - "77a0197285cae563176871bd72f2ea24504c195dc596f5c33d4c9cc95eda1fba": { - "version": "v21.5.0", + "4a077ef5a23a541cc6e372186951d640da541f7c4eba2613c2a1c427a5d95a5c": { + "version": "1.76.0", "depConfigs": { - "tar_aa": { - "version": "1.34", - "depConfigs": {}, - "portRef": "tar_aa@0.1.0" + "rustup_rustlang": { + "version": "1.27.0", + "depConfigs": { + "git_aa": { + "version": "2.40.1", + "depConfigs": {}, + "portRef": "git_aa@0.1.0" + } + }, + "portRef": "rustup_rustlang@0.1.0" } }, - "portRef": "node_org@0.1.0" + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" }, - "83443bd71fed2699b3245687aececa5b03834f11b1260dd5486045b7af35f471": { - "version": "v20.8.0", + "4b3f09c15ad572211f821a76c776adea93e3c4f686817fd64dad8a5c8356ddea": { + "version": "1.27.0", "depConfigs": { - "tar_aa": { - "version": "1.34", + "git_aa": { + "version": "2.40.1", "depConfigs": {}, - "portRef": "tar_aa@0.1.0" + "portRef": "git_aa@0.1.0" } }, - "portRef": "node_org@0.1.0" + "portRef": "rustup_rustlang@0.1.0" }, - "6d6bdaabeee201ce9b33f9c531e3d0ba24437297f49157e22c757d45c88b86e9": { - "version": "v2.4.0", + "57ec6be4a4ae1b646f1b5416a3887cb862ce03a137b2cbad6f687f805091b4ac": { + "version": "1.0.53", "depConfigs": { - "tar_aa": { - "version": "1.34", + "cargo_binstall_ghrel": { + "version": "v1.6.4", "depConfigs": {}, - "portRef": "tar_aa@0.1.0" + "portRef": "cargo_binstall_ghrel@0.1.0" + }, + "rust_rustup": { + "version": "1.76.0", + "depConfigs": { + "rustup_rustlang": { + "version": "1.27.0", + "depConfigs": { + "git_aa": { + "version": "2.40.1", + "depConfigs": {}, + "portRef": "git_aa@0.1.0" + } + }, + "portRef": "rustup_rustlang@0.1.0" + } + }, + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" } }, - "portRef": "mold_ghrel@0.1.0", - "replaceLd": false + "portRef": "cargobi_cratesio@0.1.0", + "crateName": "wasm-tools" }, - "e998f3459ee09f37bbaa9ccc452c5abb5e2552e90277f31d95a86113f7c18c35": { - "version": "1.7.0", + "bc2d1e952b74bac2fbbb3b49d4f0cfcefce55f92f372972992e5445d9ca6b0f2": { + "version": "1.33.0", "depConfigs": { - "cpy_bs_ghrel": { - "version": "3.12.1", + "cargo_binstall_ghrel": { + "version": "v1.6.4", + "depConfigs": {}, + "portRef": "cargo_binstall_ghrel@0.1.0" + }, + "rust_rustup": { + "version": "1.76.0", "depConfigs": { - "tar_aa": { - "version": "1.34", - "depConfigs": {}, - "portRef": "tar_aa@0.1.0" - }, - "zstd_aa": { - "version": "v1.5.5,", - "depConfigs": {}, - "portRef": "zstd_aa@0.1.0" + "rustup_rustlang": { + "version": "1.27.0", + "depConfigs": { + "git_aa": { + "version": "2.40.1", + "depConfigs": {}, + "portRef": "git_aa@0.1.0" + } + }, + "portRef": "rustup_rustlang@0.1.0" } }, - "portRef": "cpy_bs_ghrel@0.1.0" + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" } }, - "portRef": "pipi_pypi@0.1.0", - "packageName": "poetry" + "portRef": "cargobi_cratesio@0.1.0", + "crateName": "cargo-insta" }, - "84ecde630296f01e7cb8443c58d1596d668c357a0d9837c0a678b8a541ed0a39": { - "version": "3.12.1", + "83443bd71fed2699b3245687aececa5b03834f11b1260dd5486045b7af35f471": { + "version": "v20.8.0", "depConfigs": { "tar_aa": { "version": "1.34", "depConfigs": {}, "portRef": "tar_aa@0.1.0" - }, - "zstd_aa": { - "version": "v1.5.5,", - "depConfigs": {}, - "portRef": "zstd_aa@0.1.0" } }, - "portRef": "cpy_bs_ghrel@0.1.0" + "portRef": "node_org@0.1.0" }, - "4f16c72030e922711abf15474d30e3cb232b18144beb73322b297edecfcdb86f": { - "version": "v1.5.5,", + "f4760b34b6c9f9f96207cfb380deb77007a212a60bd10bdb3dc9d20b94c2785c": { + "version": "v8.15.2", "depConfigs": {}, - "portRef": "zstd_aa@0.1.0" + "portRef": "pnpm_ghrel@0.1.0" }, - "076a5b8ee3bdc68ebf20a696378458465042bb7dc1e49ac2dc98e5fa0dab3e25": { - "version": "3.6.0", + "ccbb2ac8f781def74efa6c813c6fdde39ccbcf2ff9f5fde36afa37107f4f58c4": { + "version": "1.0.0", "depConfigs": { - "cpy_bs_ghrel": { - "version": "3.12.1", + "node_org": { + "version": "v21.7.1", "depConfigs": { "tar_aa": { "version": "1.34", "depConfigs": {}, "portRef": "tar_aa@0.1.0" - }, - "zstd_aa": { - "version": "v1.5.5,", - "depConfigs": {}, - "portRef": "zstd_aa@0.1.0" } }, - "portRef": "cpy_bs_ghrel@0.1.0" + "portRef": "node_org@0.1.0" } }, - "portRef": "pipi_pypi@0.1.0", - "packageName": "pre-commit" - }, - "95dbc2b8c604a5996b88c5b1b4fb0c10b3e0d9cac68f57eb915b012c44288e93": { - "version": "v0.2.57", - "depConfigs": {}, - "portRef": "act_ghrel@0.1.0" + "portRef": "npmi_npm@0.1.0", + "packageName": "@bytecodealliance/jco" }, - "34ced839bcf88b2b7c09aa591ad94c8ed4f61e1840e0eceea0d6f96c24c42a3e": { - "version": "v0.5.0", + "77a0197285cae563176871bd72f2ea24504c195dc596f5c33d4c9cc95eda1fba": { + "version": "v21.7.1", "depConfigs": { "tar_aa": { "version": "1.34", @@ -262,31 +251,13 @@ "portRef": "tar_aa@0.1.0" } }, - "portRef": "whiz_ghrel@0.1.0" - }, - "ee88028bdec4e009320082eea2cdb000c14ec80ebc193c5d49e21f71eb54a88a": { - "version": "0.12.1", - "depConfigs": { - "node_org": { - "version": "v21.5.0", - "depConfigs": { - "tar_aa": { - "version": "1.34", - "depConfigs": {}, - "portRef": "tar_aa@0.1.0" - } - }, - "portRef": "node_org@0.1.0" - } - }, - "portRef": "npmi_npm@0.1.0", - "packageName": "@bytecodealliance/jco" + "portRef": "node_org@0.1.0" }, "23e2521c50a2a9ea95405def479e6fbcce0da681f6b97251070178c6cdbcb378": { "version": "10.0.1", "depConfigs": { "node_org": { - "version": "v21.5.0", + "version": "v21.7.1", "depConfigs": { "tar_aa": { "version": "1.34", @@ -300,24 +271,20 @@ "portRef": "npmi_npm@0.1.0", "packageName": "node-gyp" }, - "c6037cd6c9d0f07b7975f62b6770757c0d3a1e4fd1631380eff888c0a6a3b537": { - "version": "3.8.18", + "6d6bdaabeee201ce9b33f9c531e3d0ba24437297f49157e22c757d45c88b86e9": { + "version": "v2.4.0", "depConfigs": { "tar_aa": { "version": "1.34", "depConfigs": {}, "portRef": "tar_aa@0.1.0" - }, - "zstd_aa": { - "version": "v1.5.5,", - "depConfigs": {}, - "portRef": "zstd_aa@0.1.0" } }, - "portRef": "cpy_bs_ghrel@0.1.0" + "portRef": "mold_ghrel@0.1.0", + "replaceLd": false }, - "e5e9403382d82c523568a0f63a2973c850b4dd68253334ffdf66253268778f44": { - "version": "3.12.1", + "c6037cd6c9d0f07b7975f62b6770757c0d3a1e4fd1631380eff888c0a6a3b537": { + "version": "3.8.18", "depConfigs": { "tar_aa": { "version": "1.34", @@ -332,8 +299,36 @@ }, "portRef": "cpy_bs_ghrel@0.1.0" }, - "4f53e3033814c5d4fb1eaed2f33bcf1e4fe8489c0955a743f0478de3b5c9a888": { - "version": "3.8.18", + "4f16c72030e922711abf15474d30e3cb232b18144beb73322b297edecfcdb86f": { + "version": "v1.5.5,", + "depConfigs": {}, + "portRef": "zstd_aa@0.1.0" + }, + "e998f3459ee09f37bbaa9ccc452c5abb5e2552e90277f31d95a86113f7c18c35": { + "version": "1.7.0", + "depConfigs": { + "cpy_bs_ghrel": { + "version": "3.12.1", + "depConfigs": { + "tar_aa": { + "version": "1.34", + "depConfigs": {}, + "portRef": "tar_aa@0.1.0" + }, + "zstd_aa": { + "version": "v1.5.5,", + "depConfigs": {}, + "portRef": "zstd_aa@0.1.0" + } + }, + "portRef": "cpy_bs_ghrel@0.1.0" + } + }, + "portRef": "pipi_pypi@0.1.0", + "packageName": "poetry" + }, + "84ecde630296f01e7cb8443c58d1596d668c357a0d9837c0a678b8a541ed0a39": { + "version": "3.12.1", "depConfigs": { "tar_aa": { "version": "1.34", @@ -346,49 +341,65 @@ "portRef": "zstd_aa@0.1.0" } }, - "portRef": "cpy_bs_ghrel@0.1.0", - "releaseTag": "20231002" + "portRef": "cpy_bs_ghrel@0.1.0" }, - "f18f86e2e763848312dd0dc70b5088ea5b0f70f08a3566d0e2120100db7e9a90": { - "version": "0.14.2", + "076a5b8ee3bdc68ebf20a696378458465042bb7dc1e49ac2dc98e5fa0dab3e25": { + "version": "3.6.2", "depConfigs": { - "node_org": { - "version": "v21.5.0", + "cpy_bs_ghrel": { + "version": "3.12.1", "depConfigs": { "tar_aa": { "version": "1.34", "depConfigs": {}, "portRef": "tar_aa@0.1.0" + }, + "zstd_aa": { + "version": "v1.5.5,", + "depConfigs": {}, + "portRef": "zstd_aa@0.1.0" } }, - "portRef": "node_org@0.1.0" + "portRef": "cpy_bs_ghrel@0.1.0" } }, - "portRef": "npmi_npm@0.1.0", - "packageName": "@bytecodealliance/jco" + "portRef": "pipi_pypi@0.1.0", + "packageName": "pre-commit" }, - "ccbb2ac8f781def74efa6c813c6fdde39ccbcf2ff9f5fde36afa37107f4f58c4": { - "version": "1.0.0", + "95dbc2b8c604a5996b88c5b1b4fb0c10b3e0d9cac68f57eb915b012c44288e93": { + "version": "v0.2.60", + "depConfigs": {}, + "portRef": "act_ghrel@0.1.0" + }, + "b58186482a94cfde789509044a515b8e96ff91d5417f50a9cc80d51f9f5368e4": { + "version": "0.5.0", "depConfigs": { - "node_org": { - "version": "v21.5.0", + "cargo_binstall_ghrel": { + "version": "v1.6.4", + "depConfigs": {}, + "portRef": "cargo_binstall_ghrel@0.1.0" + }, + "rust_rustup": { + "version": "1.76.0", "depConfigs": { - "tar_aa": { - "version": "1.34", - "depConfigs": {}, - "portRef": "tar_aa@0.1.0" + "rustup_rustlang": { + "version": "1.27.0", + "depConfigs": { + "git_aa": { + "version": "2.40.1", + "depConfigs": {}, + "portRef": "git_aa@0.1.0" + } + }, + "portRef": "rustup_rustlang@0.1.0" } }, - "portRef": "node_org@0.1.0" + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" } }, - "portRef": "npmi_npm@0.1.0", - "packageName": "@bytecodealliance/jco" - }, - "f4760b34b6c9f9f96207cfb380deb77007a212a60bd10bdb3dc9d20b94c2785c": { - "version": "v8.15.2", - "depConfigs": {}, - "portRef": "pnpm_ghrel@0.1.0" + "portRef": "cargobi_cratesio@0.1.0", + "crateName": "whiz" } } }, @@ -402,1328 +413,878 @@ "id": "ports", "config": { "installs": [ - { - "version": "0.13.5", - "port": { - "ty": "denoWorker@v1", - "name": "wasmedge_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasmedge.ts" + "f6bff1af0a74df869b02c0c2cae46f6fd9c0b2b4", + "d4ca252ebf5bda1d22a1a8a796e7d934f9cece3a", + "c0203b644293bdb58cac21fba277ef58a175ad67", + "98e6699973c2da514713908660702cfbfd49e14c", + "5ba4e48fe13b264e586f7bc2ca68f4649144d96f", + "55cf0ca40c7c1e3af02695285123eb94588c6f8a", + "386645977375df0d8f7ada7da257fee2113a1ed4", + "7d01db0995f6550df87722b9dccabe567773c716", + "7acd42a090e2e926ba953e0fbe243e894eb238f5", + "7d44f1ebe86959a274b620da2bd1607c00163cec", + "ce6bed28a295088b33d4e6ce88d62648a59af020", + "3ea2b8e6963e2b962affcfd212d69a4539523a01", + "20228eb8492f451f04f75575265eb36cdf3fb996", + "d98e9ed00c90d17eb59fa424742732629d09fec8", + "4a54aa9e1dee2143e2a311fdfea3234dac1ac3b8", + "f8de703c8a74a55f9baf868c17140bc68863c92c", + "94ab252fbfe065fecef10c4f50967d140bc3ed4e" + ], + "allowedDeps": { + "tar_aa": "e0d1f160d2d7755765f6f01a27a0c33a02ff98d2", + "git_aa": "9d26d0d90f6ecdd69d0705a042b01a344aa626ee", + "curl_aa": "3c447f912abf18883bd05314f946740975ee0dd3", + "unzip_aa": "dfb0f5e74666817e6ab8cbceca0c9da271142bca", + "zstd_aa": "d9122eff1fe3ef56872e53dae725ff3ccb37472e", + "rustup_rustlang": "418aa5925aec03eb4638dfc72759464ef3dd38c4", + "rust_rustup": "0c8deb7bd953d091dd8f696d86b9b300d788659f", + "cargo_binstall_ghrel": "72fa44f8a6d38619b44766a0543f6cd470748898", + "pnpm_ghrel": "31911ce292a0b5b421d7054d529ca71383c1d981", + "asdf_plugin_git": "9d7c7a332f53efd8025697fb65c43d60e0a18a23", + "node_org": "45407ae83add7feb477b0f5e2ef1cb444cd0d21d", + "cpy_bs_ghrel": "e89f3b87c855a55a04ff487f0f6f06c0ee839dc0" + } + } + }, + { + "id": "tasks", + "config": { + "tasks": {} + } + } + ], + "globalEnv": { + "installs": { + "f6bff1af0a74df869b02c0c2cae46f6fd9c0b2b4": { + "version": "0.13.5", + "port": { + "ty": "denoWorker@v1", + "name": "wasmedge_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" } - }, - { - "version": "v24.1", - "port": { - "ty": "denoWorker@v1", - "name": "protoc_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/protoc.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/wasmedge.ts" + } + }, + "d4ca252ebf5bda1d22a1a8a796e7d934f9cece3a": { + "version": "v24.1", + "port": { + "ty": "denoWorker@v1", + "name": "protoc_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/protoc.ts" + } + }, + "c0203b644293bdb58cac21fba277ef58a175ad67": { + "version": "3.28.0-rc6", + "depConfigs": { + "asdf_plugin_git": { + "pluginRepo": "https://github.com/asdf-community/asdf-cmake", + "portRef": "asdf_plugin_git@0.1.0" + } + }, + "resolutionDepConfigs": { + "asdf_plugin_git": { + "pluginRepo": "https://github.com/asdf-community/asdf-cmake", + "portRef": "asdf_plugin_git@0.1.0" + } + }, + "port": { + "ty": "denoWorker@v1", + "name": "asdf", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin" + ], + "version": "0.1.0", + "deps": [ + { + "name": "curl_aa" + }, + { + "name": "git_aa" + }, + { + "name": "asdf_plugin_git" } - }, - { - "version": "3.28.0-rc6", - "depConfigs": { - "asdf_plugin_git": { - "pluginRepo": "https://github.com/asdf-community/asdf-cmake", - "portRef": "asdf_plugin_git@0.1.0" - } + ], + "resolutionDeps": [ + { + "name": "curl_aa" }, - "resolutionDepConfigs": { - "asdf_plugin_git": { - "pluginRepo": "https://github.com/asdf-community/asdf-cmake", - "portRef": "asdf_plugin_git@0.1.0" - } + { + "name": "git_aa" }, - "port": { - "ty": "denoWorker@v1", - "name": "asdf", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "curl_aa" - }, - { - "name": "git_aa" - }, - { - "name": "asdf_plugin_git" - } - ], - "resolutionDeps": [ - { - "name": "curl_aa" - }, - { - "name": "git_aa" - }, - { - "name": "asdf_plugin_git" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/asdf.ts" + { + "name": "asdf_plugin_git" + } + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/asdf.ts" + }, + "pluginRepo": "https://github.com/asdf-community/asdf-cmake", + "installType": "version" + }, + "98e6699973c2da514713908660702cfbfd49e14c": { + "port": { + "ty": "denoWorker@v1", + "name": "cargo_binstall_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargo-binstall.ts" + } + }, + "5ba4e48fe13b264e586f7bc2ca68f4649144d96f": { + "version": "0.116.0", + "depConfigs": { + "rust_rustup": { + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" + } + }, + "port": { + "ty": "denoWorker@v1", + "name": "cargobi_cratesio", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cargo_binstall_ghrel" }, - "pluginRepo": "https://github.com/asdf-community/asdf-cmake", - "installType": "version" - }, - { - "port": { - "ty": "denoWorker@v1", - "name": "cargo_binstall_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cargo-binstall.ts" + { + "name": "rust_rustup" } - }, - { - "version": "0.116.0", - "port": { - "ty": "denoWorker@v1", - "name": "wasm_opt_cbinst", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "cargo_binstall_ghrel" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-opt.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargobi.ts" + }, + "crateName": "wasm-opt" + }, + "55cf0ca40c7c1e3af02695285123eb94588c6f8a": { + "version": "1.0.53", + "depConfigs": { + "rust_rustup": { + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" + } + }, + "port": { + "ty": "denoWorker@v1", + "name": "cargobi_cratesio", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cargo_binstall_ghrel" + }, + { + "name": "rust_rustup" } - }, - { - "version": "1.0.53", - "port": { - "ty": "denoWorker@v1", - "name": "wasm_tools_cbinst", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "cargo_binstall_ghrel" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-tools.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargobi.ts" + }, + "crateName": "wasm-tools" + }, + "386645977375df0d8f7ada7da257fee2113a1ed4": { + "version": "1.33.0", + "depConfigs": { + "rust_rustup": { + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" + } + }, + "port": { + "ty": "denoWorker@v1", + "name": "cargobi_cratesio", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cargo_binstall_ghrel" + }, + { + "name": "rust_rustup" } - }, - { - "version": "1.33.0", - "port": { - "ty": "denoWorker@v1", - "name": "cargo_insta_cbinst", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "cargo_binstall_ghrel" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cargo-insta.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargobi.ts" + }, + "crateName": "cargo-insta" + }, + "7d01db0995f6550df87722b9dccabe567773c716": { + "version": "20.8.0", + "port": { + "ty": "denoWorker@v1", + "name": "node_org", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" } - }, - { - "version": "20.8.0", - "port": { - "ty": "denoWorker@v1", - "name": "node_org", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/node.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/node.ts" + } + }, + "7acd42a090e2e926ba953e0fbe243e894eb238f5": { + "version": "v8.15.2", + "port": { + "ty": "denoWorker@v1", + "name": "pnpm_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pnpm.ts" + } + }, + "7d44f1ebe86959a274b620da2bd1607c00163cec": { + "version": "1.0.0", + "port": { + "ty": "denoWorker@v1", + "name": "npmi_npm", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "node_org" } - }, - { - "version": "v8.15.2", - "port": { - "ty": "denoWorker@v1", - "name": "pnpm_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pnpm.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/npmi.ts" + }, + "packageName": "@bytecodealliance/jco" + }, + "ce6bed28a295088b33d4e6ce88d62648a59af020": { + "version": "10.0.1", + "port": { + "ty": "denoWorker@v1", + "name": "npmi_npm", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "node_org" } - }, - { - "version": "1.0.0", - "port": { - "ty": "denoWorker@v1", - "name": "npmi_npm", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "node_org" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/npmi.ts" - }, - "packageName": "@bytecodealliance/jco" - }, - { - "version": "10.0.1", - "port": { - "ty": "denoWorker@v1", - "name": "npmi_npm", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "node_org" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/npmi.ts" - }, - "packageName": "node-gyp" - }, - { - "version": "v2.4.0", - "port": { - "ty": "denoWorker@v1", - "name": "mold_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/mold.ts" - }, - "replaceLd": false - }, - { - "version": "3.8.18", - "port": { - "ty": "denoWorker@v1", - "name": "cpy_bs_ghrel", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - }, - { - "name": "zstd_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cpy_bs.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/npmi.ts" + }, + "packageName": "node-gyp" + }, + "3ea2b8e6963e2b962affcfd212d69a4539523a01": { + "version": "v2.4.0", + "port": { + "ty": "denoWorker@v1", + "name": "mold_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" } - }, - { - "version": "1.7.0", - "port": { - "ty": "denoWorker@v1", - "name": "pipi_pypi", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "cpy_bs_ghrel" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pipi.ts" - }, - "packageName": "poetry" - }, - { - "port": { - "ty": "denoWorker@v1", - "name": "pipi_pypi", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "cpy_bs_ghrel" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pipi.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/mold.ts" + }, + "replaceLd": false + }, + "20228eb8492f451f04f75575265eb36cdf3fb996": { + "version": "3.8.18", + "port": { + "ty": "denoWorker@v1", + "name": "cpy_bs_ghrel", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" }, - "packageName": "pre-commit" - }, - { - "port": { - "ty": "denoWorker@v1", - "name": "act_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/act.ts" - } - }, - { - "port": { - "ty": "denoWorker@v1", - "name": "whiz_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/whiz.ts" + { + "name": "zstd_aa" } - } - ], - "allowedDeps": { - "tar_aa": { - "manifest": { - "ty": "ambientAccess@v1", - "name": "tar_aa", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "execName": "tar", - "versionExtractFlag": "--version", - "versionExtractRegex": "(\\d+\\.\\d+)", - "versionExtractRegexFlags": "" - }, - "defaultInst": { - "portRef": "tar_aa@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cpy_bs.ts" + } + }, + "d98e9ed00c90d17eb59fa424742732629d09fec8": { + "version": "1.7.0", + "port": { + "ty": "denoWorker@v1", + "name": "pipi_pypi", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cpy_bs_ghrel" } - }, - "git_aa": { - "manifest": { - "ty": "ambientAccess@v1", - "name": "git_aa", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "execName": "git", - "versionExtractFlag": "--version", - "versionExtractRegex": "(\\d+\\.\\d+\\.\\d+)", - "versionExtractRegexFlags": "" - }, - "defaultInst": { - "portRef": "git_aa@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pipi.ts" + }, + "packageName": "poetry" + }, + "4a54aa9e1dee2143e2a311fdfea3234dac1ac3b8": { + "port": { + "ty": "denoWorker@v1", + "name": "pipi_pypi", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cpy_bs_ghrel" } - }, - "curl_aa": { - "manifest": { - "ty": "ambientAccess@v1", - "name": "curl_aa", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "freebsd", - "x86_64" - ], - [ - "freebsd", - "aarch64" - ], - [ - "netbsd", - "x86_64" - ], - [ - "netbsd", - "aarch64" - ], - [ - "aix", - "x86_64" - ], - [ - "aix", - "aarch64" - ], - [ - "solaris", - "x86_64" - ], - [ - "solaris", - "aarch64" - ], - [ - "illumos", - "x86_64" - ], - [ - "illumos", - "aarch64" - ] - ], - "version": "0.1.0", - "execName": "curl", - "versionExtractFlag": "--version", - "versionExtractRegex": "(\\d+\\.\\d+\\.\\d+)", - "versionExtractRegexFlags": "" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pipi.ts" + }, + "packageName": "pre-commit" + }, + "f8de703c8a74a55f9baf868c17140bc68863c92c": { + "port": { + "ty": "denoWorker@v1", + "name": "act_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/act.ts" + } + }, + "94ab252fbfe065fecef10c4f50967d140bc3ed4e": { + "depConfigs": { + "rust_rustup": { + "portRef": "rust_rustup@0.1.0", + "profile": "minimal" + } + }, + "port": { + "ty": "denoWorker@v1", + "name": "cargobi_cratesio", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "cargo_binstall_ghrel" }, - "defaultInst": { - "portRef": "curl_aa@0.1.0" + { + "name": "rust_rustup" } - }, - "unzip_aa": { - "manifest": { - "ty": "ambientAccess@v1", - "name": "unzip_aa", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "execName": "unzip", - "versionExtractFlag": "-v", - "versionExtractRegex": "(\\d+\\.\\d+)", - "versionExtractRegexFlags": "" - }, - "defaultInst": { - "portRef": "unzip_aa@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargobi.ts" + }, + "crateName": "whiz" + } + }, + "allowedPortDeps": { + "e0d1f160d2d7755765f6f01a27a0c33a02ff98d2": { + "manifest": { + "ty": "ambientAccess@v1", + "name": "tar_aa", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "execName": "tar", + "versionExtractFlag": "--version", + "versionExtractRegex": "(\\d+\\.\\d+)", + "versionExtractRegexFlags": "" + }, + "defaultInst": { + "portRef": "tar_aa@0.1.0" + } + }, + "9d26d0d90f6ecdd69d0705a042b01a344aa626ee": { + "manifest": { + "ty": "ambientAccess@v1", + "name": "git_aa", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "execName": "git", + "versionExtractFlag": "--version", + "versionExtractRegex": "(\\d+\\.\\d+\\.\\d+)", + "versionExtractRegexFlags": "" + }, + "defaultInst": { + "portRef": "git_aa@0.1.0" + } + }, + "3c447f912abf18883bd05314f946740975ee0dd3": { + "manifest": { + "ty": "ambientAccess@v1", + "name": "curl_aa", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "execName": "curl", + "versionExtractFlag": "--version", + "versionExtractRegex": "(\\d+\\.\\d+\\.\\d+)", + "versionExtractRegexFlags": "" + }, + "defaultInst": { + "portRef": "curl_aa@0.1.0" + } + }, + "dfb0f5e74666817e6ab8cbceca0c9da271142bca": { + "manifest": { + "ty": "ambientAccess@v1", + "name": "unzip_aa", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "execName": "unzip", + "versionExtractFlag": "-v", + "versionExtractRegex": "(\\d+\\.\\d+)", + "versionExtractRegexFlags": "" + }, + "defaultInst": { + "portRef": "unzip_aa@0.1.0" + } + }, + "d9122eff1fe3ef56872e53dae725ff3ccb37472e": { + "manifest": { + "ty": "ambientAccess@v1", + "name": "zstd_aa", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "execName": "zstd", + "versionExtractFlag": "--version", + "versionExtractRegex": "v(\\d+\\.\\d+\\.\\d+),", + "versionExtractRegexFlags": "" + }, + "defaultInst": { + "portRef": "zstd_aa@0.1.0" + } + }, + "418aa5925aec03eb4638dfc72759464ef3dd38c4": { + "manifest": { + "ty": "denoWorker@v1", + "name": "rustup_rustlang", + "platforms": [ + "x86_64-darwin", + "aarch64-darwin", + "x86_64-linux", + "aarch64-linux", + "x86_64-windows", + "x86_64-illumos", + "x86_64-freebsd", + "x86_64-netbsd" + ], + "version": "0.1.0", + "deps": [ + { + "name": "git_aa" } - }, - "zstd_aa": { - "manifest": { - "ty": "ambientAccess@v1", - "name": "zstd_aa", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "execName": "zstd", - "versionExtractFlag": "--version", - "versionExtractRegex": "v(\\d+\\.\\d+\\.\\d+),", - "versionExtractRegexFlags": "" - }, - "defaultInst": { - "portRef": "zstd_aa@0.1.0" + ], + "resolutionDeps": [ + { + "name": "git_aa" } - }, - "cargo_binstall_ghrel": { - "manifest": { - "ty": "denoWorker@v1", - "name": "cargo_binstall_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cargo-binstall.ts" - }, - "defaultInst": { - "portRef": "cargo_binstall_ghrel@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/rustup.ts" + }, + "defaultInst": { + "portRef": "rustup_rustlang@0.1.0" + } + }, + "0c8deb7bd953d091dd8f696d86b9b300d788659f": { + "manifest": { + "ty": "denoWorker@v1", + "name": "rust_rustup", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows", + "x86_64-freebsd", + "aarch64-freebsd", + "x86_64-netbsd", + "aarch64-netbsd", + "x86_64-aix", + "aarch64-aix", + "x86_64-solaris", + "aarch64-solaris", + "x86_64-illumos", + "aarch64-illumos", + "x86_64-android", + "aarch64-android" + ], + "version": "0.1.0", + "deps": [ + { + "name": "rustup_rustlang" } - }, - "pnpm_ghrel": { - "manifest": { - "ty": "denoWorker@v1", - "name": "pnpm_ghrel", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pnpm.ts" - }, - "defaultInst": { - "portRef": "pnpm_ghrel@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/rust.ts" + }, + "defaultInst": { + "portRef": "rust_rustup@0.1.0" + } + }, + "72fa44f8a6d38619b44766a0543f6cd470748898": { + "manifest": { + "ty": "denoWorker@v1", + "name": "cargo_binstall_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cargo-binstall.ts" + }, + "defaultInst": { + "portRef": "cargo_binstall_ghrel@0.1.0" + } + }, + "31911ce292a0b5b421d7054d529ca71383c1d981": { + "manifest": { + "ty": "denoWorker@v1", + "name": "pnpm_ghrel", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/pnpm.ts" + }, + "defaultInst": { + "portRef": "pnpm_ghrel@0.1.0" + } + }, + "9d7c7a332f53efd8025697fb65c43d60e0a18a23": { + "manifest": { + "ty": "denoWorker@v1", + "name": "asdf_plugin_git", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "deps": [ + { + "name": "git_aa" } - }, - "asdf_plugin_git": { - "manifest": { - "ty": "denoWorker@v1", - "name": "asdf_plugin_git", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "git_aa" - } - ], - "resolutionDeps": [ - { - "name": "git_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/asdf_plugin_git.ts" - }, - "defaultInst": { - "portRef": "asdf_plugin_git@0.1.0" + ], + "resolutionDeps": [ + { + "name": "git_aa" } - }, - "node_org": { - "manifest": { - "ty": "denoWorker@v1", - "name": "node_org", - "platforms": [ - [ - "linux", - "aarch64" - ], - [ - "linux", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "windows", - "aarch64" - ], - [ - "windows", - "x86_64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/node.ts" - }, - "defaultInst": { - "portRef": "node_org@0.1.0" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/asdf_plugin_git.ts" + }, + "defaultInst": { + "portRef": "asdf_plugin_git@0.1.0" + } + }, + "45407ae83add7feb477b0f5e2ef1cb444cd0d21d": { + "manifest": { + "ty": "denoWorker@v1", + "name": "node_org", + "platforms": [ + "aarch64-linux", + "x86_64-linux", + "aarch64-darwin", + "x86_64-darwin", + "aarch64-windows", + "x86_64-windows" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" } - }, - "cpy_bs_ghrel": { - "manifest": { - "ty": "denoWorker@v1", - "name": "cpy_bs_ghrel", - "platforms": [ - [ - "linux", - "x86_64" - ], - [ - "linux", - "aarch64" - ], - [ - "darwin", - "x86_64" - ], - [ - "darwin", - "aarch64" - ], - [ - "windows", - "x86_64" - ], - [ - "windows", - "aarch64" - ] - ], - "version": "0.1.0", - "deps": [ - { - "name": "tar_aa" - }, - { - "name": "zstd_aa" - } - ], - "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/cpy_bs.ts" + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/node.ts" + }, + "defaultInst": { + "portRef": "node_org@0.1.0" + } + }, + "e89f3b87c855a55a04ff487f0f6f06c0ee839dc0": { + "manifest": { + "ty": "denoWorker@v1", + "name": "cpy_bs_ghrel", + "platforms": [ + "x86_64-linux", + "aarch64-linux", + "x86_64-darwin", + "aarch64-darwin", + "x86_64-windows", + "aarch64-windows" + ], + "version": "0.1.0", + "deps": [ + { + "name": "tar_aa" }, - "defaultInst": { - "portRef": "cpy_bs_ghrel@0.1.0" + { + "name": "zstd_aa" } - } + ], + "moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/423d38/ports/cpy_bs.ts" + }, + "defaultInst": { + "portRef": "cpy_bs_ghrel@0.1.0" } } - }, - { - "id": "tasks", - "config": { - "tasks": {} - } } - ] + } } } diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 5961f2748b..3f5ae5b63b 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -4,7 +4,7 @@ on: - main env: - GHJK_VERSION: "f380522" + GHJK_VERSION: "423d38" jobs: changes: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7dbe7a53ca..219198a639 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ on: - v* env: - GHJK_VERSION: "f380522" + GHJK_VERSION: "423d38" DENO_VERSION: "1.41.0" REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/typegate diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ff9633bca6..93ff02003b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: - ready_for_review env: - GHJK_VERSION: "f380522" + GHJK_VERSION: "423d38" DENO_VERSION: "1.41.0" RUST_BACKTRACE: "full" RUST_LOG: "info,swc_ecma_codegen=off,tracing::span=off" @@ -334,7 +334,7 @@ jobs: cargo test --locked --package meta-cli # from old test-libs - cargo test --locked --exclude meta-cli --exclude typegate --exclude typegraph_engine --exclude typegraph_core --workspace + cargo test --locked --exclude meta-cli --exclude typegate --exclude typegraph_engine --exclude typegraph_core --exclude metagen_mdk_rust_static --workspace deno run -A dev/update.ts --cache-only || deno run -A dev/update.ts --cache-only cargo build -p meta-cli diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e25c79eea7..e6c16caf0e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -109,7 +109,7 @@ repos: - "--skip-license-insertion-comment=no-auto-license-header" types_or: - rust - files: ^(typegate|libs)/ + files: ^(typegate|libs!(/metagen/.*))/ - id: insert-license name: "License MPL-2.0 rust" args: @@ -119,7 +119,7 @@ repos: - "--skip-license-insertion-comment=no-auto-license-header" types_or: - rust - files: ^(meta-cli|typegraph)/ + files: ^(meta-cli|typegraph|libs/metagen)/ - id: insert-license name: "License Elastic-2.0 deno" args: diff --git a/Cargo.lock b/Cargo.lock index b8230b081d..2c38c07f13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,7 +33,7 @@ dependencies = [ "actix-macros", "actix-rt", "actix_derive", - "bitflags 2.4.2", + "bitflags 2.5.0", "bytes", "crossbeam-channel", "futures-core", @@ -55,7 +55,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytes", "futures-core", "futures-sink", @@ -78,7 +78,7 @@ dependencies = [ "actix-utils", "ahash 0.8.11", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "brotli", "bytes", "bytestring", @@ -86,7 +86,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "httparse", "httpdate", @@ -112,7 +112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -225,7 +225,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -236,7 +236,7 @@ checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -347,9 +347,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -568,7 +568,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -628,10 +628,10 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "parking", "polling 3.5.0", - "rustix 0.38.31", + "rustix 0.38.32", "slab", "tracing", "windows-sys 0.52.0", @@ -682,19 +682,19 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -709,7 +709,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix 0.38.32", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -734,7 +734,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -745,13 +745,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -814,7 +814,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1025,7 +1025,7 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -1036,7 +1036,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1062,9 +1062,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde 1.0.197", ] @@ -1125,7 +1125,7 @@ dependencies = [ "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "piper", "tracing", ] @@ -1150,15 +1150,15 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "syn_derive", ] [[package]] name = "brotli" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1308,6 +1308,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf2a5fb3207c12b5d208ebc145f967fea5cac41a021c37417ccc31ba40f39ee" +[[package]] +name = "castaway" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc" +dependencies = [ + "rustversion", +] + [[package]] name = "cbc" version = "0.1.2" @@ -1450,7 +1459,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1562,6 +1571,20 @@ dependencies = [ "serde_json", "serde_with 3.7.0", "tar", + "thiserror", +] + +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "ryu", + "static_assertions", ] [[package]] @@ -1939,7 +1962,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1948,7 +1971,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libloading 0.8.3", "winapi", ] @@ -2022,7 +2045,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2055,7 +2078,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2727,7 +2750,7 @@ dependencies = [ "ecb", "elliptic-curve", "errno 0.2.8", - "h2 0.3.24", + "h2 0.3.25", "hex", "hkdf", "http 0.2.12", @@ -2800,7 +2823,7 @@ dependencies = [ "quote", "strum", "strum_macros", - "syn 2.0.52", + "syn 2.0.53", "thiserror", ] @@ -3001,7 +3024,7 @@ dependencies = [ "deno_net", "deno_tls", "fastwebsockets", - "h2 0.4.2", + "h2 0.4.3", "http 1.1.0", "http-body-util", "hyper 1.1.0", @@ -3293,7 +3316,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3322,7 +3345,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3676,7 +3699,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3697,7 +3720,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3968,7 +3991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -3993,9 +4016,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "filetime" @@ -4092,7 +4115,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4124,7 +4147,7 @@ checksum = "3a0b11eeb173ce52f84ebd943d42e58813a2ebb78a6a3ff0a243b71c5199cd7b" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4152,7 +4175,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4164,7 +4187,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4176,7 +4199,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4290,9 +4313,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "futures-core", "pin-project-lite", @@ -4306,7 +4329,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4366,6 +4389,28 @@ dependencies = [ "termcolor", ] +[[package]] +name = "garde" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fa8fb3ffe035745c6194540b2064b2fe275f32367fbb4eb026024b7921e2e5" +dependencies = [ + "compact_str", + "garde_derive", + "smallvec", +] + +[[package]] +name = "garde_derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf62650515830c41553b72bd49ec20fb120226f9277c7f2847f071cf998325b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -4419,11 +4464,11 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "libgit2-sys", "log", @@ -4462,7 +4507,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ - "aho-corasick 1.1.2", + "aho-corasick 1.1.3", "bstr", "log", "regex-automata 0.4.6", @@ -4496,7 +4541,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-alloc-types", ] @@ -4506,7 +4551,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -4529,7 +4574,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-descriptor-types", "hashbrown 0.14.3", ] @@ -4540,7 +4585,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -4655,9 +4700,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -4674,9 +4719,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" +checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" dependencies = [ "bytes", "fnv", @@ -4777,6 +4822,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -4962,7 +5013,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -4985,7 +5036,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.2", + "h2 0.4.3", "http 1.1.0", "http-body 1.0.0", "httparse", @@ -5335,7 +5386,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5543,7 +5594,7 @@ dependencies = [ "serde_yaml", "tempfile", "tokio", - "toml 0.8.11", + "toml 0.8.12", "url", ] @@ -5573,7 +5624,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5758,7 +5809,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall 0.4.1", ] @@ -5828,7 +5879,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e01cc93c35479eaa65adbf8b9aa933aa3f400d9e4e2fc553f516d4f822c8b13" dependencies = [ - "syn 2.0.52", + "syn 2.0.53", "thiserror", ] @@ -6110,13 +6161,42 @@ dependencies = [ "typescript", ] +[[package]] +name = "metagen" +version = "0.3.7-0" +dependencies = [ + "anyhow", + "common", + "garde", + "heck 0.5.0", + "indexmap 2.2.5", + "log", + "once_cell", + "regex", + "reqwest", + "serde 1.0.197", + "serde_json", + "tempfile", + "tokio", +] + +[[package]] +name = "metagen_mdk_rust_static" +version = "0.0.1" +dependencies = [ + "anyhow", + "serde 1.0.197", + "serde_json", + "wit-bindgen 0.22.0", +] + [[package]] name = "metal" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -6273,9 +6353,9 @@ checksum = "b52c1b33ff98142aecea13138bd399b68aa7ab5d9546c300988c345004001eea" [[package]] name = "mongodb" -version = "2.8.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de59562e5c71656c098d8e966641b31da87b89dc3dcb6e761d3b37dcdfa0cb72" +checksum = "ef206acb1b72389b49bc9985efe7eb1f8a9bb18e5680d262fac26c07f44025f1" dependencies = [ "async-trait", "base64 0.13.1", @@ -6488,7 +6568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e" dependencies = [ "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "codespan-reporting", "hexf-parse", "indexmap 2.2.5", @@ -6520,7 +6600,7 @@ dependencies = [ "quote", "serde 1.0.197", "serde_json", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -6553,9 +6633,9 @@ dependencies = [ [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nextest-workspace-hack" @@ -6592,7 +6672,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "libc", ] @@ -6603,7 +6683,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "cfg_aliases", "libc", @@ -6663,7 +6743,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -6784,7 +6864,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -6929,7 +7009,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -6946,7 +7026,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7101,9 +7181,9 @@ checksum = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" [[package]] name = "os_info" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a07930afc1bd77ac9e1101dc18d3fc4986c6568e939c31d1c26657eb0ccbf5" +checksum = "6cbb46d5d01695d7a1fb8be5f0d1968bd2b2b8ba1d1b3e7062ce2a0593e57af1" dependencies = [ "log", "serde 1.0.197", @@ -7373,7 +7453,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7466,7 +7546,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7504,7 +7584,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7571,7 +7651,7 @@ checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7612,7 +7692,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.31", + "rustix 0.38.32", "tracing", "windows-sys 0.52.0", ] @@ -7836,7 +7916,7 @@ checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" dependencies = [ "proc-macro-rules-macros", "proc-macro2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7848,7 +7928,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -8054,7 +8134,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "memchr", "unicase", ] @@ -8421,7 +8501,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -8430,7 +8510,7 @@ version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ - "aho-corasick 1.1.2", + "aho-corasick 1.1.3", "memchr", "regex-automata 0.4.6", "regex-syntax 0.8.2", @@ -8451,7 +8531,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ - "aho-corasick 1.1.2", + "aho-corasick 1.1.3", "memchr", "regex-syntax 0.8.2", ] @@ -8522,7 +8602,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", @@ -8651,7 +8731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "serde 1.0.197", "serde_derive", ] @@ -8682,7 +8762,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "chrono", "fallible-iterator", "fallible-streaming-iterator", @@ -8788,11 +8868,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno 0.3.8", "libc", "linux-raw-sys 0.4.13", @@ -8878,7 +8958,7 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02a2d683a4ac90aeef5b1013933f6d977bd37d51ff3f4dad829d4931a7e6be86" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "clipboard-win", "fd-lock", @@ -9354,7 +9434,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -9388,7 +9468,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -9476,14 +9556,14 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" dependencies = [ "indexmap 2.2.5", "itoa", @@ -9992,7 +10072,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10040,7 +10120,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10166,7 +10246,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10175,7 +10255,7 @@ version = "0.110.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79401a45da704f4fb2552c5bf86ee2198e8636b121cb81f8036848a300edd53b" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "is-macro", "num-bigint", "phf 0.11.2", @@ -10192,7 +10272,7 @@ version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852a48a24a2533de88298c6b25355bc68fdee31ac21cb4fb8939b7001715353c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "is-macro", "num-bigint", "phf 0.11.2", @@ -10251,7 +10331,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10319,7 +10399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f0efec63cc56f3f2b93d1367d16e684d1c6f4a6cb85436db2c91448867df2b" dependencies = [ "better_scoped_tls", - "bitflags 2.4.2", + "bitflags 2.5.0", "indexmap 2.2.5", "once_cell", "phf 0.11.2", @@ -10342,7 +10422,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9489f8f5c6c08e8291bd93eb354aa91903d4eba5eeb72e1b90adf43c8fe7a29" dependencies = [ "better_scoped_tls", - "bitflags 2.4.2", + "bitflags 2.5.0", "indexmap 2.2.5", "once_cell", "phf 0.11.2", @@ -10381,7 +10461,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10582,7 +10662,7 @@ checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10618,7 +10698,7 @@ checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10642,7 +10722,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10658,9 +10738,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -10676,7 +10756,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10728,7 +10808,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.0.1", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -10847,7 +10927,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11007,7 +11087,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11140,14 +11220,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde 1.0.197", "serde_spanned", "toml_datetime", - "toml_edit 0.22.7", + "toml_edit 0.22.8", ] [[package]] @@ -11172,9 +11252,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.7" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ "indexmap 2.2.5", "serde 1.0.197", @@ -11196,7 +11276,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", @@ -11288,7 +11368,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11317,7 +11397,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11605,7 +11685,7 @@ dependencies = [ "serde 1.0.197", "serde_json", "sha2 0.10.8", - "wit-bindgen", + "wit-bindgen 0.12.0", ] [[package]] @@ -11651,7 +11731,7 @@ checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11843,9 +11923,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -11948,9 +12028,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom 0.2.12", "serde 1.0.197", @@ -11962,7 +12042,7 @@ version = "0.83.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f6c8a960dd2eb74b22eda64f7e9f3d1688f82b80202828dc0425ebdeda826ef" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "fslock", "once_cell", "which 5.0.0", @@ -12111,7 +12191,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -12145,7 +12225,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12199,6 +12279,22 @@ dependencies = [ "wasmparser 0.121.2", ] +[[package]] +name = "wasm-metadata" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fd83062c17b9f4985d438603cde0a5e8c5c8198201a6937f778b607924c7da2" +dependencies = [ + "anyhow", + "indexmap 2.2.5", + "serde 1.0.197", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.201.0", + "wasmparser 0.201.0", +] + [[package]] name = "wasm-streams" version = "0.3.0" @@ -12220,7 +12316,7 @@ checksum = "dbe80d95a88e9ac87b6aaf7bc9acd1fdfcd92045db2bf41a2262f623e2406a92" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -12292,7 +12388,18 @@ version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", + "indexmap 2.2.5", + "semver 1.0.22", +] + +[[package]] +name = "wasmparser" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" +dependencies = [ + "bitflags 2.5.0", "indexmap 2.2.5", "semver 1.0.22", ] @@ -12353,7 +12460,7 @@ checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726" dependencies = [ "arrayvec 0.7.4", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "codespan-reporting", "log", "naga", @@ -12380,7 +12487,7 @@ dependencies = [ "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "core-graphics-types", "d3d12", @@ -12417,7 +12524,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "js-sys", "serde 1.0.197", "web-sys", @@ -12432,7 +12539,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.31", + "rustix 0.38.32", ] [[package]] @@ -12444,7 +12551,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.48.0", ] @@ -12712,8 +12819,19 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4f7c5d6f59ae013fc4c013c76eab667844a46e86b51987acb71b1e32953211a" dependencies = [ - "bitflags 2.4.2", - "wit-bindgen-rust-macro", + "bitflags 2.5.0", + "wit-bindgen-rust-macro 0.12.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "288f992ea30e6b5c531b52cdd5f3be81c148554b09ea416f058d16556ba92c27" +dependencies = [ + "bitflags 2.5.0", + "wit-bindgen-rt", + "wit-bindgen-rust-macro 0.22.0", ] [[package]] @@ -12723,10 +12841,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f0371c47784e7559efb422f74473e395b49f7101725584e2673657e0b4fc104" dependencies = [ "anyhow", - "wit-component", - "wit-parser", + "wit-component 0.14.7", + "wit-parser 0.11.3", ] +[[package]] +name = "wit-bindgen-core" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e85e72719ffbccf279359ad071497e47eb0675fe22106dea4ed2d8a7fcb60ba4" +dependencies = [ + "anyhow", + "wit-parser 0.201.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb8738270f32a2d6739973cbbb7c1b6dd8959ce515578a6e19165853272ee64" + [[package]] name = "wit-bindgen-rust" version = "0.12.0" @@ -12735,10 +12869,24 @@ checksum = "eeab5a09a85b1641690922ce05d79d868a2f2e78e9415a5302f58b9846fab8f1" dependencies = [ "anyhow", "heck 0.4.1", - "wasm-metadata", - "wit-bindgen-core", + "wasm-metadata 0.10.20", + "wit-bindgen-core 0.12.0", "wit-bindgen-rust-lib", - "wit-component", + "wit-component 0.14.7", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a39a15d1ae2077688213611209849cad40e9e5cccf6e61951a425850677ff3" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap 2.2.5", + "wasm-metadata 0.201.0", + "wit-bindgen-core 0.22.0", + "wit-component 0.201.0", ] [[package]] @@ -12748,7 +12896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13c89c9c1a93e164318745841026f63f889376f38664f86a7f678930280e728" dependencies = [ "heck 0.4.1", - "wit-bindgen-core", + "wit-bindgen-core 0.12.0", ] [[package]] @@ -12759,11 +12907,25 @@ checksum = "a70c97e09751a9a95a592bd8ef84e953e5cdce6ebbfdb35ceefa5cc511da3b71" dependencies = [ "anyhow", "proc-macro2", - "syn 2.0.52", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.53", + "wit-bindgen-core 0.12.0", + "wit-bindgen-rust 0.12.0", "wit-bindgen-rust-lib", - "wit-component", + "wit-component 0.14.7", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d376d3ae5850526dfd00d937faea0d81a06fa18f7ac1e26f386d760f241a8f4b" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.53", + "wit-bindgen-core 0.22.0", + "wit-bindgen-rust 0.22.0", ] [[package]] @@ -12773,15 +12935,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66981fe851118de3b6b7a92f51ce8a86b919569c37becbeca8df9bd30141da25" dependencies = [ "anyhow", - "bitflags 2.4.2", + "bitflags 2.5.0", "indexmap 2.2.5", "log", "serde 1.0.197", "serde_json", "wasm-encoder 0.33.2", - "wasm-metadata", + "wasm-metadata 0.10.20", "wasmparser 0.113.3", - "wit-parser", + "wit-parser 0.11.3", +] + +[[package]] +name = "wit-component" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421c0c848a0660a8c22e2fd217929a0191f14476b68962afd2af89fd22e39825" +dependencies = [ + "anyhow", + "bitflags 2.5.0", + "indexmap 2.2.5", + "log", + "serde 1.0.197", + "serde_derive", + "serde_json", + "wasm-encoder 0.201.0", + "wasm-metadata 0.201.0", + "wasmparser 0.201.0", + "wit-parser 0.201.0", ] [[package]] @@ -12802,6 +12983,24 @@ dependencies = [ "url", ] +[[package]] +name = "wit-parser" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.2.5", + "log", + "semver 1.0.22", + "serde 1.0.197", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.201.0", +] + [[package]] name = "wyz" version = "0.5.1" @@ -12848,7 +13047,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.13", - "rustix 0.38.31", + "rustix 0.38.32", ] [[package]] @@ -12900,7 +13099,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -12920,7 +13119,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e942caa097..27027d287e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" members = [ "libs/*", + "libs/metagen/src/mdk_rust/static", "typegate/engine", "typegate/standalone", "meta-cli", @@ -41,3 +42,15 @@ swc_ecma_transforms_typescript = "=0.186.17" swc_ecma_visit = "=0.96.17" shadow-rs = "0.24" + +serde = { version = "1.0.192", features = ["derive"] } +serde_json = "1.0.108" +anyhow = "1.0.75" +log = "0.4.20" +tokio = { version = "1.34.0" } +thiserror = "1.0.50" +indoc = "2.0.4" +indexmap = { version = "2.1.0", features = ["serde"] } +tempfile = "3.8.1" +regex = "1.10.2" +once_cell = "1.18.0" diff --git a/dev/Dockerfile b/dev/Dockerfile index af4e37cc82..a0aaf6e0ea 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -53,7 +53,7 @@ RUN set -eux; \ ; \ apt clean autoclean; apt autoremove --yes; rm -rf /var/lib/{apt,dpkg,cache,log}/; -ARG GHJK_VERSION=f380522 +ARG GHJK_VERSION=423d38 RUN GHJK_INSTALL_EXE_DIR=/usr/bin GHJK_INSTALL_HOOK_SHELLS=bash \ deno run -A https://raw.github.com/metatypedev/ghjk/$GHJK_VERSION/install.ts diff --git a/dev/cross.Dockerfile b/dev/cross.Dockerfile index d58b0158b8..4aaf899ccd 100644 --- a/dev/cross.Dockerfile +++ b/dev/cross.Dockerfile @@ -35,7 +35,7 @@ RUN set -eux \ xz-utils \ unzip -ARG GHJK_VERSION=f380522 +ARG GHJK_VERSION=423d38 ENV GHJK_SHARE_DIR=/ghjk RUN curl -fsSL https://raw.github.com/metatypedev/ghjk/$GHJK_VERSION/install.sh \ | GHJK_INSTALL_EXE_DIR=/usr/bin GHJK_INSTALL_HOOK_SHELLS=bash sh diff --git a/dev/lock.yml b/dev/lock.yml index f869385d02..4895999009 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -78,7 +78,7 @@ dev: examples/**/*.ts: '(import\s+.+\s+from "npm:@typegraph\/sdk@)[^\/]+(\/.+";)': PUBLISHED_VERSION lock: - GHJK_VERSION: f380522 + GHJK_VERSION: 423d38 GHJK_ACTION_VERSION: a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b PYTHON_VERSION: 3.8.18 POETRY_VERSION: 1.7.0 diff --git a/ghjk.ts b/ghjk.ts index a63417ce0e..e64ac3151f 100644 --- a/ghjk.ts +++ b/ghjk.ts @@ -1,6 +1,6 @@ -export { ghjk } from "https://raw.github.com/metatypedev/ghjk/f380522/mod.ts"; -import * as ghjk from "https://raw.github.com/metatypedev/ghjk/f380522/mod.ts"; -import * as ports from "https://raw.github.com/metatypedev/ghjk/f380522/ports/mod.ts"; +export { ghjk } from "https://raw.github.com/metatypedev/ghjk/423d38/mod.ts"; +import * as ghjk from "https://raw.github.com/metatypedev/ghjk/423d38/mod.ts"; +import * as ports from "https://raw.github.com/metatypedev/ghjk/423d38/ports/mod.ts"; const PROTOC_VERSION = "v24.1"; const POETRY_VERSION = "1.7.0"; @@ -30,10 +30,10 @@ ghjk.install( if (!Deno.env.has("OCI")) { ghjk.install( // FIXME: use cargobi when avail - ports.wasm_opt({ version: WASM_OPT_VERSION }), - ports.wasm_tools({ version: WASM_TOOLS_VERSION }), + ports.cargobi({ crateName: "wasm-opt", version: WASM_OPT_VERSION }), + ports.cargobi({ crateName: "wasm-tools", version: WASM_TOOLS_VERSION }), // these aren't required by the typegate build process - ports.cargo_insta({ version: CARGO_INSTA_VERSION }), + ports.cargobi({ crateName: "cargo-insta", version: CARGO_INSTA_VERSION }), ports.node({ version: NODE_VERSION }), ports.pnpm({ version: PNPM_VERSION }), // FIXME: jco installs node as a dep @@ -72,7 +72,7 @@ if (!Deno.env.has("NO_PYTHON")) { if (!Deno.env.has("CI") && !Deno.env.has("OCI")) { ghjk.install( ports.act({}), - ports.whiz({}), + ports.cargobi({ crateName: "whiz" }), ); } diff --git a/libs/common/Cargo.toml b/libs/common/Cargo.toml index 47dd7ba8ae..f6cdf71e35 100644 --- a/libs/common/Cargo.toml +++ b/libs/common/Cargo.toml @@ -4,13 +4,13 @@ version = "0.3.7-0" edition = "2021" [dependencies] -anyhow = "1.0.75" +anyhow.workspace = true base64 = "0.21.5" flate2 = "1.0.28" -indexmap = { version = "2.1.0", features = ["serde"] } +indexmap.workspace = true schemars = { version = "0.8.16", features = ["derive", "preserve_order"], optional = true } -serde = { version = "1.0.192", features = ["derive"] } -serde_json = { version = "1.0.108", features = ["preserve_order"] } +serde.workspace = true +serde_json = { workspace = true, features = ["preserve_order"] } serde_with = "3.4.0" tar = "0.4.40" ignore = "0.4.20" @@ -18,7 +18,8 @@ reqwest = { workspace = true, features = ["json"] } async-trait = "0.1.74" itertools = "0.11.0" colored = "2.0.4" -indoc = "2.0.4" +indoc.workspace = true +thiserror.workspace = true [features] codegen = ["dep:schemars"] diff --git a/libs/common/src/graphql.rs b/libs/common/src/graphql.rs index 137fd0c1cc..c51f55389d 100644 --- a/libs/common/src/graphql.rs +++ b/libs/common/src/graphql.rs @@ -8,7 +8,6 @@ use itertools::Itertools; use reqwest::{header::CONTENT_TYPE, RequestBuilder, Response as HttpResponse}; use serde::Deserialize; use serde_json; -use std::fmt; #[derive(Debug, Deserialize)] pub struct Response { @@ -87,10 +86,13 @@ struct FailedQueryResponse { errors: Vec, } -#[derive(Debug)] +#[derive(Debug, thiserror::Error)] pub enum Error { + #[error("{0}")] EndpointNotReachable(String), + #[error("query failed: {}", .0.error_messages())] FailedQuery(Vec), + #[error("invalid http resoponse: {0}")] InvalidResponse(String), } @@ -104,24 +106,6 @@ impl GraphqlErrorMessages for Vec { } } -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - use Error::*; - match self { - EndpointNotReachable(e) => write!(f, "{e}"), - FailedQuery(errors) => write!(f, "query failed: {}", errors.error_messages()), - InvalidResponse(e) => write!(f, "invalid http response: {e}"), - } - } -} - -impl From for anyhow::Error { - fn from(e: Error) -> Self { - use anyhow::anyhow; - anyhow!("{e}") - } -} - #[async_trait] impl Query for RequestBuilder { // TODO deserialize output value diff --git a/libs/common/src/node.rs b/libs/common/src/node.rs index 371a923c41..529b312baf 100644 --- a/libs/common/src/node.rs +++ b/libs/common/src/node.rs @@ -26,10 +26,12 @@ pub struct Node { pub env: HashMap, } -#[derive(Debug)] +#[derive(Debug, thiserror::Error)] pub enum Error { - Graphql(graphql::Error), - Other(anyhow::Error), + #[error(transparent)] + Graphql(#[from] graphql::Error), + #[error(transparent)] + Other(#[from] anyhow::Error), } impl Node { @@ -116,4 +118,36 @@ impl Node { } Ok(()) } + + pub async fn typegraph(&self, name: &str) -> Result, Error> { + let res = self + .post("/typegate") + .map_err(Error::Other)? + .timeout(Duration::from_secs(10)) + .gql( + indoc! {" + query getTypegraph($name: String!){ + typegraph(name: $name){ + serialized + } + } + "} + .to_string(), + Some(serde_json::json!({ + "name": name + })), + ) + .await + .map_err(Error::Graphql)?; + #[derive(serde::Deserialize)] + struct Res { + serialized: String, + } + let Ok(res) = res.data::("typegraph") else { + return Ok(None); + }; + serde_json::from_str::(&res.serialized) + .map(Some) + .map_err(|err| Error::Other(anyhow::anyhow!(err))) + } } diff --git a/libs/common/src/typegraph/runtimes/mod.rs b/libs/common/src/typegraph/runtimes/mod.rs index 75d2e7cd66..92d78c119d 100644 --- a/libs/common/src/typegraph/runtimes/mod.rs +++ b/libs/common/src/typegraph/runtimes/mod.rs @@ -74,3 +74,25 @@ pub enum TGRuntime { Known(KnownRuntime), Unknown(UnknownRuntime), } + +impl TGRuntime { + pub fn name(&self) -> &str { + match self { + TGRuntime::Known(known) => match known { + KnownRuntime::Deno(_) => "deno", + KnownRuntime::GraphQL(_) => "graphql", + KnownRuntime::HTTP(_) => "http", + KnownRuntime::PythonWasi(_) => "python_wasi", + KnownRuntime::Random(_) => "random", + KnownRuntime::Prisma(_) => "prisma", + KnownRuntime::PrismaMigration(_) => "prisma_migration", + KnownRuntime::S3(_) => "s3", + KnownRuntime::Temporal(_) => "temporal", + KnownRuntime::WasmEdge(_) => "wasmedge", + KnownRuntime::Typegate(_) => "typegate", + KnownRuntime::Typegraph(_) => "typegraph", + }, + TGRuntime::Unknown(UnknownRuntime { name, .. }) => name, + } + } +} diff --git a/libs/deno/Cargo.toml b/libs/deno/Cargo.toml index c383f343fc..f60bc68154 100644 --- a/libs/deno/Cargo.toml +++ b/libs/deno/Cargo.toml @@ -5,5 +5,5 @@ version.workspace = true [dependencies] deno.workspace = true -log = "0.4.20" -anyhow = "1.0.75" +log.workspace = true +anyhow.workspace = true diff --git a/libs/metagen/Cargo.toml b/libs/metagen/Cargo.toml new file mode 100644 index 0000000000..b998f8586e --- /dev/null +++ b/libs/metagen/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "metagen" +edition.workspace = true +version.workspace = true + +[dependencies] +common.workspace = true +anyhow.workspace = true +log.workspace = true +serde.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features =["rt-multi-thread"]} +indexmap.workspace = true +reqwest = { workspace = true, features = ["json"] } +garde = { version = "0.18", features = ["derive"] } +heck = "0.5.0-rc.1" +regex.workspace = true +once_cell.workspace = true +# indoc.workspace = true + +[dev-dependencies] +tokio = { workspace = true, features =["full"]} +tempfile.workspace = true diff --git a/libs/metagen/src/config.rs b/libs/metagen/src/config.rs new file mode 100644 index 0000000000..a4afc3cb8e --- /dev/null +++ b/libs/metagen/src/config.rs @@ -0,0 +1,34 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +//! Sample yaml: +//! generators: # this section only required when we support external generators +//! - mdk_rust +//! - mdk_ts +//! - xgraph_ts +//! - name: my_custom +//! wasm_module: wasm.io/custom_gen +//! targets: +//! default: +//! mdk_rust: # config for any configured generatour under this name +//! typegraph: console +//! path: ./mats/gen +//! annotate_debug: true +use crate::interlude::*; + +#[derive(Deserialize, Debug)] +pub struct Config { + pub targets: HashMap, +} + +#[derive(Deserialize, Debug)] +pub struct Target(pub HashMap); + +#[derive(Serialize, Deserialize, Debug, garde::Validate)] +pub struct MdkGeneratorConfigBase { + #[garde(length(min = 1))] + #[serde(rename = "typegraph")] + pub typegraph_name: String, + #[garde(skip)] + pub path: PathBuf, +} diff --git a/libs/metagen/src/lib.rs b/libs/metagen/src/lib.rs new file mode 100644 index 0000000000..412163c823 --- /dev/null +++ b/libs/metagen/src/lib.rs @@ -0,0 +1,148 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +#[allow(unused)] +mod interlude { + pub use common::typegraph::TypeNode; + pub use common::typegraph::Typegraph; + + pub use std::collections::{HashMap, HashSet}; + pub use std::ops::Deref; + pub use std::path::{Path, PathBuf}; + pub use std::sync::Arc; + + pub use anyhow::Context; + pub use indexmap::IndexMap; + pub use log::{debug, error, info, trace, warn}; + pub use serde::{Deserialize, Serialize}; + #[cfg(test)] + pub use tokio::process::Command; +} + +mod config; +mod mdk; +mod mdk_rust; +#[cfg(test)] +mod tests; +mod utils; + +use crate::interlude::*; + +#[derive(Debug)] +pub enum GeneratorInputOrder { + TypegraphDesc { name: String }, +} + +#[derive(Debug)] +pub enum GeneratorInputResolved { + TypegraphDesc { raw: Typegraph }, +} + +pub trait InputResolver { + fn resolve( + &self, + order: GeneratorInputOrder, + ) -> impl std::future::Future> + Send; +} + +#[derive(Debug)] +pub struct GeneratorOutput(pub HashMap); + +impl InputResolver for Ctx { + async fn resolve(&self, order: GeneratorInputOrder) -> anyhow::Result { + Ok(match order { + GeneratorInputOrder::TypegraphDesc { name } => GeneratorInputResolved::TypegraphDesc { + raw: self + .typegate + .typegraph(&name) + .await? + .with_context(|| format!("no typegraph found under \"{name}\""))?, + }, + }) + } +} + +trait Plugin: Send + Sync { + fn bill_of_inputs(&self) -> HashMap; + fn generate( + &self, + inputs: HashMap, + ) -> anyhow::Result; +} + +#[derive(Clone)] +struct Ctx { + typegate: Arc, +} + +pub async fn generate_target( + config: &config::Config, + target_name: &str, + resolver: impl InputResolver + Send + Sync + Clone + 'static, +) -> anyhow::Result> { + let generators = [ + // builtin generators + ( + "mdk_rust".to_string(), + // initialize the impl + &|val| { + let config: mdk_rust::MdkRustGenConfig = serde_json::from_value(val)?; + let generator = mdk_rust::Generator::new(config)?; + Ok::<_, anyhow::Error>(Box::new(generator) as Box) + }, + ), + ] + .into_iter() + .collect::>(); + + let target_conf = config + .targets + .get(target_name) + .with_context(|| format!("target \"{target_name}\" not found in config"))?; + + let mut generate_set = tokio::task::JoinSet::new(); + for (gen_name, config) in &target_conf.0 { + let config = config.to_owned(); + + let get_gen_fn = generators + .get(&gen_name[..]) + .with_context(|| format!("generator \"{gen_name}\" not found in config"))?; + + let gen_impl = get_gen_fn(config)?; + let bill = gen_impl.bill_of_inputs(); + + let mut resolve_set = tokio::task::JoinSet::new(); + for (name, order) in bill.into_iter() { + let resolver = resolver.clone(); + _ = resolve_set.spawn(async move { + Ok::<_, anyhow::Error>((name, resolver.resolve(order).await?)) + }); + } + + let gen_name: Arc = gen_name[..].into(); + _ = generate_set.spawn(async move { + let mut inputs = HashMap::new(); + while let Some(res) = resolve_set.join_next().await { + let (name, input) = res??; + inputs.insert(name, input); + } + let out = gen_impl.generate(inputs)?; + Ok::<_, anyhow::Error>((gen_name, out)) + }); + } + let mut out = HashMap::new(); + while let Some(res) = generate_set.join_next().await { + let (gen_name, files) = res??; + for (path, buf) in files.0 { + if let Some((src, _)) = out.get(&path) { + anyhow::bail!("generators \"{src}\" and \"{gen_name}\" clashed at \"{path:?}\""); + } + out.insert(path, (gen_name.clone(), buf)); + } + } + let out = out + .into_iter() + .map(|(path, (_, buf))| (path, buf)) + .collect(); + Ok(out) +} diff --git a/libs/metagen/src/mdk/mdk.wit b/libs/metagen/src/mdk/mdk.wit new file mode 100644 index 0000000000..08030bb7de --- /dev/null +++ b/libs/metagen/src/mdk/mdk.wit @@ -0,0 +1,42 @@ +package metatype:mdk; + +interface shared { + record req { + op-name: string, + in-json: string, + } + + type res = result; +} + +interface typegate-wasi-host { + use shared.{req, res}; + + hostcall: func(req: req) -> res; +} + +interface mat { + use shared.{req, res}; + + handle: func(req: req) -> res; + + record init-args { + } + + record mat-tag { + title: string, + hash: string, + } + + record init-res { + metatype-version: string, + implemented-mats: list + } + + init: func(args: init-args) -> init-res; +} + +world wasi-mat { + import typegate-wasi-host; + export mat; +} diff --git a/libs/metagen/src/mdk/mod.rs b/libs/metagen/src/mdk/mod.rs new file mode 100644 index 0000000000..1fa3b703ce --- /dev/null +++ b/libs/metagen/src/mdk/mod.rs @@ -0,0 +1,59 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +//! This module contains common logic for mdk generation +//! imlementations +use common::typegraph::{runtimes::TGRuntime, Materializer}; + +use crate::interlude::*; + +pub struct StubbedFunction { + pub id: u32, + pub node: TypeNode, + pub mat: Materializer, + pub runtime: Arc, +} + +pub fn filter_stubbed_funcs( + tg: &Typegraph, + stubbed_runtimes: &[String], +) -> anyhow::Result> { + let stubbed_runtimes = stubbed_runtimes + .iter() + .map(|rt_name| { + tg.runtimes + .iter() + .position(|rt| rt_name == rt.name()) + .map(|idx| (idx as u32, Arc::new(tg.runtimes[idx].clone()))) + .with_context(|| format!("runtime {rt_name} not found")) + }) + .collect::, _>>()?; + let stubbed_materializers = tg + .materializers + .iter() + .enumerate() + // TODO: consider filtering out non "function" mats + .filter(|(_, mat)| stubbed_runtimes.contains_key(&mat.runtime)) + .map(|(id, _)| id as u32) + .collect::>(); + let stubbed_funcs = tg + .types + .iter() + .enumerate() + .filter_map(|(id, node)| match node { + TypeNode::Function { data, .. } + if stubbed_materializers.contains(&data.materializer) => + { + let mat = tg.materializers[data.materializer as usize].clone(); + Some(StubbedFunction { + id: id as _, + node: node.clone(), + runtime: stubbed_runtimes.get(&mat.runtime).unwrap().clone(), + mat, + }) + } + _ => None, + }) + .collect(); + Ok(stubbed_funcs) +} diff --git a/libs/metagen/src/mdk_rust/mod.rs b/libs/metagen/src/mdk_rust/mod.rs new file mode 100644 index 0000000000..c127485562 --- /dev/null +++ b/libs/metagen/src/mdk_rust/mod.rs @@ -0,0 +1,206 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +mod stubs; +mod types; +mod utils; + +use crate::interlude::*; +use crate::mdk::*; +use crate::utils::*; +use crate::*; + +#[derive(Serialize, Deserialize, Debug, garde::Validate)] +pub struct MdkRustGenConfig { + #[serde(flatten)] + #[garde(dive)] + pub base: crate::config::MdkGeneratorConfigBase, + #[garde(skip)] + pub stubbed_runtimes: Option>, + #[garde(skip)] + pub no_crate_manifest: Option, +} + +pub struct Generator { + config: MdkRustGenConfig, +} + +impl Generator { + pub const INPUT_TG: &'static str = "tg_name"; + pub fn new(config: MdkRustGenConfig) -> Result { + use garde::Validate; + config.validate(&())?; + Ok(Self { config }) + } +} + +impl crate::Plugin for Generator { + fn bill_of_inputs(&self) -> HashMap { + [( + Self::INPUT_TG.to_string(), + GeneratorInputOrder::TypegraphDesc { + name: self.config.base.typegraph_name.clone(), + }, + )] + .into_iter() + .collect() + } + + fn generate( + &self, + inputs: HashMap, + ) -> anyhow::Result { + // return Ok(GeneratorOutput(Default::default())) + let GeneratorInputResolved::TypegraphDesc { raw: tg } = inputs + .get(Self::INPUT_TG) + .context("missing generator input")?; + let mut out = HashMap::new(); + out.insert( + self.config.base.path.join("mod.rs"), + gen_mod_rs(&self.config, tg)?, + ); + if self.config.no_crate_manifest.unwrap_or(true) { + use heck::ToSnekCase; + let crate_name = format!("{}_mdk", self.config.base.typegraph_name.to_snek_case()); + out.insert( + self.config.base.path.join("Cargo.toml"), + gen_cargo_toml(Some(&crate_name)), + ); + } + Ok(GeneratorOutput(out)) + } +} + +fn gen_mod_rs(config: &MdkRustGenConfig, tg: &Typegraph) -> anyhow::Result { + let mut mod_rs = GenDestBuf { + buf: Default::default(), + }; + _ = gen_static(&mut mod_rs); + let mut ty_memo = Default::default(); + let gen_opts = types::GenTypesOptions { + derive_debug: true, + derive_serde: true, + }; + // remove the root type which we don't want to generate types for + // TODO: gql types || function wrappers for exposed functions + // skip object 0, the root object where the `exposed` items are locted + for id in 1..tg.types.len() { + _ = types::gen_type( + id as u32, + &tg.types, + &mut mod_rs, + &mut ty_memo, + &gen_opts, + &[], + )?; + } + if let Some(stubbed_rts) = &config.stubbed_runtimes { + let stubbed_funs = filter_stubbed_funcs(tg, stubbed_rts)?; + let gen_stub_opts = stubs::GenStubOptions {}; + for fun in &stubbed_funs { + _ = stubs::gen_stub(fun, &mut mod_rs, &ty_memo, &gen_stub_opts) + } + } + Ok(mod_rs.buf) +} + +pub fn gen_cargo_toml(crate_name: Option<&str>) -> String { + let lib_rs = include_str!("static/Cargo.toml"); + if let Some(crate_name) = crate_name { + const DEF_CRATE_NAME: &str = "metagen_mdk_rust_static"; + lib_rs.replace(DEF_CRATE_NAME, crate_name) + } else { + lib_rs.to_string() + } +} + +pub fn gen_static(dest: &mut GenDestBuf) -> anyhow::Result> { + use std::fmt::Write; + + let mod_rs = include_str!("static/mod.rs"); + let mdk_wit = include_str!("../mdk/mdk.wit"); + writeln!(&mut dest.buf, "// gen-static-start")?; + write!( + &mut dest.buf, + "{}", + &mod_rs[..mod_rs.find("//wit-start").unwrap()] + )?; + writeln!( + &mut dest.buf, + r#" + inline: "{mdk_wit}" +"# + )?; + write!( + &mut dest.buf, + "{}", + &mod_rs[mod_rs.find("//wit-end").unwrap() + "//wit-end".len()..] + )?; + writeln!(&mut dest.buf, "// gen-static-end")?; + Ok("Ctx".into()) +} + +#[test] +fn mdk_rs_e2e() -> anyhow::Result<()> { + use crate::tests::*; + + let tg_name = "gen-test"; + let config = config::Config { + targets: [( + "default".to_string(), + config::Target( + [( + "mdk_rust".to_string(), + serde_json::to_value(mdk_rust::MdkRustGenConfig { + stubbed_runtimes: None, + no_crate_manifest: None, + base: config::MdkGeneratorConfigBase { + typegraph_name: tg_name.into(), + // NOTE: root will map to the test's tempdir + path: "./gen/".into(), + }, + })?, + )] + .into_iter() + .collect(), + ), + )] + .into_iter() + .collect(), + }; + let out = tokio::runtime::Builder::new_multi_thread() + .enable_all() + .thread_stack_size(16 * 1024 * 1024) + .build()? + .block_on(async { + let tg = test_typegraph_1().await?; + e2e_test(vec![E2eTestCase { + typegraphs: [(tg_name.to_string(), tg)].into_iter().collect(), + target: "default".into(), + config, + build_fn: |args| { + Box::pin(async move { + let status = tokio::process::Command::new("cargo") + .args( + "build --target wasm32-wasi --target-dir target/wasi" + .split(' ') + .collect::>(), + ) + .current_dir(args.path) + .kill_on_drop(true) + .spawn()? + .wait() + .await?; + if !status.success() { + anyhow::bail!("error building generated crate"); + } + Ok(()) + }) + }, + target_dir: "./tests/mat_rust/".into(), + }]) + .await + })?; + dbg!(out); + Ok(()) +} diff --git a/libs/metagen/src/mdk_rust/static/Cargo.toml b/libs/metagen/src/mdk_rust/static/Cargo.toml new file mode 100644 index 0000000000..e50c6a70dd --- /dev/null +++ b/libs/metagen/src/mdk_rust/static/Cargo.toml @@ -0,0 +1,14 @@ +package.name = "metagen_mdk_rust_static" +package.edition = "2021" +package.version = "0.0.1" + +[lib] +path = "mod.rs" +crate-type = ["cdylib", "rlib"] + +[dependencies] +anyhow = "1" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +# TODO: update typegraph_core bindgen version +wit-bindgen = "0.22.0" diff --git a/libs/metagen/src/mdk_rust/static/mod.rs b/libs/metagen/src/mdk_rust/static/mod.rs new file mode 100644 index 0000000000..c36a037858 --- /dev/null +++ b/libs/metagen/src/mdk_rust/static/mod.rs @@ -0,0 +1,37 @@ +#![allow(unused)] + +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +mod wit { + wit_bindgen::generate!({ + //wit-start + // this bit gets replaced by the inline wit string + world: "wasi-mat", + path: "../../mdk/mdk.wit" + //wit-end + }); +} + +use wit::exports::metatype::mdk::mat::*; + +struct Module; + +#[allow(unused)] +impl Guest for Module { + fn handle(req: Req) -> Res { + todo!("do routing and rpc") + } + + fn init(args: InitArgs) -> InitRes { + todo!("do init") + } +} + +wit::export!(Module with_types_in wit); + +pub struct Ctx { + gql: GraphqlClient, +} + +pub struct GraphqlClient {} diff --git a/libs/metagen/src/mdk_rust/stubs.rs b/libs/metagen/src/mdk_rust/stubs.rs new file mode 100644 index 0000000000..b898f4747e --- /dev/null +++ b/libs/metagen/src/mdk_rust/stubs.rs @@ -0,0 +1,155 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use super::utils::normalize_type_title; +use crate::interlude::*; +use crate::mdk::*; +use crate::utils::*; +use std::fmt::Write; + +pub struct GenStubOptions {} + +pub fn gen_stub( + fun: &StubbedFunction, + dest: &mut GenDestBuf, + type_names: &HashMap>, + _opts: &GenStubOptions, +) -> anyhow::Result> { + let TypeNode::Function { base, data } = &fun.node else { + unreachable!() + }; + let inp_ty = type_names + .get(&data.input) + .context("input type for function not found")?; + let out_ty = type_names + .get(&data.output) + .context("output type for function not found")?; + let trait_name: Arc = normalize_type_title(&base.title).into(); + writeln!( + &mut dest.buf, + r#"pub trait {trait_name} {{ + fn handle(input: {inp_ty}, cx: Ctx) -> anyhow::Result<{out_ty}>; +}}"# + )?; + Ok(trait_name) +} + +#[cfg(test)] +mod test { + use super::*; + use crate::{mdk_rust::*, tests::default_type_node_base}; + use common::typegraph::*; + + #[test] + fn stub_test() -> anyhow::Result<()> { + let tg_name = "my_tg".to_string(); + let tg = Typegraph { + id: "https://metatype.dev/specs/0.0.3.json".into(), + path: None, + policies: vec![], + deps: vec![], + meta: TypeMeta { + ..Default::default() + }, + runtimes: vec![common::typegraph::runtimes::TGRuntime::Unknown( + common::typegraph::runtimes::UnknownRuntime { + name: "wasm".into(), + data: Default::default(), + }, + )], + materializers: vec![Materializer { + name: "function".into(), + runtime: 0, + data: Default::default(), + effect: Effect { + effect: None, + idempotent: false, + }, + }], + types: vec![ + TypeNode::Object { + data: ObjectTypeData { + properties: Default::default(), + required: vec![], + }, + base: TypeNodeBase { + ..default_type_node_base() + }, + }, + TypeNode::Integer { + data: IntegerTypeData { + maximum: None, + multiple_of: None, + exclusive_minimum: None, + exclusive_maximum: None, + minimum: None, + }, + base: TypeNodeBase { + title: "my_int".into(), + ..default_type_node_base() + }, + }, + TypeNode::Function { + data: FunctionTypeData { + input: 1, + output: 1, + rate_calls: false, + rate_weight: None, + materializer: 0, + parameter_transform: None, + }, + base: TypeNodeBase { + title: "my_func".into(), + ..default_type_node_base() + }, + }, + ], + }; + let generator = Generator::new(MdkRustGenConfig { + base: crate::config::MdkGeneratorConfigBase { + path: "/tmp".into(), + typegraph_name: tg_name.clone(), + }, + stubbed_runtimes: Some(vec!["wasm".into()]), + no_crate_manifest: None, + })?; + let out = generator.generate( + [( + Generator::INPUT_TG.to_owned(), + GeneratorInputResolved::TypegraphDesc { raw: tg }, + )] + .into_iter() + .collect(), + )?; + let (_, buf) = out + .0 + .iter() + .find(|(path, _)| path.file_name().unwrap() == "mod.rs") + .unwrap(); + assert_eq!( + r#"// gen-static-end +pub type MyInt = i64; +pub trait MyFunc { + fn handle(input: MyInt, cx: Ctx) -> anyhow::Result; +} +"#, + &buf[buf.find("// gen-static-end").unwrap()..] + ); + Ok(()) + } +} + +trait MyT { + fn hey() {} +} +trait MyT2 { + fn you() {} +} + +struct T {} +impl MyT for T { + fn hey() {} +} +impl MyT2 for T { + fn you() {} +} diff --git a/libs/metagen/src/mdk_rust/types.rs b/libs/metagen/src/mdk_rust/types.rs new file mode 100644 index 0000000000..5584d098a6 --- /dev/null +++ b/libs/metagen/src/mdk_rust/types.rs @@ -0,0 +1,685 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use super::utils::*; +use crate::interlude::*; +use crate::utils::*; +use heck::ToPascalCase; +use std::fmt::Write; + +pub struct GenTypesOptions { + pub derive_debug: bool, + pub derive_serde: bool, +} + +type VisitedTypePath = HashMap>>; + +/// Writes the rust description of the type in the destinition buf +/// and returns the name of the type + set of id path of of all visited types. +pub fn gen_type( + id: u32, + nodes: &[TypeNode], + dest: &mut GenDestBuf, + memo: &mut HashMap>, + opts: &GenTypesOptions, + parent_path: &[u32], +) -> anyhow::Result<(Arc, VisitedTypePath)> { + let node = &nodes[id as usize]; + let my_path: Vec<_> = parent_path + .iter() + .copied() + .chain(std::iter::once(id)) + .collect(); + let mut visited_types = [(id, vec![my_path.clone()])].into_iter().collect(); + + // short circuit if we've already generated the type + if let Some(name) = memo.get(&id) { + return Ok((name.clone(), visited_types)); + }; + + // generate the type name up first + let ty_name = match node { + TypeNode::Function { .. } => "()".to_string(), + TypeNode::Boolean { base, .. } + | TypeNode::Integer { base, .. } + | TypeNode::String { base, .. } + | TypeNode::File { base, .. } + | TypeNode::Any { base, .. } + | TypeNode::Object { base, .. } + | TypeNode::Float { base, .. } + | TypeNode::Optional { base, .. } + | TypeNode::List { base, .. } + | TypeNode::Union { base, .. } + | TypeNode::Either { base, .. } => normalize_type_title(&base.title), + /* TypeNode::Union { base, .. } => { + format!("{}Union", normalize_type_title(&base.title)) + } + TypeNode::Either { base, .. } => { + format!("{}Either", normalize_type_title(&base.title)) + } + // since the type name of Optionl | Vec depends on + // the name of the inner type, we use placeholders at this ploint + TypeNode::Optional { .. } | TypeNode::List { .. } => { + normalize_type_title(&format!("Placeholder{id}")) + } */ + }; + let ty_name: Arc = ty_name.into(); + + // insert typename into memo before generation to allow cyclic resolution + // if this function is recursively called when generating dependent branches + memo.insert(id, ty_name.clone()); + + match node { + TypeNode::Function { .. } => {} + TypeNode::Boolean { .. } => { + gen_alias(&mut dest.buf, &ty_name, "bool")?; + } + TypeNode::Float { .. } => { + gen_alias(&mut dest.buf, &ty_name, "f64")?; + } + TypeNode::Integer { .. } => { + gen_alias(&mut dest.buf, &ty_name, "i64")?; + } + TypeNode::String { .. } => { + gen_alias(&mut dest.buf, &ty_name, "String")?; + } + TypeNode::File { .. } => { + gen_alias(&mut dest.buf, &ty_name, "Vec")?; + } + TypeNode::Any { .. } => { + gen_alias(&mut dest.buf, &ty_name, "serde_json::Value")?; + } + TypeNode::Object { data, .. } => { + let props = data + .properties + .iter() + // generate property type sfirst + .map(|(name, &dep_id)| { + let (ty_name, branch_visited_types) = + gen_type(dep_id, nodes, dest, memo, opts, &my_path)?; + + let ty_name = if data.required.contains(name) { + ty_name.to_string() + } else { + format!("Option<{ty_name}>") + }; + + let ty_name = if let Some(true) = + is_path_unsized_cyclic(id, &my_path, &branch_visited_types, nodes) + { + format!("Box<{ty_name}>") + } else { + ty_name + }; + merge_visited_paths_into(branch_visited_types, &mut visited_types); + + let normalized_prop_name = normalize_struct_prop_name(name); + let rename_name = if normalized_prop_name.as_str() != name.as_str() { + Some(name.clone()) + } else { + None + }; + Ok::<_, anyhow::Error>((normalized_prop_name, (ty_name, rename_name))) + }) + .collect::, _>>()?; + gen_struct(&mut dest.buf, opts, &ty_name[..], props)?; + } + TypeNode::Union { data, .. } => { + let variants = data + .any_of + .iter() + .map(|&inner| { + let (ty_name, branch_visited_types) = + gen_type(inner, nodes, dest, memo, opts, &my_path)?; + let variant_name = ty_name.to_pascal_case(); + let ty_name = if let Some(true) = + is_path_unsized_cyclic(id, &my_path, &branch_visited_types, nodes) + { + format!("Box<{ty_name}>") + } else { + ty_name.to_string() + }; + merge_visited_paths_into(branch_visited_types, &mut visited_types); + Ok::<_, anyhow::Error>((variant_name, ty_name)) + }) + .collect::, _>>()?; + gen_enum(&mut dest.buf, opts, &ty_name, variants)?; + } + TypeNode::Either { data, .. } => { + let variants = data + .one_of + .iter() + .map(|&inner| { + let (ty_name, branch_visited_types) = + gen_type(inner, nodes, dest, memo, opts, &my_path)?; + let variant_name = ty_name.to_pascal_case(); + let ty_name = if let Some(true) = + is_path_unsized_cyclic(id, &my_path, &branch_visited_types, nodes) + { + format!("Box<{ty_name}>") + } else { + ty_name.to_string() + }; + merge_visited_paths_into(branch_visited_types, &mut visited_types); + Ok::<_, anyhow::Error>((variant_name, ty_name)) + }) + .collect::, _>>()?; + gen_enum(&mut dest.buf, opts, &ty_name, variants)?; + } + TypeNode::Optional { data, .. } => { + // TODO: handle cyclic case where entire cycle is aliases + let (inner_ty_name, inner_visited_types) = + gen_type(data.item, nodes, dest, memo, opts, &my_path)?; + // let optional_ty_name: Arc = format!("{inner_ty_name}Maybe").into(); + let inner_ty_name = if let Some(true) = + is_path_unsized_cyclic(id, &my_path, &inner_visited_types, nodes) + { + format!("Box<{inner_ty_name}>") + } else { + inner_ty_name.to_string() + }; + merge_visited_paths_into(inner_visited_types, &mut visited_types); + gen_alias(&mut dest.buf, &ty_name, &format!("Option<{inner_ty_name}>"))?; + // dest.buf = replace_placeholder_ty_name(&dest.buf, &ty_name, &optional_ty_name); + // memo.insert(id, optional_ty_name.clone()); + // ty_name = optional_ty_name; + } + TypeNode::List { data, .. } => { + // TODO: handle cyclic case where entire cycle is aliases + let (inner_ty_name, inner_visited_types) = + gen_type(data.items, nodes, dest, memo, opts, &my_path)?; + merge_visited_paths_into(inner_visited_types, &mut visited_types); + if let Some(true) = data.unique_items { + // let ty_name = format!("{inner_ty_name}Set"); + gen_alias( + &mut dest.buf, + &ty_name, + &format!("std::collections::HashSet<{inner_ty_name}>"), + )?; + // ty_name + } else { + // let ty_name = format!("{inner_ty_name}List"); + gen_alias(&mut dest.buf, &ty_name, &format!("Vec<{inner_ty_name}>"))?; + // ty_name + }; + // let true_ty_name: Arc = true_ty_name.into(); + // dest.buf = replace_placeholder_ty_name(&dest.buf, &ty_name, &true_ty_name); + // memo.insert(id, true_ty_name.clone()); + // ty_name = true_ty_name; + } + }; + Ok((ty_name, visited_types)) +} + +fn merge_visited_paths_into(from: VisitedTypePath, into: &mut VisitedTypePath) { + for (id, paths) in from { + into.entry(id).or_default().extend(paths); + } +} + +fn is_path_unsized_cyclic( + id: u32, + my_path: &[u32], + visited_path: &VisitedTypePath, + nodes: &[TypeNode], +) -> Option { + visited_path.get(&id).map(|cyclic_paths| { + // for all cycles that lead back to current + cyclic_paths + .iter() + .map(|path| { + path[my_path.len()..] + .iter() + // until we arrive at current + .take_while(|&&dep_id| dep_id != id) + // see if any are lists + .any(|&dep_id| matches!(&nodes[dep_id as usize], TypeNode::List { .. })) + }) + // we know this whole branch is unsized if + // any one of the paths don't contain a + // type stored on the heap i.e. a vec + .any(|has_list| !has_list) + }) +} + +#[allow(unused)] +fn replace_placeholder_ty_name(buf: &str, placeholder: &str, replacement: &str) -> String { + buf.replace(placeholder, replacement).replace( + &normalize_struct_prop_name(placeholder), + &normalize_struct_prop_name(replacement), + ) +} + +fn gen_derive(dest: &mut impl Write, opts: &GenTypesOptions) -> std::fmt::Result { + let mut derive_args = vec![]; + if opts.derive_debug { + derive_args.extend_from_slice(&["Debug"]); + } + if opts.derive_serde { + derive_args.extend_from_slice(&["serde::Serialize", "serde::Deserialize"]); + } + if !derive_args.is_empty() { + write!(dest, "#[derive(")?; + let last = derive_args.pop().unwrap(); + for arg in derive_args { + write!(dest, "{arg}, ")?; + } + write!(dest, "{last}")?; + writeln!(dest, ")]")?; + } + Ok(()) +} + +fn gen_alias(out: &mut impl Write, alias_name: &str, aliased_ty: &str) -> std::fmt::Result { + writeln!(out, "pub type {alias_name} = {aliased_ty};") +} + +/// `props` is a map of prop_name -> (TypeName, serialization_name) +fn gen_struct( + dest: &mut impl Write, + opts: &GenTypesOptions, + ty_name: &str, + props: IndexMap)>, +) -> std::fmt::Result { + gen_derive(dest, opts)?; + writeln!(dest, "pub struct {ty_name} {{")?; + for (name, (ty_name, ser_name)) in props.into_iter() { + if let Some(ser_name) = ser_name { + writeln!(dest, r#" #[serde(rename = "{ser_name}")]"#)?; + } + writeln!(dest, " pub {name}: {ty_name},")?; + } + writeln!(dest, "}}")?; + Ok(()) +} + +/// `variants` is variant name to variant type +/// All generated variants are tuples of arity 1. +fn gen_enum( + dest: &mut impl Write, + opts: &GenTypesOptions, + ty_name: &str, + variants: Vec<(String, String)>, +) -> std::fmt::Result { + gen_derive(dest, opts)?; + writeln!(dest, "pub enum {ty_name} {{")?; + for (var_name, ty_name) in variants.into_iter() { + writeln!(dest, " {var_name}({ty_name}),")?; + } + writeln!(dest, "}}")?; + Ok(()) +} + +#[cfg(test)] +mod test { + use crate::tests::default_type_node_base; + + use super::*; + use common::typegraph::*; + + #[test] + fn ty_generation_test() -> anyhow::Result<()> { + let cases = [ + ( + "kitchen_sink", + vec![ + TypeNode::String { + data: StringTypeData { + format: None, + pattern: None, + min_length: None, + max_length: None, + }, + base: TypeNodeBase { + title: "my_str".into(), + ..default_type_node_base() + }, + }, + TypeNode::List { + data: ListTypeData { + items: 0, + max_items: None, + min_items: None, + unique_items: None, + }, + base: TypeNodeBase { + title: "my_str_list".into(), + ..default_type_node_base() + }, + }, + TypeNode::List { + data: ListTypeData { + items: 0, + max_items: None, + min_items: None, + unique_items: Some(true), + }, + base: TypeNodeBase { + title: "my_str_set".into(), + ..default_type_node_base() + }, + }, + TypeNode::Optional { + data: OptionalTypeData { + item: 0, + default_value: None, + }, + base: TypeNodeBase { + title: "my_str_maybe".into(), + ..default_type_node_base() + }, + }, + TypeNode::Integer { + data: IntegerTypeData { + maximum: None, + multiple_of: None, + exclusive_minimum: None, + exclusive_maximum: None, + minimum: None, + }, + base: TypeNodeBase { + title: "my_int".into(), + ..default_type_node_base() + }, + }, + TypeNode::Float { + data: FloatTypeData { + maximum: None, + multiple_of: None, + exclusive_minimum: None, + exclusive_maximum: None, + minimum: None, + }, + base: TypeNodeBase { + title: "my_float".into(), + ..default_type_node_base() + }, + }, + TypeNode::Boolean { + base: TypeNodeBase { + title: "my_bool".into(), + ..default_type_node_base() + }, + }, + TypeNode::File { + data: FileTypeData { + min_size: None, + max_size: None, + mime_types: None, + }, + base: TypeNodeBase { + title: "my_file".into(), + ..default_type_node_base() + }, + }, + TypeNode::Object { + data: ObjectTypeData { + properties: [ + ("myString".to_string(), 0), + ("list".to_string(), 1), + ("optional".to_string(), 0), + ("optionalOptional".to_string(), 3), + ] + .into_iter() + .collect(), + required: ["myString", "list"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "my_obj".into(), + ..default_type_node_base() + }, + }, + TypeNode::Either { + data: EitherTypeData { + one_of: vec![0, 1, 2, 3, 4, 5, 6, 7, 8], + }, + base: TypeNodeBase { + title: "my_either".into(), + ..default_type_node_base() + }, + }, + TypeNode::Union { + data: UnionTypeData { + any_of: vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + }, + base: TypeNodeBase { + title: "my_union".into(), + ..default_type_node_base() + }, + }, + ], + "MyUnion", + r#"pub type MyStr = String; +pub type MyStrList = Vec; +pub type MyStrSet = std::collections::HashSet; +pub type MyStrMaybe = Option; +pub type MyInt = i64; +pub type MyFloat = f64; +pub type MyBool = bool; +pub type MyFile = Vec; +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct MyObj { + #[serde(rename = "myString")] + pub my_string: MyStr, + pub list: MyStrList, + pub optional: Option, + #[serde(rename = "optionalOptional")] + pub optional_optional: Option, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub enum MyEither { + MyStr(MyStr), + MyStrList(MyStrList), + MyStrSet(MyStrSet), + MyStrMaybe(MyStrMaybe), + MyInt(MyInt), + MyFloat(MyFloat), + MyBool(MyBool), + MyFile(MyFile), + MyObj(MyObj), +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub enum MyUnion { + MyStr(MyStr), + MyStrList(MyStrList), + MyStrSet(MyStrSet), + MyStrMaybe(MyStrMaybe), + MyInt(MyInt), + MyFloat(MyFloat), + MyBool(MyBool), + MyFile(MyFile), + MyObj(MyObj), + MyEither(MyEither), +} +"#, + ), + ( + "cycles_obj", + vec![ + TypeNode::Object { + data: ObjectTypeData { + properties: [("obj_b".to_string(), 1)].into_iter().collect(), + required: ["obj_b"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjA".into(), + ..default_type_node_base() + }, + }, + TypeNode::Object { + data: ObjectTypeData { + properties: [("obj_c".to_string(), 2)].into_iter().collect(), + required: ["obj_c"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjB".into(), + ..default_type_node_base() + }, + }, + TypeNode::Object { + data: ObjectTypeData { + properties: [("obj_a".to_string(), 0)].into_iter().collect(), + required: ["obj_a"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjC".into(), + ..default_type_node_base() + }, + }, + ], + "ObjC", + r#"#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjB { + pub obj_c: ObjC, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjA { + pub obj_b: ObjB, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjC { + pub obj_a: Box, +} +"#, + ), + ( + "cycles_union", + vec![ + TypeNode::Object { + data: ObjectTypeData { + properties: [("obj_b".to_string(), 1)].into_iter().collect(), + required: ["obj_b"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjA".into(), + ..default_type_node_base() + }, + }, + TypeNode::Object { + data: ObjectTypeData { + properties: [("union_c".to_string(), 2)].into_iter().collect(), + required: ["union_c"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjB".into(), + ..default_type_node_base() + }, + }, + TypeNode::Union { + data: UnionTypeData { any_of: vec![0] }, + base: TypeNodeBase { + title: "CUnion".into(), + ..default_type_node_base() + }, + }, + ], + "CUnion", + r#"#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjB { + pub union_c: CUnion, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjA { + pub obj_b: ObjB, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub enum CUnion { + ObjA(Box), +} +"#, + ), + ( + "cycles_either", + vec![ + TypeNode::Object { + data: ObjectTypeData { + properties: [("obj_b".to_string(), 1)].into_iter().collect(), + required: ["obj_b"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjA".into(), + ..default_type_node_base() + }, + }, + TypeNode::Object { + data: ObjectTypeData { + properties: [("either_c".to_string(), 2)].into_iter().collect(), + required: ["either_c"].into_iter().map(Into::into).collect(), + }, + base: TypeNodeBase { + title: "ObjB".into(), + ..default_type_node_base() + }, + }, + TypeNode::Either { + data: EitherTypeData { one_of: vec![0] }, + base: TypeNodeBase { + title: "CEither".into(), + ..default_type_node_base() + }, + }, + ], + "CEither", + r#"#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjB { + pub either_c: CEither, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct ObjA { + pub obj_b: ObjB, +} +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub enum CEither { + ObjA(Box), +} +"#, + ), + ]; + for (test_name, nodes, name, out) in cases { + let mut dest = GenDestBuf { buf: String::new() }; + let (gen_name, _) = gen_type( + nodes.len() as u32 - 1, + &nodes, + &mut dest, + &mut HashMap::new(), + &GenTypesOptions { + derive_serde: true, + derive_debug: true, + }, + &[], + )?; + + assert_eq!( + &gen_name[..], + name, + "{test_name}: generated unexpected type name" + ); + assert_eq!( + dest.buf.as_str(), + out, + "{test_name}: output buffer was not equal for {name}\n{}{}", + dest.buf.as_str(), + out, + ); + } + Ok(()) + } +} + +/* static TEMPLATE: &'static str = r#" +{{- for trait derive_attrs -}} +{{- if @first -}} +#[derive( +{{- endif -}} +{trait}, +{{- if @last -}} +#] +{{- endif -}} +{{- endfor }} +pub struct {ty_name} \\{ +{{ for prop props }} +{{ if prop.rename }} #[serde(rename = "{prop.name}")]{{ endif }} + {prop.norm_name}: {prop.ty_name}, +{{ endfor }} +}"#; +*/ diff --git a/libs/metagen/src/mdk_rust/utils.rs b/libs/metagen/src/mdk_rust/utils.rs new file mode 100644 index 0000000000..856f254fb9 --- /dev/null +++ b/libs/metagen/src/mdk_rust/utils.rs @@ -0,0 +1,52 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use heck::*; +use once_cell::sync::Lazy; + +static KEYWORDS: Lazy> = Lazy::new(|| { + [ + // strict keywords + "as", "break", "const", "continue", "crate", "else", "enum", "extern", "false", "fn", "for", + "if", "impl", "in", "let", "loop", "match", "mod", "move", "mut", "pub", "ref", "return", + "self", "Self", "static", "struct", "super", "trait", "true", "type", "unsafe", "use", + "where", "while", // + // 2018+ keywords + "async", "await", "dyn", // + // reserved keywords + "abstract", "become", "box", "do", "final", "macro", "override", "priv", "typeof", + "unsized", "virtual", "yield", // + // 2018+ reserved keywords + "try", + ] + .into_iter() + .collect() +}); + +pub fn normalize_type_title(title: &str) -> String { + static RE: Lazy = + Lazy::new(|| regex::Regex::new(r"^(?\d+)(?.*)").unwrap()); + + // TODO: clean out rust keywords + // TODO: clean up non valid chars + + // clean out underscores at start/end + let title = title.trim_matches('_'); + // move any numbers at start to end + let title = title.to_pascal_case(); + let title = RE.replace(&title, "$rest$startd"); + if KEYWORDS.contains(&title[..]) { + format!("r#{title}") + } else { + title.to_string() + } +} + +pub fn normalize_struct_prop_name(title: &str) -> String { + let title = title.to_snek_case(); + if KEYWORDS.contains(&title[..]) { + format!("r#{title}") + } else { + title + } +} diff --git a/libs/metagen/src/tests/fixtures.rs b/libs/metagen/src/tests/fixtures.rs new file mode 100644 index 0000000000..0aac0960f8 --- /dev/null +++ b/libs/metagen/src/tests/fixtures.rs @@ -0,0 +1,100 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use crate::interlude::*; +use common::typegraph::*; + +pub async fn test_typegraph_1() -> anyhow::Result { + let out = tokio::process::Command::new("cargo") + .args( + // "run -p meta-cli -- serialize -f tests/tg.ts" + "run -p meta-cli -- serialize -f ../../examples/typegraphs/reduce.py" + .split(' ') + .collect::>(), + ) + .kill_on_drop(true) + .output() + .await?; + let mut tg: Vec = serde_json::from_slice(&out.stdout) + .with_context(|| format!("error deserializing typegraph: {out:?}"))?; + Ok(tg.pop().unwrap()) +} + +#[allow(unused)] +pub fn test_typegraph_2() -> Typegraph { + Typegraph { + id: "https://metatype.dev/specs/0.0.3.json".into(), + path: None, + policies: vec![], + deps: vec![], + meta: TypeMeta { + ..Default::default() + }, + runtimes: vec![common::typegraph::runtimes::TGRuntime::Unknown( + common::typegraph::runtimes::UnknownRuntime { + name: "wasm".into(), + data: Default::default(), + }, + )], + materializers: vec![Materializer { + name: "function".into(), + runtime: 0, + data: Default::default(), + effect: Effect { + effect: None, + idempotent: false, + }, + }], + types: vec![ + TypeNode::Object { + data: ObjectTypeData { + properties: Default::default(), + required: vec![], + }, + base: TypeNodeBase { + ..default_type_node_base() + }, + }, + TypeNode::Integer { + data: IntegerTypeData { + maximum: None, + multiple_of: None, + exclusive_minimum: None, + exclusive_maximum: None, + minimum: None, + }, + base: TypeNodeBase { + title: "my_int".into(), + ..default_type_node_base() + }, + }, + TypeNode::Function { + data: FunctionTypeData { + input: 1, + output: 1, + rate_calls: false, + rate_weight: None, + materializer: 0, + parameter_transform: None, + }, + base: TypeNodeBase { + title: "my_func".into(), + ..default_type_node_base() + }, + }, + ], + } +} + +pub fn default_type_node_base() -> TypeNodeBase { + TypeNodeBase { + title: String::new(), + as_id: false, + config: Default::default(), + runtime: 0, + policies: vec![], + injection: None, + description: None, + enumeration: None, + } +} diff --git a/libs/metagen/src/tests/mod.rs b/libs/metagen/src/tests/mod.rs new file mode 100644 index 0000000000..96c4dbf91a --- /dev/null +++ b/libs/metagen/src/tests/mod.rs @@ -0,0 +1,118 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use crate::{interlude::*, *}; + +mod fixtures; +pub use fixtures::*; + +#[derive(Clone)] +struct TestCtx { + typegraphs: Arc>, +} + +impl InputResolver for TestCtx { + async fn resolve(&self, order: GeneratorInputOrder) -> anyhow::Result { + match order { + GeneratorInputOrder::TypegraphDesc { name } => { + Ok(GeneratorInputResolved::TypegraphDesc { + raw: self.typegraphs.get(&name).unwrap().clone(), + }) + } + } + } +} + +pub struct BuildArgs { + pub path: PathBuf, +} + +type BoxFuture = std::pin::Pin + Send + Sync + 'static>>; + +pub struct E2eTestCase { + pub target: String, + pub config: config::Config, + pub target_dir: PathBuf, + pub typegraphs: HashMap, + pub build_fn: fn(BuildArgs) -> BoxFuture>, +} + +pub async fn e2e_test(cases: Vec) -> anyhow::Result<()> { + // spin_up_typegate + for case in cases { + let tmp_dir = tokio::task::spawn_blocking(|| tempfile::tempdir()) + .await?? + .into_path(); + { + let mut dir = tokio::fs::read_dir(&case.target_dir).await?; + while let Some(entry) = dir.next_entry().await? { + let entry_path = entry.path(); + let target_path = tmp_dir.join(entry.path().strip_prefix(&case.target_dir)?); + tokio::fs::copy(entry_path, &target_path) + .await + .context("error copying target_dir to temp dir")?; + } + } + + // generate + let typegraphs = Arc::new(case.typegraphs); + let test_cx = TestCtx { + typegraphs: typegraphs.clone(), + }; + let files = crate::generate_target(&case.config, &case.target, test_cx).await?; + for (path, buf) in files { + let path = tmp_dir.join(path); + tokio::fs::create_dir_all(path.parent().unwrap()).await?; + tokio::fs::write(path, buf).await?; + } + // compile + (case.build_fn)(BuildArgs { + path: tmp_dir.to_owned(), + }) + .await?; + // TODO: upload typegraph along with compiled wasm + /* for (_name, tg) in typegraphs.iter() { + node.try_deploy(tg, &Default::default(), env!("CARGO_PKG_VERSION").into()) + .await?; + } */ + // TODO: query generated stub functions + + // cleanup + tokio::fs::remove_dir_all(tmp_dir).await?; + // node.try_undeploy(&typegraphs.keys().cloned().collect::>()).await?; + } + Ok(()) +} + +#[allow(unused)] +async fn spin_up_typegate() -> anyhow::Result<(tokio::process::Child, common::node::Node)> { + let tg_port = 7899; + + let tg_secret = + "a4lNi0PbEItlFZbus1oeH/+wyIxi9uH6TpL8AIqIaMBNvp7SESmuUBbfUwC0prxhGhZqHw8vMDYZAGMhSZ4fLw=="; + let tg_admin_password = "password"; + + let typegate = tokio::process::Command::new("cargo") + .args(&["r", "-p", "typegate"]) + .envs([ + ("LOG_LEVEL".to_string(), "DEBUG".to_string()), + ("TG_PORT".to_string(), tg_port.to_string()), + ("TG_SECRET".to_string(), tg_secret.to_string()), + ( + "TG_ADMIN_PASSWORD".to_string(), + tg_admin_password.to_string(), + ), + ]) + .kill_on_drop(true) + .spawn()?; + let node = common::node::Node::new( + format!("localhost:{tg_port}"), + None, + Some(common::node::BasicAuth { + username: "admin".into(), + password: tg_admin_password.into(), + }), + Default::default(), + )?; + Ok((typegate, node)) +} diff --git a/libs/metagen/src/utils.rs b/libs/metagen/src/utils.rs new file mode 100644 index 0000000000..03821d3c4a --- /dev/null +++ b/libs/metagen/src/utils.rs @@ -0,0 +1,22 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use crate::interlude::*; + +trait GenDest {} + +pub struct GenDestBuf { + pub buf: String, +} +impl GenDest for GenDestBuf {} + +pub struct GenDestFs { + pub files: HashMap, +} +impl GenDest for GenDestFs {} + +trait Generate { + type Dest: GenDest; + + fn generate(&self, dest: &mut Self::Dest) -> anyhow::Result<()>; +} diff --git a/libs/metagen/tests/mat_rust/Cargo.toml b/libs/metagen/tests/mat_rust/Cargo.toml new file mode 100644 index 0000000000..3b51de56fa --- /dev/null +++ b/libs/metagen/tests/mat_rust/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "mat_rust" +edition = "2021" +version = "0.3.7-0" + +[workspace] +members = ["gen"] + +[lib] +path = "lib.rs" +crate-type = ["cdylib", "rlib"] + +[dependencies] +gen_test_mdk.path = "./gen" diff --git a/libs/metagen/tests/mat_rust/lib.rs b/libs/metagen/tests/mat_rust/lib.rs new file mode 100644 index 0000000000..6d36d3c11c --- /dev/null +++ b/libs/metagen/tests/mat_rust/lib.rs @@ -0,0 +1,9 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +use gen_test_mdk::*; + +#[allow(unused)] +fn init() { + println!("im in it"); +} diff --git a/libs/metagen/tests/package.json b/libs/metagen/tests/package.json new file mode 100644 index 0000000000..a1879520e4 --- /dev/null +++ b/libs/metagen/tests/package.json @@ -0,0 +1,10 @@ +{ + "name": "test", + "type": "module", + "version": "1.0.0", + "dependencies": {}, + "devDependencies": { + "tsx": "^3.13.0", + "typescript": "^5.2.2" + } +} diff --git a/libs/metagen/tests/tg.ts b/libs/metagen/tests/tg.ts new file mode 100644 index 0000000000..8a6db06dfa --- /dev/null +++ b/libs/metagen/tests/tg.ts @@ -0,0 +1,37 @@ +import { + Policy, + t, + typegraph, +} from "../../../typegraph/node/sdk/dist/index.js"; +import { RandomRuntime } from "../../../typegraph/node/sdk/dist/runtimes/random.js"; + +typegraph( + { + name: "gen-test", + builder(g) { + const obj = t.struct({ + str: t.string(), + int: t.integer(), + file: t.file(), + opt: t.optional(t.string()), + either: t.either([ + t.struct({ a: t.string() }), + t.struct({ b: t.string() }), + ]), + union: t.union([ + t.struct({ a: t.string() }), + t.struct({ b: t.string() }), + ]), + list: t.list(t.string()), + }); + + const rand_rt = new RandomRuntime({}); + g.expose( + { + random: rand_rt.gen(obj), + }, + Policy.public(), + ); + }, + }, +); diff --git a/libs/typescript/Cargo.toml b/libs/typescript/Cargo.toml index 0055db3aa7..cdd9889a93 100644 --- a/libs/typescript/Cargo.toml +++ b/libs/typescript/Cargo.toml @@ -4,7 +4,7 @@ version = "0.3.7-0" edition = "2021" [dependencies] -anyhow = "1.0.75" +anyhow.workspace = true lazy_static = "1.4.0" dprint-plugin-typescript = "0.89.2" swc_common = { workspace = true, features = ["tty-emitter"] } diff --git a/libs/xtask/Cargo.toml b/libs/xtask/Cargo.toml index 0fb4e88535..1759828bac 100644 --- a/libs/xtask/Cargo.toml +++ b/libs/xtask/Cargo.toml @@ -4,14 +4,14 @@ version = "0.3.7-0" edition = "2021" [dependencies] -anyhow = "1.0.75" +anyhow.workspace = true clap = { workspace = true, features = ["derive"] } common = { path = "../common", features = ["codegen"] } typescript = { path = "../typescript" } schemars = { version = "0.8.16", features = ["indexmap2"] } -serde_json = "1.0.108" +serde_json.workspace = true project-root = "0.2.2" mt_deno.workspace = true typegate_engine.workspace = true -log = "0.4.20" +log.workspace = true env_logger.workspace = true diff --git a/meta-cli/Cargo.toml b/meta-cli/Cargo.toml index 1c4e32473e..320ece46ba 100644 --- a/meta-cli/Cargo.toml +++ b/meta-cli/Cargo.toml @@ -38,19 +38,19 @@ self_update = { version = "0.38.0", features = [ ] } prisma-models = { git = "https://github.com/prisma/prisma-engines", tag = "5.5.2" } lazy_static = "1.4.0" -tokio = { version = "1.34.0", features = ["full"] } +tokio = { workspace = true, features = ["full"] } futures = "0.3.29" -log = "0.4.20" +log.workspace = true clap-verbosity-flag = "2.1.0" crossbeam-channel = "0.5.8" notify-debouncer-mini = { version = "0.4.1", default-features = false } tiny_http = "0.12.0" ignore = "0.4.20" globset = "0.4.13" -anyhow = "1.0.75" -indoc = "2.0.4" -serde = { version = "1.0.192", features = ["derive"] } -serde_json = { version = "1.0.108", features = ["preserve_order"] } +anyhow.workspace = true +indoc.workspace = true +serde.workspace = true +serde_json = { workspace = true, features = ["preserve_order"] } reqwest = { workspace = true, features = ["json"] } colored = "2.0.4" question = "0.2.2" @@ -63,7 +63,7 @@ typescript = { path = "../libs/typescript" } serde_yaml = "0.9.27" pathdiff = "0.2.1" openssl = { version = "0.10.59", features = ["vendored"] } -indexmap = { version = "2.1.0", features = ["serde"] } +indexmap.workspace = true lade-sdk = "0.9.1" async-trait = "0.1.74" async-recursion = "1.0.5" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ce2b8231c5..568d44cb5f 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.75.0" components = ["rustfmt", "clippy"] -targets = [ "wasm32-unknown-unknown" ] +targets = [ "wasm32-unknown-unknown", "wasm32-wasi" ] diff --git a/typegate/engine/Cargo.toml b/typegate/engine/Cargo.toml index 871fcf5474..fef80c68e3 100644 --- a/typegate/engine/Cargo.toml +++ b/typegate/engine/Cargo.toml @@ -4,12 +4,12 @@ edition.workspace = true version.workspace = true [dependencies] -anyhow = "1.0" -thiserror = "1.0.50" -tokio = { version = "1.34.0", features = ["full"] } -log = "0.4.20" +anyhow.workspace = true +thiserror.workspace = true +tokio = { workspace = true, features = ["full"] } +log.workspace = true futures = "0.3" -once_cell = "1.18.0" +once_cell.workspace = true base64 = "0.21.5" dashmap = "5.5.3" num-traits = "0.2.17" @@ -26,7 +26,7 @@ query-engine-metrics = { git = "https://github.com/prisma/prisma-engines", tag = schema-core = { git = "https://github.com/prisma/prisma-engines", tag = "5.5.2" } psl = { git = "https://github.com/prisma/prisma-engines", tag = "5.5.2" } schema-connector = { git = "https://github.com/prisma/prisma-engines", tag = "5.5.2" } -tempfile = "3.8.1" +tempfile.workspace = true tap = "1.0.1" convert_case = "0.6.0" connection-string = "0.2.0" @@ -37,7 +37,7 @@ wasmedge-sdk.workspace = true wasmedge-sys.workspace = true wasmedge-types.workspace = true shadow-rs.workspace = true -serde = { version = "1.0", features = ["derive"] } +serde.workspace = true regex = "1.10.2" [dev-dependencies] diff --git a/typegate/standalone/Cargo.toml b/typegate/standalone/Cargo.toml index 2702a6cd12..1b1d7b8c75 100644 --- a/typegate/standalone/Cargo.toml +++ b/typegate/standalone/Cargo.toml @@ -8,6 +8,6 @@ colored = "2.0.4" envconfig = "0.10.0" sentry = { version = "0.31.8", features = ["anyhow"] } env_logger.workspace = true -log = "0.4.20" +log.workspace = true typegate_engine.workspace = true location-macros = "0.1.2" diff --git a/typegraph/core/Cargo.toml b/typegraph/core/Cargo.toml index f3b970d2b7..2f34d4364d 100644 --- a/typegraph/core/Cargo.toml +++ b/typegraph/core/Cargo.toml @@ -8,14 +8,14 @@ crate-type = ["cdylib", "rlib"] [dependencies] enum_dispatch = "0.3.12" -once_cell = "1.18.0" -serde = { version = "1.0.192", features = ["derive"] } -serde_json = "1.0.108" +once_cell.workspace = true +serde.workspace = true +serde_json.workspace = true wit-bindgen = "0.12.0" -regex = "1.10.2" -indexmap = { version = "2.1.0", features = ["serde"] } +regex.workspace = true +indexmap.workspace = true common = { path = "../../libs/common" } -indoc = "2.0.4" +indoc.workspace = true graphql-parser = "0.4.0" sha2 = "0.10.8" paste = "1.0.14" @@ -26,4 +26,4 @@ ordered-float = "4.2.0" insta = { version = "1.34.0", features = ["glob"] } pathdiff = "0.2.1" ptree = "0.4.0" -indoc = "2.0.4" +indoc.workspace = true diff --git a/whiz.yaml b/whiz.yaml index 07740752da..c3ffb96075 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -109,7 +109,7 @@ setup: - typegraph/python/pyproject.toml - website/package.json env: - GHJK_VERSION: "f380522" + GHJK_VERSION: "423d38" command: | set -e curl -fsSL https://raw.githubusercontent.com/metatypedev/ghjk/$GHJK_VERSION/install.sh | bash