Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36aaa8b9c7 | |||
| 8af08d8936 | |||
| edc1aece13 | |||
| b81070338d | |||
| ab24fe2b54 | |||
| 3073cf9f75 | |||
| 8cf4993107 | |||
| 5bda58fbb9 | |||
| b6bc83e432 | |||
| 02f3662f40 | |||
| 2dd56e0662 | |||
| d449a71e80 | |||
| 1310de8a15 | |||
| c7eb46c7ac | |||
| c58d99988c | |||
| f5e7fa5f81 | |||
| 9a243e2c61 | |||
| 4a8cea943b | |||
| 8965c047d1 | |||
| 7fa75dafc9 | |||
| 8eb245f52f | |||
| 3c4b864339 | |||
| 64b933534b | |||
| d3f383e937 | |||
| 816c1cf931 | |||
| 072ea8c450 |
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:7
|
image: mongo:8
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
|
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
|
||||||
--health-interval 5s
|
--health-interval 5s
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"guzzlehttp/guzzle": "^8.0",
|
"guzzlehttp/guzzle": "^7.0",
|
||||||
"guzzlehttp/psr7": "^2.0",
|
"guzzlehttp/psr7": "^2.0",
|
||||||
"php": ">=8.3 <=8.5",
|
"php": ">=8.3 <=8.5",
|
||||||
"sebastiankrupinski/jmap-client-php": "dev-main"
|
"sebastiankrupinski/jmap-client-php": "dev-main"
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class Provider implements IProviderBase, IProviderServiceMutate
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Note: This simplified interface doesn't pass tenantId
|
// Note: This simplified interface doesn't pass tenantId
|
||||||
// Will need to get it from SessionTenant in actual implementation
|
// Will need to get it from TenantContextInterface in actual implementation
|
||||||
throw new \RuntimeException('Use Mail Provider interface for service creation');
|
throw new \RuntimeException('Use Mail Provider interface for service creation');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use GuzzleHttp\Client as HttpClient;
|
|||||||
use GuzzleHttp\Psr7\HttpFactory;
|
use GuzzleHttp\Psr7\HttpFactory;
|
||||||
use JmapClient\Authentication\Basic;
|
use JmapClient\Authentication\Basic;
|
||||||
use JmapClient\Client as JmapClient;
|
use JmapClient\Client as JmapClient;
|
||||||
use KTXC\Server;
|
use KTXF\Security\Crypto;
|
||||||
use KTXF\Resource\Provider\ResourceServiceIdentityBasic;
|
use KTXF\Resource\Provider\ResourceServiceIdentityBasic;
|
||||||
use KTXF\Resource\Provider\ResourceServiceLocationUri;
|
use KTXF\Resource\Provider\ResourceServiceLocationUri;
|
||||||
use KTXM\ProviderJmapc\Providers\Mail\Service as MailService;
|
use KTXM\ProviderJmapc\Providers\Mail\Service as MailService;
|
||||||
@@ -73,8 +73,7 @@ class RemoteService {
|
|||||||
}
|
}
|
||||||
// debugging
|
// debugging
|
||||||
if ($service->getDebug()) {
|
if ($service->getDebug()) {
|
||||||
$logDir = Server::getInstance()?->logDir();
|
$logDir = dirname(__DIR__, 5) . '/var/log/jmap/' . $service->identifier() . '.json';
|
||||||
$logDir .= '/jmap/' . $service->identifier() . '.json';
|
|
||||||
$client->configureTransportLogState(true);
|
$client->configureTransportLogState(true);
|
||||||
$client->configureTransportLogLocation($logDir);
|
$client->configureTransportLogLocation($logDir);
|
||||||
}
|
}
|
||||||
@@ -200,7 +199,7 @@ class RemoteService {
|
|||||||
return $service;
|
return $service;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cookieStoreRetrieve(mixed $id): ?array {
|
public static function cookieStoreRetrieve(mixed $id, Crypto $crypto): ?array {
|
||||||
|
|
||||||
$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . (string)$id . '.jmapc';
|
$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . (string)$id . '.jmapc';
|
||||||
|
|
||||||
@@ -209,7 +208,6 @@ class RemoteService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = file_get_contents($file);
|
$data = file_get_contents($file);
|
||||||
$crypto = Server::getInstance()->container()->get(\KTXF\Security\Crypto::class);
|
|
||||||
$data = $crypto->decrypt($data);
|
$data = $crypto->decrypt($data);
|
||||||
|
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
@@ -220,13 +218,12 @@ class RemoteService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cookieStoreDeposit(mixed $id, array $value): void {
|
public static function cookieStoreDeposit(mixed $id, array $value, Crypto $crypto): void {
|
||||||
|
|
||||||
if (empty($value)) {
|
if (empty($value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$crypto = Server::getInstance()->container()->get(\KTXF\Security\Crypto::class);
|
|
||||||
$data = $crypto->encrypt(json_encode($value));
|
$data = $crypto->encrypt(json_encode($value));
|
||||||
|
|
||||||
$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . (string)$id . '.jmapc';
|
$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . (string)$id . '.jmapc';
|
||||||
|
|||||||
Generated
+1156
-783
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -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"
|
||||||
@@ -27,9 +27,12 @@
|
|||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vitest/coverage-v8": "^4.0.18",
|
"@vitest/coverage-v8": "^4.0.18",
|
||||||
"@vitest/ui": "^4.0.18",
|
"@vitest/ui": "^4.0.18",
|
||||||
|
"@vue/test-utils": "^2.4.10",
|
||||||
"@vue/tsconfig": "^0.9.0",
|
"@vue/tsconfig": "^0.9.0",
|
||||||
"typescript": "~7.0.0",
|
"jsdom": "^30.0.0",
|
||||||
|
"typescript": "~6.0.0",
|
||||||
"vite": "^8.0.0",
|
"vite": "^8.0.0",
|
||||||
|
"vitest": "^4.0.18",
|
||||||
"vue-tsc": "^3.0.5"
|
"vue-tsc": "^3.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
import { defineConfig, configDefaults } from 'vitest/config'
|
import { defineConfig, configDefaults } from 'vitest/config'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vuetify from 'vite-plugin-vuetify'
|
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url)
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
const __dirname = path.dirname(__filename)
|
const __dirname = path.dirname(__filename)
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue(), vuetify()],
|
plugins: [vue()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@KTXC': path.resolve(__dirname, '../../../core/src'),
|
'@': path.resolve(__dirname, '../../src'),
|
||||||
|
'@KTXC': path.resolve(__dirname, '../../../../core/src'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
|
|||||||
Reference in New Issue
Block a user