Skip to content

Commit

Permalink
Merge branch 'release/4.1.22' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 27, 2025
2 parents befd8bf + 6d45807 commit beacd43
Show file tree
Hide file tree
Showing 33 changed files with 1,416 additions and 1,393 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Code Analysis

on:
pull_request: null
pull_request:
pull_request_review:
types: [ submitted, edited ]
push:
branches:
- develop-v4
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Retour Changelog

## 4.1.22 - 2025.01.27
### Fixed
* Fixed an issue where redirects were not, in fact, redirecting with the appropriate site URL prefix as expected ([#325](https://github.com/nystudio107/craft-retour/issues/325))

## 4.1.21 - 2025.01.08
### Changed
* Fixed an issue where a GraphQL Retour query could return a URL with a `/` prefixed to it if the destination was a full URL ([#320](https://github.com/nystudio107/craft-retour/issues/320))
Expand Down
248 changes: 124 additions & 124 deletions buildchain/package-lock.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions buildchain/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ export default defineConfig(({command}) => ({
preserveSymlinks: true,
},
server: {
// Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6
allowedHosts: true,
cors: true,
fs: {
strict: false
},
headers: {
"Access-Control-Allow-Private-Network": "true",
},
host: '0.0.0.0',
origin: 'http://localhost:' + process.env.DEV_PORT,
port: parseInt(process.env.DEV_PORT),
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-retour",
"description": "Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website",
"type": "craft-plugin",
"version": "4.1.21",
"version": "4.1.22",
"keywords": [
"craftcms",
"craft-plugin",
Expand Down Expand Up @@ -53,6 +53,10 @@
"yiisoft/yii2-composer": true
},
"optimize-autoloader": true,
"platform": {
"php": "8.0.2"
},
"platform-check": false,
"sort-packages": true
},
"autoload": {
Expand Down
723 changes: 330 additions & 393 deletions docs/package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ parameters:
level: 5
paths:
- src
excludePaths:
# The support for multiple najor versions of league/csv (which have different APIs) causes this
# throw errors
- src/controllers/FileController.php
2 changes: 1 addition & 1 deletion src/gql/resolvers/RetourResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function resolve(mixed $source, array $arguments, mixed $context,
$path = $redirect['redirectDestUrl'];
// Combine the URL and path together, merging them as appropriate
try {
if (!UrlHelper::isFullUrl($dest) && !UrlHelper::pathHasSitePrefix($path)) {
if (!UrlHelper::isAbsoluteUrl($dest) && !UrlHelper::pathHasSitePrefix($path)) {
$dest = UrlHelper::siteUrl('/', null, null, $siteId);
$dest = UrlHelper::mergeUrlWithPath($dest, $path);
$dest = parse_url($dest, PHP_URL_PATH);
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/UrlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public static function pathHasSitePrefix(string $path): bool
// Normalizes a URI path by trimming leading/ trailing slashes and removing double slashes
$sitePath = '/' . preg_replace('/\/\/+/', '/', trim($sitePath, '/'));
}
// Strip the $sitePath from the incoming $path
if (str_starts_with($path, $sitePath)) {
// See if the path begins with a site path prefix
if ($sitePath !== '/' && str_starts_with($path, $sitePath)) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/Redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public function doRedirect(string $fullUrl, string $pathOnly, ?array $redirect):
if ($siteId !== null) {
$siteId = (int)$siteId;
}
if (!UrlHelper::isFullUrl($dest) && !UrlHelper::pathHasSitePrefix($path)) {
if (!UrlHelper::isAbsoluteUrl($dest) && !UrlHelper::pathHasSitePrefix($path)) {
$dest = UrlHelper::siteUrl('/', null, null, $siteId);
$dest = UrlHelper::mergeUrlWithPath($dest, $path);
$dest = parse_url($dest, PHP_URL_PATH);
Expand Down

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file removed src/web/assets/dist/assets/dashboard-CxTeoLAH.js.gz
Binary file not shown.
Binary file not shown.
922 changes: 922 additions & 0 deletions src/web/assets/dist/assets/vue-apexcharts-BTvr4jZZ.js

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions src/web/assets/dist/assets/vue-apexcharts-BTvr4jZZ.js.map

Large diffs are not rendered by default.

Binary file not shown.
856 changes: 0 additions & 856 deletions src/web/assets/dist/assets/vue-apexcharts-BXKkk6bS.js

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion src/web/assets/dist/assets/vue-apexcharts-BXKkk6bS.js.map

This file was deleted.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/web/assets/dist/assets/widget-1xfuFLUd.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file removed src/web/assets/dist/assets/widget-DXBBbnHH.js.gz
Binary file not shown.
Binary file removed src/web/assets/dist/assets/widget-DXBBbnHH.js.map.gz
Binary file not shown.
12 changes: 6 additions & 6 deletions src/web/assets/dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
"assets/purify-DvoaRXnC.css"
]
},
"_vue-apexcharts-BXKkk6bS.js": {
"file": "assets/vue-apexcharts-BXKkk6bS.js",
"_vue-apexcharts-BTvr4jZZ.js": {
"file": "assets/vue-apexcharts-BTvr4jZZ.js",
"name": "vue-apexcharts",
"imports": [
"__plugin-vue2_normalizer-DeOsZA-U.js"
]
},
"src/js/Dashboard.js": {
"file": "assets/dashboard-CxTeoLAH.js",
"file": "assets/dashboard-BLlHxo8E.js",
"name": "dashboard",
"src": "src/js/Dashboard.js",
"isEntry": true,
"imports": [
"_purify.es-neGYA5VU.js",
"__plugin-vue2_normalizer-DeOsZA-U.js",
"_vue-apexcharts-BXKkk6bS.js"
"_vue-apexcharts-BTvr4jZZ.js"
]
},
"src/js/Import.js": {
Expand Down Expand Up @@ -83,12 +83,12 @@
]
},
"src/js/Widget.js": {
"file": "assets/widget-DXBBbnHH.js",
"file": "assets/widget-1xfuFLUd.js",
"name": "widget",
"src": "src/js/Widget.js",
"isEntry": true,
"imports": [
"_vue-apexcharts-BXKkk6bS.js",
"_vue-apexcharts-BTvr4jZZ.js",
"__plugin-vue2_normalizer-DeOsZA-U.js"
]
}
Expand Down
Binary file modified src/web/assets/dist/manifest.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/web/assets/dist/stats.html

Large diffs are not rendered by default.

0 comments on commit beacd43

Please sign in to comment.