chore: update php and js dependencies to latest

This commit is contained in:
Yassine Doghri 2024-02-17 13:01:39 +00:00
parent 87cc437e1e
commit d0a94dd2cb
43 changed files with 1361 additions and 1157 deletions

View File

@ -3,10 +3,7 @@
"projectOwner": "adaures",
"repoType": "gitlab",
"repoHost": "https://code.castopod.org",
"files": [
"README.md",
"docs/src/index.md"
],
"files": ["README.md", "docs/src/index.md"],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
@ -100,24 +97,14 @@
"name": "Lyonel Bernard",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://twitter.com/lyonelbernard",
"contributions": [
"bug",
"question",
"audio",
"ideas"
]
"contributions": ["bug", "question", "audio", "ideas"]
},
{
"login": "ctlw83",
"name": "Christopher Lagonick-Weitzel",
"avatar_url": "https://secure.gravatar.com/avatar/7c2a721b52d0763673a600e8f01bd745?s=80&d=identicon",
"profile": "https://www.crypticchameleon.com/",
"contributions": [
"bug",
"question",
"audio",
"ideas"
]
"contributions": ["bug", "question", "audio", "ideas"]
},
{
"login": "ernestoacostame",
@ -154,19 +141,14 @@
"name": "Bastien Luneteau",
"avatar_url": "https://secure.gravatar.com/avatar/ad63ee8ef8e3db8253d21e5012d2724f?s=80&d=identicon",
"profile": "https://code.castopod.org/Behel",
"contributions": [
"code",
"bug"
]
"contributions": ["code", "bug"]
},
{
"login": "cecillie",
"name": "Cécile Ricordeau",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://www.cecillie.fr/",
"contributions": [
"design"
]
"contributions": ["design"]
},
{
"login": "PatrykMis",
@ -185,48 +167,35 @@
"name": "Marcin Lewandowski",
"avatar_url": "https://secure.gravatar.com/avatar/eed8337939641eac5ad0b570bd6acf96?s=80&d=identicon",
"profile": "https://code.castopod.org/mspanc",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "SJanik",
"name": "Sebastian Janik",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/SJanik",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "patryk",
"name": "Patryk Karczmarczyk",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/patryk",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "ddenis",
"name": "denis d",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/ddenis",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "douglaskastle",
"name": "Douglas Kastle",
"avatar_url": "https://secure.gravatar.com/avatar/b7e652ba4b6bcd440afa069e7f7bc9e6?s=80&d=identicon",
"profile": "https://code.castopod.org/douglaskastle",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "cExplorer",
@ -246,66 +215,49 @@
"name": "ImaCrea",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/imacrea",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "jonas",
"name": "Jonas S",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/jonas",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "yannL",
"name": "LEFEBVRE Yann",
"avatar_url": "https://secure.gravatar.com/avatar/9c46600ce566ec6d526370d8e104b1c8?s=80&d=identicon",
"profile": "https://code.castopod.org/yannL",
"contributions": [
"bug"
]
"contributions": ["bug"]
},
{
"login": "spaetz",
"name": "Sebastian Späth",
"avatar_url": "https://secure.gravatar.com/avatar/278e1af65e82993efd0ba7bbbacf6435?s=80&d=identicon",
"profile": "https://code.castopod.org/spaetz",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "rocky",
"name": "rocky III",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/rocky",
"contributions": [
"bug"
]
"contributions": ["bug"]
},
{
"login": "Regenpfeifer",
"name": "Hermann Josef Eckl",
"avatar_url": "https://code.castopod.org/uploads/-/system/user/avatar/103/avatar.png",
"profile": "https://code.castopod.org/Regenpfeifer",
"contributions": [
"bug"
]
"contributions": ["bug"]
},
{
"login": "cyrilledel",
"name": "Delhaye Cyrille",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://code.castopod.org/cyrilledel",
"contributions": [
"bug",
"ideas"
]
"contributions": ["bug", "ideas"]
},
{
"login": "otetranome",
@ -493,9 +445,7 @@
"name": "Dimitri Regnier",
"avatar_url": "https://castopod.org/assets/images/castopod-avatar.jpg",
"profile": "https://dimitriregnier.net/",
"contributions": [
"ideas"
]
"contributions": ["ideas"]
},
{
"login": "irithys",
@ -610,19 +560,14 @@
"name": "KrzysztofDomanczyk",
"avatar_url": "https://avatars.githubusercontent.com/u/75178474?v=4",
"profile": "https://github.com/KrzysztofDomanczyk",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "NeoluxConsulting",
"name": "Guy Martin",
"avatar_url": "https://secure.gravatar.com/avatar/6e745565356330c1e29a85d52bffdaa1?s=80&d=identicon",
"profile": "https://code.castopod.org/NeoluxConsulting",
"contributions": [
"bug",
"code"
]
"contributions": ["bug", "code"]
}
],
"commitConvention": "none"

