diff --git a/.github/workflows/cron-renovate.yml b/.github/workflows/cron-renovate.yml index 7e9a00450b..2c6cc8aedc 100644 --- a/.github/workflows/cron-renovate.yml +++ b/.github/workflows/cron-renovate.yml @@ -21,7 +21,7 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: renovatebot/github-action@79dc0ba74dc3de28db0a7aeb1d0b95d5bf5fde2a # v46.1.13 + - uses: renovatebot/github-action@693b9ef15eec82123529a37c782242f091365961 # v46.1.14 with: renovate-version: ${{ env.RENOVATE_VERSION }} configurationFile: renovate.json5 diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 7b68a393d0..ac2bd1a5ba 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -63,11 +63,9 @@ jobs: - "options/locale/locale_en-US.json" frontend: - - "*.js" - "*.ts" - "web_src/**" - - "tools/*.js" - - "tools/*.ts" + - "tools/generate-svg.ts" - "assets/emoji.json" - "package.json" - "pnpm-lock.yaml" @@ -99,8 +97,8 @@ jobs: - "Makefile" dockerfile: - - "Dockerfile" - - "Dockerfile.rootless" + - "Dockerfile" + - "Dockerfile.rootless" swagger: - "templates/swagger/v1_json.tmpl" diff --git a/.github/workflows/giteabot.yml b/.github/workflows/giteabot.yml new file mode 100644 index 0000000000..dad7a19fdb --- /dev/null +++ b/.github/workflows/giteabot.yml @@ -0,0 +1,44 @@ +name: giteabot + +on: + push: + branches: + - main + # pull_request_target gives this workflow access to GITEABOT_TOKEN on PRs from + # forks, which the bot needs to write labels, statuses and comments. Safe here + # because the job only runs a pinned action and never checks out PR HEAD. + pull_request_target: # zizmor: ignore[dangerous-triggers] + types: + - opened + - synchronize + - labeled + - unlabeled + - closed + - review_requested + - review_request_removed + pull_request_review: + types: + - submitted + - edited + - dismissed + schedule: + - cron: "15 3 * * *" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ format('{0}-{1}', github.workflow, (github.event_name == 'pull_request_target' || github.event_name == 'pull_request_review') && format('pr-{0}', github.event.pull_request.number) || 'maintenance') }} + cancel-in-progress: false + +jobs: + giteabot: + if: github.repository == 'go-gitea/gitea' + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: go-gitea/giteabot@8996d0b0e6c4ab066e3adcaf2c49b5d4cd15d7af # v1.0.1 + with: + github_token: ${{ secrets.GITEABOT_TOKEN }} + gitea_fork: giteabot/gitea diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 8943dc6142..095ee6271b 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -43,7 +43,7 @@ jobs: go-version-file: go.mod check-latest: true cache: false - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 @@ -89,7 +89,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index f81026a5ae..adadc0d807 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -29,7 +29,7 @@ jobs: with: cache-name: e2e build-cache: "false" - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 diff --git a/.github/workflows/pull-pr-title.yml b/.github/workflows/pull-pr-title.yml index 59b0e78c40..6dadcb7058 100644 --- a/.github/workflows/pull-pr-title.yml +++ b/.github/workflows/pull-pr-title.yml @@ -23,6 +23,9 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: 24 - run: make lint-pr-title env: PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 46cf147f02..82ebf79a61 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -22,7 +22,7 @@ jobs: with: go-version-file: go.mod check-latest: true - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml index 6dfca8e6cf..b246d87b9a 100644 --- a/.github/workflows/release-tag-rc.yml +++ b/.github/workflows/release-tag-rc.yml @@ -23,7 +23,7 @@ jobs: with: go-version-file: go.mod check-latest: true - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml index d486c2e8c5..9eb910c8e3 100644 --- a/.github/workflows/release-tag-version.yml +++ b/.github/workflows/release-tag-version.yml @@ -26,7 +26,7 @@ jobs: with: go-version-file: go.mod check-latest: true - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 diff --git a/AGENTS.md b/AGENTS.md index 153ce964b5..2331da486a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,7 @@ - Run single playwright e2e test files with `GITEA_TEST_E2E_FLAGS='' make test-e2e` - Add the current year into the copyright header of new `.go` files - Ensure no trailing whitespace in edited files -- Use Conventional Commits format for commit messages and PR titles (e.g. `type(scope): subject`) +- Use Conventional Commits format for commit messages and PR titles (for example `type(scope): subject`; place `!` immediately before the colon when the change is breaking) - Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates - Preserve existing code comments, do not remove or rewrite comments that are still relevant - Keep comments short, prefer same-line, explain why, never narrate code diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27103a991b..6888b4ad65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -195,14 +195,30 @@ PR titles must follow the [Conventional Commits](https://www.conventionalcommits type(scope)!: subject ``` -The allowed types are `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, and `test`. The generic `chore` type is intentionally not accepted; pick a more descriptive type instead. +The scope in parentheses is optional. A `!` immediately before the colon marks a [breaking change](https://www.conventionalcommits.org/en/v1.0.0/#summary): either `type!:` or `type(scope)!:` (not `type!(scope):`). + +Use one of these types: + +- `build`: Changes affecting the build system, packaging, or external dependencies +- `ci`: Changes to CI/CD configuration files and scripts +- `chore`: Maintenance changes that do not affect production code or should not appear in the changelog +- `docs`: Documentation-only changes +- `feat`: A larger user-facing feature, improvement, or new functionality +- `enhance`: Small or trivial user-facing improvements or UX polish (for example wording changes, color adjustments, spacing or padding tweaks, placeholders, small UI behavior improvements) +- `fix`: A bug fix, UX correction, or security-related dependency update +- `perf`: Performance improvements (speed, memory, scalability) +- `refactor`: A code change that neither fixes a bug nor adds a feature +- `revert`: Reverts a previous change +- `style`: Formatting or style-only changes that do not affect code behavior (for example lint-driven edits) +- `test`: Adding or correcting tests Examples: ```text fix(web): prevent avatar upload crash on empty file feat(api): add pagination to repo hooks list -ci(workflows): lint PR titles with commitlint +enhance(repo): improve diff toolbar spacing +ci(workflows): lint PR titles in CI ``` Keep this summary up-to-date as the PR evolves. \ @@ -217,6 +233,10 @@ Another requirement for merging PRs is that the PR is labeled correctly.\ However, this is not your job as a contributor, but the job of the person merging your PR.\ If you think that your PR was labeled incorrectly, or notice that it was merged without labels, please let us know. +For pull requests that use a valid Conventional Commits title, CI automatically applies a matching `type/…` label when the title prefix is `feat`, `enhance`, `fix`, `docs`, or `test` (for example `enhance(web): …` receives `type/enhancement`).\ +That label is kept in sync with the PR title when the title is edited.\ +Other title prefixes do not get an automatic `type/…` label; the merger still assigns the correct labels (including `type/…` when needed) for changelog and backport decisions. + If your PR closes some issues, you must note that in a way that both GitHub and Gitea understand, i.e. by appending a paragraph like ```text diff --git a/Makefile b/Makefile index 809300d880..782e31ccfd 100644 --- a/Makefile +++ b/Makefile @@ -320,7 +320,7 @@ lint-md-fix: node_modules ## lint markdown files and fix issues .PHONY: lint-pr-title lint-pr-title: ## lint PR title against Conventional Commits (set PR_TITLE=...) - @node ./tools/lint-pr-title.js + @node ./tools/lint-pr-title.ts .PHONY: lint-spell lint-spell: ## lint spelling diff --git a/assets/go-licenses.json b/assets/go-licenses.json index 991fe19746..3566fc2f6e 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -660,8 +660,8 @@ "licenseText": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n" }, { - "name": "github.com/google/go-github/v85", - "path": "github.com/google/go-github/v85/LICENSE", + "name": "github.com/google/go-github/v86", + "path": "github.com/google/go-github/v86/LICENSE", "licenseText": "Copyright (c) 2013 The go-github AUTHORS. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" }, { diff --git a/cmd/doctor.go b/cmd/doctor.go index 188740dbce..3593670047 100644 --- a/cmd/doctor.go +++ b/cmd/doctor.go @@ -21,7 +21,6 @@ import ( "code.gitea.io/gitea/services/doctor" "github.com/urfave/cli/v3" - "xorm.io/xorm" ) func newDoctorCommand() *cli.Command { @@ -132,7 +131,7 @@ func runRecreateTable(ctx context.Context, cmd *cli.Command) error { } recreateTables := migrate_base.RecreateTables(beans...) - return db.InitEngineWithMigration(context.Background(), func(ctx context.Context, x *xorm.Engine) error { + return db.InitEngineWithMigration(context.Background(), func(ctx context.Context, x db.EngineMigration) error { if err := migrations.EnsureUpToDate(ctx, x); err != nil { return err } diff --git a/docs/community-governance.md b/docs/community-governance.md index dbf2481329..e37e9def64 100644 --- a/docs/community-governance.md +++ b/docs/community-governance.md @@ -48,7 +48,7 @@ If a PR has `lgtm/done`, no open discussions, and no merge conflicts, any mainta -Gitea uses its own tool, , to automate parts of the review process. The backporter: +Gitea uses its own tool, , to automate parts of the review process. The backporter: - Creates a backport PR when needed after the initial PR merges. - Removes the PR from the merge queue after it merges. diff --git a/go.mod b/go.mod index 701e61bfb1..26c28b4938 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,10 @@ godebug x509negativeserial=1 require ( code.gitea.io/actions-proto-go v0.4.1 - code.gitea.io/sdk/gitea v0.25.0 + code.gitea.io/sdk/gitea v0.25.1 codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 connectrpc.com/connect v1.19.2 - gitea.com/gitea/runner v1.0.0 + gitea.com/gitea/runner v1.0.3 gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a gitea.com/go-chi/cache v0.2.1 gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098 @@ -48,24 +48,24 @@ require ( github.com/ethantkoenig/rupture v1.0.1 github.com/felixge/fgprof v0.9.5 github.com/fsnotify/fsnotify v1.10.1 - github.com/getkin/kin-openapi v0.137.0 + github.com/getkin/kin-openapi v0.138.0 github.com/gliderlabs/ssh v0.3.8 github.com/go-chi/chi/v5 v5.2.5 github.com/go-chi/cors v1.2.2 - github.com/go-co-op/gocron/v2 v2.21.1 + github.com/go-co-op/gocron/v2 v2.21.2 github.com/go-enry/go-enry/v2 v2.9.6 github.com/go-git/go-billy/v5 v5.9.0 github.com/go-git/go-git/v5 v5.19.0 github.com/go-ldap/ldap/v3 v3.4.13 github.com/go-redsync/redsync/v4 v4.16.0 github.com/go-sql-driver/mysql v1.10.0 - github.com/go-webauthn/webauthn v0.17.2 + github.com/go-webauthn/webauthn v0.17.3 github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 github.com/golang-jwt/jwt/v5 v5.3.1 - github.com/google/go-github/v85 v85.0.0 + github.com/google/go-github/v86 v86.0.0 github.com/google/licenseclassifier/v2 v2.0.0 - github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 + github.com/google/pprof v0.0.0-20260507013755-92041b743c96 github.com/google/uuid v1.6.0 github.com/gorilla/feeds v1.2.0 github.com/gorilla/sessions v1.4.0 @@ -104,25 +104,25 @@ require ( github.com/ulikunitz/xz v0.5.15 github.com/urfave/cli-docs/v3 v3.1.0 github.com/urfave/cli/v3 v3.6.1 - github.com/wneessen/go-mail v0.7.2 + github.com/wneessen/go-mail v0.7.3 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yohcop/openid-go v1.0.1 github.com/yuin/goldmark v1.8.2 github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc - gitlab.com/gitlab-org/api/client-go/v2 v2.24.1 + gitlab.com/gitlab-org/api/client-go/v2 v2.25.0 go.yaml.in/yaml/v4 v4.0.0-rc.3 - golang.org/x/crypto v0.50.0 - golang.org/x/image v0.39.0 - golang.org/x/net v0.53.0 + golang.org/x/crypto v0.51.0 + golang.org/x/image v0.40.0 + golang.org/x/net v0.54.0 golang.org/x/oauth2 v0.36.0 golang.org/x/sync v0.20.0 golang.org/x/sys v0.44.0 - golang.org/x/text v0.36.0 + golang.org/x/text v0.37.0 google.golang.org/grpc v1.81.0 google.golang.org/protobuf v1.36.11 gopkg.in/ini.v1 v1.67.2 gopkg.in/yaml.v3 v3.0.1 - modernc.org/sqlite v1.50.0 + modernc.org/sqlite v1.50.1 mvdan.cc/xurls/v2 v2.6.0 strk.kbt.io/projects/go/libravatar v0.0.0-20260301104140-add494e31dab xorm.io/builder v0.3.13 @@ -186,7 +186,7 @@ require ( github.com/davidmz/go-pageant v1.0.2 // indirect github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6 // indirect github.com/fatih/color v1.19.0 // indirect - github.com/fxamacker/cbor/v2 v2.9.1 // indirect + github.com/fxamacker/cbor/v2 v2.9.2 // indirect github.com/git-lfs/pktline v0.0.0-20230103162542-ca444d533ef1 // indirect github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect github.com/go-enry/go-oniguruma v1.2.1 // indirect @@ -196,7 +196,7 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect - github.com/go-webauthn/x v0.2.3 // indirect + github.com/go-webauthn/x v0.2.5 // indirect github.com/goccy/go-json v0.10.6 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect @@ -290,7 +290,7 @@ require ( golang.org/x/tools v0.44.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260401020348-3a24fdc17823 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - modernc.org/libc v1.72.0 // indirect + modernc.org/libc v1.72.3 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect ) diff --git a/go.sum b/go.sum index ccdc062172..b2beb0d3af 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdB cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= code.gitea.io/actions-proto-go v0.4.1 h1:l0EYhjsgpUe/1VABo2eK7zcoNX2W44WOnb0MSLrKfls= code.gitea.io/actions-proto-go v0.4.1/go.mod h1:mn7Wkqz6JbnTOHQpot3yDeHx+O5C9EGhMEE+htvHBas= -code.gitea.io/sdk/gitea v0.25.0 h1:wSJlL0Qv+ODY2OdF0L7fwt86wgf1C/0g3xIXZ6eC5zI= -code.gitea.io/sdk/gitea v0.25.0/go.mod h1:uDFWYBU8dgZsgOHwe6C/6olxvf8FHguNB3wW1i83fgg= +code.gitea.io/sdk/gitea v0.25.1 h1:yywxWwoV+SdjHtbC6unBiXojWdZOtoHuGhEazEXeWuE= +code.gitea.io/sdk/gitea v0.25.1/go.mod h1:uDFWYBU8dgZsgOHwe6C/6olxvf8FHguNB3wW1i83fgg= code.pfad.fr/check v1.1.0 h1:GWvjdzhSEgHvEHe2uJujDcpmZoySKuHQNrZMfzfO0bE= code.pfad.fr/check v1.1.0/go.mod h1:NiUH13DtYsb7xp5wll0U4SXx7KhXQVCtRgdC96IPfoM= codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 h1:TXbikPqa7YRtfU9vS6QJBg77pUvbEb6StRdZO8t1bEY= @@ -14,8 +14,8 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -gitea.com/gitea/runner v1.0.0 h1:s3AS5u8r+B5W+Gy69sYYvCVTb0f23fRM6H+CbrFrobE= -gitea.com/gitea/runner v1.0.0/go.mod h1:bn+8Qt3KyvdVQHD3OR2yRoKgEXs8dXqwBVtmfYVrNIE= +gitea.com/gitea/runner v1.0.3 h1:jwwXPj2UKSrbFCfyAcqoiXcbaTNQTWlozRb1kikiquw= +gitea.com/gitea/runner v1.0.3/go.mod h1:0xR69LP2GwVJT9QnbLHok/87YIFDmpKnJVLkRKKJbSM= gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a h1:JHoBrfuTSF9Ke9aNfSYj1XRPBHjKPgCApVprnt2Am0M= gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a/go.mod h1:FOsLJIMdpiHzBp3Vby6Wfkdw2ppGscrjgU1IC7E4/zQ= gitea.com/go-chi/cache v0.2.1 h1:bfAPkvXlbcZxPCpcmDVCWoHgiBSBmZN/QosnZvEC0+g= @@ -273,10 +273,10 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= -github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ= -github.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/getkin/kin-openapi v0.137.0 h1:Q3HhawNQV0GfvO2mIYMUBUSEFrDsVlzcYz4VydL9YEo= -github.com/getkin/kin-openapi v0.137.0/go.mod h1:vUYWaKyMqj7PfTybelXtLuLN9tReS12vxnzMRK+z2GY= +github.com/fxamacker/cbor/v2 v2.9.2 h1:X4Ksno9+x3cz0TZv69ec1hxP/+tymuR8PXQJyDwfh78= +github.com/fxamacker/cbor/v2 v2.9.2/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/getkin/kin-openapi v0.138.0 h1:ebfE0JAmF6AqHrNBy1KO3Fs68K9tPs48HalvLPo7Rv4= +github.com/getkin/kin-openapi v0.138.0/go.mod h1:vUYWaKyMqj7PfTybelXtLuLN9tReS12vxnzMRK+z2GY= github.com/git-lfs/pktline v0.0.0-20230103162542-ca444d533ef1 h1:mtDjlmloH7ytdblogrMz1/8Hqua1y8B4ID+bh3rvod0= github.com/git-lfs/pktline v0.0.0-20230103162542-ca444d533ef1/go.mod h1:fenKRzpXDjNpsIBhuhUzvjCKlDjKam0boRAenTE0Q6A= github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= @@ -290,8 +290,8 @@ github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug= github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0= github.com/go-chi/cors v1.2.2 h1:Jmey33TE+b+rB7fT8MUy1u0I4L+NARQlK6LhzKPSyQE= github.com/go-chi/cors v1.2.2/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= -github.com/go-co-op/gocron/v2 v2.21.1 h1:QYOK6iOQVCut+jDcs4zRdWRTBHRxRCEeeFi1TnAmgbU= -github.com/go-co-op/gocron/v2 v2.21.1/go.mod h1:5lEiCKk1oVJV39Zg7/YG10OnaVrDAV5GGR6O0663k6U= +github.com/go-co-op/gocron/v2 v2.21.2 h1:bD8/YwkojYHgXFr3iEulL148KBdTbKVxUZzFKpXcdbY= +github.com/go-co-op/gocron/v2 v2.21.2/go.mod h1:5lEiCKk1oVJV39Zg7/YG10OnaVrDAV5GGR6O0663k6U= github.com/go-enry/go-enry/v2 v2.9.6 h1:np63eOtMV56zfYDHnFVgpEVOk8fr2kmylcMnAZUDbSs= github.com/go-enry/go-enry/v2 v2.9.6/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8= github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo= @@ -331,10 +331,10 @@ github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/go-webauthn/webauthn v0.17.2 h1:e9YtSZTVnxnMWFezXi6JvnqOSxmH4Er8QDHK2a/mM40= -github.com/go-webauthn/webauthn v0.17.2/go.mod h1:mQC6L0lZ5Kiu35G70zeB2WnrW4+vbHjR8Koq4HdVaMg= -github.com/go-webauthn/x v0.2.3 h1:8oArS+Rc1SWFLXhE17KZNx258Z4kUSyaDgsSncCO5RA= -github.com/go-webauthn/x v0.2.3/go.mod h1:tM04GF3V6VYq79AZMl7vbj4q6pz9r7L2criWRzbWhPk= +github.com/go-webauthn/webauthn v0.17.3 h1:XHZ0TXV7k8vChcE4TFgPitOPJ5cb7h1dpAeFDS0cjCo= +github.com/go-webauthn/webauthn v0.17.3/go.mod h1:PlkMgmuL9McCT7dvgBj/Sz/fgs3V6ZID6/KnFkEcPvQ= +github.com/go-webauthn/x v0.2.5 h1:wEVTfU04XFyPTXGQbKOQwMKhcDWfDAkdsDDBsDaG9yY= +github.com/go-webauthn/x v0.2.5/go.mod h1:Qna/yJz9rV6lRzwl5BfYbmTJpVGxcBIds3gJtw2tlGg= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= @@ -381,8 +381,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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/go-github/v85 v85.0.0 h1:1+TLFX/akTFXK7o9Z9uAloQGufOn4ySa5DItUM1VWT4= -github.com/google/go-github/v85 v85.0.0/go.mod h1:jYkBnqN+SzR2A2fGKYfbt6DEEQAyxeK0Q2XpPV9ZFsU= +github.com/google/go-github/v86 v86.0.0 h1:S/6aANJhwRm8EQmGKVML3j41yq0h2BsTP8FnDkO7kcA= +github.com/google/go-github/v86 v86.0.0/go.mod h1:zKv1l4SwDXNFMGByi2FWkq71KwSXqj/eQRZuqtmcot8= github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo= @@ -395,8 +395,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/licenseclassifier/v2 v2.0.0 h1:1Y57HHILNf4m0ABuMVb6xk4vAJYEUO0gDxNpog0pyeA= github.com/google/licenseclassifier/v2 v2.0.0/go.mod h1:cOjbdH0kyC9R22sdQbYsFkto4NGCAc+ZSwbeThazEtM= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg= -github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/pprof v0.0.0-20260507013755-92041b743c96 h1:YDDnaZ9afWajDboPMt9Vikqca/yWAX7KAxVzb4lJU1M= +github.com/google/pprof v0.0.0-20260507013755-92041b743c96/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -723,8 +723,8 @@ github.com/urfave/cli-docs/v3 v3.1.0/go.mod h1:59d+5Hz1h6GSGJ10cvcEkbIe3j233t4XD github.com/urfave/cli/v3 v3.6.1 h1:j8Qq8NyUawj/7rTYdBGrxcH7A/j7/G8Q5LhWEW4G3Mo= github.com/urfave/cli/v3 v3.6.1/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/wneessen/go-mail v0.7.2 h1:xxPnhZ6IZLSgxShebmZ6DPKh1b6OJcoHfzy7UjOkzS8= -github.com/wneessen/go-mail v0.7.2/go.mod h1:+TkW6QP3EVkgTEqHtVmnAE/1MRhmzb8Y9/W3pweuS+k= +github.com/wneessen/go-mail v0.7.3 h1:g3DravXC5SMlVdboFrQA8Jx95A8sOzoBeS5F+vzNRK0= +github.com/wneessen/go-mail v0.7.3/go.mod h1:QGhBX0yNbc1J+Mkjcu7z2rpj4B4l+BmDY8gYznPC9sk= github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -760,8 +760,8 @@ github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= -gitlab.com/gitlab-org/api/client-go/v2 v2.24.1 h1:XuTWCNmVSnXzjb9ty8XPR60BOHsXbzqgOlujW3+5DTM= -gitlab.com/gitlab-org/api/client-go/v2 v2.24.1/go.mod h1:OSJITkIrT0UuA3JCucEK9UEGcC1PWBkQg5WW6W4nWuo= +gitlab.com/gitlab-org/api/client-go/v2 v2.25.0 h1:ATTBB0Iiup5SRox2IPNSkkrGy/Any7FWBL1BOpZrpCU= +gitlab.com/gitlab-org/api/client-go/v2 v2.25.0/go.mod h1:OSJITkIrT0UuA3JCucEK9UEGcC1PWBkQg5WW6W4nWuo= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= @@ -797,12 +797,12 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= -golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= +golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= +golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM= golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80= -golang.org/x/image v0.39.0 h1:skVYidAEVKgn8lZ602XO75asgXBgLj9G/FE3RbuPFww= -golang.org/x/image v0.39.0/go.mod h1:sIbmppfU+xFLPIG0FoVUTvyBMmgng1/XAMhQ2ft0hpA= +golang.org/x/image v0.40.0 h1:Tw4GyDXMo+daZN1znreBRC3VayR1aLFUyUEOLUdW1a8= +golang.org/x/image v0.40.0/go.mod h1:uIc348UZMSvS5Z65CVZ7iDPaNobNFEPeJ4kbqTOszmA= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -829,8 +829,8 @@ 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.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= -golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= +golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w= +golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -889,8 +889,8 @@ 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.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= -golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= +golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= +golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= 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= @@ -901,8 +901,8 @@ 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.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= -golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= +golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= +golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -952,10 +952,10 @@ 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= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -modernc.org/cc/v4 v4.27.3 h1:uNCgn37E5U09mTv1XgskEVUJ8ADKpmFMPxzGJ0TSo+U= -modernc.org/cc/v4 v4.27.3/go.mod h1:3YjcbCqhoTTHPycJDRl2WZKKFj0nwcOIPBfEZK0Hdk8= -modernc.org/ccgo/v4 v4.32.4 h1:L5OB8rpEX4ZsXEQwGozRfJyJSFHbbNVOoQ59DU9/KuU= -modernc.org/ccgo/v4 v4.32.4/go.mod h1:lY7f+fiTDHfcv6YlRgSkxYfhs+UvOEEzj49jAn2TOx0= +modernc.org/cc/v4 v4.28.2 h1:3tQ0lf2ADtoby2EtSP+J7IE2SHwEJdP8ioR59wx7XpY= +modernc.org/cc/v4 v4.28.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= +modernc.org/ccgo/v4 v4.34.0 h1:yRLPFZieg532OT4rp4JFNIVcquwalMX26G95WQDqwCQ= +modernc.org/ccgo/v4 v4.34.0/go.mod h1:AS5WYMyBakQ+fhsHhtP8mWB82KTGPkNNJDGfGQCe0/A= modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= @@ -964,18 +964,18 @@ modernc.org/gc/v3 v3.1.2 h1:ZtDCnhonXSZexk/AYsegNRV1lJGgaNZJuKjJSWKyEqo= modernc.org/gc/v3 v3.1.2/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.72.0 h1:IEu559v9a0XWjw0DPoVKtXpO2qt5NVLAnFaBbjq+n8c= -modernc.org/libc v1.72.0/go.mod h1:tTU8DL8A+XLVkEY3x5E/tO7s2Q/q42EtnNWda/L5QhQ= +modernc.org/libc v1.72.3 h1:ZnDF4tXn4NBXFutMMQC4vtbTFSXhhKzR73fv0beZEAU= +modernc.org/libc v1.72.3/go.mod h1:dn0dZNnnn1clLyvRxLxYExxiKRZIRENOfqQ8XEeg4Qs= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= -modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= -modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= +modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.50.0 h1:eMowQSWLK0MeiQTdmz3lqoF5dqclujdlIKeJA11+7oM= -modernc.org/sqlite v1.50.0/go.mod h1:m0w8xhwYUVY3H6pSDwc3gkJ/irZT/0YEXwBlhaxQEew= +modernc.org/sqlite v1.50.1 h1:l+cQvn0sd0zJJtfygGHuQJ5AjlrwXmWPw4KP3ZMwr9w= +modernc.org/sqlite v1.50.1/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= diff --git a/models/activities/action_list.go b/models/activities/action_list.go index 5b07a8e080..e9e3873f9a 100644 --- a/models/activities/action_list.go +++ b/models/activities/action_list.go @@ -242,7 +242,7 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err if opts.Page < 10 { // TODO: why it's 10 but other values? It's an experience value. sess := db.GetEngine(ctx).Where(cond) - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) if opts.DontCount { err = sess.Desc("`action`.created_unix").Find(&actions) @@ -255,7 +255,7 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err } else { // First, only query which IDs are necessary, and only then query all actions to speed up the overall query sess := db.GetEngine(ctx).Where(cond).Select("`action`.id") - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) actionIDs := make([]int64, 0, opts.PageSize) if err := sess.Table("action").Desc("`action`.created_unix").Find(&actionIDs); err != nil { diff --git a/models/activities/repo_activity.go b/models/activities/repo_activity.go index aeaa452c9e..54ea6be773 100644 --- a/models/activities/repo_activity.go +++ b/models/activities/repo_activity.go @@ -17,7 +17,6 @@ import ( "code.gitea.io/gitea/modules/gitrepo" "xorm.io/builder" - "xorm.io/xorm" ) // ActivityAuthorData represents statistical git commit count data @@ -248,7 +247,7 @@ func (stats *ActivityStats) FillPullRequests(ctx context.Context, repoID int64, return nil } -func pullRequestsForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time, merged bool) *xorm.Session { +func pullRequestsForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time, merged bool) db.Session { sess := db.GetEngine(ctx).Where("pull_request.base_repo_id=?", repoID). Join("INNER", "issue", "pull_request.issue_id = issue.id") @@ -324,7 +323,7 @@ func (stats *ActivityStats) FillUnresolvedIssues(ctx context.Context, repoID int return sess.Find(&stats.UnresolvedIssues) } -func newlyCreatedIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session { +func newlyCreatedIssues(ctx context.Context, repoID int64, fromTime time.Time) db.Session { sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID). And("issue.is_pull = ?", false). // Retain the is_pull check to exclude pull requests And("issue.created_unix >= ?", fromTime.Unix()) // Include all issues created after fromTime @@ -332,7 +331,7 @@ func newlyCreatedIssues(ctx context.Context, repoID int64, fromTime time.Time) * return sess } -func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session { +func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) db.Session { sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID). And("issue.is_pull = ?", false). And(builder.Or( @@ -343,7 +342,7 @@ func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.S return sess } -func issuesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time, closed, unresolved bool) *xorm.Session { +func issuesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time, closed, unresolved bool) db.Session { sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID). And("issue.is_closed = ?", closed) @@ -385,7 +384,7 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from return nil } -func releasesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session { +func releasesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time) db.Session { return db.GetEngine(ctx).Where("`release`.repo_id = ?", repoID). And("`release`.is_draft = ?", false). And("`release`.created_unix >= ?", fromTime.Unix()) diff --git a/models/db/collation.go b/models/db/collation.go index 203f7cbfe4..56173ad97d 100644 --- a/models/db/collation.go +++ b/models/db/collation.go @@ -12,7 +12,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -27,7 +26,7 @@ type CheckCollationsResult struct { InconsistentCollationColumns []string } -func findAvailableCollationsMySQL(x *xorm.Engine) (ret container.Set[string], err error) { +func findAvailableCollationsMySQL(x EngineMigration) (ret container.Set[string], err error) { var res []struct { Collation string } @@ -41,7 +40,7 @@ func findAvailableCollationsMySQL(x *xorm.Engine) (ret container.Set[string], er return ret, nil } -func findAvailableCollationsMSSQL(x *xorm.Engine) (ret container.Set[string], err error) { +func findAvailableCollationsMSSQL(x EngineMigration) (ret container.Set[string], err error) { var res []struct { Name string } @@ -55,7 +54,7 @@ func findAvailableCollationsMSSQL(x *xorm.Engine) (ret container.Set[string], er return ret, nil } -func CheckCollations(x *xorm.Engine) (*CheckCollationsResult, error) { +func CheckCollations(x EngineMigration) (*CheckCollationsResult, error) { dbTables, err := x.DBMetas() if err != nil { return nil, err @@ -143,7 +142,7 @@ func CheckCollationsDefaultEngine() (*CheckCollationsResult, error) { return CheckCollations(xormEngine) } -func alterDatabaseCollation(x *xorm.Engine, collation string) error { +func alterDatabaseCollation(x EngineMigration, collation string) error { if x.Dialect().URI().DBType == schemas.MYSQL { _, err := x.Exec("ALTER DATABASE CHARACTER SET utf8mb4 COLLATE " + collation) return err @@ -156,7 +155,7 @@ func alterDatabaseCollation(x *xorm.Engine, collation string) error { } // preprocessDatabaseCollation checks database & table column collation, and alter the database collation if needed -func preprocessDatabaseCollation(x *xorm.Engine) { +func preprocessDatabaseCollation(x EngineMigration) { r, err := CheckCollations(x) if err != nil { log.Error("Failed to check database collation: %v", err) diff --git a/models/db/engine.go b/models/db/engine.go index fbcc3fa15e..d4ac0b4aca 100755 --- a/models/db/engine.go +++ b/models/db/engine.go @@ -16,6 +16,10 @@ import ( _ "github.com/microsoft/go-mssqldb" // Needed for the MSSQL driver "xorm.io/xorm" + "xorm.io/xorm/core" + "xorm.io/xorm/dialects" + "xorm.io/xorm/names" + "xorm.io/xorm/schemas" ) var ( @@ -33,6 +37,7 @@ type Engine interface { Truncate(...any) (int64, error) Exec(...any) (sql.Result, error) Find(any, ...any) error + FindAndCount(any, ...any) (int64, error) Get(beans ...any) (bool, error) ID(any) *xorm.Session In(string, ...any) *xorm.Session @@ -61,9 +66,41 @@ type Engine interface { IsTableExist(tableNameOrBean any) (bool, error) } +// Session represents a xorm session interface, used as an abstraction over *xorm.Session. +type Session interface { + Engine + And(query any, args ...any) *xorm.Session + Begin() error + Close() error + Commit() error + IsInTx() bool + Rollback() error + Engine() *xorm.Engine +} + +// EngineMigration is a xorm engine interface used for migrations. +// It extends Engine with additional methods that are only available on the engine (not on the session) +// and are needed by the migration packages. +type EngineMigration interface { + Engine + Close() error + DB() *core.DB + DBMetas() ([]*schemas.Table, error) + Dialect() dialects.Dialect + DropTables(beans ...any) error + NewSession() *xorm.Session + QueryInterface(sqlOrArgs ...any) ([]map[string]any, error) + SetMapper(mapper names.Mapper) + SyncWithOptions(opts xorm.SyncOptions, beans ...any) (*xorm.SyncResult, error) + TableInfo(bean any) (*schemas.Table, error) + TableName(bean any, includeSchema ...bool) string +} + var ( - _ Engine = (*xorm.Engine)(nil) - _ Engine = (*xorm.Session)(nil) + _ Engine = (*xorm.Engine)(nil) + _ Engine = (*xorm.Session)(nil) + _ Session = (*xorm.Session)(nil) + _ EngineMigration = (*xorm.Engine)(nil) ) // RegisterModel registers model, if initFuncs provided, it will be invoked after data model sync diff --git a/models/db/engine_init.go b/models/db/engine_init.go index 65192d3327..2680bcf5ef 100644 --- a/models/db/engine_init.go +++ b/models/db/engine_init.go @@ -92,7 +92,7 @@ func UnsetDefaultEngine() { // When called from the "doctor" command, the migration function is a version check // that prevents the doctor from fixing anything in the database if the migration level // is different from the expected value. -func InitEngineWithMigration(ctx context.Context, migrateFunc func(context.Context, *xorm.Engine) error) (err error) { +func InitEngineWithMigration(ctx context.Context, migrateFunc func(context.Context, EngineMigration) error) (err error) { if err = InitEngine(ctx); err != nil { return err } diff --git a/models/db/list.go b/models/db/list.go index 5c005a0350..3d61d7d46c 100644 --- a/models/db/list.go +++ b/models/db/list.go @@ -9,7 +9,6 @@ import ( "code.gitea.io/gitea/modules/setting" "xorm.io/builder" - "xorm.io/xorm" ) const ( @@ -25,7 +24,7 @@ type Paginator interface { } // SetSessionPagination sets pagination for a database session -func SetSessionPagination(sess Engine, p Paginator) *xorm.Session { +func SetSessionPagination(sess Engine, p Paginator) Session { skip, take := p.GetSkipTake() return sess.Limit(take, skip) diff --git a/models/git/branch_list.go b/models/git/branch_list.go index 1445f3a5a0..17cac4531b 100644 --- a/models/git/branch_list.go +++ b/models/git/branch_list.go @@ -101,7 +101,7 @@ func (opts FindBranchOptions) ToOrders() string { func FindBranchNames(ctx context.Context, opts FindBranchOptions) ([]string, error) { sess := db.GetEngine(ctx).Select("name").Where(opts.ToConds()) if opts.PageSize > 0 && !opts.IsListAll() { - sess = db.SetSessionPagination(sess, &opts.ListOptions) + db.SetSessionPagination(sess, &opts.ListOptions) } var branches []string diff --git a/models/git/commit_status.go b/models/git/commit_status.go index 2ae5937a3d..07beb2372a 100644 --- a/models/git/commit_status.go +++ b/models/git/commit_status.go @@ -25,7 +25,6 @@ import ( "code.gitea.io/gitea/modules/translation" "xorm.io/builder" - "xorm.io/xorm" ) // CommitStatus holds a single Status of a single Commit @@ -329,7 +328,7 @@ type CommitStatusIndex struct { MaxIndex int64 `xorm:"index"` } -func makeRepoCommitQuery(ctx context.Context, repoID int64, sha string) *xorm.Session { +func makeRepoCommitQuery(ctx context.Context, repoID int64, sha string) db.Session { return db.GetEngine(ctx).Table(&CommitStatus{}). Where("repo_id = ?", repoID).And("sha = ?", sha) } @@ -337,12 +336,10 @@ func makeRepoCommitQuery(ctx context.Context, repoID int64, sha string) *xorm.Se // GetLatestCommitStatus returns all statuses with a unique context for a given commit. func GetLatestCommitStatus(ctx context.Context, repoID int64, sha string, listOptions db.ListOptions) ([]*CommitStatus, error) { indices := make([]int64, 0, 10) - sess := makeRepoCommitQuery(ctx, repoID, sha). - Select("max( `index` ) as `index`"). - GroupBy("context_hash"). - OrderBy("max( `index` ) desc") + sess := makeRepoCommitQuery(ctx, repoID, sha) + sess.Select("max( `index` ) as `index`").GroupBy("context_hash").OrderBy("max( `index` ) desc") if !listOptions.IsListAll() { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) } if err := sess.Find(&indices); err != nil { return nil, err @@ -372,7 +369,7 @@ func GetLatestCommitStatusForPairs(ctx context.Context, repoSHAs []RepoSHA) (map results := make([]result, 0, len(repoSHAs)) - getBase := func() *xorm.Session { + getBase := func() db.Session { return db.GetEngine(ctx).Table(&CommitStatus{}) } @@ -425,7 +422,7 @@ func GetLatestCommitStatusForRepoCommitIDs(ctx context.Context, repoID int64, co SHA string } - getBase := func() *xorm.Session { + getBase := func() db.Session { return db.GetEngine(ctx).Table(&CommitStatus{}).Where("repo_id = ?", repoID) } results := make([]result, 0, len(commitIDs)) diff --git a/models/issues/comment.go b/models/issues/comment.go index acfc07ff22..bb4a38a51b 100644 --- a/models/issues/comment.go +++ b/models/issues/comment.go @@ -1124,7 +1124,7 @@ func FindComments(ctx context.Context, opts *FindCommentsOptions) (CommentList, } if opts.Page > 0 { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) } // WARNING: If you change this order you will need to fix createCodeComment diff --git a/models/issues/issue.go b/models/issues/issue.go index 345b36a82f..6765defa0c 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -682,7 +682,7 @@ func (issue *Issue) BlockedByDependencies(ctx context.Context, opts db.ListOptio // sort by repo id then created date, with the issues of the same repo at the beginning of the list OrderBy("CASE WHEN issue.repo_id = ? THEN 0 ELSE issue.repo_id END, issue.created_unix DESC", issue.RepoID) if opts.Page > 0 { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) } total, err = sess.FindAndCount(&issueDeps) diff --git a/models/issues/issue_search.go b/models/issues/issue_search.go index f905e629e3..0a9d5d93d5 100644 --- a/models/issues/issue_search.go +++ b/models/issues/issue_search.go @@ -19,7 +19,6 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) const ScopeSortPrefix = "scope-" @@ -71,7 +70,7 @@ func (o *IssuesOptions) Copy(edit ...func(options *IssuesOptions)) *IssuesOption // applySorts sort an issues-related session based on the provided // sortType string -func applySorts(sess *xorm.Session, sortType string, priorityRepoID int64) { +func applySorts(sess db.Session, sortType string, priorityRepoID int64) { // Since this sortType is dynamically created, it has to be treated specially. if after, ok := strings.CutPrefix(sortType, ScopeSortPrefix); ok { scope := after @@ -129,7 +128,7 @@ func applySorts(sess *xorm.Session, sortType string, priorityRepoID int64) { } } -func applyLimit(sess *xorm.Session, opts *IssuesOptions) { +func applyLimit(sess db.Session, opts *IssuesOptions) { if opts.Paginator == nil || opts.Paginator.IsListAll() { return } @@ -141,7 +140,7 @@ func applyLimit(sess *xorm.Session, opts *IssuesOptions) { sess.Limit(opts.Paginator.PageSize, start) } -func applyLabelsCondition(sess *xorm.Session, opts *IssuesOptions) { +func applyLabelsCondition(sess db.Session, opts *IssuesOptions) { if len(opts.LabelIDs) > 0 { if opts.LabelIDs[0] == 0 { sess.Where("issue.id NOT IN (SELECT issue_id FROM issue_label)") @@ -182,7 +181,7 @@ func applyLabelsCondition(sess *xorm.Session, opts *IssuesOptions) { } } -func applyMilestoneCondition(sess *xorm.Session, opts *IssuesOptions) { +func applyMilestoneCondition(sess db.Session, opts *IssuesOptions) { if len(opts.MilestoneIDs) == 1 && opts.MilestoneIDs[0] == db.NoConditionID { sess.And("issue.milestone_id = 0") } else if len(opts.MilestoneIDs) > 0 { @@ -197,7 +196,7 @@ func applyMilestoneCondition(sess *xorm.Session, opts *IssuesOptions) { } } -func applyProjectCondition(sess *xorm.Session, opts *IssuesOptions) { +func applyProjectCondition(sess db.Session, opts *IssuesOptions) { projectIDs := util.SliceRemoveAll(opts.ProjectIDs, 0) if len(projectIDs) == 1 && projectIDs[0] == db.NoConditionID { // show those that are in no project sess.And(builder.NotIn("issue.id", builder.Select("issue_id").From("project_issue"))) @@ -211,7 +210,7 @@ func applyProjectCondition(sess *xorm.Session, opts *IssuesOptions) { // do not need to apply any condition } -func applyRepoConditions(sess *xorm.Session, opts *IssuesOptions) { +func applyRepoConditions(sess db.Session, opts *IssuesOptions) { if len(opts.RepoIDs) == 1 { opts.RepoCond = builder.Eq{"issue.repo_id": opts.RepoIDs[0]} } else if len(opts.RepoIDs) > 1 { @@ -228,7 +227,7 @@ func applyRepoConditions(sess *xorm.Session, opts *IssuesOptions) { } } -func applyConditions(sess *xorm.Session, opts *IssuesOptions) { +func applyConditions(sess db.Session, opts *IssuesOptions) { if len(opts.IssueIDs) > 0 { sess.In("issue.id", opts.IssueIDs) } @@ -362,7 +361,7 @@ func issuePullAccessibleRepoCond(repoIDstr string, userID int64, owner *user_mod return cond } -func applyAssigneeCondition(sess *xorm.Session, assigneeID string) { +func applyAssigneeCondition(sess db.Session, assigneeID string) { // old logic: 0 is also treated as "not filtering assignee", because the "assignee" was read as FormInt64 if assigneeID == "(none)" { sess.Where("issue.id NOT IN (SELECT issue_id FROM issue_assignees)") @@ -374,7 +373,7 @@ func applyAssigneeCondition(sess *xorm.Session, assigneeID string) { } } -func applyPosterCondition(sess *xorm.Session, posterID string) { +func applyPosterCondition(sess db.Session, posterID string) { // Actually every issue has a poster. // The "(none)" is for internal usage only: when doer tries to search non-existing user as poster, use "(none)" to return empty result. if posterID == "(none)" { @@ -384,13 +383,13 @@ func applyPosterCondition(sess *xorm.Session, posterID string) { } } -func applyMentionedCondition(sess *xorm.Session, mentionedID int64) { +func applyMentionedCondition(sess db.Session, mentionedID int64) { sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id"). And("issue_user.is_mentioned = ?", true). And("issue_user.uid = ?", mentionedID) } -func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64) { +func applyReviewRequestedCondition(sess db.Session, reviewRequestedID int64) { existInTeamQuery := builder.Select("team_user.team_id"). From("team_user"). Where(builder.Eq{"team_user.uid": reviewRequestedID}) @@ -415,7 +414,7 @@ func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64) And(builder.In("issue.id", subQuery)) } -func applyReviewedCondition(sess *xorm.Session, reviewedID int64) { +func applyReviewedCondition(sess db.Session, reviewedID int64) { // Query for pull requests where you are a reviewer or commenter, excluding // any pull requests already returned by the review requested filter. notPoster := builder.Neq{"issue.poster_id": reviewedID} @@ -445,7 +444,7 @@ func applyReviewedCondition(sess *xorm.Session, reviewedID int64) { sess.And(notPoster, builder.Or(reviewed, commented)) } -func applySubscribedCondition(sess *xorm.Session, subscriberID int64) { +func applySubscribedCondition(sess db.Session, subscriberID int64) { sess.And( builder. NotIn("issue.id", diff --git a/models/issues/issue_stats.go b/models/issues/issue_stats.go index ddf6613870..027f0f2bd8 100644 --- a/models/issues/issue_stats.go +++ b/models/issues/issue_stats.go @@ -10,7 +10,6 @@ import ( "code.gitea.io/gitea/models/db" "xorm.io/builder" - "xorm.io/xorm" ) // IssueStats represents issue statistic information. @@ -129,7 +128,7 @@ func getIssueStatsChunk(ctx context.Context, opts *IssuesOptions, issueIDs []int return stats, err } -func applyIssuesOptions(sess *xorm.Session, opts *IssuesOptions, issueIDs []int64) *xorm.Session { +func applyIssuesOptions(sess db.Session, opts *IssuesOptions, issueIDs []int64) db.Session { if len(opts.RepoIDs) > 1 { sess.In("issue.repo_id", opts.RepoIDs) } else if len(opts.RepoIDs) == 1 { diff --git a/models/issues/issue_watch.go b/models/issues/issue_watch.go index f384e086e5..8f8d155436 100644 --- a/models/issues/issue_watch.go +++ b/models/issues/issue_watch.go @@ -106,7 +106,7 @@ func GetIssueWatchers(ctx context.Context, issueID int64, listOptions db.ListOpt Join("INNER", "`user`", "`user`.id = `issue_watch`.user_id") if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) watches := make([]*IssueWatch, 0, listOptions.PageSize) return watches, sess.Find(&watches) } diff --git a/models/issues/label.go b/models/issues/label.go index 25d6f1303e..c120f7530b 100644 --- a/models/issues/label.go +++ b/models/issues/label.go @@ -396,7 +396,7 @@ func GetLabelsByRepoID(ctx context.Context, repoID int64, sortType string, listO } if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) } return labels, sess.Find(&labels) @@ -471,7 +471,7 @@ func GetLabelsByOrgID(ctx context.Context, orgID int64, sortType string, listOpt } if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) } return labels, sess.Find(&labels) diff --git a/models/issues/pull_list.go b/models/issues/pull_list.go index 6a6abca970..c7a2eb6c48 100644 --- a/models/issues/pull_list.go +++ b/models/issues/pull_list.go @@ -18,7 +18,6 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) // PullRequestsOptions holds the options for PRs @@ -32,7 +31,7 @@ type PullRequestsOptions struct { BaseBranch string } -func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullRequestsOptions) *xorm.Session { +func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullRequestsOptions) db.Session { sess := db.GetEngine(ctx).Where("pull_request.base_repo_id=?", baseRepoID) if opts.BaseBranch != "" { diff --git a/models/issues/reaction.go b/models/issues/reaction.go index 3b5ad6d7ab..551f8f09d7 100644 --- a/models/issues/reaction.go +++ b/models/issues/reaction.go @@ -165,7 +165,7 @@ func FindReactions(ctx context.Context, opts FindReactionsOptions) (ReactionList In("reaction.`type`", setting.UI.Reactions). Asc("reaction.issue_id", "reaction.comment_id", "reaction.created_unix", "reaction.id") if opts.Page > 0 { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) reactions := make([]*Reaction, 0, opts.PageSize) count, err := sess.FindAndCount(&reactions) diff --git a/models/issues/review_list.go b/models/issues/review_list.go index d0430cd06d..80703778a5 100644 --- a/models/issues/review_list.go +++ b/models/issues/review_list.go @@ -121,7 +121,7 @@ func FindReviews(ctx context.Context, opts FindReviewOptions) (ReviewList, error reviews := make([]*Review, 0, 10) sess := db.GetEngine(ctx).Where(opts.toCond()) if opts.Page > 0 && !opts.IsListAll() { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) } return reviews, sess. Asc("created_unix"). @@ -135,7 +135,7 @@ func FindLatestReviews(ctx context.Context, opts FindReviewOptions) (ReviewList, cond := opts.toCond() sess := db.GetEngine(ctx).Where(cond) if opts.Page > 0 { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) } sess.In("id", builder. diff --git a/models/issues/stopwatch.go b/models/issues/stopwatch.go index f119951b09..66e03479bc 100644 --- a/models/issues/stopwatch.go +++ b/models/issues/stopwatch.go @@ -77,7 +77,7 @@ func GetUserStopwatches(ctx context.Context, userID int64, listOptions db.ListOp sws := make([]*Stopwatch, 0, 8) sess := db.GetEngine(ctx).Where("stopwatch.user_id = ?", userID) if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) } err := sess.Find(&sws) diff --git a/models/issues/tracked_time.go b/models/issues/tracked_time.go index 0b5c341f1f..9df868c89a 100644 --- a/models/issues/tracked_time.go +++ b/models/issues/tracked_time.go @@ -16,7 +16,6 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) // TrackedTime represents a time that was spent for a specific issue. @@ -140,7 +139,7 @@ func (opts *FindTrackedTimesOptions) toSession(e db.Engine) db.Engine { sess = sess.Where(opts.ToConds()) if opts.Page > 0 { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) } return sess @@ -344,7 +343,7 @@ func GetIssueTotalTrackedTime(ctx context.Context, opts *IssuesOptions, isClosed } func getIssueTotalTrackedTimeChunk(ctx context.Context, opts *IssuesOptions, isClosed optional.Option[bool], issueIDs []int64) (int64, error) { - sumSession := func(opts *IssuesOptions, issueIDs []int64) *xorm.Session { + sumSession := func(opts *IssuesOptions, issueIDs []int64) db.Session { sess := db.GetEngine(ctx). Table("tracked_time"). Where("tracked_time.deleted = ?", false). @@ -359,7 +358,7 @@ func getIssueTotalTrackedTimeChunk(ctx context.Context, opts *IssuesOptions, isC session := sumSession(opts, issueIDs) if isClosed.Has() { - session = session.And("issue.is_closed = ?", isClosed.Value()) + session.And("issue.is_closed = ?", isClosed.Value()) } return session.SumInt(new(trackedTime), "tracked_time.time") } diff --git a/models/migrations/base/db.go b/models/migrations/base/db.go index 16048c2073..ae33daf1af 100644 --- a/models/migrations/base/db.go +++ b/models/migrations/base/db.go @@ -11,17 +11,17 @@ import ( "regexp" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) // RecreateTables will recreate the tables for the provided beans using the newly provided bean definition and move all data to that new table // WARNING: YOU MUST PROVIDE THE FULL BEAN DEFINITION -func RecreateTables(beans ...any) func(*xorm.Engine) error { - return func(x *xorm.Engine) error { +func RecreateTables(beans ...any) func(db.EngineMigration) error { + return func(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { @@ -41,7 +41,7 @@ func RecreateTables(beans ...any) func(*xorm.Engine) error { // RecreateTable will recreate the table using the newly provided bean definition and move all data to that new table // WARNING: YOU MUST PROVIDE THE FULL BEAN DEFINITION // WARNING: YOU MUST COMMIT THE SESSION AT THE END -func RecreateTable(sess *xorm.Session, bean any) error { +func RecreateTable(sess db.Session, bean any) error { // TODO: This will not work if there are foreign keys tableName := sess.Engine().TableName(bean) @@ -304,7 +304,7 @@ func RecreateTable(sess *xorm.Session, bean any) error { } // WARNING: YOU MUST COMMIT THE SESSION AT THE END -func DropTableColumns(sess *xorm.Session, tableName string, columnNames ...string) (err error) { +func DropTableColumns(sess db.Session, tableName string, columnNames ...string) (err error) { if tableName == "" || len(columnNames) == 0 { return nil } @@ -474,7 +474,7 @@ func DropTableColumns(sess *xorm.Session, tableName string, columnNames ...strin } // ModifyColumn will modify column's type or other property. SQLITE is not supported -func ModifyColumn(x *xorm.Engine, tableName string, col *schemas.Column) error { +func ModifyColumn(x db.EngineMigration, tableName string, col *schemas.Column) error { var indexes map[string]*schemas.Index var err error // MSSQL have to remove index at first, otherwise alter column will fail diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 65a950fc9c..2040b105bd 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/v1_10" "code.gitea.io/gitea/models/migrations/v1_11" "code.gitea.io/gitea/models/migrations/v1_12" @@ -35,7 +36,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "xorm.io/xorm" "xorm.io/xorm/names" ) @@ -44,23 +44,23 @@ const minDBVersion = 70 // Gitea 1.5.3 type migration struct { idNumber int64 // DB version is "the last migration's idNumber" + 1 description string - migrate func(context.Context, *xorm.Engine) error + migrate func(context.Context, db.EngineMigration) error } // newMigration creates a new migration -func newMigration[T func(*xorm.Engine) error | func(context.Context, *xorm.Engine) error](idNumber int64, desc string, fn T) *migration { +func newMigration[T func(db.EngineMigration) error | func(context.Context, db.EngineMigration) error](idNumber int64, desc string, fn T) *migration { m := &migration{idNumber: idNumber, description: desc} var ok bool - if m.migrate, ok = any(fn).(func(context.Context, *xorm.Engine) error); !ok { - m.migrate = func(ctx context.Context, x *xorm.Engine) error { - return any(fn).(func(*xorm.Engine) error)(x) + if m.migrate, ok = any(fn).(func(context.Context, db.EngineMigration) error); !ok { + m.migrate = func(ctx context.Context, x db.EngineMigration) error { + return any(fn).(func(db.EngineMigration) error)(x) } } return m } // Migrate executes the migration -func (m *migration) Migrate(ctx context.Context, x *xorm.Engine) error { +func (m *migration) Migrate(ctx context.Context, x db.EngineMigration) error { return m.migrate(ctx, x) } @@ -71,7 +71,7 @@ type Version struct { } // Use noopMigration when there is a migration that has been no-oped -var noopMigration = func(_ *xorm.Engine) error { return nil } +var noopMigration = func(_ db.EngineMigration) error { return nil } var preparedMigrations []*migration @@ -417,7 +417,7 @@ func prepareMigrationTasks() []*migration { } // GetCurrentDBVersion returns the current db version -func GetCurrentDBVersion(x *xorm.Engine) (int64, error) { +func GetCurrentDBVersion(x db.EngineMigration) (int64, error) { if err := x.Sync(new(Version)); err != nil { return -1, fmt.Errorf("sync: %w", err) } @@ -450,7 +450,7 @@ func ExpectedDBVersion() int64 { } // EnsureUpToDate will check if the db is at the correct version -func EnsureUpToDate(ctx context.Context, x *xorm.Engine) error { +func EnsureUpToDate(ctx context.Context, x db.EngineMigration) error { currentDB, err := GetCurrentDBVersion(x) if err != nil { return err @@ -482,7 +482,7 @@ func migrationIDNumberToDBVersion(idNumber int64) int64 { } // Migrate database to current version -func Migrate(ctx context.Context, x *xorm.Engine) error { +func Migrate(ctx context.Context, x db.EngineMigration) error { migrations := prepareMigrationTasks() maxDBVer := calcDBVersion(migrations) @@ -501,7 +501,7 @@ func Migrate(ctx context.Context, x *xorm.Engine) error { // XORM model framework will create all tables when initializing. currentVersion.ID = 0 currentVersion.Version = maxDBVer - if _, err = x.InsertOne(currentVersion); err != nil { + if _, err = x.Insert(currentVersion); err != nil { return fmt.Errorf("insert: %w", err) } } diff --git a/models/migrations/migrationtest/tests.go b/models/migrations/migrationtest/tests.go index e0f7d04bb0..be2557a902 100644 --- a/models/migrations/migrationtest/tests.go +++ b/models/migrations/migrationtest/tests.go @@ -16,7 +16,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -24,7 +23,7 @@ import ( // Provide models to be sync'd with the database - in particular any models you expect fixtures to be loaded from. // // fixtures in `models/migrations/fixtures/` will be loaded automatically -func PrepareTestEnv(t *testing.T, skip int, syncModels ...any) (*xorm.Engine, func()) { +func PrepareTestEnv(t *testing.T, skip int, syncModels ...any) (db.EngineMigration, func()) { t.Helper() ourSkip := 2 ourSkip += skip @@ -89,7 +88,7 @@ func PrepareTestEnv(t *testing.T, skip int, syncModels ...any) (*xorm.Engine, fu return x, deferFn } -func LoadTableSchemasMap(t *testing.T, x *xorm.Engine) map[string]*schemas.Table { +func LoadTableSchemasMap(t *testing.T, x db.EngineMigration) map[string]*schemas.Table { tables, err := x.DBMetas() require.NoError(t, err) tableMap := make(map[string]*schemas.Table) diff --git a/models/migrations/v1_10/v100.go b/models/migrations/v1_10/v100.go index 1742bea296..db581ca175 100644 --- a/models/migrations/v1_10/v100.go +++ b/models/migrations/v1_10/v100.go @@ -8,10 +8,10 @@ import ( "strings" "time" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func UpdateMigrationServiceTypes(x *xorm.Engine) error { +func UpdateMigrationServiceTypes(x db.EngineMigration) error { type Repository struct { ID int64 OriginalServiceType int `xorm:"index default(0)"` diff --git a/models/migrations/v1_10/v101.go b/models/migrations/v1_10/v101.go index 6c8dfe2486..221d151ff6 100644 --- a/models/migrations/v1_10/v101.go +++ b/models/migrations/v1_10/v101.go @@ -3,11 +3,9 @@ package v1_10 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func ChangeSomeColumnsLengthOfExternalLoginUser(x *xorm.Engine) error { +func ChangeSomeColumnsLengthOfExternalLoginUser(x db.EngineMigration) error { type ExternalLoginUser struct { AccessToken string `xorm:"TEXT"` AccessTokenSecret string `xorm:"TEXT"` diff --git a/models/migrations/v1_10/v88.go b/models/migrations/v1_10/v88.go index eb8e81c19e..ae129d8e66 100644 --- a/models/migrations/v1_10/v88.go +++ b/models/migrations/v1_10/v88.go @@ -7,14 +7,14 @@ import ( "crypto/sha1" "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) func hashContext(context string) string { return fmt.Sprintf("%x", sha1.Sum([]byte(context))) } -func AddCommitStatusContext(x *xorm.Engine) error { +func AddCommitStatusContext(x db.EngineMigration) error { type CommitStatus struct { ID int64 `xorm:"pk autoincr"` ContextHash string `xorm:"char(40) index"` diff --git a/models/migrations/v1_10/v89.go b/models/migrations/v1_10/v89.go index 0df2a6e17b..0f9f5a01ea 100644 --- a/models/migrations/v1_10/v89.go +++ b/models/migrations/v1_10/v89.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddOriginalMigrationInfo(x *xorm.Engine) error { +func AddOriginalMigrationInfo(x db.EngineMigration) error { // Issue see models/issue.go type Issue struct { OriginalAuthor string diff --git a/models/migrations/v1_10/v90.go b/models/migrations/v1_10/v90.go index 5521a97e32..b8003ea5e0 100644 --- a/models/migrations/v1_10/v90.go +++ b/models/migrations/v1_10/v90.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func ChangeSomeColumnsLengthOfRepo(x *xorm.Engine) error { +func ChangeSomeColumnsLengthOfRepo(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` Description string `xorm:"TEXT"` diff --git a/models/migrations/v1_10/v91.go b/models/migrations/v1_10/v91.go index 08db6c2742..825c0cf336 100644 --- a/models/migrations/v1_10/v91.go +++ b/models/migrations/v1_10/v91.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddIndexOnRepositoryAndComment(x *xorm.Engine) error { +func AddIndexOnRepositoryAndComment(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"index"` diff --git a/models/migrations/v1_10/v92.go b/models/migrations/v1_10/v92.go index b6c04a9234..7fb6d209f1 100644 --- a/models/migrations/v1_10/v92.go +++ b/models/migrations/v1_10/v92.go @@ -4,11 +4,12 @@ package v1_10 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/builder" - "xorm.io/xorm" ) -func RemoveLingeringIndexStatus(x *xorm.Engine) error { +func RemoveLingeringIndexStatus(x db.EngineMigration) error { _, err := x.Exec(builder.Delete(builder.NotIn("`repo_id`", builder.Select("`id`").From("`repository`"))).From("`repo_indexer_status`")) return err } diff --git a/models/migrations/v1_10/v93.go b/models/migrations/v1_10/v93.go index c131be9a8d..5803722c70 100644 --- a/models/migrations/v1_10/v93.go +++ b/models/migrations/v1_10/v93.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddEmailNotificationEnabledToUser(x *xorm.Engine) error { +func AddEmailNotificationEnabledToUser(x db.EngineMigration) error { // User see models/user.go type User struct { EmailNotificationsPreference string `xorm:"VARCHAR(20) NOT NULL DEFAULT 'enabled'"` diff --git a/models/migrations/v1_10/v94.go b/models/migrations/v1_10/v94.go index 13b7d7b303..df2d016fe0 100644 --- a/models/migrations/v1_10/v94.go +++ b/models/migrations/v1_10/v94.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddStatusCheckColumnsForProtectedBranches(x *xorm.Engine) error { +func AddStatusCheckColumnsForProtectedBranches(x db.EngineMigration) error { type ProtectedBranch struct { EnableStatusCheck bool `xorm:"NOT NULL DEFAULT false"` StatusCheckContexts []string `xorm:"JSON TEXT"` diff --git a/models/migrations/v1_10/v95.go b/models/migrations/v1_10/v95.go index 86b52026bf..2c8bc75e91 100644 --- a/models/migrations/v1_10/v95.go +++ b/models/migrations/v1_10/v95.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddCrossReferenceColumns(x *xorm.Engine) error { +func AddCrossReferenceColumns(x db.EngineMigration) error { // Comment see models/comment.go type Comment struct { RefRepoID int64 `xorm:"index"` diff --git a/models/migrations/v1_10/v96.go b/models/migrations/v1_10/v96.go index ca35a169c4..9950f30dec 100644 --- a/models/migrations/v1_10/v96.go +++ b/models/migrations/v1_10/v96.go @@ -6,13 +6,12 @@ package v1_10 import ( "path/filepath" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - - "xorm.io/xorm" ) -func DeleteOrphanedAttachments(x *xorm.Engine) error { +func DeleteOrphanedAttachments(x db.EngineMigration) error { type Attachment struct { ID int64 `xorm:"pk autoincr"` UUID string `xorm:"uuid UNIQUE"` diff --git a/models/migrations/v1_10/v97.go b/models/migrations/v1_10/v97.go index 5872bb63e5..6ccac1299f 100644 --- a/models/migrations/v1_10/v97.go +++ b/models/migrations/v1_10/v97.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddRepoAdminChangeTeamAccessColumnForUser(x *xorm.Engine) error { +func AddRepoAdminChangeTeamAccessColumnForUser(x db.EngineMigration) error { type User struct { RepoAdminChangeTeamAccess bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_10/v98.go b/models/migrations/v1_10/v98.go index d21c326459..427c8da534 100644 --- a/models/migrations/v1_10/v98.go +++ b/models/migrations/v1_10/v98.go @@ -3,9 +3,9 @@ package v1_10 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddOriginalAuthorOnMigratedReleases(x *xorm.Engine) error { +func AddOriginalAuthorOnMigratedReleases(x db.EngineMigration) error { type Release struct { ID int64 OriginalAuthor string diff --git a/models/migrations/v1_10/v99.go b/models/migrations/v1_10/v99.go index 223c188057..e0b14f90f6 100644 --- a/models/migrations/v1_10/v99.go +++ b/models/migrations/v1_10/v99.go @@ -4,12 +4,11 @@ package v1_10 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddTaskTable(x *xorm.Engine) error { +func AddTaskTable(x db.EngineMigration) error { // TaskType defines task type type TaskType int diff --git a/models/migrations/v1_11/v102.go b/models/migrations/v1_11/v102.go index e52290afb0..b66943a10c 100644 --- a/models/migrations/v1_11/v102.go +++ b/models/migrations/v1_11/v102.go @@ -4,12 +4,11 @@ package v1_11 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func DropColumnHeadUserNameOnPullRequest(x *xorm.Engine) error { +func DropColumnHeadUserNameOnPullRequest(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_11/v103.go b/models/migrations/v1_11/v103.go index a515710160..d9beed9c28 100644 --- a/models/migrations/v1_11/v103.go +++ b/models/migrations/v1_11/v103.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddWhitelistDeployKeysToBranches(x *xorm.Engine) error { +func AddWhitelistDeployKeysToBranches(x db.EngineMigration) error { type ProtectedBranch struct { ID int64 WhitelistDeployKeys bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_11/v104.go b/models/migrations/v1_11/v104.go index 3b0d3c64b2..19ba7d56b3 100644 --- a/models/migrations/v1_11/v104.go +++ b/models/migrations/v1_11/v104.go @@ -4,12 +4,11 @@ package v1_11 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func RemoveLabelUneededCols(x *xorm.Engine) error { +func RemoveLabelUneededCols(x db.EngineMigration) error { // Make sure the columns exist before dropping them type Label struct { QueryString string diff --git a/models/migrations/v1_11/v105.go b/models/migrations/v1_11/v105.go index d86973a0f6..93c96bb098 100644 --- a/models/migrations/v1_11/v105.go +++ b/models/migrations/v1_11/v105.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddTeamIncludesAllRepositories(x *xorm.Engine) error { +func AddTeamIncludesAllRepositories(x db.EngineMigration) error { type Team struct { ID int64 `xorm:"pk autoincr"` IncludesAllRepositories bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_11/v106.go b/models/migrations/v1_11/v106.go index edffe18683..61f5be6c41 100644 --- a/models/migrations/v1_11/v106.go +++ b/models/migrations/v1_11/v106.go @@ -3,9 +3,7 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" // RepoWatchMode specifies what kind of watch the user has on a repository type RepoWatchMode int8 @@ -16,7 +14,7 @@ type Watch struct { Mode RepoWatchMode `xorm:"SMALLINT NOT NULL DEFAULT 1"` } -func AddModeColumnToWatch(x *xorm.Engine) error { +func AddModeColumnToWatch(x db.EngineMigration) error { if err := x.Sync(new(Watch)); err != nil { return err } diff --git a/models/migrations/v1_11/v107.go b/models/migrations/v1_11/v107.go index a158e3bb50..7bdd401d16 100644 --- a/models/migrations/v1_11/v107.go +++ b/models/migrations/v1_11/v107.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddTemplateToRepo(x *xorm.Engine) error { +func AddTemplateToRepo(x db.EngineMigration) error { type Repository struct { IsTemplate bool `xorm:"INDEX NOT NULL DEFAULT false"` TemplateID int64 `xorm:"INDEX"` diff --git a/models/migrations/v1_11/v108.go b/models/migrations/v1_11/v108.go index 8f14504ceb..816206d992 100644 --- a/models/migrations/v1_11/v108.go +++ b/models/migrations/v1_11/v108.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddCommentIDOnNotification(x *xorm.Engine) error { +func AddCommentIDOnNotification(x db.EngineMigration) error { type Notification struct { ID int64 `xorm:"pk autoincr"` CommentID int64 diff --git a/models/migrations/v1_11/v109.go b/models/migrations/v1_11/v109.go index f7616aec7b..8a30905ace 100644 --- a/models/migrations/v1_11/v109.go +++ b/models/migrations/v1_11/v109.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddCanCreateOrgRepoColumnForTeam(x *xorm.Engine) error { +func AddCanCreateOrgRepoColumnForTeam(x db.EngineMigration) error { type Team struct { CanCreateOrgRepo bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_11/v110.go b/models/migrations/v1_11/v110.go index 512f728c03..6f2c63018f 100644 --- a/models/migrations/v1_11/v110.go +++ b/models/migrations/v1_11/v110.go @@ -4,11 +4,12 @@ package v1_11 import ( - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm/schemas" ) -func ChangeReviewContentToText(x *xorm.Engine) error { +func ChangeReviewContentToText(x db.EngineMigration) error { switch x.Dialect().URI().DBType { case schemas.MYSQL: _, err := x.Exec("ALTER TABLE review MODIFY COLUMN content TEXT") diff --git a/models/migrations/v1_11/v111.go b/models/migrations/v1_11/v111.go index 2634906565..f2e6e7b74c 100644 --- a/models/migrations/v1_11/v111.go +++ b/models/migrations/v1_11/v111.go @@ -7,10 +7,10 @@ import ( "fmt" "slices" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error { +func AddBranchProtectionCanPushAndEnableWhitelist(x db.EngineMigration) error { type ProtectedBranch struct { CanPush bool `xorm:"NOT NULL DEFAULT false"` EnableApprovalsWhitelist bool `xorm:"NOT NULL DEFAULT false"` @@ -132,7 +132,7 @@ func AddBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error { } // getUserRepoPermission static function based on issues_model.IsOfficialReviewer at 5d78792385 - getUserRepoPermission := func(sess *xorm.Session, repo *Repository, user *User) (Permission, error) { + getUserRepoPermission := func(sess db.Session, repo *Repository, user *User) (Permission, error) { var perm Permission repoOwner := new(User) @@ -305,7 +305,7 @@ func AddBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error { } // isOfficialReviewer static function based on 5d78792385 - isOfficialReviewer := func(sess *xorm.Session, issueID int64, reviewer *User) (bool, error) { + isOfficialReviewer := func(sess db.Session, issueID int64, reviewer *User) (bool, error) { pr := new(PullRequest) has, err := sess.ID(issueID).Get(pr) if err != nil { diff --git a/models/migrations/v1_11/v112.go b/models/migrations/v1_11/v112.go index fe45cf9222..1c6e72be99 100644 --- a/models/migrations/v1_11/v112.go +++ b/models/migrations/v1_11/v112.go @@ -6,15 +6,15 @@ package v1_11 import ( "path/filepath" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) -func RemoveAttachmentMissedRepo(x *xorm.Engine) error { +func RemoveAttachmentMissedRepo(x db.EngineMigration) error { type Attachment struct { UUID string `xorm:"uuid"` } diff --git a/models/migrations/v1_11/v113.go b/models/migrations/v1_11/v113.go index a4d54f66fb..1a3584be8e 100644 --- a/models/migrations/v1_11/v113.go +++ b/models/migrations/v1_11/v113.go @@ -6,10 +6,10 @@ package v1_11 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func FeatureChangeTargetBranch(x *xorm.Engine) error { +func FeatureChangeTargetBranch(x db.EngineMigration) error { type Comment struct { OldRef string NewRef string diff --git a/models/migrations/v1_11/v114.go b/models/migrations/v1_11/v114.go index 9467a8a90c..021e28b437 100644 --- a/models/migrations/v1_11/v114.go +++ b/models/migrations/v1_11/v114.go @@ -6,10 +6,10 @@ package v1_11 import ( "net/url" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func SanitizeOriginalURL(x *xorm.Engine) error { +func SanitizeOriginalURL(x db.EngineMigration) error { type Repository struct { ID int64 OriginalURL string `xorm:"VARCHAR(2048)"` diff --git a/models/migrations/v1_11/v115.go b/models/migrations/v1_11/v115.go index 5933c0520f..6c13d89b6b 100644 --- a/models/migrations/v1_11/v115.go +++ b/models/migrations/v1_11/v115.go @@ -12,15 +12,14 @@ import ( "path/filepath" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/container" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - - "xorm.io/xorm" ) -func RenameExistingUserAvatarName(x *xorm.Engine) error { +func RenameExistingUserAvatarName(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_11/v116.go b/models/migrations/v1_11/v116.go index 729fbad18b..19a40ede9d 100644 --- a/models/migrations/v1_11/v116.go +++ b/models/migrations/v1_11/v116.go @@ -3,11 +3,9 @@ package v1_11 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func ExtendTrackedTimes(x *xorm.Engine) error { +func ExtendTrackedTimes(x db.EngineMigration) error { type TrackedTime struct { Time int64 `xorm:"NOT NULL"` Deleted bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_12/v117.go b/models/migrations/v1_12/v117.go index 73b58ca34b..b9d240226e 100644 --- a/models/migrations/v1_12/v117.go +++ b/models/migrations/v1_12/v117.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddBlockOnRejectedReviews(x *xorm.Engine) error { +func AddBlockOnRejectedReviews(x db.EngineMigration) error { type ProtectedBranch struct { BlockOnRejectedReviews bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_12/v118.go b/models/migrations/v1_12/v118.go index e8b4249743..756b112d00 100644 --- a/models/migrations/v1_12/v118.go +++ b/models/migrations/v1_12/v118.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddReviewCommitAndStale(x *xorm.Engine) error { +func AddReviewCommitAndStale(x db.EngineMigration) error { type Review struct { CommitID string `xorm:"VARCHAR(40)"` Stale bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_12/v119.go b/models/migrations/v1_12/v119.go index b4bf29a935..dfbee84d82 100644 --- a/models/migrations/v1_12/v119.go +++ b/models/migrations/v1_12/v119.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func FixMigratedRepositoryServiceType(x *xorm.Engine) error { +func FixMigratedRepositoryServiceType(x db.EngineMigration) error { // structs.GithubService: // GithubService = 2 _, err := x.Exec("UPDATE repository SET original_service_type = ? WHERE original_url LIKE 'https://github.com/%'", 2) diff --git a/models/migrations/v1_12/v120.go b/models/migrations/v1_12/v120.go index 14d515f5a7..abec02d313 100644 --- a/models/migrations/v1_12/v120.go +++ b/models/migrations/v1_12/v120.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddOwnerNameOnRepository(x *xorm.Engine) error { +func AddOwnerNameOnRepository(x db.EngineMigration) error { type Repository struct { OwnerName string } diff --git a/models/migrations/v1_12/v121.go b/models/migrations/v1_12/v121.go index a28ae4e1c9..4036795fcb 100644 --- a/models/migrations/v1_12/v121.go +++ b/models/migrations/v1_12/v121.go @@ -3,9 +3,9 @@ package v1_12 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddIsRestricted(x *xorm.Engine) error { +func AddIsRestricted(x db.EngineMigration) error { // User see models/user.go type User struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_12/v122.go b/models/migrations/v1_12/v122.go index bc1b175f6a..5982dd5662 100644 --- a/models/migrations/v1_12/v122.go +++ b/models/migrations/v1_12/v122.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddRequireSignedCommits(x *xorm.Engine) error { +func AddRequireSignedCommits(x db.EngineMigration) error { type ProtectedBranch struct { RequireSignedCommits bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_12/v123.go b/models/migrations/v1_12/v123.go index 52b10bb850..3550b710a7 100644 --- a/models/migrations/v1_12/v123.go +++ b/models/migrations/v1_12/v123.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddReactionOriginals(x *xorm.Engine) error { +func AddReactionOriginals(x db.EngineMigration) error { type Reaction struct { OriginalAuthorID int64 `xorm:"INDEX NOT NULL DEFAULT(0)"` OriginalAuthor string diff --git a/models/migrations/v1_12/v124.go b/models/migrations/v1_12/v124.go index 9a93f436d4..d124918f09 100644 --- a/models/migrations/v1_12/v124.go +++ b/models/migrations/v1_12/v124.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddUserRepoMissingColumns(x *xorm.Engine) error { +func AddUserRepoMissingColumns(x db.EngineMigration) error { type VisibleType int type User struct { PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"` diff --git a/models/migrations/v1_12/v125.go b/models/migrations/v1_12/v125.go index 7f582ecff5..ce94711599 100644 --- a/models/migrations/v1_12/v125.go +++ b/models/migrations/v1_12/v125.go @@ -6,10 +6,10 @@ package v1_12 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddReviewMigrateInfo(x *xorm.Engine) error { +func AddReviewMigrateInfo(x db.EngineMigration) error { type Review struct { OriginalAuthor string OriginalAuthorID int64 diff --git a/models/migrations/v1_12/v126.go b/models/migrations/v1_12/v126.go index 64fd7f7478..41f816353a 100644 --- a/models/migrations/v1_12/v126.go +++ b/models/migrations/v1_12/v126.go @@ -4,11 +4,12 @@ package v1_12 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/builder" - "xorm.io/xorm" ) -func FixTopicRepositoryCount(x *xorm.Engine) error { +func FixTopicRepositoryCount(x db.EngineMigration) error { _, err := x.Exec(builder.Delete(builder.NotIn("`repo_id`", builder.Select("`id`").From("`repository`"))).From("`repo_topic`")) if err != nil { return err diff --git a/models/migrations/v1_12/v127.go b/models/migrations/v1_12/v127.go index 9bd78db95e..82b2db2eb5 100644 --- a/models/migrations/v1_12/v127.go +++ b/models/migrations/v1_12/v127.go @@ -6,12 +6,11 @@ package v1_12 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddLanguageStats(x *xorm.Engine) error { +func AddLanguageStats(x db.EngineMigration) error { // LanguageStat see models/repo_language_stats.go type LanguageStat struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_12/v128.go b/models/migrations/v1_12/v128.go index ff5b12af18..7f337db8bc 100644 --- a/models/migrations/v1_12/v128.go +++ b/models/migrations/v1_12/v128.go @@ -11,15 +11,14 @@ import ( "strings" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/git/gitcmd" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func FixMergeBase(ctx context.Context, x *xorm.Engine) error { +func FixMergeBase(ctx context.Context, x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) index"` diff --git a/models/migrations/v1_12/v129.go b/models/migrations/v1_12/v129.go index 3e4d3aca68..90666e5f6f 100644 --- a/models/migrations/v1_12/v129.go +++ b/models/migrations/v1_12/v129.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func PurgeUnusedDependencies(x *xorm.Engine) error { +func PurgeUnusedDependencies(x db.EngineMigration) error { if _, err := x.Exec("DELETE FROM issue_dependency WHERE issue_id NOT IN (SELECT id FROM issue)"); err != nil { return err } diff --git a/models/migrations/v1_12/v130.go b/models/migrations/v1_12/v130.go index 107bb756fd..5245df0fe5 100644 --- a/models/migrations/v1_12/v130.go +++ b/models/migrations/v1_12/v130.go @@ -4,13 +4,12 @@ package v1_12 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func ExpandWebhooks(x *xorm.Engine) error { +func ExpandWebhooks(x db.EngineMigration) error { type HookEvents struct { Create bool `json:"create"` Delete bool `json:"delete"` diff --git a/models/migrations/v1_12/v131.go b/models/migrations/v1_12/v131.go index 1266c2f185..cb7d4f01a6 100644 --- a/models/migrations/v1_12/v131.go +++ b/models/migrations/v1_12/v131.go @@ -6,10 +6,10 @@ package v1_12 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddSystemWebhookColumn(x *xorm.Engine) error { +func AddSystemWebhookColumn(x db.EngineMigration) error { type Webhook struct { IsSystemWebhook bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_12/v132.go b/models/migrations/v1_12/v132.go index 8b1ae6db93..2649fd6457 100644 --- a/models/migrations/v1_12/v132.go +++ b/models/migrations/v1_12/v132.go @@ -6,10 +6,10 @@ package v1_12 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddBranchProtectionProtectedFilesColumn(x *xorm.Engine) error { +func AddBranchProtectionProtectedFilesColumn(x db.EngineMigration) error { type ProtectedBranch struct { ProtectedFilePatterns string `xorm:"TEXT"` } diff --git a/models/migrations/v1_12/v133.go b/models/migrations/v1_12/v133.go index 69e20597d8..8b7e17cd59 100644 --- a/models/migrations/v1_12/v133.go +++ b/models/migrations/v1_12/v133.go @@ -3,9 +3,9 @@ package v1_12 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddEmailHashTable(x *xorm.Engine) error { +func AddEmailHashTable(x db.EngineMigration) error { // EmailHash represents a pre-generated hash map type EmailHash struct { Hash string `xorm:"pk varchar(32)"` diff --git a/models/migrations/v1_12/v134.go b/models/migrations/v1_12/v134.go index 98bb8dbda7..e804fd6c8d 100644 --- a/models/migrations/v1_12/v134.go +++ b/models/migrations/v1_12/v134.go @@ -11,14 +11,13 @@ import ( "strings" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/git/gitcmd" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func RefixMergeBase(ctx context.Context, x *xorm.Engine) error { +func RefixMergeBase(ctx context.Context, x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) index"` diff --git a/models/migrations/v1_12/v135.go b/models/migrations/v1_12/v135.go index 5df0ad7fc4..e9a0bc7c0b 100644 --- a/models/migrations/v1_12/v135.go +++ b/models/migrations/v1_12/v135.go @@ -6,10 +6,10 @@ package v1_12 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddOrgIDLabelColumn(x *xorm.Engine) error { +func AddOrgIDLabelColumn(x db.EngineMigration) error { type Label struct { OrgID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_12/v136.go b/models/migrations/v1_12/v136.go index 20b892b6cc..7ab2dba978 100644 --- a/models/migrations/v1_12/v136.go +++ b/models/migrations/v1_12/v136.go @@ -8,16 +8,15 @@ import ( "math" "time" + "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/gitrepo" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AddCommitDivergenceToPulls(x *xorm.Engine) error { +func AddCommitDivergenceToPulls(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) index"` diff --git a/models/migrations/v1_12/v137.go b/models/migrations/v1_12/v137.go index 9d38483488..0d80b1e575 100644 --- a/models/migrations/v1_12/v137.go +++ b/models/migrations/v1_12/v137.go @@ -3,11 +3,9 @@ package v1_12 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddBlockOnOutdatedBranch(x *xorm.Engine) error { +func AddBlockOnOutdatedBranch(x db.EngineMigration) error { type ProtectedBranch struct { BlockOnOutdatedBranch bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_12/v138.go b/models/migrations/v1_12/v138.go index 4485adeb2d..33cb5851dc 100644 --- a/models/migrations/v1_12/v138.go +++ b/models/migrations/v1_12/v138.go @@ -6,10 +6,10 @@ package v1_12 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddResolveDoerIDCommentColumn(x *xorm.Engine) error { +func AddResolveDoerIDCommentColumn(x db.EngineMigration) error { type Comment struct { ResolveDoerID int64 } diff --git a/models/migrations/v1_12/v139.go b/models/migrations/v1_12/v139.go index a3799841ac..d0f35dcc45 100644 --- a/models/migrations/v1_12/v139.go +++ b/models/migrations/v1_12/v139.go @@ -4,12 +4,11 @@ package v1_12 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func PrependRefsHeadsToIssueRefs(x *xorm.Engine) error { +func PrependRefsHeadsToIssueRefs(x db.EngineMigration) error { var query string switch { diff --git a/models/migrations/v1_13/v140.go b/models/migrations/v1_13/v140.go index a9a047bca9..53057048ca 100644 --- a/models/migrations/v1_13/v140.go +++ b/models/migrations/v1_13/v140.go @@ -6,13 +6,12 @@ package v1_13 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func FixLanguageStatsToSaveSize(x *xorm.Engine) error { +func FixLanguageStatsToSaveSize(x db.EngineMigration) error { // LanguageStat see models/repo_language_stats.go type LanguageStat struct { Size int64 `xorm:"NOT NULL DEFAULT 0"` diff --git a/models/migrations/v1_13/v141.go b/models/migrations/v1_13/v141.go index b54bc1727c..c1a935b16d 100644 --- a/models/migrations/v1_13/v141.go +++ b/models/migrations/v1_13/v141.go @@ -6,10 +6,10 @@ package v1_13 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddKeepActivityPrivateUserColumn(x *xorm.Engine) error { +func AddKeepActivityPrivateUserColumn(x db.EngineMigration) error { type User struct { KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_13/v142.go b/models/migrations/v1_13/v142.go index d08a0ae0bf..5207960aec 100644 --- a/models/migrations/v1_13/v142.go +++ b/models/migrations/v1_13/v142.go @@ -4,13 +4,13 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "xorm.io/builder" - "xorm.io/xorm" ) -func SetIsArchivedToFalse(x *xorm.Engine) error { +func SetIsArchivedToFalse(x db.EngineMigration) error { type Repository struct { IsArchived bool `xorm:"INDEX"` } diff --git a/models/migrations/v1_13/v143.go b/models/migrations/v1_13/v143.go index b9a856ed0f..84e68c304d 100644 --- a/models/migrations/v1_13/v143.go +++ b/models/migrations/v1_13/v143.go @@ -4,12 +4,11 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) -func RecalculateStars(x *xorm.Engine) (err error) { +func RecalculateStars(x db.EngineMigration) (err error) { // because of issue https://github.com/go-gitea/gitea/issues/11949, // recalculate Stars number for all users to fully fix it. diff --git a/models/migrations/v1_13/v144.go b/models/migrations/v1_13/v144.go index 9352d78bc8..4e85694f6f 100644 --- a/models/migrations/v1_13/v144.go +++ b/models/migrations/v1_13/v144.go @@ -4,13 +4,13 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "xorm.io/builder" - "xorm.io/xorm" ) -func UpdateMatrixWebhookHTTPMethod(x *xorm.Engine) error { +func UpdateMatrixWebhookHTTPMethod(x db.EngineMigration) error { matrixHookTaskType := 9 // value comes from the models package type Webhook struct { HTTPMethod string diff --git a/models/migrations/v1_13/v145.go b/models/migrations/v1_13/v145.go index 86ebb4f9d9..0bca23fc76 100644 --- a/models/migrations/v1_13/v145.go +++ b/models/migrations/v1_13/v145.go @@ -6,12 +6,11 @@ package v1_13 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func IncreaseLanguageField(x *xorm.Engine) error { +func IncreaseLanguageField(x db.EngineMigration) error { type LanguageStat struct { RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` Language string `xorm:"VARCHAR(50) UNIQUE(s) INDEX NOT NULL"` diff --git a/models/migrations/v1_13/v146.go b/models/migrations/v1_13/v146.go index 355c772c26..29ee1025b3 100644 --- a/models/migrations/v1_13/v146.go +++ b/models/migrations/v1_13/v146.go @@ -4,12 +4,11 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddProjectsInfo(x *xorm.Engine) error { +func AddProjectsInfo(x db.EngineMigration) error { // Create new tables type ( ProjectType uint8 diff --git a/models/migrations/v1_13/v147.go b/models/migrations/v1_13/v147.go index 0059c06220..af755c10a5 100644 --- a/models/migrations/v1_13/v147.go +++ b/models/migrations/v1_13/v147.go @@ -4,12 +4,11 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateReviewsForCodeComments(x *xorm.Engine) error { +func CreateReviewsForCodeComments(x db.EngineMigration) error { // Review type Review struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_13/v148.go b/models/migrations/v1_13/v148.go index d276db3d61..e54f5c4ba5 100644 --- a/models/migrations/v1_13/v148.go +++ b/models/migrations/v1_13/v148.go @@ -3,11 +3,9 @@ package v1_13 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func PurgeInvalidDependenciesComments(x *xorm.Engine) error { +func PurgeInvalidDependenciesComments(x db.EngineMigration) error { _, err := x.Exec("DELETE FROM comment WHERE dependent_issue_id != 0 AND dependent_issue_id NOT IN (SELECT id FROM issue)") return err } diff --git a/models/migrations/v1_13/v149.go b/models/migrations/v1_13/v149.go index a96b8e5ac7..c3fcf85b32 100644 --- a/models/migrations/v1_13/v149.go +++ b/models/migrations/v1_13/v149.go @@ -6,12 +6,11 @@ package v1_13 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddCreatedAndUpdatedToMilestones(x *xorm.Engine) error { +func AddCreatedAndUpdatedToMilestones(x db.EngineMigration) error { type Milestone struct { CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` diff --git a/models/migrations/v1_13/v150.go b/models/migrations/v1_13/v150.go index 590ea72903..0714cae4db 100644 --- a/models/migrations/v1_13/v150.go +++ b/models/migrations/v1_13/v150.go @@ -4,13 +4,12 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddPrimaryKeyToRepoTopic(x *xorm.Engine) error { +func AddPrimaryKeyToRepoTopic(x db.EngineMigration) error { // Topic represents a topic of repositories type Topic struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_13/v151.go b/models/migrations/v1_13/v151.go index 454929534f..cef17bc8d5 100644 --- a/models/migrations/v1_13/v151.go +++ b/models/migrations/v1_13/v151.go @@ -9,14 +9,14 @@ import ( "fmt" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func SetDefaultPasswordToArgon2(x *xorm.Engine) error { +func SetDefaultPasswordToArgon2(x db.EngineMigration) error { switch { case setting.Database.Type.IsMySQL(): _, err := x.Exec("ALTER TABLE `user` ALTER passwd_hash_algo SET DEFAULT 'argon2';") diff --git a/models/migrations/v1_13/v152.go b/models/migrations/v1_13/v152.go index 648e26446f..24d45b6c34 100644 --- a/models/migrations/v1_13/v152.go +++ b/models/migrations/v1_13/v152.go @@ -3,9 +3,9 @@ package v1_13 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddTrustModelToRepository(x *xorm.Engine) error { +func AddTrustModelToRepository(x db.EngineMigration) error { type Repository struct { TrustModel int } diff --git a/models/migrations/v1_13/v153.go b/models/migrations/v1_13/v153.go index e5462fc162..0c13b2cb89 100644 --- a/models/migrations/v1_13/v153.go +++ b/models/migrations/v1_13/v153.go @@ -3,11 +3,9 @@ package v1_13 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddTeamReviewRequestSupport(x *xorm.Engine) error { +func AddTeamReviewRequestSupport(x db.EngineMigration) error { type Review struct { ReviewerTeamID int64 `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_13/v154.go b/models/migrations/v1_13/v154.go index 5477d1b889..63e415e7ce 100644 --- a/models/migrations/v1_13/v154.go +++ b/models/migrations/v1_13/v154.go @@ -4,12 +4,11 @@ package v1_13 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddTimeStamps(x *xorm.Engine) error { +func AddTimeStamps(x db.EngineMigration) error { // this will add timestamps where it is useful to have // Star represents a starred repo by an user. diff --git a/models/migrations/v1_14/v155.go b/models/migrations/v1_14/v155.go index 505a9ae033..de93cb5d8c 100644 --- a/models/migrations/v1_14/v155.go +++ b/models/migrations/v1_14/v155.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddChangedProtectedFilesPullRequestColumn(x *xorm.Engine) error { +func AddChangedProtectedFilesPullRequestColumn(x db.EngineMigration) error { type PullRequest struct { ChangedProtectedFiles []string `xorm:"TEXT JSON"` } diff --git a/models/migrations/v1_14/v156.go b/models/migrations/v1_14/v156.go index 593d3f9c70..c9b17306d0 100644 --- a/models/migrations/v1_14/v156.go +++ b/models/migrations/v1_14/v156.go @@ -9,11 +9,10 @@ import ( "path/filepath" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) // Copy paste from models/repo.go because we cannot import models package @@ -25,7 +24,7 @@ func userPath(userName string) string { return filepath.Join(setting.RepoRootPath, strings.ToLower(userName)) } -func FixPublisherIDforTagReleases(ctx context.Context, x *xorm.Engine) error { +func FixPublisherIDforTagReleases(ctx context.Context, x db.EngineMigration) error { type Release struct { ID int64 RepoID int64 diff --git a/models/migrations/v1_14/v157.go b/models/migrations/v1_14/v157.go index 2c5625ebbd..8ce460a978 100644 --- a/models/migrations/v1_14/v157.go +++ b/models/migrations/v1_14/v157.go @@ -3,11 +3,9 @@ package v1_14 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func FixRepoTopics(x *xorm.Engine) error { +func FixRepoTopics(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` Topics []string `xorm:"TEXT JSON"` diff --git a/models/migrations/v1_14/v158.go b/models/migrations/v1_14/v158.go index 3c57e8e3da..2b1cde41b5 100644 --- a/models/migrations/v1_14/v158.go +++ b/models/migrations/v1_14/v158.go @@ -7,13 +7,12 @@ import ( "errors" "strconv" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func UpdateCodeCommentReplies(x *xorm.Engine) error { +func UpdateCodeCommentReplies(x db.EngineMigration) error { type Comment struct { ID int64 `xorm:"pk autoincr"` CommitSHA string `xorm:"VARCHAR(40)"` diff --git a/models/migrations/v1_14/v159.go b/models/migrations/v1_14/v159.go index e6f6f0f061..42da0bfef4 100644 --- a/models/migrations/v1_14/v159.go +++ b/models/migrations/v1_14/v159.go @@ -4,13 +4,12 @@ package v1_14 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func UpdateReactionConstraint(x *xorm.Engine) error { +func UpdateReactionConstraint(x db.EngineMigration) error { // Reaction represents a reactions on issues and comments. type Reaction struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_14/v160.go b/models/migrations/v1_14/v160.go index 73f3798954..fcfd738e4c 100644 --- a/models/migrations/v1_14/v160.go +++ b/models/migrations/v1_14/v160.go @@ -3,11 +3,9 @@ package v1_14 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddBlockOnOfficialReviewRequests(x *xorm.Engine) error { +func AddBlockOnOfficialReviewRequests(x db.EngineMigration) error { type ProtectedBranch struct { BlockOnOfficialReviewRequests bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_14/v161.go b/models/migrations/v1_14/v161.go index eb92dee77c..6cecf53113 100644 --- a/models/migrations/v1_14/v161.go +++ b/models/migrations/v1_14/v161.go @@ -6,12 +6,11 @@ package v1_14 import ( "context" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func ConvertTaskTypeToString(x *xorm.Engine) error { +func ConvertTaskTypeToString(x db.EngineMigration) error { const ( GOGS int = iota + 1 SLACK diff --git a/models/migrations/v1_14/v162.go b/models/migrations/v1_14/v162.go index a0ddd36d55..60c6bfee2c 100644 --- a/models/migrations/v1_14/v162.go +++ b/models/migrations/v1_14/v162.go @@ -4,12 +4,11 @@ package v1_14 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func ConvertWebhookTaskTypeToString(x *xorm.Engine) error { +func ConvertWebhookTaskTypeToString(x db.EngineMigration) error { const ( GOGS int = iota + 1 SLACK diff --git a/models/migrations/v1_14/v163.go b/models/migrations/v1_14/v163.go index 84c35190b7..d7e763ee5c 100644 --- a/models/migrations/v1_14/v163.go +++ b/models/migrations/v1_14/v163.go @@ -4,12 +4,11 @@ package v1_14 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func ConvertTopicNameFrom25To50(x *xorm.Engine) error { +func ConvertTopicNameFrom25To50(x db.EngineMigration) error { type Topic struct { ID int64 `xorm:"pk autoincr"` Name string `xorm:"UNIQUE VARCHAR(50)"` diff --git a/models/migrations/v1_14/v164.go b/models/migrations/v1_14/v164.go index d2fd9b8464..17adc3f46a 100644 --- a/models/migrations/v1_14/v164.go +++ b/models/migrations/v1_14/v164.go @@ -6,7 +6,7 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) // OAuth2Grant here is a snapshot of models.OAuth2Grant for this version @@ -29,7 +29,7 @@ func (grant *OAuth2Grant) TableName() string { return "oauth2_grant" } -func AddScopeAndNonceColumnsToOAuth2Grant(x *xorm.Engine) error { +func AddScopeAndNonceColumnsToOAuth2Grant(x db.EngineMigration) error { if err := x.Sync(new(OAuth2Grant)); err != nil { return fmt.Errorf("Sync: %w", err) } diff --git a/models/migrations/v1_14/v165.go b/models/migrations/v1_14/v165.go index 6e1b34156b..c528049e69 100644 --- a/models/migrations/v1_14/v165.go +++ b/models/migrations/v1_14/v165.go @@ -4,13 +4,13 @@ package v1_14 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func ConvertHookTaskTypeToVarcharAndTrim(x *xorm.Engine) error { +func ConvertHookTaskTypeToVarcharAndTrim(x db.EngineMigration) error { dbType := x.Dialect().URI().DBType if dbType == schemas.SQLITE { // For SQLITE, varchar or char will always be represented as TEXT return nil diff --git a/models/migrations/v1_14/v166.go b/models/migrations/v1_14/v166.go index 4c106bd7da..e3f53475b1 100644 --- a/models/migrations/v1_14/v166.go +++ b/models/migrations/v1_14/v166.go @@ -7,15 +7,16 @@ import ( "crypto/sha256" "encoding/hex" + "code.gitea.io/gitea/models/db" + "golang.org/x/crypto/argon2" "golang.org/x/crypto/bcrypt" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/scrypt" "xorm.io/builder" - "xorm.io/xorm" ) -func RecalculateUserEmptyPWD(x *xorm.Engine) (err error) { +func RecalculateUserEmptyPWD(x db.EngineMigration) (err error) { const ( algoBcrypt = "bcrypt" algoScrypt = "scrypt" diff --git a/models/migrations/v1_14/v167.go b/models/migrations/v1_14/v167.go index d77bbc401e..b38f26bd0f 100644 --- a/models/migrations/v1_14/v167.go +++ b/models/migrations/v1_14/v167.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddUserRedirect(x *xorm.Engine) (err error) { +func AddUserRedirect(x db.EngineMigration) (err error) { type UserRedirect struct { ID int64 `xorm:"pk autoincr"` LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` diff --git a/models/migrations/v1_14/v168.go b/models/migrations/v1_14/v168.go index aa93eec19b..15d57364a0 100644 --- a/models/migrations/v1_14/v168.go +++ b/models/migrations/v1_14/v168.go @@ -3,8 +3,8 @@ package v1_14 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func RecreateUserTableToFixDefaultValues(_ *xorm.Engine) error { +func RecreateUserTableToFixDefaultValues(_ db.EngineMigration) error { return nil } diff --git a/models/migrations/v1_14/v169.go b/models/migrations/v1_14/v169.go index 4f9df0d96f..5838348867 100644 --- a/models/migrations/v1_14/v169.go +++ b/models/migrations/v1_14/v169.go @@ -3,11 +3,9 @@ package v1_14 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func CommentTypeDeleteBranchUseOldRef(x *xorm.Engine) error { +func CommentTypeDeleteBranchUseOldRef(x db.EngineMigration) error { _, err := x.Exec("UPDATE comment SET old_ref = commit_sha, commit_sha = '' WHERE type = 11") return err } diff --git a/models/migrations/v1_14/v170.go b/models/migrations/v1_14/v170.go index a2ff4623e1..9e91e56b96 100644 --- a/models/migrations/v1_14/v170.go +++ b/models/migrations/v1_14/v170.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddDismissedReviewColumn(x *xorm.Engine) error { +func AddDismissedReviewColumn(x db.EngineMigration) error { type Review struct { Dismissed bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_14/v171.go b/models/migrations/v1_14/v171.go index 7b200e960a..82d20c4369 100644 --- a/models/migrations/v1_14/v171.go +++ b/models/migrations/v1_14/v171.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddSortingColToProjectBoard(x *xorm.Engine) error { +func AddSortingColToProjectBoard(x db.EngineMigration) error { type ProjectBoard struct { Sorting int8 `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_14/v172.go b/models/migrations/v1_14/v172.go index bbd61d87b2..3d2ea83647 100644 --- a/models/migrations/v1_14/v172.go +++ b/models/migrations/v1_14/v172.go @@ -4,12 +4,11 @@ package v1_14 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddSessionTable(x *xorm.Engine) error { +func AddSessionTable(x db.EngineMigration) error { type Session struct { Key string `xorm:"pk CHAR(16)"` Data []byte `xorm:"BLOB"` diff --git a/models/migrations/v1_14/v173.go b/models/migrations/v1_14/v173.go index 7752fbe966..2d11a16ad3 100644 --- a/models/migrations/v1_14/v173.go +++ b/models/migrations/v1_14/v173.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddTimeIDCommentColumn(x *xorm.Engine) error { +func AddTimeIDCommentColumn(x db.EngineMigration) error { type Comment struct { TimeID int64 } diff --git a/models/migrations/v1_14/v174.go b/models/migrations/v1_14/v174.go index 4049e43070..2eca58b1ce 100644 --- a/models/migrations/v1_14/v174.go +++ b/models/migrations/v1_14/v174.go @@ -6,10 +6,10 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddRepoTransfer(x *xorm.Engine) error { +func AddRepoTransfer(x db.EngineMigration) error { type RepoTransfer struct { ID int64 `xorm:"pk autoincr"` DoerID int64 diff --git a/models/migrations/v1_14/v175.go b/models/migrations/v1_14/v175.go index 92ed130473..8114c4bd5a 100644 --- a/models/migrations/v1_14/v175.go +++ b/models/migrations/v1_14/v175.go @@ -7,13 +7,12 @@ import ( "fmt" "regexp" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func FixPostgresIDSequences(x *xorm.Engine) error { +func FixPostgresIDSequences(x db.EngineMigration) error { if !setting.Database.Type.IsPostgreSQL() { return nil } diff --git a/models/migrations/v1_14/v176.go b/models/migrations/v1_14/v176.go index ef5dce9a02..faad5f32f2 100644 --- a/models/migrations/v1_14/v176.go +++ b/models/migrations/v1_14/v176.go @@ -3,14 +3,12 @@ package v1_14 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" // RemoveInvalidLabels looks through the database to look for comments and issue_labels // that refer to labels do not belong to the repository or organization that repository // that the issue is in -func RemoveInvalidLabels(x *xorm.Engine) error { +func RemoveInvalidLabels(x db.EngineMigration) error { type Comment struct { ID int64 `xorm:"pk autoincr"` Type int `xorm:"INDEX"` diff --git a/models/migrations/v1_14/v177.go b/models/migrations/v1_14/v177.go index 96676bf8d9..625f2f387d 100644 --- a/models/migrations/v1_14/v177.go +++ b/models/migrations/v1_14/v177.go @@ -6,11 +6,11 @@ package v1_14 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) // DeleteOrphanedIssueLabels looks through the database for issue_labels where the label no longer exists and deletes them. -func DeleteOrphanedIssueLabels(x *xorm.Engine) error { +func DeleteOrphanedIssueLabels(x db.EngineMigration) error { type IssueLabel struct { ID int64 `xorm:"pk autoincr"` IssueID int64 `xorm:"UNIQUE(s)"` diff --git a/models/migrations/v1_15/v178.go b/models/migrations/v1_15/v178.go index ca3a5c262e..2a2a77c696 100644 --- a/models/migrations/v1_15/v178.go +++ b/models/migrations/v1_15/v178.go @@ -3,11 +3,9 @@ package v1_15 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddLFSMirrorColumns(x *xorm.Engine) error { +func AddLFSMirrorColumns(x db.EngineMigration) error { type Mirror struct { LFS bool `xorm:"lfs_enabled NOT NULL DEFAULT false"` LFSEndpoint string `xorm:"lfs_endpoint TEXT"` diff --git a/models/migrations/v1_15/v179.go b/models/migrations/v1_15/v179.go index d6fb86ffec..1210f54ac9 100644 --- a/models/migrations/v1_15/v179.go +++ b/models/migrations/v1_15/v179.go @@ -4,13 +4,13 @@ package v1_15 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func ConvertAvatarURLToText(x *xorm.Engine) error { +func ConvertAvatarURLToText(x db.EngineMigration) error { dbType := x.Dialect().URI().DBType if dbType == schemas.SQLITE { // For SQLITE, varchar or char will always be represented as TEXT return nil diff --git a/models/migrations/v1_15/v180.go b/models/migrations/v1_15/v180.go index dd132f8330..7e6388a99c 100644 --- a/models/migrations/v1_15/v180.go +++ b/models/migrations/v1_15/v180.go @@ -4,14 +4,14 @@ package v1_15 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) -func DeleteMigrationCredentials(x *xorm.Engine) (err error) { +func DeleteMigrationCredentials(x db.EngineMigration) (err error) { // Task represents a task type Task struct { ID int64 diff --git a/models/migrations/v1_15/v181.go b/models/migrations/v1_15/v181.go index fb1d3d7a75..f4032ed19e 100644 --- a/models/migrations/v1_15/v181.go +++ b/models/migrations/v1_15/v181.go @@ -6,10 +6,10 @@ package v1_15 import ( "strings" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddPrimaryEmail2EmailAddress(x *xorm.Engine) error { +func AddPrimaryEmail2EmailAddress(x db.EngineMigration) error { type User struct { ID int64 `xorm:"pk autoincr"` Email string `xorm:"NOT NULL"` diff --git a/models/migrations/v1_15/v182.go b/models/migrations/v1_15/v182.go index f53ff11df9..1b577ea359 100644 --- a/models/migrations/v1_15/v182.go +++ b/models/migrations/v1_15/v182.go @@ -3,11 +3,9 @@ package v1_15 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIssueResourceIndexTable(x *xorm.Engine) error { +func AddIssueResourceIndexTable(x db.EngineMigration) error { type ResourceIndex struct { GroupID int64 `xorm:"pk"` MaxIndex int64 `xorm:"index"` diff --git a/models/migrations/v1_15/v183.go b/models/migrations/v1_15/v183.go index 5d0582f03d..30835ea3b8 100644 --- a/models/migrations/v1_15/v183.go +++ b/models/migrations/v1_15/v183.go @@ -7,12 +7,11 @@ import ( "fmt" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreatePushMirrorTable(x *xorm.Engine) error { +func CreatePushMirrorTable(x db.EngineMigration) error { type PushMirror struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX"` diff --git a/models/migrations/v1_15/v184.go b/models/migrations/v1_15/v184.go index 2823bc1f7a..9933b12a49 100644 --- a/models/migrations/v1_15/v184.go +++ b/models/migrations/v1_15/v184.go @@ -7,13 +7,12 @@ import ( "context" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func RenameTaskErrorsToMessage(x *xorm.Engine) error { +func RenameTaskErrorsToMessage(x db.EngineMigration) error { type Task struct { Errors string `xorm:"TEXT"` // if task failed, saved the error reason Type int diff --git a/models/migrations/v1_15/v185.go b/models/migrations/v1_15/v185.go index 60af59edca..e4750c6766 100644 --- a/models/migrations/v1_15/v185.go +++ b/models/migrations/v1_15/v185.go @@ -3,11 +3,9 @@ package v1_15 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddRepoArchiver(x *xorm.Engine) error { +func AddRepoArchiver(x db.EngineMigration) error { // RepoArchiver represents all archivers type RepoArchiver struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_15/v186.go b/models/migrations/v1_15/v186.go index 67dc97d13d..da8ba69ca9 100644 --- a/models/migrations/v1_15/v186.go +++ b/models/migrations/v1_15/v186.go @@ -4,12 +4,11 @@ package v1_15 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateProtectedTagTable(x *xorm.Engine) error { +func CreateProtectedTagTable(x db.EngineMigration) error { type ProtectedTag struct { ID int64 `xorm:"pk autoincr"` RepoID int64 diff --git a/models/migrations/v1_15/v187.go b/models/migrations/v1_15/v187.go index 5fd90c65fb..2bb27edfac 100644 --- a/models/migrations/v1_15/v187.go +++ b/models/migrations/v1_15/v187.go @@ -4,12 +4,11 @@ package v1_15 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func DropWebhookColumns(x *xorm.Engine) error { +func DropWebhookColumns(x db.EngineMigration) error { // Make sure the columns exist before dropping them type Webhook struct { Signature string `xorm:"TEXT"` diff --git a/models/migrations/v1_15/v188.go b/models/migrations/v1_15/v188.go index 4494e6ff05..a29005abc7 100644 --- a/models/migrations/v1_15/v188.go +++ b/models/migrations/v1_15/v188.go @@ -3,9 +3,9 @@ package v1_15 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddKeyIsVerified(x *xorm.Engine) error { +func AddKeyIsVerified(x db.EngineMigration) error { type GPGKey struct { Verified bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_16/v189.go b/models/migrations/v1_16/v189.go index 6bc99e58ab..1b39770f44 100644 --- a/models/migrations/v1_16/v189.go +++ b/models/migrations/v1_16/v189.go @@ -7,13 +7,12 @@ import ( "encoding/binary" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/json" - - "xorm.io/xorm" ) -func UnwrapLDAPSourceCfg(x *xorm.Engine) error { +func UnwrapLDAPSourceCfg(x db.EngineMigration) error { jsonUnmarshalHandleDoubleEncode := func(bs []byte, v any) error { err := json.Unmarshal(bs, v) if err != nil { diff --git a/models/migrations/v1_16/v190.go b/models/migrations/v1_16/v190.go index 1eb6b6ddb4..d6d5d885b5 100644 --- a/models/migrations/v1_16/v190.go +++ b/models/migrations/v1_16/v190.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddAgitFlowPullRequest(x *xorm.Engine) error { +func AddAgitFlowPullRequest(x db.EngineMigration) error { type PullRequestFlow int type PullRequest struct { diff --git a/models/migrations/v1_16/v191.go b/models/migrations/v1_16/v191.go index 957c82e484..03f287c827 100644 --- a/models/migrations/v1_16/v191.go +++ b/models/migrations/v1_16/v191.go @@ -4,12 +4,11 @@ package v1_16 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AlterIssueAndCommentTextFieldsToLongText(x *xorm.Engine) error { +func AlterIssueAndCommentTextFieldsToLongText(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_16/v192.go b/models/migrations/v1_16/v192.go index 9d03fbe3c8..ce0a69a8ce 100644 --- a/models/migrations/v1_16/v192.go +++ b/models/migrations/v1_16/v192.go @@ -4,12 +4,11 @@ package v1_16 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func RecreateIssueResourceIndexTable(x *xorm.Engine) error { +func RecreateIssueResourceIndexTable(x db.EngineMigration) error { type IssueIndex struct { GroupID int64 `xorm:"pk"` MaxIndex int64 `xorm:"index"` diff --git a/models/migrations/v1_16/v193.go b/models/migrations/v1_16/v193.go index a5af2de380..615f214018 100644 --- a/models/migrations/v1_16/v193.go +++ b/models/migrations/v1_16/v193.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddRepoIDForAttachment(x *xorm.Engine) error { +func AddRepoIDForAttachment(x db.EngineMigration) error { type Attachment struct { ID int64 `xorm:"pk autoincr"` UUID string `xorm:"uuid UNIQUE"` diff --git a/models/migrations/v1_16/v194.go b/models/migrations/v1_16/v194.go index 2e4ed8340e..00b4fccc21 100644 --- a/models/migrations/v1_16/v194.go +++ b/models/migrations/v1_16/v194.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddBranchProtectionUnprotectedFilesColumn(x *xorm.Engine) error { +func AddBranchProtectionUnprotectedFilesColumn(x db.EngineMigration) error { type ProtectedBranch struct { UnprotectedFilePatterns string `xorm:"TEXT"` } diff --git a/models/migrations/v1_16/v195.go b/models/migrations/v1_16/v195.go index 4fd42b7bd2..6b1bc0b4fd 100644 --- a/models/migrations/v1_16/v195.go +++ b/models/migrations/v1_16/v195.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddTableCommitStatusIndex(x *xorm.Engine) error { +func AddTableCommitStatusIndex(x db.EngineMigration) error { // CommitStatusIndex represents a table for commit status index type CommitStatusIndex struct { ID int64 diff --git a/models/migrations/v1_16/v196.go b/models/migrations/v1_16/v196.go index 6c9caa100f..64b80aa789 100644 --- a/models/migrations/v1_16/v196.go +++ b/models/migrations/v1_16/v196.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddColorColToProjectBoard(x *xorm.Engine) error { +func AddColorColToProjectBoard(x db.EngineMigration) error { type ProjectBoard struct { Color string `xorm:"VARCHAR(7)"` } diff --git a/models/migrations/v1_16/v197.go b/models/migrations/v1_16/v197.go index 862bdfdcbd..81abe84a27 100644 --- a/models/migrations/v1_16/v197.go +++ b/models/migrations/v1_16/v197.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddRenamedBranchTable(x *xorm.Engine) error { +func AddRenamedBranchTable(x db.EngineMigration) error { type RenamedBranch struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX NOT NULL"` diff --git a/models/migrations/v1_16/v198.go b/models/migrations/v1_16/v198.go index f35ede138a..c0bc0691a0 100644 --- a/models/migrations/v1_16/v198.go +++ b/models/migrations/v1_16/v198.go @@ -6,12 +6,11 @@ package v1_16 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddTableIssueContentHistory(x *xorm.Engine) error { +func AddTableIssueContentHistory(x db.EngineMigration) error { type IssueContentHistory struct { ID int64 `xorm:"pk autoincr"` PosterID int64 diff --git a/models/migrations/v1_16/v200.go b/models/migrations/v1_16/v200.go index de57fad8fe..5e83711dad 100644 --- a/models/migrations/v1_16/v200.go +++ b/models/migrations/v1_16/v200.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddTableAppState(x *xorm.Engine) error { +func AddTableAppState(x db.EngineMigration) error { type AppState struct { ID string `xorm:"pk varchar(200)"` Revision int64 diff --git a/models/migrations/v1_16/v201.go b/models/migrations/v1_16/v201.go index 2c43698b0c..c4708c4dde 100644 --- a/models/migrations/v1_16/v201.go +++ b/models/migrations/v1_16/v201.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func DropTableRemoteVersion(x *xorm.Engine) error { +func DropTableRemoteVersion(x db.EngineMigration) error { // drop the orphaned table introduced in `v199`, now the update checker also uses AppState, do not need this table _ = x.DropTables("remote_version") return nil diff --git a/models/migrations/v1_16/v202.go b/models/migrations/v1_16/v202.go index d8c8fdcadc..2152e58f97 100644 --- a/models/migrations/v1_16/v202.go +++ b/models/migrations/v1_16/v202.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func CreateUserSettingsTable(x *xorm.Engine) error { +func CreateUserSettingsTable(x db.EngineMigration) error { type UserSetting struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"index unique(key_userid)"` // to load all of someone's settings diff --git a/models/migrations/v1_16/v203.go b/models/migrations/v1_16/v203.go index c3241cba57..19d7397eb6 100644 --- a/models/migrations/v1_16/v203.go +++ b/models/migrations/v1_16/v203.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddProjectIssueSorting(x *xorm.Engine) error { +func AddProjectIssueSorting(x db.EngineMigration) error { // ProjectIssue saves relation from issue to a project type ProjectIssue struct { Sorting int64 `xorm:"NOT NULL DEFAULT 0"` diff --git a/models/migrations/v1_16/v204.go b/models/migrations/v1_16/v204.go index 4d375307e7..c0bfe9e7fb 100644 --- a/models/migrations/v1_16/v204.go +++ b/models/migrations/v1_16/v204.go @@ -3,9 +3,9 @@ package v1_16 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddSSHKeyIsVerified(x *xorm.Engine) error { +func AddSSHKeyIsVerified(x db.EngineMigration) error { type PublicKey struct { Verified bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_16/v205.go b/models/migrations/v1_16/v205.go index 78241bad5b..3e1b393b70 100644 --- a/models/migrations/v1_16/v205.go +++ b/models/migrations/v1_16/v205.go @@ -4,13 +4,13 @@ package v1_16 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func MigrateUserPasswordSalt(x *xorm.Engine) error { +func MigrateUserPasswordSalt(x db.EngineMigration) error { dbType := x.Dialect().URI().DBType // For SQLITE, the max length doesn't matter. if dbType == schemas.SQLITE { diff --git a/models/migrations/v1_16/v206.go b/models/migrations/v1_16/v206.go index 01a9c386eb..b883b137be 100644 --- a/models/migrations/v1_16/v206.go +++ b/models/migrations/v1_16/v206.go @@ -6,10 +6,10 @@ package v1_16 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func AddAuthorizeColForTeamUnit(x *xorm.Engine) error { +func AddAuthorizeColForTeamUnit(x db.EngineMigration) error { type TeamUnit struct { ID int64 `xorm:"pk autoincr"` OrgID int64 `xorm:"INDEX"` diff --git a/models/migrations/v1_16/v207.go b/models/migrations/v1_16/v207.go index 19126ead1f..9608e1103e 100644 --- a/models/migrations/v1_16/v207.go +++ b/models/migrations/v1_16/v207.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddWebAuthnCred(x *xorm.Engine) error { +func AddWebAuthnCred(x db.EngineMigration) error { // NO-OP Don't migrate here - let v210 do this. return nil diff --git a/models/migrations/v1_16/v208.go b/models/migrations/v1_16/v208.go index fb643324f4..534de313fc 100644 --- a/models/migrations/v1_16/v208.go +++ b/models/migrations/v1_16/v208.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func UseBase32HexForCredIDInWebAuthnCredential(x *xorm.Engine) error { +func UseBase32HexForCredIDInWebAuthnCredential(x db.EngineMigration) error { // noop return nil } diff --git a/models/migrations/v1_16/v209.go b/models/migrations/v1_16/v209.go index 230838647b..c96415142f 100644 --- a/models/migrations/v1_16/v209.go +++ b/models/migrations/v1_16/v209.go @@ -3,11 +3,9 @@ package v1_16 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func IncreaseCredentialIDTo410(x *xorm.Engine) error { +func IncreaseCredentialIDTo410(x db.EngineMigration) error { // no-op // v208 was completely wrong // So now we have to no-op again. diff --git a/models/migrations/v1_16/v210.go b/models/migrations/v1_16/v210.go index 0b94baf8e3..bbc3cc8e52 100644 --- a/models/migrations/v1_16/v210.go +++ b/models/migrations/v1_16/v210.go @@ -8,16 +8,16 @@ import ( "fmt" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" "github.com/tstranex/u2f" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) // v208 migration was completely broken -func RemigrateU2FCredentials(x *xorm.Engine) error { +func RemigrateU2FCredentials(x db.EngineMigration) error { // Create webauthnCredential table type webauthnCredential struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_17/v211.go b/models/migrations/v1_17/v211.go index 517cf19388..0070ae22c3 100644 --- a/models/migrations/v1_17/v211.go +++ b/models/migrations/v1_17/v211.go @@ -3,10 +3,8 @@ package v1_17 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func CreateForeignReferenceTable(_ *xorm.Engine) error { +func CreateForeignReferenceTable(_ db.EngineMigration) error { return nil // This table was dropped in v1_19/v237.go } diff --git a/models/migrations/v1_17/v212.go b/models/migrations/v1_17/v212.go index 788792211f..24de310546 100644 --- a/models/migrations/v1_17/v212.go +++ b/models/migrations/v1_17/v212.go @@ -4,12 +4,11 @@ package v1_17 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddPackageTables(x *xorm.Engine) error { +func AddPackageTables(x db.EngineMigration) error { type Package struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` diff --git a/models/migrations/v1_17/v213.go b/models/migrations/v1_17/v213.go index b2bbdf7279..c988999e6b 100644 --- a/models/migrations/v1_17/v213.go +++ b/models/migrations/v1_17/v213.go @@ -3,11 +3,9 @@ package v1_17 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddAllowMaintainerEdit(x *xorm.Engine) error { +func AddAllowMaintainerEdit(x db.EngineMigration) error { // PullRequest represents relation between pull request and repositories. type PullRequest struct { AllowMaintainerEdit bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_17/v214.go b/models/migrations/v1_17/v214.go index 1925324f0f..9576e1a693 100644 --- a/models/migrations/v1_17/v214.go +++ b/models/migrations/v1_17/v214.go @@ -3,11 +3,9 @@ package v1_17 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddAutoMergeTable(x *xorm.Engine) error { +func AddAutoMergeTable(x db.EngineMigration) error { type MergeStyle string type PullAutoMerge struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_17/v215.go b/models/migrations/v1_17/v215.go index 748539225d..39310d2355 100644 --- a/models/migrations/v1_17/v215.go +++ b/models/migrations/v1_17/v215.go @@ -4,13 +4,12 @@ package v1_17 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/pull" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddReviewViewedFiles(x *xorm.Engine) error { +func AddReviewViewedFiles(x db.EngineMigration) error { type ReviewState struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"NOT NULL UNIQUE(pull_commit_user)"` diff --git a/models/migrations/v1_17/v217.go b/models/migrations/v1_17/v217.go index 04626bcbc5..2a3cb3af78 100644 --- a/models/migrations/v1_17/v217.go +++ b/models/migrations/v1_17/v217.go @@ -4,12 +4,11 @@ package v1_17 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AlterHookTaskTextFieldsToLongText(x *xorm.Engine) error { +func AlterHookTaskTextFieldsToLongText(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_17/v218.go b/models/migrations/v1_17/v218.go index 17d4cd89d4..fbaf1e4f7a 100644 --- a/models/migrations/v1_17/v218.go +++ b/models/migrations/v1_17/v218.go @@ -4,10 +4,10 @@ package v1_17 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -47,6 +47,6 @@ func (*improveActionTableIndicesAction) TableIndices() []*schemas.Index { return indices } -func ImproveActionTableIndices(x *xorm.Engine) error { +func ImproveActionTableIndices(x db.EngineMigration) error { return x.Sync(&improveActionTableIndicesAction{}) } diff --git a/models/migrations/v1_17/v219.go b/models/migrations/v1_17/v219.go index 6e335cb813..a87a1190a8 100644 --- a/models/migrations/v1_17/v219.go +++ b/models/migrations/v1_17/v219.go @@ -6,13 +6,12 @@ package v1_17 import ( "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddSyncOnCommitColForPushMirror(x *xorm.Engine) error { +func AddSyncOnCommitColForPushMirror(x db.EngineMigration) error { type PushMirror struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX"` diff --git a/models/migrations/v1_17/v220.go b/models/migrations/v1_17/v220.go index 4ac8c58e1e..39e6e1a150 100644 --- a/models/migrations/v1_17/v220.go +++ b/models/migrations/v1_17/v220.go @@ -4,14 +4,14 @@ package v1_17 import ( + "code.gitea.io/gitea/models/db" packages_model "code.gitea.io/gitea/models/packages" container_module "code.gitea.io/gitea/modules/packages/container" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func AddContainerRepositoryProperty(x *xorm.Engine) (err error) { +func AddContainerRepositoryProperty(x db.EngineMigration) (err error) { switch x.Dialect().URI().DBType { case schemas.SQLITE: _, err = x.Exec("INSERT INTO package_property (ref_type, ref_id, name, value) SELECT ?, p.id, ?, u.lower_name || '/' || p.lower_name FROM package p JOIN `user` u ON p.owner_id = u.id WHERE p.type = ?", diff --git a/models/migrations/v1_17/v221.go b/models/migrations/v1_17/v221.go index 9e6a67eb18..31c41e17d3 100644 --- a/models/migrations/v1_17/v221.go +++ b/models/migrations/v1_17/v221.go @@ -7,12 +7,11 @@ import ( "encoding/base32" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func StoreWebauthnCredentialIDAsBytes(x *xorm.Engine) error { +func StoreWebauthnCredentialIDAsBytes(x db.EngineMigration) error { // Create webauthnCredential table type webauthnCredential struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_17/v222.go b/models/migrations/v1_17/v222.go index a5ea537d8a..4c33dcdffb 100644 --- a/models/migrations/v1_17/v222.go +++ b/models/migrations/v1_17/v222.go @@ -8,13 +8,12 @@ import ( "errors" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func DropOldCredentialIDColumn(x *xorm.Engine) error { +func DropOldCredentialIDColumn(x db.EngineMigration) error { // This migration maybe rerun so that we should check if it has been run credentialIDExist, err := x.Dialect().IsColumnExist(x.DB(), context.Background(), "webauthn_credential", "credential_id") if err != nil { diff --git a/models/migrations/v1_17/v223.go b/models/migrations/v1_17/v223.go index b2bfb76551..b0eac197bf 100644 --- a/models/migrations/v1_17/v223.go +++ b/models/migrations/v1_17/v223.go @@ -7,14 +7,13 @@ import ( "context" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func RenameCredentialIDBytes(x *xorm.Engine) error { +func RenameCredentialIDBytes(x db.EngineMigration) error { // This migration maybe rerun so that we should check if it has been run credentialIDExist, err := x.Dialect().IsColumnExist(x.DB(), context.Background(), "webauthn_credential", "credential_id") if err != nil { diff --git a/models/migrations/v1_18/v224.go b/models/migrations/v1_18/v224.go index 6dc12020ea..4a43528b1a 100644 --- a/models/migrations/v1_18/v224.go +++ b/models/migrations/v1_18/v224.go @@ -3,11 +3,9 @@ package v1_18 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func CreateUserBadgesTable(x *xorm.Engine) error { +func CreateUserBadgesTable(x db.EngineMigration) error { type Badge struct { ID int64 `xorm:"pk autoincr"` Description string diff --git a/models/migrations/v1_18/v225.go b/models/migrations/v1_18/v225.go index bc6117e38f..fc6ceb91f3 100644 --- a/models/migrations/v1_18/v225.go +++ b/models/migrations/v1_18/v225.go @@ -4,12 +4,11 @@ package v1_18 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AlterPublicGPGKeyContentFieldsToMediumText(x *xorm.Engine) error { +func AlterPublicGPGKeyContentFieldsToMediumText(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_18/v226.go b/models/migrations/v1_18/v226.go index 8ed9761476..69c2bf0751 100644 --- a/models/migrations/v1_18/v226.go +++ b/models/migrations/v1_18/v226.go @@ -4,11 +4,12 @@ package v1_18 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/builder" - "xorm.io/xorm" ) -func FixPackageSemverField(x *xorm.Engine) error { +func FixPackageSemverField(x db.EngineMigration) error { _, err := x.Exec(builder.Update(builder.Eq{"semver_compatible": false}).From("`package`").Where(builder.In("`type`", "conan", "generic"))) return err } diff --git a/models/migrations/v1_18/v227.go b/models/migrations/v1_18/v227.go index 3aca686d59..c47727cb5e 100644 --- a/models/migrations/v1_18/v227.go +++ b/models/migrations/v1_18/v227.go @@ -4,9 +4,8 @@ package v1_18 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) type SystemSetting struct { @@ -18,6 +17,6 @@ type SystemSetting struct { Updated timeutil.TimeStamp `xorm:"updated"` } -func CreateSystemSettingsTable(x *xorm.Engine) error { +func CreateSystemSettingsTable(x db.EngineMigration) error { return x.Sync(new(SystemSetting)) } diff --git a/models/migrations/v1_18/v228.go b/models/migrations/v1_18/v228.go index b13f6461bd..e5c1041480 100644 --- a/models/migrations/v1_18/v228.go +++ b/models/migrations/v1_18/v228.go @@ -4,12 +4,11 @@ package v1_18 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddTeamInviteTable(x *xorm.Engine) error { +func AddTeamInviteTable(x db.EngineMigration) error { type TeamInvite struct { ID int64 `xorm:"pk autoincr"` Token string `xorm:"UNIQUE(token) INDEX NOT NULL DEFAULT ''"` diff --git a/models/migrations/v1_18/v229.go b/models/migrations/v1_18/v229.go index 1f69724365..fe8798aa6d 100644 --- a/models/migrations/v1_18/v229.go +++ b/models/migrations/v1_18/v229.go @@ -6,13 +6,13 @@ package v1_18 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/issues" "xorm.io/builder" - "xorm.io/xorm" ) -func UpdateOpenMilestoneCounts(x *xorm.Engine) error { +func UpdateOpenMilestoneCounts(x db.EngineMigration) error { var openMilestoneIDs []int64 err := x.Table("milestone").Select("id").Where(builder.Neq{"is_closed": 1}).Find(&openMilestoneIDs) if err != nil { diff --git a/models/migrations/v1_18/v230.go b/models/migrations/v1_18/v230.go index 078fce7643..2a890e7a75 100644 --- a/models/migrations/v1_18/v230.go +++ b/models/migrations/v1_18/v230.go @@ -3,12 +3,10 @@ package v1_18 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" // AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true -func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error { +func AddConfidentialClientColumnToOAuth2ApplicationTable(x db.EngineMigration) error { type oauth2Application struct { ID int64 ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"` diff --git a/models/migrations/v1_19/v231.go b/models/migrations/v1_19/v231.go index 8ef1e4e743..980a23d82c 100644 --- a/models/migrations/v1_19/v231.go +++ b/models/migrations/v1_19/v231.go @@ -3,11 +3,9 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIndexForHookTask(x *xorm.Engine) error { +func AddIndexForHookTask(x db.EngineMigration) error { type HookTask struct { ID int64 `xorm:"pk autoincr"` HookID int64 `xorm:"index"` diff --git a/models/migrations/v1_19/v232.go b/models/migrations/v1_19/v232.go index 493dbc6df8..d39b1527d9 100644 --- a/models/migrations/v1_19/v232.go +++ b/models/migrations/v1_19/v232.go @@ -4,12 +4,11 @@ package v1_19 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AlterPackageVersionMetadataToLongText(x *xorm.Engine) error { +func AlterPackageVersionMetadataToLongText(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_19/v233.go b/models/migrations/v1_19/v233.go index 44ced874b3..576dfbe04d 100644 --- a/models/migrations/v1_19/v233.go +++ b/models/migrations/v1_19/v233.go @@ -6,15 +6,15 @@ package v1_19 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/secret" "code.gitea.io/gitea/modules/setting" "xorm.io/builder" - "xorm.io/xorm" ) -func batchProcess[T any](x *xorm.Engine, buf []T, query func(limit, start int) *xorm.Session, process func(*xorm.Session, T) error) error { +func batchProcess[T any](x db.EngineMigration, buf []T, query func(limit, start int) db.Session, process func(db.Session, T) error) error { size := cap(buf) start := 0 for { @@ -51,7 +51,7 @@ func batchProcess[T any](x *xorm.Engine, buf []T, query func(limit, start int) * } } -func AddHeaderAuthorizationEncryptedColWebhook(x *xorm.Engine) error { +func AddHeaderAuthorizationEncryptedColWebhook(x db.EngineMigration) error { // Add the column to the table type Webhook struct { ID int64 `xorm:"pk autoincr"` @@ -80,10 +80,10 @@ func AddHeaderAuthorizationEncryptedColWebhook(x *xorm.Engine) error { err = batchProcess(x, make([]*Webhook, 0, 50), - func(limit, start int) *xorm.Session { + func(limit, start int) db.Session { return x.Where("type=?", "matrix").OrderBy("id").Limit(limit, start) }, - func(sess *xorm.Session, hook *Webhook) error { + func(sess db.Session, hook *Webhook) error { // retrieve token from meta var withToken MatrixMetaWithAccessToken err := json.Unmarshal([]byte(hook.Meta), &withToken) @@ -141,13 +141,13 @@ func AddHeaderAuthorizationEncryptedColWebhook(x *xorm.Engine) error { err = batchProcess(x, make([]*HookTask, 0, 50), - func(limit, start int) *xorm.Session { + func(limit, start int) db.Session { return x.Where(builder.And( builder.In("hook_id", builder.Select("id").From("webhook").Where(builder.Eq{"type": "matrix"})), builder.Like{"payload_content", "access_token"}, )).OrderBy("id").Limit(limit, 0) // ignore the provided "start", since other payload were already converted and don't contain 'payload_content' anymore }, - func(sess *xorm.Session, hookTask *HookTask) error { + func(sess db.Session, hookTask *HookTask) error { // retrieve token from payload_content var withToken MatrixPayloadUnsafe err := json.Unmarshal([]byte(hookTask.PayloadContent), &withToken) diff --git a/models/migrations/v1_19/v234.go b/models/migrations/v1_19/v234.go index 3475384d6f..45b1acd537 100644 --- a/models/migrations/v1_19/v234.go +++ b/models/migrations/v1_19/v234.go @@ -4,12 +4,11 @@ package v1_19 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreatePackageCleanupRuleTable(x *xorm.Engine) error { +func CreatePackageCleanupRuleTable(x db.EngineMigration) error { type PackageCleanupRule struct { ID int64 `xorm:"pk autoincr"` Enabled bool `xorm:"INDEX NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_19/v235.go b/models/migrations/v1_19/v235.go index 297d90f65a..e867c79453 100644 --- a/models/migrations/v1_19/v235.go +++ b/models/migrations/v1_19/v235.go @@ -3,11 +3,9 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIndexForAccessToken(x *xorm.Engine) error { +func AddIndexForAccessToken(x db.EngineMigration) error { type AccessToken struct { TokenLastEight string `xorm:"INDEX token_last_eight"` } diff --git a/models/migrations/v1_19/v236.go b/models/migrations/v1_19/v236.go index 0ed4d97a27..5e0a8a7b41 100644 --- a/models/migrations/v1_19/v236.go +++ b/models/migrations/v1_19/v236.go @@ -4,12 +4,11 @@ package v1_19 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateSecretsTable(x *xorm.Engine) error { +func CreateSecretsTable(x db.EngineMigration) error { type Secret struct { ID int64 OwnerID int64 `xorm:"INDEX UNIQUE(owner_repo_name) NOT NULL"` diff --git a/models/migrations/v1_19/v237.go b/models/migrations/v1_19/v237.go index cf30226ccd..c763206044 100644 --- a/models/migrations/v1_19/v237.go +++ b/models/migrations/v1_19/v237.go @@ -3,11 +3,9 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func DropForeignReferenceTable(x *xorm.Engine) error { +func DropForeignReferenceTable(x db.EngineMigration) error { // Drop the table introduced in `v211`, it's considered badly designed and doesn't look like to be used. // See: https://github.com/go-gitea/gitea/issues/21086#issuecomment-1318217453 type ForeignReference struct{} diff --git a/models/migrations/v1_19/v238.go b/models/migrations/v1_19/v238.go index de681bfc7a..2566492fcd 100644 --- a/models/migrations/v1_19/v238.go +++ b/models/migrations/v1_19/v238.go @@ -4,13 +4,12 @@ package v1_19 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) // AddUpdatedUnixToLFSMetaObject adds an updated column to the LFSMetaObject to allow for garbage collection -func AddUpdatedUnixToLFSMetaObject(x *xorm.Engine) error { +func AddUpdatedUnixToLFSMetaObject(x db.EngineMigration) error { // Drop the table introduced in `v211`, it's considered badly designed and doesn't look like to be used. // See: https://github.com/go-gitea/gitea/issues/21086#issuecomment-1318217453 // LFSMetaObject stores metadata for LFS tracked files. diff --git a/models/migrations/v1_19/v239.go b/models/migrations/v1_19/v239.go index 8f4a65be95..3d3f0ac072 100644 --- a/models/migrations/v1_19/v239.go +++ b/models/migrations/v1_19/v239.go @@ -3,11 +3,9 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddScopeForAccessTokens(x *xorm.Engine) error { +func AddScopeForAccessTokens(x db.EngineMigration) error { type AccessToken struct { Scope string } diff --git a/models/migrations/v1_19/v240.go b/models/migrations/v1_19/v240.go index 7fdbaeb9dc..01a17b3476 100644 --- a/models/migrations/v1_19/v240.go +++ b/models/migrations/v1_19/v240.go @@ -6,11 +6,9 @@ package v1_19 import ( "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddActionsTables(x *xorm.Engine) error { +func AddActionsTables(x db.EngineMigration) error { type ActionRunner struct { ID int64 UUID string `xorm:"CHAR(36) UNIQUE"` diff --git a/models/migrations/v1_19/v241.go b/models/migrations/v1_19/v241.go index e35801a057..582993e81e 100644 --- a/models/migrations/v1_19/v241.go +++ b/models/migrations/v1_19/v241.go @@ -3,12 +3,10 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" // AddCardTypeToProjectTable: add CardType column, setting existing rows to CardTypeTextOnly -func AddCardTypeToProjectTable(x *xorm.Engine) error { +func AddCardTypeToProjectTable(x db.EngineMigration) error { type Project struct { CardType int `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_19/v242.go b/models/migrations/v1_19/v242.go index e9e759eaaa..9922eadce8 100644 --- a/models/migrations/v1_19/v242.go +++ b/models/migrations/v1_19/v242.go @@ -4,13 +4,12 @@ package v1_19 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) // AlterPublicGPGKeyImportContentFieldToMediumText: set GPGKeyImport Content field to MEDIUMTEXT -func AlterPublicGPGKeyImportContentFieldToMediumText(x *xorm.Engine) error { +func AlterPublicGPGKeyImportContentFieldToMediumText(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/migrations/v1_19/v243.go b/models/migrations/v1_19/v243.go index 9c3f372594..99f7e97608 100644 --- a/models/migrations/v1_19/v243.go +++ b/models/migrations/v1_19/v243.go @@ -3,11 +3,9 @@ package v1_19 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddExclusiveLabel(x *xorm.Engine) error { +func AddExclusiveLabel(x db.EngineMigration) error { type Label struct { Exclusive bool } diff --git a/models/migrations/v1_20/v244.go b/models/migrations/v1_20/v244.go index 76cdccaca5..e90c411938 100644 --- a/models/migrations/v1_20/v244.go +++ b/models/migrations/v1_20/v244.go @@ -3,11 +3,9 @@ package v1_20 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddNeedApprovalToActionRun(x *xorm.Engine) error { +func AddNeedApprovalToActionRun(x db.EngineMigration) error { /* New index: TriggerUserID New fields: NeedApproval, ApprovedBy diff --git a/models/migrations/v1_20/v245.go b/models/migrations/v1_20/v245.go index 4acb11416c..213038316a 100644 --- a/models/migrations/v1_20/v245.go +++ b/models/migrations/v1_20/v245.go @@ -6,13 +6,12 @@ package v1_20 import ( "context" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func RenameWebhookOrgToOwner(x *xorm.Engine) error { +func RenameWebhookOrgToOwner(x db.EngineMigration) error { type Webhook struct { OrgID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_20/v246.go b/models/migrations/v1_20/v246.go index 22bf723404..a8f88ac04c 100644 --- a/models/migrations/v1_20/v246.go +++ b/models/migrations/v1_20/v246.go @@ -3,11 +3,9 @@ package v1_20 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddNewColumnForProject(x *xorm.Engine) error { +func AddNewColumnForProject(x db.EngineMigration) error { type Project struct { OwnerID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_20/v247.go b/models/migrations/v1_20/v247.go index 4f82937e18..f8402b405c 100644 --- a/models/migrations/v1_20/v247.go +++ b/models/migrations/v1_20/v247.go @@ -4,13 +4,12 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) // FixIncorrectProjectType: set individual project's type from 3(TypeOrganization) to 1(TypeIndividual) -func FixIncorrectProjectType(x *xorm.Engine) error { +func FixIncorrectProjectType(x db.EngineMigration) error { type User struct { ID int64 `xorm:"pk autoincr"` Type int diff --git a/models/migrations/v1_20/v248.go b/models/migrations/v1_20/v248.go index 4f2091e4bc..5b76b5fb55 100644 --- a/models/migrations/v1_20/v248.go +++ b/models/migrations/v1_20/v248.go @@ -3,9 +3,9 @@ package v1_20 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddVersionToActionRunner(x *xorm.Engine) error { +func AddVersionToActionRunner(x db.EngineMigration) error { type ActionRunner struct { Version string `xorm:"VARCHAR(64)"` // the version of act_runner } diff --git a/models/migrations/v1_20/v249.go b/models/migrations/v1_20/v249.go index c6d3a177ca..53bd2c40c9 100644 --- a/models/migrations/v1_20/v249.go +++ b/models/migrations/v1_20/v249.go @@ -4,9 +4,9 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -40,6 +40,6 @@ func (a *Action) TableIndices() []*schemas.Index { return indices } -func ImproveActionTableIndices(x *xorm.Engine) error { +func ImproveActionTableIndices(x db.EngineMigration) error { return x.Sync(new(Action)) } diff --git a/models/migrations/v1_20/v250.go b/models/migrations/v1_20/v250.go index ec45e6e5c3..b011c5b051 100644 --- a/models/migrations/v1_20/v250.go +++ b/models/migrations/v1_20/v250.go @@ -6,12 +6,11 @@ package v1_20 import ( "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" - - "xorm.io/xorm" ) -func ChangeContainerMetadataMultiArch(x *xorm.Engine) error { +func ChangeContainerMetadataMultiArch(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_20/v251.go b/models/migrations/v1_20/v251.go index a274c22a73..98676a572f 100644 --- a/models/migrations/v1_20/v251.go +++ b/models/migrations/v1_20/v251.go @@ -4,12 +4,11 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) -func FixIncorrectOwnerTeamUnitAccessMode(x *xorm.Engine) error { +func FixIncorrectOwnerTeamUnitAccessMode(x db.EngineMigration) error { type UnitType int type AccessMode int diff --git a/models/migrations/v1_20/v252.go b/models/migrations/v1_20/v252.go index d6aa602753..2c86663b91 100644 --- a/models/migrations/v1_20/v252.go +++ b/models/migrations/v1_20/v252.go @@ -4,12 +4,11 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) -func FixIncorrectAdminTeamUnitAccessMode(x *xorm.Engine) error { +func FixIncorrectAdminTeamUnitAccessMode(x db.EngineMigration) error { type UnitType int type AccessMode int diff --git a/models/migrations/v1_20/v253.go b/models/migrations/v1_20/v253.go index c96454dbf9..74d8c69333 100644 --- a/models/migrations/v1_20/v253.go +++ b/models/migrations/v1_20/v253.go @@ -4,12 +4,11 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) -func FixExternalTrackerAndExternalWikiAccessModeInOwnerAndAdminTeam(x *xorm.Engine) error { +func FixExternalTrackerAndExternalWikiAccessModeInOwnerAndAdminTeam(x db.EngineMigration) error { type UnitType int type AccessMode int diff --git a/models/migrations/v1_20/v254.go b/models/migrations/v1_20/v254.go index 9cdbfb3916..912ad36b4a 100644 --- a/models/migrations/v1_20/v254.go +++ b/models/migrations/v1_20/v254.go @@ -3,11 +3,9 @@ package v1_20 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddActionTaskOutputTable(x *xorm.Engine) error { +func AddActionTaskOutputTable(x db.EngineMigration) error { type ActionTaskOutput struct { ID int64 TaskID int64 `xorm:"INDEX UNIQUE(task_id_output_key)"` diff --git a/models/migrations/v1_20/v255.go b/models/migrations/v1_20/v255.go index caf198700e..3ec64d43c4 100644 --- a/models/migrations/v1_20/v255.go +++ b/models/migrations/v1_20/v255.go @@ -4,12 +4,11 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddArchivedUnixToRepository(x *xorm.Engine) error { +func AddArchivedUnixToRepository(x db.EngineMigration) error { type Repository struct { ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` } diff --git a/models/migrations/v1_20/v256.go b/models/migrations/v1_20/v256.go index 7b84c1e154..126b1e6f19 100644 --- a/models/migrations/v1_20/v256.go +++ b/models/migrations/v1_20/v256.go @@ -3,11 +3,9 @@ package v1_20 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIsInternalColumnToPackage(x *xorm.Engine) error { +func AddIsInternalColumnToPackage(x db.EngineMigration) error { type Package struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` diff --git a/models/migrations/v1_20/v257.go b/models/migrations/v1_20/v257.go index 9d5f7c07df..6e47d1387a 100644 --- a/models/migrations/v1_20/v257.go +++ b/models/migrations/v1_20/v257.go @@ -4,12 +4,11 @@ package v1_20 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateActionArtifactTable(x *xorm.Engine) error { +func CreateActionArtifactTable(x db.EngineMigration) error { // ActionArtifact is a file that is stored in the artifact storage. type ActionArtifact struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_20/v258.go b/models/migrations/v1_20/v258.go index 1d3faffdae..4d0ec565cf 100644 --- a/models/migrations/v1_20/v258.go +++ b/models/migrations/v1_20/v258.go @@ -3,11 +3,9 @@ package v1_20 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddPinOrderToIssue(x *xorm.Engine) error { +func AddPinOrderToIssue(x db.EngineMigration) error { type Issue struct { PinOrder int `xorm:"DEFAULT 0"` } diff --git a/models/migrations/v1_20/v259.go b/models/migrations/v1_20/v259.go index 9e0dc9b61d..e356e97582 100644 --- a/models/migrations/v1_20/v259.go +++ b/models/migrations/v1_20/v259.go @@ -7,9 +7,8 @@ import ( "fmt" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" - - "xorm.io/xorm" ) // unknownAccessTokenScope represents the scope for an access token that isn't @@ -319,7 +318,7 @@ type AccessToken struct { Scope string } -func ConvertScopedAccessTokens(x *xorm.Engine) error { +func ConvertScopedAccessTokens(x db.EngineMigration) error { var tokens []*AccessToken if err := x.Find(&tokens); err != nil { diff --git a/models/migrations/v1_21/v260.go b/models/migrations/v1_21/v260.go index 8540c58ae8..a146ee68f9 100644 --- a/models/migrations/v1_21/v260.go +++ b/models/migrations/v1_21/v260.go @@ -4,12 +4,11 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func DropCustomLabelsColumnOfActionRunner(x *xorm.Engine) error { +func DropCustomLabelsColumnOfActionRunner(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_21/v261.go b/models/migrations/v1_21/v261.go index 122b98eb93..54026cf2f6 100644 --- a/models/migrations/v1_21/v261.go +++ b/models/migrations/v1_21/v261.go @@ -4,12 +4,11 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateVariableTable(x *xorm.Engine) error { +func CreateVariableTable(x db.EngineMigration) error { type ActionVariable struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(owner_repo_name)"` diff --git a/models/migrations/v1_21/v262.go b/models/migrations/v1_21/v262.go index 6e88e29b9d..aea7dadce7 100644 --- a/models/migrations/v1_21/v262.go +++ b/models/migrations/v1_21/v262.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddTriggerEventToActionRun(x *xorm.Engine) error { +func AddTriggerEventToActionRun(x db.EngineMigration) error { type ActionRun struct { TriggerEvent string } diff --git a/models/migrations/v1_21/v263.go b/models/migrations/v1_21/v263.go index 55c418bde0..5b57c3cfb2 100644 --- a/models/migrations/v1_21/v263.go +++ b/models/migrations/v1_21/v263.go @@ -6,11 +6,11 @@ package v1_21 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) // AddGitSizeAndLFSSizeToRepositoryTable: add GitSize and LFSSize columns to Repository -func AddGitSizeAndLFSSizeToRepositoryTable(x *xorm.Engine) error { +func AddGitSizeAndLFSSizeToRepositoryTable(x db.EngineMigration) error { type Repository struct { GitSize int64 `xorm:"NOT NULL DEFAULT 0"` LFSSize int64 `xorm:"NOT NULL DEFAULT 0"` diff --git a/models/migrations/v1_21/v264.go b/models/migrations/v1_21/v264.go index 7fc0ec6024..4c64c3f686 100644 --- a/models/migrations/v1_21/v264.go +++ b/models/migrations/v1_21/v264.go @@ -9,11 +9,9 @@ import ( "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddBranchTable(x *xorm.Engine) error { +func AddBranchTable(x db.EngineMigration) error { type Branch struct { ID int64 RepoID int64 `xorm:"UNIQUE(s)"` diff --git a/models/migrations/v1_21/v265.go b/models/migrations/v1_21/v265.go index b6892acc27..8c58989c47 100644 --- a/models/migrations/v1_21/v265.go +++ b/models/migrations/v1_21/v265.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AlterActionArtifactTable(x *xorm.Engine) error { +func AlterActionArtifactTable(x db.EngineMigration) error { // ActionArtifact is a file that is stored in the artifact storage. type ActionArtifact struct { RunID int64 `xorm:"index unique(runid_name_path)"` // The run id of the artifact diff --git a/models/migrations/v1_21/v266.go b/models/migrations/v1_21/v266.go index 440549e868..c9d8a2d099 100644 --- a/models/migrations/v1_21/v266.go +++ b/models/migrations/v1_21/v266.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func ReduceCommitStatus(x *xorm.Engine) error { +func ReduceCommitStatus(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_21/v267.go b/models/migrations/v1_21/v267.go index 394139a17e..62eff40c1d 100644 --- a/models/migrations/v1_21/v267.go +++ b/models/migrations/v1_21/v267.go @@ -4,12 +4,11 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateActionTasksVersionTable(x *xorm.Engine) error { +func CreateActionTasksVersionTable(x db.EngineMigration) error { type ActionTasksVersion struct { ID int64 `xorm:"pk autoincr"` OwnerID int64 `xorm:"UNIQUE(owner_repo)"` diff --git a/models/migrations/v1_21/v268.go b/models/migrations/v1_21/v268.go index b677d2383e..c3809c125f 100644 --- a/models/migrations/v1_21/v268.go +++ b/models/migrations/v1_21/v268.go @@ -3,12 +3,10 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" // UpdateActionsRefIndex updates the index of actions ref field -func UpdateActionsRefIndex(x *xorm.Engine) error { +func UpdateActionsRefIndex(x db.EngineMigration) error { type ActionRun struct { Ref string `xorm:"index"` // the commit/tag/… causing the run } diff --git a/models/migrations/v1_21/v269.go b/models/migrations/v1_21/v269.go index 042040927d..6d4fd2f775 100644 --- a/models/migrations/v1_21/v269.go +++ b/models/migrations/v1_21/v269.go @@ -3,10 +3,8 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func DropDeletedBranchTable(x *xorm.Engine) error { +func DropDeletedBranchTable(x db.EngineMigration) error { return x.DropTables("deleted_branch") } diff --git a/models/migrations/v1_21/v270.go b/models/migrations/v1_21/v270.go index ab7c5660ba..dec8a263f5 100644 --- a/models/migrations/v1_21/v270.go +++ b/models/migrations/v1_21/v270.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func FixPackagePropertyTypo(x *xorm.Engine) error { +func FixPackagePropertyTypo(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_21/v271.go b/models/migrations/v1_21/v271.go index 05e1af1351..06db190e1a 100644 --- a/models/migrations/v1_21/v271.go +++ b/models/migrations/v1_21/v271.go @@ -4,12 +4,11 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddArchivedUnixColumInLabelTable(x *xorm.Engine) error { +func AddArchivedUnixColumInLabelTable(x db.EngineMigration) error { type Label struct { ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT NULL"` } diff --git a/models/migrations/v1_21/v272.go b/models/migrations/v1_21/v272.go index 14c1e0c4b0..b9ac2c9132 100644 --- a/models/migrations/v1_21/v272.go +++ b/models/migrations/v1_21/v272.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddVersionToActionRunTable(x *xorm.Engine) error { +func AddVersionToActionRunTable(x db.EngineMigration) error { type ActionRun struct { Version int `xorm:"version default 0"` } diff --git a/models/migrations/v1_21/v273.go b/models/migrations/v1_21/v273.go index e614a56a7d..a647a85b09 100644 --- a/models/migrations/v1_21/v273.go +++ b/models/migrations/v1_21/v273.go @@ -4,12 +4,11 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddActionScheduleTable(x *xorm.Engine) error { +func AddActionScheduleTable(x db.EngineMigration) error { type ActionSchedule struct { ID int64 Title string diff --git a/models/migrations/v1_21/v274.go b/models/migrations/v1_21/v274.go index d0b557a151..e10ef7adbc 100644 --- a/models/migrations/v1_21/v274.go +++ b/models/migrations/v1_21/v274.go @@ -6,12 +6,11 @@ package v1_21 import ( "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddExpiredUnixColumnInActionArtifactTable(x *xorm.Engine) error { +func AddExpiredUnixColumnInActionArtifactTable(x db.EngineMigration) error { type ActionArtifact struct { ExpiredUnix timeutil.TimeStamp `xorm:"index"` // time when the artifact will be expired } @@ -21,7 +20,7 @@ func AddExpiredUnixColumnInActionArtifactTable(x *xorm.Engine) error { return updateArtifactsExpiredUnixTo90Days(x) } -func updateArtifactsExpiredUnixTo90Days(x *xorm.Engine) error { +func updateArtifactsExpiredUnixTo90Days(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_21/v275.go b/models/migrations/v1_21/v275.go index 2bfe5c72fa..7e435f902d 100644 --- a/models/migrations/v1_21/v275.go +++ b/models/migrations/v1_21/v275.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddScheduleIDForActionRun(x *xorm.Engine) error { +func AddScheduleIDForActionRun(x db.EngineMigration) error { type ActionRun struct { ScheduleID int64 } diff --git a/models/migrations/v1_21/v276.go b/models/migrations/v1_21/v276.go index be24b31902..b5494ae46f 100644 --- a/models/migrations/v1_21/v276.go +++ b/models/migrations/v1_21/v276.go @@ -6,14 +6,13 @@ package v1_21 import ( "context" + "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/gitrepo" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AddRemoteAddressToMirrors(x *xorm.Engine) error { +func AddRemoteAddressToMirrors(x db.EngineMigration) error { type Mirror struct { RemoteAddress string `xorm:"VARCHAR(2048)"` } @@ -33,7 +32,7 @@ func AddRemoteAddressToMirrors(x *xorm.Engine) error { return migratePushMirrors(x) } -func migratePullMirrors(x *xorm.Engine) error { +func migratePullMirrors(x db.EngineMigration) error { type Mirror struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX"` @@ -95,7 +94,7 @@ func migratePullMirrors(x *xorm.Engine) error { return sess.Commit() } -func migratePushMirrors(x *xorm.Engine) error { +func migratePushMirrors(x db.EngineMigration) error { type PushMirror struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX"` diff --git a/models/migrations/v1_21/v277.go b/models/migrations/v1_21/v277.go index 0c102eddde..46b6325671 100644 --- a/models/migrations/v1_21/v277.go +++ b/models/migrations/v1_21/v277.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIndexToIssueUserIssueID(x *xorm.Engine) error { +func AddIndexToIssueUserIssueID(x db.EngineMigration) error { type IssueUser struct { IssueID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_21/v278.go b/models/migrations/v1_21/v278.go index 846f228678..1d53d10e84 100644 --- a/models/migrations/v1_21/v278.go +++ b/models/migrations/v1_21/v278.go @@ -3,11 +3,9 @@ package v1_21 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIndexToCommentDependentIssueID(x *xorm.Engine) error { +func AddIndexToCommentDependentIssueID(x db.EngineMigration) error { type Comment struct { DependentIssueID int64 `xorm:"index"` } diff --git a/models/migrations/v1_21/v279.go b/models/migrations/v1_21/v279.go index beb39effe1..5961ac5776 100644 --- a/models/migrations/v1_21/v279.go +++ b/models/migrations/v1_21/v279.go @@ -4,10 +4,12 @@ package v1_21 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddIndexToActionUserID(x *xorm.Engine) error { +func AddIndexToActionUserID(x db.EngineMigration) error { type Action struct { UserID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_22/v280.go b/models/migrations/v1_22/v280.go index 2271cb6089..aab89dfd33 100644 --- a/models/migrations/v1_22/v280.go +++ b/models/migrations/v1_22/v280.go @@ -3,11 +3,9 @@ package v1_22 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func RenameUserThemes(x *xorm.Engine) error { +func RenameUserThemes(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() diff --git a/models/migrations/v1_22/v281.go b/models/migrations/v1_22/v281.go index 129ec2cba0..7678a5b057 100644 --- a/models/migrations/v1_22/v281.go +++ b/models/migrations/v1_22/v281.go @@ -4,12 +4,11 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func CreateAuthTokenTable(x *xorm.Engine) error { +func CreateAuthTokenTable(x db.EngineMigration) error { type AuthToken struct { ID string `xorm:"pk"` TokenHash string diff --git a/models/migrations/v1_22/v282.go b/models/migrations/v1_22/v282.go index eed64c30f7..0ae350e4eb 100644 --- a/models/migrations/v1_22/v282.go +++ b/models/migrations/v1_22/v282.go @@ -3,11 +3,9 @@ package v1_22 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddIndexToPullAutoMergeDoerID(x *xorm.Engine) error { +func AddIndexToPullAutoMergeDoerID(x db.EngineMigration) error { type PullAutoMerge struct { DoerID int64 `xorm:"INDEX NOT NULL"` } diff --git a/models/migrations/v1_22/v283.go b/models/migrations/v1_22/v283.go index 0eca031b65..e984b7113b 100644 --- a/models/migrations/v1_22/v283.go +++ b/models/migrations/v1_22/v283.go @@ -6,11 +6,12 @@ package v1_22 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm/schemas" ) -func AddCombinedIndexToIssueUser(x *xorm.Engine) error { +func AddCombinedIndexToIssueUser(x db.EngineMigration) error { type OldIssueUser struct { IssueID int64 UID int64 diff --git a/models/migrations/v1_22/v284.go b/models/migrations/v1_22/v284.go index 31b38f6aed..5d44529388 100644 --- a/models/migrations/v1_22/v284.go +++ b/models/migrations/v1_22/v284.go @@ -4,10 +4,12 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddIgnoreStaleApprovalsColumnToProtectedBranchTable(x *xorm.Engine) error { +func AddIgnoreStaleApprovalsColumnToProtectedBranchTable(x db.EngineMigration) error { type ProtectedBranch struct { IgnoreStaleApprovals bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_22/v285.go b/models/migrations/v1_22/v285.go index fed89f670e..54d5ca6bc5 100644 --- a/models/migrations/v1_22/v285.go +++ b/models/migrations/v1_22/v285.go @@ -6,10 +6,12 @@ package v1_22 import ( "time" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddPreviousDurationToActionRun(x *xorm.Engine) error { +func AddPreviousDurationToActionRun(x db.EngineMigration) error { type ActionRun struct { PreviousDuration time.Duration } diff --git a/models/migrations/v1_22/v286.go b/models/migrations/v1_22/v286.go index f3ba50dbb6..b0804c82eb 100644 --- a/models/migrations/v1_22/v286.go +++ b/models/migrations/v1_22/v286.go @@ -6,13 +6,14 @@ import ( "errors" "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "xorm.io/xorm" ) -func expandHashReferencesToSha256(x *xorm.Engine) error { +func expandHashReferencesToSha256(x db.EngineMigration) error { alteredTables := [][2]string{ {"commit_status", "context_hash"}, {"comment", "commit_sha"}, @@ -81,7 +82,7 @@ func expandHashReferencesToSha256(x *xorm.Engine) error { return db.Commit() } -func addObjectFormatNameToRepository(x *xorm.Engine) error { +func addObjectFormatNameToRepository(x db.EngineMigration) error { type Repository struct { ObjectFormatName string `xorm:"VARCHAR(6) NOT NULL DEFAULT 'sha1'"` } @@ -99,7 +100,7 @@ func addObjectFormatNameToRepository(x *xorm.Engine) error { return err } -func AdjustDBForSha256(x *xorm.Engine) error { +func AdjustDBForSha256(x db.EngineMigration) error { if err := expandHashReferencesToSha256(x); err != nil { return err } diff --git a/models/migrations/v1_22/v286_test.go b/models/migrations/v1_22/v286_test.go index 1bd7fac2f1..11d1026277 100644 --- a/models/migrations/v1_22/v286_test.go +++ b/models/migrations/v1_22/v286_test.go @@ -6,13 +6,13 @@ package v1_22 import ( "testing" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/migrationtest" "github.com/stretchr/testify/assert" - "xorm.io/xorm" ) -func PrepareOldRepository(t *testing.T) (*xorm.Engine, func()) { +func PrepareOldRepository(t *testing.T) (db.EngineMigration, func()) { type Repository struct { // old struct ID int64 `xorm:"pk autoincr"` } diff --git a/models/migrations/v1_22/v287.go b/models/migrations/v1_22/v287.go index 5fd901f9de..715f70a596 100644 --- a/models/migrations/v1_22/v287.go +++ b/models/migrations/v1_22/v287.go @@ -3,9 +3,7 @@ package v1_22 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" type BadgeUnique struct { ID int64 `xorm:"pk autoincr"` @@ -16,7 +14,7 @@ func (BadgeUnique) TableName() string { return "badge" } -func UseSlugInsteadOfIDForBadges(x *xorm.Engine) error { +func UseSlugInsteadOfIDForBadges(x db.EngineMigration) error { type Badge struct { Slug string } diff --git a/models/migrations/v1_22/v288.go b/models/migrations/v1_22/v288.go index 26c850c218..a2b6f6a607 100644 --- a/models/migrations/v1_22/v288.go +++ b/models/migrations/v1_22/v288.go @@ -4,9 +4,8 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) type Blocking struct { @@ -21,6 +20,6 @@ func (*Blocking) TableName() string { return "user_blocking" } -func AddUserBlockingTable(x *xorm.Engine) error { +func AddUserBlockingTable(x db.EngineMigration) error { return x.Sync(&Blocking{}) } diff --git a/models/migrations/v1_22/v289.go b/models/migrations/v1_22/v289.go index 78689a4ffa..11499b6869 100644 --- a/models/migrations/v1_22/v289.go +++ b/models/migrations/v1_22/v289.go @@ -3,9 +3,13 @@ package v1_22 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddDefaultWikiBranch(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddDefaultWikiBranch(x db.EngineMigration) error { type Repository struct { ID int64 DefaultWikiBranch string diff --git a/models/migrations/v1_22/v290.go b/models/migrations/v1_22/v290.go index 0f4d78410c..ec43cefcd9 100644 --- a/models/migrations/v1_22/v290.go +++ b/models/migrations/v1_22/v290.go @@ -4,6 +4,8 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) @@ -11,7 +13,7 @@ type HookTask struct { PayloadVersion int `xorm:"DEFAULT 1"` } -func AddPayloadVersionToHookTaskTable(x *xorm.Engine) error { +func AddPayloadVersionToHookTaskTable(x db.EngineMigration) error { // create missing column if _, err := x.SyncWithOptions(xorm.SyncOptions{ IgnoreIndices: true, diff --git a/models/migrations/v1_22/v291.go b/models/migrations/v1_22/v291.go index 823a644a95..67d928dd4d 100644 --- a/models/migrations/v1_22/v291.go +++ b/models/migrations/v1_22/v291.go @@ -3,9 +3,13 @@ package v1_22 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddCommentIDIndexofAttachment(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddCommentIDIndexofAttachment(x db.EngineMigration) error { type Attachment struct { CommentID int64 `xorm:"INDEX"` } diff --git a/models/migrations/v1_22/v293.go b/models/migrations/v1_22/v293.go index 5299b8618f..54016bc43d 100644 --- a/models/migrations/v1_22/v293.go +++ b/models/migrations/v1_22/v293.go @@ -4,14 +4,13 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) // CheckProjectColumnsConsistency ensures there is exactly one default board per project present -func CheckProjectColumnsConsistency(x *xorm.Engine) error { +func CheckProjectColumnsConsistency(x db.EngineMigration) error { sess := x.NewSession() defer sess.Close() @@ -79,7 +78,7 @@ func CheckProjectColumnsConsistency(x *xorm.Engine) error { return removeDuplicatedBoardDefault(x) } -func removeDuplicatedBoardDefault(x *xorm.Engine) error { +func removeDuplicatedBoardDefault(x db.EngineMigration) error { type ProjectInfo struct { ProjectID int64 DefaultNum int diff --git a/models/migrations/v1_22/v294.go b/models/migrations/v1_22/v294.go index 8776e51a16..a839bd7b3b 100644 --- a/models/migrations/v1_22/v294.go +++ b/models/migrations/v1_22/v294.go @@ -6,12 +6,13 @@ package v1_22 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm/schemas" ) // AddUniqueIndexForProjectIssue adds unique indexes for project issue table -func AddUniqueIndexForProjectIssue(x *xorm.Engine) error { +func AddUniqueIndexForProjectIssue(x db.EngineMigration) error { // remove possible duplicated records in table project_issue type result struct { IssueID int64 diff --git a/models/migrations/v1_22/v295.go b/models/migrations/v1_22/v295.go index 319b1a399b..86655d9e0d 100644 --- a/models/migrations/v1_22/v295.go +++ b/models/migrations/v1_22/v295.go @@ -3,9 +3,9 @@ package v1_22 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddCommitStatusSummary(x *xorm.Engine) error { +func AddCommitStatusSummary(x db.EngineMigration) error { type CommitStatusSummary struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"INDEX UNIQUE(repo_id_sha)"` @@ -14,5 +14,5 @@ func AddCommitStatusSummary(x *xorm.Engine) error { } // there is no migrations because if there is no data on this table, it will fall back to get data // from commit status - return x.Sync2(new(CommitStatusSummary)) + return x.Sync(new(CommitStatusSummary)) } diff --git a/models/migrations/v1_22/v296.go b/models/migrations/v1_22/v296.go index 75350f9f65..17981d18b6 100644 --- a/models/migrations/v1_22/v296.go +++ b/models/migrations/v1_22/v296.go @@ -3,9 +3,9 @@ package v1_22 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddCommitStatusSummary2(x *xorm.Engine) error { +func AddCommitStatusSummary2(x db.EngineMigration) error { type CommitStatusSummary struct { ID int64 `xorm:"pk autoincr"` TargetURL string `xorm:"TEXT"` diff --git a/models/migrations/v1_22/v297.go b/models/migrations/v1_22/v297.go index 9a4405f266..aea13a1e2a 100644 --- a/models/migrations/v1_22/v297.go +++ b/models/migrations/v1_22/v297.go @@ -4,12 +4,11 @@ package v1_22 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/perm" - - "xorm.io/xorm" ) -func AddRepoUnitEveryoneAccessMode(x *xorm.Engine) error { +func AddRepoUnitEveryoneAccessMode(x db.EngineMigration) error { type RepoUnit struct { //revive:disable-line:exported EveryoneAccessMode perm.AccessMode `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_22/v298.go b/models/migrations/v1_22/v298.go index 7700173a00..bf6ebb3bd9 100644 --- a/models/migrations/v1_22/v298.go +++ b/models/migrations/v1_22/v298.go @@ -3,8 +3,8 @@ package v1_22 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func DropWronglyCreatedTable(x *xorm.Engine) error { +func DropWronglyCreatedTable(x db.EngineMigration) error { return x.DropTables("o_auth2_application") } diff --git a/models/migrations/v1_23/v299.go b/models/migrations/v1_23/v299.go index 11021d8855..50f8e8c0d0 100644 --- a/models/migrations/v1_23/v299.go +++ b/models/migrations/v1_23/v299.go @@ -3,9 +3,13 @@ package v1_23 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddContentVersionToIssueAndComment(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddContentVersionToIssueAndComment(x db.EngineMigration) error { type Issue struct { ContentVersion int `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_23/v300.go b/models/migrations/v1_23/v300.go index 13c6489c5e..5ed11b68f7 100644 --- a/models/migrations/v1_23/v300.go +++ b/models/migrations/v1_23/v300.go @@ -3,9 +3,13 @@ package v1_23 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddForcePushBranchProtection(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddForcePushBranchProtection(x db.EngineMigration) error { type ProtectedBranch struct { CanForcePush bool `xorm:"NOT NULL DEFAULT false"` EnableForcePushAllowlist bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_23/v301.go b/models/migrations/v1_23/v301.go index ed8e9ef059..cd7c90a69c 100644 --- a/models/migrations/v1_23/v301.go +++ b/models/migrations/v1_23/v301.go @@ -3,10 +3,14 @@ package v1_23 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" + + "xorm.io/xorm" +) // AddSkipSeconderyAuthToOAuth2ApplicationTable: add SkipSecondaryAuthorization column, setting existing rows to false -func AddSkipSecondaryAuthColumnToOAuth2ApplicationTable(x *xorm.Engine) error { +func AddSkipSecondaryAuthColumnToOAuth2ApplicationTable(x db.EngineMigration) error { type oauth2Application struct { SkipSecondaryAuthorization bool `xorm:"NOT NULL DEFAULT FALSE"` } diff --git a/models/migrations/v1_23/v302.go b/models/migrations/v1_23/v302.go index e4a50b3ec8..804782332f 100644 --- a/models/migrations/v1_23/v302.go +++ b/models/migrations/v1_23/v302.go @@ -4,12 +4,13 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" "xorm.io/xorm" ) -func AddIndexToActionTaskStoppedLogExpired(x *xorm.Engine) error { +func AddIndexToActionTaskStoppedLogExpired(x db.EngineMigration) error { type ActionTask struct { Stopped timeutil.TimeStamp `xorm:"index(stopped_log_expired)"` LogExpired bool `xorm:"index(stopped_log_expired)"` diff --git a/models/migrations/v1_23/v303.go b/models/migrations/v1_23/v303.go index dc541a9535..80a7ecf43f 100644 --- a/models/migrations/v1_23/v303.go +++ b/models/migrations/v1_23/v303.go @@ -4,6 +4,8 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) @@ -14,7 +16,7 @@ type CommentMetaData struct { ProjectTitle string `json:"project_title"` } -func AddCommentMetaDataColumn(x *xorm.Engine) error { +func AddCommentMetaDataColumn(x db.EngineMigration) error { type Comment struct { CommentMetaData *CommentMetaData `xorm:"JSON TEXT"` // put all non-index metadata in a single field } diff --git a/models/migrations/v1_23/v304.go b/models/migrations/v1_23/v304.go index 35d4d4881a..915ba8707f 100644 --- a/models/migrations/v1_23/v304.go +++ b/models/migrations/v1_23/v304.go @@ -3,9 +3,13 @@ package v1_23 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddIndexForReleaseSha1(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddIndexForReleaseSha1(x db.EngineMigration) error { type Release struct { Sha1 string `xorm:"INDEX VARCHAR(64)"` } diff --git a/models/migrations/v1_23/v305.go b/models/migrations/v1_23/v305.go index 3762279de1..e4c7fdb9e0 100644 --- a/models/migrations/v1_23/v305.go +++ b/models/migrations/v1_23/v305.go @@ -4,12 +4,11 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddRepositoryLicenses(x *xorm.Engine) error { +func AddRepositoryLicenses(x db.EngineMigration) error { type RepoLicense struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"UNIQUE(s) NOT NULL"` diff --git a/models/migrations/v1_23/v306.go b/models/migrations/v1_23/v306.go index c5c89dbeb8..eb1a2a1bda 100644 --- a/models/migrations/v1_23/v306.go +++ b/models/migrations/v1_23/v306.go @@ -3,9 +3,13 @@ package v1_23 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddBlockAdminMergeOverrideBranchProtection(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddBlockAdminMergeOverrideBranchProtection(x db.EngineMigration) error { type ProtectedBranch struct { BlockAdminMergeOverride bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_23/v307.go b/models/migrations/v1_23/v307.go index 54a69d250b..618d7ee277 100644 --- a/models/migrations/v1_23/v307.go +++ b/models/migrations/v1_23/v307.go @@ -4,12 +4,11 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func FixMilestoneNoDueDate(x *xorm.Engine) error { +func FixMilestoneNoDueDate(x db.EngineMigration) error { type Milestone struct { DeadlineUnix timeutil.TimeStamp } diff --git a/models/migrations/v1_23/v308.go b/models/migrations/v1_23/v308.go index 695fdfcc2d..137cf61874 100644 --- a/models/migrations/v1_23/v308.go +++ b/models/migrations/v1_23/v308.go @@ -4,9 +4,9 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -47,6 +47,6 @@ func (a *improveActionTableIndicesAction) TableIndices() []*schemas.Index { return indices } -func AddNewIndexForUserDashboard(x *xorm.Engine) error { +func AddNewIndexForUserDashboard(x db.EngineMigration) error { return x.Sync(new(improveActionTableIndicesAction)) } diff --git a/models/migrations/v1_23/v309.go b/models/migrations/v1_23/v309.go index e629b718a8..a622c9f10d 100644 --- a/models/migrations/v1_23/v309.go +++ b/models/migrations/v1_23/v309.go @@ -4,9 +4,9 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -72,6 +72,6 @@ func (*improveNotificationTableIndicesAction) TableIndices() []*schemas.Index { return indices } -func ImproveNotificationTableIndices(x *xorm.Engine) error { +func ImproveNotificationTableIndices(x db.EngineMigration) error { return x.Sync(&improveNotificationTableIndicesAction{}) } diff --git a/models/migrations/v1_23/v310.go b/models/migrations/v1_23/v310.go index 074b1c54d3..5f009bab4a 100644 --- a/models/migrations/v1_23/v310.go +++ b/models/migrations/v1_23/v310.go @@ -4,10 +4,12 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddPriorityToProtectedBranch(x *xorm.Engine) error { +func AddPriorityToProtectedBranch(x db.EngineMigration) error { type ProtectedBranch struct { Priority int64 `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_23/v311.go b/models/migrations/v1_23/v311.go index ef48085c79..e229a8b98a 100644 --- a/models/migrations/v1_23/v311.go +++ b/models/migrations/v1_23/v311.go @@ -4,10 +4,12 @@ package v1_23 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddTimeEstimateColumnToIssueTable(x *xorm.Engine) error { +func AddTimeEstimateColumnToIssueTable(x db.EngineMigration) error { type Issue struct { TimeEstimate int64 `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_24/v312.go b/models/migrations/v1_24/v312.go index 823b0eae40..4c8fbbb453 100644 --- a/models/migrations/v1_24/v312.go +++ b/models/migrations/v1_24/v312.go @@ -4,6 +4,8 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) @@ -16,7 +18,7 @@ func (pullAutoMerge) TableName() string { return "pull_auto_merge" } -func AddDeleteBranchAfterMergeForAutoMerge(x *xorm.Engine) error { +func AddDeleteBranchAfterMergeForAutoMerge(x db.EngineMigration) error { _, err := x.SyncWithOptions(xorm.SyncOptions{ IgnoreConstrains: true, IgnoreIndices: true, diff --git a/models/migrations/v1_24/v313.go b/models/migrations/v1_24/v313.go index 7e6cda6bfd..3f12488def 100644 --- a/models/migrations/v1_24/v313.go +++ b/models/migrations/v1_24/v313.go @@ -4,12 +4,11 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func MovePinOrderToTableIssuePin(x *xorm.Engine) error { +func MovePinOrderToTableIssuePin(x db.EngineMigration) error { type IssuePin struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"UNIQUE(s) NOT NULL"` diff --git a/models/migrations/v1_24/v314.go b/models/migrations/v1_24/v314.go index 51cb2e34aa..19d26d42da 100644 --- a/models/migrations/v1_24/v314.go +++ b/models/migrations/v1_24/v314.go @@ -3,11 +3,9 @@ package v1_24 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func UpdateOwnerIDOfRepoLevelActionsTables(x *xorm.Engine) error { +func UpdateOwnerIDOfRepoLevelActionsTables(x db.EngineMigration) error { if _, err := x.Exec("UPDATE `action_runner` SET `owner_id` = 0 WHERE `repo_id` > 0 AND `owner_id` > 0"); err != nil { return err } diff --git a/models/migrations/v1_24/v315.go b/models/migrations/v1_24/v315.go index 52b9b44785..efac5b3ddb 100644 --- a/models/migrations/v1_24/v315.go +++ b/models/migrations/v1_24/v315.go @@ -4,10 +4,12 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddEphemeralToActionRunner(x *xorm.Engine) error { +func AddEphemeralToActionRunner(x db.EngineMigration) error { type ActionRunner struct { Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_24/v316.go b/models/migrations/v1_24/v316.go index 14e888f9ee..0cdbb89c59 100644 --- a/models/migrations/v1_24/v316.go +++ b/models/migrations/v1_24/v316.go @@ -4,10 +4,12 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddDescriptionForSecretsAndVariables(x *xorm.Engine) error { +func AddDescriptionForSecretsAndVariables(x db.EngineMigration) error { type Secret struct { Description string `xorm:"TEXT"` } diff --git a/models/migrations/v1_24/v317.go b/models/migrations/v1_24/v317.go index a13db2dd27..7e40bdb9a1 100644 --- a/models/migrations/v1_24/v317.go +++ b/models/migrations/v1_24/v317.go @@ -4,9 +4,9 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) @@ -51,6 +51,6 @@ func (a *improveActionTableIndicesAction) TableIndices() []*schemas.Index { return indices } -func AddNewIndexForUserDashboard(x *xorm.Engine) error { +func AddNewIndexForUserDashboard(x db.EngineMigration) error { return x.Sync(new(improveActionTableIndicesAction)) } diff --git a/models/migrations/v1_24/v318.go b/models/migrations/v1_24/v318.go index 9b4a540960..3b2f342a66 100644 --- a/models/migrations/v1_24/v318.go +++ b/models/migrations/v1_24/v318.go @@ -4,12 +4,13 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/perm" "xorm.io/xorm" ) -func AddRepoUnitAnonymousAccessMode(x *xorm.Engine) error { +func AddRepoUnitAnonymousAccessMode(x db.EngineMigration) error { type RepoUnit struct { //revive:disable-line:exported AnonymousAccessMode perm.AccessMode `xorm:"NOT NULL DEFAULT 0"` } diff --git a/models/migrations/v1_24/v319.go b/models/migrations/v1_24/v319.go index 648081f74e..e57ce84653 100644 --- a/models/migrations/v1_24/v319.go +++ b/models/migrations/v1_24/v319.go @@ -4,10 +4,12 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddExclusiveOrderColumnToLabelTable(x *xorm.Engine) error { +func AddExclusiveOrderColumnToLabelTable(x db.EngineMigration) error { type Label struct { ExclusiveOrder int `xorm:"DEFAULT 0"` } diff --git a/models/migrations/v1_24/v320.go b/models/migrations/v1_24/v320.go index ebef71939c..07d085ccb9 100644 --- a/models/migrations/v1_24/v320.go +++ b/models/migrations/v1_24/v320.go @@ -4,12 +4,13 @@ package v1_24 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" "xorm.io/xorm" ) -func MigrateSkipTwoFactor(x *xorm.Engine) error { +func MigrateSkipTwoFactor(x db.EngineMigration) error { type LoginSource struct { TwoFactorPolicy string `xorm:"two_factor_policy NOT NULL DEFAULT ''"` } diff --git a/models/migrations/v1_25/v321.go b/models/migrations/v1_25/v321.go index 73ef180f48..0282e743a7 100644 --- a/models/migrations/v1_25/v321.go +++ b/models/migrations/v1_25/v321.go @@ -4,14 +4,14 @@ package v1_25 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/setting" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func UseLongTextInSomeColumnsAndFixBugs(x *xorm.Engine) error { +func UseLongTextInSomeColumnsAndFixBugs(x db.EngineMigration) error { if !setting.Database.Type.IsMySQL() { return nil // Only mysql need to change from text to long text, for other databases, they are the same } diff --git a/models/migrations/v1_25/v322.go b/models/migrations/v1_25/v322.go index 32dae9945a..51312cafb3 100644 --- a/models/migrations/v1_25/v322.go +++ b/models/migrations/v1_25/v322.go @@ -4,13 +4,13 @@ package v1_25 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - "xorm.io/xorm" "xorm.io/xorm/schemas" ) -func ExtendCommentTreePathLength(x *xorm.Engine) error { +func ExtendCommentTreePathLength(x db.EngineMigration) error { dbType := x.Dialect().URI().DBType if dbType == schemas.SQLITE { // For SQLITE, varchar or char will always be represented as TEXT return nil diff --git a/models/migrations/v1_26/v323.go b/models/migrations/v1_26/v323.go index b116f73bf0..1fadd8b16f 100644 --- a/models/migrations/v1_26/v323.go +++ b/models/migrations/v1_26/v323.go @@ -4,10 +4,12 @@ package v1_26 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddActionsConcurrency(x *xorm.Engine) error { +func AddActionsConcurrency(x db.EngineMigration) error { type ActionRun struct { RepoID int64 `xorm:"index(repo_concurrency)"` RawConcurrency string diff --git a/models/migrations/v1_26/v324.go b/models/migrations/v1_26/v324.go index 5d96bfa3ca..288295a90c 100644 --- a/models/migrations/v1_26/v324.go +++ b/models/migrations/v1_26/v324.go @@ -6,10 +6,10 @@ package v1_26 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" ) -func FixClosedMilestoneCompleteness(x *xorm.Engine) error { +func FixClosedMilestoneCompleteness(x db.EngineMigration) error { // Update all milestones to recalculate completeness with the new logic: // - Closed milestones with 0 issues should show 100% // - All other milestones should calculate based on closed/total ratio diff --git a/models/migrations/v1_26/v325.go b/models/migrations/v1_26/v325.go index d81540f44e..8f753554c1 100644 --- a/models/migrations/v1_26/v325.go +++ b/models/migrations/v1_26/v325.go @@ -3,11 +3,9 @@ package v1_26 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func FixMissedRepoIDWhenMigrateAttachments(x *xorm.Engine) error { +func FixMissedRepoIDWhenMigrateAttachments(x db.EngineMigration) error { _, err := x.Exec("UPDATE `attachment` SET `repo_id` = (SELECT `repo_id` FROM `issue` WHERE `issue`.`id` = `attachment`.`issue_id`) WHERE `issue_id` > 0 AND (`repo_id` IS NULL OR `repo_id` = 0);") if err != nil { return err diff --git a/models/migrations/v1_26/v326.go b/models/migrations/v1_26/v326.go index dcf548bec0..1b0462862c 100644 --- a/models/migrations/v1_26/v326.go +++ b/models/migrations/v1_26/v326.go @@ -10,12 +10,11 @@ import ( "strconv" "strings" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" webhook_module "code.gitea.io/gitea/modules/webhook" - - "xorm.io/xorm" ) const ( @@ -92,7 +91,7 @@ type commitSHAAndRuns struct { // Only rows whose resolved run ID is below legacyURLIDThreshold are rewritten. // This is because smaller legacy run indexes are more likely to collide with run ID URLs during runtime resolution, // so this migration prioritizes that lower range and leaves the remaining legacy target URLs to the web compatibility logic. -func FixCommitStatusTargetURLToUseRunAndJobID(x *xorm.Engine) error { +func FixCommitStatusTargetURLToUseRunAndJobID(x db.EngineMigration) error { jobsByRunIDCache := make(map[int64][]int64) repoLinkCache := make(map[int64]string) groups, err := loadLegacyMigrationRunGroups(x) @@ -113,7 +112,7 @@ func FixCommitStatusTargetURLToUseRunAndJobID(x *xorm.Engine) error { return nil } -func loadLegacyMigrationRunGroups(x *xorm.Engine) (map[int64]map[string]*commitSHAAndRuns, error) { +func loadLegacyMigrationRunGroups(x db.EngineMigration) (map[int64]map[string]*commitSHAAndRuns, error) { var runs []migrationActionRun if err := x.Table("action_run"). Where("id < ?", legacyURLIDThreshold). @@ -149,7 +148,7 @@ func loadLegacyMigrationRunGroups(x *xorm.Engine) (map[int64]map[string]*commitS } func migrateCommitStatusTargetURLForGroup( - x *xorm.Engine, + x db.EngineMigration, table string, repoID int64, sha string, @@ -210,7 +209,7 @@ func migrateCommitStatusTargetURLForGroup( return nil } -func getRepoLinkCached(x *xorm.Engine, cache map[int64]string, repoID int64) (string, error) { +func getRepoLinkCached(x db.EngineMigration, cache map[int64]string, repoID int64) (string, error) { if link, ok := cache[repoID]; ok { return link, nil } @@ -228,7 +227,7 @@ func getRepoLinkCached(x *xorm.Engine, cache map[int64]string, repoID int64) (st return link, nil } -func getJobIDByIndexCached(x *xorm.Engine, cache map[int64][]int64, runID, jobIndex int64) (int64, bool, error) { +func getJobIDByIndexCached(x db.EngineMigration, cache map[int64][]int64, runID, jobIndex int64) (int64, bool, error) { jobIDs, ok := cache[runID] if !ok { var jobs []migrationActionRunJob diff --git a/models/migrations/v1_26/v326_test.go b/models/migrations/v1_26/v326_test.go index a0225eb774..5246b7c7fc 100644 --- a/models/migrations/v1_26/v326_test.go +++ b/models/migrations/v1_26/v326_test.go @@ -6,6 +6,7 @@ package v1_26 import ( "testing" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/migrationtest" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" @@ -15,7 +16,6 @@ import ( _ "code.gitea.io/gitea/models/repo" "github.com/stretchr/testify/require" - "xorm.io/xorm" ) func Test_FixCommitStatusTargetURLToUseRunAndJobID(t *testing.T) { @@ -100,7 +100,7 @@ func Test_FixCommitStatusTargetURLToUseRunAndJobID(t *testing.T) { } } -func assertTargetURL(t *testing.T, x *xorm.Engine, table string, id int64, want string) { +func assertTargetURL(t *testing.T, x db.EngineMigration, table string, id int64, want string) { t.Helper() var row struct { diff --git a/models/migrations/v1_26/v327.go b/models/migrations/v1_26/v327.go index 51af567650..e0afdb958e 100644 --- a/models/migrations/v1_26/v327.go +++ b/models/migrations/v1_26/v327.go @@ -3,9 +3,13 @@ package v1_26 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddDisabledToActionRunner(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddDisabledToActionRunner(x db.EngineMigration) error { type ActionRunner struct { IsDisabled bool `xorm:"is_disabled NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_26/v328.go b/models/migrations/v1_26/v328.go index 8104730528..2d9d77cd31 100644 --- a/models/migrations/v1_26/v328.go +++ b/models/migrations/v1_26/v328.go @@ -4,10 +4,12 @@ package v1_26 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddTokenPermissionsToActionRunJob(x *xorm.Engine) error { +func AddTokenPermissionsToActionRunJob(x db.EngineMigration) error { type ActionRunJob struct { TokenPermissions string `xorm:"JSON TEXT"` } diff --git a/models/migrations/v1_26/v329.go b/models/migrations/v1_26/v329.go index 1afd155f05..74baf074a3 100644 --- a/models/migrations/v1_26/v329.go +++ b/models/migrations/v1_26/v329.go @@ -6,7 +6,8 @@ package v1_26 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm/schemas" ) @@ -27,7 +28,7 @@ func (n *UserBadge) TableIndices() []*schemas.Index { // AddUniqueIndexForUserBadge adds a compound unique indexes for user badge table // and it replaces an old index on user_id -func AddUniqueIndexForUserBadge(x *xorm.Engine) error { +func AddUniqueIndexForUserBadge(x db.EngineMigration) error { // remove possible duplicated records in table user_badge type result struct { UserID int64 diff --git a/models/migrations/v1_26/v330.go b/models/migrations/v1_26/v330.go index 9f77331090..4d083d7abf 100644 --- a/models/migrations/v1_26/v330.go +++ b/models/migrations/v1_26/v330.go @@ -4,10 +4,12 @@ package v1_26 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/xorm" ) -func AddNameToWebhook(x *xorm.Engine) error { +func AddNameToWebhook(x db.EngineMigration) error { type Webhook struct { Name string `xorm:"VARCHAR(255) NOT NULL DEFAULT ''"` } diff --git a/models/migrations/v1_27/v331.go b/models/migrations/v1_27/v331.go index 204b7b661e..413fb8bd87 100644 --- a/models/migrations/v1_27/v331.go +++ b/models/migrations/v1_27/v331.go @@ -7,6 +7,7 @@ import ( "context" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" @@ -90,7 +91,7 @@ func (actionRun) TableName() string { } // AddActionRunAttemptModel adds the ActionRunAttempt table and the supporting ActionRun/ActionRunJob fields. -func AddActionRunAttemptModel(x *xorm.Engine) error { +func AddActionRunAttemptModel(x db.EngineMigration) error { // add "action_run_attempt" if _, err := x.SyncWithOptions(xorm.SyncOptions{ IgnoreDropIndices: true, diff --git a/models/migrations/v1_27/v332.go b/models/migrations/v1_27/v332.go index f7e023a0cd..5c7ef465eb 100644 --- a/models/migrations/v1_27/v332.go +++ b/models/migrations/v1_27/v332.go @@ -3,7 +3,11 @@ package v1_27 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" + + "xorm.io/xorm" +) type mirrorWithLastSyncUnix struct { LastSyncUnix int64 `xorm:"INDEX"` @@ -13,7 +17,7 @@ func (mirrorWithLastSyncUnix) TableName() string { return "mirror" } -func AddLastSyncUnixToMirror(x *xorm.Engine) error { +func AddLastSyncUnixToMirror(x db.EngineMigration) error { _, err := x.SyncWithOptions(xorm.SyncOptions{ IgnoreDropIndices: true, }, new(mirrorWithLastSyncUnix)) diff --git a/models/migrations/v1_27/v333.go b/models/migrations/v1_27/v333.go index 0ffab0a1f2..d492de40b5 100644 --- a/models/migrations/v1_27/v333.go +++ b/models/migrations/v1_27/v333.go @@ -3,9 +3,13 @@ package v1_27 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddBranchProtectionBypassAllowlist(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddBranchProtectionBypassAllowlist(x db.EngineMigration) error { type ProtectedBranch struct { EnableBypassAllowlist bool `xorm:"NOT NULL DEFAULT false"` BypassAllowlistUserIDs []int64 `xorm:"JSON TEXT"` diff --git a/models/migrations/v1_27/v334.go b/models/migrations/v1_27/v334.go index 111a81e8b0..c6b13740ec 100644 --- a/models/migrations/v1_27/v334.go +++ b/models/migrations/v1_27/v334.go @@ -3,9 +3,13 @@ package v1_27 -import "xorm.io/xorm" +import ( + "code.gitea.io/gitea/models/db" -func AddCancellingSupportToActionRunner(x *xorm.Engine) error { + "xorm.io/xorm" +) + +func AddCancellingSupportToActionRunner(x db.EngineMigration) error { type ActionRunner struct { HasCancellingSupport bool `xorm:"has_cancelling_support NOT NULL DEFAULT false"` } diff --git a/models/migrations/v1_6/v70.go b/models/migrations/v1_6/v70.go index 41f0966942..6b20715c70 100644 --- a/models/migrations/v1_6/v70.go +++ b/models/migrations/v1_6/v70.go @@ -7,12 +7,11 @@ import ( "fmt" "time" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AddIssueDependencies(x *xorm.Engine) (err error) { +func AddIssueDependencies(x db.EngineMigration) (err error) { type IssueDependency struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"NOT NULL"` diff --git a/models/migrations/v1_6/v71.go b/models/migrations/v1_6/v71.go index b4dcd87eba..011dc5511d 100644 --- a/models/migrations/v1_6/v71.go +++ b/models/migrations/v1_6/v71.go @@ -6,14 +6,13 @@ package v1_6 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - - "xorm.io/xorm" ) -func AddScratchHash(x *xorm.Engine) error { +func AddScratchHash(x db.EngineMigration) error { // TwoFactor see models/twofactor.go type TwoFactor struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_6/v72.go b/models/migrations/v1_6/v72.go index 9fad88a1b6..5668570f2c 100644 --- a/models/migrations/v1_6/v72.go +++ b/models/migrations/v1_6/v72.go @@ -6,12 +6,11 @@ package v1_6 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddReview(x *xorm.Engine) error { +func AddReview(x db.EngineMigration) error { // Review see models/review.go type Review struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_7/v73.go b/models/migrations/v1_7/v73.go index e0b7a28537..44a035663a 100644 --- a/models/migrations/v1_7/v73.go +++ b/models/migrations/v1_7/v73.go @@ -3,11 +3,9 @@ package v1_7 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddMustChangePassword(x *xorm.Engine) error { +func AddMustChangePassword(x db.EngineMigration) error { // User see models/user.go type User struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_7/v74.go b/models/migrations/v1_7/v74.go index 376be37a24..447606997e 100644 --- a/models/migrations/v1_7/v74.go +++ b/models/migrations/v1_7/v74.go @@ -3,9 +3,9 @@ package v1_7 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddApprovalWhitelistsToProtectedBranches(x *xorm.Engine) error { +func AddApprovalWhitelistsToProtectedBranches(x db.EngineMigration) error { type ProtectedBranch struct { ApprovalsWhitelistUserIDs []int64 `xorm:"JSON TEXT"` ApprovalsWhitelistTeamIDs []int64 `xorm:"JSON TEXT"` diff --git a/models/migrations/v1_7/v75.go b/models/migrations/v1_7/v75.go index ef11575466..c80edc0c14 100644 --- a/models/migrations/v1_7/v75.go +++ b/models/migrations/v1_7/v75.go @@ -4,11 +4,12 @@ package v1_7 import ( + "code.gitea.io/gitea/models/db" + "xorm.io/builder" - "xorm.io/xorm" ) -func ClearNonusedData(x *xorm.Engine) error { +func ClearNonusedData(x db.EngineMigration) error { condDelete := func(colName string) builder.Cond { return builder.NotIn(colName, builder.Select("id").From("`user`")) } diff --git a/models/migrations/v1_8/v76.go b/models/migrations/v1_8/v76.go index 81e9307549..f3e5c4aadb 100644 --- a/models/migrations/v1_8/v76.go +++ b/models/migrations/v1_8/v76.go @@ -6,12 +6,11 @@ package v1_8 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddPullRequestRebaseWithMerge(x *xorm.Engine) error { +func AddPullRequestRebaseWithMerge(x db.EngineMigration) error { // RepoUnit describes all units of a repository type RepoUnit struct { ID int64 diff --git a/models/migrations/v1_8/v77.go b/models/migrations/v1_8/v77.go index 4fe5ebe635..6350c486d7 100644 --- a/models/migrations/v1_8/v77.go +++ b/models/migrations/v1_8/v77.go @@ -3,11 +3,9 @@ package v1_8 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddUserDefaultTheme(x *xorm.Engine) error { +func AddUserDefaultTheme(x db.EngineMigration) error { type User struct { Theme string `xorm:"VARCHAR(30) NOT NULL DEFAULT ''"` } diff --git a/models/migrations/v1_8/v78.go b/models/migrations/v1_8/v78.go index e67f464131..1c2afb712f 100644 --- a/models/migrations/v1_8/v78.go +++ b/models/migrations/v1_8/v78.go @@ -4,12 +4,11 @@ package v1_8 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" - - "xorm.io/xorm" ) -func RenameRepoIsBareToIsEmpty(x *xorm.Engine) error { +func RenameRepoIsBareToIsEmpty(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` IsBare bool diff --git a/models/migrations/v1_8/v79.go b/models/migrations/v1_8/v79.go index 3f50114d5a..35d16bcd04 100644 --- a/models/migrations/v1_8/v79.go +++ b/models/migrations/v1_8/v79.go @@ -4,12 +4,11 @@ package v1_8 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" - - "xorm.io/xorm" ) -func AddCanCloseIssuesViaCommitInAnyBranch(x *xorm.Engine) error { +func AddCanCloseIssuesViaCommitInAnyBranch(x db.EngineMigration) error { type Repository struct { ID int64 `xorm:"pk autoincr"` CloseIssuesViaCommitInAnyBranch bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v1_8/v80.go b/models/migrations/v1_8/v80.go index 6f9df47a93..2518a8b1e4 100644 --- a/models/migrations/v1_8/v80.go +++ b/models/migrations/v1_8/v80.go @@ -3,9 +3,9 @@ package v1_8 -import "xorm.io/xorm" +import "code.gitea.io/gitea/models/db" -func AddIsLockedToIssues(x *xorm.Engine) error { +func AddIsLockedToIssues(x db.EngineMigration) error { // Issue see models/issue.go type Issue struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/migrations/v1_8/v81.go b/models/migrations/v1_8/v81.go index 3c2acc6458..eac4eb3378 100644 --- a/models/migrations/v1_8/v81.go +++ b/models/migrations/v1_8/v81.go @@ -6,11 +6,12 @@ package v1_8 import ( "fmt" - "xorm.io/xorm" + "code.gitea.io/gitea/models/db" + "xorm.io/xorm/schemas" ) -func ChangeU2FCounterType(x *xorm.Engine) error { +func ChangeU2FCounterType(x db.EngineMigration) error { var err error switch x.Dialect().URI().DBType { diff --git a/models/migrations/v1_9/v82.go b/models/migrations/v1_9/v82.go index 8796b0563d..9fbe06267f 100644 --- a/models/migrations/v1_9/v82.go +++ b/models/migrations/v1_9/v82.go @@ -7,14 +7,13 @@ import ( "context" "fmt" + "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/gitrepo" - - "xorm.io/xorm" ) -func FixReleaseSha1OnReleaseTable(ctx context.Context, x *xorm.Engine) error { +func FixReleaseSha1OnReleaseTable(ctx context.Context, x db.EngineMigration) error { type Release struct { ID int64 RepoID int64 diff --git a/models/migrations/v1_9/v83.go b/models/migrations/v1_9/v83.go index a0cd57f7c5..8646386951 100644 --- a/models/migrations/v1_9/v83.go +++ b/models/migrations/v1_9/v83.go @@ -4,12 +4,11 @@ package v1_9 import ( + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" - - "xorm.io/xorm" ) -func AddUploaderIDForAttachment(x *xorm.Engine) error { +func AddUploaderIDForAttachment(x db.EngineMigration) error { type Attachment struct { ID int64 `xorm:"pk autoincr"` UUID string `xorm:"uuid UNIQUE"` diff --git a/models/migrations/v1_9/v84.go b/models/migrations/v1_9/v84.go index 423915ae57..95861f07f0 100644 --- a/models/migrations/v1_9/v84.go +++ b/models/migrations/v1_9/v84.go @@ -3,11 +3,9 @@ package v1_9 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddGPGKeyImport(x *xorm.Engine) error { +func AddGPGKeyImport(x db.EngineMigration) error { type GPGKeyImport struct { KeyID string `xorm:"pk CHAR(16) NOT NULL"` Content string `xorm:"TEXT NOT NULL"` diff --git a/models/migrations/v1_9/v85.go b/models/migrations/v1_9/v85.go index 0e95a71f92..010ed5f784 100644 --- a/models/migrations/v1_9/v85.go +++ b/models/migrations/v1_9/v85.go @@ -6,15 +6,14 @@ package v1_9 import ( "fmt" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations/base" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - - "xorm.io/xorm" ) -func HashAppToken(x *xorm.Engine) error { +func HashAppToken(x db.EngineMigration) error { // AccessToken see models/token.go type AccessToken struct { ID int64 `xorm:"pk autoincr"` @@ -98,7 +97,7 @@ func HashAppToken(x *xorm.Engine) error { return resyncHashAppTokenWithUniqueHash(x) } -func resyncHashAppTokenWithUniqueHash(x *xorm.Engine) error { +func resyncHashAppTokenWithUniqueHash(x db.EngineMigration) error { // AccessToken see models/token.go type AccessToken struct { TokenHash string `xorm:"UNIQUE"` // sha256 of token - we will ensure UNIQUE later diff --git a/models/migrations/v1_9/v86.go b/models/migrations/v1_9/v86.go index 9464ff0cf6..c031c784b9 100644 --- a/models/migrations/v1_9/v86.go +++ b/models/migrations/v1_9/v86.go @@ -3,11 +3,9 @@ package v1_9 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddHTTPMethodToWebhook(x *xorm.Engine) error { +func AddHTTPMethodToWebhook(x db.EngineMigration) error { type Webhook struct { HTTPMethod string `xorm:"http_method DEFAULT 'POST'"` } diff --git a/models/migrations/v1_9/v87.go b/models/migrations/v1_9/v87.go index 81a4ebf80d..03982d1cf7 100644 --- a/models/migrations/v1_9/v87.go +++ b/models/migrations/v1_9/v87.go @@ -3,11 +3,9 @@ package v1_9 -import ( - "xorm.io/xorm" -) +import "code.gitea.io/gitea/models/db" -func AddAvatarFieldToRepository(x *xorm.Engine) error { +func AddAvatarFieldToRepository(x db.EngineMigration) error { type Repository struct { // ID(10-20)-md5(32) - must fit into 64 symbols Avatar string `xorm:"VARCHAR(64)"` diff --git a/models/organization/org.go b/models/organization/org.go index 10a2c330e5..278f086100 100644 --- a/models/organization/org.go +++ b/models/organization/org.go @@ -19,7 +19,6 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) // ErrOrgNotExist represents a "OrgNotExist" kind of error. @@ -191,7 +190,7 @@ func (opts FindOrgMembersOpts) PublicOnly() bool { } // applyTeamMatesOnlyFilter make sure restricted users only see public team members and there own team mates -func (opts FindOrgMembersOpts) applyTeamMatesOnlyFilter(sess *xorm.Session) { +func (opts FindOrgMembersOpts) applyTeamMatesOnlyFilter(sess db.Session) { if opts.Doer != nil && opts.IsDoerMember && opts.Doer.IsRestricted { teamMates := builder.Select("DISTINCT team_user.uid"). From("team_user"). @@ -463,7 +462,7 @@ func GetOrgUsersByOrgID(ctx context.Context, opts *FindOrgMembersOpts) ([]*OrgUs } if opts.ListOptions.PageSize > 0 { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) ous := make([]*OrgUser, 0, opts.PageSize) return ous, sess.Find(&ous) diff --git a/models/organization/team_list.go b/models/organization/team_list.go index 5629cec366..4d98e3148c 100644 --- a/models/organization/team_list.go +++ b/models/organization/team_list.go @@ -85,7 +85,7 @@ func SearchTeam(ctx context.Context, opts *SearchTeamOptions) (TeamList, int64, if opts.UserID > 0 { sess = sess.Join("INNER", "team_user", "team_user.team_id = team.id") } - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) teams := make([]*Team, 0, opts.PageSize) count, err := sess.Where(cond).OrderBy("CASE WHEN name=? THEN '' ELSE lower_name END", OwnerTeamName).FindAndCount(&teams) diff --git a/models/packages/container/search.go b/models/packages/container/search.go index 9321d9eb41..ac6a6d7fce 100644 --- a/models/packages/container/search.go +++ b/models/packages/container/search.go @@ -223,7 +223,7 @@ func SearchImageTags(ctx context.Context, opts *ImageTagsSearchOptions) ([]*pack opts.configureOrderBy(sess) if opts.Paginator != nil { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) } pvs := make([]*packages.PackageVersion, 0, 10) diff --git a/models/packages/package_file.go b/models/packages/package_file.go index 64bd08f0b2..8715aa5339 100644 --- a/models/packages/package_file.go +++ b/models/packages/package_file.go @@ -232,7 +232,7 @@ func SearchFiles(ctx context.Context, opts *PackageFileSearchOptions) ([]*Packag Where(opts.toConds()) if opts.Paginator != nil { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) } pfs := make([]*PackageFile, 0, 10) diff --git a/models/packages/package_version.go b/models/packages/package_version.go index 3e0e1899ea..8d26c24130 100644 --- a/models/packages/package_version.go +++ b/models/packages/package_version.go @@ -14,7 +14,6 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" - "xorm.io/xorm" ) // ErrDuplicatePackageVersion indicates a duplicated package version error @@ -297,11 +296,11 @@ func (opts *PackageSearchOptions) configureOrderBy(e db.Engine) { e.Desc("package_version.id") // Sort by id for stable order with duplicates in the other field } -func searchVersionsBySession(sess *xorm.Session, opts *PackageSearchOptions) ([]*PackageVersion, int64, error) { +func searchVersionsBySession(sess db.Session, opts *PackageSearchOptions) ([]*PackageVersion, int64, error) { opts.configureOrderBy(sess) pvs := make([]*PackageVersion, 0, 10) if opts.Paginator != nil { - sess = db.SetSessionPagination(sess, opts.Paginator) + db.SetSessionPagination(sess, opts.Paginator) count, err := sess.FindAndCount(&pvs) return pvs, count, err } diff --git a/models/repo/star.go b/models/repo/star.go index e1672623c8..dec80f51db 100644 --- a/models/repo/star.go +++ b/models/repo/star.go @@ -77,7 +77,7 @@ func GetStargazers(ctx context.Context, repo *Repository, opts db.ListOptions) ( sess := db.GetEngine(ctx).Where("star.repo_id = ?", repo.ID). Join("LEFT", "star", "`user`.id = star.uid") if opts.Page > 0 { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) users := make([]*user_model.User, 0, opts.PageSize) return users, sess.Find(&users) diff --git a/models/repo/watch.go b/models/repo/watch.go index 1e63d5c3d2..610077816f 100644 --- a/models/repo/watch.go +++ b/models/repo/watch.go @@ -152,7 +152,7 @@ func GetRepoWatchers(ctx context.Context, repoID int64, opts db.ListOptions) ([] Join("LEFT", "watch", "`user`.id=`watch`.user_id"). And("`watch`.mode<>?", WatchModeDont) if opts.Page > 0 { - sess = db.SetSessionPagination(sess, &opts) + db.SetSessionPagination(sess, &opts) users := make([]*user_model.User, 0, opts.PageSize) return users, sess.Find(&users) diff --git a/models/user/badge.go b/models/user/badge.go index a4a465a9d5..f17a6f5cc5 100644 --- a/models/user/badge.go +++ b/models/user/badge.go @@ -69,7 +69,7 @@ func GetBadgeUsers(ctx context.Context, opts *GetBadgeUsersOptions) ([]*User, in Where("badge.slug=?", opts.BadgeSlug) if opts.Page > 0 { - sess = db.SetSessionPagination(sess, opts) + db.SetSessionPagination(sess, opts) } users := make([]*User, 0, opts.PageSize) diff --git a/models/user/search.go b/models/user/search.go index 36d1d3913b..36551b1913 100644 --- a/models/user/search.go +++ b/models/user/search.go @@ -15,7 +15,6 @@ import ( "code.gitea.io/gitea/modules/structs" "xorm.io/builder" - "xorm.io/xorm" ) // AdminUserOrderByMap represents all possible admin user search orders @@ -59,7 +58,7 @@ type SearchUserOptions struct { IncludeReserved bool } -func (opts *SearchUserOptions) toSearchQueryBase(ctx context.Context) *xorm.Session { +func (opts *SearchUserOptions) toSearchQueryBase(ctx context.Context) db.Session { var cond builder.Cond cond = builder.In("type", opts.Types) if opts.IncludeReserved { @@ -167,14 +166,15 @@ func SearchUsers(ctx context.Context, opts SearchUserOptions) (users []*User, _ opts.OrderBy = db.SearchOrderByAlphabetically } - sessQuery := opts.toSearchQueryBase(ctx).OrderBy(opts.OrderBy.String()) + sessQuery := opts.toSearchQueryBase(ctx) defer sessQuery.Close() + sessQuery.OrderBy(opts.OrderBy.String()) if opts.Page > 0 { - sessQuery = db.SetSessionPagination(sessQuery, &opts) + db.SetSessionPagination(sessQuery, &opts) } // the sql may contain JOIN, so we must only select User related columns - sessQuery = sessQuery.Select("`user`.*") + sessQuery.Select("`user`.*") users = make([]*User, 0, opts.PageSize) return users, count, sessQuery.Find(&users) } diff --git a/models/user/user.go b/models/user/user.go index 9d9551e28d..ba02a9949b 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -339,7 +339,7 @@ func GetUserFollowers(ctx context.Context, u, viewer *User, listOptions db.ListO And(isUserVisibleToViewerCond(viewer)) if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) users := make([]*User, 0, listOptions.PageSize) count, err := sess.FindAndCount(&users) @@ -361,7 +361,7 @@ func GetUserFollowing(ctx context.Context, u, viewer *User, listOptions db.ListO And(isUserVisibleToViewerCond(viewer)) if listOptions.Page > 0 { - sess = db.SetSessionPagination(sess, &listOptions) + db.SetSessionPagination(sess, &listOptions) users := make([]*User, 0, listOptions.PageSize) count, err := sess.FindAndCount(&users) diff --git a/package.json b/package.json index 19e22f65f1..da6b830f3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "type": "module", - "packageManager": "pnpm@11.0.8", + "packageManager": "pnpm@11.1.1", "engines": { "node": ">= 22.18.0", "pnpm": ">= 11.0.0" @@ -20,7 +20,7 @@ "@codemirror/lint": "6.9.6", "@codemirror/search": "6.7.0", "@codemirror/state": "6.6.0", - "@codemirror/view": "6.42.0", + "@codemirror/view": "6.42.1", "@deltablot/dropzone": "7.4.3", "@github/markdown-toolbar-element": "2.2.3", "@github/paste-markdown": "1.5.3", @@ -57,9 +57,9 @@ "pdfobject": "2.3.1", "perfect-debounce": "2.1.0", "postcss": "8.5.14", - "rolldown-license-plugin": "3.0.4", + "rolldown-license-plugin": "3.0.5", "sortablejs": "1.15.7", - "swagger-ui-dist": "5.32.5", + "swagger-ui-dist": "5.32.6", "tailwindcss": "3.4.19", "throttle-debounce": "5.0.2", "tippy.js": "6.3.7", @@ -67,7 +67,7 @@ "tributejs": "5.1.3", "uint8-to-base64": "0.2.1", "vanilla-colorful": "0.7.2", - "vite": "8.0.10", + "vite": "8.0.12", "vite-string-plugin": "2.0.4", "vue": "3.5.34", "vue-bar-graph": "2.2.0", @@ -76,26 +76,26 @@ "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "4.7.1", "@eslint/json": "1.2.0", - "@playwright/test": "1.59.1", + "@playwright/test": "1.60.0", "@stylistic/eslint-plugin": "5.10.0", "@stylistic/stylelint-plugin": "5.1.0", "@types/codemirror": "5.60.17", "@types/jquery": "4.0.0", "@types/js-yaml": "4.0.9", "@types/katex": "0.16.8", - "@types/node": "25.6.0", + "@types/node": "25.7.0", "@types/pdfobject": "2.2.5", "@types/sortablejs": "1.15.9", "@types/swagger-ui-dist": "3.30.6", "@types/throttle-debounce": "5.0.2", "@types/toastify-js": "1.12.4", - "@typescript-eslint/parser": "8.59.2", + "@typescript-eslint/parser": "8.59.3", "@vitejs/plugin-vue": "6.0.6", - "@vitest/eslint-plugin": "1.6.16", + "@vitest/eslint-plugin": "1.6.17", "eslint": "10.3.0", "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-array-func": "5.1.1", - "eslint-plugin-de-morgan": "2.1.1", + "eslint-plugin-de-morgan": "2.1.2", "eslint-plugin-github": "6.0.0", "eslint-plugin-import-x": "4.16.2", "eslint-plugin-playwright": "2.10.2", @@ -103,7 +103,7 @@ "eslint-plugin-sonarjs": "4.0.3", "eslint-plugin-unicorn": "64.0.0", "eslint-plugin-vue": "10.9.1", - "eslint-plugin-vue-scoped-css": "3.0.0", + "eslint-plugin-vue-scoped-css": "3.1.0", "eslint-plugin-wc": "3.1.0", "globals": "17.6.0", "happy-dom": "20.9.0", @@ -120,9 +120,9 @@ "stylelint-value-no-unknown-custom-properties": "6.1.1", "svgo": "4.0.1", "typescript": "6.0.3", - "typescript-eslint": "8.59.2", - "updates": "17.16.9", - "vitest": "4.1.5", + "typescript-eslint": "8.59.3", + "updates": "17.16.11", + "vitest": "4.1.6", "vue-tsc": "3.2.8" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7647b7a77e..6bd670ca40 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,8 +73,8 @@ importers: specifier: 6.6.0 version: 6.6.0 '@codemirror/view': - specifier: 6.42.0 - version: 6.42.0 + specifier: 6.42.1 + version: 6.42.1 '@deltablot/dropzone': specifier: 7.4.3 version: 7.4.3 @@ -101,22 +101,22 @@ importers: version: 19.25.0 '@replit/codemirror-indentation-markers': specifier: 6.5.3 - version: 6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0) + version: 6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1) '@replit/codemirror-lang-nix': specifier: 6.0.1 - version: 6.0.1(@codemirror/autocomplete@6.20.2)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/lr@1.4.10) + version: 6.0.1(@codemirror/autocomplete@6.20.2)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/lr@1.4.10) '@replit/codemirror-lang-svelte': specifier: 6.0.0 - version: 6.0.0(@codemirror/autocomplete@6.20.2)(@codemirror/lang-css@6.3.1)(@codemirror/lang-html@6.4.11)(@codemirror/lang-javascript@6.2.5)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/javascript@1.5.4)(@lezer/lr@1.4.10) + version: 6.0.0(@codemirror/autocomplete@6.20.2)(@codemirror/lang-css@6.3.1)(@codemirror/lang-html@6.4.11)(@codemirror/lang-javascript@6.2.5)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/javascript@1.5.4)(@lezer/lr@1.4.10) '@replit/codemirror-vscode-keymap': specifier: 6.0.2 - version: 6.0.2(@codemirror/autocomplete@6.20.2)(@codemirror/commands@6.10.3)(@codemirror/language@6.12.3)(@codemirror/lint@6.9.6)(@codemirror/search@6.7.0)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0) + version: 6.0.2(@codemirror/autocomplete@6.20.2)(@codemirror/commands@6.10.3)(@codemirror/language@6.12.3)(@codemirror/lint@6.9.6)(@codemirror/search@6.7.0)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1) '@resvg/resvg-wasm': specifier: 2.6.2 version: 2.6.2 '@vitejs/plugin-vue': specifier: 6.0.6 - version: 6.0.6(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0))(vue@3.5.34(typescript@6.0.3)) + version: 6.0.6(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0))(vue@3.5.34(typescript@6.0.3)) ansi_up: specifier: 6.0.6 version: 6.0.6 @@ -184,14 +184,14 @@ importers: specifier: 8.5.14 version: 8.5.14 rolldown-license-plugin: - specifier: 3.0.4 - version: 3.0.4(rolldown@1.0.0-rc.17) + specifier: 3.0.5 + version: 3.0.5(rolldown@1.0.0) sortablejs: specifier: 1.15.7 version: 1.15.7 swagger-ui-dist: - specifier: 5.32.5 - version: 5.32.5 + specifier: 5.32.6 + version: 5.32.6 tailwindcss: specifier: 3.4.19 version: 3.4.19 @@ -214,11 +214,11 @@ importers: specifier: 0.7.2 version: 0.7.2 vite: - specifier: 8.0.10 - version: 8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0) + specifier: 8.0.12 + version: 8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0) vite-string-plugin: specifier: 2.0.4 - version: 2.0.4(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)) + version: 2.0.4(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)) vue: specifier: 3.5.34 version: 3.5.34(typescript@6.0.3) @@ -236,8 +236,8 @@ importers: specifier: 1.2.0 version: 1.2.0 '@playwright/test': - specifier: 1.59.1 - version: 1.59.1 + specifier: 1.60.0 + version: 1.60.0 '@stylistic/eslint-plugin': specifier: 5.10.0 version: 5.10.0(eslint@10.3.0(jiti@2.7.0)) @@ -257,8 +257,8 @@ importers: specifier: 0.16.8 version: 0.16.8 '@types/node': - specifier: 25.6.0 - version: 25.6.0 + specifier: 25.7.0 + version: 25.7.0 '@types/pdfobject': specifier: 2.2.5 version: 2.2.5 @@ -275,29 +275,29 @@ importers: specifier: 1.12.4 version: 1.12.4 '@typescript-eslint/parser': - specifier: 8.59.2 - version: 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + specifier: 8.59.3 + version: 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) '@vitest/eslint-plugin': - specifier: 1.6.16 - version: 1.6.16(@typescript-eslint/eslint-plugin@8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)(vitest@4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0))) + specifier: 1.6.17 + version: 1.6.17(@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)(vitest@4.1.6(@types/node@25.7.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0))) eslint: specifier: 10.3.0 version: 10.3.0(jiti@2.7.0) eslint-import-resolver-typescript: specifier: 4.4.4 - version: 4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)) + version: 4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-array-func: specifier: 5.1.1 version: 5.1.1(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-de-morgan: - specifier: 2.1.1 - version: 2.1.1(eslint@10.3.0(jiti@2.7.0)) + specifier: 2.1.2 + version: 2.1.2(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-github: specifier: 6.0.0 version: 6.0.0(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-import-x: specifier: 4.16.2 - version: 4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)) + version: 4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-playwright: specifier: 2.10.2 version: 2.10.2(eslint@10.3.0(jiti@2.7.0)) @@ -312,10 +312,10 @@ importers: version: 64.0.0(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-vue: specifier: 10.9.1 - version: 10.9.1(@stylistic/eslint-plugin@5.10.0(eslint@10.3.0(jiti@2.7.0)))(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))) + version: 10.9.1(@stylistic/eslint-plugin@5.10.0(eslint@10.3.0(jiti@2.7.0)))(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))) eslint-plugin-vue-scoped-css: - specifier: 3.0.0 - version: 3.0.0(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))) + specifier: 3.1.0 + version: 3.1.0(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))) eslint-plugin-wc: specifier: 3.1.0 version: 3.1.0(eslint@10.3.0(jiti@2.7.0)) @@ -365,14 +365,14 @@ importers: specifier: 6.0.3 version: 6.0.3 typescript-eslint: - specifier: 8.59.2 - version: 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + specifier: 8.59.3 + version: 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) updates: - specifier: 17.16.9 - version: 17.16.9 + specifier: 17.16.11 + version: 17.16.11 vitest: - specifier: 4.1.5 - version: 4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)) + specifier: 4.1.6 + version: 4.1.6(@types/node@25.7.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)) vue-tsc: specifier: 3.2.8 version: 3.2.8(typescript@6.0.3) @@ -558,8 +558,8 @@ packages: '@codemirror/state@6.6.0': resolution: {integrity: sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==} - '@codemirror/view@6.42.0': - resolution: {integrity: sha512-+PJEyndSCrsS2oLH3DfWoLBcF3xfeyGXtLnpXqHY01kL3TogyCLD12hNvSu73ww2KFftrx3Rd0nGOigbSkU3Hw==} + '@codemirror/view@6.42.1': + resolution: {integrity: sha512-ToN3oFc0nsxNUYVF5P0ztLgbC4UPPjPtA9aKYhkOKQaZASpOUo6ISXyQLP66ctVwlDc+j6Jv0uK5IFALkiXztg==} '@csstools/css-calc@3.2.0': resolution: {integrity: sha512-bR9e6o2BDB12jzN/gIbjHa5wLJ4UjD1CB9pM7ehlc0ddk6EBz+yYS1EV2MF55/HUxrHcB/hehAyt5vhsA3hx7w==} @@ -1088,8 +1088,8 @@ packages: resolution: {integrity: sha512-3dsKlf4Ma7o+uxLIg5OI1Tgwfet2pE8WTbPjEGWvOe6CSjMtK0skJnnSVHaEVX4N4mYU81To0qDeZOPqjaUotg==} engines: {node: '>=12.4.0'} - '@oxc-project/types@0.127.0': - resolution: {integrity: sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==} + '@oxc-project/types@0.129.0': + resolution: {integrity: sha512-3oz8m3FGdr2nDXVqmFUw7jolKliC4MoyXYIG2c7gpjBnzUWQpUGIYcXYKxTdTi+N2jusvt610ckTMkxdwHkYEg==} '@package-json/types@0.0.12': resolution: {integrity: sha512-uu43FGU34B5VM9mCNjXCwLaGHYjXdNincqKLaraaCW+7S2+SmiBg1Nv8bPnmschrIfZmfKNY9f3fC376MRrObw==} @@ -1098,8 +1098,8 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@playwright/test@1.59.1': - resolution: {integrity: sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==} + '@playwright/test@1.60.0': + resolution: {integrity: sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==} engines: {node: '>=18'} hasBin: true @@ -1157,107 +1157,107 @@ packages: resolution: {integrity: sha512-FqALmHI8D4o6lk/LRWDnhw95z5eO+eAa6ORjVg09YRR7BkcM6oPHU9uyC0gtQG5vpFLvgpeU4+zEAz2H8APHNw==} engines: {node: '>= 10'} - '@rolldown/binding-android-arm64@1.0.0-rc.17': - resolution: {integrity: sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==} + '@rolldown/binding-android-arm64@1.0.0': + resolution: {integrity: sha512-TWMZnRLMe63C2Lhyicviu7ZHaU4kxa6PS3rofvc9GmcvptzNN11BcfQ4Sl7MwTOsisQoa2keB/EBdNCAnUo8vA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-rc.17': - resolution: {integrity: sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==} + '@rolldown/binding-darwin-arm64@1.0.0': + resolution: {integrity: sha512-6XcD+8k0gPVItNagEw78/qqcBDwKcwDYS8V2hRmVsfUSIrd8cWe/CBvRDI5toqFyPfj+FJr6t8U6Xj2P2prEew==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-rc.17': - resolution: {integrity: sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==} + '@rolldown/binding-darwin-x64@1.0.0': + resolution: {integrity: sha512-iN/tWVXRQDWvmZlKdceP1Dwug9GDpEymhb9p4xnEe6zvCg5lFmzVljl+1qR1NVx3yfGpr2Na+CuLmv5IU8uzfQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-rc.17': - resolution: {integrity: sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==} + '@rolldown/binding-freebsd-x64@1.0.0': + resolution: {integrity: sha512-jjQMDvvwSOuhOwMszD/klSOjyWMM3zI64hWTj9KT5x4MxRbZAf+7vLQ6qouRhtsLVFHr3f0ILaJAfgENPiQdAQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.17': - resolution: {integrity: sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0': + resolution: {integrity: sha512-d//Dtg2x6/m3mbV64yUGNnDGNZaDGRpDLLNGerHQUVObuNaIQaaDp25yUiqGXtHEXX+NP2d0wAlmKgpYgIAJ2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.17': - resolution: {integrity: sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==} + '@rolldown/binding-linux-arm64-gnu@1.0.0': + resolution: {integrity: sha512-n7Ofp0mx+aB2cC+Sdy5YtMnXtY9lchnHbY+3Yt0uq9JsWQExf4f5Whu0tK0R8Jdc9S6RchTHjIFY7uc92puOVQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.17': - resolution: {integrity: sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==} + '@rolldown/binding-linux-arm64-musl@1.0.0': + resolution: {integrity: sha512-EIVjy2cgd7uuMMo94FVkBp7F6DhcZAUwNURkSG3RwUmvAXR6s0ISxM81U+IydcZByPG0pZIHsf1b6kTxoFDgJA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.17': - resolution: {integrity: sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==} + '@rolldown/binding-linux-ppc64-gnu@1.0.0': + resolution: {integrity: sha512-JEwwOPcwTLAcpDQlqSmjEmfs63xJnSiUNIGvLcDLUHCWK4XowpS/7c7tUsUH6uT/ct6bMUTdXKfI8967FYj6mg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.17': - resolution: {integrity: sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==} + '@rolldown/binding-linux-s390x-gnu@1.0.0': + resolution: {integrity: sha512-0wjCFhLrihtAubnT9iA0N++0pSV0z5Hg7tNGdNJ4RFaINceHadoF+kiFGyY1qSSNVIAZtLotG8Ju1bgDPkjnFA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.17': - resolution: {integrity: sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==} + '@rolldown/binding-linux-x64-gnu@1.0.0': + resolution: {integrity: sha512-Dfn7iak9BcMMePxcoJfpSbWqnEyrp/dRF63/8qW/eHBdOZov6x5aShLLEYGYdIeSJ6vMLK/XCVB+lGIxm41bQA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.0.0-rc.17': - resolution: {integrity: sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==} + '@rolldown/binding-linux-x64-musl@1.0.0': + resolution: {integrity: sha512-5/utzzDmD/pD/bmuaUcbTf/sZYy0aztwIVlfpoW1fTjCZ0BaPOMVWGZL1zvgxyi7ZIVYWlxKONHmSbHuiOh8Jw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-openharmony-arm64@1.0.0-rc.17': - resolution: {integrity: sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==} + '@rolldown/binding-openharmony-arm64@1.0.0': + resolution: {integrity: sha512-ouJs8VcUomfLfpbUECqFMRqdV4x6aeAK3MA4m6vTrJJjKyWTV5KnxZx7Jd9G+GlDaQQxubcba00x16OyJ1meig==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-rc.17': - resolution: {integrity: sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==} + '@rolldown/binding-wasm32-wasi@1.0.0': + resolution: {integrity: sha512-E+oHKGiDA+lsKMmFtffDDw91EryDT7uJocrIuCHqhm6bCTM6xFK+3gaCkYOHfPwQr0cCNarSM2xaELoQDz9jJg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.17': - resolution: {integrity: sha512-gUmyzBl3SPMa6hrqFUth9sVfcLBlYsbMzBx5PlexMroZStgzGqlZ26pYG89rBb45Mnia+oil6YAIFeEWGWhoZA==} + '@rolldown/binding-win32-arm64-msvc@1.0.0': + resolution: {integrity: sha512-yYK02n8Rngo+gbm1y6G0+7jk1sJ/2Wt7K0me0Y7k/ErBpyf+LJ2gFpqWVTcRV1rUepBlQRmpgWkTQCiiwrK0Ow==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.17': - resolution: {integrity: sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==} + '@rolldown/binding-win32-x64-msvc@1.0.0': + resolution: {integrity: sha512-14bpChMahXRRXiTwahSl+zzHPW6qQTXtkMuJBFlbo+pqSAews2d4BdCSHfrJ/MBsCZtpmTafsY+1QhBzitcmdg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] + '@rolldown/pluginutils@1.0.0': + resolution: {integrity: sha512-aKs/3GSWyV0mrhNmt/96/Z3yczC3yvrzYATCiCXQebBsGyYzjNdUphRVLeJQ67ySKVXRfMxt2lm12pmXvbPFQQ==} + '@rolldown/pluginutils@1.0.0-rc.13': resolution: {integrity: sha512-3ngTAv6F/Py35BsYbeeLeecvhMKdsKm4AoOETVhAA+Qc8nrA2I0kF7oa93mE9qnIurngOSpMnQ0x2nQY2FPviA==} - '@rolldown/pluginutils@1.0.0-rc.17': - resolution: {integrity: sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==} - '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -1470,8 +1470,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@25.6.0': - resolution: {integrity: sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==} + '@types/node@25.7.0': + resolution: {integrity: sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg==} '@types/pdfobject@2.2.5': resolution: {integrity: sha512-7gD5tqc/RUDq0PyoLemL0vEHxBYi+zY0WVaFAx/Y0jBsXFgot1vB9No1GhDZGwRGJMCIZbgAb74QG9MTyTNU/g==} @@ -1515,63 +1515,63 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} - '@typescript-eslint/eslint-plugin@8.59.2': - resolution: {integrity: sha512-j/bwmkBvHUtPNxzuWe5z6BEk3q54YRyGlBXkSsmfoih7zNrBvl5A9A98anlp/7JbyZcWIJ8KXo/3Tq/DjFLtuQ==} + '@typescript-eslint/eslint-plugin@8.59.3': + resolution: {integrity: sha512-PwFvSKsXGShKGW6n5bZOhGHEcCZXM8HofLK9fNsEwZXzFRjoY+XT1Vsf1zgyXdwTr0ZYz1/2tkZ0DBTT9jZjhw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.59.2 + '@typescript-eslint/parser': ^8.59.3 eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/parser@8.59.2': - resolution: {integrity: sha512-plR3pp6D+SSUn1HM7xvSkx12/DhoHInI2YF35KAcVFNZvlC0gtrWqx7Qq1oH2Ssgi0vlFRCTbP+DZc7B9+TtsQ==} + '@typescript-eslint/parser@8.59.3': + resolution: {integrity: sha512-HPwA+hVkfcriajbNvTmZv4VRauibay+cWArYUYq7u7W7PmGShMxbPxLvrwDme55a6d5alG3nrYfhyJ/G28XlLg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.59.2': - resolution: {integrity: sha512-+2hqvEkeyf/0FBor67duF0Ll7Ot8jyKzDQOSrxazF/danillRq2DwR9dLptsXpoZQqxE1UisSmoZewrlPas9Vw==} + '@typescript-eslint/project-service@8.59.3': + resolution: {integrity: sha512-ECiUWa/KYRGDFUqTNehaRgzDshnJfkTABJxVemHk4ko22gcr0ukloKjWvyQ64g8YCV/UI47kN1dbmjf/GaQYng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.59.2': - resolution: {integrity: sha512-JzfyEpEtOU89CcFSwyNS3mu4MLvLSXqnmX05+aKBDM+TdR5jzcGOEBwxwGNxrEQ7p/z6kK2WyioCGBf2zZBnvg==} + '@typescript-eslint/scope-manager@8.59.3': + resolution: {integrity: sha512-t2LvZnoEfzKtnPjgeEu41xw5gxq9mQVfYy4OoZ4Vlt0sk3JwxmhCca/AR7DwOiHrjWgjAj6as4AhRLKSDfvZIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.59.2': - resolution: {integrity: sha512-BKK4alN7oi4C/zv4VqHQ+uRU+lTa6JGIZ7s1juw7b3RHo9OfKB+bKX3u0iVZetdsUCBBkSbdWbarJbmN0fTeSw==} + '@typescript-eslint/tsconfig-utils@8.59.3': + resolution: {integrity: sha512-PcIJHjmaREXLgIAIzLnSY9VucEzz8FKXsRgFa1DmdGCK/5tJpW03TKJF01Q6VZd1lLdz2sIKPWaDUZN9dp//dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.59.2': - resolution: {integrity: sha512-nhqaj1nmTdVVl/BP5omXNRGO38jn5iosis2vbdmupF2txCf8ylWT8lx+JlvMYYVqzGVKtjojUFoQ3JRWK+mfzQ==} + '@typescript-eslint/type-utils@8.59.3': + resolution: {integrity: sha512-g71d8QD8UaiHGvrJwyIS1hCX5r63w6Jll+4VEYhEAHXTDIqX1JgxhTAbEHtKntL9kuc4jRo7/GWw5xfCepSccQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.59.2': - resolution: {integrity: sha512-e82GVOE8Ps3E++Egvb6Y3Dw0S10u8NkQ9KXmtRhCWJJ8kDhOJTvtMAWnFL16kB1583goCWXsr0NieKCZMs2/0Q==} + '@typescript-eslint/types@8.59.3': + resolution: {integrity: sha512-ePFoH0g4ludssdRFqqDxQePCxU4WQyRa9+XVwjm7yLn0FKhMeoetC+qBEEI1Eyb1pGSDveTIT09Bvw2WhlGayg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.59.2': - resolution: {integrity: sha512-o0XPGNwcWw+FIwStOWn+BwBuEmL6QXP0rsvAFg7ET1dey1Nr6Wb1ac8p5HEsK0ygO/6mUxlk+YWQD9xcb/nnXg==} + '@typescript-eslint/typescript-estree@8.59.3': + resolution: {integrity: sha512-CbRjVRAf7Lr9Kr8RopKcbY45p2VfmmHrm0ygOCYFi7oU8q19m0Fs/6iHS7kNOmwpp+ob07ZVcAqlxUod9lYdmg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.59.2': - resolution: {integrity: sha512-Juw3EinkXqjaffxz6roowvV7GZT/kET5vSKKZT6upl5TXdWkLkYmNPXwDDL2Vkt2DPn0nODIS4egC/0AGxKo/Q==} + '@typescript-eslint/utils@8.59.3': + resolution: {integrity: sha512-JAvT14goBzRzzzZyqq3P9BLArIxTtQURUtFgQ/V7FO+eU+Gg6ES+5ymOPP1wRxXcxAYeivCk4uS3jCKWI1K8Zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.59.2': - resolution: {integrity: sha512-NwjLUnGy8/Zfx23fl50tRC8rYaYnM52xNRYFAXvmiil9yh1+K6aRVQMnzW6gQB/1DLgWt977lYQn7C+wtgXZiA==} + '@typescript-eslint/visitor-keys@8.59.3': + resolution: {integrity: sha512-f1UQF7ggd42YiwI5wGrRaPsa+P0CINBlrkLPmGfpq/u/I/oVtecoEIfFR9ag/oa1sLOsRNZ6xehf6qMZhQGBDg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@unrs/resolver-binding-android-arm-eabi@1.11.1': @@ -1687,8 +1687,8 @@ packages: vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 vue: ^3.2.25 - '@vitest/eslint-plugin@1.6.16': - resolution: {integrity: sha512-2pBN1F1JXq6zTSaYC58CMJa7pGxXIRsLfOioeZM4cPE3pRdSh1ySTSoHPQlOTEF5WgoVzWZQxhGQ3ygT78hOVg==} + '@vitest/eslint-plugin@1.6.17': + resolution: {integrity: sha512-sIVY9ZeVcXyPxFCNRkIt8Yw4keKIcUyp9/8qnmuomPwE+ST1htw5sZsbqdUMTiah9SmCg1JYoK9RqdDtPeNYYg==} engines: {node: '>=18'} peerDependencies: '@typescript-eslint/eslint-plugin': '*' @@ -1703,11 +1703,11 @@ packages: vitest: optional: true - '@vitest/expect@4.1.5': - resolution: {integrity: sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==} + '@vitest/expect@4.1.6': + resolution: {integrity: sha512-7EHDquPthALSV0jhhjgEW8FXaviMx7rSqu8W6oqCoAuOhKov814P99QDV1pxMA3QPv21YudvJngIhjrNI4opLg==} - '@vitest/mocker@4.1.5': - resolution: {integrity: sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==} + '@vitest/mocker@4.1.6': + resolution: {integrity: sha512-MCFc63czMjEInOlcY2cpQCvCN+KgbAn+60xu9cMgP4sKaLC5JNAKw7JH8QdAnoAC88hW1IiSNZ+GgVXlN1UcMQ==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1717,20 +1717,20 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.5': - resolution: {integrity: sha512-7I3q6l5qr03dVfMX2wCo9FxwSJbPdwKjy2uu/YPpU3wfHvIL4QHwVRp57OfGrDFeUJ8/8QdfBKIV12FTtLn00g==} + '@vitest/pretty-format@4.1.6': + resolution: {integrity: sha512-h5SxD/IzNhZYnrSZRsUZQIC+vD0GY8cUvq0iwsmkFKixRCKLLWqCXa/FIQ4S1R+sI+PGoojkHsdNrbZiM9Qpgw==} - '@vitest/runner@4.1.5': - resolution: {integrity: sha512-2D+o7Pr82IEO46YPpoA/YU0neeyr6FTerQb5Ro7BUnBuv6NQtT/kmVnczngiMEBhzgqz2UZYl5gArejsyERDSQ==} + '@vitest/runner@4.1.6': + resolution: {integrity: sha512-nOPCmn2+yD0ZNmKdsXGv/UxMMWbMuKeD6GyYncNwdkYDxpQvrPSKYj2rWuDjC2Y4b6w6hjip5dBKFzEUuZe3vA==} - '@vitest/snapshot@4.1.5': - resolution: {integrity: sha512-zypXEt4KH/XgKGPUz4eC2AvErYx0My5hfL8oDb1HzGFpEk1P62bxSohdyOmvz+d9UJwanI68MKwr2EquOaOgMQ==} + '@vitest/snapshot@4.1.6': + resolution: {integrity: sha512-YhsdE6xAVfTDmzjxL2ZDUvjj+ZsgyOKe+TdQzqkD72wIOmHka8NuGQ6NpTNZv9D2Z63fbwWKJPeVpEw4EQgYxw==} - '@vitest/spy@4.1.5': - resolution: {integrity: sha512-2lNOsh6+R2Idnf1TCZqSwYlKN2E/iDlD8sgU59kYVl+OMDmvldO1VDk39smRfpUNwYpNRVn3w4YfuC7KfbBnkQ==} + '@vitest/spy@4.1.6': + resolution: {integrity: sha512-JFKxMx6udhwKh/Ldo270e17QX710vgunMkuPAvXjHSvC6oqLWAHhVhjg/I71q0u0CBSErIODV1Kjv0FQNSWjdg==} - '@vitest/utils@4.1.5': - resolution: {integrity: sha512-76wdkrmfXfqGjueGgnb45ITPyUi1ycZ4IHgC2bhPDUfWHklY/q3MdLOAB+TF1e6xfl8NxNY0ZYaPCFNWSsw3Ug==} + '@vitest/utils@4.1.6': + resolution: {integrity: sha512-FxIY+U81R3LGKCxaHHFRQ5+g6/iRgGLmeHWdp2Amj4ljQRrEIWHmZyDfDYBRZlpyqA7qKxtS9DD1dhk8RnRIVQ==} '@volar/language-core@2.4.28': resolution: {integrity: sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==} @@ -2503,8 +2503,8 @@ packages: peerDependencies: eslint: '>=8.51.0' - eslint-plugin-de-morgan@2.1.1: - resolution: {integrity: sha512-0CeQ38b8hMMa3gO5vLnGcQS/xatvYno9RvjKoZ4UVaHjzvHZhR9i6+0ZkZhbbZF1FW7rqrS2MtcH3tVBejrmHQ==} + eslint-plugin-de-morgan@2.1.2: + resolution: {integrity: sha512-6/MXP77FUrFGTdJ2Lny3Jv027bE3SUHDf+/VBUBckpH5TskOY5G4UX+AebqJeUpt3nXjy3S0KWBRwTItVQwgvw==} engines: {node: ^20.0.0 || >=22.0.0} peerDependencies: eslint: ^8.45.0 || ^9.0.0 || ^10.0.0 @@ -2606,8 +2606,8 @@ packages: peerDependencies: eslint: '>=9.38.0' - eslint-plugin-vue-scoped-css@3.0.0: - resolution: {integrity: sha512-YNGP0nUBFWFQc//kpvxnGquKjKDkEaWoDFUcZbXCX6L5UIWDlbl34/GXlEEls06bzDJ9ETRpLlmrWgvvZg+yIg==} + eslint-plugin-vue-scoped-css@3.1.0: + resolution: {integrity: sha512-R9XLrIZaP6QGz9b4kO2K4+lP4NcO2TKcw71zBtIYCoqqTk5ja1ySruYAllBT2LPIJVQ4NZaB2IFSvLjLEpYqQA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: eslint: '>=9.38.0' @@ -3251,9 +3251,6 @@ packages: lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} - lodash@4.18.1: - resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} @@ -3566,13 +3563,13 @@ packages: pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} - playwright-core@1.59.1: - resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==} + playwright-core@1.60.0: + resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==} engines: {node: '>=18'} hasBin: true - playwright@1.59.1: - resolution: {integrity: sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==} + playwright@1.60.0: + resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==} engines: {node: '>=18'} hasBin: true @@ -3752,13 +3749,13 @@ packages: robust-predicates@3.0.3: resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} - rolldown-license-plugin@3.0.4: - resolution: {integrity: sha512-TSn+oxPSJLh5xtzPZlbTftFCqPA/DUhYewh4Pik8GJlsue53pJGV/HKipLgTE+TIsvgQDyS+LUgBPXFLvcasxQ==} + rolldown-license-plugin@3.0.5: + resolution: {integrity: sha512-C4IdhIsPQVv3e2z4//7M4S14XS+GGyvhzNMmqqKy01GTnZ4VWOtrpCIADEBclLeTooCmyxlT2jp59f89NwWN1w==} peerDependencies: rolldown: '*' - rolldown@1.0.0-rc.17: - resolution: {integrity: sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==} + rolldown@1.0.0: + resolution: {integrity: sha512-yD986aXDESFGS95spT1LAv0jssywP4npMEjmMHyN2/5+eE8qQJUype2AaKkRiLgBgyD0LFlubwAht7VmY8rGoA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -3981,8 +3978,8 @@ packages: svgson@5.3.1: resolution: {integrity: sha512-qdPgvUNWb40gWktBJnbJRelWcPzkLed/ShhnRsjbayXz8OtdPOzbil9jtiZdrYvSDumAz/VNQr6JaNfPx/gvPA==} - swagger-ui-dist@5.32.5: - resolution: {integrity: sha512-7/FQfWe9A4qoyYFdAwy0chD0uDYidDp/ZT9VQ9LZlgD4AnnHJk8/+ytAA1HkJYOPySmK6helPDdJQMlcumt7HA==} + swagger-ui-dist@5.32.6: + resolution: {integrity: sha512-75ttZNaYCLoFPnozPZcTUU6mS3wKT8l7WLjU5zJSHFeJa23i5vtnze6IiCl4jDMPeQTXVXIgovq4M11NNfQvSA==} symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -4084,8 +4081,8 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - typescript-eslint@8.59.2: - resolution: {integrity: sha512-pJw051uomb3ZeCzGTpRb8RbEqB5Y4WWet8gl/GcTlU35BSx0PVdZ86/bqkQCyKKuraVQEK7r6kBHQXF+fBhkoQ==} + typescript-eslint@8.59.3: + resolution: {integrity: sha512-KgusgyDgG4LI8Ih/sWaCtZ06tckLAS5CvT5A4D1Q7bYVoAAyzwiZvE4BmwDHkhRVkvhRBepKeASoFzQetha7Fg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -4113,8 +4110,8 @@ packages: uint8-to-base64@0.2.1: resolution: {integrity: sha512-uO/84GaoDUfiAxpa8EksjVLE77A9Kc7ZTziN4zRpq4de9yLaLcZn3jx1/sVjyupsywcVX6RKWbqLe7gUNyzH+Q==} - undici-types@7.19.2: - resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==} + undici-types@7.21.0: + resolution: {integrity: sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ==} unicorn-magic@0.4.0: resolution: {integrity: sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==} @@ -4133,8 +4130,8 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - updates@17.16.9: - resolution: {integrity: sha512-fH8FlkdS3afc1pnI3KUBnLrixHg4iaRBSL0J2FK8C1BXZTufqJEj4S1HhshugsHouth2lB3lOYYU5rIGbfHx5g==} + updates@17.16.11: + resolution: {integrity: sha512-ZS1Vsa8JCz4AWCt88dC4YQlopfLXYdaLsDoXokOpmhcwTHDwqPLtpiMNOIv3oKJut52FAGaondwCrVlI0ngWag==} engines: {node: '>=22'} hasBin: true @@ -4159,13 +4156,13 @@ packages: peerDependencies: vite: '*' - vite@8.0.10: - resolution: {integrity: sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==} + vite@8.0.12: + resolution: {integrity: sha512-w2dDofOWv2QB09ZITZBsvKTVAlYvPR4IAmrY/v0ir9KvLs0xybR7i48wxhM1/oyBWO34wPns+bPGw5ZrZqDpZg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 - '@vitejs/devtools': ^0.1.0 + '@vitejs/devtools': ^0.1.18 esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 @@ -4202,20 +4199,20 @@ packages: yaml: optional: true - vitest@4.1.5: - resolution: {integrity: sha512-9Xx1v3/ih3m9hN+SbfkUyy0JAs72ap3r7joc87XL6jwF0jGg6mFBvQ1SrwaX+h8BlkX6Hz9shdd1uo6AF+ZGpg==} + vitest@4.1.6: + resolution: {integrity: sha512-6lvjbS3p9b4CrdCmguzbh2/4uoXhGE2q71R4OX5sqF9R1bo9Xd6fGrMAfvp5wnCzlBnFVdCOp6onuTQVbo8iUQ==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.5 - '@vitest/browser-preview': 4.1.5 - '@vitest/browser-webdriverio': 4.1.5 - '@vitest/coverage-istanbul': 4.1.5 - '@vitest/coverage-v8': 4.1.5 - '@vitest/ui': 4.1.5 + '@vitest/browser-playwright': 4.1.6 + '@vitest/browser-preview': 4.1.6 + '@vitest/browser-webdriverio': 4.1.6 + '@vitest/coverage-istanbul': 4.1.6 + '@vitest/coverage-v8': 4.1.6 + '@vitest/ui': 4.1.6 happy-dom: '*' jsdom: '*' vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -4464,14 +4461,14 @@ snapshots: dependencies: '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@codemirror/commands@6.10.3': dependencies: '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@codemirror/lang-angular@0.1.4': @@ -4511,7 +4508,7 @@ snapshots: '@codemirror/lang-javascript': 6.2.5 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/css': 1.3.3 '@lezer/html': 1.3.13 @@ -4527,7 +4524,7 @@ snapshots: '@codemirror/language': 6.12.3 '@codemirror/lint': 6.9.6 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/javascript': 1.5.4 @@ -4537,7 +4534,7 @@ snapshots: '@codemirror/lang-html': 6.4.11 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 @@ -4561,7 +4558,7 @@ snapshots: '@codemirror/lang-html': 6.4.11 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 @@ -4572,7 +4569,7 @@ snapshots: '@codemirror/lang-html': 6.4.11 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/markdown': 1.6.3 @@ -4635,7 +4632,7 @@ snapshots: '@codemirror/autocomplete': 6.20.2 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/xml': 1.0.6 @@ -4678,7 +4675,7 @@ snapshots: '@codemirror/language@6.12.3': dependencies: '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 @@ -4691,20 +4688,20 @@ snapshots: '@codemirror/lint@6.9.6': dependencies: '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 crelt: 1.0.6 '@codemirror/search@6.7.0': dependencies: '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 crelt: 1.0.6 '@codemirror/state@6.6.0': dependencies: '@marijn/find-cluster-break': 1.0.2 - '@codemirror/view@6.42.0': + '@codemirror/view@6.42.1': dependencies: '@codemirror/state': 6.6.0 crelt: 1.0.6 @@ -4954,14 +4951,14 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 25.6.0 + '@types/node': 25.7.0 jest-mock: 29.7.0 '@jest/fake-timers@29.7.0': dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 25.6.0 + '@types/node': 25.7.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4975,7 +4972,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 25.6.0 + '@types/node': 25.7.0 '@types/yargs': 17.0.35 chalk: 4.1.2 @@ -5208,15 +5205,15 @@ snapshots: dependencies: '@nolyfill/shared': 1.0.44 - '@oxc-project/types@0.127.0': {} + '@oxc-project/types@0.129.0': {} '@package-json/types@0.0.12': {} '@pkgr/core@0.2.9': {} - '@playwright/test@1.59.1': + '@playwright/test@1.60.0': dependencies: - playwright: 1.59.1 + playwright: 1.60.0 '@popperjs/core@2.11.8': {} @@ -5224,23 +5221,23 @@ snapshots: dependencies: object-assign: 4.1.1 - '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)': + '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)': dependencies: '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 - '@replit/codemirror-lang-nix@6.0.1(@codemirror/autocomplete@6.20.2)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/lr@1.4.10)': + '@replit/codemirror-lang-nix@6.0.1(@codemirror/autocomplete@6.20.2)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/lr@1.4.10)': dependencies: '@codemirror/autocomplete': 6.20.2 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 - '@replit/codemirror-lang-svelte@6.0.0(@codemirror/autocomplete@6.20.2)(@codemirror/lang-css@6.3.1)(@codemirror/lang-html@6.4.11)(@codemirror/lang-javascript@6.2.5)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/javascript@1.5.4)(@lezer/lr@1.4.10)': + '@replit/codemirror-lang-svelte@6.0.0(@codemirror/autocomplete@6.20.2)(@codemirror/lang-css@6.3.1)(@codemirror/lang-html@6.4.11)(@codemirror/lang-javascript@6.2.5)(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)(@lezer/common@1.5.2)(@lezer/highlight@1.2.3)(@lezer/javascript@1.5.4)(@lezer/lr@1.4.10)': dependencies: '@codemirror/autocomplete': 6.20.2 '@codemirror/lang-css': 6.3.1 @@ -5248,13 +5245,13 @@ snapshots: '@codemirror/lang-javascript': 6.2.5 '@codemirror/language': 6.12.3 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/javascript': 1.5.4 '@lezer/lr': 1.4.10 - '@replit/codemirror-vscode-keymap@6.0.2(@codemirror/autocomplete@6.20.2)(@codemirror/commands@6.10.3)(@codemirror/language@6.12.3)(@codemirror/lint@6.9.6)(@codemirror/search@6.7.0)(@codemirror/state@6.6.0)(@codemirror/view@6.42.0)': + '@replit/codemirror-vscode-keymap@6.0.2(@codemirror/autocomplete@6.20.2)(@codemirror/commands@6.10.3)(@codemirror/language@6.12.3)(@codemirror/lint@6.9.6)(@codemirror/search@6.7.0)(@codemirror/state@6.6.0)(@codemirror/view@6.42.1)': dependencies: '@codemirror/autocomplete': 6.20.2 '@codemirror/commands': 6.10.3 @@ -5262,63 +5259,63 @@ snapshots: '@codemirror/lint': 6.9.6 '@codemirror/search': 6.7.0 '@codemirror/state': 6.6.0 - '@codemirror/view': 6.42.0 + '@codemirror/view': 6.42.1 '@resvg/resvg-wasm@2.6.2': {} - '@rolldown/binding-android-arm64@1.0.0-rc.17': + '@rolldown/binding-android-arm64@1.0.0': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-rc.17': + '@rolldown/binding-darwin-arm64@1.0.0': optional: true - '@rolldown/binding-darwin-x64@1.0.0-rc.17': + '@rolldown/binding-darwin-x64@1.0.0': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-rc.17': + '@rolldown/binding-freebsd-x64@1.0.0': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.17': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.17': + '@rolldown/binding-linux-arm64-gnu@1.0.0': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.17': + '@rolldown/binding-linux-arm64-musl@1.0.0': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.17': + '@rolldown/binding-linux-ppc64-gnu@1.0.0': optional: true - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.17': + '@rolldown/binding-linux-s390x-gnu@1.0.0': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.17': + '@rolldown/binding-linux-x64-gnu@1.0.0': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-rc.17': + '@rolldown/binding-linux-x64-musl@1.0.0': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-rc.17': + '@rolldown/binding-openharmony-arm64@1.0.0': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-rc.17': + '@rolldown/binding-wasm32-wasi@1.0.0': dependencies: '@emnapi/core': 1.10.0 '@emnapi/runtime': 1.10.0 '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.17': + '@rolldown/binding-win32-arm64-msvc@1.0.0': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.17': + '@rolldown/binding-win32-x64-msvc@1.0.0': optional: true + '@rolldown/pluginutils@1.0.0': {} + '@rolldown/pluginutils@1.0.0-rc.13': {} - '@rolldown/pluginutils@1.0.0-rc.17': {} - '@rtsao/scc@1.1.0': {} '@scarf/scarf@1.4.0': {} @@ -5358,7 +5355,7 @@ snapshots: '@stylistic/eslint-plugin@5.10.0(eslint@10.3.0(jiti@2.7.0))': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.7.0)) - '@typescript-eslint/types': 8.59.2 + '@typescript-eslint/types': 8.59.3 eslint: 10.3.0(jiti@2.7.0) eslint-visitor-keys: 4.2.1 espree: 10.4.0 @@ -5543,7 +5540,7 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 25.6.0 + '@types/node': 25.7.0 '@types/tough-cookie': 4.0.5 parse5: 7.3.0 @@ -5557,9 +5554,9 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@25.6.0': + '@types/node@25.7.0': dependencies: - undici-types: 7.19.2 + undici-types: 7.21.0 '@types/pdfobject@2.2.5': {} @@ -5588,7 +5585,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 25.6.0 + '@types/node': 25.7.0 '@types/yargs-parser@21.0.3': {} @@ -5596,14 +5593,14 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/type-utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/type-utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.59.3 eslint: 10.3.0(jiti@2.7.0) ignore: 7.0.5 natural-compare: 1.4.0 @@ -5612,14 +5609,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/type-utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/type-utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.59.3 eslint: 10.3.0(jiti@2.7.0) ignore: 7.0.5 natural-compare: 1.4.0 @@ -5628,66 +5625,66 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': + '@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.59.2(typescript@5.9.3)': + '@typescript-eslint/project-service@8.59.3(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@5.9.3) - '@typescript-eslint/types': 8.59.2 + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@5.9.3) + '@typescript-eslint/types': 8.59.3 debug: 4.4.3 typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.59.2(typescript@6.0.3)': + '@typescript-eslint/project-service@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@6.0.3) - '@typescript-eslint/types': 8.59.2 + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) + '@typescript-eslint/types': 8.59.3 debug: 4.4.3 typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.59.2': + '@typescript-eslint/scope-manager@8.59.3': dependencies: - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/visitor-keys': 8.59.3 - '@typescript-eslint/tsconfig-utils@8.59.2(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.59.3(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/tsconfig-utils@8.59.2(typescript@6.0.3)': + '@typescript-eslint/tsconfig-utils@8.59.3(typescript@6.0.3)': dependencies: typescript: 6.0.3 - '@typescript-eslint/type-utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': dependencies: - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@5.9.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.9.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) ts-api-utils: 2.5.0(typescript@5.9.3) @@ -5695,11 +5692,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/type-utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) ts-api-utils: 2.5.0(typescript@6.0.3) @@ -5707,14 +5704,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.59.2': {} + '@typescript-eslint/types@8.59.3': {} - '@typescript-eslint/typescript-estree@8.59.2(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.59.3(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.59.2(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@5.9.3) - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/project-service': 8.59.3(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@5.9.3) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 minimatch: 10.2.5 semver: 7.8.0 @@ -5724,12 +5721,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.59.2(typescript@6.0.3)': + '@typescript-eslint/typescript-estree@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.59.2(typescript@6.0.3) - '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@6.0.3) - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/visitor-keys': 8.59.2 + '@typescript-eslint/project-service': 8.59.3(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 minimatch: 10.2.5 semver: 7.8.0 @@ -5739,31 +5736,31 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': + '@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.9.3) eslint: 10.3.0(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/types': 8.59.2 - '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) eslint: 10.3.0(jiti@2.7.0) typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.59.2': + '@typescript-eslint/visitor-keys@8.59.3': dependencies: - '@typescript-eslint/types': 8.59.2 + '@typescript-eslint/types': 8.59.3 eslint-visitor-keys: 5.0.1 '@unrs/resolver-binding-android-arm-eabi@1.11.1': @@ -5830,62 +5827,62 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vitejs/plugin-vue@6.0.6(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0))(vue@3.5.34(typescript@6.0.3))': + '@vitejs/plugin-vue@6.0.6(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0))(vue@3.5.34(typescript@6.0.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.13 - vite: 8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0) + vite: 8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0) vue: 3.5.34(typescript@6.0.3) - '@vitest/eslint-plugin@1.6.16(@typescript-eslint/eslint-plugin@8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)(vitest@4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)))': + '@vitest/eslint-plugin@1.6.17(@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3)(vitest@4.1.6(@types/node@25.7.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)))': dependencies: - '@typescript-eslint/scope-manager': 8.59.2 - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) eslint: 10.3.0(jiti@2.7.0) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) typescript: 6.0.3 - vitest: 4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)) + vitest: 4.1.6(@types/node@25.7.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)) transitivePeerDependencies: - supports-color - '@vitest/expect@4.1.5': + '@vitest/expect@4.1.6': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.5 - '@vitest/utils': 4.1.5 + '@vitest/spy': 4.1.6 + '@vitest/utils': 4.1.6 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.5(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0))': + '@vitest/mocker@4.1.6(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0))': dependencies: - '@vitest/spy': 4.1.5 + '@vitest/spy': 4.1.6 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0) + vite: 8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0) - '@vitest/pretty-format@4.1.5': + '@vitest/pretty-format@4.1.6': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@4.1.5': + '@vitest/runner@4.1.6': dependencies: - '@vitest/utils': 4.1.5 + '@vitest/utils': 4.1.6 pathe: 2.0.3 - '@vitest/snapshot@4.1.5': + '@vitest/snapshot@4.1.6': dependencies: - '@vitest/pretty-format': 4.1.5 - '@vitest/utils': 4.1.5 + '@vitest/pretty-format': 4.1.6 + '@vitest/utils': 4.1.6 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.5': {} + '@vitest/spy@4.1.6': {} - '@vitest/utils@4.1.5': + '@vitest/utils@4.1.6': dependencies: - '@vitest/pretty-format': 4.1.5 + '@vitest/pretty-format': 4.1.6 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -6638,7 +6635,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)): dependencies: debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) @@ -6649,19 +6646,19 @@ snapshots: tinyglobby: 0.2.16 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) - eslint-plugin-import-x: 4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) + eslint-plugin-import-x: 4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) eslint: 10.3.0(jiti@2.7.0) eslint-import-resolver-node: 0.3.10 - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)))(eslint-plugin-import@2.32.0)(eslint@10.3.0(jiti@2.7.0)) transitivePeerDependencies: - supports-color @@ -6669,7 +6666,7 @@ snapshots: dependencies: eslint: 10.3.0(jiti@2.7.0) - eslint-plugin-de-morgan@2.1.1(eslint@10.3.0(jiti@2.7.0)): + eslint-plugin-de-morgan@2.1.2(eslint@10.3.0(jiti@2.7.0)): dependencies: eslint: 10.3.0(jiti@2.7.0) @@ -6698,8 +6695,8 @@ snapshots: '@eslint/eslintrc': 3.3.5 '@eslint/js': 9.39.4 '@github/browserslist-config': 1.0.0 - '@typescript-eslint/eslint-plugin': 8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) aria-query: 5.3.2 eslint: 10.3.0(jiti@2.7.0) eslint-config-prettier: 10.1.8(eslint@10.3.0(jiti@2.7.0)) @@ -6707,7 +6704,7 @@ snapshots: eslint-plugin-eslint-comments: 3.2.0(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-filenames: 1.3.2(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-i18n-text: 1.0.1(eslint@10.3.0(jiti@2.7.0)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-jsx-a11y: 6.10.2(eslint@10.3.0(jiti@2.7.0)) eslint-plugin-no-only-tests: 3.4.0 eslint-plugin-prettier: 5.5.5(eslint-config-prettier@10.1.8(eslint@10.3.0(jiti@2.7.0)))(eslint@10.3.0(jiti@2.7.0))(prettier@3.8.3) @@ -6717,7 +6714,7 @@ snapshots: prettier: 3.8.3 svg-element-attributes: 1.3.1 typescript: 5.9.3 - typescript-eslint: 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + typescript-eslint: 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) transitivePeerDependencies: - '@types/eslint' - eslint-import-resolver-typescript @@ -6728,10 +6725,10 @@ snapshots: dependencies: eslint: 10.3.0(jiti@2.7.0) - eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)): + eslint-plugin-import-x@4.16.2(@typescript-eslint/utils@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@10.3.0(jiti@2.7.0)): dependencies: '@package-json/types': 0.0.12 - '@typescript-eslint/types': 8.59.2 + '@typescript-eslint/types': 8.59.3 comment-parser: 1.4.6 debug: 4.4.3 eslint: 10.3.0(jiti@2.7.0) @@ -6742,12 +6739,12 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)): dependencies: '@rtsao/scc': 1.1.0 array-includes: '@nolyfill/array-includes@1.0.44' @@ -6758,7 +6755,7 @@ snapshots: doctrine: 2.1.0 eslint: 10.3.0(jiti@2.7.0) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@4.4.4)(eslint@10.3.0(jiti@2.7.0)) hasown: '@nolyfill/hasown@1.0.44' is-core-module: '@nolyfill/is-core-module@1.0.39' is-glob: 4.0.3 @@ -6770,7 +6767,7 @@ snapshots: string.prototype.trimend: '@nolyfill/string.prototype.trimend@1.0.44' tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -6858,17 +6855,17 @@ snapshots: semver: 7.8.0 strip-indent: 4.1.1 - eslint-plugin-vue-scoped-css@3.0.0(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))): + eslint-plugin-vue-scoped-css@3.1.0(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.7.0)) + es-toolkit: 1.46.1 eslint: 10.3.0(jiti@2.7.0) - lodash: 4.18.1 postcss: 8.5.14 postcss-safe-parser: 7.0.1(postcss@8.5.14) postcss-selector-parser: 7.1.1 vue-eslint-parser: 10.4.0(eslint@10.3.0(jiti@2.7.0)) - eslint-plugin-vue@10.9.1(@stylistic/eslint-plugin@5.10.0(eslint@10.3.0(jiti@2.7.0)))(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))): + eslint-plugin-vue@10.9.1(@stylistic/eslint-plugin@5.10.0(eslint@10.3.0(jiti@2.7.0)))(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(vue-eslint-parser@10.4.0(eslint@10.3.0(jiti@2.7.0))): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.7.0)) eslint: 10.3.0(jiti@2.7.0) @@ -6880,7 +6877,7 @@ snapshots: xml-name-validator: 4.0.0 optionalDependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@10.3.0(jiti@2.7.0)) - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) eslint-plugin-wc@3.1.0(eslint@10.3.0(jiti@2.7.0)): dependencies: @@ -7111,7 +7108,7 @@ snapshots: happy-dom@20.9.0: dependencies: - '@types/node': 25.6.0 + '@types/node': 25.7.0 '@types/whatwg-mimetype': 3.0.2 '@types/ws': 8.18.1 entities: 7.0.1 @@ -7247,7 +7244,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 25.6.0 + '@types/node': 25.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -7271,13 +7268,13 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 25.6.0 + '@types/node': 25.7.0 jest-util: 29.7.0 jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 25.6.0 + '@types/node': 25.7.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7478,8 +7475,6 @@ snapshots: lodash.upperfirst@4.3.1: {} - lodash@4.18.1: {} - magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -7906,11 +7901,11 @@ snapshots: mlly: 1.8.2 pathe: 2.0.3 - playwright-core@1.59.1: {} + playwright-core@1.60.0: {} - playwright@1.59.1: + playwright@1.60.0: dependencies: - playwright-core: 1.59.1 + playwright-core: 1.60.0 optionalDependencies: fsevents: 2.3.2 @@ -8065,30 +8060,30 @@ snapshots: robust-predicates@3.0.3: {} - rolldown-license-plugin@3.0.4(rolldown@1.0.0-rc.17): + rolldown-license-plugin@3.0.5(rolldown@1.0.0): dependencies: - rolldown: 1.0.0-rc.17 + rolldown: 1.0.0 - rolldown@1.0.0-rc.17: + rolldown@1.0.0: dependencies: - '@oxc-project/types': 0.127.0 - '@rolldown/pluginutils': 1.0.0-rc.17 + '@oxc-project/types': 0.129.0 + '@rolldown/pluginutils': 1.0.0 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-rc.17 - '@rolldown/binding-darwin-arm64': 1.0.0-rc.17 - '@rolldown/binding-darwin-x64': 1.0.0-rc.17 - '@rolldown/binding-freebsd-x64': 1.0.0-rc.17 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.17 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.17 - '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.17 - '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.17 - '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.17 - '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.17 - '@rolldown/binding-linux-x64-musl': 1.0.0-rc.17 - '@rolldown/binding-openharmony-arm64': 1.0.0-rc.17 - '@rolldown/binding-wasm32-wasi': 1.0.0-rc.17 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.17 - '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.17 + '@rolldown/binding-android-arm64': 1.0.0 + '@rolldown/binding-darwin-arm64': 1.0.0 + '@rolldown/binding-darwin-x64': 1.0.0 + '@rolldown/binding-freebsd-x64': 1.0.0 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0 + '@rolldown/binding-linux-arm64-gnu': 1.0.0 + '@rolldown/binding-linux-arm64-musl': 1.0.0 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0 + '@rolldown/binding-linux-s390x-gnu': 1.0.0 + '@rolldown/binding-linux-x64-gnu': 1.0.0 + '@rolldown/binding-linux-x64-musl': 1.0.0 + '@rolldown/binding-openharmony-arm64': 1.0.0 + '@rolldown/binding-wasm32-wasi': 1.0.0 + '@rolldown/binding-win32-arm64-msvc': 1.0.0 + '@rolldown/binding-win32-x64-msvc': 1.0.0 roughjs@4.6.6: dependencies: @@ -8325,7 +8320,7 @@ snapshots: deep-rename-keys: 0.2.1 xml-reader: 2.4.3 - swagger-ui-dist@5.32.5: + swagger-ui-dist@5.32.6: dependencies: '@scarf/scarf': 1.4.0 @@ -8453,23 +8448,23 @@ snapshots: type-detect@4.0.8: {} - typescript-eslint@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3): + typescript-eslint@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.59.2(typescript@5.9.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@5.9.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@5.9.3) eslint: 10.3.0(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color - typescript-eslint@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3): + typescript-eslint@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.59.2(@typescript-eslint/parser@8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/parser': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) - '@typescript-eslint/utils': 8.59.2(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.3.0(jiti@2.7.0))(typescript@6.0.3) eslint: 10.3.0(jiti@2.7.0) typescript: 6.0.3 transitivePeerDependencies: @@ -8487,7 +8482,7 @@ snapshots: uint8-to-base64@0.2.1: {} - undici-types@7.19.2: {} + undici-types@7.21.0: {} unicorn-magic@0.4.0: {} @@ -8523,7 +8518,7 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - updates@17.16.9: {} + updates@17.16.11: {} uri-js@4.4.1: dependencies: @@ -8540,32 +8535,32 @@ snapshots: vanilla-colorful@0.7.2: {} - vite-string-plugin@2.0.4(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)): + vite-string-plugin@2.0.4(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)): dependencies: - vite: 8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0) + vite: 8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0) - vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0): + vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 postcss: 8.5.14 - rolldown: 1.0.0-rc.17 + rolldown: 1.0.0 tinyglobby: 0.2.16 optionalDependencies: - '@types/node': 25.6.0 + '@types/node': 25.7.0 esbuild: 0.28.0 fsevents: 2.3.3 jiti: 2.7.0 - vitest@4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)): + vitest@4.1.6(@types/node@25.7.0)(happy-dom@20.9.0)(jsdom@20.0.3)(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)): dependencies: - '@vitest/expect': 4.1.5 - '@vitest/mocker': 4.1.5(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0)) - '@vitest/pretty-format': 4.1.5 - '@vitest/runner': 4.1.5 - '@vitest/snapshot': 4.1.5 - '@vitest/spy': 4.1.5 - '@vitest/utils': 4.1.5 + '@vitest/expect': 4.1.6 + '@vitest/mocker': 4.1.6(vite@8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0)) + '@vitest/pretty-format': 4.1.6 + '@vitest/runner': 4.1.6 + '@vitest/snapshot': 4.1.6 + '@vitest/spy': 4.1.6 + '@vitest/utils': 4.1.6 es-module-lexer: 2.1.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -8577,10 +8572,10 @@ snapshots: tinyexec: 1.1.2 tinyglobby: 0.2.16 tinyrainbow: 3.1.0 - vite: 8.0.10(@types/node@25.6.0)(esbuild@0.28.0)(jiti@2.7.0) + vite: 8.0.12(@types/node@25.7.0)(esbuild@0.28.0)(jiti@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 25.6.0 + '@types/node': 25.7.0 happy-dom: 20.9.0 jsdom: 20.0.3 transitivePeerDependencies: diff --git a/routers/common/db.go b/routers/common/db.go index 01c0261427..92f367504b 100644 --- a/routers/common/db.go +++ b/routers/common/db.go @@ -15,8 +15,6 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting/config" "code.gitea.io/gitea/services/versioned_migration" - - "xorm.io/xorm" ) // InitDBEngine In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology @@ -42,7 +40,7 @@ func InitDBEngine(ctx context.Context) (err error) { return nil } -func migrateWithSetting(ctx context.Context, x *xorm.Engine) error { +func migrateWithSetting(ctx context.Context, x db.EngineMigration) error { if setting.Database.AutoMigration { return versioned_migration.Migrate(ctx, x) } diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index c7813feae2..fdabd08a9a 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -364,6 +364,10 @@ func RedirectDownload(ctx *context.Context) { // Download an archive of a repository func Download(ctx *context.Context) { + if !checkDownloadTokenScope(ctx) { + return + } + aReq, err := archiver_service.NewRequest(ctx.Repo.Repository, ctx.Repo.GitRepo, ctx.PathParam("*"), ctx.FormStrings("path")) if err != nil { if errors.Is(err, util.ErrInvalidArgument) { @@ -389,6 +393,10 @@ func Download(ctx *context.Context) { // a request that's already in-progress, but the archiver service will just // kind of drop it on the floor if this is the case. func InitiateDownload(ctx *context.Context) { + if !checkDownloadTokenScope(ctx) { + return + } + paths := ctx.FormStrings("path") if setting.Repository.StreamArchives || len(paths) > 0 { ctx.JSON(http.StatusOK, map[string]any{ diff --git a/services/context/repo.go b/services/context/repo.go index 4c31b07b34..67e7af4631 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -173,6 +173,16 @@ func PrepareCommitFormOptions(ctx *Context, doer *user_model.User, targetRepo *r protectedBranch.Repo = targetRepo canPushWithProtection = protectedBranch.CanUserPush(ctx, doer) protectionRequireSigned = protectedBranch.RequireSignedCommits + // If branch-wide push is restricted, allow direct commit when the + // URL-derived tree path matches an unprotected file pattern. The + // pre-receive hook re-checks every path the commit actually touches + // (e.g. rename source and destination). + if !canPushWithProtection && ctx.Repo.TreePath != "" && protectedBranch.UnprotectedFilePatterns != "" { + globs := protectedBranch.GetUnprotectedFilePatterns() + if protectedBranch.IsUnprotectedFile(globs, ctx.Repo.TreePath) { + canPushWithProtection = true + } + } } targetGitRepo, closer, err := gitrepo.RepositoryFromContextOrOpen(ctx, targetRepo) diff --git a/services/migrations/error.go b/services/migrations/error.go index d350478ccd..0aa0701ae9 100644 --- a/services/migrations/error.go +++ b/services/migrations/error.go @@ -7,7 +7,7 @@ package migrations import ( "errors" - "github.com/google/go-github/v85/github" + "github.com/google/go-github/v86/github" ) // ErrRepoNotCreated returns the error that repository not created diff --git a/services/migrations/github.go b/services/migrations/github.go index 6e56113083..46357d75cd 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -20,7 +20,7 @@ import ( "code.gitea.io/gitea/modules/proxy" "code.gitea.io/gitea/modules/structs" - "github.com/google/go-github/v85/github" + "github.com/google/go-github/v86/github" "golang.org/x/oauth2" ) diff --git a/services/versioned_migration/migration.go b/services/versioned_migration/migration.go index c064bf7913..e71e70f20c 100644 --- a/services/versioned_migration/migration.go +++ b/services/versioned_migration/migration.go @@ -6,13 +6,12 @@ package versioned_migration import ( "context" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/modules/globallock" - - "xorm.io/xorm" ) -func Migrate(ctx context.Context, x *xorm.Engine) error { +func Migrate(ctx context.Context, x db.EngineMigration) error { // only one instance can do the migration at the same time if there are multiple instances release, err := globallock.Lock(ctx, "gitea_versioned_migration") if err != nil { diff --git a/tests/integration/download_test.go b/tests/integration/download_test.go index b55a5a89bb..7270178f1f 100644 --- a/tests/integration/download_test.go +++ b/tests/integration/download_test.go @@ -17,6 +17,7 @@ import ( type downloadScopeCase struct { name string + method string url string withScope int publicOnlyOK bool @@ -88,68 +89,107 @@ func TestDownloadRepoContentTokenScopes(t *testing.T) { publicOnlyToken := getUserToken(t, "user2", auth_model.AccessTokenScopeReadRepository, auth_model.AccessTokenScopePublicOnly) cases := []downloadScopeCase{ + { + name: "PublicArchiveDownload", + method: http.MethodGet, + url: "/user2/repo1/archive/master.tar.gz", + withScope: http.StatusOK, + publicOnlyOK: true, + }, + { + name: "PrivateArchiveDownload", + method: http.MethodGet, + url: "/user2/repo2/archive/master.tar.gz", + withScope: http.StatusOK, + publicOnlyOK: false, + }, + { + name: "PublicArchiveInitiate", + method: http.MethodPost, + url: "/user2/repo1/archive/master.tar.gz", + withScope: http.StatusOK, + publicOnlyOK: true, + }, + { + name: "PrivateArchiveInitiate", + method: http.MethodPost, + url: "/user2/repo2/archive/master.tar.gz", + withScope: http.StatusOK, + publicOnlyOK: false, + }, { name: "PublicRawBlob", + method: http.MethodGet, url: "/user2/repo1/raw/blob/4b4851ad51df6a7d9f25c979345979eaeb5b349f", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicRawBranch", + method: http.MethodGet, url: "/user2/repo1/raw/branch/master/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicRawTag", + method: http.MethodGet, url: "/user2/repo1/raw/tag/v1.1/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicRawCommit", + method: http.MethodGet, url: "/user2/repo1/raw/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicMediaBlob", + method: http.MethodGet, url: "/user2/repo1/media/blob/4b4851ad51df6a7d9f25c979345979eaeb5b349f", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicMediaBranch", + method: http.MethodGet, url: "/user2/repo1/media/branch/master/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicMediaTag", + method: http.MethodGet, url: "/user2/repo1/media/tag/v1.1/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PublicMediaCommit", + method: http.MethodGet, url: "/user2/repo1/media/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md", withScope: http.StatusOK, publicOnlyOK: true, }, { name: "PrivateRawBranch", + method: http.MethodGet, url: "/user2/repo2/raw/branch/master/test.xml", withScope: http.StatusOK, publicOnlyOK: false, }, { name: "PrivateRawBlob", + method: http.MethodGet, url: "/user2/repo2/raw/blob/6395b68e1feebb1e4c657b4f9f6ba2676a283c0b", withScope: http.StatusOK, publicOnlyOK: false, }, { name: "PrivateMediaBranch", + method: http.MethodGet, url: "/user2/repo2/media/branch/master/test.xml", withScope: http.StatusOK, publicOnlyOK: false, @@ -158,14 +198,14 @@ func TestDownloadRepoContentTokenScopes(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - MakeRequest(t, NewRequest(t, "GET", tc.url).AddTokenAuth(miscToken), http.StatusForbidden) - MakeRequest(t, NewRequest(t, "GET", tc.url).AddTokenAuth(ownerReadToken), tc.withScope) + MakeRequest(t, NewRequest(t, tc.method, tc.url).AddTokenAuth(miscToken), http.StatusForbidden) + MakeRequest(t, NewRequest(t, tc.method, tc.url).AddTokenAuth(ownerReadToken), tc.withScope) publicOnlyStatus := http.StatusForbidden if tc.publicOnlyOK { publicOnlyStatus = tc.withScope } - MakeRequest(t, NewRequest(t, "GET", tc.url).AddTokenAuth(publicOnlyToken), publicOnlyStatus) + MakeRequest(t, NewRequest(t, tc.method, tc.url).AddTokenAuth(publicOnlyToken), publicOnlyStatus) }) } } diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index 4a06159690..1b2476f43e 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -98,6 +98,42 @@ func testEditorProtectedBranch(t *testing.T) { resp := testEditorActionPostRequest(t, session, "/user2/repo1/_new/master/", map[string]string{"tree_path": "test-protected-branch.txt", "commit_choice": "direct"}) assert.Equal(t, http.StatusBadRequest, resp.Code) assert.Equal(t, `Cannot commit to protected branch "master".`, test.ParseJSONError(resp.Body.Bytes()).ErrorMessage) + + // Change "master" branch to mark files under "docs/" as unprotected + req = NewRequestWithValues(t, "POST", "/user2/repo1/settings/branches/edit", map[string]string{ + "rule_name": "master", + "protected_file_patterns": "", + "unprotected_file_patterns": "docs/*.md", + "enable_push": "true", + }) + session.MakeRequest(t, req, http.StatusSeeOther) + flashMsg = session.GetCookieFlashMessage() + assert.Equal(t, `Branch protection for rule "master" has been updated.`, flashMsg.SuccessMsg) + + resp = testEditorActionPostRequest(t, session, "/user2/repo1/_new/master/docs/new.md", map[string]string{"tree_path": "docs/new.md", "commit_choice": "direct"}) + assert.Equal(t, http.StatusOK, resp.Code) + assert.Contains(t, resp.Body.String(), `"redirect":"/user2/repo1/src/branch/master/docs/new.md"`) + + // Form's destination (renamed.md) is decided by the pre-receive hook, not the controller. + resp = testEditorActionPostRequest(t, session, "/user2/repo1/_edit/master/docs/new.md", map[string]string{ + "content": "renamed via editor", + "commit_choice": "direct", + "tree_path": "docs/renamed.md", + }) + assert.Equal(t, http.StatusOK, resp.Code) + assert.Contains(t, resp.Body.String(), `"redirect":"/user2/repo1/src/branch/master/docs/renamed.md"`) + + // Protected source path: controller rejects up-front regardless of unprotected destination. + resp = testEditorActionPostRequest(t, session, "/user2/repo1/_edit/master/README.md", map[string]string{ + "commit_choice": "direct", + "tree_path": "docs/from-readme.md", + }) + assert.Equal(t, http.StatusBadRequest, resp.Code) + assert.Equal(t, `Cannot commit to protected branch "master".`, test.ParseJSONError(resp.Body.Bytes()).ErrorMessage) + + resp = testEditorActionPostRequest(t, session, "/user2/repo1/_delete/master/README.md", map[string]string{"commit_choice": "direct"}) + assert.Equal(t, http.StatusBadRequest, resp.Code) + assert.Equal(t, `Cannot commit to protected branch "master".`, test.ParseJSONError(resp.Body.Bytes()).ErrorMessage) } func testEditorActionPostRequest(t *testing.T, session *TestSession, requestPath string, params map[string]string) *httptest.ResponseRecorder { diff --git a/tests/integration/migration-test/migration_test.go b/tests/integration/migration-test/migration_test.go index d28442b714..4b9dc20e07 100644 --- a/tests/integration/migration-test/migration_test.go +++ b/tests/integration/migration-test/migration_test.go @@ -28,10 +28,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "xorm.io/xorm" ) -var currentEngine *xorm.Engine +var currentEngine db.EngineMigration func initMigrationTest(t *testing.T) func() { testlogger.Init() @@ -148,7 +147,7 @@ func restoreOldDB(t *testing.T, version string) { _ = sqlDB.Close() } -func wrappedMigrate(ctx context.Context, x *xorm.Engine) error { +func wrappedMigrate(ctx context.Context, x db.EngineMigration) error { currentEngine = x return migrations.Migrate(ctx, x) } @@ -165,7 +164,7 @@ func doMigrationTest(t *testing.T, version string) { beans, _ := db.NamesToBean() - err = db.InitEngineWithMigration(t.Context(), func(ctx context.Context, x *xorm.Engine) error { + err = db.InitEngineWithMigration(t.Context(), func(ctx context.Context, x db.EngineMigration) error { currentEngine = x return migrate_base.RecreateTables(beans...)(x) }) @@ -173,7 +172,7 @@ func doMigrationTest(t *testing.T, version string) { currentEngine.Close() // We do this a second time to ensure that there is not a problem with retained indices - err = db.InitEngineWithMigration(t.Context(), func(ctx context.Context, x *xorm.Engine) error { + err = db.InitEngineWithMigration(t.Context(), func(ctx context.Context, x db.EngineMigration) error { currentEngine = x return migrate_base.RecreateTables(beans...)(x) }) diff --git a/tools/lint-pr-title.js b/tools/lint-pr-title.ts similarity index 81% rename from tools/lint-pr-title.js rename to tools/lint-pr-title.ts index 7caeb78085..a63defe972 100644 --- a/tools/lint-pr-title.js +++ b/tools/lint-pr-title.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node import {env, exit} from 'node:process'; -const allowedTypes = 'build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test'; +const allowedTypes = 'build, chore, ci, docs, enhance, feat, fix, perf, refactor, revert, style, test'; const title = env.PR_TITLE; if (!title) {