Action: Added global YAML.parseDockerCompose, TOML.parseResourceFile, and other convenience methods and typings available within the script.
conststack=awaitkomodo.read("GetStack",{stack:"test-stack"});// Returns an object with the DockerCompose type to help extract information from the compose file
constcompose: DockerCompose=YAML.parseDockerCompose(stack.config.file_contents);constservice=compose.services["hello_world"];const[image,version]=service.image.split(":")console.log("Image:",image);console.log("Version:",version);
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/moghtech/komodo/pull/151
**Author:** [@mbecker20](https://github.com/mbecker20)
**Created:** 10/26/2024
**Status:** ✅ Merged
**Merged:** 10/26/2024
**Merged by:** [@mbecker20](https://github.com/mbecker20)
**Base:** `main` ← **Head:** `1.16.4`
---
### 📝 Commits (9)
- [`9170633`](https://github.com/moghtech/komodo/commit/917063321c227a391c0c5b8a75c6727eb6db9972) rust client improvements and docs
- [`2afbc7f`](https://github.com/moghtech/komodo/commit/2afbc7f1f4482dff5d95caeac9ae1425588b445e) sync rust client
- [`13e2a0b`](https://github.com/moghtech/komodo/commit/13e2a0b57088a3ab8865f1557f636050779bbf36) version 1.16.4
- [`097b5fb`](https://github.com/moghtech/komodo/commit/097b5fb882953b5b58ef0230418bd462052c8e56) UI support YAML / TOML utils, typed Deno namespace
- [`b614dab`](https://github.com/moghtech/komodo/commit/b614dabacf12b0bf57f9813f7e5d22d7f3277f0d) add ResourcesToml to typeshare
- [`b7c188c`](https://github.com/moghtech/komodo/commit/b7c188ccce82a12bbc34c9409781316bd1b1fe7b) add YAML and TOML convenience
- [`bc35c66`](https://github.com/moghtech/komodo/commit/bc35c66f95d141c66fe46c47fe8dbc909b3d78f6) make the types available globally
- [`ab16925`](https://github.com/moghtech/komodo/commit/ab16925854b8c5ce96335447c703cbb4daed3ec4) preload container with @std/yaml and @std/toml, clean up genned files
- [`8208fd8`](https://github.com/moghtech/komodo/commit/8208fd8e8b6e4a1e38420a59b88f2014b619df3f) add deno setup to alpine dockerfile
### 📊 Changes
**22 files changed** (+8201 additions, -130 deletions)
<details>
<summary>View changed files</summary>
📝 `Cargo.lock` (+13 -12)
📝 `Cargo.toml` (+1 -1)
📝 `bin/cli/src/state.rs` (+4 -2)
📝 `bin/core/alpine.Dockerfile` (+6 -0)
📝 `bin/core/debian.Dockerfile` (+6 -0)
📝 `bin/core/src/api/execute/action.rs` (+108 -14)
📝 `client/core/rs/Cargo.toml` (+2 -0)
📝 `client/core/rs/README.md` (+32 -1)
📝 `client/core/rs/src/entities/toml.rs` (+34 -29)
📝 `client/core/rs/src/lib.rs` (+98 -16)
📝 `client/core/rs/src/request.rs` (+108 -19)
📝 `client/core/rs/src/ws.rs` (+9 -9)
📝 `client/core/ts/README.md` (+5 -9)
📝 `client/core/ts/package.json` (+1 -1)
📝 `client/core/ts/src/types.ts` (+71 -0)
📝 `docsite/docs/api.md` (+48 -4)
📝 `example/update_logger/src/main.rs` (+2 -1)
📝 `frontend/public/client/types.d.ts` (+67 -0)
➕ `frontend/public/deno.d.ts` (+6653 -0)
📝 `frontend/public/index.d.ts` (+917 -2)
_...and 2 more files_
</details>
### 📄 Description
- **Action**: Added global `YAML.parseDockerCompose`, `TOML.parseResourceFile`, and other convenience methods and typings available within the script.
```ts
const stack = await komodo.read("GetStack", { stack: "test-stack" });
// Returns an object with the DockerCompose type to help extract information from the compose file
const compose: DockerCompose = YAML.parseDockerCompose(stack.config.file_contents);
const service = compose.services["hello_world"];
const [image, version] = service.image.split(":")
console.log("Image:", image);
console.log("Version:", version);
```
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/moghtech/komodo/pull/151
Author: @mbecker20
Created: 10/26/2024
Status: ✅ Merged
Merged: 10/26/2024
Merged by: @mbecker20
Base:
main← Head:1.16.4📝 Commits (9)
9170633rust client improvements and docs2afbc7fsync rust client13e2a0bversion 1.16.4097b5fbUI support YAML / TOML utils, typed Deno namespaceb614dabadd ResourcesToml to typeshareb7c188cadd YAML and TOML conveniencebc35c66make the types available globallyab16925preload container with @std/yaml and @std/toml, clean up genned files8208fd8add deno setup to alpine dockerfile📊 Changes
22 files changed (+8201 additions, -130 deletions)
View changed files
📝
Cargo.lock(+13 -12)📝
Cargo.toml(+1 -1)📝
bin/cli/src/state.rs(+4 -2)📝
bin/core/alpine.Dockerfile(+6 -0)📝
bin/core/debian.Dockerfile(+6 -0)📝
bin/core/src/api/execute/action.rs(+108 -14)📝
client/core/rs/Cargo.toml(+2 -0)📝
client/core/rs/README.md(+32 -1)📝
client/core/rs/src/entities/toml.rs(+34 -29)📝
client/core/rs/src/lib.rs(+98 -16)📝
client/core/rs/src/request.rs(+108 -19)📝
client/core/rs/src/ws.rs(+9 -9)📝
client/core/ts/README.md(+5 -9)📝
client/core/ts/package.json(+1 -1)📝
client/core/ts/src/types.ts(+71 -0)📝
docsite/docs/api.md(+48 -4)📝
example/update_logger/src/main.rs(+2 -1)📝
frontend/public/client/types.d.ts(+67 -0)➕
frontend/public/deno.d.ts(+6653 -0)📝
frontend/public/index.d.ts(+917 -2)...and 2 more files
📄 Description
YAML.parseDockerCompose,TOML.parseResourceFile, and other convenience methods and typings available within the script.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.