@plyaz/core 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +16 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/nestjs.d.ts +79 -0
- package/dist/adapters/nestjs.d.ts.map +1 -0
- package/dist/adapters/nextjs.d.ts +28 -0
- package/dist/adapters/nextjs.d.ts.map +1 -0
- package/dist/backend/example/example.controller.d.ts +121 -0
- package/dist/backend/example/example.controller.d.ts.map +1 -0
- package/dist/backend/example/example.module.d.ts +29 -0
- package/dist/backend/example/example.module.d.ts.map +1 -0
- package/dist/backend/example/index.d.ts +8 -0
- package/dist/backend/example/index.d.ts.map +1 -0
- package/dist/backend/featureFlags/FeatureFlagDomainService.d.ts +150 -0
- package/dist/backend/featureFlags/FeatureFlagDomainService.d.ts.map +1 -0
- package/dist/backend/featureFlags/config/feature-flag.config.d.ts +28 -50
- package/dist/backend/featureFlags/config/feature-flag.config.d.ts.map +1 -1
- package/dist/backend/featureFlags/config/validation.d.ts +6 -6
- package/dist/backend/featureFlags/config/validation.d.ts.map +1 -1
- package/dist/backend/featureFlags/feature-flag.controller.d.ts +14 -55
- package/dist/backend/featureFlags/feature-flag.controller.d.ts.map +1 -1
- package/dist/backend/featureFlags/feature-flag.module.d.ts +36 -43
- package/dist/backend/featureFlags/feature-flag.module.d.ts.map +1 -1
- package/dist/backend/featureFlags/guards/feature-flag.guard.d.ts +16 -2
- package/dist/backend/featureFlags/guards/feature-flag.guard.d.ts.map +1 -1
- package/dist/backend/featureFlags/index.d.ts +6 -7
- package/dist/backend/featureFlags/index.d.ts.map +1 -1
- package/dist/backend/featureFlags/interceptors/error-handling-interceptor.d.ts.map +1 -1
- package/dist/backend/featureFlags/interceptors/feature-flag-logging-interceptor.d.ts.map +1 -1
- package/dist/backend/featureFlags/middleware/feature-flag-middleware.d.ts +6 -11
- package/dist/backend/featureFlags/middleware/feature-flag-middleware.d.ts.map +1 -1
- package/dist/backend/index.d.ts +5 -0
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/base/cache/CacheKeyBuilder.d.ts +115 -0
- package/dist/base/cache/CacheKeyBuilder.d.ts.map +1 -0
- package/dist/base/cache/index.d.ts +1 -0
- package/dist/base/cache/index.d.ts.map +1 -1
- package/dist/base/cache/strategies/redis.d.ts.map +1 -1
- package/dist/base/observability/BaseAdapter.d.ts +79 -0
- package/dist/base/observability/BaseAdapter.d.ts.map +1 -0
- package/dist/base/observability/CompositeAdapter.d.ts +72 -0
- package/dist/base/observability/CompositeAdapter.d.ts.map +1 -0
- package/dist/base/observability/DatadogAdapter.d.ts +117 -0
- package/dist/base/observability/DatadogAdapter.d.ts.map +1 -0
- package/dist/base/observability/LoggerAdapter.d.ts +54 -0
- package/dist/base/observability/LoggerAdapter.d.ts.map +1 -0
- package/dist/base/observability/ObservabilityService.d.ts +160 -0
- package/dist/base/observability/ObservabilityService.d.ts.map +1 -0
- package/dist/base/observability/index.d.ts +17 -0
- package/dist/base/observability/index.d.ts.map +1 -0
- package/dist/domain/base/BaseBackendDomainService.d.ts +528 -0
- package/dist/domain/base/BaseBackendDomainService.d.ts.map +1 -0
- package/dist/domain/base/BaseDomainService.d.ts +284 -0
- package/dist/domain/base/BaseDomainService.d.ts.map +1 -0
- package/dist/domain/base/BaseFrontendDomainService.d.ts +493 -0
- package/dist/domain/base/BaseFrontendDomainService.d.ts.map +1 -0
- package/dist/domain/base/BaseMapper.d.ts +100 -0
- package/dist/domain/base/BaseMapper.d.ts.map +1 -0
- package/dist/domain/base/BaseValidator.d.ts +105 -0
- package/dist/domain/base/BaseValidator.d.ts.map +1 -0
- package/dist/domain/base/index.d.ts +10 -0
- package/dist/domain/base/index.d.ts.map +1 -0
- package/dist/domain/example/BackendExampleDomainService.d.ts +257 -0
- package/dist/domain/example/BackendExampleDomainService.d.ts.map +1 -0
- package/dist/domain/example/FrontendExampleDomainService.d.ts +164 -0
- package/dist/domain/example/FrontendExampleDomainService.d.ts.map +1 -0
- package/dist/domain/example/index.d.ts +10 -0
- package/dist/domain/example/index.d.ts.map +1 -0
- package/dist/domain/example/mappers/ExampleMapper.d.ts +67 -0
- package/dist/domain/example/mappers/ExampleMapper.d.ts.map +1 -0
- package/dist/domain/example/validators/ExampleValidator.d.ts +33 -0
- package/dist/domain/example/validators/ExampleValidator.d.ts.map +1 -0
- package/dist/domain/featureFlags/FrontendFeatureFlagDomainService.d.ts +86 -0
- package/dist/domain/featureFlags/FrontendFeatureFlagDomainService.d.ts.map +1 -0
- package/dist/domain/featureFlags/index.d.ts +10 -5
- package/dist/domain/featureFlags/index.d.ts.map +1 -1
- package/dist/domain/featureFlags/mappers/FeatureFlagMapper.d.ts +72 -0
- package/dist/domain/featureFlags/mappers/FeatureFlagMapper.d.ts.map +1 -0
- package/dist/domain/featureFlags/mappers/index.d.ts +8 -0
- package/dist/domain/featureFlags/mappers/index.d.ts.map +1 -0
- package/dist/domain/featureFlags/module.d.ts +20 -0
- package/dist/domain/featureFlags/module.d.ts.map +1 -0
- package/dist/domain/featureFlags/provider.d.ts +40 -1
- package/dist/domain/featureFlags/provider.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/api.d.ts +59 -34
- package/dist/domain/featureFlags/providers/api.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/database.d.ts +48 -46
- package/dist/domain/featureFlags/providers/database.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/factory.d.ts +50 -33
- package/dist/domain/featureFlags/providers/factory.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/file.d.ts +48 -1
- package/dist/domain/featureFlags/providers/file.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/memory.d.ts +32 -6
- package/dist/domain/featureFlags/providers/memory.d.ts.map +1 -1
- package/dist/domain/featureFlags/providers/redis.d.ts +6 -1
- package/dist/domain/featureFlags/providers/redis.d.ts.map +1 -1
- package/dist/domain/featureFlags/service.d.ts +112 -0
- package/dist/domain/featureFlags/service.d.ts.map +1 -0
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/engine/featureFlags/engine.d.ts +8 -0
- package/dist/engine/featureFlags/engine.d.ts.map +1 -1
- package/dist/entry-backend.d.ts +24 -0
- package/dist/entry-backend.d.ts.map +1 -0
- package/dist/entry-backend.js +15635 -0
- package/dist/entry-backend.js.map +1 -0
- package/dist/entry-backend.mjs +15506 -0
- package/dist/entry-backend.mjs.map +1 -0
- package/dist/entry-frontend.d.ts +23 -0
- package/dist/entry-frontend.d.ts.map +1 -0
- package/dist/entry-frontend.js +11152 -0
- package/dist/entry-frontend.js.map +1 -0
- package/dist/entry-frontend.mjs +11089 -0
- package/dist/entry-frontend.mjs.map +1 -0
- package/dist/events/CoreEventManager.d.ts +116 -0
- package/dist/events/CoreEventManager.d.ts.map +1 -0
- package/dist/events/index.d.ts +27 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/frontend/base/index.d.ts +8 -0
- package/dist/frontend/base/index.d.ts.map +1 -0
- package/dist/frontend/components/InitializationError.d.ts +25 -0
- package/dist/frontend/components/InitializationError.d.ts.map +1 -0
- package/dist/frontend/components/InitializationLoading.d.ts +22 -0
- package/dist/frontend/components/InitializationLoading.d.ts.map +1 -0
- package/dist/frontend/components/index.d.ts +9 -0
- package/dist/frontend/components/index.d.ts.map +1 -0
- package/dist/frontend/example/index.d.ts +9 -0
- package/dist/frontend/example/index.d.ts.map +1 -0
- package/dist/frontend/featureFlags/index.d.ts +28 -7
- package/dist/frontend/featureFlags/index.d.ts.map +1 -1
- package/dist/frontend/index.d.ts +4 -0
- package/dist/frontend/index.d.ts.map +1 -1
- package/dist/frontend/providers/ApiProvider.d.ts +2 -2
- package/dist/frontend/providers/ApiProvider.d.ts.map +1 -1
- package/dist/frontend/providers/PlyazProvider.d.ts +305 -0
- package/dist/frontend/providers/PlyazProvider.d.ts.map +1 -0
- package/dist/frontend/providers/index.d.ts +1 -0
- package/dist/frontend/providers/index.d.ts.map +1 -1
- package/dist/frontend/store/feature-flags.d.ts +63 -0
- package/dist/frontend/store/feature-flags.d.ts.map +1 -0
- package/dist/frontend/store/index.d.ts +14 -0
- package/dist/frontend/store/index.d.ts.map +1 -0
- package/dist/frontend/store/integrations.d.ts +36 -0
- package/dist/frontend/store/integrations.d.ts.map +1 -0
- package/dist/frontend/store/service-accessors.d.ts +78 -0
- package/dist/frontend/store/service-accessors.d.ts.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15450 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13678 -4697
- package/dist/index.mjs.map +1 -1
- package/dist/init/CoreInitializer.d.ts +582 -0
- package/dist/init/CoreInitializer.d.ts.map +1 -0
- package/dist/init/ServiceRegistry.d.ts +256 -0
- package/dist/init/ServiceRegistry.d.ts.map +1 -0
- package/dist/init/index.d.ts +14 -0
- package/dist/init/index.d.ts.map +1 -0
- package/dist/init/nestjs/CoreModule.d.ts +63 -0
- package/dist/init/nestjs/CoreModule.d.ts.map +1 -0
- package/dist/init/nestjs/index.d.ts +5 -0
- package/dist/init/nestjs/index.d.ts.map +1 -0
- package/dist/init/nestjs/index.js +9059 -0
- package/dist/init/nestjs/index.js.map +1 -0
- package/dist/init/nestjs/index.mjs +9055 -0
- package/dist/init/nestjs/index.mjs.map +1 -0
- package/dist/init/react.d.ts +33 -0
- package/dist/init/react.d.ts.map +1 -0
- package/dist/models/example/ExampleRepository.d.ts +124 -0
- package/dist/models/example/ExampleRepository.d.ts.map +1 -0
- package/dist/models/example/index.d.ts +7 -0
- package/dist/models/example/index.d.ts.map +1 -0
- package/dist/{backend/featureFlags/database/repository.d.ts → models/featureFlags/FeatureFlagRepository.d.ts} +47 -5
- package/dist/models/featureFlags/FeatureFlagRepository.d.ts.map +1 -0
- package/dist/models/featureFlags/index.d.ts +7 -0
- package/dist/models/featureFlags/index.d.ts.map +1 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/services/ApiClientService.d.ts +92 -4
- package/dist/services/ApiClientService.d.ts.map +1 -1
- package/dist/services/CacheService.d.ts +176 -0
- package/dist/services/CacheService.d.ts.map +1 -0
- package/dist/services/DbService.d.ts +391 -0
- package/dist/services/DbService.d.ts.map +1 -0
- package/dist/services/NotificationService.d.ts +151 -0
- package/dist/services/NotificationService.d.ts.map +1 -0
- package/dist/services/StorageService.d.ts +144 -0
- package/dist/services/StorageService.d.ts.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/utils/common/id.d.ts +83 -0
- package/dist/utils/common/id.d.ts.map +1 -0
- package/dist/utils/common/index.d.ts +2 -0
- package/dist/utils/common/index.d.ts.map +1 -1
- package/dist/utils/common/object.d.ts +70 -0
- package/dist/utils/common/object.d.ts.map +1 -0
- package/dist/utils/featureFlags/conditions.d.ts.map +1 -1
- package/dist/utils/featureFlags/context.d.ts +0 -1
- package/dist/utils/featureFlags/context.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/mapperUtils.d.ts +38 -0
- package/dist/utils/mapperUtils.d.ts.map +1 -0
- package/dist/utils/runtime.d.ts +15 -0
- package/dist/utils/runtime.d.ts.map +1 -0
- package/dist/version.d.ts +24 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/web_app/auth/add_user.d.ts +2 -2
- package/dist/web_app/auth/add_user.d.ts.map +1 -1
- package/dist/web_app/auth/update_user.d.ts +1 -1
- package/dist/web_app/auth/update_user.d.ts.map +1 -1
- package/package.json +89 -15
- package/dist/backend/featureFlags/database/connection.d.ts +0 -321
- package/dist/backend/featureFlags/database/connection.d.ts.map +0 -1
- package/dist/backend/featureFlags/database/repository.d.ts.map +0 -1
- package/dist/backend/featureFlags/feature-flag.repository.d.ts +0 -85
- package/dist/backend/featureFlags/feature-flag.repository.d.ts.map +0 -1
- package/dist/backend/featureFlags/feature-flag.service.d.ts +0 -264
- package/dist/backend/featureFlags/feature-flag.service.d.ts.map +0 -1
- package/dist/frontend/featureFlags/hooks/useFeatureFlag.d.ts +0 -103
- package/dist/frontend/featureFlags/hooks/useFeatureFlag.d.ts.map +0 -1
- package/dist/frontend/featureFlags/hooks/useFeatureFlagActions.d.ts +0 -35
- package/dist/frontend/featureFlags/hooks/useFeatureFlagActions.d.ts.map +0 -1
- package/dist/frontend/featureFlags/hooks/useFeatureFlagHelpers.d.ts +0 -55
- package/dist/frontend/featureFlags/hooks/useFeatureFlagHelpers.d.ts.map +0 -1
- package/dist/frontend/featureFlags/hooks/useFeatureFlagProvider.d.ts +0 -57
- package/dist/frontend/featureFlags/hooks/useFeatureFlagProvider.d.ts.map +0 -1
- package/dist/frontend/featureFlags/providers/FeatureFlagProvider.d.ts +0 -99
- package/dist/frontend/featureFlags/providers/FeatureFlagProvider.d.ts.map +0 -1
- package/dist/frontend/featureFlags/providers/FeatureFlagProviderHelpers.d.ts +0 -31
- package/dist/frontend/featureFlags/providers/FeatureFlagProviderHelpers.d.ts.map +0 -1
- package/dist/frontend/featureFlags/providers/types.d.ts +0 -21
- package/dist/frontend/featureFlags/providers/types.d.ts.map +0 -1
- package/dist/index.cjs +0 -6435
- package/dist/index.cjs.map +0 -1
- package/dist/utils/db/databaseService.d.ts +0 -6
- package/dist/utils/db/databaseService.d.ts.map +0 -1
- package/dist/utils/db/index.d.ts +0 -2
- package/dist/utils/db/index.d.ts.map +0 -1
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoreInitializer - Unified initialization for @plyaz/core
|
|
3
|
+
*
|
|
4
|
+
* Provides a single entry point to initialize all core services with
|
|
5
|
+
* environment-aware configuration. Works across all JavaScript runtimes.
|
|
6
|
+
*
|
|
7
|
+
* @example Backend with full config
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { Core } from '@plyaz/core';
|
|
10
|
+
*
|
|
11
|
+
* await Core.initialize({
|
|
12
|
+
* envPath: '.env',
|
|
13
|
+
* db: { adapter: 'drizzle' },
|
|
14
|
+
* api: {
|
|
15
|
+
* env: 'production',
|
|
16
|
+
* baseURL: 'https://api.example.com',
|
|
17
|
+
* },
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Access services
|
|
21
|
+
* const db = Core.db;
|
|
22
|
+
* const api = Core.api;
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Frontend (Nuxt/Next.js)
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { Core } from '@plyaz/core';
|
|
28
|
+
*
|
|
29
|
+
* await Core.initialize({
|
|
30
|
+
* skipDb: true,
|
|
31
|
+
* api: { baseURL: 'https://api.example.com' },
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const api = Core.api;
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example NestJS with DI
|
|
38
|
+
* ```typescript
|
|
39
|
+
* // app.module.ts
|
|
40
|
+
* import { CoreModule } from '@plyaz/core/adapters';
|
|
41
|
+
* import { FeatureFlagModule } from '@plyaz/core/backend/featureFlags';
|
|
42
|
+
*
|
|
43
|
+
* @Module({
|
|
44
|
+
* imports: [
|
|
45
|
+
* CoreModule.forRoot({ envPath: '.env', db: { adapter: 'drizzle' } }),
|
|
46
|
+
* FeatureFlagModule.forRoot({ provider: 'database' }),
|
|
47
|
+
* ],
|
|
48
|
+
* })
|
|
49
|
+
* export class AppModule {}
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
import { DbService, type CoreDbServiceConfig, DEFAULT_ENCRYPTION_FIELDS } from '../services/DbService';
|
|
53
|
+
import { ApiClientService } from '../services/ApiClientService';
|
|
54
|
+
import { CacheService } from '../services/CacheService';
|
|
55
|
+
import { StorageService, type CoreStorageConfig } from '../services/StorageService';
|
|
56
|
+
import { NotificationService, type CoreNotificationConfig } from '../services/NotificationService';
|
|
57
|
+
import { CoreEventManager } from '../events/CoreEventManager';
|
|
58
|
+
import type { CoreRuntimeEnvironment, CoreRuntimeContext, CoreEnvVars, CoreAppContext, CoreApiInitOptions, CoreServiceRuntime, CoreInitOptions as BaseCoreInitOptions, CoreServicesResultBase, CoreServiceEntry, CoreDomainServiceInstance, CoreFeatureFlagInitConfig, CoreErrorHandlerInitConfig, CoreCacheConfig, CoreObservabilityConfig } from '@plyaz/types/core';
|
|
59
|
+
import type { ObservabilityAdapter } from '@plyaz/types/observability';
|
|
60
|
+
import type { FeatureFlagStoreSlice } from '@plyaz/types/features';
|
|
61
|
+
import type { ErrorStoreActions } from '@plyaz/types/errors';
|
|
62
|
+
import { type StoreKey } from '@plyaz/store';
|
|
63
|
+
import type { RootStoreSlice } from '@plyaz/types/store';
|
|
64
|
+
import type { StoreApi } from 'zustand/vanilla';
|
|
65
|
+
/**
|
|
66
|
+
* Core initialization options with specific types for this package
|
|
67
|
+
*/
|
|
68
|
+
export interface CoreInitOptions extends Omit<BaseCoreInitOptions<Partial<CoreDbServiceConfig>, CoreApiInitOptions, CoreCacheConfig, CoreStorageConfig, CoreNotificationConfig>, 'observability' | 'skipObservability'> {
|
|
69
|
+
/** Observability configuration */
|
|
70
|
+
observability?: CoreObservabilityConfig;
|
|
71
|
+
/** Skip observability initialization */
|
|
72
|
+
skipObservability?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Global error handler configuration.
|
|
75
|
+
* Auto-initializes by default to catch all uncaught errors.
|
|
76
|
+
* Set `enabled: false` to disable if you want to use your own error handling.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* await Core.initialize({
|
|
81
|
+
* errorHandler: {
|
|
82
|
+
* enabled: true,
|
|
83
|
+
* logToConsole: true,
|
|
84
|
+
* maxErrors: 200,
|
|
85
|
+
* filter: (error) => error instanceof MyError,
|
|
86
|
+
* },
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
errorHandler?: CoreErrorHandlerInitConfig;
|
|
91
|
+
/** Feature flags configuration */
|
|
92
|
+
featureFlags?: CoreFeatureFlagInitConfig;
|
|
93
|
+
/**
|
|
94
|
+
* Domain services to auto-initialize (frontend pattern).
|
|
95
|
+
* Uses ServiceRegistry for automatic initialization.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* await Core.initialize({
|
|
100
|
+
* services: [
|
|
101
|
+
* { service: FeatureFlagDomainService, config: { enabled: true } },
|
|
102
|
+
* { service: ExampleDomainService, config: { enabled: true, useRealApi: true } },
|
|
103
|
+
* ],
|
|
104
|
+
* });
|
|
105
|
+
*
|
|
106
|
+
* // Access via ServiceRegistry
|
|
107
|
+
* const flags = ServiceRegistry.get<FeatureFlagDomainService>('featureFlags');
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
services?: CoreServiceEntry[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Core initialization result with specific types for this package
|
|
114
|
+
*/
|
|
115
|
+
export type CoreServicesResult = CoreServicesResultBase<DbService, typeof ApiClientService, CacheService, ObservabilityAdapter, StorageService, NotificationService>;
|
|
116
|
+
/**
|
|
117
|
+
* Default service configurations for auto-initialization
|
|
118
|
+
* These services are always initialized unless explicitly disabled
|
|
119
|
+
*/
|
|
120
|
+
declare const CORE_DOMAIN_SERVICES: CoreServiceEntry[];
|
|
121
|
+
export declare class Core {
|
|
122
|
+
private static initialized;
|
|
123
|
+
private static _coreServices;
|
|
124
|
+
/**
|
|
125
|
+
* Logger for Core initialization (created lazily)
|
|
126
|
+
*/
|
|
127
|
+
private static _logger;
|
|
128
|
+
/**
|
|
129
|
+
* Get or create the Core logger
|
|
130
|
+
*/
|
|
131
|
+
private static get logger();
|
|
132
|
+
/**
|
|
133
|
+
* Log a message during initialization.
|
|
134
|
+
* Uses PackageLogger, respects verbose flag.
|
|
135
|
+
*/
|
|
136
|
+
private static log;
|
|
137
|
+
/**
|
|
138
|
+
* Log a debug message during initialization.
|
|
139
|
+
*/
|
|
140
|
+
private static logDebug;
|
|
141
|
+
/**
|
|
142
|
+
* Observability configuration
|
|
143
|
+
*/
|
|
144
|
+
private static _observabilityConfig;
|
|
145
|
+
/**
|
|
146
|
+
* Global error handler instance
|
|
147
|
+
*/
|
|
148
|
+
private static _errorHandler;
|
|
149
|
+
/**
|
|
150
|
+
* Error handler configuration
|
|
151
|
+
*/
|
|
152
|
+
private static _errorConfig;
|
|
153
|
+
/**
|
|
154
|
+
* HTTP error handler/middleware based on runtime.
|
|
155
|
+
* Auto-created during initialization.
|
|
156
|
+
*/
|
|
157
|
+
private static _httpErrorHandler;
|
|
158
|
+
/**
|
|
159
|
+
* Event listener cleanup functions
|
|
160
|
+
*/
|
|
161
|
+
private static _eventCleanupFns;
|
|
162
|
+
/**
|
|
163
|
+
* Feature flag configuration
|
|
164
|
+
*/
|
|
165
|
+
private static _flagConfig;
|
|
166
|
+
/**
|
|
167
|
+
* Root store instance (contains errors, feature flags, and all other slices)
|
|
168
|
+
* Initialized during Core.initialize() - frontend uses React hook store, backend uses vanilla store
|
|
169
|
+
* All store access should go through Core.rootStore - no separate stores needed
|
|
170
|
+
*/
|
|
171
|
+
private static _rootStore;
|
|
172
|
+
/**
|
|
173
|
+
* Setup environment and context
|
|
174
|
+
*/
|
|
175
|
+
private static setupEnvironment;
|
|
176
|
+
/**
|
|
177
|
+
* Initialize a service with error handling
|
|
178
|
+
*/
|
|
179
|
+
private static initService;
|
|
180
|
+
/** Initialize error handler if enabled */
|
|
181
|
+
private static initErrorHandlerIfEnabled;
|
|
182
|
+
/** Initialize API client if not skipped */
|
|
183
|
+
private static initApiIfEnabled;
|
|
184
|
+
/** Initialize cache service if not skipped */
|
|
185
|
+
private static initCacheIfEnabled;
|
|
186
|
+
/** Initialize observability if not skipped */
|
|
187
|
+
private static initObservabilityIfEnabled;
|
|
188
|
+
/** Initialize storage service if not skipped (backend-only) */
|
|
189
|
+
private static initStorageIfEnabled;
|
|
190
|
+
/** Initialize notifications service if not skipped (backend-only) */
|
|
191
|
+
private static initNotificationsIfEnabled;
|
|
192
|
+
/**
|
|
193
|
+
* Initialize domain services
|
|
194
|
+
*
|
|
195
|
+
* Always initializes CORE_DOMAIN_SERVICES (like BackendExampleService),
|
|
196
|
+
* then merges with any user-provided services.
|
|
197
|
+
* User-provided service configs override core defaults.
|
|
198
|
+
*/
|
|
199
|
+
private static initDomainServicesIfConfigured;
|
|
200
|
+
/**
|
|
201
|
+
* Initialize all core services
|
|
202
|
+
*/
|
|
203
|
+
static initialize(options?: CoreInitOptions): Promise<CoreServicesResult>;
|
|
204
|
+
/**
|
|
205
|
+
* Domain services for business logic
|
|
206
|
+
* @example Core.services.ExampleService.create(data)
|
|
207
|
+
*/
|
|
208
|
+
static get services(): typeof CORE_DOMAIN_SERVICES;
|
|
209
|
+
/**
|
|
210
|
+
* All stores - unified access to ALL slices from single root store
|
|
211
|
+
* All stores (global + domain) are slices of ONE Zustand store instance.
|
|
212
|
+
*
|
|
213
|
+
* **Auto-generated from STORE_KEYS** - No manual registration needed!
|
|
214
|
+
*
|
|
215
|
+
* **Benefits:**
|
|
216
|
+
* - ✅ Access without hooks (store.getState())
|
|
217
|
+
* - ✅ Cross-slice subscriptions work automatically
|
|
218
|
+
* - ✅ Single source of truth
|
|
219
|
+
* - ✅ Automatically scales with new stores
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* const errorStore = Core.stores.error; // Global slice
|
|
223
|
+
* const flagsStore = Core.stores.featureFlags; // Global slice
|
|
224
|
+
* const exampleStore = Core.stores.example; // Domain slice
|
|
225
|
+
*/
|
|
226
|
+
static get stores(): Record<StoreKey, RootStoreSlice | undefined>;
|
|
227
|
+
/**
|
|
228
|
+
* Get a specific store slice by key (for ServiceRegistry injection).
|
|
229
|
+
* Returns the actual slice from the namespaced root store.
|
|
230
|
+
*
|
|
231
|
+
* @param key - Store key (type-safe: 'example' | 'errors' | 'featureFlags')
|
|
232
|
+
* @returns Specific store slice or undefined
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```typescript
|
|
236
|
+
* const exampleSlice = Core.getDomainStore('example'); // ✅ Returns ExampleFrontendStoreSlice
|
|
237
|
+
* const errorSlice = Core.getDomainStore('errors'); // ✅ Returns ErrorStoreSlice
|
|
238
|
+
* const invalid = Core.getDomainStore('invalid'); // ❌ TypeScript error!
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
static getDomainStore<K extends keyof RootStoreSlice>(key: K): RootStoreSlice[K] | undefined;
|
|
242
|
+
static getDomainStore<T = RootStoreSlice>(): T | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Event manager for subscribing to domain events
|
|
245
|
+
* @example Core.events.on('example:created', handler)
|
|
246
|
+
*/
|
|
247
|
+
static get events(): typeof CoreEventManager;
|
|
248
|
+
/**
|
|
249
|
+
* Get database service instance
|
|
250
|
+
* @throws Error if not initialized
|
|
251
|
+
*/
|
|
252
|
+
static get db(): DbService;
|
|
253
|
+
/**
|
|
254
|
+
* Get API client service
|
|
255
|
+
*/
|
|
256
|
+
static get api(): typeof ApiClientService;
|
|
257
|
+
/**
|
|
258
|
+
* Get cache service instance
|
|
259
|
+
* @throws Error if not initialized
|
|
260
|
+
*/
|
|
261
|
+
static get cache(): CacheService;
|
|
262
|
+
/**
|
|
263
|
+
* Get observability adapter instance
|
|
264
|
+
* @throws Error if not initialized
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```typescript
|
|
268
|
+
* // Record a metric
|
|
269
|
+
* await Core.observability.recordMetric({
|
|
270
|
+
* type: 'counter',
|
|
271
|
+
* name: 'api.requests',
|
|
272
|
+
* value: 1,
|
|
273
|
+
* tags: { endpoint: '/users' },
|
|
274
|
+
* });
|
|
275
|
+
*
|
|
276
|
+
* // Start a span
|
|
277
|
+
* const span = Core.observability.startSpan({ name: 'processOrder' });
|
|
278
|
+
* try {
|
|
279
|
+
* // ... do work
|
|
280
|
+
* span.setStatus('ok');
|
|
281
|
+
* } catch (e) {
|
|
282
|
+
* span.recordException(e);
|
|
283
|
+
* span.setStatus('error');
|
|
284
|
+
* } finally {
|
|
285
|
+
* span.end();
|
|
286
|
+
* }
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
static get observability(): ObservabilityAdapter;
|
|
290
|
+
/**
|
|
291
|
+
* Check if observability is initialized
|
|
292
|
+
*/
|
|
293
|
+
static get isObservabilityInitialized(): boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Get observability configuration
|
|
296
|
+
*/
|
|
297
|
+
static get observabilityConfig(): CoreObservabilityConfig;
|
|
298
|
+
/**
|
|
299
|
+
* Get storage service instance (backend-only)
|
|
300
|
+
* @throws Error if not initialized
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```typescript
|
|
304
|
+
* const storage = Core.storage.getStorage();
|
|
305
|
+
* await storage.uploadFile({ file, filename: 'doc.pdf' });
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
static get storage(): StorageService;
|
|
309
|
+
/**
|
|
310
|
+
* Check if storage is initialized
|
|
311
|
+
*/
|
|
312
|
+
static get isStorageInitialized(): boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Get notifications service instance (backend-only)
|
|
315
|
+
* @throws Error if not initialized
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```typescript
|
|
319
|
+
* const notifications = Core.notifications.getNotifications();
|
|
320
|
+
* await notifications.sendEmail({ to: 'user@example.com', templateId: 'welcome' });
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
static get notifications(): NotificationService;
|
|
324
|
+
/**
|
|
325
|
+
* Check if notifications is initialized
|
|
326
|
+
*/
|
|
327
|
+
static get isNotificationsInitialized(): boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Get root store (contains all slices: errors, feature flags, etc.)
|
|
330
|
+
* Use this to access the full store state and all slice actions globally.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```typescript
|
|
334
|
+
* // Access error actions
|
|
335
|
+
* const state = Core.rootStore.getState();
|
|
336
|
+
* state.addError({ ... });
|
|
337
|
+
*
|
|
338
|
+
* // Access flags
|
|
339
|
+
* console.log(state.flags);
|
|
340
|
+
*
|
|
341
|
+
* // Subscribe to store changes
|
|
342
|
+
* Core.rootStore.subscribe((state) => {
|
|
343
|
+
* console.log('Errors:', state.errors);
|
|
344
|
+
* console.log('Flags:', state.flags);
|
|
345
|
+
* });
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
static get rootStore(): StoreApi<RootStoreSlice>;
|
|
349
|
+
/**
|
|
350
|
+
* Get global error store actions.
|
|
351
|
+
* Provides access to the error store for querying and managing errors.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```typescript
|
|
355
|
+
* // Get all errors
|
|
356
|
+
* const allErrors = useErrorStore.getState().errors;
|
|
357
|
+
*
|
|
358
|
+
* // Clear all errors
|
|
359
|
+
* Core.errors.clearErrors();
|
|
360
|
+
*
|
|
361
|
+
* // Dismiss an error
|
|
362
|
+
* Core.errors.dismissError(errorId);
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
static get errors(): ErrorStoreActions;
|
|
366
|
+
/**
|
|
367
|
+
* Get feature flags store
|
|
368
|
+
* Provides synchronous access to feature flag values from the store.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```typescript
|
|
372
|
+
* // Check if a flag is enabled
|
|
373
|
+
* const isEnabled = Core.flags.isEnabled('NEW_FEATURE');
|
|
374
|
+
*
|
|
375
|
+
* // Get a flag value
|
|
376
|
+
* const provider = Core.flags.getValue<string>('PAYMENT_PROVIDER');
|
|
377
|
+
*
|
|
378
|
+
* // Refresh flags from source
|
|
379
|
+
* await Core.flags.refresh();
|
|
380
|
+
* ```
|
|
381
|
+
*/
|
|
382
|
+
static get flags(): FeatureFlagStoreSlice;
|
|
383
|
+
/**
|
|
384
|
+
* Check if error handler is initialized
|
|
385
|
+
*/
|
|
386
|
+
static get isErrorHandlerInitialized(): boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Get the HTTP error handler/middleware based on runtime.
|
|
389
|
+
* Returns different types based on detected runtime:
|
|
390
|
+
*
|
|
391
|
+
* - **Express**: Error handler middleware function
|
|
392
|
+
* ```typescript
|
|
393
|
+
* app.use(Core.httpErrorHandler);
|
|
394
|
+
* ```
|
|
395
|
+
*
|
|
396
|
+
* - **NestJS**: Exception filter class
|
|
397
|
+
* ```typescript
|
|
398
|
+
* app.useGlobalFilters(new (Core.httpErrorHandler)());
|
|
399
|
+
* ```
|
|
400
|
+
*
|
|
401
|
+
* - **Next.js**: Object with App Router and Pages Router handlers
|
|
402
|
+
* ```typescript
|
|
403
|
+
* // App Router
|
|
404
|
+
* export const GET = Core.httpErrorHandler.withErrorHandler(handler);
|
|
405
|
+
* // Pages Router
|
|
406
|
+
* export default Core.httpErrorHandler.createNextApiErrorHandler()(handler);
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* - **Node.js/Bun/Deno**: Object with handleError and createMiddleware
|
|
410
|
+
* ```typescript
|
|
411
|
+
* Core.httpErrorHandler.handleError(error, req, res);
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* - **Browser**: null (no HTTP handler needed)
|
|
415
|
+
*
|
|
416
|
+
* @returns The HTTP error handler for the current runtime
|
|
417
|
+
*/
|
|
418
|
+
static get httpErrorHandler(): unknown;
|
|
419
|
+
/**
|
|
420
|
+
* Check if feature flags are initialized
|
|
421
|
+
*/
|
|
422
|
+
static get isFlagsInitialized(): boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Get error handler configuration
|
|
425
|
+
*/
|
|
426
|
+
static get errorConfig(): CoreErrorHandlerInitConfig;
|
|
427
|
+
/**
|
|
428
|
+
* Get feature flag configuration
|
|
429
|
+
*/
|
|
430
|
+
static get flagConfig(): CoreFeatureFlagInitConfig;
|
|
431
|
+
/**
|
|
432
|
+
* Get loaded environment variables
|
|
433
|
+
*/
|
|
434
|
+
static get env(): CoreEnvVars;
|
|
435
|
+
/**
|
|
436
|
+
* Get detected runtime environment
|
|
437
|
+
*/
|
|
438
|
+
static get runtime(): CoreRuntimeEnvironment;
|
|
439
|
+
/**
|
|
440
|
+
* Get current app context
|
|
441
|
+
*/
|
|
442
|
+
static get appContext(): CoreAppContext;
|
|
443
|
+
/**
|
|
444
|
+
* Check if Core is initialized
|
|
445
|
+
*/
|
|
446
|
+
static get isInitialized(): boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Check if running on a backend runtime
|
|
449
|
+
*/
|
|
450
|
+
static get isBackend(): boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Check if running on a frontend runtime
|
|
453
|
+
*/
|
|
454
|
+
static get isFrontend(): boolean;
|
|
455
|
+
/**
|
|
456
|
+
* Get runtime context (backend, frontend, or universal)
|
|
457
|
+
* Universal means the runtime can be either (SSR frameworks like Next.js, Nuxt, Edge)
|
|
458
|
+
*/
|
|
459
|
+
static getRuntimeContext(): CoreRuntimeContext;
|
|
460
|
+
/**
|
|
461
|
+
* Assert that the current runtime matches the expected runtime(s)
|
|
462
|
+
* Throws an error if the runtime doesn't match
|
|
463
|
+
*
|
|
464
|
+
* @param expected - Expected runtime(s) to check against
|
|
465
|
+
* @param serviceName - Name of the service for error message
|
|
466
|
+
* @throws CorePackageError if runtime doesn't match
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```typescript
|
|
470
|
+
* // Assert backend-only
|
|
471
|
+
* Core.assertRuntime('backend', 'DatabaseService');
|
|
472
|
+
*
|
|
473
|
+
* // Assert multiple runtimes
|
|
474
|
+
* Core.assertRuntime(['backend', 'universal'], 'CacheService');
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
static assertRuntime(expected: CoreServiceRuntime | readonly CoreServiceRuntime[], serviceName: string): void;
|
|
478
|
+
/**
|
|
479
|
+
* Check if a service runtime is compatible with current runtime
|
|
480
|
+
* Returns true/false instead of throwing
|
|
481
|
+
*
|
|
482
|
+
* @param expected - Expected runtime(s) to check against
|
|
483
|
+
*/
|
|
484
|
+
static isRuntimeCompatible(expected: CoreServiceRuntime | readonly CoreServiceRuntime[]): boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Get a registered domain service by key.
|
|
487
|
+
* Convenience method that wraps ServiceRegistry.get().
|
|
488
|
+
*
|
|
489
|
+
* @param key - Service key (e.g., 'featureFlags', 'example')
|
|
490
|
+
* @returns The service instance
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* ```typescript
|
|
494
|
+
* const flags = Core.getService<FeatureFlagDomainService>('featureFlags');
|
|
495
|
+
* const isEnabled = await flags.isEnabled('my-flag');
|
|
496
|
+
* ```
|
|
497
|
+
*/
|
|
498
|
+
static getService<T extends CoreDomainServiceInstance = CoreDomainServiceInstance>(key: string): T;
|
|
499
|
+
/**
|
|
500
|
+
* Get a registered domain service by key with async initialization if needed.
|
|
501
|
+
* Convenience method that wraps ServiceRegistry.getAsync().
|
|
502
|
+
*
|
|
503
|
+
* @param key - Service key
|
|
504
|
+
* @returns Promise resolving to the service instance
|
|
505
|
+
*/
|
|
506
|
+
static getServiceAsync<T extends CoreDomainServiceInstance = CoreDomainServiceInstance>(key: string): Promise<T>;
|
|
507
|
+
/**
|
|
508
|
+
* Check if a domain service is registered.
|
|
509
|
+
*/
|
|
510
|
+
static hasService(key: string): boolean;
|
|
511
|
+
/**
|
|
512
|
+
* Reset Core (useful for testing)
|
|
513
|
+
*/
|
|
514
|
+
static reset(): Promise<void>;
|
|
515
|
+
/**
|
|
516
|
+
* Determines whether to skip DbService initialization.
|
|
517
|
+
*
|
|
518
|
+
* DbService is backend-only and should never be initialized on frontend runtimes.
|
|
519
|
+
* This method:
|
|
520
|
+
* - Returns true (skip) if skipDb was explicitly set to true
|
|
521
|
+
* - Returns true (skip) if running on frontend, with a warning
|
|
522
|
+
* - Warns if someone explicitly tried to init DbService on frontend (skipDb: false)
|
|
523
|
+
*
|
|
524
|
+
* @param skipDb - User-provided skipDb option
|
|
525
|
+
* @param verbose - Enable verbose logging
|
|
526
|
+
* @returns true if DbService should be skipped
|
|
527
|
+
*/
|
|
528
|
+
private static shouldSkipDbService;
|
|
529
|
+
/**
|
|
530
|
+
* Initialize database service
|
|
531
|
+
* Config validation is handled by DbService
|
|
532
|
+
*/
|
|
533
|
+
private static initializeDb;
|
|
534
|
+
/**
|
|
535
|
+
* Initialize API client service
|
|
536
|
+
* Config validation is handled by ApiClientService
|
|
537
|
+
*/
|
|
538
|
+
private static initializeApi;
|
|
539
|
+
/**
|
|
540
|
+
* Initialize cache service
|
|
541
|
+
* Config validation is handled by CacheService
|
|
542
|
+
*/
|
|
543
|
+
private static initializeCache;
|
|
544
|
+
/**
|
|
545
|
+
* Initialize observability service based on config.
|
|
546
|
+
* Always includes LoggerAdapter as failover for console output.
|
|
547
|
+
*/
|
|
548
|
+
private static initializeObservability;
|
|
549
|
+
/**
|
|
550
|
+
* Initialize global error handler
|
|
551
|
+
*/
|
|
552
|
+
/** Create and initialize root store (includes error store + all other slices) */
|
|
553
|
+
private static initializeRootStore;
|
|
554
|
+
/** Get error store actions from root store */
|
|
555
|
+
private static getErrorStoreActions;
|
|
556
|
+
/** Build global error handler config */
|
|
557
|
+
private static buildErrorHandlerConfig;
|
|
558
|
+
private static initializeErrorHandler;
|
|
559
|
+
/**
|
|
560
|
+
* Create HTTP error handler based on detected runtime.
|
|
561
|
+
* Stores the handler in Core._httpErrorHandler for access via Core.httpErrorHandler
|
|
562
|
+
*/
|
|
563
|
+
private static createHttpErrorHandler;
|
|
564
|
+
/**
|
|
565
|
+
* Subscribe to CoreEventManager error events
|
|
566
|
+
* Forwards system, entity, API, validation, database, and auth errors to the global error handler.
|
|
567
|
+
*
|
|
568
|
+
* Note: Database errors (DATABASE.ERROR) are only subscribed on backend runtimes since
|
|
569
|
+
* DbService is backend-only (skipDb: true on frontend).
|
|
570
|
+
*/
|
|
571
|
+
private static subscribeToErrorEvents;
|
|
572
|
+
/** Handle fetch flags error and return empty flags */
|
|
573
|
+
private static handleFetchFlagsError;
|
|
574
|
+
/** Create fetch flags function */
|
|
575
|
+
private static createFetchFlagsFn;
|
|
576
|
+
/**
|
|
577
|
+
* Initialize feature flags slice within root store
|
|
578
|
+
*/
|
|
579
|
+
private static initializeFeatureFlags;
|
|
580
|
+
}
|
|
581
|
+
export { DbService, ApiClientService, CacheService, StorageService, NotificationService, DEFAULT_ENCRYPTION_FIELDS, };
|
|
582
|
+
//# sourceMappingURL=CoreInitializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreInitializer.d.ts","sourceRoot":"","sources":["../../src/init/CoreInitializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAGH,OAAO,EACL,SAAS,EACT,KAAK,mBAAmB,EACxB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EAEX,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,IAAI,mBAAmB,EACtC,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EAEzB,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CA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