From 88c72542f2f035f77690aa91e6902f0857d308cb Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Sat, 25 Apr 2026 15:46:51 -0400 Subject: [PATCH] fix: minor issues Signed-off-by: Sebastian Krupinski --- deploy/nginx/vhost-dev.conf | 14 +++++++++- deploy/nginx/vhost.conf | 8 ++++++ .../Service/ServiceEntityMutableInterface.php | 28 +++++++++---------- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/deploy/nginx/vhost-dev.conf b/deploy/nginx/vhost-dev.conf index 841db4b..d9361a3 100644 --- a/deploy/nginx/vhost-dev.conf +++ b/deploy/nginx/vhost-dev.conf @@ -49,7 +49,19 @@ server { # try_files /index.html =404; #} - # Serve module static assets directly from module folders + # Serve module entrypoints with revalidation so changes to the stable + # module.mjs filename are picked up after rebuilds. + location ~ ^/modules/([^/]+)/static/module\.mjs$ { + alias /var/www/ktrix/main/modules/$1/static/module.mjs; + expires -1; + add_header Cache-Control "no-cache, must-revalidate"; + access_log on; + types { + application/javascript mjs; + } + } + + # Serve module static assets directly from module folders. # URL: /modules//static/... -> FS: /var/www/ktrix/main/modules//static/... # Note: Linux is case-sensitive; ensure URL module casing matches folder name location ~ ^/modules/([^/]+)/static/(.*)$ { diff --git a/deploy/nginx/vhost.conf b/deploy/nginx/vhost.conf index cebfaef..ee4609b 100644 --- a/deploy/nginx/vhost.conf +++ b/deploy/nginx/vhost.conf @@ -49,6 +49,14 @@ server { try_files /index.html =404; } + # Serve module entrypoints with revalidation so changes to the stable + # module.mjs filename are picked up after rebuilds. + location ~ ^/modules/([^/]+)/static/module\.mjs$ { + alias /var/www/ktrix/main/modules/$1/static/module.mjs; + expires -1; + add_header Cache-Control "no-cache, must-revalidate"; + } + # Handle asset files (css, js, images, etc.) - serve directly if they exist location ~* \.(css|js|svg|gif|png|jpg|jpeg|ico|woff|woff2|ttf|eot|map)$ { try_files $uri =404; diff --git a/shared/lib/Mail/Service/ServiceEntityMutableInterface.php b/shared/lib/Mail/Service/ServiceEntityMutableInterface.php index ef144e3..b50ac9f 100644 --- a/shared/lib/Mail/Service/ServiceEntityMutableInterface.php +++ b/shared/lib/Mail/Service/ServiceEntityMutableInterface.php @@ -24,7 +24,7 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface { public const CAPABILITY_ENTITY_CREATE = 'EntityCreate'; public const CAPABILITY_ENTITY_MODIFY = 'EntityModify'; - public const CAPABILITY_ENTITY_DESTROY = 'EntityDestroy'; + public const CAPABILITY_ENTITY_DELETE = 'EntityDelete'; public const CAPABILITY_ENTITY_COPY = 'EntityCopy'; public const CAPABILITY_ENTITY_MOVE = 'EntityMove'; @@ -62,40 +62,40 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface { * @return EntityBaseInterface Modified entity */ public function entityModify(string|int $collection, string|int $identifier, EntityMutableInterface $entity): EntityBaseInterface; + /** - * Destroys one or more entities + * Deletes entities * - * @since 2025.05.01 + * @since 2026.04.01 * - * @param string|int $collection Collection identifier - * @param string|int ...$identifiers Entity identifiers to destroy + * @param EntityIdentifier ...$identifiers Source entities to delete * - * @return array List of destroyed entity identifiers + * @return array Results keyed by entity identifier (true on success, error string on failure) */ - public function entityDestroy(string|int $collection, string|int ...$identifiers): array; + public function entityDelete(EntityIdentifier ...$identifiers): array; /** * Copies entities to another collection * * @since 2025.05.01 * - * @param string|int $target Target collection identifier - * @param array> $sources Source entities to move (collection identifier => [entity identifier]) + * @param CollectionIdentifier $target Target collection identifier + * @param EntityIdentifier ...$identifiers Source entities to copy * - * @return array List of moved entity identifiers + * @return array List of copied entity identifiers */ - public function entityCopy(string|int $target, array $sources): array; + public function entityCopy(CollectionIdentifier $target, EntityIdentifier ...$identifiers): array; /** * Moves entities to another collection * * @since 2025.05.01 * - * @param string|int $target Target collection identifier - * @param array> $sources Source entities to move (collection identifier => [entity identifier]) + * @param CollectionIdentifier $target Target collection identifier + * @param EntityIdentifier ...$identifiers Source entities to move * * @return array List of moved entity identifiers */ - public function entityMove(string|int $target, array $sources): array; + public function entityMove(CollectionIdentifier $target, EntityIdentifier ...$identifiers): array; } -- 2.39.5