From e006c70e7b5f1ff61bc66af8aa3bd53e1386901f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Fri, 28 Feb 2025 21:51:09 +0100 Subject: [PATCH 1/7] build: bump tool versions in .prototools and package.json --- .prototools | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.prototools b/.prototools index 184f803..8de9bc3 100644 --- a/.prototools +++ b/.prototools @@ -1,8 +1,8 @@ -gh = "2.51.0" -just = "1.29.1" -moon = "1.25.6" -node = "22.3.0" -rust = "1.79.0" +gh = "2.67.0" +just = "1.39.0" +moon = "1.32.7" +node = "22.14.0" +rust = "1.85.0" [plugins] gh = "https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/gh/plugin.toml" diff --git a/package.json b/package.json index 95479f8..caa792d 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,6 @@ }, "packageManager": "yarn@4.2.2", "engines": { - "node": "22.3.0" + "node": "22.14.0" } } From 758de2e090d2e9de2c5f46b0f935c798141df620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Fri, 28 Feb 2025 21:49:46 +0100 Subject: [PATCH 2/7] fix(sentry-cli): fix download URLs Unfortunately, Sentry has inconsistent download URLs, e.g. same arch has different name across os'es. As far as I know it is not possible to configure all of this with non-WASM plugins. This commit is a best-effort, realizing arm for MacOS and x64 for Linux/Windows (along with some other combinations) --- sentry-cli/plugin.toml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sentry-cli/plugin.toml b/sentry-cli/plugin.toml index 6f99d4f..ae31dab 100644 --- a/sentry-cli/plugin.toml +++ b/sentry-cli/plugin.toml @@ -8,22 +8,17 @@ type = "cli" git-url = "https://github.com/getsentry/sentry-cli" [platform.linux] -bin-path = "sentry-cli-Linux-{arch}" -download-file = "sentry-cli-linux-{arch}-2.32.2.tgz" +download-file = "sentry-cli-linux-{arch}" [platform.macos] -bin-path = "sentry-cli-Darwin-{arch}" -download-file = "sentry-cli-Darwin-{arch}" +download-file = "sentry-cli-Darwin-universal" [platform.windows] -bin-path = "sentry-cli-Windows-{arch}.exe" download-file = "sentry-cli-Windows-{arch}.exe" [install] download-url = "https://github.com/getsentry/sentry-cli/releases/download/{version}/{download_file}" [install.arch] -arm = "arm" -arm64 = "arm64" -x86 = "x86" -x86_64 = "x86_64" \ No newline at end of file +x86 = "i686" +aarch64 = "arm64" From adf80f585f5c31ff8b3096f9e2a935bf78cdb143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Fri, 29 Nov 2024 22:51:11 +0100 Subject: [PATCH 3/7] feat: add plugin for Taplo --- taplo/README.md | 21 +++++++++++++++++++++ taplo/plugin.test.ts | 8 ++++++++ taplo/plugin.toml | 23 +++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 taplo/README.md create mode 100644 taplo/plugin.test.ts create mode 100644 taplo/plugin.toml diff --git a/taplo/README.md b/taplo/README.md new file mode 100644 index 0000000..e762fbe --- /dev/null +++ b/taplo/README.md @@ -0,0 +1,21 @@ +# Taplo plugin + +[Taplo](https://taplo.tamasfe.dev/) plugin for [proto](https://github.com/moonrepo/proto). + +## Installation + +This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running: + +### Global install + +```shell +proto plugin add taplo "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/taplo/plugin.toml" --global +proto install taplo +``` + +### Per-project install + +```shell +proto plugin add taplo "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/taplo/plugin.toml" +proto pin taplo latest --resolve +``` diff --git a/taplo/plugin.test.ts b/taplo/plugin.test.ts new file mode 100644 index 0000000..100808d --- /dev/null +++ b/taplo/plugin.test.ts @@ -0,0 +1,8 @@ +import { run } from "../testkit.js"; + +run({ + name: "taplo", + afterInstall: async ($) => { + await $`taplo --version`; + }, +}); diff --git a/taplo/plugin.toml b/taplo/plugin.toml new file mode 100644 index 0000000..5bef1e9 --- /dev/null +++ b/taplo/plugin.toml @@ -0,0 +1,23 @@ +# A TOML plugin for Taplo: +# https://moonrepo.dev/docs/proto/toml-plugin + +name = "Taplo" +type = "cli" + +[platform.linux] +download-file = "taplo-{os}-{arch}.gz" +exe-path = "taplo-{os}-{arch}" + +[platform.macos] +download-file = "taplo-darwin-{arch}.gz" +exe-path = "taplo-darwin-{arch}" + +[platform.windows] +download-file = "taplo-{os}-{arch}.zip" +exe-path = "taplo-{os}-{arch}.exe" + +[install] +download-url = "https://github.com/tamasfe/taplo/releases/download/{version}/{download_file}" + +[resolve] +git-url = "https://github.com/tamasfe/taplo" From 6da29b7664c005f44445070c2ae9a7c8ba0cca1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Fri, 29 Nov 2024 23:01:53 +0100 Subject: [PATCH 4/7] feat: add plugin for Terrascan --- terrascan/README.md | 21 +++++++++++++++++++++ terrascan/plugin.test.ts | 8 ++++++++ terrascan/plugin.toml | 25 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 terrascan/README.md create mode 100644 terrascan/plugin.test.ts create mode 100644 terrascan/plugin.toml diff --git a/terrascan/README.md b/terrascan/README.md new file mode 100644 index 0000000..af18d3b --- /dev/null +++ b/terrascan/README.md @@ -0,0 +1,21 @@ +# Terrascan plugin + +[Terrascan](https://runterrascan.io/) plugin for [proto](https://github.com/moonrepo/proto). + +## Installation + +This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running: + +### Global install + +```shell +proto plugin add terrascan "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/terrascan/plugin.toml" --global +proto install terrascan +``` + +### Per-project install + +```shell +proto plugin add terrascan "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/terrascan/plugin.toml" +proto pin terrascan latest --resolve +``` diff --git a/terrascan/plugin.test.ts b/terrascan/plugin.test.ts new file mode 100644 index 0000000..d357aae --- /dev/null +++ b/terrascan/plugin.test.ts @@ -0,0 +1,8 @@ +import { run } from "../testkit.js"; + +run({ + name: "terrascan", + afterInstall: async ($) => { + await $`terrascan version`; + }, +}); diff --git a/terrascan/plugin.toml b/terrascan/plugin.toml new file mode 100644 index 0000000..8400980 --- /dev/null +++ b/terrascan/plugin.toml @@ -0,0 +1,25 @@ +# A TOML plugin for Terrascan: +# https://moonrepo.dev/docs/proto/toml-plugin + +name = "Terrascan" +type = "cli" + +[platform.linux] +download-file = "terrascan_{version}_Linux_{arch}.tar.gz" + +[platform.macos] +download-file = "terrascan_{version}_Darwin_{arch}.tar.gz" + +[platform.windows] +download-file = "terrascan_{version}_Windows_{arch}.tar.gz" + +[install] +checksum-url = "https://github.com/tenable/terrascan/releases/download/v{version}/checksums.txt" +download-url = "https://github.com/tenable/terrascan/releases/download/v{version}/{download_file}" + +[install.arch] +x86 = "i386" +aarch64 = "arm64" + +[resolve] +git-url = "https://github.com/tenable/terrascan" From f0e12affb293dae21a4d117aaf9499f5986960cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Sat, 1 Mar 2025 19:43:43 +0100 Subject: [PATCH 5/7] fix(taplo): set correct exe-path for windows --- taplo/plugin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taplo/plugin.toml b/taplo/plugin.toml index 5bef1e9..471910e 100644 --- a/taplo/plugin.toml +++ b/taplo/plugin.toml @@ -14,7 +14,7 @@ exe-path = "taplo-darwin-{arch}" [platform.windows] download-file = "taplo-{os}-{arch}.zip" -exe-path = "taplo-{os}-{arch}.exe" +exe-path = "taplo.exe" [install] download-url = "https://github.com/tamasfe/taplo/releases/download/{version}/{download_file}" From db77b7be9e2d1ca3d544169dc92912bd0dcecece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Sat, 1 Mar 2025 19:58:15 +0100 Subject: [PATCH 6/7] fix(terrascan): set URL for windows to zip Change download-file for windows to the zipfile instead of tar-gz, because the checksum file does not work for the tar-gz one due to an extraneous space before the file extension. --- terrascan/plugin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terrascan/plugin.toml b/terrascan/plugin.toml index 8400980..b774cbb 100644 --- a/terrascan/plugin.toml +++ b/terrascan/plugin.toml @@ -11,7 +11,7 @@ download-file = "terrascan_{version}_Linux_{arch}.tar.gz" download-file = "terrascan_{version}_Darwin_{arch}.tar.gz" [platform.windows] -download-file = "terrascan_{version}_Windows_{arch}.tar.gz" +download-file = "terrascan_{version}_Windows_{arch}.zip" [install] checksum-url = "https://github.com/tenable/terrascan/releases/download/v{version}/checksums.txt" From c562acd9d8f2d04951fc80d26451793558053e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Reetz?= Date: Sat, 1 Mar 2025 21:42:28 +0100 Subject: [PATCH 7/7] feat(dotenv-linter): add new proto plugin Add proto plugin for dotenv-linter. Because of inconsistent naming in the source repo, aarch64 only works on mac. --- dotenv-linter/README.md | 21 +++++++++++++++++++++ dotenv-linter/plugin.test.ts | 8 ++++++++ dotenv-linter/plugin.toml | 23 +++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 dotenv-linter/README.md create mode 100644 dotenv-linter/plugin.test.ts create mode 100644 dotenv-linter/plugin.toml diff --git a/dotenv-linter/README.md b/dotenv-linter/README.md new file mode 100644 index 0000000..e5befa4 --- /dev/null +++ b/dotenv-linter/README.md @@ -0,0 +1,21 @@ +# Dotenv-linter plugin + +[Dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) plugin for [proto](https://github.com/moonrepo/proto). + +## Installation + +This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running: + +### Global install + +```shell +proto plugin add dotenv-linter "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/dotenv-linter/plugin.toml" --global +proto install dotenv-linter +``` + +### Per-project install + +```shell +proto plugin add dotenv-linter "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/dotenv-linter/plugin.toml" +proto pin dotenv-linter latest --resolve +``` diff --git a/dotenv-linter/plugin.test.ts b/dotenv-linter/plugin.test.ts new file mode 100644 index 0000000..df4184a --- /dev/null +++ b/dotenv-linter/plugin.test.ts @@ -0,0 +1,8 @@ +import { run } from "../testkit.js"; + +run({ + name: "dotenv-linter", + afterInstall: async ($) => { + await $`dotenv-linter --version`; + }, +}); diff --git a/dotenv-linter/plugin.toml b/dotenv-linter/plugin.toml new file mode 100644 index 0000000..6a9191f --- /dev/null +++ b/dotenv-linter/plugin.toml @@ -0,0 +1,23 @@ +# A TOML plugin for dotenv-linter: +# https://moonrepo.dev/docs/proto/toml-plugin + +name = "dotenv-linter" +type = "cli" + +[platform.linux] +download-file = "dotenv-linter-{os}-{arch}.tar.gz" + +[platform.macos] +download-file = "dotenv-linter-darwin-{arch}.tar.gz" + +[platform.windows] +download-file = "dotenv-linter-win-x64.zip" + +[install] +download-url = "https://github.com/dotenv-linter/dotenv-linter/releases/download/v{version}/{download_file}" + +[install.arch] +aarch64 = "arm64" + +[resolve] +git-url = "https://github.com/dotenv-linter/dotenv-linter"