View File

@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
pnpm exec commitlint --verbose --edit "$1"

View File

@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# CaptainHook 5.10.0
INTERACTIVE="--no-interaction"

View File

@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# CaptainHook 5.10.0
INTERACTIVE="--no-interaction"

View File

@ -19,7 +19,6 @@ use App\Models\PodcastModel;
use CodeIgniter\Database\Seeder;
use Exception;
use GeoIp2\Database\Reader;
use GeoIp2\Exception\AddressNotFoundException;
class FakePodcastsAnalyticsSeeder extends Seeder

View File

@ -16,7 +16,6 @@ use App\Entities\Episode;
use App\Entities\Podcast;
use App\Models\EpisodeModel;
use App\Models\PodcastModel;
use CodeIgniter\Database\Seeder;
use Exception;

View File

@ -546,7 +546,7 @@ class Episode extends Entity
{
if ($this->description === null) {
$this->description = trim(
preg_replace('~\s+~', ' ', strip_tags((string) $this->attributes['description_html'])),
(string) preg_replace('~\s+~', ' ', strip_tags((string) $this->attributes['description_html'])),
);
}
@ -670,7 +670,7 @@ class Episode extends Entity
public function getPartnerLink(?string $serviceSlug = null): string
{
$partnerLink =
rtrim($this->getPodcast()->partner_link_url, '/') .
rtrim((string) $this->getPodcast()->partner_link_url, '/') .
'?pid=' .
$this->getPodcast()
->partner_id .
@ -686,7 +686,7 @@ class Episode extends Entity
public function getPartnerImageUrl(string $serviceSlug = null): string
{
return rtrim($this->getPodcast()->partner_image_url, '/') .
return rtrim((string) $this->getPodcast()->partner_image_url, '/') .
'?pid=' .
$this->getPodcast()
->partner_id .

View File

@ -101,7 +101,7 @@ class Location extends Entity
],
);
$places = json_decode($response->getBody(), false, 512, JSON_THROW_ON_ERROR);
$places = json_decode((string) $response->getBody(), false, 512, JSON_THROW_ON_ERROR);
if ($places === []) {
return $this;

View File

@ -467,7 +467,6 @@ if (! function_exists('local_date')) {
}
}
// ------------------------------------------------------------------------
if (! function_exists('explicit_badge')) {
@ -486,7 +485,6 @@ if (! function_exists('explicit_badge')) {
// ------------------------------------------------------------------------
if (! function_exists('category_label')) {
function category_label(Category $category): string
{

View File

@ -22,14 +22,14 @@ if (! function_exists('form_textarea')) {
// Unsets default rows and cols if defined in extra field as array or string.
if ((is_array($extra) && array_key_exists('rows', $extra)) || (is_string($extra) && stripos(
preg_replace('~\s+~', '', $extra),
(string) preg_replace('~\s+~', '', $extra),
'rows='
) !== false)) {
unset($defaults['rows']);
}
if ((is_array($extra) && array_key_exists('cols', $extra)) || (is_string($extra) && stripos(
preg_replace('~\s+~', '', $extra),
(string) preg_replace('~\s+~', '', $extra),
'cols='
) !== false)) {
unset($defaults['cols']);
@ -41,7 +41,6 @@ if (! function_exists('form_textarea')) {
}
}
if (! function_exists('parse_form_attributes')) {
/**
* Parse the form attributes

View File

@ -8,7 +8,6 @@ declare(strict_types=1);
* @link https://castopod.org/
*/
use App\Entities\Episode;
use CodeIgniter\I18n\Time;
use JamesHeinrich\GetID3\WriteTags;
use Modules\Media\FileManagers\FileManagerInterface;

View File

@ -15,7 +15,6 @@ use Modules\Media\Entities\Image;
* @link https://castopod.org/
*/
if (! function_exists('get_browser_language')) {
/**
* Gets the browser default language using the request header key `HTTP_ACCEPT_LANGUAGE`. Returns Castopod's default
@ -82,7 +81,6 @@ if (! function_exists('format_duration')) {
}
}
if (! function_exists('format_duration_symbol')) {
/**
* Formats duration in seconds to an hh(h) mm(min) ss(s) string. Doesn't show leading zeros if any.
@ -131,7 +129,6 @@ if (! function_exists('generate_random_salt')) {
//--------------------------------------------------------------------
if (! function_exists('file_upload_max_size')) {
/**
* Returns a file size limit in bytes based on the PHP upload_max_filesize and post_max_size Adapted from:
@ -192,7 +189,6 @@ if (! function_exists('format_bytes')) {
}
}
if (! function_exists('get_site_icon_url')) {
function get_site_icon_url(string $size): string
{
@ -205,7 +201,6 @@ if (! function_exists('get_site_icon_url')) {
}
}
if (! function_exists('get_podcast_banner')) {
function get_podcast_banner_url(Podcast $podcast, string $size): string
{

View File

@ -10,7 +10,6 @@ declare(strict_types=1);
use App\Entities\Category;
use App\Entities\Location;
use App\Entities\Podcast;
use App\Libraries\SimpleRSSElement;
use CodeIgniter\I18n\Time;
use Config\Mimes;
@ -164,15 +163,15 @@ if (! function_exists('get_rss_feed')) {
$socialSignUpelement->addAttribute('priority', '1');
$socialSignUpelement->addAttribute(
'homeUrl',
parse_url($socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
$socialPlatform->link_url,
parse_url((string) $socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
(string) $socialPlatform->link_url,
PHP_URL_HOST
) . '/public'
);
$socialSignUpelement->addAttribute(
'signUpUrl',
parse_url($socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
$socialPlatform->link_url,
parse_url((string) $socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
(string) $socialPlatform->link_url,
PHP_URL_HOST
) . '/auth/sign_up'
);
@ -184,15 +183,15 @@ if (! function_exists('get_rss_feed')) {
$castopodSocialSignUpelement->addAttribute('priority', '1');
$castopodSocialSignUpelement->addAttribute(
'homeUrl',
parse_url($socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
$socialPlatform->link_url,
parse_url((string) $socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
(string) $socialPlatform->link_url,
PHP_URL_HOST
) . '/public'
);
$castopodSocialSignUpelement->addAttribute(
'signUpUrl',
parse_url($socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
$socialPlatform->link_url,
parse_url((string) $socialPlatform->link_url, PHP_URL_SCHEME) . '://' . parse_url(
(string) $socialPlatform->link_url,
PHP_URL_HOST
) . '/auth/sign_up'
);

View File

@ -3,7 +3,6 @@
declare(strict_types=1);
use App\Entities\Actor;
use App\Entities\Episode;
use App\Entities\EpisodeComment;
use App\Entities\Page;

View File

@ -66,7 +66,7 @@ class Router extends CodeIgniterRouter
}, (string) (is_array($handler) ? key($handler) : $handler));
throw new RedirectException(
preg_replace('#^' . $routeKey . '$#u', $redirectTo, $uri),
preg_replace('#^' . $routeKey . '$#u', (string) $redirectTo, $uri),
$this->collection->getRedirectCode($routeKey)
);
}

View File

@ -685,7 +685,9 @@ export class AudioClipper extends LitElement {
padding: 0.5rem 0.5rem 0.25rem 0.5rem;
justify-content: space-between;
background-color: hsl(var(--color-background-elevated));
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
box-shadow:
0 1px 3px 0 rgb(0 0 0 / 0.1),
0 1px 2px -1px rgb(0 0 0 / 0.1);
border-radius: 0 0 0.75rem 0.75rem;
flex-wrap: wrap;
gap: 0.5rem;
@ -718,7 +720,9 @@ export class AudioClipper extends LitElement {
border-radius: 9999px;
border: none;
padding: 0.25rem 0.5rem;
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
box-shadow:
0 1px 3px 0 rgb(0 0 0 / 0.1),
0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.toolbar button:hover {
@ -732,9 +736,13 @@ export class AudioClipper extends LitElement {
var(--tw-ring-offset-width) var(--tw-ring-offset-color);
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0
calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
box-shadow:
var(--tw-ring-offset-shadow),
var(--tw-ring-shadow),
0 0 rgba(0, 0, 0, 0);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
box-shadow:
var(--tw-ring-offset-shadow),
var(--tw-ring-shadow),
0 0 rgba(0, 0, 0, 0);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
var(--tw-shadow, 0 0 rgba(0, 0, 0, 0));
@ -746,10 +754,27 @@ export class AudioClipper extends LitElement {
.toolbar__trim-controls button {
font-weight: 600;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI,
Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
font-family:
Inter,
ui-sans-serif,
system-ui,
-apple-system,
Segoe UI,
Roboto,
Ubuntu,
Cantarell,
Noto Sans,
sans-serif,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
"Noto Sans",
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
}
@ -871,28 +896,28 @@ export class AudioClipper extends LitElement {
></path>
</svg>`
: this._isPlaying
? html`<svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<g>
? html`<svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<g>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M6 5h2v14H6V5zm10 0h2v14h-2V5z" />
</g>
</svg>`
: html` <svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M6 5h2v14H6V5zm10 0h2v14h-2V5z" />
</g>
</svg>`
: html` <svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<path fill="none" d="M0 0h24v24H0z" />
<path
d="M7.752 5.439l10.508 6.13a.5.5 0 0 1 0 .863l-10.508 6.13A.5.5 0 0 1 7 18.128V5.871a.5.5 0 0 1 .752-.432z"
/>
</svg>`}
<path
d="M7.752 5.439l10.508 6.13a.5.5 0 0 1 0 .863l-10.508 6.13A.5.5 0 0 1 7 18.128V5.871a.5.5 0 0 1 .752-.432z"
/>
</svg>`}
</button>
<div class="volume">
<svg

View File

@ -206,7 +206,8 @@ export class PlayEpisodeButton extends LitElement {
button:focus {
outline: none;
box-shadow: 0 0 0 2px hsl(var(--color-background-base)),
box-shadow:
0 0 0 2px hsl(var(--color-background-base)),
0 0 0 4px hsl(var(--color-accent-base));
}

View File

@ -104,7 +104,8 @@ export class PlaySoundbite extends LitElement {
button:focus {
outline: none;
box-shadow: 0 0 0 2px hsl(var(--color-background-base)),
box-shadow:
0 0 0 2px hsl(var(--color-background-base)),
0 0 0 4px hsl(var(--color-accent-base));
}
@ -163,31 +164,31 @@ export class PlaySoundbite extends LitElement {
></path>
</svg>`
: this._isPlaying
? html`<svg
class="animate-spin"
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<g>
? html`<svg
class="animate-spin"
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<g>
<path fill="none" d="M0 0h24v24H0z" />
<path
d="M13 9.17A3 3 0 1 0 15 12V2.458c4.057 1.274 7 5.064 7 9.542 0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2c.337 0 .671.017 1 .05v7.12z"
/>
</g>
</svg>`
: html`<svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<path fill="none" d="M0 0h24v24H0z" />
<path
d="M13 9.17A3 3 0 1 0 15 12V2.458c4.057 1.274 7 5.064 7 9.542 0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2c.337 0 .671.017 1 .05v7.12z"
d="M7.752 5.439l10.508 6.13a.5.5 0 0 1 0 .863l-10.508 6.13A.5.5 0 0 1 7 18.128V5.871a.5.5 0 0 1 .752-.432z"
/>
</g>
</svg>`
: html`<svg
viewBox="0 0 24 24"
fill="currentColor"
width="1em"
height="1em"
>
<path fill="none" d="M0 0h24v24H0z" />
<path
d="M7.752 5.439l10.508 6.13a.5.5 0 0 1 0 .863l-10.508 6.13A.5.5 0 0 1 7 18.128V5.871a.5.5 0 0 1 .752-.432z"
/>
</svg>`}
</svg>`}
</button>`;
}
}

View File

@ -110,7 +110,8 @@ export class VideoClipPreviewer extends LitElement {
::slotted(img) {
border-radius: 0.5rem;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
box-shadow:
0 4px 6px -1px rgb(0 0 0 / 0.1),
0 2px 4px -2px rgb(0 0 0 / 0.1);
}
`;

View File

@ -97,7 +97,8 @@ export class XMLEditor extends LitElement {
}
.cm-editor.cm-focused {
outline: 2px solid transparent;
box-shadow: 0 0 0 2px hsl(var(--color-background-elevated)),
box-shadow:
0 0 0 2px hsl(var(--color-background-elevated)),
0 0 0 calc(4px) hsl(var(--color-accent-base));
}
.cm-gutters {

View File

@ -4,7 +4,9 @@
position: relative;
width: 12.5em;
height: 5.25em;
font: 1em/1 arial, sans-serif;
font:
1em/1 arial,
sans-serif;
}
[type="range"] {

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -9,16 +9,16 @@
"php": "^8.1",
"adaures/ipcat-php": "^v1.0.0",
"adaures/podcast-persons-taxonomy": "^v1.0.1",
"aws/aws-sdk-php": "^3.295.3",
"aws/aws-sdk-php": "^3.299.1",
"chrisjean/php-ico": "^1.0.4",
"cocur/slugify": "^v4.5.1",
"codeigniter4/framework": "v4.4.4",
"codeigniter4/settings": "v2.1.2",
"codeigniter4/shield": "v1.0.0",
"codeigniter4/framework": "v4.4.5",
"codeigniter4/settings": "v2.2.0",
"codeigniter4/shield": "v1.0.1",
"codeigniter4/tasks": "dev-develop",
"geoip2/geoip2": "v3.0.0",
"james-heinrich/getid3": "^2.0.0-beta5",
"league/commonmark": "^2.4.1",
"league/commonmark": "^2.4.2",
"league/html-to-markdown": "5.1.1",
"melbahja/seo": "^v2.1.1",
"michalsn/codeigniter4-uuid": "v1.0.2",
@ -30,13 +30,13 @@
"yassinedoghri/podcast-feed": "dev-main"
},
"require-dev": {
"captainhook/captainhook": "^5.19.2",
"captainhook/captainhook": "^5.21.2",
"codeigniter/phpstan-codeigniter": "v1.4.3",
"mikey179/vfsstream": "^v1.6.11",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.50",
"phpunit/phpunit": "^10.5.5",
"rector/rector": "^0.18.13",
"phpstan/phpstan": "^1.10.58",
"phpunit/phpunit": "^10.5.10",
"rector/rector": "^1.0.1",
"symplify/coding-standard": "^12.0.7",
"symplify/easy-coding-standard": "^12.0.13"
},

360
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,8 +14,8 @@ Castopod 在其自动构建期间会将 3 个 Docker 映像推送到 Docker Hub
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server)Castopod
的 Nginx 配置
此外Castopod 需要一个与 MySQL 兼容的数据库。 Redis 数据库 可以添加为缓存处理
此外Castopod 需要一个与 MySQL 兼容的数据库。 Redis 数据库 可以添加为缓存处理
## 目前支持的标签

View File

@ -52,8 +52,8 @@ Castopod 仅适用于受支持的 MySQL 5.7 或更高版本的兼容数据库。
:::
你需要填写服务器主机名、数据库名称、用户名和密码才能完成安装过程。 如果没有这
,请与你的服务器管理员联系。
你需要填写服务器主机名、数据库名称、用户名和密码才能完成安装过程。 如果没有这
,请与你的服务器管理员联系。
#### 权限

View File

@ -6,8 +6,8 @@ sidebarDepth: 2
[![release-badge]][release]&nbsp;[![license-badge]][license]&nbsp;[![contributions-badge]][contributions]&nbsp;[![semantic-release-badge]][semantic-release]&nbsp;[![crowdin-badge]][crowdin]&nbsp;[![discord-badge]][discord]&nbsp;[![stars-badge]][stars]
Castopod 是一个免费的开源播客托管平台,为那些想要和听众接触与互动的播客们制作
Castopod 是一个免费的开源播客托管平台,为那些想要和听众接触与互动的播客们制作
Castopod 易于安装,并使用 [CodeIgniter4](https://codeigniter.com/) 构建, 这是一
个强大的 PHP 框架,并且占用极小。
@ -59,8 +59,8 @@ Castopod 易于安装,并使用 [CodeIgniter4](https://codeigniter.com/) 构
事实上,它是唯一长期保持这种状态的媒体之一。
随着习惯的发展,越来越多的人开始接触播客:允许创作者寻找新的方式来分享他们的想
,或是让听众获得更好的内容。
随着习惯的发展,越来越多的人开始接触播客:允许创作者寻找新的方式来分享他们的想
,或是让听众获得更好的内容。
随着播客的使用越来越广泛,一些公司正试图控制播客与集中化。
@ -93,13 +93,13 @@ CMS可以帮助你在线访问任何类型的网站。
还拥有对播客的独特优化:从播客的创建和新剧集的发布一直到广播,营销和分析。
最后根据你的需要Wordpress 和 Castopod 甚至可以共存,因为他们有相同的配置环
最后根据你的需要Wordpress 和 Castopod 甚至可以共存,因为他们有相同的配置环
### Castopod 对比 Funkwhale
Funkwhale 是一个自托管、现代界面、免费开源的音乐服务器。 就像 Castopod 一
Funkwhale 也位于联邦宇宙中,这是一个去中心化的社交网络,允许两者的互联。
Funkwhale 是一个自托管、现代界面、免费开源的音乐服务器。 就像 Castopod 一
Funkwhale 也位于联邦宇宙中,这是一个去中心化的社交网络,允许两者的互联。
Funkwhale 最初是围绕音乐制作的。 后来,随着项目的发展,引入了托管播客的能力。

View File

@ -82,7 +82,7 @@ class ActivityRequest
$date = Time::now('GMT')->format('D, d M Y H:i:s T');
$digest = 'SHA-256=' . base64_encode($this->getBodyDigest());
$contentType = $this->options['headers']['Content-Type'];
$contentLength = (string) strlen($this->request->getBody());
$contentLength = (string) strlen((string) $this->request->getBody());
$userAgent = 'Castopod/' . CP_VERSION . '; +' . base_url('', 'https');
$plainText = "(request-target): post {$path}\nhost: {$host}\ndate: {$date}\ndigest: {$digest}\ncontent-type: {$contentType}\ncontent-length: {$contentLength}\nuser-agent: {$userAgent}";
@ -112,6 +112,6 @@ class ActivityRequest
protected function getBodyDigest(): string
{
return hash('sha256', $this->request->getBody(), true);
return hash('sha256', (string) $this->request->getBody(), true);
}
}

View File

@ -34,7 +34,7 @@ if (! function_exists('get_webfinger_data')) {
$webfingerRequest = new ActivityRequest((string) $webfingerUri);
$webfingerResponse = $webfingerRequest->get();
return json_decode($webfingerResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
return json_decode((string) $webfingerResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
}
}
@ -271,7 +271,7 @@ if (! function_exists('create_actor_from_uri')) {
{
$activityRequest = new ActivityRequest($actorUri);
$actorResponse = $activityRequest->get();
$actorPayload = json_decode($actorResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
$actorPayload = json_decode((string) $actorResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
$newActor = new Actor();
$newActor->uri = $actorUri;
@ -404,7 +404,7 @@ if (! function_exists('linkify')) {
) .
'>';
},
$text,
(string) $text,
),
'handle' => preg_replace_callback(
'~(?<!\w)@(?<username>\w++)(?:@(?<domain>(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]))?~',
@ -460,7 +460,7 @@ if (! function_exists('linkify')) {
'>';
}
},
$text,
(string) $text,
),
default => preg_replace_callback(
'~' .
@ -481,7 +481,7 @@ if (! function_exists('linkify')) {
) .
'>';
},
$text,
(string) $text,
),
};
}
@ -492,7 +492,7 @@ if (! function_exists('linkify')) {
static function (array $match) use (&$links): string {
return $links[$match[1] - 1];
},
$text,
(string) $text,
);
}
}

View File

@ -73,7 +73,7 @@ class HttpSignature
}
// compute body digest and compare with header digest
$bodyDigest = hash('sha256', $this->request->getBody(), true);
$bodyDigest = hash('sha256', (string) $this->request->getBody(), true);
$digest = 'SHA-256=' . base64_encode($bodyDigest);
if ($digest !== $digestHeader->getValue()) {
throw new Exception('Request digest is incorrect.');
@ -99,7 +99,7 @@ class HttpSignature
// Fetch the public key linked from keyId
$actorRequest = new ActivityRequest($keyId);
$actorResponse = $actorRequest->get();
$actor = json_decode($actorResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
$actor = json_decode((string) $actorResponse->getBody(), false, 512, JSON_THROW_ON_ERROR);
$publicKeyPem = (string) $actor->publicKey->publicKeyPem;

View File

@ -11,7 +11,6 @@ use Modules\PodcastImport\Entities\TaskStatus;
* @link https://castopod.org/
*/
if (! function_exists('get_import_tasks')) {
/**
* @return PodcastImportTask[]

View File

@ -20,26 +20,26 @@
"lint:fix": "eslint --ext js,ts app/Resources --fix",
"lint:css": "stylelint -f verbose \"app/Resources/**/*.css\"",
"lint:css:fix": "stylelint -f verbose --fix \"app/Resources/**/*.css\"",
"prettier": "prettier --check --ignore-path .gitignore .",
"prettier:fix": "prettier --write --ignore-path .gitignore .",
"prettier": "prettier --check .",
"prettier:fix": "prettier --write .",
"typecheck": "tsc",
"commit": "cz",
"release": "semantic-release",
"prepare": "is-ci || husky install"
"prepare": "is-ci || husky"
},
"dependencies": {
"@amcharts/amcharts4": "^4.10.38",
"@amcharts/amcharts4-geodata": "^4.1.28",
"@codemirror/commands": "^6.3.3",
"@codemirror/lang-xml": "^6.0.2",
"@codemirror/language": "^6.10.0",
"@codemirror/language": "^6.10.1",
"@codemirror/state": "^6.4.0",
"@codemirror/view": "^6.23.0",
"@floating-ui/dom": "^1.5.3",
"@codemirror/view": "^6.24.0",
"@floating-ui/dom": "^1.6.3",
"@github/clipboard-copy-element": "^1.3.0",
"@github/hotkey": "^3.1.0",
"@github/markdown-toolbar-element": "^2.2.1",
"@github/relative-time-element": "^4.3.0",
"@github/relative-time-element": "^4.3.1",
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
"@vime/core": "^5.4.1",
"choices.js": "^10.2.0",
@ -47,50 +47,50 @@
"flatpickr": "^4.6.13",
"leaflet": "^1.9.4",
"leaflet.markercluster": "^1.5.3",
"lit": "^3.1.0",
"marked": "^11.1.0",
"wavesurfer.js": "^7.6.0",
"xml-formatter": "^3.6.0"
"lit": "^3.1.2",
"marked": "^11.2.0",
"wavesurfer.js": "^7.7.3",
"xml-formatter": "^3.6.2"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@csstools/css-tokenizer": "^2.2.2",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@csstools/css-tokenizer": "^2.2.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^13.0.0",
"@semantic-release/gitlab": "^13.0.2",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@types/leaflet": "^1.9.8",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"all-contributors-cli": "^6.26.1",
"commitizen": "^4.3.0",
"cross-env": "^7.0.3",
"cssnano": "^6.0.2",
"cssnano": "^6.0.3",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"is-ci": "^3.0.1",
"lint-staged": "^15.2.0",
"postcss": "^8.4.32",
"postcss-import": "^15.1.0",
"lint-staged": "^15.2.2",
"postcss": "^8.4.35",
"postcss-import": "^16.0.1",
"postcss-nesting": "^12.0.2",
"postcss-preset-env": "^9.3.0",
"postcss-reporter": "^7.0.5",
"prettier": "2.8.8",
"postcss-reporter": "^7.1.0",
"prettier": "3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"semantic-release": "^22.0.12",
"stylelint": "^16.1.0",
"semantic-release": "^23.0.2",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
"svgo": "^3.1.0",
"tailwindcss": "^3.4.0",
"svgo": "^3.2.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-pwa": "^0.17.4",
"vite": "^5.1.3",
"vite-plugin-pwa": "^0.17.5",
"workbox-build": "^7.0.0",
"workbox-core": "^7.0.0",
"workbox-routing": "^7.0.0",

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -6,7 +6,6 @@ use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
use Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
@ -14,6 +13,7 @@ use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public']);

View File

@ -38,7 +38,6 @@ if ($episode->publication_status === 'published') {
];
}
?>
<nav class="sticky z-40 flex col-start-2 pt-4 shadow bg-elevated md:px-8 gap-x-2 md:gap-x-4 -top-4 rounded-conditional-b-xl">
<?php foreach ($navigationItems as $item): ?>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>403 Forbidden</title>