generated from Nodarx/template
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d347aa7cb9 |
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8
|
image: mongo:7
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
|
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
|
||||||
--health-interval 5s
|
--health-interval 5s
|
||||||
|
|||||||
Generated
+34
-46
@@ -621,20 +621,20 @@
|
|||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "myclabs/deep-copy",
|
"name": "myclabs/deep-copy",
|
||||||
"version": "1.14.0",
|
"version": "1.13.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||||
"reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae"
|
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae",
|
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||||
"reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae",
|
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.0"
|
"php": "^7.1 || ^8.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"doctrine/collections": "<1.6.8",
|
"doctrine/collections": "<1.6.8",
|
||||||
@@ -669,15 +669,15 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
||||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.14.0"
|
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/mnapoli",
|
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
|
||||||
"type": "github"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-08-11T10:17:44+00:00"
|
"time": "2025-08-01T08:46:24+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
@@ -944,23 +944,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
"version": "6.0.2",
|
"version": "6.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||||
"reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5"
|
"reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a248d1640ab059b075f53a2ef0f9856e864e06b5",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5",
|
||||||
"reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5",
|
"reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.3"
|
"php": ">=8.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^12.5.33"
|
"phpunit/phpunit": "^12.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -993,7 +993,7 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
|
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
|
"security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.2"
|
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1013,7 +1013,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-08-25T14:40:53+00:00"
|
"time": "2026-02-02T14:04:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-invoker",
|
"name": "phpunit/php-invoker",
|
||||||
@@ -1201,16 +1201,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "12.5.35",
|
"version": "12.5.31",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "345ac22e42cb14cdc7aa8428655d8bb8c82a4aab"
|
"reference": "0608d157a284f15cc73b99a3327eff06b66a176d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/345ac22e42cb14cdc7aa8428655d8bb8c82a4aab",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0608d157a284f15cc73b99a3327eff06b66a176d",
|
||||||
"reference": "345ac22e42cb14cdc7aa8428655d8bb8c82a4aab",
|
"reference": "0608d157a284f15cc73b99a3327eff06b66a176d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1220,18 +1220,18 @@
|
|||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"ext-xmlwriter": "*",
|
"ext-xmlwriter": "*",
|
||||||
"myclabs/deep-copy": "^1.14.0",
|
"myclabs/deep-copy": "^1.13.4",
|
||||||
"phar-io/manifest": "^2.0.4",
|
"phar-io/manifest": "^2.0.4",
|
||||||
"phar-io/version": "^3.2.1",
|
"phar-io/version": "^3.2.1",
|
||||||
"php": ">=8.3",
|
"php": ">=8.3",
|
||||||
"phpunit/php-code-coverage": "^12.5.7",
|
"phpunit/php-code-coverage": "^12.5.7",
|
||||||
"phpunit/php-file-iterator": "^6.0.2",
|
"phpunit/php-file-iterator": "^6.0.1",
|
||||||
"phpunit/php-invoker": "^6.0.0",
|
"phpunit/php-invoker": "^6.0.0",
|
||||||
"phpunit/php-text-template": "^5.0.0",
|
"phpunit/php-text-template": "^5.0.0",
|
||||||
"phpunit/php-timer": "^8.0.0",
|
"phpunit/php-timer": "^8.0.0",
|
||||||
"sebastian/cli-parser": "^4.2.1",
|
"sebastian/cli-parser": "^4.2.1",
|
||||||
"sebastian/comparator": "^7.1.8",
|
"sebastian/comparator": "^7.1.8",
|
||||||
"sebastian/diff": "^7.0.1",
|
"sebastian/diff": "^7.0.0",
|
||||||
"sebastian/environment": "^8.1.2",
|
"sebastian/environment": "^8.1.2",
|
||||||
"sebastian/exporter": "^7.0.3",
|
"sebastian/exporter": "^7.0.3",
|
||||||
"sebastian/global-state": "^8.0.3",
|
"sebastian/global-state": "^8.0.3",
|
||||||
@@ -1279,7 +1279,7 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.35"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.31"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1287,7 +1287,7 @@
|
|||||||
"type": "other"
|
"type": "other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-09-09T04:48:50+00:00"
|
"time": "2026-07-06T14:54:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
@@ -1510,24 +1510,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/diff",
|
"name": "sebastian/diff",
|
||||||
"version": "7.0.1",
|
"version": "7.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||||
"reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6"
|
"reference": "7ab1ea946c012266ca32390913653d844ecd085f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6",
|
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f",
|
||||||
"reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6",
|
"reference": "7ab1ea946c012266ca32390913653d844ecd085f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.3"
|
"php": ">=8.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^12.5.33",
|
"phpunit/phpunit": "^12.0",
|
||||||
"symfony/process": "^7.4.17"
|
"symfony/process": "^7.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -1565,27 +1565,15 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/diff/security/policy",
|
"security": "https://github.com/sebastianbergmann/diff/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/diff/tree/7.0.1"
|
"source": "https://github.com/sebastianbergmann/diff/tree/7.0.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/sebastianbergmann",
|
"url": "https://github.com/sebastianbergmann",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://liberapay.com/sebastianbergmann",
|
|
||||||
"type": "liberapay"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://thanks.dev/u/gh/sebastianbergmann",
|
|
||||||
"type": "thanks_dev"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/sebastian/diff",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-08-25T15:35:54+00:00"
|
"time": "2025-02-07T04:55:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/environment",
|
"name": "sebastian/environment",
|
||||||
@@ -2327,5 +2315,5 @@
|
|||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "8.3"
|
"php": "8.3"
|
||||||
},
|
},
|
||||||
"plugin-api-version": "2.9.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use KTXM\ProviderImap\Providers\Provider;
|
|||||||
use KTXM\ProviderImap\Providers\Service;
|
use KTXM\ProviderImap\Providers\Service;
|
||||||
use KTXM\ProviderImap\Providers\ServiceIdentityBasic;
|
use KTXM\ProviderImap\Providers\ServiceIdentityBasic;
|
||||||
use KTXM\ProviderImap\Providers\ServiceLocation;
|
use KTXM\ProviderImap\Providers\ServiceLocation;
|
||||||
use KTXC\Context\TenantContext;
|
use KTXC\SessionTenant;
|
||||||
use Symfony\Component\Console\Attribute\AsCommand;
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
@@ -41,7 +41,7 @@ class ConnectCommand extends Command
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly Provider $provider,
|
private readonly Provider $provider,
|
||||||
private readonly TenantContext $tenantContext,
|
private readonly SessionTenant $sessionTenant,
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ class ConnectCommand extends Command
|
|||||||
|
|
||||||
// ── Persist ──────────────────────────────────────────────────────────
|
// ── Persist ──────────────────────────────────────────────────────────
|
||||||
|
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
|
|
||||||
$label = $io->ask('Service label', $username);
|
$label = $io->ask('Service label', $username);
|
||||||
if ($label) {
|
if ($label) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace KTXM\ProviderImap\Console;
|
|||||||
|
|
||||||
use KTXM\ProviderImap\Providers\Provider;
|
use KTXM\ProviderImap\Providers\Provider;
|
||||||
use KTXM\ProviderImap\Providers\Service;
|
use KTXM\ProviderImap\Providers\Service;
|
||||||
use KTXC\Context\TenantContext;
|
use KTXC\SessionTenant;
|
||||||
use Symfony\Component\Console\Attribute\AsCommand;
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
@@ -37,7 +37,7 @@ class DisconnectCommand extends Command
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly Provider $provider,
|
private readonly Provider $provider,
|
||||||
private readonly TenantContext $tenantContext,
|
private readonly SessionTenant $sessionTenant,
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ class DisconnectCommand extends Command
|
|||||||
$userId = (string) ($input->getOption('user') ?? '');
|
$userId = (string) ($input->getOption('user') ?? '');
|
||||||
|
|
||||||
if ($tenantId !== '' && $userId !== '') {
|
if ($tenantId !== '' && $userId !== '') {
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
$services = $this->provider->serviceList($tenantId, $userId);
|
$services = $this->provider->serviceList($tenantId, $userId);
|
||||||
|
|
||||||
if (empty($services)) {
|
if (empty($services)) {
|
||||||
@@ -130,7 +130,7 @@ class DisconnectCommand extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ── Fetch service for display ────────────────────────────────────────
|
// ── Fetch service for display ────────────────────────────────────────
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
$service = $this->provider->serviceFetch($tenantId, $userId, $serviceId);
|
$service = $this->provider->serviceFetch($tenantId, $userId, $serviceId);
|
||||||
|
|
||||||
if ($service === null) {
|
if ($service === null) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ use KTXM\ProviderImap\Providers\Service;
|
|||||||
use KTXM\ProviderImap\Providers\ServiceIdentityBasic;
|
use KTXM\ProviderImap\Providers\ServiceIdentityBasic;
|
||||||
use KTXM\ProviderImap\Providers\ServiceLocation;
|
use KTXM\ProviderImap\Providers\ServiceLocation;
|
||||||
use KTXM\ProviderImap\Service\Discovery;
|
use KTXM\ProviderImap\Service\Discovery;
|
||||||
use KTXC\Context\TenantContext;
|
use KTXC\SessionTenant;
|
||||||
use Symfony\Component\Console\Attribute\AsCommand;
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
@@ -43,7 +43,7 @@ class DiscoverCommand extends Command
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly Provider $provider,
|
private readonly Provider $provider,
|
||||||
private readonly Discovery $discovery,
|
private readonly Discovery $discovery,
|
||||||
private readonly TenantContext $tenantContext,
|
private readonly SessionTenant $sessionTenant,
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ class DiscoverCommand extends Command
|
|||||||
|
|
||||||
// ── Persist ──────────────────────────────────────────────────────────
|
// ── Persist ──────────────────────────────────────────────────────────
|
||||||
|
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
|
|
||||||
$label = $io->ask('Service label', $address);
|
$label = $io->ask('Service label', $address);
|
||||||
if ($label) {
|
if ($label) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace KTXM\ProviderImap\Console;
|
namespace KTXM\ProviderImap\Console;
|
||||||
|
|
||||||
use KTXC\Context\TenantContext;
|
use KTXC\SessionTenant;
|
||||||
use KTXM\ProviderImap\Client\Command\SelectCommand;
|
use KTXM\ProviderImap\Client\Command\SelectCommand;
|
||||||
use KTXM\ProviderImap\Client\FetchOptions;
|
use KTXM\ProviderImap\Client\FetchOptions;
|
||||||
use KTXM\ProviderImap\Client\FetchTarget;
|
use KTXM\ProviderImap\Client\FetchTarget;
|
||||||
@@ -41,7 +41,7 @@ class TestCommand extends Command
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly Provider $provider,
|
private readonly Provider $provider,
|
||||||
private readonly TenantContext $tenantContext,
|
private readonly SessionTenant $sessionTenant,
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ class TestCommand extends Command
|
|||||||
return Command::FAILURE;
|
return Command::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
$service = $this->provider->serviceFetch($tenantId, $userId, $serviceId);
|
$service = $this->provider->serviceFetch($tenantId, $userId, $serviceId);
|
||||||
|
|
||||||
if ($service === null) {
|
if ($service === null) {
|
||||||
@@ -269,7 +269,7 @@ class TestCommand extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tenantContext->resolveIdentifier($tenantId);
|
$this->sessionTenant->configureById($tenantId);
|
||||||
$services = $this->provider->serviceList($tenantId, $userId);
|
$services = $this->provider->serviceList($tenantId, $userId);
|
||||||
|
|
||||||
if ($services === []) {
|
if ($services === []) {
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace KTXM\ProviderImap\Listeners;
|
|
||||||
|
|
||||||
use KTXC\User\Event\UserCreatedEvent;
|
|
||||||
use KTXC\User\Event\UserDeletingEvent;
|
|
||||||
use KTXM\ProviderImap\Stores\MessageStore;
|
|
||||||
use KTXM\ProviderImap\Stores\ServiceStore;
|
|
||||||
|
|
||||||
final class UserEventListener
|
|
||||||
{
|
|
||||||
public function __construct(
|
|
||||||
private readonly ServiceStore $serviceStore,
|
|
||||||
private readonly MessageStore $messageStore,
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public function onUserCreated(UserCreatedEvent $event): void
|
|
||||||
{
|
|
||||||
// TODO: implement provisioning configuration
|
|
||||||
}
|
|
||||||
|
|
||||||
public function onUserDeleting(UserDeletingEvent $event): void
|
|
||||||
{
|
|
||||||
$tenantId = $event->tenantIdentifier();
|
|
||||||
$userId = $event->userIdentifier();
|
|
||||||
|
|
||||||
foreach (array_keys($this->serviceStore->list($tenantId, $userId)) as $serviceId) {
|
|
||||||
$this->messageStore->deleteByServiceId((string) $serviceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->serviceStore->deleteByUser($tenantId, $userId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+22
-28
@@ -10,20 +10,14 @@ declare(strict_types=1);
|
|||||||
namespace KTXM\ProviderImap;
|
namespace KTXM\ProviderImap;
|
||||||
|
|
||||||
use KTXC\Resource\ProviderManager;
|
use KTXC\Resource\ProviderManager;
|
||||||
use KTXC\User\Event\UserCreatedEvent;
|
use KTXF\Module\ModuleBrowserInterface;
|
||||||
use KTXC\User\Event\UserDeletingEvent;
|
use KTXF\Module\ModuleConsoleInterface;
|
||||||
use KTXF\Event\DeliveryMode;
|
|
||||||
use KTXF\Event\EventListenerRegistrarInterface;
|
|
||||||
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
|
||||||
use KTXF\Module\Configuration\ConsoleModuleContextInterface;
|
|
||||||
use KTXF\Module\Configuration\ModuleContextInterface;
|
|
||||||
use KTXF\Module\ModuleInstanceAbstract;
|
use KTXF\Module\ModuleInstanceAbstract;
|
||||||
use KTXF\Resource\Provider\ProviderInterface;
|
use KTXF\Resource\Provider\ProviderInterface;
|
||||||
use KTXM\ProviderImap\Console\ConnectCommand;
|
use KTXM\ProviderImap\Console\ConnectCommand;
|
||||||
use KTXM\ProviderImap\Console\DiscoverCommand;
|
use KTXM\ProviderImap\Console\DiscoverCommand;
|
||||||
use KTXM\ProviderImap\Console\DisconnectCommand;
|
use KTXM\ProviderImap\Console\DisconnectCommand;
|
||||||
use KTXM\ProviderImap\Console\TestCommand;
|
use KTXM\ProviderImap\Console\TestCommand;
|
||||||
use KTXM\ProviderImap\Listeners\UserEventListener;
|
|
||||||
use KTXM\ProviderImap\Providers\Provider as MailProvider;
|
use KTXM\ProviderImap\Providers\Provider as MailProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,11 +25,10 @@ use KTXM\ProviderImap\Providers\Provider as MailProvider;
|
|||||||
*
|
*
|
||||||
* Registers the IMAP mail provider with the Ktrix provider manager.
|
* Registers the IMAP mail provider with the Ktrix provider manager.
|
||||||
*/
|
*/
|
||||||
class Module extends ModuleInstanceAbstract
|
class Module extends ModuleInstanceAbstract implements ModuleConsoleInterface, ModuleBrowserInterface
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ProviderManager $providerManager,
|
private readonly ProviderManager $providerManager,
|
||||||
private readonly EventListenerRegistrarInterface $events,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function handle(): string
|
public function handle(): string
|
||||||
@@ -76,28 +69,29 @@ class Module extends ModuleInstanceAbstract
|
|||||||
|
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
// Register listeners
|
|
||||||
$this->events->listen($this->handle(), UserCreatedEvent::class, UserEventListener::class, 'onUserCreated', DeliveryMode::Deferred);
|
|
||||||
$this->events->listen($this->handle(), UserDeletingEvent::class, UserEventListener::class, 'onUserDeleting', DeliveryMode::Deferred);
|
|
||||||
// Register providers
|
|
||||||
$this->providerManager->register(ProviderInterface::TYPE_MAIL, 'imap', MailProvider::class);
|
$this->providerManager->register(ProviderInterface::TYPE_MAIL, 'imap', MailProvider::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configure(ModuleContextInterface $context): void
|
public function registerCI(): array
|
||||||
{
|
{
|
||||||
if ($context instanceof BrowserModuleContextInterface) {
|
return [
|
||||||
$context->registerModule($this, 'ProviderImap', 'static/module.mjs');
|
DiscoverCommand::class,
|
||||||
}
|
ConnectCommand::class,
|
||||||
|
DisconnectCommand::class,
|
||||||
|
TestCommand::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
if ($context instanceof ConsoleModuleContextInterface) {
|
public function registerBI(): array
|
||||||
foreach ([
|
{
|
||||||
DiscoverCommand::class,
|
return [
|
||||||
ConnectCommand::class,
|
'handle' => $this->handle(),
|
||||||
DisconnectCommand::class,
|
'namespace' => 'ProviderImap',
|
||||||
TestCommand::class,
|
'version' => $this->version(),
|
||||||
] as $command) {
|
'label' => $this->label(),
|
||||||
$context->registerCommand($command);
|
'author' => $this->author(),
|
||||||
}
|
'description' => $this->description(),
|
||||||
}
|
'boot' => 'static/module.mjs',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace KTXM\ProviderImap\Providers;
|
|||||||
|
|
||||||
use KTXM\ProviderImap\Client\Message;
|
use KTXM\ProviderImap\Client\Message;
|
||||||
use KTXF\Mail\Entity\EntityMutableAbstract;
|
use KTXF\Mail\Entity\EntityMutableAbstract;
|
||||||
use KTXF\Mail\Object\MessagePropertiesMutableInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mail Entity Resource Implementation
|
* Mail Entity Resource Implementation
|
||||||
@@ -43,26 +42,6 @@ class EntityResource extends EntityMutableAbstract {
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate an entity returned by a create or replacement operation.
|
|
||||||
*/
|
|
||||||
public function fromMutation(
|
|
||||||
string $mailbox,
|
|
||||||
string|int $identifier,
|
|
||||||
MessagePropertiesMutableInterface $properties,
|
|
||||||
): static {
|
|
||||||
$this->data['collection'] = $mailbox;
|
|
||||||
$this->data['identifier'] = $identifier;
|
|
||||||
|
|
||||||
if ($properties instanceof MessageProperties) {
|
|
||||||
$this->setProperties($properties);
|
|
||||||
} else {
|
|
||||||
$this->getProperties()->jsonDeserialize($properties->jsonSerialize());
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
|
|||||||
],
|
],
|
||||||
self::CAPABILITY_ENTITY_FETCH => true,
|
self::CAPABILITY_ENTITY_FETCH => true,
|
||||||
self::CAPABILITY_ENTITY_EXTANT => true,
|
self::CAPABILITY_ENTITY_EXTANT => true,
|
||||||
self::CAPABILITY_ENTITY_CREATE => true,
|
self::CAPABILITY_ENTITY_CREATE => false,
|
||||||
self::CAPABILITY_ENTITY_MODIFY => true,
|
self::CAPABILITY_ENTITY_MODIFY => false,
|
||||||
self::CAPABILITY_ENTITY_PATCH => true,
|
self::CAPABILITY_ENTITY_PATCH => true,
|
||||||
self::CAPABILITY_ENTITY_DELETE => true,
|
self::CAPABILITY_ENTITY_DELETE => true,
|
||||||
self::CAPABILITY_ENTITY_MOVE => true,
|
self::CAPABILITY_ENTITY_MOVE => true,
|
||||||
@@ -200,9 +200,8 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
|
|||||||
if (isset($data[self::PROPERTY_IDENTITY])) {
|
if (isset($data[self::PROPERTY_IDENTITY])) {
|
||||||
$this->setIdentity($this->freshIdentity(null, $data[self::PROPERTY_IDENTITY]));
|
$this->setIdentity($this->freshIdentity(null, $data[self::PROPERTY_IDENTITY]));
|
||||||
}
|
}
|
||||||
if (isset($data[self::PROPERTY_PRIMARY_ADDRESS])) {
|
if (isset($data[self::PROPERTY_PRIMARY_ADDRESS]) && is_string($data[self::PROPERTY_PRIMARY_ADDRESS])) {
|
||||||
$value = $data[self::PROPERTY_PRIMARY_ADDRESS];
|
$this->setPrimaryAddress(new Address($data[self::PROPERTY_PRIMARY_ADDRESS]));
|
||||||
$this->setPrimaryAddress(is_array($value) ? Address::fromArray($value) : new Address((string)$value));
|
|
||||||
}
|
}
|
||||||
if (isset($data[self::PROPERTY_SECONDARY_ADDRESSES]) && is_array($data[self::PROPERTY_SECONDARY_ADDRESSES])) {
|
if (isset($data[self::PROPERTY_SECONDARY_ADDRESSES]) && is_array($data[self::PROPERTY_SECONDARY_ADDRESSES])) {
|
||||||
$this->setSecondaryAddresses(array_map(
|
$this->setSecondaryAddresses(array_map(
|
||||||
@@ -675,27 +674,10 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
|
|||||||
// ignore — the message was already delivered
|
// ignore — the message was already delivered
|
||||||
}
|
}
|
||||||
|
|
||||||
// Best-effort: IMAP has no native "submit existing draft" operation, so the
|
|
||||||
// message above was always sent fresh. If it originated from a synced draft,
|
|
||||||
// remove the now-superseded draft UID. A failure here must not turn a
|
|
||||||
// successful delivery into an error; the draft is simply left for a later
|
|
||||||
// discard or retry.
|
|
||||||
if ($source !== null
|
|
||||||
&& $source->provider() === $this->provider()
|
|
||||||
&& $source->service() === $this->identifier()) {
|
|
||||||
try {
|
|
||||||
$this->initialize();
|
|
||||||
$this->remoteService->entityDestroy($source->collection(), (int) $source->entity());
|
|
||||||
} catch (\Throwable) {
|
|
||||||
// ignore — the message was already delivered
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new EntitySubmitResult(
|
return new EntitySubmitResult(
|
||||||
disposition: EntitySubmitResult::DISPOSITION_SENT,
|
disposition: EntitySubmitResult::DISPOSITION_SENT,
|
||||||
transportId: $queueId !== '' ? $queueId : null,
|
transportId: $queueId !== '' ? $queueId : null,
|
||||||
sentEntity: $sentEntity,
|
sentEntity: $sentEntity,
|
||||||
sourceDraft: $source instanceof EntityIdentifier ? $source : null,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,45 +700,12 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
|
|||||||
|
|
||||||
public function entityCreate(CollectionIdentifier $target, MessagePropertiesMutableInterface $properties, array $options = []): EntityResource
|
public function entityCreate(CollectionIdentifier $target, MessagePropertiesMutableInterface $properties, array $options = []): EntityResource
|
||||||
{
|
{
|
||||||
if ($target->provider() !== $this->provider() || (string)$target->service() !== (string)$this->identifier()) {
|
throw new \RuntimeException('Entity creation is not supported in this service');
|
||||||
throw new \InvalidArgumentException('Target collection does not belong to this service: ' . (string)$target);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->initialize();
|
|
||||||
|
|
||||||
[$nativeMessage, $nativeFlags] = $this->messagePayload($properties, $options);
|
|
||||||
$created = $this->remoteService->entityCreate(
|
|
||||||
(string)$target->collection(),
|
|
||||||
$nativeMessage,
|
|
||||||
$nativeFlags,
|
|
||||||
);
|
|
||||||
if ($created === null || $created <= 0) {
|
|
||||||
throw new \RuntimeException('IMAP APPEND did not return a valid UID');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->entityFresh()->fromMutation((string)$target->collection(), $created, $properties);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function entityModify(EntityIdentifier $target, MessagePropertiesMutableInterface $properties): EntityResource
|
public function entityModify(EntityIdentifier $target, MessagePropertiesMutableInterface $properties): EntityResource
|
||||||
{
|
{
|
||||||
if ($target->provider() !== $this->provider() || (string)$target->service() !== (string)$this->identifier()) {
|
throw new \RuntimeException('Entity modification is not supported in this service');
|
||||||
throw new \InvalidArgumentException('Target entity does not belong to this service: ' . (string)$target);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->initialize();
|
|
||||||
|
|
||||||
[$nativeMessage, $nativeFlags] = $this->messagePayload($properties);
|
|
||||||
$modified = $this->remoteService->entityReplace(
|
|
||||||
(string)$target->collection(),
|
|
||||||
(int)$target->entity(),
|
|
||||||
$nativeMessage,
|
|
||||||
$nativeFlags,
|
|
||||||
);
|
|
||||||
if ($modified === null || $modified <= 0) {
|
|
||||||
throw new \RuntimeException('IMAP replacement did not return a valid UID');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->entityFresh()->fromMutation((string)$target->collection(), $modified, $properties);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function entityPatch(MessagePropertiesMutableInterface $properties, EntityIdentifier ...$targets): array
|
public function entityPatch(MessagePropertiesMutableInterface $properties, EntityIdentifier ...$targets): array
|
||||||
@@ -941,46 +890,5 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
|
|||||||
}
|
}
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert canonical message flags to IMAP system flags.
|
|
||||||
*
|
|
||||||
* @return string[]
|
|
||||||
*/
|
|
||||||
private function messageFlags(MessagePropertiesMutableInterface $properties): array
|
|
||||||
{
|
|
||||||
$flags = [];
|
|
||||||
foreach ($properties->getFlags() as $flag => $enabled) {
|
|
||||||
if ($enabled !== true) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$flags[] = match (strtolower((string)$flag)) {
|
|
||||||
'seen' => '\\Seen',
|
|
||||||
'flagged' => '\\Flagged',
|
|
||||||
'answered' => '\\Answered',
|
|
||||||
'draft' => '\\Draft',
|
|
||||||
'deleted' => '\\Deleted',
|
|
||||||
default => (string)$flag,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return array_values(array_unique($flags));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert message properties into the native IMAP append payload.
|
|
||||||
*
|
|
||||||
* @return array{0: string, 1: string[]}
|
|
||||||
*/
|
|
||||||
private function messagePayload(MessagePropertiesMutableInterface $properties, array $options = []): array
|
|
||||||
{
|
|
||||||
$flags = $this->messageFlags($properties);
|
|
||||||
if (isset($options['flags']) && is_array($options['flags'])) {
|
|
||||||
$flags = array_values(array_unique([...$flags, ...$options['flags']]));
|
|
||||||
}
|
|
||||||
|
|
||||||
return [(new MessageBuilder())->build($properties), $flags];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace KTXM\ProviderImap\Service\Remote;
|
|||||||
|
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Generator;
|
use Generator;
|
||||||
|
use KTXC\Server;
|
||||||
use KTXC\Logger\PlainFileLogger;
|
use KTXC\Logger\PlainFileLogger;
|
||||||
use KTXM\ProviderImap\Client\Client as ImapClient;
|
use KTXM\ProviderImap\Client\Client as ImapClient;
|
||||||
use KTXM\ProviderImap\Client\Command\AppendCommand;
|
use KTXM\ProviderImap\Client\Command\AppendCommand;
|
||||||
@@ -131,7 +132,7 @@ class RemoteMailService
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$logDir = dirname(__DIR__, 5) . '/var/logs/provider_imap';
|
$logDir = Server::getInstance()?->logDir() ?? __DIR__ . '/../../../../../var/log';
|
||||||
|
|
||||||
return new PlainFileLogger($logDir . '/' . $channel, $this->service->identifier());
|
return new PlainFileLogger($logDir . '/' . $channel, $this->service->identifier());
|
||||||
}
|
}
|
||||||
@@ -490,44 +491,6 @@ class RemoteMailService
|
|||||||
return $this->imapClient()->perform(new AppendCommand($collection, $rawMessage, $flags));
|
return $this->imapClient()->perform(new AppendCommand($collection, $rawMessage, $flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Append a replacement message, then permanently remove the superseded UID.
|
|
||||||
* The replacement is removed on cleanup failure so the old UID remains
|
|
||||||
* authoritative for a later retry.
|
|
||||||
*
|
|
||||||
* @param string[] $flags
|
|
||||||
*/
|
|
||||||
public function entityReplace(
|
|
||||||
string $collection,
|
|
||||||
int $identifier,
|
|
||||||
string $rawMessage,
|
|
||||||
array $flags = [],
|
|
||||||
): ?int {
|
|
||||||
if ($identifier <= 0) {
|
|
||||||
throw new RuntimeException('A valid IMAP UID is required for replacement');
|
|
||||||
}
|
|
||||||
|
|
||||||
$replacement = $this->entityCreate($collection, $rawMessage, $flags);
|
|
||||||
if ($replacement === null || $replacement <= 0) {
|
|
||||||
throw new RuntimeException('IMAP replacement append did not return a valid UID');
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$deleted = $this->entityDestroy($collection, $identifier);
|
|
||||||
if (($deleted[$identifier] ?? false) !== true) {
|
|
||||||
throw new RuntimeException('Failed to delete the superseded IMAP entity');
|
|
||||||
}
|
|
||||||
} catch (\Throwable $error) {
|
|
||||||
try {
|
|
||||||
$this->entityDestroy($collection, $replacement);
|
|
||||||
} catch (\Throwable) {
|
|
||||||
}
|
|
||||||
throw $error;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $replacement;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify message flags for one or more messages.
|
* Modify message flags for one or more messages.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -177,15 +177,4 @@ class ServiceStore
|
|||||||
return $result->getDeletedCount() > 0;
|
return $result->getDeletedCount() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete every service owned by a user.
|
|
||||||
*/
|
|
||||||
public function deleteByUser(string $tenantId, string $userId): void
|
|
||||||
{
|
|
||||||
$this->dataStore->selectCollection(self::COLLECTION_NAME)->deleteMany([
|
|
||||||
'tid' => $tenantId,
|
|
||||||
'uid' => $userId,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+68
-119
@@ -70,13 +70,11 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator": {
|
"node_modules/@babel/generator": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.0.tgz",
|
|
||||||
"integrity": "sha512-NT9NrVwJsbSV6Y2FSstWa71EETOnzrjkL5/wX3D2mYHtKM+qvqB1DvR4D0Setb/gDBsHzRICifwEWMO8CnTF6g==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "^8.0.0",
|
"@babel/parser": "^8.0.0-rc.5",
|
||||||
"@babel/types": "^8.0.0",
|
"@babel/types": "^8.0.0-rc.5",
|
||||||
"@jridgewell/gen-mapping": "^0.3.12",
|
"@jridgewell/gen-mapping": "^0.3.12",
|
||||||
"@jridgewell/trace-mapping": "^0.3.28",
|
"@jridgewell/trace-mapping": "^0.3.28",
|
||||||
"@types/jsesc": "^2.5.0",
|
"@types/jsesc": "^2.5.0",
|
||||||
@@ -87,30 +85,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator/node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/generator/node_modules/@babel/helper-string-parser": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0.tgz",
|
|
||||||
"integrity": "sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier": {
|
"node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier": {
|
||||||
"version": "8.0.4",
|
"version": "8.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.4.tgz",
|
|
||||||
"integrity": "sha512-4wFaiLd0bVo4cIoTXI3zKI038NIWE/cr3jvBjejOVYVxV/m8Ltav1USiGzG1fmS5J2RhgEOgXNNK46cRPnRsrg==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator/node_modules/@babel/parser": {
|
"node_modules/@babel/generator/node_modules/@babel/parser": {
|
||||||
"version": "8.0.4",
|
"version": "8.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.4.tgz",
|
|
||||||
"integrity": "sha512-srpptsAkEbbNIC/q8nT7o+m6CQe8CJUTV/t7MYc9NnWlgYVtHOb7JH6SorxMhN0kuRJjVqXbKClG6xSbPtzz+g==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^8.0.4"
|
"@babel/types": "^8.0.0-rc.5"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"parser": "bin/babel-parser.js"
|
"parser": "bin/babel-parser.js"
|
||||||
@@ -120,13 +112,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator/node_modules/@babel/types": {
|
"node_modules/@babel/generator/node_modules/@babel/types": {
|
||||||
"version": "8.0.4",
|
"version": "8.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.4.tgz",
|
|
||||||
"integrity": "sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-string-parser": "^8.0.0",
|
"@babel/helper-string-parser": "^8.0.0-rc.5",
|
||||||
"@babel/helper-validator-identifier": "^8.0.4"
|
"@babel/helper-validator-identifier": "^8.0.0-rc.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
@@ -542,6 +532,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -558,6 +551,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"musl"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -574,6 +570,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -590,6 +589,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -604,6 +606,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -618,6 +623,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"musl"
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -911,9 +919,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue-macros/common": {
|
"node_modules/@vue-macros/common": {
|
||||||
"version": "3.1.4",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.4.tgz",
|
|
||||||
"integrity": "sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compiler-sfc": "^3.5.22",
|
"@vue/compiler-sfc": "^3.5.22",
|
||||||
@@ -980,36 +986,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-api": {
|
"node_modules/@vue/devtools-api": {
|
||||||
"version": "8.1.5",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.1.5.tgz",
|
|
||||||
"integrity": "sha512-YJipMVAKe5wT5CWf5kTYCaNV7NMNjFVxJkIkJaJ4W/nCxEBzlZzrOsYKeCymdCrFZmBS/+wTWFoUs3Jf/Q6XSQ==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-kit": "^8.1.5"
|
"@vue/devtools-kit": "^8.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-api/node_modules/@vue/devtools-kit": {
|
"node_modules/@vue/devtools-api/node_modules/@vue/devtools-kit": {
|
||||||
"version": "8.1.5",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.1.5.tgz",
|
|
||||||
"integrity": "sha512-FcSAxsi4eWuXLCB7Rv9lj0aIVHHPNVQ2BazGf4RJTc2JCqb4BQg0hk87ZFhminCfl+mD5OUI0rX2cgyu4kJOGA==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-shared": "^8.1.5",
|
"@vue/devtools-shared": "^8.1.2",
|
||||||
"birpc": "^2.6.1",
|
"birpc": "^2.6.1",
|
||||||
"hookable": "^5.5.3",
|
"hookable": "^5.5.3",
|
||||||
"perfect-debounce": "^2.0.0"
|
"perfect-debounce": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-api/node_modules/@vue/devtools-shared": {
|
"node_modules/@vue/devtools-api/node_modules/@vue/devtools-shared": {
|
||||||
"version": "8.1.5",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.1.5.tgz",
|
|
||||||
"integrity": "sha512-mhT4zcPFhF+Xk1O4BfhhrbXzpmfqY03fS6xGpcllbQG7lDjhQf8pQHcTIhqQIYx1hfwtHmk/6jM96ele0UxPqQ==",
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-api/node_modules/perfect-debounce": {
|
"node_modules/@vue/devtools-api/node_modules/perfect-debounce": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-kit": {
|
"node_modules/@vue/devtools-kit": {
|
||||||
@@ -1033,9 +1031,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/language-core": {
|
"node_modules/@vue/language-core": {
|
||||||
"version": "3.3.8",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.3.8.tgz",
|
|
||||||
"integrity": "sha512-ieGT8jJdhhy0mGzStZhsg/qPw5bQZJg5yF+3+XU6saf4sM7yo9ZXy3h+nCwrm2+b4qS/SypkNdR2jAF3uei9tA==",
|
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1833,6 +1829,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1853,6 +1852,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"musl"
|
||||||
|
],
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1871,6 +1873,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"glibc"
|
||||||
|
],
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1889,6 +1894,9 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"libc": [
|
||||||
|
"musl"
|
||||||
|
],
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1943,9 +1951,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/local-pkg": {
|
"node_modules/local-pkg": {
|
||||||
"version": "1.2.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.2.1.tgz",
|
|
||||||
"integrity": "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mlly": "^1.7.4",
|
"mlly": "^1.7.4",
|
||||||
@@ -2099,12 +2105,6 @@
|
|||||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nostics": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nostics/-/nostics-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-FGqEfhQjrvo1lL8KFifdTQiNwwQHJxC1jtYE1Rc54qF/jxONUNL+kC9gS1krX8Q65PgrQ5fCqH/I4NhWBvdSqg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/obug": {
|
"node_modules/obug": {
|
||||||
"version": "2.1.4",
|
"version": "2.1.4",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -2648,67 +2648,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/unplugin": {
|
"node_modules/unplugin": {
|
||||||
"version": "3.3.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.3.0.tgz",
|
|
||||||
"integrity": "sha512-qa66K+crbfyE6JK10GjvbJeRrOsuC/JpbnHctfyp/i4oBTxWOzJfRZyDiOk1PtErMFRu8JhsU/wPvOdBNWe5Rg==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/remapping": "^2.3.5",
|
"@jridgewell/remapping": "^2.3.5",
|
||||||
"picomatch": "^4.0.4",
|
"picomatch": "^4.0.3",
|
||||||
"webpack-virtual-modules": "^0.6.2"
|
"webpack-virtual-modules": "^0.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@farmfe/core": "*",
|
|
||||||
"@rspack/core": "*",
|
|
||||||
"bun-types-no-globals": "*",
|
|
||||||
"esbuild": "*",
|
|
||||||
"rolldown": "*",
|
|
||||||
"rollup": "*",
|
|
||||||
"unloader": "*",
|
|
||||||
"vite": "*",
|
|
||||||
"webpack": "*"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"@farmfe/core": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@rspack/core": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"bun-types-no-globals": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"esbuild": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"rolldown": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"rollup": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"unloader": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"vite": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"webpack": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/unplugin-utils": {
|
"node_modules/unplugin-utils": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.2.tgz",
|
|
||||||
"integrity": "sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pathe": "^2.0.3",
|
"pathe": "^2.0.3",
|
||||||
"picomatch": "^4.0.4"
|
"picomatch": "^4.0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.19.0"
|
"node": ">=20.19.0"
|
||||||
@@ -2911,28 +2867,25 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/vue-router": {
|
"node_modules/vue-router": {
|
||||||
"version": "5.2.0",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.2.0.tgz",
|
|
||||||
"integrity": "sha512-QAC5i0LEb1GLG0LXDQmHu8L7FX12j0KwU/JTKmLQUJMrn04gQdKP6Du+p0QwpHb3iy71vBlqnHQ8WAfOSAWhqw==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/generator": "^8.0.0",
|
"@babel/generator": "^8.0.0-rc.4",
|
||||||
"@vue-macros/common": "^3.1.3",
|
"@vue-macros/common": "^3.1.1",
|
||||||
"@vue/devtools-api": "^8.1.5",
|
"@vue/devtools-api": "^8.1.2",
|
||||||
"ast-walker-scope": "^0.9.0",
|
"ast-walker-scope": "^0.9.0",
|
||||||
"chokidar": "^5.0.0",
|
"chokidar": "^5.0.0",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"local-pkg": "^1.2.1",
|
"local-pkg": "^1.1.2",
|
||||||
"magic-string": "^0.30.21",
|
"magic-string": "^0.30.21",
|
||||||
"mlly": "^1.8.2",
|
"mlly": "^1.8.2",
|
||||||
"muggle-string": "^0.4.1",
|
"muggle-string": "^0.4.1",
|
||||||
"nostics": "^1.1.4",
|
|
||||||
"pathe": "^2.0.3",
|
"pathe": "^2.0.3",
|
||||||
"picomatch": "^4.0.5",
|
"picomatch": "^4.0.3",
|
||||||
"scule": "^1.3.0",
|
"scule": "^1.3.0",
|
||||||
"tinyglobby": "^0.2.17",
|
"tinyglobby": "^0.2.16",
|
||||||
"unplugin": "^3.3.0",
|
"unplugin": "^3.0.0",
|
||||||
"unplugin-utils": "^0.3.2",
|
"unplugin-utils": "^0.3.1",
|
||||||
"yaml": "^2.9.0"
|
"yaml": "^2.9.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
@@ -2940,10 +2893,10 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@pinia/colada": ">=0.21.2",
|
"@pinia/colada": ">=0.21.2",
|
||||||
"@vue/compiler-sfc": "^3.5.34 || ^4.0.0",
|
"@vue/compiler-sfc": "^3.5.34",
|
||||||
"pinia": "^3.0.4 || ^4.0.2",
|
"pinia": "^3.0.4",
|
||||||
"vite": "^7.3.0 || ^8.0.0",
|
"vite": "^7.0.0 || ^8.0.0",
|
||||||
"vue": "^3.5.34 || ^4.0.0"
|
"vue": "^3.5.34"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@pinia/colada": {
|
"@pinia/colada": {
|
||||||
@@ -2961,14 +2914,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-tsc": {
|
"node_modules/vue-tsc": {
|
||||||
"version": "3.3.8",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.3.8.tgz",
|
|
||||||
"integrity": "sha512-xXmYlVQpcwJDWyGlqbHrGVOl1h3UOsASymRibrHc+iy9j/UNnOrOn4u+fntHz4D6Cs74RtapeqVV6CzJeg+UlA==",
|
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@volar/typescript": "2.4.28",
|
"@volar/typescript": "2.4.28",
|
||||||
"@vue/language-core": "3.3.8"
|
"@vue/language-core": "3.3.7"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"vue-tsc": "bin/vue-tsc.js"
|
"vue-tsc": "bin/vue-tsc.js"
|
||||||
@@ -2978,9 +2929,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vuetify": {
|
"node_modules/vuetify": {
|
||||||
"version": "4.1.6",
|
"version": "4.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-4.1.6.tgz",
|
|
||||||
"integrity": "sha512-VOsRTsNfs+FE4JXMONZkqX2yznSqC/FXG9/pgVVjsoqIjUvJg+CfFTuOlgyWVFrZYY+crk7LV9uaiN8bZREV/g==",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
"test:coverage": "vitest run --coverage --config tests/js/vitest.config.ts"
|
"test:coverage": "vitest run --coverage --config tests/js/vitest.config.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pinia": "^3.0.0",
|
"pinia": "^4.0.0",
|
||||||
"vue": "^3.5.18",
|
"vue": "^3.5.18",
|
||||||
"vue-router": "^5.0.0",
|
"vue-router": "^5.0.0",
|
||||||
"vuetify": "^4.0.0"
|
"vuetify": "^4.0.0"
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ function sameIdentity(a: ServiceIdentity | null, b: ServiceIdentity | null): boo
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
prepend-inner-icon="mdi-account"
|
prepend-inner-icon="mdi-account"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
autocomplete="off"
|
autocomplete="username"
|
||||||
autocorrect="off"
|
autocorrect="off"
|
||||||
autocapitalize="none"
|
autocapitalize="none"
|
||||||
:rules="[rules.required]"
|
:rules="[rules.required]"
|
||||||
@@ -130,7 +130,7 @@ function sameIdentity(a: ServiceIdentity | null, b: ServiceIdentity | null): boo
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
prepend-inner-icon="mdi-lock"
|
prepend-inner-icon="mdi-lock"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
autocomplete="new-password"
|
autocomplete="current-password"
|
||||||
:rules="[rules.required]"
|
:rules="[rules.required]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace KTXT\ProviderImap\Tests\Unit;
|
|
||||||
|
|
||||||
use KTXM\ProviderImap\Providers\Service;
|
|
||||||
use KTXM\ProviderImap\Service\Remote\RemoteMailService;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
use RuntimeException;
|
|
||||||
|
|
||||||
final class RemoteMailServiceTest extends TestCase {
|
|
||||||
|
|
||||||
public function testEntityReplaceReturnsAuthoritativeReplacementUid(): void {
|
|
||||||
$service = new RemoteMailServiceStub($this->createStub(Service::class));
|
|
||||||
$service->appendUid = 202;
|
|
||||||
$service->destroyResults = [[101 => true]];
|
|
||||||
|
|
||||||
$result = $service->entityReplace('Drafts', 101, 'raw message', ['\\Draft']);
|
|
||||||
|
|
||||||
$this->assertSame(202, $result);
|
|
||||||
$this->assertSame([
|
|
||||||
['Drafts', 'raw message', ['\\Draft']],
|
|
||||||
], $service->createCalls);
|
|
||||||
$this->assertSame([
|
|
||||||
['Drafts', [101]],
|
|
||||||
], $service->destroyCalls);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEntityReplaceRemovesReplacementWhenOldUidCannotBeDeleted(): void {
|
|
||||||
$service = new RemoteMailServiceStub($this->createStub(Service::class));
|
|
||||||
$service->appendUid = 202;
|
|
||||||
$service->destroyResults = [
|
|
||||||
[101 => false],
|
|
||||||
[202 => true],
|
|
||||||
];
|
|
||||||
|
|
||||||
try {
|
|
||||||
$service->entityReplace('Drafts', 101, 'raw message', ['\\Draft']);
|
|
||||||
$this->fail('Expected superseded message cleanup failure');
|
|
||||||
} catch (RuntimeException $exception) {
|
|
||||||
$this->assertSame('Failed to delete the superseded IMAP entity', $exception->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->assertSame([
|
|
||||||
['Drafts', [101]],
|
|
||||||
['Drafts', [202]],
|
|
||||||
], $service->destroyCalls);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final class RemoteMailServiceStub extends RemoteMailService {
|
|
||||||
|
|
||||||
public ?int $appendUid = null;
|
|
||||||
public array $createCalls = [];
|
|
||||||
public array $destroyCalls = [];
|
|
||||||
public array $destroyResults = [];
|
|
||||||
|
|
||||||
public function entityCreate(string $collection, string $rawMessage, array $flags = []): ?int {
|
|
||||||
$this->createCalls[] = [$collection, $rawMessage, $flags];
|
|
||||||
return $this->appendUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function entityDestroy(string $collection, int ...$uids): array {
|
|
||||||
$this->destroyCalls[] = [$collection, $uids];
|
|
||||||
return array_shift($this->destroyResults) ?? [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user