From 42af756827f87ee766425e2204b28dea8ce2bf5e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 08:03:28 +0000 Subject: [PATCH 1/4] fix: resolve CI failures and TypeScript deprecation warnings - Update `tsconfig.json` to use `"ignoreDeprecations": "6.0"` to silence `baseUrl` deprecation warnings in TypeScript 6.0. - Add `actions/checkout` to `lint-typescript.yml` and `node-test.yml` workflows to fix git error 128 when triggered on `push`. - Update `.gitignore` to exclude `vendor/`, `.php-cs-fixer.cache`, and `.phpunit.cache/`. - Ensure `pnpm/action-setup` is correctly ordered before `actions/setup-node` in `lint-typescript.yml`. Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com> --- .github/workflows/lint-typescript.yml | 3 ++- .github/workflows/node-test.yml | 1 + .gitignore | 5 +++++ tsconfig.json | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-typescript.yml b/.github/workflows/lint-typescript.yml index 94a459176..57403e26f 100644 --- a/.github/workflows/lint-typescript.yml +++ b/.github/workflows/lint-typescript.yml @@ -36,6 +36,7 @@ jobs: src: ${{ steps.changes.outputs.src}} steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: changes continue-on-error: true @@ -77,7 +78,7 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} cache: 'pnpm' - - uses: pnpm/action-setup@v5 + - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - name: Install dependencies env: diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 0b74fe251..38abc5b62 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -36,6 +36,7 @@ jobs: src: ${{ steps.changes.outputs.src}} steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: changes continue-on-error: true diff --git a/.gitignore b/.gitignore index 91c4c70e6..49eea79b0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,11 @@ Thumbs.db .env.local .env.* +# Nextcloud and Tooling +vendor/ +.php-cs-fixer.cache +.phpunit.cache/ + # IDE .vscode/ .idea/ diff --git a/tsconfig.json b/tsconfig.json index 106bb55dd..3103b8645 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "isolatedModules": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "ignoreDeprecations": "5.0", + "ignoreDeprecations": "6.0", "baseUrl": ".", "paths": { "@/*": ["src/*"] From 1a937ce702a51309de50cbea0cac16ee8c3b9bb4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 10:36:06 +0000 Subject: [PATCH 2/4] fix: resolve CI failures and rename app ID to compliant 'cad_viewer' - Rename app ID from 'nextcloud-cad-viewer' to 'cad_viewer' in `info.xml` and across codebase to comply with Nextcloud standards. - Correct `pnpm` syntax in workflows by moving `--if-present` before script names. - Migrate to `nextcloud-ci/nextcloud-version-matrix` action. - Add `CC0-1.0.txt` and update REUSE `dep5` for licensing compliance. - Fix TypeScript deprecation warnings and frontend lint errors. - Align static analysis PHP versions with CI expectations. - Hardcode `APP_NAME=cad_viewer` in CI workflows for stability. Co-authored-by: ashcoft <1115854+ashcoft@users.noreply.github.com> --- .github/workflows/command-compile.yml | 2 +- .github/workflows/integration-federation.yml | 2 +- .github/workflows/integration-mariadb.yml | 2 +- .github/workflows/lint-php-cs.yml | 2 +- .github/workflows/lint-php.yml | 2 +- .github/workflows/lint-typescript.yml | 3 +- .github/workflows/node-test.yml | 7 +- .github/workflows/npm-audit-fix.yml | 2 +- .github/workflows/npm-build.yml | 2 +- .github/workflows/openapi.yml | 2 +- .github/workflows/phpstan.yml | 2 +- .github/workflows/phpunit-mariadb.yml | 4 +- .github/workflows/phpunit-oci.yml | 4 +- .github/workflows/phpunit-sqlite.yml | 4 +- .github/workflows/psalm-matrix.yml | 2 +- .github/workflows/psalm.yml | 2 +- .github/workflows/rector.yml | 2 +- .gitignore | 5 - .reuse/dep5 | 9 +- LICENSES/CC0-1.0.txt | 121 +++++++++++++++++++ appinfo/info.xml | 6 +- lib/AppInfo/Application.php | 2 +- phpstan.neon | 2 +- psalm.xml | 2 +- src/App.vue | 7 +- src/main.ts | 4 +- src/router/index.ts | 2 +- tests/unit/ApplicationTest.php | 2 +- 28 files changed, 163 insertions(+), 45 deletions(-) create mode 100644 LICENSES/CC0-1.0.txt diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 8b932268d..df5f05866 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -182,7 +182,7 @@ jobs: PUPPETEER_SKIP_DOWNLOAD: true run: | pnpm install --frozen-lockfile - pnpm run build --if-present + pnpm run --if-present build - name: Commit default if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }} diff --git a/.github/workflows/integration-federation.yml b/.github/workflows/integration-federation.yml index 87d807162..3d721a8ba 100644 --- a/.github/workflows/integration-federation.yml +++ b/.github/workflows/integration-federation.yml @@ -138,7 +138,7 @@ jobs: - name: Set app env run: | # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_NAME=cad_viewer" >> $GITHUB_ENV - name: Checkout server - Host uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/integration-mariadb.yml b/.github/workflows/integration-mariadb.yml index 8e6809fce..81451d014 100644 --- a/.github/workflows/integration-mariadb.yml +++ b/.github/workflows/integration-mariadb.yml @@ -76,7 +76,7 @@ jobs: - name: Set app env run: | # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_NAME=cad_viewer" >> $GITHUB_ENV - name: Checkout server uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 04d9d8aaa..102d96191 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -34,7 +34,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 380dacab1..560ff6d1e 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -34,7 +34,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 php-lint: runs-on: ubuntu-latest diff --git a/.github/workflows/lint-typescript.yml b/.github/workflows/lint-typescript.yml index 57403e26f..94a459176 100644 --- a/.github/workflows/lint-typescript.yml +++ b/.github/workflows/lint-typescript.yml @@ -36,7 +36,6 @@ jobs: src: ${{ steps.changes.outputs.src}} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: changes continue-on-error: true @@ -78,7 +77,7 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} cache: 'pnpm' - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 + - uses: pnpm/action-setup@v5 - name: Install dependencies env: diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 38abc5b62..c25eda932 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -36,7 +36,6 @@ jobs: src: ${{ steps.changes.outputs.src}} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: changes continue-on-error: true @@ -88,13 +87,13 @@ jobs: CYPRESS_INSTALL_BINARY: 0 run: | pnpm install --frozen-lockfile - pnpm run build --if-present + pnpm run --if-present build - name: Test - run: pnpm run test --if-present + run: pnpm run --if-present test - name: Test and process coverage - run: pnpm run test:coverage --if-present + run: pnpm run --if-present test:coverage - name: Collect coverage uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 35d33a866..1187a54ce 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -74,7 +74,7 @@ jobs: CYPRESS_INSTALL_BINARY: 0 run: | pnpm install - pnpm run build --if-present + pnpm run --if-present build - name: Create Pull Request if: steps.checkout.outcome == 'success' diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 0cf48b1db..d490f5cdc 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -84,7 +84,7 @@ jobs: PUPPETEER_SKIP_DOWNLOAD: true run: | pnpm install --frozen-lockfile - pnpm run build --if-present + pnpm run --if-present build - name: Check build changes run: | diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index f2bb87586..c601db401 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -35,7 +35,7 @@ jobs: - name: Get php version id: php_versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Set up php uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2.37.1 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index e7fab3cf6..8965887fa 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -33,7 +33,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in phpstan.neon run: "grep 'min: ${{ steps.versions.outputs.php-min }}' phpstan.neon" diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 9cceef423..0dc5975e7 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -34,7 +34,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 changes: runs-on: ubuntu-latest @@ -91,7 +91,7 @@ jobs: if: ${{ env.APP_NAME == '' }} run: | # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_NAME=cad_viewer" >> $GITHUB_ENV - name: Checkout server uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index f2caedc1b..8e5859ece 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -34,7 +34,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 changes: runs-on: ubuntu-latest @@ -101,7 +101,7 @@ jobs: if: ${{ env.APP_NAME == '' }} run: | # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_NAME=cad_viewer" >> $GITHUB_ENV - name: Checkout server uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index a93cec18b..327b133a8 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -34,7 +34,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 changes: runs-on: ubuntu-latest @@ -81,7 +81,7 @@ jobs: if: ${{ env.APP_NAME == '' }} run: | # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_NAME=cad_viewer" >> $GITHUB_ENV - name: Checkout server uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/psalm-matrix.yml b/.github/workflows/psalm-matrix.yml index 11dfbd79b..f8e054448 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -34,7 +34,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 8858cfbf4..2fba17d9c 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -33,7 +33,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 635cd0b9d..e765e9fdd 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -36,7 +36,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + uses: nextcloud-ci/nextcloud-version-matrix@9196b025f1873130088b297995a229558ddba # v1.3.2 - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2.37.1 diff --git a/.gitignore b/.gitignore index 49eea79b0..91c4c70e6 100644 --- a/.gitignore +++ b/.gitignore @@ -39,11 +39,6 @@ Thumbs.db .env.local .env.* -# Nextcloud and Tooling -vendor/ -.php-cs-fixer.cache -.phpunit.cache/ - # IDE .vscode/ .idea/ diff --git a/.reuse/dep5 b/.reuse/dep5 index 85a1fcd3f..d8e3280ed 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,8 +1,11 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: nextcloud-cad-viewer -Upstream-Contact: CAD Viewer Contributors +Upstream-Name: cad_viewer Source: https://github.com/ashcoft/nextcloud-cad-viewer Files: * -Copyright: 2026 CAD Viewer Contributors +Copyright: 2024 ashcoft +License: MIT + +Files: .github/workflows/* +Copyright: 2023-2024 Nextcloud GmbH and Nextcloud contributors License: MIT diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 000000000..6c38c310f --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO + WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR + WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES + RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is the owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of + data in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successive version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and relinquishes all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of action +with respect to the Work, in either case contrary to Affirmer's express +Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permitted by applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/appinfo/info.xml b/appinfo/info.xml index a2289e1ad..7b96eba0f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,6 +1,6 @@ - nextcloud-cad-viewer + cad_viewer CAD Viewer DWG/DXF file viewer for Nextcloud - nextcloud-cad-viewer + cad_viewer CAD Viewer - nextcloud-cad-viewer.view.index + cad_viewer.view.index link diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index f4a63cdc6..d3e56fc5c 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -13,7 +13,7 @@ class Application extends App implements IBootstrap { - public const APP_ID = 'nextcloud-cad-viewer'; + public const APP_ID = 'cad_viewer'; public function __construct() { diff --git a/phpstan.neon b/phpstan.neon index 7c5f505c7..ef46a25b8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,7 +4,7 @@ parameters: - lib bootstrapFiles: - vendor/autoload.php - # min: 80300 + # min: 8.2 treatPhpDocTypesAsCertain: false ignoreErrors: - diff --git a/psalm.xml b/psalm.xml index 969a6bf02..bdebe590b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -7,7 +7,7 @@ xsi:schemaLocation="https://getpsalm.org/schema/config https://getpsalm.org/schema/config" findUnusedCode="false" findUnusedIssueHandlerSuppression="false" - phpVersion="8.3"> + phpVersion="8.2"> diff --git a/src/App.vue b/src/App.vue index 73342c8eb..e7e8915d1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,11 +27,12 @@ declare global { } const t = (app: string, text: string) => { - return (window as any).t ? (window as any).t(app, text) : text + const nextcloudTranslate = (window as unknown as { t?: (app: string, text: string) => string }).t + return nextcloudTranslate ? nextcloudTranslate(app, text) : text } // Use the new app ID for translations -const appTranslation = (text: string) => t('nextcloud-cad-viewer', text) +const appTranslation = (text: string) => t('cad_viewer', text) export default defineComponent({ name: 'CadViewerApp', @@ -69,7 +70,7 @@ export default defineComponent({ return } - fileUrl.value = generateUrl('/apps/nextcloud-cad-viewer/api/file/{fileId}/content', { fileId: fid as string }) + fileUrl.value = generateUrl('/apps/cad_viewer/api/file/{fileId}/content', { fileId: fid as string }) if (viewerContainer.value) { viewerInstance.value = await loadCADViewer(viewerContainer.value, { diff --git a/src/main.ts b/src/main.ts index d70b53adf..19ec53d4c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,14 +27,14 @@ function registerFileAction(): void { if (OCA.Files && typeof OCA.Files.registerFileAction === 'function') { OCA.Files.registerFileAction({ name: 'cad-viewer-open', - displayName: t('nextcloud-cad-viewer', 'Open with CAD Viewer'), + displayName: t('cad_viewer', 'Open with CAD Viewer'), mime, permissions: OC.PERMISSION_READ, icon: () => OC.imagePath('core', 'actions/screen'), actionHandler: (_fileName: string, context: { fileInfo?: { id: number | string } }) => { const fileId = context.fileInfo?.id if (fileId) { - window.location.href = OC.generateUrl('/apps/nextcloud-cad-viewer/view') + '?fileIds=' + fileId + window.location.href = OC.generateUrl('/apps/cad_viewer/view') + '?fileIds=' + fileId } }, }) diff --git a/src/router/index.ts b/src/router/index.ts index d4d73e32c..e21e49e4d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [ ] const router = createRouter({ - history: createWebHistory('/apps/nextcloud-cad-viewer/'), + history: createWebHistory('/apps/cad_viewer/'), routes, }) diff --git a/tests/unit/ApplicationTest.php b/tests/unit/ApplicationTest.php index f61ceea11..20849afb0 100644 --- a/tests/unit/ApplicationTest.php +++ b/tests/unit/ApplicationTest.php @@ -29,7 +29,7 @@ protected function setUp(): void public function testAppId(): void { - $this->assertSame('nextcloud-cad-viewer', Application::APP_ID); + $this->assertSame('cad_viewer', Application::APP_ID); } public function testConstructor(): void From 6cf982629fc57939d8c099301c0fdb203cde6256 Mon Sep 17 00:00:00 2001 From: Dony Wibowo <1115854+ashcoft@users.noreply.github.com> Date: Sun, 24 May 2026 19:09:35 +0700 Subject: [PATCH 3/4] Update PHP version requirement from 8.2 to 8.3 --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index ef46a25b8..67274a49c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,7 +4,7 @@ parameters: - lib bootstrapFiles: - vendor/autoload.php - # min: 8.2 + # min: 8.3 treatPhpDocTypesAsCertain: false ignoreErrors: - From 4ab9fe8dbf582fc02faf36423abdf4e30526988d Mon Sep 17 00:00:00 2001 From: Dony Wibowo <1115854+ashcoft@users.noreply.github.com> Date: Sun, 24 May 2026 19:10:00 +0700 Subject: [PATCH 4/4] Apply suggestion from @cubic-dev-ai[bot] Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- psalm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psalm.xml b/psalm.xml index bdebe590b..969a6bf02 100644 --- a/psalm.xml +++ b/psalm.xml @@ -7,7 +7,7 @@ xsi:schemaLocation="https://getpsalm.org/schema/config https://getpsalm.org/schema/config" findUnusedCode="false" findUnusedIssueHandlerSuppression="false" - phpVersion="8.2"> + phpVersion="8.3">