Compare commits

..

183 Commits

Author SHA1 Message Date
David Barroso
438355bff0 asd 2025-09-26 14:52:50 +02:00
David Barroso
62b97838fe sad 2025-09-26 14:50:26 +02:00
David Barroso
d287191f7a asd 2025-09-26 14:16:53 +02:00
David Barroso
b8d2127b06 sad 2025-09-26 14:08:09 +02:00
David Barroso
28cec232c8 asd 2025-09-26 14:06:37 +02:00
David Barroso
fe853da133 asd 2025-09-26 14:04:54 +02:00
David Barroso
c4445135bf asd 2025-09-26 13:50:21 +02:00
David Barroso
db7366dfc7 Merge branch 'main' of github.com:nhost/nhost into storage-releases 2025-09-26 13:49:59 +02:00
David Barroso
31c503e458 asd 2025-09-26 13:46:58 +02:00
David Barroso
187d35412e chore(ci): prepare storage releases 2025-09-26 13:46:48 +02:00
David Barroso
4c93094e4d chore(ci): enable dependabot for github actions (#3519) 2025-09-26 13:35:03 +02:00
David Barroso
2ba53e4fef chore(ci): minor improvements (#3518) 2025-09-26 13:28:01 +02:00
David Barroso
23bd2f8d4f chore(storage): integrate storage code into nhost/nhost (#3515) 2025-09-26 12:46:35 +02:00
robertkasza
a14d1e4f22 chore(dashboard): fix defects in basetable form and add comment to columns (#3475) 2025-09-26 11:28:33 +02:00
David Barroso
7509bd8a96 Merge branch 'storage' 2025-09-26 09:31:47 +02:00
David Barroso
0b560dcb52 feat(storage): import nhost/hasura-storage into ./services/storage/ 2025-09-25 16:56:32 +02:00
David Barroso
51619dbf87 feat: generate server boilerplate from openapi schema (#245) 2025-09-25 16:33:50 +02:00
dependabot[bot]
40707e534e chore: bump nixbuild/nix-quick-install-action from 31 to 32 (#244)
### **User description**
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 31 to 32.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v32</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.24.14 -&gt; 2.24.15, 2.26.3 -&gt; 2.26.4,
2.28.3 -&gt; 2.28.4, 2.29.1 -&gt; 2.29.1. This fixes the security
vulnerabilities
reported in <a
href="https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/">https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/</a>.</p>
</li>
<li>
<p>Bump default Nix version: 2.29.0 -&gt; 2.29.1</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v32</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.24.14 -&gt; 2.24.15, 2.26.3 -&gt; 2.26.4,
2.28.3 -&gt; 2.28.4, 2.29.1 -&gt; 2.29.1. This fixes the security
vulnerabilities
reported in <a
href="https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/">https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/</a>.</p>
</li>
<li>
<p>Bump default Nix version: 2.29.0 -&gt; 2.29.1</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="63ca48f939"><code>63ca48f</code></a>
Release v32</li>
<li><a
href="561f57d8ff"><code>561f57d</code></a>
Fix Nix versions</li>
<li><a
href="fb259be9d0"><code>fb259be</code></a>
Fix Nix versions</li>
<li><a
href="78439c724d"><code>78439c7</code></a>
Update Nix versions (<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/69">#69</a>)</li>
<li><a
href="b0bad79cb8"><code>b0bad79</code></a>
Fix version</li>
<li><a
href="c3bd2b7f38"><code>c3bd2b7</code></a>
Update README and workflows for v31</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v31...v32">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=31&new-version=32)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
dependencies


___

### **Description**
- Bump `nixbuild/nix-quick-install-action` from v31 to v32 in workflow

- Updates CI to use latest Nix installer action version

- No application or logic changes, CI/dependency update only


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_schedule_update_deps.yaml</strong><dd><code>Update
Nix installer action to v32 in workflow</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_schedule_update_deps.yaml

<li>Updated GitHub Actions workflow to use
<br><code>nixbuild/nix-quick-install-action@v32</code> instead of
v31<br> <li> Ensures CI uses the latest version of the Nix installer
action


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/244/files#diff-ae003e22c1e5cbf186e1749d77dec35965e521d2583ba8cf45fcb1c8f300e177">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-26 10:31:23 +02:00
dependabot[bot]
75a508afe8 chore: bump nixbuild/nix-quick-install-action from 30 to 31 (#242)
### **User description**
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 30 to 31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v31</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.25.5</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.12 -&gt; 2.24.14, 2.26.1 -&gt; 2.26.3
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.28.3, 2.29.0</p>
</li>
<li>
<p>Bump default Nix version: 2.24.12 -&gt; 2.29.0</p>
</li>
<li>
<p>Fix issue with 'experimental-features' setting getting overwritten
(<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>).</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v31</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.25.5</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.12 -&gt; 2.24.14, 2.26.1 -&gt; 2.26.3
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.28.3, 2.29.0</p>
</li>
<li>
<p>Bump default Nix version: 2.24.12 -&gt; 2.29.0</p>
</li>
<li>
<p>Fix issue with 'experimental-features' setting getting overwritten
(<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>).</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="889f3180bb"><code>889f318</code></a>
Release v31</li>
<li><a
href="09d596a493"><code>09d596a</code></a>
Fix workflow</li>
<li><a
href="ce8e5b9320"><code>ce8e5b9</code></a>
Document <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/45">#45</a></li>
<li><a
href="d9bcabc69f"><code>d9bcabc</code></a>
Avoid overwriting user-supplied experimental-feature setting. Fixes <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>.</li>
<li><a
href="9eb57d6652"><code>9eb57d6</code></a>
Remove unused file</li>
<li><a
href="b6ab472bc4"><code>b6ab472</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/67">#67</a>
from nixbuild/nix_2_29</li>
<li><a
href="255feab0a1"><code>255feab</code></a>
Add Nix 2.29. Remove deprecated version 2.25.</li>
<li><a
href="8505cd40ae"><code>8505cd4</code></a>
Update README and workflows for v30</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v30...v31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=30&new-version=31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Other


___

### **Description**
- Bump nixbuild/nix-quick-install-action from v30 to v31

- Updates GitHub Actions dependency for Nix installation

- Includes newer Nix versions and bug fixes


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_schedule_update_deps.yaml</strong><dd><code>Update
Nix installation action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_schedule_update_deps.yaml

- Update nixbuild/nix-quick-install-action version from v30 to v31


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/242/files#diff-ae003e22c1e5cbf186e1749d77dec35965e521d2583ba8cf45fcb1c8f300e177">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-23 08:44:24 +02:00
dependabot[bot]
a7353a83fd chore: bump Codium-ai/pr-agent from 0.29 to 0.30 (#243)
### **User description**
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.29 to 0.30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.30</h2>
<p>codiumai/pr-agent:0.30
codiumai/pr-agent:0.30-github_app
codiumai/pr-agent:0.30-bitbucket-app
codiumai/pr-agent:0.30-gitlab_webhook
codiumai/pr-agent:0.30-github_action
codiumai/pr-agent:0.30-azure_devops_webhook
codiumai/pr-agent:0.30-gitea-app</p>
<h2>What's Changed</h2>
<ul>
<li>Adding num_max_findings configuration parameter by <a
href="https://github.com/GuBee33"><code>@​GuBee33</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1797">qodo-ai/pr-agent#1797</a></li>
<li>docs: document how to auto-trigger /add_docs via pr_commands by <a
href="https://github.com/jmsb02"><code>@​jmsb02</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1795">qodo-ai/pr-agent#1795</a></li>
<li>Revise the review effort label text in the review document by <a
href="https://github.com/seohyun-lee"><code>@​seohyun-lee</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1799">qodo-ai/pr-agent#1799</a></li>
<li>Add incremental update to documentation by <a
href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1796">qodo-ai/pr-agent#1796</a></li>
<li><a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1657">#1657</a>
add gitea/forgejo support by <a
href="https://github.com/nicholasgribanov"><code>@​nicholasgribanov</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1787">qodo-ai/pr-agent#1787</a></li>
<li>Correct typos in documentation and log messages by <a
href="https://github.com/seohyun-lee"><code>@​seohyun-lee</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1798">qodo-ai/pr-agent#1798</a></li>
<li>fix: reorder exception handling in
<code>LiteLLMAIHandler.chat_completion()</code> by <a
href="https://github.com/KangmoonSeo"><code>@​KangmoonSeo</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1803">qodo-ai/pr-agent#1803</a></li>
<li>Update LICENSE by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1809">qodo-ai/pr-agent#1809</a></li>
<li>docs: include [aws] in .secrets.template by <a
href="https://github.com/darkdread"><code>@​darkdread</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1801">qodo-ai/pr-agent#1801</a></li>
<li>fix: exclude RateLimitError from <code>@retry</code> in
<code>AIHandler.chat_completion()</code> by <a
href="https://github.com/KangmoonSeo"><code>@​KangmoonSeo</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1808">qodo-ai/pr-agent#1808</a></li>
<li>Add unit tests for try_fix_yaml function by <a
href="https://github.com/jwsong98"><code>@​jwsong98</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1812">qodo-ai/pr-agent#1812</a></li>
<li>feat: add support for Claude 4 family by <a
href="https://github.com/hirobf10"><code>@​hirobf10</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1814">qodo-ai/pr-agent#1814</a></li>
<li>Add Grok-3 non-beta model IDs by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1817">qodo-ai/pr-agent#1817</a></li>
<li>Add Unit Tests and Improve Documentation for utils.py clip_tokens
Function by <a
href="https://github.com/TaskerJang"><code>@​TaskerJang</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1816">qodo-ai/pr-agent#1816</a></li>
<li>Refactor count_tokens method structure in token_handler.py for
better extensibility by <a
href="https://github.com/Kkan9ma"><code>@​Kkan9ma</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1805">qodo-ai/pr-agent#1805</a></li>
<li>Improve/describe tool documentation and make add_diagram feature
opt-in by default by <a
href="https://github.com/ssunbear"><code>@​ssunbear</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1824">qodo-ai/pr-agent#1824</a></li>
<li>fix: ensure proper formatting of changes_diagram in PR description
ou… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1827">qodo-ai/pr-agent#1827</a></li>
<li>fix(test_language_handler): Add edge case for files with unknown
extensions by <a
href="https://github.com/wonggamggik"><code>@​wonggamggik</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1818">qodo-ai/pr-agent#1818</a></li>
<li>Feature/test get max tokens by <a
href="https://github.com/wonggamggik"><code>@​wonggamggik</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1819">qodo-ai/pr-agent#1819</a></li>
<li>Complete Gemini 2.5 Flash model info by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1822">qodo-ai/pr-agent#1822</a></li>
<li>Add unit tests for fix_json_escape_char function by <a
href="https://github.com/idealHyun"><code>@​idealHyun</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1825">qodo-ai/pr-agent#1825</a></li>
<li>test: add tests for converting to markdown by <a
href="https://github.com/dst03106"><code>@​dst03106</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1829">qodo-ai/pr-agent#1829</a></li>
<li>docs: correct parameter name typo and update description by <a
href="https://github.com/isExample"><code>@​isExample</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1831">qodo-ai/pr-agent#1831</a></li>
<li>Refactor: Enhance AI Handler Robustness, Interface Compliance, and
Asynchronous Operations (Resolves <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1784">#1784</a>)
by <a href="https://github.com/Akileox"><code>@​Akileox</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1828">qodo-ai/pr-agent#1828</a></li>
<li>[Feature] - Gitea implement by <a
href="https://github.com/pinyoothotaboot"><code>@​pinyoothotaboot</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1811">qodo-ai/pr-agent#1811</a></li>
<li>docs: add dedicated &quot;Chat on code suggestions&quot; core
ability by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1835">qodo-ai/pr-agent#1835</a></li>
<li>docs: enhance review.md with ticket compliance labels and merge
block… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1837">qodo-ai/pr-agent#1837</a></li>
<li>docs: add Linear integration to ticket context fetching
documentation by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1838">qodo-ai/pr-agent#1838</a></li>
<li>Reorganize and Enhance Tools Documentation with Improved Navigation
and Consistency
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1840">qodo-ai/pr-agent#1840</a></li>
<li>feat: add AWS Secrets Manager Integration for Lambda deployments by
<a href="https://github.com/yamoyamoto"><code>@​yamoyamoto</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1839">qodo-ai/pr-agent#1839</a></li>
<li>docs: update trial usage information to reflect new quota-based
model by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1832">qodo-ai/pr-agent#1832</a></li>
<li>docs: add global hierarchical best practices system by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1844">qodo-ai/pr-agent#1844</a></li>
<li>Hl/multi jira server docs by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1845">qodo-ai/pr-agent#1845</a></li>
<li>Update atlassian-connect.json by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1850">qodo-ai/pr-agent#1850</a></li>
<li>Add Google Gemini 2.5 Pro Preview 06-05 by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1853">qodo-ai/pr-agent#1853</a></li>
<li>Fix gitea get file content error by <a
href="https://github.com/SCREEN88"><code>@​SCREEN88</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1852">qodo-ai/pr-agent#1852</a></li>
<li>chore: add APAC region endpoints for Bedrock Anthropic Claude models
by <a href="https://github.com/kebhr"><code>@​kebhr</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1851">qodo-ai/pr-agent#1851</a></li>
<li>docs: update PR benchmark to ranking-based methodology with expanded
… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1866">qodo-ai/pr-agent#1866</a></li>
<li>Add GitLab support for CHANGELOG.md by <a
href="https://github.com/cesdperez"><code>@​cesdperez</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1856">qodo-ai/pr-agent#1856</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eb4cdbb115"><code>eb4cdbb</code></a>
fix: remove branch parameter from get_content_of_file call in bitbucket
serve...</li>
<li><a
href="7f54b14b4d"><code>7f54b14</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1874">#1874</a>
from yoohya/feat/support-gitlab-lambda-webhooks</li>
<li><a
href="938ab9a139"><code>938ab9a</code></a>
fix: remove redundant word 'possible' from security concerns field
description</li>
<li><a
href="75bde39b03"><code>75bde39</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1888">#1888</a>
from qodo-ai/tr/simplify_toDo</li>
<li><a
href="ee36c0208c"><code>ee36c02</code></a>
Update pr_agent/settings/pr_reviewer_prompts.toml</li>
<li><a
href="7c02678ba5"><code>7c02678</code></a>
refactor: extract TODO formatting functions and simplify data
structure</li>
<li><a
href="235df737d0"><code>235df73</code></a>
docs: update Docker image tags</li>
<li><a
href="37ef4bad8f"><code>37ef4ba</code></a>
docs: add bullet point formatting instruction to PR description
prompts</li>
<li><a
href="ab7e0d9141"><code>ab7e0d9</code></a>
refactor: split serverless handlers into dedicated GitHub and GitLab
Lambda e...</li>
<li><a
href="7db4d97fc2"><code>7db4d97</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1880">#1880</a>
from alessio-locatelli/fix_yes_no</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.29...v0.30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.29&new-version=0.30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Other


___

### **Description**
- Bump Codium-ai/pr-agent GitHub Action from v0.29 to v0.30

- Update dependency version in workflow configuration

- Maintain existing workflow functionality and permissions


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Update pr-agent
action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

- Updated Codium-ai/pr-agent action version from v0.29 to v0.30


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/243/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-23 08:38:18 +02:00
David Barroso
c2b5a499af chore: update CI (#240)
### **PR Type**
Enhancement


___

### **Description**
• Enhanced CI security with permission checks and safe_to_test label
• Added AI-powered PR review workflow with Claude integration
• Migrated to Blacksmith runners and S3-based Nix cache
• Improved AWS integration with OIDC and ECR authentication


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>checks.yaml</strong><dd><code>Enhanced security with
permission checks</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/checks.yaml

• Changed trigger from <code>pull_request</code> to
<code>pull_request_target</code> for <br>security<br> • Added permission
check job requiring <code>safe_to_test</code> label or <br>trusted
user<br> • Added secrets for AWS account, Nix cache keys<br> • Added
<br>job to automatically remove <code>safe_to_test</code> label after
use


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/240/files#diff-4af11422a4987e947e5a47adead7a30d32cdb2db82e2d3fe36f8e6cbe84d5ac5">+36/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Added AI review
workflow</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

• New workflow for AI-powered PR reviews using Claude Sonnet model<br> •
<br>Triggers on PR events and issue comments<br> • Configured with
OpenAI and <br>Anthropic API keys<br> • Ignores generated files and
vendor directories


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/240/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+27/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_build_artifacts.yaml</strong><dd><code>Migrated to
Blacksmith runners and S3 cache</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/wf_build_artifacts.yaml

• Migrated from Ubuntu runners to Blacksmith ARM/x64 runners<br> •
<br>Replaced Magic Nix Cache with S3-based cache using AWS
credentials<br> • <br>Added AWS OIDC configuration and ECR
integration<br> • Improved <br>architecture detection and artifact
naming


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/240/files#diff-63d6f3e2e5894df4d88cf2c82b3d0c90e7b0b7c8ca9da25a3d46f35f15270fb0">+28/-22</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_check.yaml</strong><dd><code>Enhanced checks with
AWS integration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_check.yaml

• Migrated to Blacksmith ARM runner with reduced timeout<br> • Added AWS
<br>OIDC and ECR login configuration<br> • Replaced Magic Nix Cache with
<br>S3-based cache<br> • Enhanced build verification for both Go and
Node <br>components


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/240/files#diff-c2ecea6736037ba6304681d744d612d44d7681788d2fbc58ce223cf52ecefa43">+47/-25</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yaml</strong><dd><code>Updated release workflow
secrets</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/release.yaml

• Added secrets for AWS account and Nix cache keys<br> • Removed
<code>DOCKER</code> <br>input parameter from build artifacts call


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-storage/pull/240/files#diff-e426ed45842837026e10e66af23d9c7077e89eacbe6958ce7cb991130ad05ada">+9/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-05-30 11:39:15 +02:00
David Barroso
b0a2ceb368 chore: update dependencies (#238) 2025-05-06 11:44:25 +02:00
dependabot[bot]
a957f4051a chore: bump cachix/install-nix-action from 30 to 31 (#236)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 30 to 31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.24.9 -&gt; 2.25.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/218">cachix/install-nix-action#218</a></li>
<li>ci: fix latest installer tests by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/220">cachix/install-nix-action#220</a></li>
<li>ci: add ubuntu-24.04-arm to matrix by <a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
<li>nix: 2.25.2 -&gt; 2.26.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/226">cachix/install-nix-action#226</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> made
their first contribution in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">https://github.com/cachix/install-nix-action/compare/v30...v31</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91a0719595"><code>91a0719</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/226">#226</a>
from Mic92/nix-update</li>
<li><a
href="d81eadf041"><code>d81eadf</code></a>
nix: 2.25.2 -&gt; 2.26.2</li>
<li><a
href="3d69a1d4d2"><code>3d69a1d</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/221">#221</a>
from msgilligan/msgilligan/github-test-aarch64-linux</li>
<li><a
href="265a04a520"><code>265a04a</code></a>
GitHub test.yml: add ubuntu-24.04-arm to matrix</li>
<li><a
href="89fd1e98db"><code>89fd1e9</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/220">#220</a>
from cachix/fix-master-tests</li>
<li><a
href="a76df16350"><code>a76df16</code></a>
ci: bump nixpkgs channel</li>
<li><a
href="a49b703498"><code>a49b703</code></a>
ci: fix act test</li>
<li><a
href="f3f544c44b"><code>f3f544c</code></a>
ci: fix latest installer tests</li>
<li><a
href="14344b39ca"><code>14344b3</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/218">#218</a>
from Mic92/nix-upgrade</li>
<li><a
href="b1deb06f62"><code>b1deb06</code></a>
nix: 2.24.9 -&gt; 2.25.2</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=30&new-version=31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:34:33 +01:00
David Barroso
47bd415a97 chore: update minio (#235) 2025-03-05 15:40:10 +01:00
dependabot[bot]
730948f07b chore: bump nixbuild/nix-quick-install-action from 29 to 30 (#234)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 29 to 30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v30</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.18.8, 2.19.6, 2.20.8, 2.21.4, 2.23.3</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.9 -&gt; 2.24.12
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.25.5, 2.26.1</p>
</li>
<li>
<p>Bump default Nix version: 2.24.9 -&gt; 2.24.12</p>
</li>
<li>
<p>Add support for <code>ubuntu-24.04-arm</code> (aarch64-linux)
runners.</p>
</li>
<li>
<p>Enable support for KVM in builds. Can be turned off with the new
<code>enable_kvm</code>
configuration option.</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v30</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.18.8, 2.19.6, 2.20.8, 2.21.4, 2.23.3</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.9 -&gt; 2.24.12
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.25.5, 2.26.1</p>
</li>
<li>
<p>Bump default Nix version: 2.24.9 -&gt; 2.24.12</p>
</li>
<li>
<p>Add support for <code>ubuntu-24.04-arm</code> (aarch64-linux)
runners.</p>
</li>
<li>
<p>Enable support for KVM in builds. Can be turned off with the new
<code>enable_kvm</code>
configuration option.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5bb6a3b3ab"><code>5bb6a3b</code></a>
Release v30</li>
<li><a
href="607b4cf724"><code>607b4cf</code></a>
Remove outdated documentation (fixes <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/57">#57</a>)</li>
<li><a
href="5f5c23a20a"><code>5f5c23a</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/52">#52</a>
from azuwis/macos-volume</li>
<li><a
href="9f331f3772"><code>9f331f3</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/59">#59</a>
from nixbuild/readd_nix_2_3</li>
<li><a
href="904096fd8f"><code>904096f</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/56">#56</a>
from Smona/enable-kvm-on-linux</li>
<li><a
href="acdadbc3a6"><code>acdadbc</code></a>
Nix 2.3 doesn't work on aarch64-linux for some reason</li>
<li><a
href="0006832f24"><code>0006832</code></a>
ci: Fix syntax</li>
<li><a
href="450f0c1fe7"><code>450f0c1</code></a>
ci: Exclude Nix 2.3 on aarch64-linux</li>
<li><a
href="900859c11a"><code>900859c</code></a>
Add back Nix 2.3</li>
<li><a
href="73e45e62a2"><code>73e45e6</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/58">#58</a>
from deemp/master</li>
<li>Additional commits viewable in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v29...v30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=29&new-version=30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-28 14:48:43 +01:00
Jason Overmier
818654f8ef feat: Reduce AVIF Transform CPU Load by Lowering Effort Level (#233)
## Problem
The default AVIF encoding effort level was set to 5, which resulted in
high CPU usage during image transformations. This could make the storage
service resource-intensive and less suitable for lightweight or
small-server deployments.

## Solution
Set the AVIF effort level to 0 (fastest) instead of the default 5. This
change significantly reduces CPU load during image transformation,
making the storage service more efficient and lightweight.

## Notes
Lower effort levels trade off some compression efficiency for reduced
CPU usage.
This adjustment helps optimize performance on small-scale servers while
still maintaining acceptable image quality.
2025-02-28 12:04:16 +01:00
David Barroso
6790c7d08f feat: added support for avif and "format" query arg to transform output format (#232)
Fixes https://github.com/nhost/nhost/issues/2508 and
https://github.com/nhost/nhost/issues/3212
2025-02-21 07:16:03 +01:00
David Barroso
5f1a23960a chore: update dependencies (#231) 2025-02-03 16:14:47 +01:00
dependabot[bot]
e4da899d59 chore: bump DeterminateSystems/magic-nix-cache-action from 8 to 9 (#230)
Bumps
[DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action)
from 8 to 9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/determinatesystems/magic-nix-cache-action/releases">DeterminateSystems/magic-nix-cache-action's
releases</a>.</em></p>
<blockquote>
<h2>v9</h2>
<h2>What's Changed</h2>
<ul>
<li>ci workflow: don't check initial substituter list by <a
href="https://github.com/colemickens"><code>@​colemickens</code></a> in
<a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/90">DeterminateSystems/magic-nix-cache-action#90</a></li>
<li>Matrix by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/96">DeterminateSystems/magic-nix-cache-action#96</a></li>
<li>Update <code>detsys-ts</code>: Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/69">#69</a>
from DeterminateSystems/update-deps by <a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/99">DeterminateSystems/magic-nix-cache-action#99</a></li>
<li>Fixup diagnostic URL handling by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/100">DeterminateSystems/magic-nix-cache-action#100</a></li>
<li>Diagnostics by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/101">DeterminateSystems/magic-nix-cache-action#101</a></li>
<li>Warn on mnc usage by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/102">DeterminateSystems/magic-nix-cache-action#102</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v8...v9">https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v8...v9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6221693898"><code>6221693</code></a>
Warn on mnc usage (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/102">#102</a>)</li>
<li><a
href="f7eb5b510a"><code>f7eb5b5</code></a>
Diagnostics (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/101">#101</a>)</li>
<li><a
href="fe89a484fe"><code>fe89a48</code></a>
Fixup diagnostic URL handling (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/100">#100</a>)</li>
<li><a
href="13dabe8ccc"><code>13dabe8</code></a>
Update <code>detsys-ts</code> for: `Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/69">#69</a>
from DeterminateSystems/updat...</li>
<li><a
href="9ab3ce70d6"><code>9ab3ce7</code></a>
Matrix (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/96">#96</a>)</li>
<li><a
href="a76a83091c"><code>a76a830</code></a>
ci workflow: don't check initial substituter list (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/90">#90</a>)</li>
<li>See full diff in <a
href="https://github.com/determinatesystems/magic-nix-cache-action/compare/v8...v9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DeterminateSystems/magic-nix-cache-action&package-manager=github_actions&previous-version=8&new-version=9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 10:00:05 +01:00
dependabot[bot]
b2dc2dd8f9 chore: bump nixbuild/nix-quick-install-action from 28 to 29 (#229)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 28 to 29.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v29</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.18.2 -&gt; 2.18.8, 2.19.3 -&gt; 2.19.6,
2.20.5 -&gt; 2.20.8,
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.22.3, 2.23.3, 2.24.9</p>
</li>
<li>
<p>Bump default Nix version: 2.21.0 -&gt; 2.24.9</p>
</li>
<li>
<p>Add support for <code>macos-14</code> (ARM64) runners, and remove
support for deprecated
runners. The supported runners are now <code>ubuntu-22.04</code>,
<code>macos-13</code> and
<code>macos-14</code>. Other runners might work, but are not tested by
the
<code>nix-quick-install-action</code> CI.</p>
</li>
</ul>
<h2>Supported Nix Versions on Linux Runners</h2>
<ul>
<li>2.24.9</li>
<li>2.23.3</li>
<li>2.22.3</li>
<li>2.21.4</li>
<li>2.20.8</li>
<li>2.19.6</li>
<li>2.18.8</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on MacOS Runners</h2>
<ul>
<li>2.24.9</li>
<li>2.23.3</li>
<li>2.22.3</li>
<li>2.21.4</li>
<li>2.20.8</li>
<li>2.19.6</li>
<li>2.18.8</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v29</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.18.2 -&gt; 2.18.8, 2.19.3 -&gt; 2.19.6,
2.20.5 -&gt; 2.20.8,
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.22.3, 2.23.3, 2.24.9</p>
</li>
<li>
<p>Bump default Nix version: 2.21.0 -&gt; 2.24.9</p>
</li>
<li>
<p>Add support for <code>macos-14</code> (ARM64) runners, and remove
support for deprecated
runners. The supported runners are now <code>ubuntu-22.04</code>,
<code>macos-13</code> and
<code>macos-14</code>. Other runners might work, but are not tested by
the
<code>nix-quick-install-action</code> CI.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="25aff27c25"><code>25aff27</code></a>
Release v29</li>
<li><a
href="e2067cf49b"><code>e2067cf</code></a>
flake: Remove unused system</li>
<li><a
href="4ed3e0f5c8"><code>4ed3e0f</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/51">#51</a>
from nixbuild/update-actions</li>
<li><a
href="1e71a36371"><code>1e71a36</code></a>
ci: Add arch to artifact names</li>
<li><a
href="da4598eac4"><code>da4598e</code></a>
ci: Update actions</li>
<li><a
href="1a459e021e"><code>1a459e0</code></a>
Work around MacOS Arm64 bootstrap problem</li>
<li><a
href="55b85d501e"><code>55b85d5</code></a>
ci: Also build with macos-14 so MacOS Arm64 artifacts are produced</li>
<li><a
href="843aed6c2a"><code>843aed6</code></a>
Fix incorrect env var in install script</li>
<li><a
href="4f426bb427"><code>4f426bb</code></a>
Remove obsolete comment in install script</li>
<li><a
href="eb8469b4e1"><code>eb8469b</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/47">#47</a>
from dbarrosop/master</li>
<li>Additional commits viewable in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v28...v29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=28&new-version=29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 08:55:46 +01:00
github-actions[bot]
c21d1d4547 chore: modify update dependencies schedule (#228)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-11-01 09:53:33 +01:00
dependabot[bot]
e0c0709d1e chore: bump cachix/install-nix-action from 29 to 30 (#226)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 29 to 30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v30</h2>
<ul>
<li>Nix: 2.24.7 -&gt; 2.24.9, fixing <a
href="https://github.com/NixOS/nix/security/advisories/GHSA-6fjr-mq49-mm2c">GHSA-6fjr-mq49-mm2c</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="08dcb3a5e6"><code>08dcb3a</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/217">#217</a>
from Enzime/bump</li>
<li><a
href="4204e15198"><code>4204e15</code></a>
nix: 2.24.8 -&gt; 2.24.9</li>
<li><a
href="6a10e2e9fd"><code>6a10e2e</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/216">#216</a>
from Mic92/nix-bump</li>
<li><a
href="2bb614e91a"><code>2bb614e</code></a>
Nix: 2.24.7 -&gt; 2.24.8</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v29...v30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=29&new-version=30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 09:42:07 +02:00
github-actions[bot]
449f1c58cf [Scheduled] Update dependencies (#225)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-10-01 09:26:15 +02:00
dependabot[bot]
97eb40b2a2 chore: bump cachix/install-nix-action from V28 to 29 (#224)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from V28 to 29. This release includes the previously tagged commit.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v29</h2>
<p>Bumps Nix to 2.24.8 to fix CVE-2024-47174</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9f70348d77"><code>9f70348</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/215">#215</a>
from Mic92/nix-bump</li>
<li><a
href="4f91dc2b65"><code>4f91dc2</code></a>
Nix: 2.24.6 -&gt; 2.24.7</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/V28...v29">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-27 12:07:53 +02:00
dependabot[bot]
d2e05005ed chore: bump cachix/install-nix-action from 27 to 28 (#222)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 27 to 28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v28</h2>
<p>Nix 2.24.6 - <a
href="https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493">https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3715ab1a11"><code>3715ab1</code></a>
bump channel</li>
<li><a
href="1872f1ff9d"><code>1872f1f</code></a>
Nix: 2.22.1 -&gt; 2.24.6</li>
<li><a
href="e268b7aa05"><code>e268b7a</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/213">#213</a>
from phaer/patch-1</li>
<li><a
href="5b8c65d4d7"><code>5b8c65d</code></a>
Update README: hardware accel is available now...</li>
<li><a
href="ba01fffc51"><code>ba01fff</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/210">#210</a>
from guoard/patch-1</li>
<li><a
href="474f0a77aa"><code>474f0a7</code></a>
docs(readme): update checkout action version</li>
<li><a
href="725982224c"><code>7259822</code></a>
readme: V27</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v27...V28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=27&new-version=28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 08:08:59 +02:00
dependabot[bot]
168c433729 chore: bump DeterminateSystems/magic-nix-cache-action from 7 to 8 (#221)
Bumps
[DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action)
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/determinatesystems/magic-nix-cache-action/releases">DeterminateSystems/magic-nix-cache-action's
releases</a>.</em></p>
<blockquote>
<h2>v8</h2>
<h2>What's Changed</h2>
<ul>
<li>RUST_LOG default to tracing our stuff, only debug for everything
else by <a
href="https://github.com/colemickens"><code>@​colemickens</code></a> in
<a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/63">DeterminateSystems/magic-nix-cache-action#63</a></li>
<li>Remove package-lock.json by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/64">DeterminateSystems/magic-nix-cache-action#64</a></li>
<li>Prevent the Action from failing with strict mode disabled by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/62">DeterminateSystems/magic-nix-cache-action#62</a></li>
<li>Fix nullish coalescing by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/65">DeterminateSystems/magic-nix-cache-action#65</a></li>
<li>Update detsys-ts by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/66">DeterminateSystems/magic-nix-cache-action#66</a></li>
<li>Provide info output for potential missing permissions block by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/73">DeterminateSystems/magic-nix-cache-action#73</a></li>
<li>Bump fast-xml-parser from 4.4.0 to 4.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/75">DeterminateSystems/magic-nix-cache-action#75</a></li>
<li>Update fast-xml-parser by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/78">DeterminateSystems/magic-nix-cache-action#78</a></li>
<li>Don't run the &quot;trusted&quot; checks if we're in a PR by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/85">DeterminateSystems/magic-nix-cache-action#85</a></li>
<li>Update <code>detsys-ts</code>: Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/63">#63</a>
from DeterminateSystems/retry-streams by <a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/84">DeterminateSystems/magic-nix-cache-action#84</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/colemickens"><code>@​colemickens</code></a>
made their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/63">DeterminateSystems/magic-nix-cache-action#63</a></li>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a> made
their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/75">DeterminateSystems/magic-nix-cache-action#75</a></li>
<li><a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
made their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/84">DeterminateSystems/magic-nix-cache-action#84</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v7...v8">https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v7...v8</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="87b14cf437"><code>87b14cf</code></a>
Update <code>detsys-ts</code> for: `Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/63">#63</a>
from DeterminateSystems/retry...</li>
<li><a
href="538f0296e2"><code>538f029</code></a>
Don't run the &quot;trusted&quot; checks if we're in a PR (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/85">#85</a>)</li>
<li><a
href="9d627e84ff"><code>9d627e8</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/78">#78</a>
from DeterminateSystems/update-fast-xml-parser</li>
<li><a
href="9d32f14410"><code>9d32f14</code></a>
Update fast-xml-parser</li>
<li><a
href="6181dd9ee2"><code>6181dd9</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/75">#75</a>
from DeterminateSystems/dependabot/npm_and_yarn/fast-x...</li>
<li><a
href="768ebc3208"><code>768ebc3</code></a>
Update built package</li>
<li><a
href="1929664175"><code>1929664</code></a>
Bump fast-xml-parser from 4.4.0 to 4.4.1</li>
<li><a
href="56ad6029ca"><code>56ad602</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/73">#73</a>
from DeterminateSystems/clarify-log-message</li>
<li><a
href="45d13621c5"><code>45d1362</code></a>
Provide info output for potential missing permissions block</li>
<li><a
href="7f56db3553"><code>7f56db3</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/66">#66</a>
from DeterminateSystems/update-detsys-ts</li>
<li>Additional commits viewable in <a
href="https://github.com/determinatesystems/magic-nix-cache-action/compare/v7...v8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DeterminateSystems/magic-nix-cache-action&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 08:35:22 +02:00
dependabot[bot]
066bc1df6d chore: bump peter-evans/create-pull-request from 6 to 7 (#220)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.0</h2>
<p> Now supports commit signing with bot-generated tokens! See
&quot;What's new&quot; below. ✍️🤖</p>
<h3>Behaviour changes</h3>
<ul>
<li>Action input <code>git-token</code> has been renamed
<code>branch-token</code>, to be more clear about its purpose. The
<code>branch-token</code> is the token that the action will use to
create and update the branch.</li>
<li>The action now handles requests that have been rate-limited by
GitHub. Requests hitting a primary rate limit will retry twice, for a
total of three attempts. Requests hitting a secondary rate limit will
not be retried.</li>
<li>The <code>pull-request-operation</code> output now returns
<code>none</code> when no operation was executed.</li>
<li>Removed deprecated output environment variable
<code>PULL_REQUEST_NUMBER</code>. Please use the
<code>pull-request-number</code> action output instead.</li>
</ul>
<h3>What's new</h3>
<ul>
<li>The action can now sign commits as <code>github-actions[bot]</code>
when using <code>GITHUB_TOKEN</code>, or your own bot when using <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens">GitHub
App tokens</a>. See <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#commit-signature-verification-for-bots">commit
signing</a> for details.</li>
<li>Action input <code>draft</code> now accepts a new value
<code>always-true</code>. This will set the pull request to draft status
when the pull request is updated, as well as on creation.</li>
<li>A new action input <code>maintainer-can-modify</code> indicates
whether <a
href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork">maintainers
can modify</a> the pull request. The default is <code>true</code>, which
retains the existing behaviour of the action.</li>
<li>A new output <code>pull-request-commits-verified</code> returns
<code>true</code> or <code>false</code>, indicating whether GitHub
considers the signature of the branch's commits to be verified.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.36 to
18.19.39 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3000">peter-evans/create-pull-request#3000</a></li>
<li>build(deps-dev): bump ts-jest from 29.1.5 to 29.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3008">peter-evans/create-pull-request#3008</a></li>
<li>build(deps-dev): bump prettier from 3.3.2 to 3.3.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3018">peter-evans/create-pull-request#3018</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.0 to 29.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3019">peter-evans/create-pull-request#3019</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3035">peter-evans/create-pull-request#3035</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.39 to
18.19.41 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3037">peter-evans/create-pull-request#3037</a></li>
<li>build(deps): bump undici from 6.19.2 to 6.19.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3036">peter-evans/create-pull-request#3036</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.2 to 29.2.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3038">peter-evans/create-pull-request#3038</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.41 to
18.19.42 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3070">peter-evans/create-pull-request#3070</a></li>
<li>build(deps): bump undici from 6.19.4 to 6.19.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3086">peter-evans/create-pull-request#3086</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.42 to
18.19.43 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3087">peter-evans/create-pull-request#3087</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.3 to 29.2.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3088">peter-evans/create-pull-request#3088</a></li>
<li>build(deps): bump undici from 6.19.5 to 6.19.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3145">peter-evans/create-pull-request#3145</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.43 to
18.19.44 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3144">peter-evans/create-pull-request#3144</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3154">peter-evans/create-pull-request#3154</a></li>
<li>build(deps): bump undici from 6.19.7 to 6.19.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3213">peter-evans/create-pull-request#3213</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.44 to
18.19.45 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3214">peter-evans/create-pull-request#3214</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3221">peter-evans/create-pull-request#3221</a></li>
<li>build(deps-dev): bump eslint-import-resolver-typescript from 3.6.1
to 3.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3255">peter-evans/create-pull-request#3255</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.45 to
18.19.46 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3254">peter-evans/create-pull-request#3254</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3256">peter-evans/create-pull-request#3256</a></li>
<li>v7 - signed commits by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/rustycl0ck"><code>@​rustycl0ck</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0">https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0</a></p>
<h2>Create Pull Request v6.1.0</h2>
<p> Adds <code>pull-request-branch</code> as an action output.</p>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4320041ed3"><code>4320041</code></a>
feat: signed commits (v7) (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3057">#3057</a>)</li>
<li><a
href="0c2a66fe4a"><code>0c2a66f</code></a>
build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3256">#3256</a>)</li>
<li><a
href="17121bc5b5"><code>17121bc</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.45 to
18.19.46 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3254">#3254</a>)</li>
<li><a
href="87b5d6d564"><code>87b5d6d</code></a>
build(deps-dev): bump eslint-import-resolver-typescript (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3255">#3255</a>)</li>
<li><a
href="00897e0bc2"><code>00897e0</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3221">#3221</a>)</li>
<li><a
href="4cfc1fc717"><code>4cfc1fc</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.44 to
18.19.45 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3214">#3214</a>)</li>
<li><a
href="cb4ed6491a"><code>cb4ed64</code></a>
build(deps): bump undici from 6.19.7 to 6.19.8 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3213">#3213</a>)</li>
<li><a
href="4eb90b7bc7"><code>4eb90b7</code></a>
ci: separate test suite commands in pr comment</li>
<li><a
href="5308ecb864"><code>5308ecb</code></a>
ci: add sign-commits flag to test suite comment</li>
<li><a
href="ba864ad40c"><code>ba864ad</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3154">#3154</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 08:25:33 +02:00
github-actions[bot]
f1bc6f8e5c [Scheduled] Update dependencies (#218)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-09-01 09:42:46 +02:00
David Barroso
32bec88d4c ci: hotfix for release 2024-08-29 16:55:25 +02:00
David Barroso
aa51d402bd chore: ci: standardize (#217) 2024-08-29 16:31:42 +02:00
github-actions[bot]
218a310641 [Scheduled] Update dependencies (#215)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-08-03 14:21:34 +02:00
github-actions[bot]
c2c86d5b43 [Scheduled] Update dependencies (#212)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-06-02 22:44:37 +02:00
dependabot[bot]
1417ea7209 chore: bump cachix/cachix-action from 14 to 15 (#211)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action)
from 14 to 15.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/cachix-action/releases">cachix/cachix-action's
releases</a>.</em></p>
<blockquote>
<h2>cachix-action-v15</h2>
<h2>What's Changed</h2>
<ul>
<li>Pass <code>cachixArgs</code> to the daemon by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/cachix-action/pull/177">cachix/cachix-action#177</a></li>
<li>Support path filtering when using the daemon by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/cachix-action/pull/182">cachix/cachix-action#182</a></li>
<li>Skip prep steps if using <code>pathsToPush</code> by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/cachix-action/pull/180">cachix/cachix-action#180</a></li>
<li>store-scan: improve error handling when listing the store fails by
<a href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/cachix-action/pull/183">cachix/cachix-action#183</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/cachix-action/compare/v14...v15">https://github.com/cachix/cachix-action/compare/v14...v15</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ad2ddac53f"><code>ad2ddac</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/184">#184</a>
from cachix/dependabot/github_actions/cachix/install-...</li>
<li><a
href="403a1b5dad"><code>403a1b5</code></a>
chore(deps): bump cachix/install-nix-action from 26 to 27</li>
<li><a
href="132bc971f5"><code>132bc97</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/183">#183</a>
from cachix/fix-179</li>
<li><a
href="662a8831be"><code>662a883</code></a>
store-scan: use runner or os temp dirs</li>
<li><a
href="08dcf70a39"><code>08dcf70</code></a>
store-scan: improve error handling when store listing fails</li>
<li><a
href="991af99d4b"><code>991af99</code></a>
Skip prep steps if using <code>pathsToPush</code> (<a
href="https://redirect.github.com/cachix/cachix-action/issues/180">#180</a>)</li>
<li><a
href="74587ee920"><code>74587ee</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/182">#182</a>
from cachix/support-daemon-push-filter</li>
<li><a
href="5ee8857e76"><code>5ee8857</code></a>
Fix syntax</li>
<li><a
href="7431d10aca"><code>7431d10</code></a>
Use bash in post-build hook</li>
<li><a
href="ad440c0fec"><code>ad440c0</code></a>
Make <code>pushFilter</code> filter out just the positive matches</li>
<li>Additional commits viewable in <a
href="https://github.com/cachix/cachix-action/compare/v14...v15">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/cachix-action&package-manager=github_actions&previous-version=14&new-version=15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 09:51:33 +02:00
David Barroso
92b3d6662a chore: update GO version due to CVE (#210) 2024-05-14 15:24:25 +02:00
David Barroso
279714c790 chore: fix CI 2024-05-03 07:57:18 +02:00
dependabot[bot]
2cc8616288 chore: bump nixbuild/nix-quick-install-action from 27 to 28 (#206)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 27 to 28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v28</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove all Nix versions that are vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.</p>
</li>
<li>
<p>Bump minor Nix versions: 2.18.1 -&gt; 2.18.2</p>
</li>
<li>
<p>Add Nix versions: 2.20.5, 2.21.0</p>
</li>
<li>
<p>Bump default Nix version: 2.19.3 -&gt; 2.21.0</p>
</li>
</ul>
<h2>Supported Nix Versions on Linux Runners</h2>
<ul>
<li>2.21.0</li>
<li>2.20.5</li>
<li>2.19.3</li>
<li>2.18.2</li>
<li>2.3.17</li>
</ul>
<h2>Supported Nix Versions on MacOS Runners</h2>
<ul>
<li>2.21.0</li>
<li>2.20.5</li>
<li>2.19.3</li>
<li>2.18.2</li>
<li>2.3.17</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v28</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove all Nix versions that are vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.</p>
</li>
<li>
<p>Bump minor Nix versions: 2.18.1 -&gt; 2.18.2</p>
</li>
<li>
<p>Add Nix versions: 2.20.5, 2.21.0</p>
</li>
<li>
<p>Bump default Nix version: 2.19.3 -&gt; 2.21.0</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="60e9c39264"><code>60e9c39</code></a>
Release v28</li>
<li><a
href="2eeac83915"><code>2eeac83</code></a>
Downgrade nixpkgs because of MacOS build error</li>
<li><a
href="0ff55bf498"><code>0ff55bf</code></a>
Remove Nix 2.22 temporarily</li>
<li><a
href="49704930ae"><code>4970493</code></a>
Bump Nix versions</li>
<li><a
href="f188189575"><code>f188189</code></a>
cicd: Fix Nix version</li>
<li><a
href="ac5ac3025c"><code>ac5ac30</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/42">#42</a>
from nixbuild/nix_2_2x</li>
<li><a
href="de77414845"><code>de77414</code></a>
cicd: Try fix test that fails on MacOS 11/nix 2.21.0</li>
<li><a
href="b657bdb7f8"><code>b657bdb</code></a>
Add Nix 2.20.5 and 2.21.0</li>
<li><a
href="3e26077f8d"><code>3e26077</code></a>
Update README and workflows for v27</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v27...v28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=27&new-version=28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03 07:47:12 +02:00
github-actions[bot]
cd872682db [Scheduled] Update dependencies (#205)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-05-01 19:25:16 +02:00
github-actions[bot]
e23a069a43 [Scheduled] Update dependencies (#203)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-04-02 11:00:03 +02:00
dependabot[bot]
5024de8ecb chore: bump nixbuild/nix-quick-install-action from 26 to 27 (#201)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 26 to 27.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v27</h2>
<h2>Security Notice</h2>
<p>This release (and previous releases) includes Nix versions that are
vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.
The current default Nix version, 2.19.3, is not vulnerable. If you
select another Nix version you should use your own judgement to decide
if CVE-2024-27297 is applicable to your usage of Nix in your GitHub
Actions workflow.</p>
<p>The following Nix versions that are packaged with this action are
<strong>not</strong> vulnerable:</p>
<ul>
<li>2.19.3 (the default version)</li>
<li>2.18.1</li>
<li>2.3.17</li>
</ul>
<p>The above versions have been explicitly patched by the
<code>nixpkgs</code> maintainers.</p>
<p>The rest of the Nix versions provided by this action <strong>are
vulnerable</strong> to CVE-2024-27297.</p>
<p>In the next release of this action (v28), all vulnerable Nix versions
will be removed.</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.3.16 -&gt; 2.3.17</p>
</li>
<li>
<p>Add Nix versions: 2.17.1, 2.18.1, 2.19.3</p>
</li>
<li>
<p>Bump default Nix version: 2.16.2 -&gt; 2.19.3</p>
</li>
</ul>
<h2>Supported Nix Versions on Linux Runners</h2>
<ul>
<li>2.19.3</li>
<li>2.18.1</li>
<li>2.17.1</li>
<li>2.16.2</li>
<li>2.15.3</li>
<li>2.14.1</li>
<li>2.13.6</li>
<li>2.12.1</li>
<li>2.11.1</li>
<li>2.10.3</li>
<li>2.9.2</li>
<li>2.8.1</li>
<li>2.7.0</li>
<li>2.6.1</li>
<li>2.5.1</li>
<li>2.4</li>
<li>2.3.17</li>
<li>2.2.2</li>
<li>2.1.3</li>
<li>2.0.4</li>
</ul>
<h2>Supported Nix Versions on MacOS Runners</h2>
<ul>
<li>2.19.3</li>
<li>2.18.1</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v27</p>
<h2>Security Notice</h2>
<p>This release (and previous releases) includes Nix versions that are
vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.
The current default Nix version, 2.19.3, is not vulnerable. If you
select another Nix version you should use your own judgement to decide
if CVE-2024-27297 is applicable to your usage of Nix in your GitHub
Actions workflow.</p>
<p>The following Nix versions that are packaged with this action are
<strong>not</strong> vulnerable:</p>
<ul>
<li>2.19.3 (the default version)</li>
<li>2.18.1</li>
<li>2.3.17</li>
</ul>
<p>The above versions have been explicitly patched by the
<code>nixpkgs</code> maintainers.</p>
<p>The rest of the Nix versions provided by this action <strong>are
vulnerable</strong> to CVE-2024-27297.</p>
<p>In the next release of this action (v28), all vulnerable Nix versions
will be removed.</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.3.16 -&gt; 2.3.17</p>
</li>
<li>
<p>Add Nix versions: 2.17.1, 2.18.1, 2.19.3</p>
</li>
<li>
<p>Bump default Nix version: 2.16.2 -&gt; 2.19.3</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d02dd28b62"><code>d02dd28</code></a>
Release v27</li>
<li><a
href="123ee16a4d"><code>123ee16</code></a>
Fix variable name</li>
<li><a
href="b35ae20573"><code>b35ae20</code></a>
Retry if db registration fails</li>
<li><a
href="483e6ef9a6"><code>483e6ef</code></a>
Bump nixpkgs revisions to get patches for CVE-2024-27297</li>
<li><a
href="eac9523d35"><code>eac9523</code></a>
Bump default Nix version from 2.16.2 to 2.19.3</li>
<li><a
href="e6c40657c4"><code>e6c4065</code></a>
Revert &quot;Add Nix 2.20.5 and 2.21.0&quot;</li>
<li><a
href="b83db0f5c0"><code>b83db0f</code></a>
Add Nix 2.20.5 and 2.21.0</li>
<li><a
href="896e4387e1"><code>896e438</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/41">#41</a>
from deemp/master</li>
<li><a
href="0e337bef97"><code>0e337be</code></a>
fix(cicd): bump nix version</li>
<li><a
href="a17089ebbc"><code>a17089e</code></a>
chore: update nix versions</li>
<li>Additional commits viewable in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v26...v27">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=26&new-version=27)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-03-18 11:16:48 +01:00
David Barroso
c8a7bcee75 chore: fix role to assume in gen update dependencies (#199)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-03-01 14:02:35 +01:00
David Barroso
843ea6b321 Create SECURITY.md 2024-02-06 10:15:16 +01:00
dependabot[bot]
0d5f5ed0e1 chore: bump release-drafter/release-drafter from 5 to 6 (#198)
Bumps
[release-drafter/release-drafter](https://github.com/release-drafter/release-drafter)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/release-drafter/release-drafter/releases">release-drafter/release-drafter's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h1>What's Changed</h1>
<ul>
<li>Update Node.js to 20 (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1379">#1379</a>)
<a href="https://github.com/massongit"><code>@​massongit</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/release-drafter/release-drafter/compare/v5.25.0...v6.0.0">https://github.com/release-drafter/release-drafter/compare/v5.25.0...v6.0.0</a></p>
<h2>v6.0.0-beta.1</h2>
<p>Prerelease of v6, first release of the CLI, feel free to provide
feedback in the pull request: <a
href="https://redirect.github.com/release-drafter/release-drafter/pull/1204">release-drafter/release-drafter#1204</a></p>
<h2>v5.25.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>add prerelease increment behavior (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1303">#1303</a>)
<a href="https://github.com/neilime"><code>@​neilime</code></a></li>
<li>add latest input (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1348">#1348</a>)
<a href="https://github.com/o-mago"><code>@​o-mago</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/release-drafter/release-drafter/compare/v5.24.0...v5.25.0">https://github.com/release-drafter/release-drafter/compare/v5.24.0...v5.25.0</a></p>
<h2>v5.24.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>Add release version to github action output (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1300">#1300</a>)
<a
href="https://github.com/mehdihadeli"><code>@​mehdihadeli</code></a></li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>fix(release): strip prefix before comparing version (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1255">#1255</a>)
<a href="https://github.com/neilime"><code>@​neilime</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/release-drafter/release-drafter/compare/v5.23.0...v5.24.0">https://github.com/release-drafter/release-drafter/compare/v5.23.0...v5.24.0</a></p>
<h2>v5.23.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>Add <code>include-pre-releases</code> configuration option (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1302">#1302</a>)
<a
href="https://github.com/robbinjanssen"><code>@​robbinjanssen</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0">https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0</a></p>
<h2>v5.22.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>Only use last full release when drafting (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1240">#1240</a>)
<a href="https://github.com/ssbarnea"><code>@​ssbarnea</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3f0f87098b"><code>3f0f870</code></a>
v6.0.0</li>
<li><a
href="80296b4fba"><code>80296b4</code></a>
Update Node.js to 20 (<a
href="https://redirect.github.com/release-drafter/release-drafter/issues/1379">#1379</a>)</li>
<li>See full diff in <a
href="https://github.com/release-drafter/release-drafter/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=release-drafter/release-drafter&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 08:47:54 +01:00
David Barroso
43644e8062 chore: update dependencies (#197) 2024-02-01 17:07:57 +01:00
David Barroso
c5c23f14fd feat: replace custom C code with govips (#196)
We initially wrote our own C code because our benchmarking showed govips
used too much memory but now it seems to be the opposite. Their library
is also better than our custom code and it should fix #194 and #180
2024-01-26 13:58:14 +01:00
dependabot[bot]
e8e78dd422 chore: bump cachix/cachix-action from 13 to 14 (#192)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action)
from 13 to 14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/cachix-action/releases">cachix/cachix-action's
releases</a>.</em></p>
<blockquote>
<h2>cachix-action-v14</h2>
<p><a
href="https://blog.cachix.org/posts/2024-01-12-cachix-v1-7/">https://blog.cachix.org/posts/2024-01-12-cachix-v1-7/</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="18cf96c7c9"><code>18cf96c</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/166">#166</a>
from cachix/feature/daemon</li>
<li><a
href="467b7ad67e"><code>467b7ad</code></a>
daemon: fix support check in post run</li>
<li><a
href="c9fc59c798"><code>c9fc59c</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/161">#161</a>
from cachix/feature/daemon</li>
<li><a
href="e54c44ceb8"><code>e54c44c</code></a>
daemon: drop latest daemon installer</li>
<li><a
href="3a94faeceb"><code>3a94fae</code></a>
daemon: update tests</li>
<li><a
href="a7c8acb335"><code>a7c8acb</code></a>
daemon: add even more logging to trusted user logic</li>
<li><a
href="11a95a781d"><code>11a95a7</code></a>
daemon: resolve promise</li>
<li><a
href="608ce1e442"><code>608ce1e</code></a>
daemon: add debugging logs to trusted user logic</li>
<li><a
href="711a732439"><code>711a732</code></a>
daemon: fix reading trusted-users</li>
<li><a
href="8426524a2b"><code>8426524</code></a>
daemon: check for credentials early</li>
<li>Additional commits viewable in <a
href="https://github.com/cachix/cachix-action/compare/v13...v14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/cachix-action&package-manager=github_actions&previous-version=13&new-version=14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-26 13:02:03 +01:00
dependabot[bot]
5c4068dd74 chore: bump actions/cache from 3 to 4 (#195)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/releases">actions/cache's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update action to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1284">actions/cache#1284</a></li>
<li>feat: save-always flag by <a
href="https://github.com/to-s"><code>@​to-s</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1242">actions/cache#1242</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1284">actions/cache#1284</a></li>
<li><a href="https://github.com/to-s"><code>@​to-s</code></a> made their
first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1242">actions/cache#1242</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v4.0.0">https://github.com/actions/cache/compare/v3...v4.0.0</a></p>
<h2>v3.3.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Cache v3.3.3 by <a
href="https://github.com/robherley"><code>@​robherley</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1302">actions/cache#1302</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/robherley"><code>@​robherley</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1302">actions/cache#1302</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.3.3">https://github.com/actions/cache/compare/v3...v3.3.3</a></p>
<h2>v3.3.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fixed readme with new segment timeout values by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1133">actions/cache#1133</a></li>
<li>Readme fixes by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1134">actions/cache#1134</a></li>
<li>Updated description of the lookup-only input for main action by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1130">actions/cache#1130</a></li>
<li>Change two new actions mention as quoted text by <a
href="https://github.com/bishal-pdMSFT"><code>@​bishal-pdMSFT</code></a>
in <a
href="https://redirect.github.com/actions/cache/pull/1131">actions/cache#1131</a></li>
<li>Update Cross-OS Caching tips by <a
href="https://github.com/pdotl"><code>@​pdotl</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1122">actions/cache#1122</a></li>
<li>Bazel example (Take <a
href="https://redirect.github.com/actions/cache/issues/2">#2</a>️⃣) by
<a href="https://github.com/vorburger"><code>@​vorburger</code></a> in
<a
href="https://redirect.github.com/actions/cache/pull/1132">actions/cache#1132</a></li>
<li>Remove actions to add new PRs and issues to a project board by <a
href="https://github.com/jorendorff"><code>@​jorendorff</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1187">actions/cache#1187</a></li>
<li>Consume latest toolkit and fix dangling promise bug by <a
href="https://github.com/chkimes"><code>@​chkimes</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1217">actions/cache#1217</a></li>
<li>Bump action version to 3.3.2 by <a
href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1236">actions/cache#1236</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/vorburger"><code>@​vorburger</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1132">actions/cache#1132</a></li>
<li><a
href="https://github.com/jorendorff"><code>@​jorendorff</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1187">actions/cache#1187</a></li>
<li><a href="https://github.com/chkimes"><code>@​chkimes</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1217">actions/cache#1217</a></li>
<li><a
href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1236">actions/cache#1236</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.3.2">https://github.com/actions/cache/compare/v3...v3.3.2</a></p>
<h2>v3.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Reduced download segment size to 128 MB and timeout to 10 minutes by
<a href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1129">actions/cache#1129</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.3.1">https://github.com/actions/cache/compare/v3...v3.3.1</a></p>
<h2>v3.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bug: Permission is missing in cache delete example by <a
href="https://github.com/kotokaze"><code>@​kotokaze</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1123">actions/cache#1123</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's
changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h3>3.0.0</h3>
<ul>
<li>Updated minimum runner version support from node 12 -&gt; node
16</li>
</ul>
<h3>3.0.1</h3>
<ul>
<li>Added support for caching from GHES 3.5.</li>
<li>Fixed download issue for files &gt; 2GB during restore.</li>
</ul>
<h3>3.0.2</h3>
<ul>
<li>Added support for dynamic cache size cap on GHES.</li>
</ul>
<h3>3.0.3</h3>
<ul>
<li>Fixed avoiding empty cache save when no files are available for
caching. (<a
href="https://redirect.github.com/actions/cache/issues/624">issue</a>)</li>
</ul>
<h3>3.0.4</h3>
<ul>
<li>Fixed tar creation error while trying to create tar with path as
<code>~/</code> home folder on <code>ubuntu-latest</code>. (<a
href="https://redirect.github.com/actions/cache/issues/689">issue</a>)</li>
</ul>
<h3>3.0.5</h3>
<ul>
<li>Removed error handling by consuming actions/cache 3.0 toolkit, Now
cache server error handling will be done by toolkit. (<a
href="https://redirect.github.com/actions/cache/pull/834">PR</a>)</li>
</ul>
<h3>3.0.6</h3>
<ul>
<li>Fixed <a
href="https://redirect.github.com/actions/cache/issues/809">#809</a> -
zstd -d: no such file or directory error</li>
<li>Fixed <a
href="https://redirect.github.com/actions/cache/issues/833">#833</a> -
cache doesn't work with github workspace directory</li>
</ul>
<h3>3.0.7</h3>
<ul>
<li>Fixed <a
href="https://redirect.github.com/actions/cache/issues/810">#810</a> -
download stuck issue. A new timeout is introduced in the download
process to abort the download if it gets stuck and doesn't finish within
an hour.</li>
</ul>
<h3>3.0.8</h3>
<ul>
<li>Fix zstd not working for windows on gnu tar in issues <a
href="https://redirect.github.com/actions/cache/issues/888">#888</a> and
<a
href="https://redirect.github.com/actions/cache/issues/891">#891</a>.</li>
<li>Allowing users to provide a custom timeout as input for aborting
download of a cache segment using an environment variable
<code>SEGMENT_DOWNLOAD_TIMEOUT_MINS</code>. Default is 60 minutes.</li>
</ul>
<h3>3.0.9</h3>
<ul>
<li>Enhanced the warning message for cache unavailablity in case of
GHES.</li>
</ul>
<h3>3.0.10</h3>
<ul>
<li>Fix a bug with sorting inputs.</li>
<li>Update definition for restore-keys in README.md</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="13aacd865c"><code>13aacd8</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1242">#1242</a>
from to-s/main</li>
<li><a
href="53b35c5439"><code>53b35c5</code></a>
Merge branch 'main' into main</li>
<li><a
href="65b8989fab"><code>65b8989</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1284">#1284</a>
from takost/update-to-node-20</li>
<li><a
href="d0be34d544"><code>d0be34d</code></a>
Fix dist</li>
<li><a
href="66cf064d47"><code>66cf064</code></a>
Merge branch 'main' into update-to-node-20</li>
<li><a
href="1326563738"><code>1326563</code></a>
Merge branch 'main' into main</li>
<li><a
href="e71876755e"><code>e718767</code></a>
Fix format</li>
<li><a
href="01229828ff"><code>0122982</code></a>
Apply workaround for earlyExit</li>
<li><a
href="3185ecfd61"><code>3185ecf</code></a>
Update &quot;only-&quot; actions to node20</li>
<li><a
href="25618a0a67"><code>25618a0</code></a>
Bump version</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/cache/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-18 12:02:00 +01:00
David Barroso
95eaac8e39 chore: replace nix code with standardized nixops (#193)
Only changes are to the .nix files, changes to `.go` files were
performed by the linter `golines -w --base-formatter=gofumpt .`
2024-01-15 11:13:12 +01:00
David Barroso
9304c39b97 chore: update deps (#191) 2024-01-11 19:13:17 +01:00
dependabot[bot]
19d678ce26 chore: bump cachix/cachix-action from 12 to 13 (#189)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action)
from 12 to 13.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/cachix-action/releases">cachix/cachix-action's
releases</a>.</em></p>
<blockquote>
<h2>cachix-action-v13</h2>
<ul>
<li>run on node20</li>
<li>add <code>skipAddingSubstituter</code> to skip running <code>cachix
use</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6a2e08b5eb"><code>6a2e08b</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/158">#158</a>
from cachix/bump-node</li>
<li><a
href="e98f643462"><code>e98f643</code></a>
Commit dist</li>
<li><a
href="2025bdaff1"><code>2025bda</code></a>
Bump node in devenv</li>
<li><a
href="6d013b15ef"><code>6d013b1</code></a>
Bump dependencies</li>
<li><a
href="33393dc192"><code>33393dc</code></a>
Update tsconfig</li>
<li><a
href="1ad072581d"><code>1ad0725</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/156">#156</a>
from cachix/dependabot/github_actions/cachix/install-...</li>
<li><a
href="70d2b7fe3d"><code>70d2b7f</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/cachix-action/issues/157">#157</a>
from cachix/dependabot/github_actions/actions/checkout-4</li>
<li><a
href="d0ac1486c5"><code>d0ac148</code></a>
Run on node20</li>
<li><a
href="fe4b2e9abc"><code>fe4b2e9</code></a>
chore(deps): bump actions/checkout from 3 to 4</li>
<li><a
href="8d53462873"><code>8d53462</code></a>
chore(deps): bump cachix/install-nix-action from 22 to 23</li>
<li>Additional commits viewable in <a
href="https://github.com/cachix/cachix-action/compare/v12...v13">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/cachix-action&package-manager=github_actions&previous-version=12&new-version=13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 08:29:40 +01:00
Guillermo Enrique Bernal Moreira
51ccc70282 feat: migrate to aws-sdk-go-v2 (#186) 2023-11-22 09:39:59 +01:00
David Barroso
3bdbf46a3e chore: bump go to 1.21.4 due to CVE (#187) 2023-11-09 10:57:10 +01:00
ChrisSG
4d226c5b83 adds a flag for specifying the db name for migrations (#185)
## Problem
Currently, it seems that the name of the target database for migrations
is fixed to "default." This produces the following error when there is
no database named "default":
```
problem applying Hasura metadata: problem adding metadata for the buckets table: status_code: 400\nresponse: {"error":"source with name \"default\" does not exist","path":"$.args","code":"not-exists"}
```
(see
https://github.com/nhost/hasura-storage/issues/184#issue-1972012220)

## Solution
To address this issue and provide more flexibility in configuring the
target database for migrations, we propose the following solution:

- **Environment Variable**: Introduce a new environment variable named
`HASURA_DB_NAME` to allow users to specify the target database name for
migrations.

- **Configuration Update**: Modify the code in
`hasura-storage/migrations/hasura.go` to use the value of
`HASURA_DB_NAME` as the target database name. This ensures that users
can configure the target database dynamically.

- **Fallback to "default"**: If `HASURA_DB_NAME` is not set, the code
should default to "default" to maintain backward compatibility.

## Notes
- Users can set the `HASURA_DB_NAME` environment variable to configure
the target database for migrations to their desired database name.

- This change enhances the flexibility of the migration process,
especially in cases where the database name is not "default."

- Reviewers are encouraged to verify that the documentation has been
updated to reflect the new configuration option.

With this solution, users can customize the target database for
migrations by setting the `HASURA_DB_NAME` environment variable, which
eliminates the error associated with the fixed "default" database name.
2023-11-03 07:58:30 +01:00
dependabot[bot]
97a03dcfce chore: update dependencies (#181)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2023-10-25 11:23:53 +02:00
dependabot[bot]
26572176d3 chore: Bump aws-actions/amazon-ecr-login from 1 to 2 (#179)
Bumps
[aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login)
from 1 to 2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/amazon-ecr-login/releases">aws-actions/amazon-ecr-login's
releases</a>.</em></p>
<blockquote>
<h2>v2</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v2.0.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.7.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.6.2</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.6.1</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.6.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.5.3</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.5.2</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.5.1</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.5.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.4.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.3.3</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.3.2</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.3.1</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.3.0</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.2.2</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v1.2.1</h2>
<p>See the <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/HEAD/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md">aws-actions/amazon-ecr-login's
changelog</a>.</em></p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="062b18b96a"><code>062b18b</code></a>
chore(release): 2.0.1</li>
<li><a
href="9238dd443b"><code>9238dd4</code></a>
Merge pull request <a
href="https://redirect.github.com/aws-actions/amazon-ecr-login/issues/532">#532</a>
from aws-actions/node_upgrade</li>
<li><a
href="e618bbed74"><code>e618bbe</code></a>
chore: upgrade to node20</li>
<li><a
href="33f92af657"><code>33f92af</code></a>
chore(release): 2.0.0</li>
<li><a
href="5de13da834"><code>5de13da</code></a>
Merge pull request <a
href="https://redirect.github.com/aws-actions/amazon-ecr-login/issues/530">#530</a>
from aws-actions/dist2</li>
<li><a
href="d6ae50c722"><code>d6ae50c</code></a>
chore: update dist</li>
<li><a
href="537f0fb431"><code>537f0fb</code></a>
Merge pull request <a
href="https://redirect.github.com/aws-actions/amazon-ecr-login/issues/529">#529</a>
from aws-actions/dist</li>
<li><a
href="8ccdcdca26"><code>8ccdcdc</code></a>
chore: update dist</li>
<li><a
href="d71acafb87"><code>d71acaf</code></a>
feat: release v2 (<a
href="https://redirect.github.com/aws-actions/amazon-ecr-login/issues/520">#520</a>)</li>
<li><a
href="3542211ff6"><code>3542211</code></a>
chore: Bump <code>@​aws-sdk/client-ecr-public</code> from 3.414.0 to
3.418.0 (<a
href="https://redirect.github.com/aws-actions/amazon-ecr-login/issues/525">#525</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aws-actions/amazon-ecr-login/compare/v1...v2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aws-actions/amazon-ecr-login&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:08:29 +02:00
David Barroso
07d48bc121 chore: docs: added antivirus documentation (#178) 2023-09-28 07:26:12 +02:00
dependabot[bot]
e18f4e0be0 chore: Bump docker/setup-qemu-action from 2 to 3 (#177)
Bumps
[docker/setup-qemu-action](https://github.com/docker/setup-qemu-action)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/setup-qemu-action/releases">docker/setup-qemu-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Node 20 as default runtime (requires <a
href="https://github.com/actions/runner/releases/tag/v2.308.0">Actions
Runner v2.308.0</a> or later) by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/102">docker/setup-qemu-action#102</a></li>
<li>Bump <code>@​actions/core</code> from 1.10.0 to 1.10.1 in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/103">docker/setup-qemu-action#103</a></li>
<li>Bump semver from 6.3.0 to 6.3.1 in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/89">docker/setup-qemu-action#89</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v2.2.0...v3.0.0">https://github.com/docker/setup-qemu-action/compare/v2.2.0...v3.0.0</a></p>
<h2>v2.2.0</h2>
<ul>
<li>Trim off spaces in <code>platforms</code> input by <a
href="https://github.com/Chocobo1"><code>@​Chocobo1</code></a> in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/64">docker/setup-qemu-action#64</a></li>
<li>Switch to actions-toolkit implementation by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/70">docker/setup-qemu-action#70</a>
<a
href="https://redirect.github.com/docker/setup-qemu-action/pull/80">docker/setup-qemu-action#80</a>
<a
href="https://redirect.github.com/docker/setup-qemu-action/pull/83">docker/setup-qemu-action#83</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v2.1.0...v2.2.0">https://github.com/docker/setup-qemu-action/compare/v2.1.0...v2.2.0</a></p>
<h2>v2.1.0</h2>
<ul>
<li>Use context for inputs by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/62">#62</a>)</li>
<li>Use built-in <code>getExecOutput</code> by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/61">#61</a>)</li>
<li>Remove workaround for <code>setOutput</code> by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/63">#63</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.6.0 to 1.10.0 (<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/54">#54</a>
<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/58">#58</a>
<a
href="https://redirect.github.com/docker/setup-qemu-action/issues/59">#59</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v2.0.0...v2.1.0">https://github.com/docker/setup-qemu-action/compare/v2.0.0...v2.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="68827325e0"><code>6882732</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/103">#103</a>
from docker/dependabot/npm_and_yarn/actions/core-1.10.1</li>
<li><a
href="183f4af504"><code>183f4af</code></a>
chore: update generated content</li>
<li><a
href="f17493529e"><code>f174935</code></a>
build(deps): bump <code>@​actions/core</code> from 1.10.0 to 1.10.1</li>
<li><a
href="2e423eb500"><code>2e423eb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/89">#89</a>
from docker/dependabot/npm_and_yarn/semver-6.3.1</li>
<li><a
href="ecc406afa7"><code>ecc406a</code></a>
Bump semver from 6.3.0 to 6.3.1</li>
<li><a
href="12dec5e201"><code>12dec5e</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/102">#102</a>
from crazy-max/update-node20</li>
<li><a
href="c29b312130"><code>c29b312</code></a>
chore: node 20 as default runtime</li>
<li><a
href="34ae628c8f"><code>34ae628</code></a>
chore: update generated content</li>
<li><a
href="1f3d2e1ac0"><code>1f3d2e1</code></a>
chore: fix author in package.json</li>
<li><a
href="277dbe8c9c"><code>277dbe8</code></a>
vendor: bump <code>@​docker/actions-toolkit</code> from 0.3.0 to
0.12.0</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/setup-qemu-action/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-qemu-action&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:24:21 +02:00
dependabot[bot]
d88ba6b17a chore: Bump docker/login-action from 2 to 3 (#176)
Bumps [docker/login-action](https://github.com/docker/login-action) from
2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/login-action/releases">docker/login-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Node 20 as default runtime (requires <a
href="https://github.com/actions/runner/releases/tag/v2.308.0">Actions
Runner v2.308.0</a> or later) by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/login-action/pull/593">docker/login-action#593</a></li>
<li>Bump <code>@​actions/core</code> from 1.10.0 to 1.10.1 in <a
href="https://redirect.github.com/docker/login-action/pull/598">docker/login-action#598</a></li>
<li>Bump <code>@​aws-sdk/client-ecr</code> and
<code>@​aws-sdk/client-ecr-public</code> to 3.410.0 in <a
href="https://redirect.github.com/docker/login-action/pull/555">docker/login-action#555</a>
<a
href="https://redirect.github.com/docker/login-action/pull/560">docker/login-action#560</a>
<a
href="https://redirect.github.com/docker/login-action/pull/582">docker/login-action#582</a>
<a
href="https://redirect.github.com/docker/login-action/pull/599">docker/login-action#599</a></li>
<li>Bump semver from 6.3.0 to 6.3.1 in <a
href="https://redirect.github.com/docker/login-action/pull/556">docker/login-action#556</a></li>
<li>Bump https-proxy-agent to 7.0.2 <a
href="https://redirect.github.com/docker/login-action/pull/561">docker/login-action#561</a>
<a
href="https://redirect.github.com/docker/login-action/pull/588">docker/login-action#588</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/login-action/compare/v2.2.0...v3.0.0">https://github.com/docker/login-action/compare/v2.2.0...v3.0.0</a></p>
<h2>v2.2.0</h2>
<ul>
<li>Switch to actions-toolkit implementation by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/login-action/pull/409">docker/login-action#409</a>
<a
href="https://redirect.github.com/docker/login-action/pull/470">docker/login-action#470</a>
<a
href="https://redirect.github.com/docker/login-action/pull/476">docker/login-action#476</a></li>
<li>Bump <code>@​aws-sdk/client-ecr</code> and
<code>@​aws-sdk/client-ecr-public</code> to 3.347.1 in <a
href="https://redirect.github.com/docker/login-action/pull/524">docker/login-action#524</a>
<a
href="https://redirect.github.com/docker/login-action/pull/364">docker/login-action#364</a>
<a
href="https://redirect.github.com/docker/login-action/pull/363">docker/login-action#363</a></li>
<li>Bump minimatch from 3.0.4 to 3.1.2 in <a
href="https://redirect.github.com/docker/login-action/pull/354">docker/login-action#354</a></li>
<li>Bump json5 from 2.2.0 to 2.2.3 in <a
href="https://redirect.github.com/docker/login-action/pull/378">docker/login-action#378</a></li>
<li>Bump http-proxy-agent from 5.0.0 to 7.0.0 in <a
href="https://redirect.github.com/docker/login-action/pull/509">docker/login-action#509</a></li>
<li>Bump https-proxy-agent from 5.0.1 to 7.0.0 in <a
href="https://redirect.github.com/docker/login-action/pull/508">docker/login-action#508</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/login-action/compare/v2.1.0...v2.2.0">https://github.com/docker/login-action/compare/v2.1.0...v2.2.0</a></p>
<h2>v2.1.0</h2>
<ul>
<li>Ensure AWS temp credentials are redacted in workflow logs by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://redirect.github.com/docker/login-action/issues/275">#275</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.6.0 to 1.10.0 (<a
href="https://redirect.github.com/docker/login-action/issues/252">#252</a>
<a
href="https://redirect.github.com/docker/login-action/issues/292">#292</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0 (<a
href="https://redirect.github.com/docker/login-action/issues/298">#298</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr-public</code> from 3.53.0 to 3.186.0
(<a
href="https://redirect.github.com/docker/login-action/issues/299">#299</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/login-action/compare/v2.0.0...v2.1.0">https://github.com/docker/login-action/compare/v2.0.0...v2.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="343f7c4344"><code>343f7c4</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/login-action/issues/599">#599</a>
from docker/dependabot/npm_and_yarn/aws-sdk-dependenc...</li>
<li><a
href="aad0f974f2"><code>aad0f97</code></a>
chore: update generated content</li>
<li><a
href="2e0cd39144"><code>2e0cd39</code></a>
build(deps): bump the aws-sdk-dependencies group with 2 updates</li>
<li><a
href="203bc9c4ef"><code>203bc9c</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/login-action/issues/588">#588</a>
from docker/dependabot/npm_and_yarn/proxy-agent-depen...</li>
<li><a
href="2199648fc8"><code>2199648</code></a>
chore: update generated content</li>
<li><a
href="b489376173"><code>b489376</code></a>
build(deps): bump the proxy-agent-dependencies group with 1 update</li>
<li><a
href="7c309e74e6"><code>7c309e7</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/login-action/issues/598">#598</a>
from docker/dependabot/npm_and_yarn/actions/core-1.10.1</li>
<li><a
href="0ccf222961"><code>0ccf222</code></a>
chore: update generated content</li>
<li><a
href="56d703e106"><code>56d703e</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/login-action/issues/597">#597</a>
from docker/dependabot/github_actions/aws-actions/con...</li>
<li><a
href="24d3b3519e"><code>24d3b35</code></a>
build(deps): bump <code>@​actions/core</code> from 1.10.0 to 1.10.1</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/login-action/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:24:04 +02:00
dependabot[bot]
3de9a2d09b chore: Bump aws-actions/configure-aws-credentials from 3 to 4 (#175)
Bumps
[aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/releases">aws-actions/configure-aws-credentials's
releases</a>.</em></p>
<blockquote>
<h2>v4</h2>
<p>This tag tracks the latest v4.x.x release</p>
<h2>v4.0.0</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v4.0.0/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v3.0.2</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v3.0.2/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v3.0.1</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v3.0.1/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md">aws-actions/configure-aws-credentials's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v3.0.0...v3.0.1">3.0.1</a>
(2023-08-24)</h2>
<h3>Features</h3>
<ul>
<li>Can configure <code>special-characters-workaround</code> to keep
retrying credentials if the returned
credentials have special characters (Fixes <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/599">#599</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fixes <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/792">#792</a>:
Action fails when intending to use existing credentials</li>
<li>Minor typo fix from <a
href="https://github.com/ubaid-ansari21"><code>@​ubaid-ansari21</code></a></li>
</ul>
<h3>Changes to existing functionality</h3>
<ul>
<li>Special characters are now allowed in returned credential variables
unless you configure the
<code>special-characters-workaround</code> option</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v2.2.0...v3.0.0">3.0.0</a>
(2023-08-21)</h2>
<h3>Features</h3>
<ul>
<li>Can configure <code>max-retries</code> and
<code>disable-retry</code> to modify retry functionality when the assume
role call fails</li>
<li>Set returned credentials as step outputs with
<code>output-credentials</code></li>
<li>Clear AWS related environment variables at the start of the action
with <code>unset-current-credentials</code></li>
<li>Unique role identifier is now printed in the workflow logs</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Can't use credentials if they contain a special character</li>
<li>Retry functionality added when generating the JWT fails</li>
<li>Can now use <code>webIdentityTokenFile</code> option</li>
<li>Branch name validation too strict</li>
<li>JS SDK v2 deprecation warning in workflow logs</li>
</ul>
<h3>Changes to existing functionality</h3>
<ul>
<li>Default session duration is now 1 hour in all cases (from 6 hours in
some cases)</li>
<li>Account ID will not be masked by default in logs</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8c3f20df09"><code>8c3f20d</code></a>
chore: release v4 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/840">#840</a>)</li>
<li>See full diff in <a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aws-actions/configure-aws-credentials&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 10:31:12 +02:00
David Barroso
074d1e1eaf chore: avoid issues with av notification (#174)
There is no need to notify clamav as the `SelfCheck` option is enabled
by default. We are making this explicit in the clamav configuration to
avoid future confusions.
2023-09-11 16:12:38 +02:00
dependabot[bot]
cf652fc168 chore: Bump actions/checkout from 3 to 4 (#173)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to
4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
<h2>v3.5.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Checkout Issue in self hosted runner due to faulty submodule
check-ins by <a
href="https://github.com/megamanics"><code>@​megamanics</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li>Fix typos found by codespell by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li>Add support for sparse checkouts by <a
href="https://github.com/dscho"><code>@​dscho</code></a> and <a
href="https://github.com/dfdez"><code>@​dfdez</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
<li>Release v3.5.3 by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/megamanics"><code>@​megamanics</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li><a href="https://github.com/dfdez"><code>@​dfdez</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p>
<h2>v3.5.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Use correct API url / endpoint in GHES by <a
href="https://github.com/fhammerl"><code>@​fhammerl</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a>
based on <a
href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a>
by <a href="https://github.com/1newsr"><code>@​1newsr</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p>
<h2>v3.5.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve checkout performance on Windows runners by upgrading
<code>@​actions/github</code> dependency by <a
href="https://github.com/BrettDong"><code>@​BrettDong</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/BrettDong"><code>@​BrettDong</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v4.0.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1067">Support
fetching without the --progress option</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1436">Update to
node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark
test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add
option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
<h2>v3.5.3</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1196">Fix:
Checkout fail in self-hosted runners when faulty submodule are
checked-in</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix
typos found by codespell</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add
support for sparse checkouts</a></li>
</ul>
<h2>v3.5.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix
api endpoint for GHES</a></li>
</ul>
<h2>v3.5.1</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix
slow checkout on Windows</a></li>
</ul>
<h2>v3.5.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add
new public key for known_hosts</a></li>
</ul>
<h2>v3.4.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade
codeql actions to v2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade
dependencies</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade
<code>@​actions/io</code></a></li>
</ul>
<h2>v3.3.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1045">Implement
branch list using callbacks from exec function</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1050">Add
in explicit reference to private checkout options</a></li>
<li>[Fix comment typos (that got added in <a
href="https://redirect.github.com/actions/checkout/issues/770">#770</a>)](<a
href="https://redirect.github.com/actions/checkout/pull/1057">actions/checkout#1057</a>)</li>
</ul>
<h2>v3.2.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/942">Add
GitHub Action to perform release</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/967">Fix
status badge</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1002">Replace
datadog/squid with ubuntu/squid Docker image</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/964">Wrap
pipeline commands for submoduleForeach in quotes</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1029">Update
<code>@​actions/io</code> to 1.1.2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1039">Upgrading
version to 3.2.0</a></li>
</ul>
<h2>v3.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/770">Add
input <code>set-safe-directory</code></a></li>
</ul>
<h2>v3.0.1</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3df4ab11eb"><code>3df4ab1</code></a>
Release 4.0.0 (<a
href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li>
<li><a
href="8b5e8b7687"><code>8b5e8b7</code></a>
Support fetching without the --progress option (<a
href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li>
<li><a
href="97a652b800"><code>97a652b</code></a>
Update default runtime to node20 (<a
href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 08:33:01 +02:00
dependabot[bot]
4c2318e9d4 chore: bump aws-actions/configure-aws-credentials from 2 to 3 (#172)
Bumps
[aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/releases">aws-actions/configure-aws-credentials's
releases</a>.</em></p>
<blockquote>
<h2>v3</h2>
<p>This tag tracks the latest v3.x.x release</p>
<h2>v3.0.0</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v3.0.0/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v2.2.0</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v2.2.0/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
<h2>v2.1.0</h2>
<p>See the <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/v2.1.0/CHANGELOG.md">changelog</a>
for details about the changes included in this release.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md">aws-actions/configure-aws-credentials's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v2.2.0...v3.0.0">3.0.0</a>
(2023-08-21)</h2>
<h3>Features</h3>
<ul>
<li>Can configure <code>max-retries</code> and
<code>disable-retry</code> to modify retry functionality when the assume
role call fails</li>
<li>Set returned credentials as step outputs with
<code>output-credentials</code></li>
<li>Clear AWS related environment variables at the start of the action
with <code>unset-current-credentials</code></li>
<li>Unique role identifier is now printed in the workflow logs</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Can't use credentials if they contain a special character</li>
<li>Retry functionality added when generating the JWT fails</li>
<li>Can now use <code>webIdentityTokenFile</code> option</li>
<li>Branch name validation too strict</li>
<li>JS SDK v2 deprecation warning in workflow logs</li>
</ul>
<h3>Changes to existing functionality</h3>
<ul>
<li>Default session duration is now 1 hour in all cases (from 6 hours in
some cases)</li>
<li>Account ID will not be masked by default in logs</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v2.1.0...v2.2.0">2.2.0</a>
(2023-05-31)</h2>
<h3>Features</h3>
<ul>
<li><code>inline-session-policy</code> prop enables assuming a role with
inline session policies (<a
href="d00f6c6f41">d00f6c6</a>)</li>
<li><code>managed-session-policies</code> prop enables assuming a role
with managed policy arns (<a
href="d00f6c6f41">d00f6c6</a>)</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v2.0.0...v2.1.0">2.1.0</a>
(2023-05-31)</h2>
<h3>Features</h3>
<ul>
<li><code>role-chaining</code> prop enables role chaining use case (<a
href="6fbd316fd1">6fbd316</a>)</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v1.7.0...v2.0.0">2.0.0</a>
(2023-03-06)</h2>
<h3>Features</h3>
<ul>
<li>Version bump to use Node 16 by default.</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v1.6.1...v1.7.0">1.7.0</a>
(2022-08-03)</h2>
<h3>Features</h3>
<ul>
<li>Allow audience to be explicitly specified (<a
href="2f8dfd0ed4">2f8dfd0</a>)</li>
</ul>
<h3><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v1.6.0...v1.6.1">1.6.1</a>
(2022-01-18)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>OIDC Parallel Requests error (<a
href="133757e9b8">133757e</a>)</li>
<li>Strict Mode Deprecation (<a
href="4c5e1c60cc">4c5e1c6</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ef93a73b13"><code>ef93a73</code></a>
V3 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/791">#791</a>)</li>
<li><a
href="131c7b6fd1"><code>131c7b6</code></a>
chore: Bump jest from 29.6.2 to 29.6.3 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/786">#786</a>)</li>
<li><a
href="6334b403eb"><code>6334b40</code></a>
chore: Bump aws-sdk from 2.1436.0 to 2.1441.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/787">#787</a>)</li>
<li><a
href="360ea313a7"><code>360ea31</code></a>
chore: Bump aws-sdk from 2.1431.0 to 2.1436.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/783">#783</a>)</li>
<li><a
href="de93b00c9f"><code>de93b00</code></a>
chore: Bump eslint from 8.46.0 to 8.47.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/784">#784</a>)</li>
<li><a
href="746d33e7c1"><code>746d33e</code></a>
chore: Bump aws-sdk from 2.1426.0 to 2.1431.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/782">#782</a>)</li>
<li><a
href="706fc9ae3d"><code>706fc9a</code></a>
chore: Bump eslint from 8.45.0 to 8.46.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/780">#780</a>)</li>
<li><a
href="9918371ad5"><code>9918371</code></a>
chore: Bump aws-sdk from 2.1421.0 to 2.1426.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/781">#781</a>)</li>
<li><a
href="345462ab9e"><code>345462a</code></a>
chore: Bump jest from 29.6.1 to 29.6.2 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/779">#779</a>)</li>
<li><a
href="80a7a6c2a2"><code>80a7a6c</code></a>
chore: Bump aws-sdk from 2.1416.0 to 2.1421.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/778">#778</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aws-actions/configure-aws-credentials&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 08:47:36 +02:00
David Barroso
8feb508ea1 feat: added antivirus integration (#171) 2023-08-22 12:05:54 +02:00
David Barroso
996c8c2dff feat: added metadata column to files (#170)
Fixes #134 and #160

This basically introduces a new column `metadata` to the `files` table
of type `jsonb`. The user can populate this with any data it wants by
adding a `metadata` object to the `metadata[]` field in the
multipart-form (`metadata` field when updating files). For instance:

``` shell
curl http://localhost:8080/v1/files \
  -H "Content-Type: multipart/form-data" \
  -H "$AUTH" \
  -F "file[]=@client/testdata/alphabet.txt" \
  -F "metadata[]={\"metadata\":{\"num\":123,\"list\":[1,2,3]}};type=application/json"
```

In addition, we are moving away from the graphql client
`github.com/hasura/go-graphql-client` to `github.com/Yamashou/gqlgenc`
as I was running into some troubles dealing with jsonb objects. This has
the side-effect the graphql code is much cleaner and easier to
understand (this was long overdue to be honest).
2023-08-16 12:53:21 +02:00
David Barroso
e7dc5b3cee chore: update dependencies (#169) 2023-08-15 13:21:18 +02:00
David Barroso
f9bc7fa5c3 chore: udpate dependencies (#168) 2023-07-28 10:47:49 +02:00
Matteo Mazzoni
752c725750 Finetuning openapi doc for better swagger testing (#167) 2023-07-17 13:02:23 +02:00
David Barroso
c89b48d851 fix typo 2023-07-07 09:19:07 +02:00
dependabot[bot]
c5f688fb65 chore: bump nixbuild/nix-quick-install-action from 24 to 25 (#166)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 24 to 25.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v24...v25)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 13:56:38 +02:00
José Henrique Leão
f32b7846d1 feat: allow configuration of cors domains and credentials (#159) 2023-06-27 20:06:21 +02:00
dependabot[bot]
a8e9c1d32a chore: bump nixbuild/nix-quick-install-action from 23 to 24 (#164)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 23 to 24.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v23...v24)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 08:44:33 +02:00
dependabot[bot]
b7e3151702 chore: bump nixbuild/nix-quick-install-action from 22 to 23 (#163)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 22 to 23.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v22...v23)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 08:11:58 +02:00
Tuan (Tony) T
78447dd391 fix: url-safe filename (#162) 2023-06-21 11:10:31 +02:00
David Barroso
5bd777d6c2 fix: pass quality to image transformer (#158) 2023-05-22 15:33:38 +02:00
Szilárd Dóró
3235e38b20 chore: add probot-stale (#156)
* chore: add probot

* chore: remove trailing empty line
2023-05-11 10:58:01 +02:00
David Barroso
b1ce4703d0 feat: allow manipulation on presigned urls (#152) 2023-03-17 12:33:39 +01:00
dependabot[bot]
771dca1064 chore: bump nixbuild/nix-quick-install-action from 21 to 22 (#151)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 21 to 22.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v21...v22)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 07:46:06 +01:00
dependabot[bot]
2f5c47ec84 chore: bump aws-actions/configure-aws-credentials from 1 to 2 (#150)
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 1 to 2.
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v1...v2)

---
updated-dependencies:
- dependency-name: aws-actions/configure-aws-credentials
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 14:10:16 +01:00
David Barroso
759e6a53c6 chore: clean pipeline (#147) 2023-01-13 11:24:42 +01:00
David Barroso
b9aebcb47c feat: respect specified content-type if specified and is other than application/octet-stream (#139) 2023-01-04 10:15:09 +01:00
dependabot[bot]
be5e5f123f chore: bump nixbuild/nix-quick-install-action from 20 to 21 (#144)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 20 to 21.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v20...v21)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 11:13:41 +01:00
dependabot[bot]
4b801e5b95 chore: bump nixbuild/nix-quick-install-action from 19 to 20 (#143)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 19 to 20.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v19...v20)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 08:23:14 +01:00
Kevin Rodríguez
f0c3768f62 fix: fixes file too small error message (#142) 2022-12-21 11:03:16 +01:00
David Barroso
8e342e4520 chore: update deps (#140) 2022-12-19 09:45:06 +01:00
David Barroso
315e90dd5c feat: lower cache size to 1MB (#137) 2022-11-24 08:45:17 +01:00
David Barroso
fe1de57395 fix: set a sane value for MaxMultipartMemory (#133) 2022-11-15 08:31:46 +01:00
David Barroso
7381b3c72d fix: detect check constraint errors properly (#131) 2022-11-11 13:04:55 +01:00
David Barroso
4282ea68ca feat: insert more metadata when initializing files on upload (#130) 2022-11-11 11:58:08 +01:00
David Barroso
6ff55c24b6 fix: compare IDs correctly when dealing with broken-metadata and orphan files (#129) 2022-11-11 11:56:40 +01:00
David Barroso
744d7394e0 Update openapi.yaml (#127) 2022-11-04 09:10:28 +01:00
David Barroso
9349d30889 fix: allow updating files that aren't uploaded (#126) 2022-11-04 09:08:11 +01:00
dependabot[bot]
5b8ac94b82 chore: bump nixbuild/nix-quick-install-action from 18 to 19 (#125)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 18 to 19.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v18...v19)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 08:19:05 +01:00
David Barroso
656d563ca4 chore: update deps (#123) 2022-10-28 10:44:42 +02:00
David Barroso
097abb4617 fix: protect ops endpoints requiring admin (#122)
* fix: protect ops endpoints requiring admin
2022-10-28 10:40:51 +02:00
dependabot[bot]
da8215a1c2 chore: bump cachix/cachix-action from 11 to 12 (#121)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 11 to 12.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v11...v12)

---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-28 10:36:10 +02:00
Sean Radigan
9da2e8c4e1 added x-hasura-role to allowed headers in CORS (#120)
Co-authored-by: Sean Radigan <seanbreaksthings@tuta.io>
2022-10-25 10:16:04 +02:00
Jeff Loiselle
7dbdc85ec0 Update README.md (#117) 2022-10-21 09:56:20 +02:00
dependabot[bot]
1b6fcb1573 chore: bump cachix/cachix-action from 10 to 11 (#116)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 10 to 11.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v10...v11)

---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 10:05:23 +02:00
dependabot[bot]
a9f6b098a0 chore: bump nixbuild/nix-quick-install-action from 17 to 18 (#115)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 17 to 18.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v17...v18)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-11 14:48:24 +02:00
David Barroso
2eb2eb7d81 chore: update dependencies (#112) 2022-10-03 13:28:48 +02:00
David Barroso
7500dd4d61 fix: read config flag correctly (#111) 2022-10-03 13:28:40 +02:00
David Barroso
85989f47ba feat: allow configuring apiRootPrefix (#109)
* feat: allow configuring apiRootPrefix

* asd
2022-08-29 15:28:30 +02:00
Johan Eliasson
0f597c1c0c latest hasura version (#108) 2022-08-23 17:05:51 +02:00
Johan Eliasson
fd6bba889f copy update 2022-08-23 07:28:46 +02:00
dependabot[bot]
c6151c9638 chore: bump nixbuild/nix-quick-install-action from 16 to 17 (#107)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 16 to 17.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v16...v17)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-19 07:56:57 +02:00
David Barroso
70c0cc53bb fix: download file completely from s3 if Range+image manip opts are specified (#101) 2022-07-13 12:09:04 +02:00
David Barroso
f32a0b1a1d fix: fastly middleware: dont set surrogate control header for presigned urls (#103) 2022-07-13 12:05:37 +02:00
Siarhei Lipchyk
0ea78379af Fix the error message (#100) 2022-07-10 11:40:49 +02:00
dependabot[bot]
1323f5c73b chore: bump nixbuild/nix-quick-install-action from 15 to 16 (#94)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 15 to 16.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v15...v16)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 09:46:50 +02:00
David Barroso
0520dcbbbc chore: update deps (#86) 2022-06-10 09:29:52 +02:00
dependabot[bot]
6f9bcf4564 chore: bump nixbuild/nix-quick-install-action from 14 to 15 (#92)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 14 to 15.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v14...v15)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 09:16:12 +02:00
David Barroso
425946137c fix: this was wrongly misinterpreted as minutes (#91) 2022-06-10 09:16:01 +02:00
David Barroso
91d9e4d41a chore: pin minio to make tests more reliable (#90) 2022-06-02 13:14:47 +02:00
dependabot[bot]
56c641f6e7 chore: bump nixbuild/nix-quick-install-action from 13 to 14 (#88)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 13 to 14.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v13...v14)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 08:34:23 +02:00
David Barroso
789f4a2e91 fix: dont require select:bucket permissions to delete files (#87) 2022-05-27 16:45:00 +02:00
David Barroso
1b3cfeff4e fix: set content-range accordingly if range requested with image manipulation (#85) 2022-05-27 11:44:53 +02:00
David Barroso
d17dc3ed80 fix: allow inserting files without requiring select permissions (#84) 2022-05-27 11:37:01 +02:00
David Barroso
b4b4fb4eea fix: remove /storage from the path (#83) 2022-05-24 16:54:39 +02:00
David Barroso
de48ecdc28 feat: added integration with CDN Fastly (#77) 2022-05-24 09:53:17 +02:00
David Barroso
d8e68e59e7 chore: remove code duplication (#80) 2022-05-19 14:44:05 +02:00
David Barroso
2251e3a598 calculate presignedurls max-age using info in the signature to make sure they expire at the right time (#79) 2022-05-19 14:30:57 +02:00
David Barroso
de06fca938 feat: support downloading a range (#76) 2022-05-19 13:41:07 +02:00
David Barroso
72bc77de7f fix: treat conditional requests to s3 correctly when using presigned urls (#78) 2022-05-19 13:27:21 +02:00
David Barroso
88c5b49f00 chore: fix vips tests (#75) 2022-05-19 12:25:52 +02:00
dependabot[bot]
52fbd758cb chore: bump docker/setup-qemu-action from 1 to 2 (#71)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-10 10:56:09 +02:00
dependabot[bot]
e013c3b09e chore: bump docker/login-action from 1 to 2 (#72)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-10 10:56:00 +02:00
David Barroso
7ce5fdf39e replace govips with own bindings (#73) 2022-05-10 10:55:46 +02:00
dependabot[bot]
c89df28521 chore: bump nixbuild/nix-quick-install-action from 12 to 13 (#65)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 12 to 13.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v12...v13)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 09:06:13 +02:00
David Barroso
8c8b2d7c6d chore: documentation (#64) 2022-04-26 16:24:25 +02:00
dependabot[bot]
f230ee75cb chore: bump github/codeql-action from 1 to 2 (#63)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 09:13:24 +02:00
David Barroso
a04e154bf5 fix: make flags more consumable (#61) 2022-04-25 14:43:24 +02:00
David Barroso
344870319c fix: replace imagemagick with libvips to increase performance (#60) 2022-04-25 12:44:09 +02:00
David Barroso
c96d4cdcbe fix: remove dependency between storage and auth (#59) 2022-04-22 14:38:06 +02:00
David Barroso
383920d593 fix: don't require permissions to see bucket information when retrieving files (#58) 2022-04-21 14:43:42 +02:00
David Barroso
e1ea387598 fix: use admin secret to update metadata when uploading files (#54) 2022-04-11 10:18:12 +02:00
David Barroso
e5857bc131 added constraint to allow setting only valid range for presignedURL expiration time (#55) 2022-04-11 09:49:27 +02:00
David Barroso
8d061f712c connect to the schema when applying migrations so the schema_migrations table is created there too (#53) 2022-04-07 11:20:02 +02:00
David Barroso
dd7bdccf24 fix: presigned urls (#51) 2022-04-06 09:52:28 +02:00
David Barroso
de2a54c519 use same path as old storage (#50) 2022-03-31 09:14:41 +02:00
David Barroso
b0777bd423 use admin secret when reading bucket information as users dont need access to it (#48) 2022-03-31 09:14:30 +02:00
David Barroso
92313744ce add missing headers to CORS (#49) 2022-03-30 14:39:24 +02:00
David Barroso
925fa51886 chore: update go version to 1.18 2022-03-23 12:15:33 +00:00
dependabot[bot]
9db23f87d7 chore: bump actions/cache from 2 to 3 (#46) 2022-03-22 10:01:01 +00:00
David Barroso
38fe19b482 fix: change resize behavior to be inline with previous storage (#45)
* change resize behavior to be inline with previous storage

* asd
2022-03-16 15:13:23 +01:00
David Barroso
03cabdbe86 fix: minor compatibility adjustments (#42) 2022-03-15 14:17:13 +01:00
David Barroso
d3fab91585 fixed cors (#43) 2022-03-15 13:44:32 +01:00
David Barroso
3ccd04f102 added cacerts to docker image (#44) 2022-03-15 13:15:04 +01:00
dependabot[bot]
cd4fcb1aa0 chore: bump nixbuild/nix-quick-install-action from 10 to 12 (#37)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 10 to 12.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v10...v12)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-10 07:45:40 +01:00
David Barroso
06183bcab5 feat: added backwards compatibility with former storage (#32) 2022-03-07 12:14:53 +01:00
dependabot[bot]
8579baed75 chore: bump nixbuild/nix-quick-install-action from 9 to 10 (#29)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 9 to 10.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v9...v10)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-04 12:22:46 +01:00
dependabot[bot]
56615c1341 chore: bump actions/checkout from 2 to 3 (#30)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-04 10:26:24 +01:00
David Barroso
eeba558231 update dependencies (#31) 2022-03-04 10:26:11 +01:00
David Barroso
d08699f283 chore: added dependabot, release drafter, and PR template (#27) 2022-03-04 10:19:28 +01:00
David Barroso
86a41734d9 Create codeql-analysis.yml (#28) 2022-03-04 10:08:03 +01:00
Nuno Pato
195cee0572 replace "create or replace" with "drop/create" for triggers (#26) 2022-02-15 11:00:38 -01:00
Nuno Pato
787fa0a069 Chore: consistent naming (#24)
* Make naming more consistent

* update hasura to v2.2.0

* Fix typo

* use /v1 instead of /v1/graphql

* asd

* asd

* asd

* Add /graphql

* small fix
2022-02-14 17:38:11 -01:00
David Barroso
678dd96238 added nix wrapper in case nix isn't available (#23) 2022-02-04 17:37:17 +01:00
David Barroso
3c1d3528db Create LICENSE 2022-02-04 16:02:33 +01:00
David Barroso
8327869801 set up OPTIONS for CORS (#22) 2022-02-04 15:03:49 +01:00
David Barroso
37245a0d5d update dependencies (#21) 2022-02-04 14:05:09 +01:00
David Barroso
a7e10b5b9a added endpoint to get presigned URLs (#20) 2022-02-04 13:04:51 +01:00
David Barroso
c0a37bf1ce change prefix for endpoints to match current pattern (#18) 2022-02-03 20:20:54 +01:00
David Barroso
da427a37c9 fix release (#17) 2022-02-03 17:10:06 +01:00
David Barroso
7e2c14f147 migrate cli to cobra (#16) 2022-02-02 14:24:47 +01:00
David Barroso
e565498a6d implement image manipulation features (#15) 2022-02-01 19:50:01 +01:00
David Barroso
603f6dae48 migrate build and development environment to nix (#14)
* added vendor folder
* make tests more resillient
* migrate to nix
2022-01-27 16:50:12 +01:00
David Barroso
5771d2252c added golang client and implemented integration tests (#11) 2022-01-21 19:21:03 +01:00
David Barroso
ef3d382f2b manage migrations for postgres/hasura on startup (#9) 2022-01-21 17:08:17 +01:00
David Barroso
f46599d675 added several RPCs to perform various operations (#3) 2022-01-21 15:25:42 +01:00
David Barroso
0302644cf8 allow specifying a root folder for s3 storage (#7) 2022-01-17 10:33:49 +01:00
David Barroso
9acf2b1f89 Implemented DELETE /file/:id (#2) 2022-01-13 18:47:23 +01:00
David Barroso
4a9ad0f082 implemented PUT /files/:id (#1) 2022-01-13 13:24:57 +01:00
David Barroso
c61ea9bef6 first poc 2022-01-04 10:53:06 +01:00
David Barroso
fcc44652f2 added README.md 2021-12-13 13:17:58 +01:00
814 changed files with 315937 additions and 430 deletions

View File

@@ -32,6 +32,7 @@ Where `PKG` is:
- `mintlify-openapi`: For changes to the Mintlify OpenAPI tool
- `nhost-js`: For changes to the Nhost JavaScript SDK
- `nixops`: For changes to the NixOps
- `storage`: For changes to the Nhost Storage
Where `SUMMARY` is a short description of what the PR does.

15
.github/actions/cache-nix/action.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: 'Cache Nix to S3'
description: 'Copy Nix store to S3-backed cache'
inputs:
NIX_CACHE_PRIV_KEY:
description: 'Nix cache private key'
required: true
runs:
using: 'composite'
steps:
- name: "Cache build"
shell: bash
run: |
nix store sign --key-file <(echo "${{ inputs.NIX_CACHE_PRIV_KEY }}") --all
nix copy --to 's3://nhost-nix-cache?region=eu-central-1' --substitute-on-destination --all

51
.github/actions/setup-nix/action.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: 'Setup Nix'
description: 'Install Nix and setup caching for Nhost projects'
inputs:
NAME:
description: 'Project name for cache key'
required: true
NIX_CACHE_PUB_KEY:
description: 'Nix cache public key'
required: true
GITHUB_TOKEN:
description: 'GitHub token for Nix access'
required: true
runs:
using: 'composite'
steps:
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ inputs.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ inputs.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
# - name: "Verify if nixops is pre-built"
# id: verify-nixops-build
# run: |
# export drvPath=$(make build-nixops-dry-run)
# echo "Derivation path: $drvPath"
# nix path-info --store s3://nhost-nix-cache\?region=eu-central-1 $drvPath \
# || (echo "Wait until nixops is already built and cached and run again" && exit 1)
# if: ${{ inputs.NAME != 'nixops' }}

14
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
open-pull-requests-limit: 10
directory: "/"
schedule:
interval: "daily"
time: "04:00"
commit-message:
prefix: "chore(ci)"
labels:
- "dependencies"
- "github_actions"
- "chore"

View File

@@ -24,30 +24,12 @@ jobs:
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-cliff-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-cliff-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-cliff-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Extract project and version from PR title"
id: extract

View File

@@ -38,7 +38,6 @@ jobs:
if: needs.extract-project.outputs.project == 'cli'
uses: ./.github/workflows/cli_release.yaml
with:
NAME: dashboard
GIT_REF: ${{ github.sha }}
VERSION: ${{ needs.extract-project.outputs.version }}
secrets:
@@ -54,7 +53,6 @@ jobs:
if: needs.extract-project.outputs.project == '@nhost/dashboard'
uses: ./.github/workflows/dashboard_release.yaml
with:
NAME: dashboard
GIT_REF: ${{ github.sha }}
VERSION: ${{ needs.extract-project.outputs.version }}
secrets:
@@ -83,3 +81,17 @@ jobs:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_PRODUCTION }}
storage:
needs: extract-project
if: needs.extract-project.outputs.project == 'storage'
uses: ./.github/workflows/storage_release.yaml
with:
GIT_REF: ${{ github.sha }}
VERSION: ${{ needs.extract-project.outputs.version }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
project: [cli, dashboard, packages/nhost-js]
project: [cli, dashboard, packages/nhost-js, services/storage]
permissions:
id-token: write
@@ -27,30 +27,12 @@ jobs:
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-cliff-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-cliff-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-cliff-${{ runner.os }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Get next version"
id: version

View File

@@ -3,9 +3,6 @@ name: "cli: release"
on:
workflow_call:
inputs:
NAME:
required: true
type: string
GIT_REF:
required: true
type: string
@@ -76,30 +73,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: cli
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compute common env vars
id: vars
@@ -136,8 +115,8 @@ jobs:
--clobber "${{ github.ref_name }}" \
./upload/* checksums.txt
- name: "Cache build"
run: |
nix store sign --key-file <(echo "${{ secrets.NIX_CACHE_PRIV_KEY }}") --all
find /nix/store -maxdepth 1 -name "*-*" -type d | xargs -n 25 nix copy --to s3://nhost-nix-cache\?region=eu-central-1
- name: "Store Nix cache"
uses: ./.github/actions/cache-nix
with:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
if: always()

View File

@@ -55,30 +55,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Get artifacts"
uses: actions/download-artifact@v5
@@ -108,9 +90,8 @@ jobs:
/home/runner/_work/nhost/nhost/cli/result/bin/cli up --down-on-error
/home/runner/_work/nhost/nhost/cli/result/bin/cli down --volumes
- name: "Cache build"
run: |
nix store sign --key-file <(echo "${{ secrets.NIX_CACHE_PRIV_KEY }}") --all
find /nix/store -maxdepth 1 -name "*-*" -type d | xargs -n 25 nix copy --to s3://nhost-nix-cache\?region=eu-central-1
- name: "Store Nix cache"
uses: ./.github/actions/cache-nix
with:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
if: always()

View File

@@ -4,9 +4,6 @@ name: 'dashboard: release'
on:
workflow_call:
inputs:
NAME:
required: true
type: string
GIT_REF:
required: true
type: string

View File

@@ -7,7 +7,7 @@ on:
jobs:
pr_agent_job:
if: ${{ github.event.sender.type != 'Bot' }}
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 10
permissions:
issues: write
@@ -16,12 +16,11 @@ jobs:
steps:
- name: PR Agent action step
id: pragent
uses: Codium-ai/pr-agent@v0.26
uses: Codium-ai/pr-agent@v0.30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
config.max_model_tokens: 100000
config.model: "anthropic/claude-3-5-sonnet-20240620"
config.model_turbo: "anthropic/claude-3-5-sonnet-20240620"
ignore.glob: "['pnpm-lock.yaml','**/pnpm-lock.yaml']"
config.model: "anthropic/claude-sonnet-4-20250514"
config.model_turbo: "anthropic/claude-sonnet-4-20250514"
ignore.glob: "['pnpm-lock.yaml','**/pnpm-lock.yaml', 'vendor/**','**/client_gen.go','**/models_gen.go','**/generated.go','**/*.gen.go']"

80
.github/workflows/storage_checks.yaml vendored Normal file
View File

@@ -0,0 +1,80 @@
---
name: "storage: check and build"
on:
# pull_request_target:
pull_request:
paths:
- '.github/workflows/storage_checks.yaml'
- '.github/workflows/wf_check.yaml'
- '.github/workflows/wf_build_artifacts.yaml'
# common build
- 'flake.nix'
- 'flake.lock'
- 'nixops/**'
- 'build/**'
# common go
- '.golangci.yaml'
- 'go.mod'
- 'go.sum'
- 'vendor/**'
# storage
- 'storage/**'
push:
branches:
- main
jobs:
check-permissions:
runs-on: ubuntu-latest
steps:
- run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.pull_request.author_association: ${{ github.event.pull_request.author_association }}"
- name: "This task will run and fail if user has no permissions and label safe_to_test isn't present"
if: "github.event_name == 'pull_request_target' && ! ( contains(github.event.pull_request.labels.*.name, 'safe_to_test') || contains(fromJson('[\"OWNER\", \"MEMBER\", \"COLLABORATOR\"]'), github.event.pull_request.author_association) )"
run: |
exit 1
tests:
uses: ./.github/workflows/wf_check.yaml
needs:
- check-permissions
with:
NAME: storage
PATH: services/storage
GIT_REF: ${{ github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
NHOST_PAT: ${{ secrets.NHOST_PAT }}
build_artifacts:
uses: ./.github/workflows/wf_build_artifacts.yaml
needs:
- check-permissions
with:
NAME: storage
PATH: services/storage
GIT_REF: ${{ github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
remove_label:
runs-on: ubuntu-latest
needs:
- check-permissions
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: |
safe_to_test
if: contains(github.event.pull_request.labels.*.name, 'safe_to_test')

60
.github/workflows/storage_release.yaml vendored Normal file
View File

@@ -0,0 +1,60 @@
---
name: "storage: release"
on:
workflow_call:
inputs:
GIT_REF:
required: true
type: string
VERSION:
required: true
type: string
secrets:
AWS_ACCOUNT_ID:
required: true
NIX_CACHE_PUB_KEY:
required: true
NIX_CACHE_PRIV_KEY:
required: true
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
jobs:
build_artifacts:
uses: ./.github/workflows/wf_build_artifacts.yaml
with:
NAME: storage
PATH: services/storage
GIT_REF: ${{ inputs.GIT_REF }}
VERSION: ${{ inputs.VERSION }}
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
push-docker-hub:
uses: ./.github/workflows/wf_docker_push_image.yaml
needs:
- build_artifacts
with:
NAME: storage
PATH: services/storage
VERSION: ${{ inputs.VERSION }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
push-docker-ecr:
uses: ./.github/workflows/wf_docker_push_image_ecr.yaml
needs:
- build_artifacts
with:
NAME: storage
PATH: services/storage
VERSION: ${{ inputs.VERSION }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
CONTAINER_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com

View File

@@ -55,39 +55,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
# - name: "Verify if nixops is pre-built"
# id: verify-nixops-build
# run: |
# export drvPath=$(make build-nixops-dry-run)
# echo "Derivation path: $drvPath"
# nix path-info --store s3://nhost-nix-cache\?region=eu-central-1 $drvPath \
# || (echo "Wait until nixops is already built and cached and run again" && exit 1)
# if: ${{ inputs.NAME != 'nixops' }}
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compute common env vars
id: vars
@@ -124,8 +97,8 @@ jobs:
retention-days: 7
if: ${{ ( inputs.DOCKER ) }}
- name: "Cache build"
run: |
nix store sign --key-file <(echo "${{ secrets.NIX_CACHE_PRIV_KEY }}") --all
find /nix/store -maxdepth 1 -name "*-*" -type d | xargs -n 25 nix copy --to s3://nhost-nix-cache\?region=eu-central-1
- name: "Store Nix cache"
uses: ./.github/actions/cache-nix
with:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
if: always()

View File

@@ -55,39 +55,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
# - name: "Verify if nixops is pre-built"
# id: verify-nixops-build
# run: |
# export drvPath=$(make build-nixops-dry-run)
# echo "Derivation path: $drvPath"
# nix path-info --store s3://nhost-nix-cache\?region=eu-central-1 $drvPath \
# || (echo "Wait until nixops is already built and cached and run again" && exit 1)
# if: ${{ inputs.NAME != 'nixops' }}
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Verify if we need to build"
id: verify-build
@@ -109,8 +82,8 @@ jobs:
run: make check
if: ${{ steps.verify-build.outputs.BUILD_NEEDED == 'yes' }}
- name: "Cache build"
run: |
nix store sign --key-file <(echo "${{ secrets.NIX_CACHE_PRIV_KEY }}") --all
find /nix/store -maxdepth 1 -name "*-*" -type d | xargs -n 25 nix copy --to s3://nhost-nix-cache\?region=eu-central-1
- name: "Store Nix cache"
uses: ./.github/actions/cache-nix
with:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
if: always()

View File

@@ -106,30 +106,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start CLI
run: |
@@ -162,8 +144,8 @@ jobs:
path: dashboard/playwright-report.tar.gz.enc
retention-days: 1
- name: "Cache build"
run: |
nix store sign --key-file <(echo "${{ secrets.NIX_CACHE_PRIV_KEY }}") --all
find /nix/store -maxdepth 1 -name "*-*" -type d | xargs -n 25 nix copy --to s3://nhost-nix-cache\?region=eu-central-1
- name: "Store Nix cache"
uses: ./.github/actions/cache-nix
with:
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
if: always()

View File

@@ -57,30 +57,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Vercel deployment
id: deploy

View File

@@ -0,0 +1,84 @@
---
on:
workflow_call:
inputs:
NAME:
type: string
required: true
PATH:
type: string
required: true
VERSION:
type: string
required: true
secrets:
AWS_ACCOUNT_ID:
required: true
CONTAINER_REGISTRY:
required: true
jobs:
push-to-registry:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write
contents: write
defaults:
run:
working-directory: ${{ inputs.PATH }}
steps:
- name: "Check out repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Configure aws
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- name: "Login to Amazon ECR"
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
- name: "Compute common env vars"
id: vars
run: |
echo "VERSION=$(make get-version VER=${{ inputs.VERSION }})" >> $GITHUB_OUTPUT
- name: "Get artifacts"
uses: actions/download-artifact@v5
with:
path: ~/artifacts
- name: "Inspect artifacts"
run: find ~/artifacts
- name: "Push docker image to docker hub"
run: |
export NAME=${{ inputs.NAME }}
export VERSION=${{ steps.vars.outputs.VERSION }}
export CONTAINER_REGISTRY=${{ secrets.CONTAINER_REGISTRY }}
export CONTAINER_NAME=$CONTAINER_REGISTRY/$NAME
for ARCH in "x86_64" "aarch64"; do
skopeo copy --insecure-policy \
dir:/home/runner/artifacts/${{ inputs.NAME }}-docker-image-$ARCH-$VERSION \
docker-daemon:$CONTAINER_NAME:$VERSION-$ARCH
docker push $CONTAINER_NAME:$VERSION-$ARCH
done
docker manifest create \
$CONTAINER_NAME:$VERSION \
--amend $CONTAINER_NAME:$VERSION-x86_64 \
--amend $CONTAINER_NAME:$VERSION-aarch64
docker manifest push $CONTAINER_NAME:$VERSION

View File

@@ -47,30 +47,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-nhost-${{ github.event.repository.name }}
aws-region: eu-central-1
- uses: cachix/install-nix-action@v31
- name: Setup Nix with Cache
uses: ./.github/actions/setup-nix
with:
install_url: "https://releases.nixos.org/nix/nix-2.28.4/install"
install_options: "--no-daemon"
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ inputs.NAME }}-${{ runner.os }}-${{ runner.arch }}}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-${{ inputs.NAME }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never
NAME: ${{ inputs.NAME }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Build package"
run: make build

View File

@@ -26,6 +26,7 @@ linters:
- legacy
- std-error-handling
rules:
# general rules
- linters:
- funlen
- ireturn
@@ -40,10 +41,26 @@ linters:
- ireturn
- lll
path: schema\.resolvers\.go
# storage service specific rules
- linters:
- gochecknoglobals
- gochecknoinits
path: services/storage/cmd/
- linters:
- gochecknoglobals
path: services/storage/cmd/controller/version.go
- linters:
- funlen
- ireturn
- exhaustruct
path: services/storage/.*_test\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt

View File

@@ -98,64 +98,3 @@ You can run the e2e tests with the following command from the repository root:
```sh
$ pnpm e2e
```
## Changesets
If you've made changes to the packages, you must describe those changes so that they can be reflected in the next release.
We use [changesets](https://github.com/changesets/changesets) to support our versioning and release workflows. When you submit a pull request, a bot checks if changesets are present, and if not, it asks you to add them.
To create a changeset, run the following command from the repository root:
```sh
$ pnpm changeset
```
This command will guide you through the process of creating a changeset. It will create a file in the `.changeset` directory.
You can take a look at the changeset documentation: [How to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).
### Selecting the Version
When you create a changeset, you will be asked to select the version of the package that you are bumping. The versioning scheme is as follows:
- **major**
- For breaking changes (e.g: changing the function signature, etc.)
- Should be avoided as much as possible as it will require users to update their code. Instead, consider supporting both the old and the new API simultaneously for a while.
- For example: `v1.5.8` -> `v2.0.0`
- **minor**
- For new features (e.g: adding a new page to the dashboard, etc.)
- For example: `v1.5.8` -> `v1.6.0`
- **patch**
- For bug fixes (e.g: fixing a typo, etc.)
- For example: `v1.5.8` -> `v1.5.9`
### Writing Good Changesets
A concise summary that describes the changes should be added to each PR. This summary will be used as the changeset description.
The following structure is used for describing changes:
- **The type of the change**:
- fix
- feat
- chore
- docs
- **The scope of the change** (_broader scopes (e.g: dashboard, hasura-storage-js, etc.) are not recommended as GitHub Releases already contain which project is being bumped_):
- projects
- deployments
- deps
- etc.
- **A short summary of the changes that were made**
**Examples:**
- `fix(deployments): use correct timestamp for deployment details`
- `chore(deps): bump @types/react to v18.2.8`
- `feat(secrets): enable secrets`
- etc.
You can always take a look at examples of changesets in the [GitHub Releases section](https://github.com/nhost/nhost/releases).

View File

@@ -101,6 +101,12 @@ test('should create a table with nullable columns', async ({
await expect(
page.getByRole('link', { name: tableName, exact: true }),
).toBeVisible();
await page
.locator(`li:has-text("${tableName}") #table-management-menu button`)
.click();
await page.getByText('Edit Table').click();
expect(page.locator('h2:has-text("Edit Table")')).toBeVisible();
expect(page.locator('div[data-testid="id"]')).toBeVisible();
});
test('should create a table with an identity column', async ({
@@ -116,15 +122,15 @@ test('should create a table with an identity column', async ({
name: tableName,
primaryKeys: ['id'],
columns: [
{ name: 'id', type: 'int4' },
{ name: 'id', type: 'uuid', defaultValue: 'gen_random_uuid()' },
{ name: 'title', type: 'text', nullable: true },
{ name: 'description', type: 'text', nullable: true },
{ name: 'identity_column', type: 'int4' },
],
});
// await page.getByRole('button', { name: /identity/i }).click();
await page.getByLabel('Identity').click();
await page.getByRole('option', { name: /id/i }).click();
await page.getByRole('option', { name: /identity_column/i }).click();
// create table
await page.getByRole('button', { name: /create/i }).click();
@@ -136,6 +142,17 @@ test('should create a table with an identity column', async ({
await expect(
page.getByRole('link', { name: tableName, exact: true }),
).toBeVisible();
await page
.locator(`li:has-text("${tableName}") #table-management-menu button`)
.click();
await page.getByText('Edit Table').click();
expect(page.locator('h2:has-text("Edit Table")')).toBeVisible();
expect(
page.locator('button#identityColumnIndex :has-text("identity_column")'),
).toBeVisible();
expect(page.locator('[id="columns.3.defaultValue"]')).toBeDisabled();
expect(page.locator('[name="columns.3.isNullable"]')).toBeDisabled();
expect(page.locator('[name="columns.3.isUnique"]')).toBeDisabled();
});
test('should create table with foreign key constraint', async ({
@@ -292,4 +309,11 @@ test('should be able to create a table with a composite key', async ({
await expect(
page.getByRole('link', { name: tableName, exact: true }),
).toBeVisible();
await page
.locator(`li:has-text("${tableName}") #table-management-menu button`)
.click();
await page.getByText('Edit Table').click();
expect(page.locator('div[data-testid="id"]')).toBeVisible();
expect(page.locator('div[data-testid="second_id"]')).toBeVisible();
});

View File

@@ -6,13 +6,14 @@ dotenv.config({ path: path.resolve(__dirname, '.env.test') });
export default defineConfig({
testDir: './e2e',
maxFailures: 1,
timeout: 120 * 1000,
expect: {
timeout: 10000,
},
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
retries: 0,
workers: 1,
reporter: 'html',
use: {

View File

@@ -17,7 +17,7 @@ import MaterialAutocomplete, {
autocompleteClasses as materialAutocompleteClasses,
} from '@mui/material/Autocomplete';
import clsx from 'clsx';
import type { ForwardedRef } from 'react';
import type { DetailedHTMLProps, ForwardedRef, HTMLProps } from 'react';
import { forwardRef, useEffect, useState } from 'react';
export interface AutocompleteOption<TValue = string> {
@@ -81,6 +81,9 @@ export interface AutocompleteProps<
* Props passed to the input component.
*/
input?: Partial<Omit<InputProps, 'ref'>>;
inputRoot?: Partial<
DetailedHTMLProps<HTMLProps<HTMLInputElement>, HTMLInputElement>
> & { 'data-testid'?: string };
/**
* Props passed to the input's `FormControl` component.
*/
@@ -471,7 +474,10 @@ function Autocomplete(
}
: null,
},
inputRoot: { 'aria-label': ariaLabel },
inputRoot: {
'aria-label': ariaLabel,
...slotProps.inputRoot,
},
label: InputLabelProps,
formControl: formControlSlotProps,
}}

View File

@@ -244,6 +244,7 @@ export function MultiSelectValue({
variant="outline"
data-selected-item
className="group flex items-center gap-1"
data-testid={items.get(value)}
key={value}
onClick={
clickToRemove
@@ -256,7 +257,10 @@ export function MultiSelectValue({
>
{items.get(value)}
{clickToRemove && (
<XIcon className="size-2 text-muted-foreground group-hover:text-destructive" />
<XIcon
className="size-2 text-muted-foreground group-hover:text-destructive"
data-testid={`${items.get(value)}-remove`}
/>
)}
</Badge>
))}

View File

@@ -0,0 +1,22 @@
import * as React from 'react';
import { cn } from '@/lib/utils';
const Textarea = React.forwardRef<
HTMLTextAreaElement,
React.ComponentProps<'textarea'>
>(({ className, ...props }, ref) => {
return (
<textarea
className={cn(
'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
className,
)}
ref={ref}
{...props}
/>
);
});
Textarea.displayName = 'Textarea';
export { Textarea };

View File

@@ -0,0 +1,465 @@
import {
mockPointerEvent,
render,
screen,
TestUserEvent,
} from '@/tests/testUtils';
import { yupResolver } from '@hookform/resolvers/yup';
import { FormProvider, useForm } from 'react-hook-form';
import { vi } from 'vitest';
import type * as Yup from 'yup';
import BaseTableForm, {
type BaseTableFormValues,
baseTableValidationSchema,
} from './BaseTableForm';
mockPointerEvent();
Object.defineProperty(HTMLElement.prototype, 'getBoundingClientRect', {
value: vi.fn(() => ({
width: 100,
height: 40,
top: 0,
left: 0,
bottom: 40,
right: 100,
})),
});
const mocks = vi.hoisted(() => ({
onSubmit: vi.fn(),
}));
const defaultFormValues = {
columns: [
{
name: '',
type: null as any,
defaultValue: null as any,
isNullable: false,
isUnique: false,
isIdentity: false,
comment: '',
},
],
foreignKeyRelations: [],
primaryKeyIndices: [],
identityColumnIndex: null,
};
function TestTableFormWrapper({ defaultValues = defaultFormValues }: any) {
const form = useForm<
BaseTableFormValues | Yup.InferType<typeof baseTableValidationSchema>
>({
defaultValues,
shouldUnregister: false,
reValidateMode: 'onSubmit',
resolver: yupResolver(baseTableValidationSchema),
});
return (
<FormProvider {...form}>
<BaseTableForm onSubmit={mocks.onSubmit} submitButtonText="Save" />
</FormProvider>
);
}
const user = new TestUserEvent();
async function fillColumnForm(
{ columnName, optionName, typeValue, defaultValue }: any,
index: number,
) {
const columnNameInput = screen.getByTestId(`columns.${index}.name`);
expect(columnNameInput).toBeInTheDocument();
await user.type(columnNameInput, columnName);
await TestUserEvent.fireClickEvent(
screen.getByTestId(`columns.${index}.type`),
);
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: optionName }),
);
expect(screen.getByDisplayValue(typeValue)).toBeInTheDocument();
if (defaultValue) {
expect(
screen.getByTestId(`columns.${index}.defaultValue`),
).toBeInTheDocument();
TestUserEvent.fireTypeEvent(
screen.getByTestId(`columns.${index}.defaultValue`),
`${defaultValue}`,
);
await TestUserEvent.fireClickEvent(
screen.getByRole('option', {
name: `Use "${defaultValue}" as a literal`,
}),
);
expect(screen.getByTestId(`columns.${index}.defaultValue`)).toHaveValue(
defaultValue,
);
}
}
describe('BaseTableForm', () => {
it('should not disable the nullable and unique checkboxes after setting the column name', async () => {
render(<TestTableFormWrapper />);
let firstColumnIsNullableCheckbox = screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isNullable',
});
let firstColumnIsUniqueCheckbox = screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isUnique',
});
expect(firstColumnIsNullableCheckbox).not.toBeDisabled();
expect(firstColumnIsUniqueCheckbox).not.toBeDisabled();
await user.type(screen.getByPlaceholderText('Enter name'), 'column1');
expect(screen.getByDisplayValue('column1')).toBeInTheDocument();
firstColumnIsNullableCheckbox = screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isNullable',
});
firstColumnIsUniqueCheckbox = screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isUnique',
});
expect(firstColumnIsNullableCheckbox).not.toBeDisabled();
expect(firstColumnIsUniqueCheckbox).not.toBeDisabled();
});
it('should disable the nullable and unique checkboxes if the column is the primary key', async () => {
render(<TestTableFormWrapper />);
await fillColumnForm(
{
columnName: 'id',
optionName: 'uuid uuid',
typeValue: 'uuid',
defaultValue: 'gen_random_uuid()',
},
0,
);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
await fillColumnForm(
{
columnName: 'note',
optionName: 'text text',
typeValue: 'text',
},
1,
);
await TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
await fillColumnForm(
{
columnName: 'isDone',
optionName: 'boolean bool',
typeValue: 'boolean',
defaultValue: 'false',
},
2,
);
await TestUserEvent.fireClickEvent(screen.getByText('Add Primary Key'));
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'id' }),
);
expect(screen.getByTestId('id')).toBeInTheDocument();
expect(
screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isNullable',
}),
).toBeDisabled();
expect(
screen.getByRole('checkbox', {
name: (accessibleName, element) =>
element.getAttribute('name') === 'columns.0.isUnique',
}),
).toBeDisabled();
});
it('should disable the nullable and unique checkboxes and default value if the column is an identity column', async () => {
render(<TestTableFormWrapper />);
await fillColumnForm(
{
columnName: 'id',
optionName: 'uuid uuid',
typeValue: 'uuid',
defaultValue: 'gen_random_uuid()',
},
0,
);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
await fillColumnForm(
{
columnName: 'identity_column',
optionName: 'smallint int2',
typeValue: 'smallint',
},
1,
);
TestUserEvent.fireClickEvent(screen.getByLabelText('Identity'));
expect(
screen.getByRole('option', { name: 'identity_column' }),
).toBeInTheDocument();
TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'identity_column' }),
);
expect(screen.getByRole('combobox', { name: 'Identity' }).textContent).toBe(
'identity_column',
);
});
it('should display the identity column picker if an integer is selected as a column type', async () => {
render(<TestTableFormWrapper />);
expect(screen.queryByLabelText('Identity')).not.toBeInTheDocument();
await TestUserEvent.fireClickEvent(
screen.getByPlaceholderText('Select type'),
);
await user.type(screen.getByPlaceholderText('Select type'), 'int');
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'smallint int2' }),
);
expect(screen.getByDisplayValue('smallint')).toBeInTheDocument();
expect(screen.getByLabelText('Identity')).toBeInTheDocument();
await TestUserEvent.fireClickEvent(screen.getByDisplayValue('smallint'));
await user.type(screen.getByDisplayValue('smallint'), 'text');
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'text text' }),
);
expect(screen.getByDisplayValue('text')).toBeInTheDocument();
expect(screen.queryByLabelText('Identity')).not.toBeInTheDocument();
await TestUserEvent.fireClickEvent(screen.getByDisplayValue('text'));
await user.type(screen.getByDisplayValue('text'), 'int');
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'integer int4' }),
);
expect(screen.getByDisplayValue('integer')).toBeInTheDocument();
expect(screen.getByLabelText('Identity')).toBeInTheDocument();
await TestUserEvent.fireClickEvent(screen.getByDisplayValue('integer'));
await user.type(screen.getByDisplayValue('integer'), 'numeric');
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'numeric numeric' }),
);
expect(screen.getByDisplayValue('numeric')).toBeInTheDocument();
expect(screen.queryByLabelText('Identity')).not.toBeInTheDocument();
await TestUserEvent.fireClickEvent(screen.getByDisplayValue('numeric'));
await user.type(screen.getByDisplayValue('numeric'), 'int');
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'bigint int8' }),
);
expect(screen.getByDisplayValue('bigint')).toBeInTheDocument();
expect(screen.getByLabelText('Identity')).toBeInTheDocument();
});
it('should add a new empty row with the Add Column button', async () => {
render(<TestTableFormWrapper />);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
expect(screen.getAllByPlaceholderText('Enter name')).toHaveLength(2);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
expect(screen.getAllByPlaceholderText('Enter name')).toHaveLength(4);
});
it('the remove column button is disabled if it is the only column', async () => {
render(<TestTableFormWrapper />);
expect(screen.getByTestId('remove-column-0')).toBeDisabled();
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
expect(screen.getByTestId('remove-column-0')).not.toBeDisabled();
expect(screen.getByTestId('remove-column-1')).not.toBeDisabled();
expect(screen.getByTestId('remove-column-2')).not.toBeDisabled();
TestUserEvent.fireClickEvent(screen.getByTestId('remove-column-1'));
expect(screen.getByTestId('remove-column-0')).not.toBeDisabled();
expect(screen.getByTestId('remove-column-1')).not.toBeDisabled();
TestUserEvent.fireClickEvent(screen.getByTestId('remove-column-1'));
expect(screen.getByTestId('remove-column-0')).toBeDisabled();
});
it('should add a comment to the column', async () => {
render(<TestTableFormWrapper />);
expect(screen.getByText('Save')).toBeInTheDocument();
await user.type(screen.getByTestId('tableNameInput'), 'test_table');
expect(screen.getByTestId('tableNameInput')).toHaveDisplayValue(
'test_table',
);
await fillColumnForm(
{
columnName: 'id',
optionName: 'uuid uuid',
typeValue: 'uuid',
defaultValue: 'gen_random_uuid()',
},
0,
);
await TestUserEvent.fireClickEvent(screen.getByTestId('columns.0.comment'));
expect(
screen.getByPlaceholderText('Add a comment for the column'),
).toBeInTheDocument();
await user.type(
screen.getByPlaceholderText('Add a comment for the column'),
'Test comment{Escape}',
);
expect(
screen.queryByPlaceholderText('Add a comment for the column'),
).not.toBeInTheDocument();
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
await fillColumnForm(
{
columnName: 'description',
optionName: 'text text',
typeValue: 'text',
},
1,
);
TestUserEvent.fireClickEvent(
screen.getByRole('button', { name: /Add Column/ }),
);
await fillColumnForm(
{
columnName: 'identity_column',
optionName: 'smallint int2',
typeValue: 'smallint',
},
2,
);
await TestUserEvent.fireClickEvent(screen.getByText('Add Primary Key'));
await TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'id' }),
);
expect(screen.getByTestId('id')).toBeInTheDocument();
TestUserEvent.fireClickEvent(screen.getByLabelText('Identity'));
expect(
screen.getByRole('option', { name: 'identity_column' }),
).toBeInTheDocument();
TestUserEvent.fireClickEvent(
screen.getByRole('option', { name: 'identity_column' }),
);
expect(screen.getByText('Save')).toBeInTheDocument();
await TestUserEvent.fireClickEvent(screen.getByText('Save'));
expect(screen.getByText('Save')).not.toBeDisabled();
expect(mocks.onSubmit.mock.calls[0][0].name).toBe('test_table');
expect(mocks.onSubmit.mock.calls[0][0].primaryKeyIndices).toStrictEqual([
'0',
]);
expect(mocks.onSubmit.mock.calls[0][0].identityColumnIndex).toBe(2);
expect(mocks.onSubmit.mock.calls[0][0].columns).toStrictEqual([
{
name: 'id',
type: { group: 'UUID types', label: 'uuid', value: 'uuid' },
defaultValue: {
custom: true,
dropdownLabel: 'Use "gen_random_uuid()" as a literal',
label: 'gen_random_uuid()',
value: 'gen_random_uuid()',
},
isNullable: false,
isUnique: false,
isIdentity: false,
comment: 'Test comment',
},
{
name: 'description',
type: { group: 'String types', label: 'text', value: 'text' },
defaultValue: null,
isNullable: false,
isUnique: false,
isIdentity: false,
comment: null,
},
{
comment: null,
defaultValue: null,
isIdentity: false,
isNullable: false,
isUnique: false,
name: 'identity_column',
type: {
group: 'Numeric types',
label: 'smallint',
value: 'int2',
},
},
]);
});
});

View File

@@ -86,6 +86,9 @@ function NameInput() {
{...register('name')}
id="name"
fullWidth
inputProps={{
'data-testid': 'tableNameInput',
}}
label="Name"
helperText={
typeof errors.name?.message === 'string' ? errors.name?.message : ''

View File

@@ -0,0 +1,59 @@
import { Button } from '@/components/ui/v3/button';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/v3/popover';
import { Textarea } from '@/components/ui/v3/textarea';
import { isEmptyValue } from '@/lib/utils';
import { MessageSquare, MessageSquareText } from 'lucide-react';
import { type KeyboardEvent } from 'react';
import { useFormContext, useWatch } from 'react-hook-form';
interface ColumnCommentProps {
index: number;
}
function ColumnComment({ index }: ColumnCommentProps) {
const { register } = useFormContext();
const comment = useWatch({ name: `columns.${index}.comment` });
const CommentIcon = isEmptyValue(comment) ? MessageSquare : MessageSquareText;
const title = isEmptyValue(comment) ? 'Add comment' : 'Edit comment';
function handleKeyDown(event: KeyboardEvent<HTMLTextAreaElement>) {
if (event.key === 'Escape') {
event.stopPropagation();
}
}
return (
<Popover>
<PopoverTrigger asChild>
<Button
type="button"
variant="ghost"
size="icon"
title={title}
data-testid={`columns.${index}.comment`}
className="h-8 w-8 hover:bg-[#eaedf0] dark:hover:bg-[#2f363d]"
>
<CommentIcon strokeWidth={1} className="h-5 w-5" />
</Button>
</PopoverTrigger>
<PopoverContent
className="w-80 p-0 data-[state=closed]:duration-100 data-[state=open]:duration-100"
align="end"
>
<Textarea
{...register(`columns.${index}.comment`, { shouldUnregister: false })}
onKeyDown={handleKeyDown}
className="resize-none"
placeholder="Add a comment for the column"
/>
</PopoverContent>
</Popover>
);
}
export default ColumnComment;

View File

@@ -7,6 +7,7 @@ import { InlineCode } from '@/components/presentational/InlineCode';
import type { CheckboxProps } from '@/components/ui/v2/Checkbox';
import { Input } from '@/components/ui/v2/Input';
import { OptionBase } from '@/components/ui/v2/Option';
import type {
ColumnType,
ForeignKeyRelation,
@@ -17,10 +18,12 @@ import {
postgresTypeGroups,
} from '@/features/orgs/projects/database/dataGrid/utils/postgresqlConstants';
import clsx from 'clsx';
import type { PropsWithoutRef } from 'react';
import { memo, useEffect, useState } from 'react';
import type { FieldError } from 'react-hook-form';
import { useFormContext, useFormState, useWatch } from 'react-hook-form';
import ColumnComment from './ColumnComment';
import { RemoveButton } from './RemoveButton';
export interface FieldArrayInputProps {
@@ -43,7 +46,7 @@ function NameInput({ index }: FieldArrayInputProps) {
name: [`columns.${index}.name`],
});
const primaryKeyIndex: number = useWatch({ name: 'primaryKeyIndex' });
const primaryKeyIndices: string[] = useWatch({ name: 'primaryKeyIndices' });
return (
<Input
@@ -61,17 +64,12 @@ function NameInput({ index }: FieldArrayInputProps) {
clearErrors('columns');
}
if (!event.target.value && primaryKeyIndex === index) {
setValue('primaryKeyIndex', null);
if (!event.target.value && primaryKeyIndices.includes(`${index}`)) {
const updatedPrimaryKeyIndices = primaryKeyIndices.filter(
(pk) => pk !== `${index}`,
);
return;
}
if (
event.target.value &&
(primaryKeyIndex === null || typeof primaryKeyIndex === 'undefined')
) {
setValue('primaryKeyIndex', index);
setValue('primaryKeyIndices', updatedPrimaryKeyIndices);
}
},
})}
@@ -81,6 +79,7 @@ function NameInput({ index }: FieldArrayInputProps) {
hideEmptyHelperText
error={Boolean(errors?.columns?.[index]?.name)}
helperText={errors?.columns?.[index]?.name?.message}
inputProps={{ 'data-testid': `columns.${index}.name` }}
/>
);
}
@@ -98,6 +97,11 @@ function TypeAutocomplete({ index }: FieldArrayInputProps) {
return (
<ControlledAutocomplete
slotProps={{
inputRoot: {
'data-testid': `columns.${index}.type`,
},
}}
id={`columns.${index}.type`}
name={`columns.${index}.type`}
aria-label="Type"
@@ -201,6 +205,9 @@ function DefaultValueAutocomplete({ index }: FieldArrayInputProps) {
freeSolo
slotProps={{
paper: { className: clsx(availableFunctions.length === 0 && 'hidden') },
inputRoot: {
'data-testid': `columns.${index}.defaultValue`,
},
}}
disabled={isIdentity}
noOptionsText="Enter a custom default value"
@@ -225,10 +232,10 @@ function Checkbox({
index,
...props
}: FieldArrayInputProps & PropsWithoutRef<CheckboxProps>) {
const primaryKeyIndex = useWatch({ name: 'primaryKeyIndex' });
const primaryKeyIndices = useWatch({ name: 'primaryKeyIndices' });
const identityColumnIndex = useWatch({ name: 'identityColumnIndex' });
const isPrimary = primaryKeyIndex === index;
const isPrimary = primaryKeyIndices.includes(`${index}`);
const isIdentity = identityColumnIndex === index;
return (
@@ -249,28 +256,39 @@ export interface ColumnEditorRowProps extends FieldArrayInputProps {
}
const ColumnEditorRow = memo(({ index, remove }: ColumnEditorRowProps) => (
<div role="row" className="grid w-full grid-cols-12 gap-1">
<div role="cell" className="col-span-3">
<div role="row" className="flex w-full gap-2">
<div role="cell" className="w-52 flex-none">
<NameInput index={index} />
</div>
<div role="cell" className="col-span-3">
<div role="cell" className="w-52 flex-none">
<TypeAutocomplete index={index} />
</div>
<div role="cell" className="col-span-3">
<div role="cell" className="w-52 flex-none">
<DefaultValueAutocomplete index={index} />
</div>
<div role="cell" className="col-span-1 flex justify-center py-3">
<div role="cell" className="flex w-8 flex-none items-center justify-center">
<ColumnComment index={index} />
</div>
<div
role="cell"
className="flex w-13 flex-none items-center justify-center"
>
<Checkbox
name={`columns.${index}.isNullable`}
aria-label="Nullable"
index={index}
data-testid={`columns.${index}.isNullable`}
/>
</div>
<div role="cell" className="col-span-1 flex justify-center py-3">
<div
role="cell"
className="flex w-13 flex-none items-center justify-center"
>
<Checkbox
name={`columns.${index}.isUnique`}
aria-label="Unique"
@@ -278,7 +296,7 @@ const ColumnEditorRow = memo(({ index, remove }: ColumnEditorRowProps) => (
/>
</div>
<div role="cell" className="col-span-1 flex justify-center py-0.5">
<div role="cell" className="flex w-9 flex-none items-center justify-center">
<RemoveButton
index={index}
onClick={() => {

View File

@@ -25,9 +25,9 @@ export default function ColumnEditorTable() {
return (
<>
<div role="table" className="col-span-8">
<div className="sticky top-0 z-10 grid w-full grid-cols-12 gap-1 pb-2 pt-1">
<div role="columnheader" className="col-span-3">
<div role="table" className="col-span-8 overflow-x-auto">
<div className="sticky top-0 z-10 flex w-full gap-2 pb-2 pt-1">
<div role="columnheader" className="w-52 flex-none">
<InputLabel as="span">
Name
<Text component="span" color="error">
@@ -36,7 +36,7 @@ export default function ColumnEditorTable() {
</InputLabel>
</div>
<div role="columnheader" className="col-span-3">
<div role="columnheader" className="w-52 flex-none">
<InputLabel as="span">
Type
<Text component="span" color="error">
@@ -45,24 +45,30 @@ export default function ColumnEditorTable() {
</InputLabel>
</div>
<div role="columnheader" className="col-span-3">
<div role="columnheader" className="w-52 flex-none">
<InputLabel as="span">Default Value</InputLabel>
</div>
<div role="columnheader" className="w-8 flex-none">
<InputLabel as="span" className="hidden">
Comment
</InputLabel>
</div>
<div role="columnheader" className="col-span-1 truncate text-center">
<div role="columnheader" className="w-13 flex-none text-center">
<InputLabel as="span" className="truncate">
Nullable
</InputLabel>
</div>
<div role="columnheader" className="col-span-1 truncate text-center">
<div role="columnheader" className="w-13 flex-none text-center">
<InputLabel as="span" className="truncate">
Unique
</InputLabel>
</div>
<div className="flex w-9 flex-auto" />
</div>
<div role="rowgroup" className="grid w-full grid-flow-row gap-2">
<div role="rowgroup" className="grid w-full grid-flow-row gap-1">
{fields.map((field, index) => (
<ColumnEditorRow key={field.id} index={index} remove={remove} />
))}
@@ -82,6 +88,7 @@ export default function ColumnEditorTable() {
isNullable: false,
isUnique: false,
isIdentity: false,
comment: null,
})
}
startIcon={<PlusIcon />}

View File

@@ -60,6 +60,7 @@ export default function ForeignKeyEditorSection() {
validateDuplicateRelation(values);
append(values);
}
const primaryKeyIndices = getValues('primaryKeyIndices');
return (
<section className="grid grid-flow-row gap-2 px-6">
@@ -71,15 +72,13 @@ export default function ForeignKeyEditorSection() {
<ForeignKeyEditorRow
index={index}
onEdit={() => {
const primaryKeyIndex = getValues('primaryKeyIndex');
openDialog({
title: 'Edit Foreign Key Relation',
component: (
<EditForeignKeyForm
foreignKeyRelation={fields[index] as ForeignKeyRelation}
availableColumns={columns.map((column, columnIndex) =>
columnIndex === primaryKeyIndex
primaryKeyIndices.includes(`${columnIndex}`)
? { ...column, isPrimary: true }
: column,
)}
@@ -109,8 +108,6 @@ export default function ForeignKeyEditorSection() {
}}
disabled={columnsWithNameAndType?.length === 0}
onClick={() => {
const primaryKeyIndex = getValues('primaryKeyIndex');
openDialog({
title: (
<span className="grid grid-flow-row">
@@ -125,7 +122,7 @@ export default function ForeignKeyEditorSection() {
component: (
<CreateForeignKeyForm
availableColumns={columns.map((column, index) =>
index === primaryKeyIndex
primaryKeyIndices.includes(`${index}`)
? { ...column, isPrimary: true }
: column,
)}

View File

@@ -75,5 +75,3 @@ export default function PrimaryKeySelect() {
</div>
);
}
// #1e293b
// #1b2534

View File

@@ -67,13 +67,14 @@ export default function CreateTableForm({
isNullable: false,
isUnique: false,
isIdentity: false,
comment: '',
},
],
foreignKeyRelations: [],
primaryKeyIndices: [],
identityColumnIndex: null,
},
shouldUnregister: true,
shouldUnregister: false,
reValidateMode: 'onSubmit',
resolver: yupResolver(baseTableValidationSchema),
});
@@ -86,6 +87,7 @@ export default function CreateTableForm({
],
[],
);
try {
const table: DatabaseTable = {
...values,

View File

@@ -112,7 +112,7 @@ export default function DatabaseRecordInputGroup({
const isMultiline =
specificType === 'text' ||
specificType === 'bpchar' ||
specificType === 'character varying' ||
specificType === 'varchar' ||
specificType === 'json' ||
specificType === 'jsonb';

View File

@@ -133,6 +133,7 @@ export default function EditTableForm({
defaultValue: column.defaultValue,
isNullable: column.isNullable,
isUnique: column.isUnique,
comment: column.comment || '',
})),
primaryKeyIndices,
identityColumnIndex:
@@ -153,7 +154,7 @@ export default function EditTableForm({
async function handleSubmit(values: BaseTableFormValues) {
const primaryKey = values.primaryKeyIndices.map<string>(
(primaryKeys, primaryKeyIndex) => values.columns[primaryKeyIndex].name,
(primaryKeys) => values.columns[primaryKeys].name,
);
try {
const updatedTable: DatabaseTable = {

View File

@@ -67,7 +67,6 @@ describe('prepareCreateTableQuery', () => {
schema: 'public',
table,
});
expect(transaction).toHaveLength(1);
expect(transaction[0].args.sql).toBe(
'CREATE TABLE public.test_table (id uuid NOT NULL, name text NOT NULL, author_id uuid NOT NULL, PRIMARY KEY (id), FOREIGN KEY (author_id) REFERENCES public.authors (id) ON UPDATE RESTRICT ON DELETE RESTRICT);',
@@ -244,4 +243,37 @@ describe('prepareCreateTableQuery', () => {
'CREATE TABLE public.test_table (id uuid NOT NULL, name varchar(10) NOT NULL);',
);
});
test('should add comments to columns', () => {
const table: DatabaseTable = {
name: 'test_table',
columns: [
{
name: 'id',
type: { value: 'uuid', label: 'UUID' },
comment: 'Primary key comment',
},
{
name: 'name',
type: { value: 'text', label: 'Text' },
comment: 'Text comment',
},
],
primaryKey: ['id'],
};
const transaction = prepareCreateTableQuery({
dataSource: 'default',
schema: 'public',
table,
});
expect(transaction).toHaveLength(3);
expect(transaction[1].args.sql).toBe(
"COMMENT ON COLUMN public.test_table.id is 'Primary key comment';",
);
expect(transaction[2].args.sql).toBe(
"COMMENT ON COLUMN public.test_table.name is 'Text comment';",
);
});
});

View File

@@ -2,7 +2,10 @@ import type {
DatabaseTable,
MutationOrQueryBaseOptions,
} from '@/features/orgs/projects/database/dataGrid/types/dataBrowser';
import { getPreparedHasuraQuery } from '@/features/orgs/projects/database/dataGrid/utils/hasuraQueryHelpers';
import {
getPreparedHasuraQuery,
type HasuraOperation,
} from '@/features/orgs/projects/database/dataGrid/utils/hasuraQueryHelpers';
import { isNotEmptyValue } from '@/lib/utils';
import { format } from 'node-pg-format';
@@ -80,6 +83,23 @@ export default function prepareCreateTableQuery({
);
}
const hasColumnComments = table.columns.some(({ comment }) =>
isNotEmptyValue(comment),
);
let columnComments: HasuraOperation[] = [];
if (hasColumnComments) {
columnComments = table.columns.map(({ comment, name }) =>
getPreparedHasuraQuery(
dataSource,
'COMMENT ON COLUMN %I.%I.%I is %L',
schema,
table.name,
name,
comment,
),
);
}
return [
getPreparedHasuraQuery(
dataSource,
@@ -88,5 +108,6 @@ export default function prepareCreateTableQuery({
table.name,
columnsAndConstraints,
),
...columnComments,
];
}

View File

@@ -515,4 +515,71 @@ describe('prepareUpdateTableQuery', () => {
expect(dropConstraintQuery).toBeDefined();
expect(addPrimaryKeyQuery).toBeUndefined();
});
test('should prepare a query for adding comment to with the old table name', () => {
const updatedTable: DatabaseTable = {
name: 'test_table_renamed',
primaryKey: ['id'],
columns: [
{
id: 'id',
name: 'id',
type: { value: 'uuid', label: 'UUID' },
defaultValue: {
value: 'gen_random_uuid()',
label: 'gen_random_uuid()',
},
},
{
id: 'author_id',
name: 'author_id',
type: { value: 'int4', label: 'int4' },
comment: 'Author id',
},
],
foreignKeyRelations: [],
};
const transaction = prepareUpdateTableQuery({
dataSource: 'default',
schema: 'public',
originalTable,
updatedTable,
originalColumns,
originalForeignKeyRelations: [],
});
expect(transaction).toHaveLength(2);
expect(transaction[0].args.sql).toBe(
"COMMENT ON COLUMN public.test_table.author_id IS 'Author id';",
);
});
test('should prepare a query for adding comment to the table', () => {
const updatedTable: DatabaseTable = {
name: 'test_table',
primaryKey: ['id'],
columns: originalColumns.map((c, index) => ({
...c,
comment: `comment ${index}`,
})),
foreignKeyRelations: [],
};
const transaction = prepareUpdateTableQuery({
dataSource: 'default',
schema: 'public',
originalTable,
updatedTable,
originalColumns,
originalForeignKeyRelations: [],
});
expect(transaction).toHaveLength(2);
expect(transaction[0].args.sql).toBe(
"COMMENT ON COLUMN public.test_table.id IS 'comment 0';",
);
expect(transaction[1].args.sql).toBe(
"COMMENT ON COLUMN public.test_table.author_id IS 'comment 1';",
);
});
});

View File

@@ -220,7 +220,7 @@ export interface ColumnInsertOptions {
/**
* User defined column type of a character field in PostgreSQL.
*/
export type CharacterColumnType = 'character varying' | 'bpchar' | 'text';
export type CharacterColumnType = 'varchar' | 'bpchar' | 'text';
/**
* User defined column type of a boolean field in PostgreSQL.
@@ -249,7 +249,6 @@ export type DateColumnType =
export type NumericColumnType =
| 'oid'
| 'numeric'
| 'int'
| 'int2'
| 'int4'
| 'serial'

View File

@@ -7,9 +7,6 @@ describe('getInputType', () => {
expect(getInputType({ type: 'number', specificType: 'numeric' })).toBe(
'number',
);
expect(getInputType({ type: 'number', specificType: 'int' })).toBe(
'number',
);
expect(getInputType({ type: 'number', specificType: 'int4' })).toBe(
'number',
);
@@ -17,9 +14,9 @@ describe('getInputType', () => {
test('should return "text" if the column is text based', () => {
expect(getInputType({ type: 'text', specificType: 'text' })).toBe('text');
expect(
getInputType({ type: 'text', specificType: 'character varying' }),
).toBe('text');
expect(getInputType({ type: 'text', specificType: 'varchar' })).toBe(
'text',
);
expect(getInputType({ type: 'text', specificType: 'bpchar' })).toBe('text');
});

View File

@@ -1,13 +1,24 @@
import type { NormalizedQueryDataRow } from '@/features/orgs/projects/database/dataGrid/types/dataBrowser';
import { postgresTypeGroups } from '@/features/orgs/projects/database/dataGrid/utils/postgresqlConstants';
function getColumnValue(column: NormalizedQueryDataRow) {
if (
column.data_type === 'USER-DEFINED' ||
column.full_data_type.indexOf('(') > -1
) {
return column.full_data_type;
}
return column.udt_name;
}
function normalizeColumnType(column: NormalizedQueryDataRow) {
const label =
postgresTypeGroups.find((pt) => pt.value === column.full_data_type)
?.label || column.full_data_type;
return {
label,
value: column.full_data_type,
value: getColumnValue(column),
custom:
column.data_type === 'USER-DEFINED' ||
column.full_data_type !== column.udt_name,

View File

@@ -25,7 +25,7 @@ export default function normalizeDatabaseColumn(
isIdentity: rawColumn.is_identity === 'YES',
isNullable: rawColumn.is_nullable === 'YES',
isUnique: rawColumn.is_unique,
comment: rawColumn.comment || null,
comment: rawColumn.column_comment || null,
defaultValue: rawColumn.column_default
? {
value: normalizedDefaultValue,

View File

@@ -36,11 +36,7 @@ export const POSTGRESQL_DECIMAL_TYPES = ['numeric', 'real', 'double precision'];
*
* @docs https://www.postgresql.org/docs/current/datatype-character.html
*/
export const POSTGRESQL_CHARACTER_TYPES = [
'character varying',
'character',
'text',
];
export const POSTGRESQL_CHARACTER_TYPES = ['varchar', 'character', 'text'];
/**
* JSON data types in PostgreSQL.
@@ -75,7 +71,7 @@ export const postgresTypeGroups: {
{
group: 'String types',
label: 'character varying',
value: 'character varying',
value: 'varchar',
},
{ group: 'String types', label: 'character', value: 'bpchar' },

View File

@@ -25,7 +25,7 @@ export default function DataGridTextCell<TData extends object>({
const isMultiline =
specificType === 'text' ||
specificType === 'bpchar' ||
specificType === 'character varying' ||
specificType === 'varchar' ||
specificType === 'json' ||
specificType === 'jsonb';

View File

@@ -219,6 +219,16 @@ export class TestUserEvent {
});
}
async keyboard(value: string) {
await waitFor(async () => {
await this.user.keyboard(value);
});
}
async keyboardWithoutWaitFor(value: string) {
await this.user.keyboard(value);
}
async clear(element: Element) {
await waitFor(async () => {
await this.user.clear(element);
@@ -236,6 +246,17 @@ export class TestUserEvent {
);
});
}
static async fireTypeEvent(element: Element, text: string) {
await waitFor(() => {
fireEvent.change(element, {
target: { value: text },
});
fireEvent.input(element, {
target: { value: text },
});
});
}
}
export * from '@testing-library/react';

View File

@@ -58,6 +58,10 @@
inherit self pkgs nix-filter nixops-lib;
};
storagef = import ./services/storage/project.nix {
inherit self pkgs nix-filter nixops-lib;
};
tutorialsf = import ./examples/tutorials/project.nix {
inherit self pkgs nix-filter nixops-lib nix2containerPkgs;
};
@@ -78,6 +82,7 @@
mintlify-openapi = mintlify-openapif.check;
nhost-js = nhost-jsf.check;
nixops = nixopsf.check;
storage = storagef.check;
tutorials = tutorialsf.check;
};
@@ -155,6 +160,7 @@
mintlify-openapi = mintlify-openapif.devShell;
nhost-js = nhost-jsf.devShell;
nixops = nixopsf.devShell;
storage = storagef.devShell;
tutorials = tutorialsf.devShell;
};
@@ -170,6 +176,9 @@
mintlify-openapi = mintlify-openapif.package;
nhost-js = nhost-jsf.package;
nixops = nixopsf.package;
storage = storagef.package;
storage-docker-image = storagef.dockerImage;
clamav-docker-image = storagef.clamav-docker-image;
tutorials = tutorialsf.package;
};
}

52
go.mod
View File

@@ -5,26 +5,43 @@ go 1.24.2
require (
github.com/99designs/gqlgen v0.17.80
github.com/Yamashou/gqlgenc v0.33.0
github.com/aws/aws-sdk-go-v2 v1.36.3
github.com/aws/aws-sdk-go-v2/config v1.29.15
github.com/aws/aws-sdk-go-v2/credentials v1.17.68
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1
github.com/charmbracelet/lipgloss v1.1.0
github.com/creack/pty v1.1.24
github.com/davidbyttow/govips/v2 v2.16.0
github.com/gabriel-vasile/mimetype v1.4.8
github.com/getkin/kin-openapi v0.133.0
github.com/gin-contrib/cors v1.7.3
github.com/gin-gonic/gin v1.11.0
github.com/go-git/go-git/v5 v5.16.2
github.com/golang-jwt/jwt/v5 v5.2.2
github.com/golang-migrate/migrate/v4 v4.19.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-getter v1.8.1
github.com/nhost/be v0.0.0-20250826134155-48638c4b3f6a
github.com/oapi-codegen/gin-middleware v1.0.2
github.com/oapi-codegen/runtime v1.1.1
github.com/pb33f/libopenapi v0.21.12
github.com/pelletier/go-toml/v2 v2.2.4
github.com/rs/cors/wrapper/gin v0.0.0-20240830163046-1084d89a1692
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/urfave/cli-docs/v3 v3.0.0-alpha6
github.com/urfave/cli/v2 v2.27.7
github.com/urfave/cli/v3 v3.3.3
github.com/wI2L/jsondiff v0.7.0
go.uber.org/mock v0.5.0
golang.org/x/mod v0.28.0
golang.org/x/term v0.35.0
gopkg.in/evanphx/json-patch.v5 v5.9.11
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)
@@ -45,10 +62,8 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/agnivade/levenshtein v1.2.1 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.15 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.68 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
@@ -58,7 +73,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.20 // indirect
@@ -86,39 +100,46 @@ require (
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gin-contrib/sse v1.1.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.27.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgx/v5 v5.7.2 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
@@ -126,8 +147,12 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
@@ -140,11 +165,16 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/sosodev/duration v1.3.1 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/speakeasy-api/jsonpath v0.6.2 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
@@ -156,6 +186,7 @@ require (
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240815153524-6ea36470d1bd // indirect
github.com/woodsbury/decimal128 v1.3.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
@@ -164,14 +195,15 @@ require (
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.36.0 // indirect
go.opentelemetry.io/otel/metric v1.36.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
go.opentelemetry.io/otel/trace v1.36.0 // indirect
go.uber.org/mock v0.5.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/arch v0.20.0 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.17.0 // indirect

167
go.sum
View File

@@ -28,6 +28,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/99designs/gqlgen v0.17.80 h1:S64VF9SK+q3JjQbilgdrM0o4iFQgB54mVQ3QvXEO4Ek=
github.com/99designs/gqlgen v0.17.80/go.mod h1:vgNcZlLwemsUhYim4dC1pvFP5FX0pr2Y+uYUoHFb1ig=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 h1:5IT7xOdq17MtcdtL/vtl6mGfzhaq4m4vpollPRmlsBQ=
@@ -43,6 +45,7 @@ github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNx
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=
github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/Yamashou/gqlgenc v0.33.0 h1:0fxTnNE8/JVmFpfo7reA5pEgOcr7VjNc+/nEpVhNjfc=
github.com/Yamashou/gqlgenc v0.33.0/go.mod h1:MZGXx/nALyxcehcFeLGmYiNsJ+hQTOGJzNYCGNX4rL0=
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
@@ -53,6 +56,8 @@ github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kk
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
@@ -101,6 +106,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ=
@@ -127,6 +133,11 @@ github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg=
github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
@@ -137,8 +148,20 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidbyttow/govips/v2 v2.16.0 h1:1nH/Rbx8qZP1hd+oYL9fYQjAnm1+KorX9s07ZGseQmo=
github.com/davidbyttow/govips/v2 v2.16.0/go.mod h1:clH5/IDVmG5eVyc23qYpyi7kmOT0B/1QNTKtci4RkyM=
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/dhui/dktest v0.4.6 h1:+DPKyScKSEp3VLtbMDHcUq6V5Lm5zfZZVb0Sk7Ahom4=
github.com/dhui/dktest v0.4.6/go.mod h1:JHTSYDtKkvFNFHJKqCzVzqXecyv+tKt8EzceOmQOgbU=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI=
github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o=
github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=
github.com/emicklei/proto v1.14.0 h1:WYxC0OrBuuC+FUCTZvb8+fzEHdZMwLEF+OnVfZA3LXU=
@@ -155,8 +178,16 @@ github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfU
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM=
github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8=
github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ=
github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE=
github.com/gin-contrib/cors v1.7.3 h1:hV+a5xp8hwJoTw7OY+a70FsL8JkVVFTXw9EcfrYUdns=
github.com/gin-contrib/cors v1.7.3/go.mod h1:M3bcKZhxzsvI+rlRSkkxHyljJt1ESd93COUvemZ79j4=
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
@@ -178,6 +209,10 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic=
github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk=
github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU=
github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
@@ -188,18 +223,25 @@ github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHO
github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-migrate/migrate/v4 v4.19.0 h1:RcjOnCGz3Or6HQYEJ/EEVLfWnmw9KnoigPSjzhCuaSE=
github.com/golang-migrate/migrate/v4 v4.19.0/go.mod h1:9dyEcu+hO+G9hPSw8AIg50yg622pXJsoHItQnDGZkI0=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -213,20 +255,29 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU
github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65/go.mod h1:WtMzv9T++tfWVea+qB2MXoaqxw33S8bpJslzUike2mQ=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-getter v1.8.1 h1:5Ew/2lABx4iHbGhNUuo3Vheqypxn+nCraVOZOrPLmwQ=
github.com/hashicorp/go-getter v1.8.1/go.mod h1:2mndIb0CxmdA4Vdc9KcsaAQ/NpADl76u5VSfhRUpEC4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
@@ -237,8 +288,11 @@ github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
@@ -270,17 +324,34 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nhost/be v0.0.0-20250826134155-48638c4b3f6a h1:X0diMLIRQBKobQ4W5di8fPqwakLFchJdzAtamO97Vrs=
github.com/nhost/be v0.0.0-20250826134155-48638c4b3f6a/go.mod h1:iRPhO+qcQzTtNQ7PaQMJAcEw0tgWzgjzcGWgJ4ifrUo=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/oapi-codegen/gin-middleware v1.0.2 h1:/H99UzvHQAUxXK8pzdcGAZgjCVeXdFDAUUWaJT0k0eI=
github.com/oapi-codegen/gin-middleware v1.0.2/go.mod h1:2HJDQjH8jzK2/k/VKcWl+/T41H7ai2bKa6dN3AA2GpA=
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -291,6 +362,8 @@ github.com/pb33f/libopenapi v0.21.12 h1:ityKYYWjiirJlz+slNaVF2NGfVF4Zn32H6CQEcrZ
github.com/pb33f/libopenapi v0.21.12/go.mod h1:utT5sD2/mnN7YK68FfZT5yEPbI1wwRBpSS4Hi0oOrBU=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=
github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -325,6 +398,8 @@ github.com/rs/cors/wrapper/gin v0.0.0-20240830163046-1084d89a1692 h1:lwzJgPw5Y6p
github.com/rs/cors/wrapper/gin v0.0.0-20240830163046-1084d89a1692/go.mod h1:742Ialb8SOs5yB2PqRDzFcyND3280PoaS5/wcKQUQKE=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
@@ -334,22 +409,39 @@ github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnB
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4=
github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
github.com/speakeasy-api/jsonpath v0.6.2 h1:Mys71yd6u8kuowNCR0gCVPlVAHCmKtoGXYoAtcEbqXQ=
github.com/speakeasy-api/jsonpath v0.6.2/go.mod h1:ymb2iSkyOycmzKwbEAYPJV/yi2rSmvBCLZJcyD+VVWw=
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
@@ -382,12 +474,15 @@ github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ=
github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM=
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240815153524-6ea36470d1bd h1:dLuIF2kX9c+KknGJUdJi1Il1SDiTSK158/BB9kdgAew=
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240815153524-6ea36470d1bd/go.mod h1:DbzwytT4g/odXquuOCqroKvtxxldI4nb3nuesHF/Exo=
github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0=
github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM=
github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
@@ -398,56 +493,114 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I=
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c=
golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.243.0 h1:sw+ESIJ4BVnlJcWu9S+p2Z6Qq1PjG77T8IJ1xtp4jZQ=
google.golang.org/api v0.243.0/go.mod h1:GE4QtYfaybx1KmeHMdBnNnyLzBZCVihGBXAmJu/uUr8=
google.golang.org/genproto v0.0.0-20250728155136-f173205681a0 h1:btBcgujH2+KIWEfz0s7Cdtt9R7hpwM4SAEXAdXf/ddw=
@@ -462,6 +615,7 @@ google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7I
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/evanphx/json-patch.v5 v5.9.11 h1:OMPeiLomOQwe8+Ku4nwXsdOmrRw2vGUpP3XgLj3ojNw=
@@ -469,6 +623,7 @@ gopkg.in/evanphx/json-patch.v5 v5.9.11/go.mod h1:/kvTRh1TVm5wuM6OkHxqXtE/1nUZZpi
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -15,8 +15,13 @@
},
"scripts": {
"build:dashboard": "turbo run build --filter=@nhost/dashboard",
"build:nhost-js": "turbo run build --filter=@nhost/nhost-js",
"audit-ci": "pnpm exec audit-ci --config ./audit-ci.jsonc",
"workspace:list": "pnpm ls --depth=-1 -r"
"workspace:list": "pnpm ls --depth=-1 -r",
"clean:all": "pnpm clean && rm -rf ./{{packages,examples/**,templates/**}/*,docs,dashboard}/{.nhost,node_modules} node_modules",
"clean": "rm -rf ./{{packages,examples/**}/*,docs,dashboard}/{dist,umd,.next,.turbo,coverage}",
"clean:install": "pnpm clean:all && pnpm install",
"dev:dashboard": "turbo run dev --filter=@nhost/dashboard"
},
"devDependencies": {
"audit-ci": "^6.6.1",

55
services/storage/Makefile Normal file
View File

@@ -0,0 +1,55 @@
ROOT_DIR?=$(abspath ../..)
include $(ROOT_DIR)/build/makefiles/general.makefile
DOCKER_DEV_ENV_PATH=build/dev/docker
.PHONY: _dev-env-up
_dev-env-up:
docker compose -f ${DOCKER_DEV_ENV_PATH}/docker-compose.yaml up -d
.PHONY: _dev-env-down
_dev-env-down:
docker compose -f ${DOCKER_DEV_ENV_PATH}/docker-compose.yaml down --volumes
.PHONY: _dev-env-build
_dev-env-build: build-docker-image
docker compose -f ${DOCKER_DEV_ENV_PATH}/docker-compose.yaml build
.PHONY: dev-env-up-short
dev-env-up-short: ## Starts development environment without hasura-storage
docker compose -f ${DOCKER_DEV_ENV_PATH}/docker-compose.yaml up -d postgres graphql-engine minio clamd
.PHONY: build-docker-image-clamav-dev
build-docker-image-clamav-dev: ## Build dev docker container for clamav
nix build $(docker-build-options) --show-trace \
.\#packages.$(ARCH)-linux.clamav-docker-image \
--print-build-logs
nix develop \#skopeo -c \
skopeo copy --insecure-policy dir:./result docker-daemon:clamav:$(VERSION)
.PHONY: build-docker-image-clamav
build-docker-image-clamav: ## Build docker container for clamav
@echo $(VERSION) > VERSION
nix build $(docker-build-options) --show-trace \
.\#packages.aarch64-linux.clamav-docker-image \
--print-build-logs
nix develop \#skopeo -c \
skopeo copy --insecure-policy dir:./result docker-daemon:clamav:$(VERSION)-aarch64
nix build $(docker-build-options) --show-trace \
.\#packages.x86_64-linux.clamav-docker-image \
--print-build-logs
nix develop \#skopeo -c \
skopeo copy --insecure-policy dir:./result docker-daemon:clamav:$(VERSION)-x86_64
docker push nhost/clamav:$(VERSION)-aarch64
docker push nhost/clamav:$(VERSION)-x86_64
docker manifest create \
nhost/clamav:$(VERSION) \
--amend nhost/clamav:$(VERSION)-aarch64 \
--amend nhost/clamav:$(VERSION)-x86_64
docker manifest push nhost/clamav:$(VERSION)

View File

@@ -0,0 +1,95 @@
# Storage
Storage is a service that adds a storage service on top of hasura and any s3-compatible storage service. The goal is to be able to leverage the cloud storage service while also leveraging hasura features like its graphql API, permissions, actions, presets, etc...
## Workflows
To understand what Storage does we can look at the two main workflows to upload and retrieve files.
### Uploading files
When a user wants to upload a file Storage will first check with hasura if the user is allowed to do so, if it the file will be uploaded to s3 and, on completion, file metadata will be stored in hasura.
``` mermaid
sequenceDiagram
actor User
autonumber
User->>+Storage: upload file
Storage->>+hasura: check permissions
hasura->>-Storage: return if user can upload file
Storage->>+s3: upload file
s3->>-Storage: file information
Storage->>+hasura: file metadata
hasura->>-Storage: success
Storage->>-User: file metadata
```
### Retrieving files
Similarly, when retrieving files, Storage will first check with hasura if the user has permissions to retrieve the file and if the user is allowed, it will forward the file to the user:
``` mermaid
sequenceDiagram
actor User
autonumber
User->>+Storage: request file
Storage->>+hasura: check permissions
hasura->>-Storage: return if user can access file
Storage->>+s3: request file
s3->>-Storage: file
Storage->>-User: file
```
## Features
The main features of the service are:
- leverage hasura's permissions to allow users to upload/retrieve files
- upload files to any s3-compatible service
- download files from any s3-compatible service
- create presigned URLs to grant temporary access
- caching information to integrate with caches and CDNs (cache headers, etag, conditional headers, etc)
- perform basic image manipulation on the fly
- integration with [clamav](https://www.clamav.net) antivirus
## Antivirus
Integration with [clamav](https://www.clamav.net) antivirus relies on an external [clamd](https://docs.clamav.net/manual/Usage/Scanning.html#clamd) service. When a file is uploaded `Storage` will create the file metadata first and then check if the file is clean with `clamd` via its TCP socket. If the file is clean the rest of the process will continue as usual. If a virus is found details about the virus will be added to the `virus` table and the rest of the process will be aborted.
``` mermaid
sequenceDiagram
actor User
User ->> storage: upload file
storage ->>clamav: check for virus
alt virus found
storage-->s3: abort upload
storage->>graphql: insert row in virus table
else virus not found
storage->>s3: upload
storage->>graphql: update metadata
end
```
This feature can be enabled with the flag `--clamav-server string`, where `string` is the tcp address for the clamd service.
## OpenAPI
The service comes with an [OpenAPI definition](/controller/openapi.yaml) which you can also see [online](https://editor.swagger.io/?url=https://raw.githubusercontent.com/nhost/Storage/main/controller/openapi.yaml).
## Using the service
Easiest way to get started is by using [nhost](https://nhost.io)'s free tier but if you want to self-host you can easily do it yourself as well.
### Self-hosting the service
Requirements:
1. [hasura](https://hasura.io) running, which in turns needs [postgres or any other supported database](https://hasura.io/docs/latest/graphql/core/databases/index/#supported-databases).
2. An s3-compatible service. For instance, [AWS S3](https://aws.amazon.com/s3/), [minio](https://min.io), etc...
A fully working example using docker-compose can be found [here](/build/dev/docker/). Just remember to replace the image `Storage:dev` with a valid [docker image](https://hub.docker.com/r/nhost/storage/tags), for instance, `nhost/storage:0.1.5`.
## Contributing
If you need help or want to contribute it is recommended to read the [contributing](/CONTRIBUTING.md) information first. In addition, if you plan to contribute with code it is also encouraged to read the [development](/DEVELOPMENT.md) guide.

1
services/storage/VERSION Normal file
View File

@@ -0,0 +1 @@
0.0.0-dev

View File

@@ -0,0 +1,29 @@
package api
import (
"time"
)
const format = time.RFC1123
type Time time.Time
func (dt *Time) UnmarshalText(text []byte) error {
if len(text) == 0 || string(text) == `""` {
*dt = Time(time.Time{})
return nil
}
t, err := time.Parse(format, string(text))
if err != nil {
return err //nolint:wrapcheck
}
*dt = Time(t)
return nil
}
func Date(year int, month time.Month, day, hour, minute, sec, nsec int, loc *time.Location) Time {
return Time(time.Date(year, month, day, hour, minute, sec, nsec, loc))
}

View File

@@ -0,0 +1,6 @@
package: api
generate:
gin-server: true
embedded-spec: true
strict-server: true
output: api/server.gen.go

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
package: api
generate:
models: true
output: api/types.gen.go

View File

@@ -0,0 +1,295 @@
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.1 DO NOT EDIT.
package api
import (
"time"
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
AuthorizationScopes = "Authorization.Scopes"
X_Hasura_Admin_SecretScopes = "X_Hasura_Admin_Secret.Scopes"
)
// Defines values for OutputImageFormat.
const (
Auto OutputImageFormat = "auto"
Avif OutputImageFormat = "avif"
Jpeg OutputImageFormat = "jpeg"
Png OutputImageFormat = "png"
Same OutputImageFormat = "same"
Webp OutputImageFormat = "webp"
)
// ErrorResponse Error information returned by the API.
type ErrorResponse struct {
// Error Error details.
Error *struct {
// Data Additional data related to the error, if any.
Data *map[string]interface{} `json:"data,omitempty"`
// Message Human-readable error message.
Message string `json:"message"`
} `json:"error,omitempty"`
}
// ErrorResponseWithProcessedFiles Error information returned by the API.
type ErrorResponseWithProcessedFiles struct {
// Error Error details.
Error *struct {
// Data Additional data related to the error, if any.
Data *map[string]interface{} `json:"data,omitempty"`
// Message Human-readable error message.
Message string `json:"message"`
} `json:"error,omitempty"`
// ProcessedFiles List of files that were successfully processed before the error occurred.
ProcessedFiles *[]FileMetadata `json:"processedFiles,omitempty"`
}
// FileMetadata Comprehensive metadata information about a file in storage.
type FileMetadata struct {
// BucketId ID of the bucket containing the file.
BucketId string `json:"bucketId"`
// CreatedAt Timestamp when the file was created.
CreatedAt time.Time `json:"createdAt"`
// Etag Entity tag for cache validation.
Etag string `json:"etag"`
// Id Unique identifier for the file.
Id string `json:"id"`
// IsUploaded Whether the file has been successfully uploaded.
IsUploaded bool `json:"isUploaded"`
// Metadata Custom metadata associated with the file.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// MimeType MIME type of the file.
MimeType string `json:"mimeType"`
// Name Name of the file including extension.
Name string `json:"name"`
// Size Size of the file in bytes.
Size int64 `json:"size"`
// UpdatedAt Timestamp when the file was last updated.
UpdatedAt time.Time `json:"updatedAt"`
// UploadedByUserId ID of the user who uploaded the file.
UploadedByUserId *string `json:"uploadedByUserId,omitempty"`
}
// FileSummary Basic information about a file in storage.
type FileSummary struct {
// BucketId ID of the bucket containing the file.
BucketId string `json:"bucketId"`
// Id Unique identifier for the file.
Id string `json:"id"`
// IsUploaded Whether the file has been successfully uploaded.
IsUploaded bool `json:"isUploaded"`
// Name Name of the file including extension.
Name string `json:"name"`
}
// OutputImageFormat Output format for image files. Use 'auto' for content negotiation based on Accept header
type OutputImageFormat string
// PresignedURLResponse Contains a presigned URL for direct file operations.
type PresignedURLResponse struct {
// Expiration The time in seconds until the URL expires.
Expiration int `json:"expiration"`
// Url The presigned URL for file operations.
Url string `json:"url"`
}
// RFC2822Date Date in RFC 2822 format
type RFC2822Date = Time
// UpdateFileMetadata Metadata that can be updated for an existing file.
type UpdateFileMetadata struct {
// Metadata Updated custom metadata to associate with the file.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Name New name to assign to the file.
Name *string `json:"name,omitempty"`
}
// UploadFileMetadata Metadata provided when uploading a new file.
type UploadFileMetadata struct {
// Id Optional custom ID for the file. If not provided, a UUID will be generated.
Id *string `json:"id,omitempty"`
// Metadata Custom metadata to associate with the file.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Name Name to assign to the file. If not provided, the original filename will be used.
Name *string `json:"name,omitempty"`
}
// VersionInformation Contains version information about the storage service.
type VersionInformation struct {
// BuildVersion The version number of the storage service build.
BuildVersion string `json:"buildVersion"`
}
// UploadFilesMultipartBody defines parameters for UploadFiles.
type UploadFilesMultipartBody struct {
// BucketId Target bucket identifier where files will be stored.
BucketId *string `json:"bucket-id,omitempty"`
// File Array of files to upload.
File []openapi_types.File `json:"file[]"`
// Metadata Optional custom metadata for each uploaded file. Must match the order of the file[] array.
Metadata *[]UploadFileMetadata `json:"metadata[],omitempty"`
}
// GetFileParams defines parameters for GetFile.
type GetFileParams struct {
// Q Image quality (1-100). Only applies to JPEG, WebP and PNG files
Q *int `form:"q,omitempty" json:"q,omitempty"`
// H Maximum height to resize image to while maintaining aspect ratio. Only applies to image files
H *int `form:"h,omitempty" json:"h,omitempty"`
// W Maximum width to resize image to while maintaining aspect ratio. Only applies to image files
W *int `form:"w,omitempty" json:"w,omitempty"`
// B Blur the image using this sigma value. Only applies to image files
B *float32 `form:"b,omitempty" json:"b,omitempty"`
// F Output format for image files. Use 'auto' for content negotiation based on Accept header
F *OutputImageFormat `form:"f,omitempty" json:"f,omitempty"`
// IfMatch Only return the file if the current ETag matches one of the values provided
IfMatch *string `json:"if-match,omitempty"`
// IfNoneMatch Only return the file if the current ETag does not match any of the values provided
IfNoneMatch *string `json:"if-none-match,omitempty"`
// IfModifiedSince Only return the file if it has been modified after the given date
IfModifiedSince *RFC2822Date `json:"if-modified-since,omitempty"`
// IfUnmodifiedSince Only return the file if it has not been modified after the given date
IfUnmodifiedSince *RFC2822Date `json:"if-unmodified-since,omitempty"`
// Range Range of bytes to retrieve from the file. Format: bytes=start-end
Range *string `json:"Range,omitempty"`
}
// GetFileMetadataHeadersParams defines parameters for GetFileMetadataHeaders.
type GetFileMetadataHeadersParams struct {
// Q Image quality (1-100). Only applies to JPEG, WebP and PNG files
Q *int `form:"q,omitempty" json:"q,omitempty"`
// H Maximum height to resize image to while maintaining aspect ratio. Only applies to image files
H *int `form:"h,omitempty" json:"h,omitempty"`
// W Maximum width to resize image to while maintaining aspect ratio. Only applies to image files
W *int `form:"w,omitempty" json:"w,omitempty"`
// B Blur the image using this sigma value. Only applies to image files
B *float32 `form:"b,omitempty" json:"b,omitempty"`
// F Output format for image files. Use 'auto' for content negotiation based on Accept header
F *OutputImageFormat `form:"f,omitempty" json:"f,omitempty"`
// IfMatch Only return the file if the current ETag matches one of the values provided
IfMatch *string `json:"if-match,omitempty"`
// IfNoneMatch Only return the file if the current ETag does not match any of the values provided
IfNoneMatch *string `json:"if-none-match,omitempty"`
// IfModifiedSince Only return the file if it has been modified after the given date
IfModifiedSince *RFC2822Date `json:"if-modified-since,omitempty"`
// IfUnmodifiedSince Only return the file if it has not been modified after the given date
IfUnmodifiedSince *RFC2822Date `json:"if-unmodified-since,omitempty"`
}
// ReplaceFileMultipartBody defines parameters for ReplaceFile.
type ReplaceFileMultipartBody struct {
// File New file content to replace the existing file
File *openapi_types.File `json:"file,omitempty"`
// Metadata Metadata that can be updated for an existing file.
Metadata *UpdateFileMetadata `json:"metadata,omitempty"`
}
// GetFileWithPresignedURLParams defines parameters for GetFileWithPresignedURL.
type GetFileWithPresignedURLParams struct {
// XAmzAlgorithm Use presignedurl endpoint to generate this automatically
XAmzAlgorithm string `form:"X-Amz-Algorithm" json:"X-Amz-Algorithm"`
// XAmzCredential Use presignedurl endpoint to generate this automatically
XAmzCredential string `form:"X-Amz-Credential" json:"X-Amz-Credential"`
// XAmzDate Use presignedurl endpoint to generate this automatically
XAmzDate string `form:"X-Amz-Date" json:"X-Amz-Date"`
// XAmzExpires Use presignedurl endpoint to generate this automatically
XAmzExpires string `form:"X-Amz-Expires" json:"X-Amz-Expires"`
// XAmzSignature Use presignedurl endpoint to generate this automatically
XAmzSignature string `form:"X-Amz-Signature" json:"X-Amz-Signature"`
// XAmzSignedHeaders Use presignedurl endpoint to generate this automatically
XAmzSignedHeaders string `form:"X-Amz-SignedHeaders" json:"X-Amz-SignedHeaders"`
// XAmzChecksumMode Use presignedurl endpoint to generate this automatically
XAmzChecksumMode string `form:"X-Amz-Checksum-Mode" json:"X-Amz-Checksum-Mode"`
// XAmzSecurityToken Use presignedurl endpoint to generate this automatically
XAmzSecurityToken *string `form:"X-Amz-Security-Token,omitempty" json:"X-Amz-Security-Token,omitempty"`
// XId Use presignedurl endpoint to generate this automatically
XId string `form:"x-id" json:"x-id"`
// Q Image quality (1-100). Only applies to JPEG, WebP and PNG files
Q *int `form:"q,omitempty" json:"q,omitempty"`
// H Maximum height to resize image to while maintaining aspect ratio. Only applies to image files
H *int `form:"h,omitempty" json:"h,omitempty"`
// W Maximum width to resize image to while maintaining aspect ratio. Only applies to image files
W *int `form:"w,omitempty" json:"w,omitempty"`
// B Blur the image using this sigma value. Only applies to image files
B *float32 `form:"b,omitempty" json:"b,omitempty"`
// F Output format for image files. Use 'auto' for content negotiation based on Accept header
F *OutputImageFormat `form:"f,omitempty" json:"f,omitempty"`
// IfMatch Only return the file if the current ETag matches one of the values provided
IfMatch *string `json:"if-match,omitempty"`
// IfNoneMatch Only return the file if the current ETag does not match any of the values provided
IfNoneMatch *string `json:"if-none-match,omitempty"`
// IfModifiedSince Only return the file if it has been modified after the given date
IfModifiedSince *RFC2822Date `json:"if-modified-since,omitempty"`
// IfUnmodifiedSince Only return the file if it has not been modified after the given date
IfUnmodifiedSince *RFC2822Date `json:"if-unmodified-since,omitempty"`
// Range Range of bytes to retrieve from the file. Format: bytes=start-end
Range *string `json:"Range,omitempty"`
}
// UploadFilesMultipartRequestBody defines body for UploadFiles for multipart/form-data ContentType.
type UploadFilesMultipartRequestBody UploadFilesMultipartBody
// ReplaceFileMultipartRequestBody defines body for ReplaceFile for multipart/form-data ContentType.
type ReplaceFileMultipartRequestBody ReplaceFileMultipartBody

View File

@@ -0,0 +1,148 @@
package api
// GetQ returns the Q field value.
func (g GetFileParams) GetQ() *int {
return g.Q
}
// GetH returns the H field value.
func (g GetFileParams) GetH() *int {
return g.H
}
// GetW returns the W field value.
func (g GetFileParams) GetW() *int {
return g.W
}
// GetB returns the B field value.
func (g GetFileParams) GetB() *float32 {
return g.B
}
// GetF returns the F field value.
func (g GetFileParams) GetF() *OutputImageFormat {
return g.F
}
func (g GetFileParams) HasImageManipulationOptions() bool {
return g.Q != nil || g.H != nil || g.W != nil || g.B != nil || g.F != nil
}
// GetIfMatch returns the IfMatch field value.
func (g GetFileParams) GetIfMatch() *string {
return g.IfMatch
}
// GetIfNoneMatch returns the IfNoneMatch field value.
func (g GetFileParams) GetIfNoneMatch() *string {
return g.IfNoneMatch
}
// GetIfModifiedSince returns the IfModifiedSince field value.
func (g GetFileParams) GetIfModifiedSince() *Time {
return g.IfModifiedSince
}
// GetIfUnmodifiedSince returns the IfUnmodifiedSince field value.
func (g GetFileParams) GetIfUnmodifiedSince() *Time {
return g.IfUnmodifiedSince
}
// GetQ returns the Q field value.
func (g GetFileMetadataHeadersParams) GetQ() *int {
return g.Q
}
// GetH returns the H field value.
func (g GetFileMetadataHeadersParams) GetH() *int {
return g.H
}
// GetW returns the W field value.
func (g GetFileMetadataHeadersParams) GetW() *int {
return g.W
}
// GetB returns the B field value.
func (g GetFileMetadataHeadersParams) GetB() *float32 {
return g.B
}
// GetF returns the F field value.
func (g GetFileMetadataHeadersParams) GetF() *OutputImageFormat {
return g.F
}
func (g GetFileMetadataHeadersParams) HasImageManipulationOptions() bool {
return g.Q != nil || g.H != nil || g.W != nil || g.B != nil || g.F != nil
}
// GetIfMatch returns the IfMatch field value.
func (g GetFileMetadataHeadersParams) GetIfMatch() *string {
return g.IfMatch
}
// GetIfNoneMatch returns the IfNoneMatch field value.
func (g GetFileMetadataHeadersParams) GetIfNoneMatch() *string {
return g.IfNoneMatch
}
// GetIfModifiedSince returns the IfModifiedSince field value.
func (g GetFileMetadataHeadersParams) GetIfModifiedSince() *Time {
return g.IfModifiedSince
}
// GetIfUnmodifiedSince returns the IfUnmodifiedSince field value.
func (g GetFileMetadataHeadersParams) GetIfUnmodifiedSince() *Time {
return g.IfUnmodifiedSince
}
// GetQ returns the Q field value.
func (g GetFileWithPresignedURLParams) GetQ() *int {
return g.Q
}
// GetH returns the H field value.
func (g GetFileWithPresignedURLParams) GetH() *int {
return g.H
}
// GetW returns the W field value.
func (g GetFileWithPresignedURLParams) GetW() *int {
return g.W
}
// GetB returns the B field value.
func (g GetFileWithPresignedURLParams) GetB() *float32 {
return g.B
}
// GetF returns the F field value.
func (g GetFileWithPresignedURLParams) GetF() *OutputImageFormat {
return g.F
}
func (g GetFileWithPresignedURLParams) HasImageManipulationOptions() bool {
return g.Q != nil || g.H != nil || g.W != nil || g.B != nil || g.F != nil
}
// GetIfMatch returns the IfMatch field value.
func (g GetFileWithPresignedURLParams) GetIfMatch() *string {
return g.IfMatch
}
// GetIfNoneMatch returns the IfNoneMatch field value.
func (g GetFileWithPresignedURLParams) GetIfNoneMatch() *string {
return g.IfNoneMatch
}
// GetIfModifiedSince returns the IfModifiedSince field value.
func (g GetFileWithPresignedURLParams) GetIfModifiedSince() *Time {
return g.IfModifiedSince
}
// GetIfUnmodifiedSince returns the IfUnmodifiedSince field value.
func (g GetFileWithPresignedURLParams) GetIfUnmodifiedSince() *Time {
return g.IfUnmodifiedSince
}

View File

@@ -0,0 +1,14 @@
Foreground yes
DatabaseDirectory /clamav/db
TCPSocket 3310
MaxScanSize 1024M
MaxFileSize 1024M
StreamMaxLength 1024M
MaxRecursion 16
MaxFiles 10000
SelfCheck 1800

View File

@@ -0,0 +1,35 @@
#!/bin/sh
set -euo pipefail
mkdir -p /clamav
envsubst < /etc/clamav/freshclam.conf.tmpl > /etc/clamav/freshclam.conf
envsubst < /etc/clamav/clamd.conf.tmpl > /etc/clamav/clamd.conf
# we run freshclam first to download the database
freshclam
# we start the freshclam daemon
freshclam -d &
pid1=$!
# we start the clamd daemon
clamd &
pid2=$!
# Loop until either process finishes
while true; do
if kill -0 $pid1 >/dev/null 2>&1; then
if kill -0 $pid2 >/dev/null 2>&1; then
sleep 5
else
kill $pid1
break
fi
else
kill $pid2
break
fi
done
exit 1

View File

@@ -0,0 +1,4 @@
DatabaseDirectory /clamav/db
Foreground yes
DatabaseOwner root
DatabaseMirror ${DATABASE_MIRROR:-database.clamav.net}

View File

@@ -0,0 +1,7 @@
.PHONY: dev-env-build
dev-env-build:
docker-compose build
.PHONY: dev-env-start
dev-env-start: dev-env-build
docker-compose up -d

View File

@@ -0,0 +1,72 @@
services:
postgres:
container_name: storage-postgres
image: postgres:13
restart: unless-stopped
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d:ro
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hejsan}
graphql-engine:
container_name: storage-graphql
image: nhost/graphql-engine:v2.25.1-ce
depends_on:
- postgres
- minio
restart: unless-stopped
ports:
- '8080:8080'
environment:
HASURA_GRAPHQL_DATABASE_URL: ${HASURA_GRAPHQL_DATABASE_URL:-postgres://postgres:hejsan@postgres:5432/postgres}
HASURA_GRAPHQL_ENABLE_CONSOLE: ${HASURA_GRAPHQL_ENABLE_CONSOLE:-true}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-nhost-admin-secret}
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET:-{"type":"HS256", "key":"5152fa850c02dc222631cca898ed1485821a70912a6e3649c49076912daa3b62182ba013315915d64f40cddfbb8b58eb5bd11ba225336a6af45bbae07ca873f3"}}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: ${HASURA_GRAPHQL_UNAUTHORIZED_ROLE:-public}
HASURA_GRAPHQL_LOG_LEVEL: ${HASURA_GRAPHQL_LOG_LEVEL:-info}
HASURA_GRAPHQL_DEV_MODE: ${HASURA_GRAPHQL_DEV_MODE:-false}
minio:
container_name: storage-minio
build:
context: minio
restart: unless-stopped
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY:-5a7bdb5f42c41e0622bf61d6e08d5537}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-9e1c40c65a615a5b52f52aeeaf549944ec53acb1dff4a0bf01fb58e969f915c8}
command: server --address 0.0.0.0:9000 --console-address 0.0.0.0:32765 /tmp
ports:
- '9000:9000'
- '32765:32765'
storage:
container_name: storage-storage
image: storage:0.0.0-dev
depends_on:
- graphql-engine
restart: unless-stopped
ports:
- '8000:8000'
environment:
DEBUG: "true"
HASURA_METADATA: 1
HASURA_ENDPOINT: http://graphql-engine:8080/v1
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-nhost-admin-secret}
S3_ENDPOINT: http://minio:9000
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-5a7bdb5f42c41e0622bf61d6e08d5537}
S3_SECRET_KEY: ${S3_SECRET_KEY:-9e1c40c65a615a5b52f52aeeaf549944ec53acb1dff4a0bf01fb58e969f915c8}
S3_BUCKET: "default"
S3_ROOT_FOLDER: "f215cf48-7458-4596-9aa5-2159fc6a3caf"
POSTGRES_MIGRATIONS: 1
POSTGRES_MIGRATIONS_SOURCE: ${HASURA_GRAPHQL_DATABASE_URL:-postgres://postgres:hejsan@postgres:5432/postgres?sslmode=disable}
CLAMAV_SERVER: tcp://clamd:3310
command: serve
clamd:
container_name: storage-clamd
image: nhost/clamav:0.1.2
restart: unless-stopped
ports:
- '3310:3310'

View File

@@ -0,0 +1,5 @@
-- auth schema
CREATE SCHEMA IF NOT EXISTS storage;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;

View File

@@ -0,0 +1,5 @@
FROM minio/minio:RELEASE.2025-02-28T09-55-16Z
ADD init.sh /usr/bin/init.sh
ENTRYPOINT ["/usr/bin/init.sh"]

View File

@@ -0,0 +1,14 @@
#!/bin/sh
/usr/bin/docker-entrypoint.sh "$@" &
sleep 3
mc alias set myminio http://localhost:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD
mc mb myminio/default
dd if=/dev/random of=/tmp/asd bs=64k count=1
mc cp /tmp/asd myminio/default/f215cf48-7458-4596-9aa5-2159fc6a3caf/default/asd
mc cp /tmp/asd myminio/default/this-shouldnt-show-in-list/asd
sleep infinity

View File

@@ -0,0 +1,6 @@
#1/bin/sh
cd $(dirname $0)
JWT_SECRET=$(docker exec hasura-storage-graphql bash -c 'echo "$HASURA_GRAPHQL_JWT_SECRET"')
go run main.go -jwt-secret "$JWT_SECRET"

View File

@@ -0,0 +1,5 @@
module jwt-gen
go 1.17
require github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1

View File

@@ -0,0 +1,4 @@
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 h1:CaO/zOnF8VvUfEbhRatPcwKVWamvbYd8tQGRWacE9kU=
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@@ -0,0 +1,55 @@
package main
import (
"encoding/json"
"flag"
"fmt"
"time"
"github.com/dgrijalva/jwt-go/v4"
)
type jwtSecret struct {
Key string `json:"key"`
Method string `json:"method"`
}
func main() {
// docker-compose -f build/dev/docker/docker-compose.yaml exec graphql-engine bash -c 'echo "$HASURA_GRAPHQL_JWT_SECRET" | cut -d\" -f8'
jwtSecretF := flag.String("jwt-secret", "", "JWT secret")
flag.Parse()
jSecret := jwtSecret{}
if err := json.Unmarshal([]byte(*jwtSecretF), &jSecret); err != nil {
panic(err)
}
// output of
mySigningKey := []byte(jSecret.Key)
now := time.Now()
iat := now.Unix()
exp := now.Add(24 * 365 * 10 * time.Hour).Unix()
// Create the Claims
claims := &jwt.MapClaims{
"sub": "ab5ba58e-932a-40dc-87e8-733998794ec2",
"iss": "hasura-auth",
"iat": iat,
"exp": exp,
"https://hasura.io/jwt/claims": map[string]interface{}{
"x-hasura-allowed-roles": []string{
"admin",
},
"x-hasura-default-role": "admin",
"x-hasura-user-id": "ab5ba58e-932a-40dc-87e8-733998794ec2",
"x-hasura-user-isAnonymous": "false",
},
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
ss, err := token.SignedString(mySigningKey)
if err != nil {
panic(err)
}
fmt.Print(ss)
}

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
which nix > /dev/null
IMAGE=${1:-"docker-image"}
SYSTEM=${2:-""}
if [[ $NIX_BUILD_NATIVE -eq 1 ]]; then
if [[ -z $SYSTEM ]]; then
case $(uname -m) in
"arm64")
SYSTEM="aarch64-linux"
;;
*)
SYSTEM="x86_64-linux"
;;
esac
fi
nix build .\#packages.${SYSTEM}.$IMAGE --print-build-logs
exit $?
fi
if [[ ( $? -eq 0 ) && ( `uname` == "Linux" ) ]]; then
nix build .\#$IMAGE --print-build-logs
exit $?
fi
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD:/build \
-w /build \
--entrypoint sh \
dbarroso/nix:2.6.0 \
-c "nix build .\\#$IMAGE --print-build-logs && docker load < result"

16
services/storage/build/nix.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
which nix > /dev/null
if [ $? -eq 0 ]; then
nix $@
exit $?
fi
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD:/build \
-w /build \
--entrypoint nix \
dbarroso/nix:2.6.0 \
"$@"

View File

@@ -0,0 +1,92 @@
package clamd
import (
"context"
"fmt"
"net"
"net/url"
"time"
)
const chunkSize = 1024
type Client struct {
addr string
}
func NewClient(addr string) (*Client, error) {
url, err := url.Parse(addr)
if err != nil {
return nil, fmt.Errorf("failed to parse addr: %w", err)
}
if url.Scheme != "tcp" {
return nil, fmt.Errorf("invalid scheme: %s", url.Scheme) //nolint:err113
}
return &Client{url.Host}, nil
}
func (c *Client) Dial(ctx context.Context) (net.Conn, error) {
dialer := net.Dialer{ //nolint:exhaustruct
Deadline: time.Now().Add(1 * time.Minute),
Timeout: time.Minute,
}
conn, err := dialer.DialContext(ctx, "tcp", c.addr)
if err != nil {
return nil, fmt.Errorf("failed to dial: %w", err)
}
return conn, nil
}
func sendCommand(conn net.Conn, command string) error {
if _, err := fmt.Fprintf(conn,
"n%s\n", command); err != nil {
return fmt.Errorf("failed to write command: %w", err)
}
return nil
}
func readResponse(conn net.Conn) ([]byte, error) {
buf := make([]byte, 1024) //nolint:mnd
n, err := conn.Read(buf)
if err != nil {
return nil, fmt.Errorf("failed to read response: %w", err)
}
return buf[:n], nil
}
func sendChunk(conn net.Conn, data []byte) error {
var buf [4]byte
lenData := len(data)
buf[0] = byte(lenData >> 24) //nolint:mnd
buf[1] = byte(lenData >> 16) //nolint:mnd
buf[2] = byte(lenData >> 8) //nolint:mnd
buf[3] = byte(lenData >> 0)
a := buf
b := make([]byte, len(a))
copy(b, a[:])
if _, err := conn.Write(b); err != nil {
return fmt.Errorf("failed to write chunk size: %w", err)
}
if _, err := conn.Write(data); err != nil {
return fmt.Errorf("failed to write chunk: %w", err)
}
return nil
}
func sendEOF(conn net.Conn) error {
_, err := conn.Write([]byte{0, 0, 0, 0})
return err //nolint:wrapcheck
}

View File

@@ -0,0 +1,9 @@
package clamd
type VirusFoundError struct {
Name string
}
func (e *VirusFoundError) Error() string {
return "virus found: " + e.Name
}

View File

@@ -0,0 +1,58 @@
package clamd
import (
"context"
"errors"
"fmt"
"io"
)
func (c *Client) InStream(ctx context.Context, r io.ReaderAt) error { //nolint: cyclop
conn, err := c.Dial(ctx)
if err != nil {
return fmt.Errorf("failed to dial: %w", err)
}
defer conn.Close()
if err := sendCommand(conn, "INSTREAM"); err != nil {
return fmt.Errorf("failed to send INSTREAM command: %w", err)
}
var iter int64
for {
buf := make([]byte, chunkSize)
nr, err := r.ReadAt(buf, iter*chunkSize)
iter++
if nr > 0 {
if err := sendChunk(conn, buf[0:nr]); err != nil {
return fmt.Errorf("failed to send chunk: %w", err)
}
}
if errors.Is(err, io.EOF) {
break
}
if err != nil {
return fmt.Errorf("failed to read chunk: %w", err)
}
}
if err := sendEOF(conn); err != nil {
return fmt.Errorf("failed to send EOF: %w", err)
}
response, err := readResponse(conn)
if err != nil {
return fmt.Errorf("failed to read response: %w", err)
}
if string(response) == "stream: OK\n" {
return nil
}
return &VirusFoundError{string(response[8 : len(response)-7])}
}

View File

@@ -0,0 +1,53 @@
package clamd_test
import (
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/nhost/nhost/services/storage/clamd"
)
func TestClamdInstream(t *testing.T) {
t.Parallel()
cases := []struct {
name string
filepath string
expectedError error
}{
{
name: "clean",
filepath: "clamd.go",
},
{
name: "eicarcom2.zip",
filepath: "testdata/eicarcom2.zip",
expectedError: &clamd.VirusFoundError{
Name: "Win.Test.EICAR_HDB-1",
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
client, err := clamd.NewClient("tcp://localhost:3310")
if err != nil {
t.Fatalf("failed to dial: %v", err)
}
f, err := os.Open(tc.filepath)
if err != nil {
t.Fatalf("failed to open file: %v", err)
}
defer f.Close()
err = client.InStream(t.Context(), f)
if diff := cmp.Diff(tc.expectedError, err); diff != "" {
t.Errorf("unexpected error (-want +got):\n%s", diff)
}
})
}
}

View File

@@ -0,0 +1,29 @@
package clamd
import (
"context"
"fmt"
)
func (c *Client) Ping(ctx context.Context) error {
conn, err := c.Dial(ctx)
if err != nil {
return fmt.Errorf("failed to dial: %w", err)
}
defer conn.Close()
if err := sendCommand(conn, "PING"); err != nil {
return fmt.Errorf("failed to send PING command: %w", err)
}
response, err := readResponse(conn)
if err != nil {
return fmt.Errorf("failed to read response: %w", err)
}
if string(response) != "PONG\n" {
return fmt.Errorf("unknown response: %s", string(response)) //nolint:err113
}
return nil
}

View File

@@ -0,0 +1,34 @@
package clamd_test
import (
"testing"
"github.com/nhost/nhost/services/storage/clamd"
)
func TestClamdPing(t *testing.T) {
t.Parallel()
cases := []struct {
name string
}{
{
name: "success",
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
client, err := clamd.NewClient("tcp://localhost:3310")
if err != nil {
t.Fatalf("failed to dial: %v", err)
}
if err := client.Ping(t.Context()); err != nil {
t.Fatalf("failed to get version: %v", err)
}
})
}
}

View File

@@ -0,0 +1,29 @@
package clamd
import (
"context"
"fmt"
)
func (c *Client) Reload(ctx context.Context) error {
conn, err := c.Dial(ctx)
if err != nil {
return fmt.Errorf("failed to dial: %w", err)
}
defer conn.Close()
if err := sendCommand(conn, "RELOAD"); err != nil {
return fmt.Errorf("failed to send RELOAD command: %w", err)
}
response, err := readResponse(conn)
if err != nil {
return fmt.Errorf("failed to read response: %w", err)
}
if string(response) != "RELOADING\n" {
return fmt.Errorf("unknown response: %s", string(response)) //nolint:err113
}
return nil
}

View File

@@ -0,0 +1,34 @@
package clamd_test
import (
"testing"
"github.com/nhost/nhost/services/storage/clamd"
)
func TestClamdReload(t *testing.T) {
t.Parallel()
cases := []struct {
name string
}{
{
name: "success",
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
client, err := clamd.NewClient("tcp://localhost:3310")
if err != nil {
t.Fatalf("failed to dial: %v", err)
}
if err := client.Reload(t.Context()); err != nil {
t.Fatalf("failed to get version: %v", err)
}
})
}
}

Binary file not shown.

View File

@@ -0,0 +1,38 @@
package clamd
import (
"context"
"fmt"
"strings"
)
type Version struct {
Version string
}
func parseVersion(response []byte) Version {
parts := strings.SplitN(string(response), " ", 2) //nolint:mnd
return Version{
Version: parts[1],
}
}
func (c *Client) Version(ctx context.Context) (Version, error) {
conn, err := c.Dial(ctx)
if err != nil {
return Version{}, fmt.Errorf("failed to dial: %w", err)
}
defer conn.Close()
if err := sendCommand(conn, "VERSION"); err != nil {
return Version{}, fmt.Errorf("failed to send VERSION command: %w", err)
}
response, err := readResponse(conn)
if err != nil {
return Version{}, fmt.Errorf("failed to read response: %w", err)
}
return parseVersion(response), nil
}

View File

@@ -0,0 +1,43 @@
package clamd_test
import (
"testing"
"github.com/nhost/nhost/services/storage/clamd"
)
func TestClamdVersion(t *testing.T) {
t.Parallel()
cases := []struct {
name string
expected clamd.Version
}{
{
name: "success",
expected: clamd.Version{
Version: "1.1.0",
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
client, err := clamd.NewClient("tcp://localhost:3310")
if err != nil {
t.Fatalf("failed to dial: %v", err)
}
version, err := client.Version(t.Context())
if err != nil {
t.Fatalf("failed to get version: %v", err)
}
if version.Version == "" {
t.Fatalf("version.Version is empty")
}
})
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
//go:generate oapi-codegen -generate types,client -response-type-suffix R -package client -o client.gen.go ../controller/openapi.yaml
package client

View File

@@ -0,0 +1,46 @@
package client_test
import (
"context"
"net/http"
"strings"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
)
const testBaseURL = "http://localhost:8000/v1"
const accessTokenValidUser = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjIwNjg0NDA4NTEsImh0dHBzOi8vaGFzdXJhLmlvL2p3dC9jbGFpbXMiOnsieC1oYXN1cmEtYWxsb3dlZC1yb2xlcyI6WyJhZG1pbiJdLCJ4LWhhc3VyYS1kZWZhdWx0LXJvbGUiOiJhZG1pbiIsIngtaGFzdXJhLXVzZXItaWQiOiJhYjViYTU4ZS05MzJhLTQwZGMtODdlOC03MzM5OTg3OTRlYzIiLCJ4LWhhc3VyYS11c2VyLWlzQW5vbnltb3VzIjoiZmFsc2UifSwiaWF0IjoxNzUzMDgwODUxLCJpc3MiOiJoYXN1cmEtYXV0aCIsInN1YiI6ImFiNWJhNThlLTkzMmEtNDBkYy04N2U4LTczMzk5ODc5NGVjMiJ9.jxx_ve7Ikw1eZrcxYzEuARqkKwiuAhTgCxc2VPvnONY` //nolint:gosec,lll
const eicarTestFile = `X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*`
func ptr[T any](v T) *T {
return &v
}
func WithAccessToken(accessToken string) func(ctx context.Context, req *http.Request) error {
return func(_ context.Context, req *http.Request) error {
req.Header.Set("Authorization", "Bearer "+accessToken)
return nil
}
}
func WithHeaders(headers http.Header) func(ctx context.Context, req *http.Request) error {
return func(_ context.Context, req *http.Request) error {
for key, values := range headers {
for _, value := range values {
req.Header.Add(key, value)
}
}
return nil
}
}
func IgnoreResponseHeaders() cmp.Option {
return cmpopts.IgnoreMapEntries(func(key string, _ []string) bool {
return key == "Date" || key == "Surrogate-Key" || key == "Last-Modified" ||
strings.HasPrefix(key, "X-B3-")
})
}

View File

@@ -0,0 +1,23 @@
package client
import (
"time"
)
const format = time.RFC1123
type Time struct {
t time.Time
}
func NewTime(t time.Time) Time {
return Time{t: t}
}
func (dt Time) MarshalText() ([]byte, error) {
if dt.t.IsZero() {
return []byte(`""`), nil
}
return []byte(dt.t.Format(format)), nil
}

View File

@@ -0,0 +1,145 @@
package client_test
import (
"context"
"net/http"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func TestDeleteFile(t *testing.T) {
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
cases := []struct {
name string
id string
interceptor func(ctx context.Context, req *http.Request) error
expectedStatusCode int
expectedHeader http.Header
expectedCmpOpts []cmp.Option
expectedErr *client.ErrorResponse
}{
{
name: "simple delete",
id: id1,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNoContent,
expectedHeader: http.Header{
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: nil,
},
{
name: "wrong id",
id: uuid.NewString(),
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotFound,
expectedHeader: http.Header{
"Content-Length": {"51"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"file not found"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "file not found",
},
},
},
{
name: "no permissions",
id: uuid.NewString(),
interceptor: nil,
expectedStatusCode: http.StatusForbidden,
expectedHeader: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"you are not authorized"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "you are not authorized",
},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
resp, err := cl.DeleteFileWithResponse(
t.Context(),
tc.id,
interceptor...,
)
if err != nil {
t.Fatalf("failed to delete file: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
opts := append(
cmp.Options{
cmpopts.IgnoreFields(client.FileMetadata{}, "CreatedAt", "UpdatedAt"),
},
tc.expectedCmpOpts...,
)
if diff := cmp.Diff(resp.JSONDefault, tc.expectedErr, opts); diff != "" {
t.Errorf("unexpected error response: %s", diff)
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeader,
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,333 @@
package client_test
import (
"context"
"net/http"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func TestGetFileMetadataHeaders(t *testing.T) { //nolint:maintidx
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
cases := []struct {
name string
id string
params *client.GetFileMetadataHeadersParams
interceptor func(ctx context.Context, req *http.Request) error
expectedStatusCode int
expectedHeaders http.Header
}{
{
name: "simple get",
id: id1,
params: nil,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch matches",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfMatch: ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch does not match",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfMatch: ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch matches",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfNoneMatch: ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch does not match",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfNoneMatch: ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince matches",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfModifiedSince: ptr(client.NewTime(time.Now().Add(-time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince does not match",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfModifiedSince: ptr(client.NewTime(time.Now().Add(time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince matches",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfUnmodifiedSince: ptr(client.NewTime(time.Now().Add(-time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince does not match",
id: id1,
params: &client.GetFileMetadataHeadersParams{
IfUnmodifiedSince: ptr(client.NewTime(time.Now().Add(time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-admin-secret",
id: id1,
params: nil,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
}),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-role",
id: id1,
params: nil,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
"x-hasura-role": []string{"user"},
}),
expectedStatusCode: http.StatusForbidden,
expectedHeaders: http.Header{
"Date": {"Mon, 21 Jul 2025 13:44:26 GMT"},
"X-Error": {"you are not authorized"},
},
},
{
name: "unauthenticated request",
id: id1,
params: nil,
interceptor: nil,
expectedStatusCode: http.StatusForbidden,
expectedHeaders: http.Header{
"Date": {"Mon, 21 Jul 2025 13:44:26 GMT"},
"X-Error": {"you are not authorized"},
},
},
{
name: "image",
id: id2,
params: nil,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"33399"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{id2},
},
},
{
name: "image manipulation",
id: id2,
params: &client.GetFileMetadataHeadersParams{
Q: ptr(80),
H: ptr(100),
W: ptr(100),
B: ptr(float32(0.10)),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"8709"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{id2},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
resp, err := cl.GetFileMetadataHeadersWithResponse(
t.Context(),
tc.id,
tc.params,
interceptor...,
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeaders,
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected response headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,173 @@
package client_test
import (
"context"
"net/http"
"regexp"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func compareURLWithRegexp() cmp.Option {
return cmp.FilterPath(
func(p cmp.Path) bool {
return p.Last().String() == `.Url`
},
cmp.Comparer(func(a, b string) bool {
reg1 := regexp.MustCompile(a)
reg2 := regexp.MustCompile(b)
return reg1.MatchString(b) || reg2.MatchString(a)
}),
)
}
func TestGetFilePresignedURL(t *testing.T) {
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
cases := []struct {
name string
id string
interceptor func(ctx context.Context, req *http.Request) error
expectedStatusCode int
expected *client.PresignedURLResponse
expectedErr *client.ErrorResponse
expectedHeaders http.Header
}{
{
name: "simple get",
id: id1,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expected: &client.PresignedURLResponse{
Expiration: 30,
Url: "http://localhost:8000/v1/files/.*/presignedurl/content?.*",
},
expectedHeaders: http.Header{
"Content-Length": {"470"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
},
{
name: "x-hasura-admin-secret",
id: id1,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
}),
expectedStatusCode: http.StatusOK,
expected: &client.PresignedURLResponse{
Expiration: 30,
Url: "http://localhost:8000/v1/files/.*/presignedurl/content?.*",
},
expectedHeaders: http.Header{
"Content-Length": {"470"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
},
{
name: "x-hasura-role",
id: id1,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
"x-hasura-role": []string{"user"},
}),
expectedStatusCode: http.StatusForbidden,
expected: nil,
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Message: "you are not authorized",
},
},
expectedHeaders: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"you are not authorized"},
},
},
{
name: "unauthenticated request",
id: id1,
interceptor: nil,
expectedStatusCode: http.StatusForbidden,
expected: nil,
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Message: "you are not authorized",
},
},
expectedHeaders: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"you are not authorized"},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
resp, err := cl.GetFilePresignedURLWithResponse(
t.Context(),
tc.id,
interceptor...,
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
if diff := cmp.Diff(resp.JSON200, tc.expected, compareURLWithRegexp()); diff != "" {
t.Errorf("unexpected response: %s", diff)
}
if diff := cmp.Diff(resp.JSONDefault, tc.expectedErr); diff != "" {
t.Errorf("unexpected error response: %s", diff)
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeaders,
compareContentLength(),
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,455 @@
package client_test
import (
"context"
"net/http"
"os"
"strings"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func uploadInitialFile(t *testing.T, cl client.ClientWithResponsesInterface, id1, id2 string) {
t.Helper()
f, err := os.OpenFile("testdata/nhost.jpg", os.O_RDONLY, 0o644)
if err != nil {
t.Fatalf("failed to read test file: %v", err)
}
defer f.Close()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile(
"testfile.txt",
strings.NewReader("Hello, World!"),
&client.UploadFileMetadata{
Id: ptr(id1),
},
),
client.NewFile(
"nhost.jpg",
f,
&client.UploadFileMetadata{
Id: ptr(id2),
},
),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
resp, err := cl.UploadFilesWithBodyWithResponse(
t.Context(),
contentType,
body,
WithAccessToken(accessTokenValidUser),
)
if err != nil {
t.Fatalf("failed to upload files: %v", err)
}
if resp.JSONDefault != nil {
t.Fatalf("unexpected error response: %v", resp.JSONDefault)
}
if len(resp.JSON201.ProcessedFiles) == 0 {
t.Fatal("no files were processed")
}
}
func TestGetFile(t *testing.T) { //nolint:maintidx
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
cases := []struct {
name string
id string
params *client.GetFileParams
interceptor func(ctx context.Context, req *http.Request) error
expectedStatusCode int
expectedBody string
expectedHeaders http.Header
}{
{
name: "simple get",
id: id1,
params: nil,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch matches",
id: id1,
params: &client.GetFileParams{
IfMatch: ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch does not match",
id: id1,
params: &client.GetFileParams{
IfMatch: ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Content-Length": []string{"0"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch matches",
id: id1,
params: &client.GetFileParams{
IfNoneMatch: ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch does not match",
id: id1,
params: &client.GetFileParams{
IfNoneMatch: ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince matches",
id: id1,
params: &client.GetFileParams{
IfModifiedSince: ptr(client.NewTime(time.Now().Add(-time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince does not match",
id: id1,
params: &client.GetFileParams{
IfModifiedSince: ptr(client.NewTime(time.Now().Add(time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince matches",
id: id1,
params: &client.GetFileParams{
IfUnmodifiedSince: ptr(client.NewTime(time.Now().Add(-time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Content-Length": []string{"0"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince does not match",
id: id1,
params: &client.GetFileParams{
IfUnmodifiedSince: ptr(client.NewTime(time.Now().Add(time.Hour))),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-admin-secret",
id: id1,
params: nil,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
}),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-role",
id: id1,
params: nil,
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
"x-hasura-role": []string{"user"},
}),
expectedStatusCode: http.StatusForbidden,
expectedBody: "{\"error\":{\"data\":null,\"message\":\"you are not authorized\"}}\n",
expectedHeaders: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 13:44:26 GMT"},
"X-Error": {"you are not authorized"},
},
},
{
name: "unauthenticated request",
id: id1,
params: nil,
interceptor: nil,
expectedStatusCode: http.StatusForbidden,
expectedBody: "{\"error\":{\"data\":null,\"message\":\"you are not authorized\"}}\n",
expectedHeaders: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 13:44:26 GMT"},
"X-Error": {"you are not authorized"},
},
},
{
name: "range",
id: id1,
params: &client.GetFileParams{
Range: ptr("bytes=0-4"),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPartialContent,
expectedBody: "Hello",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"5"},
"Content-Range": []string{"bytes 0-4/13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "range middle",
id: id1,
params: &client.GetFileParams{
Range: ptr("bytes=2-8"),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPartialContent,
expectedBody: "llo, Wo",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"7"},
"Content-Range": []string{"bytes 2-8/13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "image",
id: id2,
params: nil,
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "ignoreme",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"33399"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{id2},
},
},
{
name: "image manipulation",
id: id2,
params: &client.GetFileParams{
Q: ptr(80),
H: ptr(100),
W: ptr(100),
B: ptr(float32(0.10)),
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "ignoreme",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=3600"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"8709"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=3600"},
"Surrogate-Key": []string{id2},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
resp, err := cl.GetFileWithResponse(
t.Context(),
tc.id,
tc.params,
interceptor...,
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
if tc.expectedBody != "ignoreme" {
if diff := cmp.Diff(string(resp.Body), tc.expectedBody); diff != "" {
t.Errorf("unexpected response body: %s", diff)
}
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeaders,
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected response headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,532 @@
package client_test
import (
"context"
"net/http"
"net/url"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func compareCacheControlMaxAge() cmp.Option { //nolint:cyclop
return cmp.FilterPath(
func(p cmp.Path) bool {
return p.Last().String() == `["Cache-Control"]` ||
p.Last().String() == `["Surrogate-Control"]`
},
cmp.Comparer(func(a, b []string) bool {
if len(a) != 1 || len(b) != 1 {
return false
}
// Accept max-age values from 27 to 30
validValues := []string{"max-age=27", "max-age=28", "max-age=29", "max-age=30"}
for _, valid := range validValues {
if a[0] == valid || b[0] == valid {
for _, otherValid := range validValues {
if (a[0] == valid && b[0] == otherValid) ||
(a[0] == otherValid && b[0] == valid) {
return true
}
}
}
}
return a[0] == b[0]
}),
)
}
func TestGetFileWithPresignedURL(t *testing.T) { //nolint:cyclop,maintidx
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
p1, err := cl.GetFilePresignedURLWithResponse(
t.Context(), id1, WithAccessToken(accessTokenValidUser),
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
presignedURL1, err := url.Parse(p1.JSON200.Url)
if err != nil {
t.Fatalf("failed to parse presigned URL: %v", err)
}
params1 := func() *client.GetFileWithPresignedURLParams {
return &client.GetFileWithPresignedURLParams{
XAmzAlgorithm: presignedURL1.Query().Get("X-Amz-Algorithm"),
XAmzChecksumMode: presignedURL1.Query().Get("X-Amz-Checksum-Mode"),
XAmzCredential: presignedURL1.Query().Get("X-Amz-Credential"),
XAmzDate: presignedURL1.Query().Get("X-Amz-Date"),
XAmzExpires: presignedURL1.Query().Get("X-Amz-Expires"),
XId: presignedURL1.Query().Get("x-id"),
XAmzSignature: presignedURL1.Query().Get("X-Amz-Signature"),
XAmzSignedHeaders: presignedURL1.Query().Get("X-Amz-SignedHeaders"),
}
}
p2, err := cl.GetFilePresignedURLWithResponse(
t.Context(), id2, WithAccessToken(accessTokenValidUser),
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
presignedURL2, err := url.Parse(p2.JSON200.Url)
if err != nil {
t.Fatalf("failed to parse presigned URL: %v", err)
}
params2 := func() *client.GetFileWithPresignedURLParams {
return &client.GetFileWithPresignedURLParams{
XAmzAlgorithm: presignedURL2.Query().Get("X-Amz-Algorithm"),
XAmzChecksumMode: presignedURL2.Query().Get("X-Amz-Checksum-Mode"),
XAmzCredential: presignedURL2.Query().Get("X-Amz-Credential"),
XAmzDate: presignedURL2.Query().Get("X-Amz-Date"),
XAmzExpires: presignedURL2.Query().Get("X-Amz-Expires"),
XId: presignedURL2.Query().Get("x-id"),
XAmzSignature: presignedURL2.Query().Get("X-Amz-Signature"),
XAmzSignedHeaders: presignedURL2.Query().Get("X-Amz-SignedHeaders"),
}
}
cases := []struct {
name string
id string
requestParams func() *client.GetFileWithPresignedURLParams
interceptor func(ctx context.Context, req *http.Request) error
expectedStatusCode int
expectedBody string
expectedErr *client.ErrorResponse
expectedHeaders http.Header
}{
{
name: "simple get",
id: id1,
interceptor: WithAccessToken(accessTokenValidUser),
requestParams: func() *client.GetFileWithPresignedURLParams {
return params1()
},
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch matches",
id: id1,
interceptor: WithAccessToken(accessTokenValidUser),
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfMatch = ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`)
return req
},
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfMatch does not match",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfMatch = ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`)
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Content-Length": []string{"0"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch matches",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfNoneMatch = ptr(`"65a8e27d8879283831b664bd8b7f0ad4"`)
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfNoneMatch does not match",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfNoneMatch = ptr(`"85a8e27d8879283831b664bd8b7f0ad4"`)
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince matches",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfModifiedSince = ptr(client.NewTime(time.Now().Add(-time.Hour)))
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfModifiedSince does not match",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfModifiedSince = ptr(client.NewTime(time.Now().Add(time.Hour)))
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusNotModified,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince matches",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfUnmodifiedSince = ptr(client.NewTime(time.Now().Add(-time.Hour)))
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPreconditionFailed,
expectedBody: "",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Content-Length": []string{"0"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "IfUnmodifiedSince does not match",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.IfUnmodifiedSince = ptr(client.NewTime(time.Now().Add(time.Hour)))
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-admin-secret",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
return req
},
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
}),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "x-hasura-role",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
return req
},
interceptor: WithHeaders(http.Header{
"x-hasura-admin-secret": []string{"nhost-admin-secret"},
"x-hasura-role": []string{"user"},
}),
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "unauthenticated request",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
return params1()
},
interceptor: nil,
expectedStatusCode: http.StatusOK,
expectedBody: "Hello, World!",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "range",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.Range = ptr("bytes=0-4")
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPartialContent,
expectedBody: "Hello",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"5"},
"Content-Range": []string{"bytes 0-4/13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "range middle",
id: id1,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params1()
req.Range = ptr("bytes=2-8")
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusPartialContent,
expectedBody: "llo, Wo",
expectedHeaders: http.Header{
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="testfile.txt"`},
"Content-Length": []string{"7"},
"Content-Range": []string{"bytes 2-8/13"},
"Content-Type": []string{"text/plain; charset=utf-8"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"65a8e27d8879283831b664bd8b7f0ad4"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{"d505075a-ee28-4a02-b27a-5973fd2ea35f"},
},
},
{
name: "image",
id: id2,
requestParams: func() *client.GetFileWithPresignedURLParams {
return params2()
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "ignoreme",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=29"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"33399"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=29"},
"Surrogate-Key": []string{id2},
},
},
{
name: "image manipulation",
id: id2,
requestParams: func() *client.GetFileWithPresignedURLParams {
req := params2()
req.Q = ptr(80)
req.H = ptr(100)
req.W = ptr(100)
req.B = ptr(float32(0.10))
return req
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expectedBody: "ignoreme",
expectedHeaders: http.Header{
"Accept-Ranges": []string{"bytes"},
"Cache-Control": []string{"max-age=30"},
"Content-Disposition": []string{`inline; filename="nhost.jpg"`},
"Content-Length": []string{"8709"},
"Content-Type": []string{"image/jpeg"},
"Date": []string{"Mon, 21 Jul 2025 13:24:53 GMT"},
"Etag": []string{`"78b676e65ebc31f0bb1f2f0d05098572"`},
"Last-Modified": []string{"2025-07-21 13:24:53.586273 +0000 +0000"},
"Surrogate-Control": []string{"max-age=30"},
"Surrogate-Key": []string{id2},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
resp, err := cl.GetFileWithPresignedURLWithResponse(
t.Context(),
tc.id,
tc.requestParams(),
interceptor...,
)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
if tc.expectedBody != "ignoreme" {
if diff := cmp.Diff(string(resp.Body), tc.expectedBody); diff != "" {
t.Errorf("unexpected response body: %s", diff)
}
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeaders,
IgnoreResponseHeaders(),
compareCacheControlMaxAge(),
); diff != "" {
t.Errorf("unexpected response headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,119 @@
package client
import (
"bytes"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/textproto"
"strings"
)
func WithMetadata(metadata UploadFileMetadata) func(file *File) {
return func(file *File) {
file.md = &metadata
}
}
type File struct {
r io.ReadSeeker
name string
md *UploadFileMetadata
}
func NewFile(name string, r io.ReadSeeker, metadata *UploadFileMetadata) *File {
return &File{
r: r,
name: name,
md: metadata,
}
}
func createMultiForm(
writer *multipart.Writer,
fieldName string,
file *File,
multiple bool,
) error {
formWriter, err := writer.CreateFormFile(fieldName, file.name)
if err != nil {
return fmt.Errorf("problem create part: %w", err)
}
_, err = io.Copy(formWriter, file.r)
if err != nil {
return fmt.Errorf("problem copying file into the form: %w", err)
}
if file.md != nil { //nolint:nestif
h := make(textproto.MIMEHeader)
if multiple {
h.Set("Content-Disposition", `form-data; name="metadata[]"`)
} else {
h.Set("Content-Disposition", `form-data; name="metadata"`)
}
h.Set("Content-Type", "application/json")
formWriter, err = writer.CreatePart(h)
if err != nil {
return fmt.Errorf("problem creating part for metadata: %w", err)
}
b, err := json.Marshal(file.md)
if err != nil {
return fmt.Errorf("problem marshaling metadata: %w", err)
}
_, err = io.Copy(formWriter, bytes.NewReader(b))
if err != nil {
return fmt.Errorf("problem copying metadata into the form: %w", err)
}
}
return nil
}
func CreateUploadMultiForm(
bucketID string,
files ...*File,
) (io.Reader, string, error) {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
formWriter, err := writer.CreateFormField("bucket-id")
if err != nil {
return nil, "", fmt.Errorf("problem creating form field for bucket-id: %w", err)
}
_, err = io.Copy(formWriter, strings.NewReader(bucketID))
if err != nil {
return nil, "", fmt.Errorf("problem writing bucket-id: %w", err)
}
for _, file := range files {
if err := createMultiForm(writer, "file[]", file, true); err != nil {
return nil, "", fmt.Errorf("problem creating form for file %s: %w", file.name, err)
}
}
writer.Close()
return bytes.NewReader(body.Bytes()), writer.FormDataContentType(), nil
}
func CreateUpdateMultiForm(
file *File,
) (io.Reader, string, error) {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
if err := createMultiForm(writer, "file", file, false); err != nil {
return nil, "", fmt.Errorf("problem creating form for file %s: %w", file.name, err)
}
writer.Close()
return bytes.NewReader(body.Bytes()), writer.FormDataContentType(), nil
}

View File

@@ -0,0 +1,291 @@
package client_test
import (
"context"
"io"
"net/http"
"os"
"strings"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func TestReplaceFile(t *testing.T) { //nolint:cyclop,maintidx,gocognit
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
uploadInitialFile(t, cl, id1, id2)
cases := []struct {
name string
id string
requestBody func(t *testing.T) (io.Reader, string)
interceptor func(ctx context.Context, req *http.Request) error
expected *client.FileMetadata
expectedStatusCode int
expectedHeader http.Header
expectedCmpOpts []cmp.Option
expectedErr *client.ErrorResponse
}{
{
name: "simple upload",
id: id1,
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
f, err := os.OpenFile("testdata/nhost.jpg", os.O_RDONLY, 0o644)
if err != nil {
t.Fatalf("failed to read test file: %v", err)
}
defer f.Close()
body, contentType, err := client.CreateUpdateMultiForm(
client.NewFile("nhost.jpg", f, nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expected: &client.FileMetadata{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"78b676e65ebc31f0bb1f2f0d05098572"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "nhost.jpg",
MimeType: "image/jpeg",
Size: 33399,
},
expectedHeader: http.Header{
"Content-Length": {"287"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: nil,
},
{
name: "simple upload",
id: id1,
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUpdateMultiForm(
client.NewFile("changedfile.txt", strings.NewReader("Bye, World!"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusOK,
expected: &client.FileMetadata{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"c247b0271b96b82c23c3acd525f9d159"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "changedfile.txt",
MimeType: "text/plain; charset=utf-8",
Size: 11,
},
expectedHeader: http.Header{
"Content-Length": {"305"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: nil,
},
{
name: "with virus",
id: id1,
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUpdateMultiForm(
client.NewFile("blah.txt", strings.NewReader(eicarTestFile), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusForbidden,
expectedHeader: http.Header{
"Content-Length": {"116"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"virus found: Win.Test.EICAR_HDB-1"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: &map[string]any{"file": "blah.txt", "virus": "Win.Test.EICAR_HDB-1"},
Message: "virus found: Win.Test.EICAR_HDB-1",
},
},
},
{
name: "unknown file id",
id: uuid.NewString(),
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUpdateMultiForm(
client.NewFile("blah.txt", strings.NewReader("asd"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expected: nil,
expectedStatusCode: http.StatusNotFound,
expectedHeader: http.Header{
"Content-Length": {"51"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"file not found"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "file not found",
},
},
},
{
name: "no permission",
id: uuid.NewString(),
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUpdateMultiForm(
client.NewFile("blah.txt", strings.NewReader("asd"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: nil,
expected: nil,
expectedStatusCode: http.StatusForbidden,
expectedHeader: http.Header{
"Content-Length": {"59"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
"X-Error": {"you are not authorized"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponse{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "you are not authorized",
},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
body, contentType := tc.requestBody(t)
resp, err := cl.ReplaceFileWithBodyWithResponse(
t.Context(),
tc.id,
contentType,
body,
interceptor...,
)
if err != nil {
t.Fatalf("failed to upload files: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
opts := append(
cmp.Options{
cmpopts.IgnoreFields(client.FileMetadata{}, "CreatedAt", "UpdatedAt"),
},
tc.expectedCmpOpts...,
)
if diff := cmp.Diff(resp.JSON200, tc.expected, opts...); diff != "" {
t.Errorf("unexpected response: %s", diff)
}
if diff := cmp.Diff(resp.JSONDefault, tc.expectedErr, opts); diff != "" {
t.Errorf("unexpected error response: %s", diff)
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeader,
compareContentLength(),
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected headers: %s", diff)
}
})
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,429 @@
package client_test
import (
"context"
"io"
"net/http"
"strconv"
"strings"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/nhost/nhost/services/storage/client"
)
func compareContentLength() cmp.Option {
return cmp.FilterPath(
func(p cmp.Path) bool {
return p.Last().String() == `["Content-Length"]`
},
cmp.Comparer(func(a, b []string) bool {
if len(a) != 1 || len(b) != 1 {
return false
}
if a[0] == b[0] {
return true
}
x, _ := strconv.Atoi(a[0])
y, _ := strconv.Atoi(b[0])
if y-3 <= x && x <= y+3 {
return true
}
return false
}),
)
}
func TestUploadFiles(t *testing.T) { //nolint:cyclop,maintidx,gocognit
t.Parallel()
cl, err := client.NewClientWithResponses(testBaseURL)
if err != nil {
t.Fatalf("failed to create client: %v", err)
}
id1 := uuid.NewString()
id2 := uuid.NewString()
cases := []struct {
name string
requestBody func(t *testing.T) (io.Reader, string)
interceptor func(ctx context.Context, req *http.Request) error
expected *struct {
ProcessedFiles []client.FileMetadata `json:"processedFiles"`
}
expectedStatusCode int
expectedHeader http.Header
expectedCmpOpts []cmp.Option
expectedErr *client.ErrorResponseWithProcessedFiles
}{
{
name: "simple upload",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile("testfile.txt", strings.NewReader("Hello, World!"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusCreated,
expected: &struct {
ProcessedFiles []client.FileMetadata `json:"processedFiles"`
}{
ProcessedFiles: []client.FileMetadata{
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"65a8e27d8879283831b664bd8b7f0ad4"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "testfile.txt",
MimeType: "text/plain; charset=utf-8",
Size: 13,
},
},
},
expectedHeader: http.Header{
"Content-Length": {"323"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: nil,
},
{
name: "multi-upload",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile("testfile.txt", strings.NewReader("Hello, World!"), nil),
client.NewFile("morefiles.txt", strings.NewReader("More content"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusCreated,
expected: &struct {
ProcessedFiles []client.FileMetadata `json:"processedFiles"`
}{
ProcessedFiles: []client.FileMetadata{
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"65a8e27d8879283831b664bd8b7f0ad4"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "testfile.txt",
MimeType: "text/plain; charset=utf-8",
Size: 13,
},
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"2562b24d9ca6633770dec8cbb190cca8"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "morefiles.txt",
MimeType: "text/plain; charset=utf-8",
Size: 12,
},
},
},
expectedHeader: http.Header{
"Content-Length": {"626"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: nil,
},
{
name: "with metadata",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile(
"testfile.txt",
strings.NewReader("Hello, World!"),
&client.UploadFileMetadata{
Id: ptr(id1),
Metadata: ptr(map[string]any{"key": "value"}),
Name: ptr("Custom Name.txt"),
},
),
client.NewFile(
"morefiles.txt",
strings.NewReader("More content"),
&client.UploadFileMetadata{
Id: ptr(id2),
Metadata: nil,
Name: nil,
},
),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expectedStatusCode: http.StatusCreated,
expected: &struct {
ProcessedFiles []client.FileMetadata `json:"processedFiles"`
}{
ProcessedFiles: []client.FileMetadata{
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"65a8e27d8879283831b664bd8b7f0ad4"`,
Id: id1,
IsUploaded: true,
Metadata: ptr(map[string]any{"key": "value"}),
Name: "Custom Name.txt",
MimeType: "text/plain; charset=utf-8",
Size: 13,
},
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"2562b24d9ca6633770dec8cbb190cca8"`,
Id: id2,
IsUploaded: true,
Metadata: nil,
Name: "morefiles.txt",
MimeType: "text/plain; charset=utf-8",
Size: 12,
},
},
},
expectedHeader: http.Header{
"Content-Length": {"640"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{},
expectedErr: nil,
},
{
name: "wrong bucket",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"wrong-bucket",
client.NewFile("testfile.txt", strings.NewReader("Hello, World!"), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expected: nil,
expectedStatusCode: http.StatusNotFound,
expectedHeader: http.Header{
"Content-Length": {"75"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{},
expectedErr: &client.ErrorResponseWithProcessedFiles{
ProcessedFiles: nil,
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "bucket not found",
},
},
},
{
name: "with virus",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile("testfile.txt", strings.NewReader("Hello, World!"), nil),
client.NewFile("morefiles.txt", strings.NewReader("More content"), nil),
client.NewFile("blah.txt", strings.NewReader(eicarTestFile), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: WithAccessToken(accessTokenValidUser),
expected: nil,
expectedStatusCode: http.StatusForbidden,
expectedHeader: http.Header{
"Content-Length": {"740"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponseWithProcessedFiles{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: &map[string]any{"file": "blah.txt", "virus": "Win.Test.EICAR_HDB-1"},
Message: "virus found: Win.Test.EICAR_HDB-1",
},
ProcessedFiles: &[]client.FileMetadata{
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"65a8e27d8879283831b664bd8b7f0ad4"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "testfile.txt",
MimeType: "text/plain; charset=utf-8",
Size: 13,
},
{
BucketId: "default",
CreatedAt: time.Time{},
Etag: `"2562b24d9ca6633770dec8cbb190cca8"`,
Id: "69045896-4b8e-4bd1-a87b-e1386cb7",
IsUploaded: true,
Metadata: nil,
Name: "morefiles.txt",
MimeType: "text/plain; charset=utf-8",
Size: 12,
},
},
},
},
{
name: "unauthorized",
requestBody: func(t *testing.T) (io.Reader, string) {
t.Helper()
body, contentType, err := client.CreateUploadMultiForm(
"default",
client.NewFile("testfile.txt", strings.NewReader("Hello, World!"), nil),
client.NewFile("morefiles.txt", strings.NewReader("More content"), nil),
client.NewFile("blah.txt", strings.NewReader(eicarTestFile), nil),
)
if err != nil {
t.Fatalf("failed to create upload multi-form: %v", err)
}
return body, contentType
},
interceptor: nil,
expected: nil,
expectedStatusCode: http.StatusForbidden,
expectedHeader: http.Header{
"Content-Length": {"79"},
"Content-Type": {"application/json"},
"Date": {"Mon, 21 Jul 2025 14:45:00 GMT"},
},
expectedCmpOpts: []cmp.Option{
cmpopts.IgnoreFields(client.FileMetadata{}, "Id"),
},
expectedErr: &client.ErrorResponseWithProcessedFiles{
Error: &struct {
Data *map[string]any `json:"data,omitempty"`
Message string `json:"message"`
}{
Data: nil,
Message: "you are not authorized",
},
ProcessedFiles: &[]client.FileMetadata{},
},
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
var interceptor []client.RequestEditorFn
if tc.interceptor != nil {
interceptor = []client.RequestEditorFn{
tc.interceptor,
}
}
body, contentType := tc.requestBody(t)
resp, err := cl.UploadFilesWithBodyWithResponse(
t.Context(),
contentType,
body,
interceptor...,
)
if err != nil {
t.Fatalf("failed to upload files: %v", err)
}
if resp.StatusCode() != tc.expectedStatusCode {
t.Errorf(
"expected status code %d, got %d", tc.expectedStatusCode, resp.StatusCode(),
)
}
opts := append(
cmp.Options{
cmpopts.IgnoreFields(client.FileMetadata{}, "CreatedAt", "UpdatedAt"),
},
tc.expectedCmpOpts...,
)
if diff := cmp.Diff(resp.JSON201, tc.expected, opts...); diff != "" {
t.Errorf("unexpected response: %s", diff)
}
if diff := cmp.Diff(resp.JSONDefault, tc.expectedErr, opts); diff != "" {
t.Errorf("unexpected error response: %s", diff)
}
if diff := cmp.Diff(
resp.HTTPResponse.Header,
tc.expectedHeader,
compareContentLength(),
IgnoreResponseHeaders(),
); diff != "" {
t.Errorf("unexpected headers: %s", diff)
}
})
}
}

View File

@@ -0,0 +1,53 @@
package cmd
import (
"context"
"errors"
"io"
"github.com/nhost/nhost/services/storage/clamd"
"github.com/nhost/nhost/services/storage/controller"
)
type DummyAntivirus struct{}
func (d *DummyAntivirus) ScanReader(_ context.Context, _ io.ReaderAt) *controller.APIError {
return nil
}
type ClamavWrapper struct {
clamav *clamd.Client
}
func (c *ClamavWrapper) ScanReader(ctx context.Context, r io.ReaderAt) *controller.APIError {
err := c.clamav.InStream(ctx, r)
virusFoundErr := &clamd.VirusFoundError{} //nolint:exhaustruct
switch {
case errors.As(err, &virusFoundErr):
err := controller.ForbiddenError(
err,
err.Error(),
)
err.SetData("virus", virusFoundErr.Name)
return err
case err != nil:
return controller.InternalServerError(err)
}
return nil
}
func getAv(addr string) (controller.Antivirus, error) { //nolint:ireturn
if addr == "" {
return &DummyAntivirus{}, nil
}
c, err := clamd.NewClient(addr)
if err != nil {
return nil, controller.InternalServerError(err)
}
return &ClamavWrapper{clamav: c}, nil
}

View File

@@ -0,0 +1,36 @@
package cmd
import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
)
func addBoolFlag(
flags *pflag.FlagSet,
name string,
defaultValue bool, //nolint:unparam
help string,
) {
flags.Bool(name, defaultValue, help)
if err := viper.BindPFlag(name, flags.Lookup(name)); err != nil {
cobra.CheckErr(err)
}
}
func addStringFlag(flags *pflag.FlagSet, name string, defaultValue string, help string) {
flags.String(name, defaultValue, help)
if err := viper.BindPFlag(name, flags.Lookup(name)); err != nil {
cobra.CheckErr(err)
}
}
func addStringArrayFlag(flags *pflag.FlagSet, name string, defaultValue []string, help string) {
flags.StringArray(name, defaultValue, help)
if err := viper.BindPFlag(name, flags.Lookup(name)); err != nil {
cobra.CheckErr(err)
}
}

View File

@@ -0,0 +1,12 @@
package cmd
import "github.com/sirupsen/logrus"
func getLogger() *logrus.Logger {
logger := logrus.New()
logger.SetFormatter(&logrus.TextFormatter{ //nolint:exhaustruct
FullTimestamp: true,
})
return logger
}

Some files were not shown because too many files have changed in this diff Show More