Merge pull request 'fix: minor issues' (#43) from fix/minor-issues-0425 into main
Some checks failed
Renovate / renovate (push) Failing after 1h12m55s

Reviewed-on: #43
This commit was merged in pull request #43.
This commit is contained in:
2026-04-25 19:55:05 +00:00
3 changed files with 35 additions and 15 deletions

View File

@@ -49,7 +49,19 @@ server {
# try_files /index.html =404; # 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/<Module>/static/... -> FS: /var/www/ktrix/main/modules/<Module>/static/... # URL: /modules/<Module>/static/... -> FS: /var/www/ktrix/main/modules/<Module>/static/...
# Note: Linux is case-sensitive; ensure URL module casing matches folder name # Note: Linux is case-sensitive; ensure URL module casing matches folder name
location ~ ^/modules/([^/]+)/static/(.*)$ { location ~ ^/modules/([^/]+)/static/(.*)$ {

View File

@@ -49,6 +49,14 @@ server {
try_files /index.html =404; 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 # 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)$ { location ~* \.(css|js|svg|gif|png|jpg|jpeg|ico|woff|woff2|ttf|eot|map)$ {
try_files $uri =404; try_files $uri =404;

View File

@@ -24,7 +24,7 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface {
public const CAPABILITY_ENTITY_CREATE = 'EntityCreate'; public const CAPABILITY_ENTITY_CREATE = 'EntityCreate';
public const CAPABILITY_ENTITY_MODIFY = 'EntityModify'; 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_COPY = 'EntityCopy';
public const CAPABILITY_ENTITY_MOVE = 'EntityMove'; public const CAPABILITY_ENTITY_MOVE = 'EntityMove';
@@ -62,40 +62,40 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface {
* @return EntityBaseInterface Modified entity * @return EntityBaseInterface Modified entity
*/ */
public function entityModify(string|int $collection, string|int $identifier, EntityMutableInterface $entity): EntityBaseInterface; 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 EntityIdentifier ...$identifiers Source entities to delete
* @param string|int ...$identifiers Entity identifiers to destroy
* *
* @return array<string|int,bool> List of destroyed entity identifiers * @return array<string|int,bool|string> 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 * Copies entities to another collection
* *
* @since 2025.05.01 * @since 2025.05.01
* *
* @param string|int $target Target collection identifier * @param CollectionIdentifier $target Target collection identifier
* @param array<string|int,array<string|int>> $sources Source entities to move (collection identifier => [entity identifier]) * @param EntityIdentifier ...$identifiers Source entities to copy
* *
* @return array<string|int,bool> List of moved entity identifiers * @return array<string|int,bool> 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 * Moves entities to another collection
* *
* @since 2025.05.01 * @since 2025.05.01
* *
* @param string|int $target Target collection identifier * @param CollectionIdentifier $target Target collection identifier
* @param array<string|int,array<string|int>> $sources Source entities to move (collection identifier => [entity identifier]) * @param EntityIdentifier ...$identifiers Source entities to move
* *
* @return array<string|int,bool> List of moved entity identifiers * @return array<string|int,bool> List of moved entity identifiers
*/ */
public function entityMove(string|int $target, array $sources): array; public function entityMove(CollectionIdentifier $target, EntityIdentifier ...$identifiers): array;
} }