@mohasinac/contracts 0.1.0 → 1.1.0
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/index.d.cts +0 -24
- package/dist/index.d.ts +0 -24
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -389,46 +389,22 @@ interface IStyleAdapter {
|
|
|
389
389
|
token(name: string): string;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
/**
|
|
393
|
-
* The single DI container. Populated once at app startup via registerProviders().
|
|
394
|
-
* Feature packages access concrete implementations via getProviders() — they
|
|
395
|
-
* never import a concrete provider directly (Dependency Inversion Principle).
|
|
396
|
-
*/
|
|
397
392
|
interface ProviderRegistry {
|
|
398
393
|
auth: IAuthProvider;
|
|
399
394
|
session: ISessionProvider;
|
|
400
395
|
email: IEmailProvider;
|
|
401
396
|
storage: IStorageProvider;
|
|
402
397
|
style: IStyleAdapter;
|
|
403
|
-
/** Optional — database provider; enables true 2-line API route stubs in feat-* packages */
|
|
404
398
|
db?: IDbProvider;
|
|
405
|
-
/** Optional — only required for projects with payment flows */
|
|
406
399
|
payment?: IPaymentProvider;
|
|
407
|
-
/** Optional — only required for projects with order shipping */
|
|
408
400
|
shipping?: IShippingProvider;
|
|
409
|
-
/** Optional — only required for projects with full-text search */
|
|
410
401
|
search?: ISearchProvider;
|
|
411
|
-
/** Optional — falls back to in-memory cache if not provided */
|
|
412
402
|
cache?: ICacheProvider;
|
|
413
|
-
/** Optional — falls back to in-memory queue if not provided */
|
|
414
403
|
queue?: IQueueProvider;
|
|
415
|
-
/** Optional — falls back to EventEmitter if not provided */
|
|
416
404
|
eventBus?: IEventBus;
|
|
417
405
|
}
|
|
418
|
-
/**
|
|
419
|
-
* Call once at app startup (e.g. in providers.config.ts).
|
|
420
|
-
* Subsequent calls replace the registry — useful in tests.
|
|
421
|
-
*/
|
|
422
406
|
declare function registerProviders(registry: ProviderRegistry): void;
|
|
423
|
-
/**
|
|
424
|
-
* Returns the registry. Throws if registerProviders() has not been called.
|
|
425
|
-
* Feature packages call this to resolve concrete implementations.
|
|
426
|
-
*/
|
|
427
407
|
declare function getProviders(): ProviderRegistry;
|
|
428
|
-
/**
|
|
429
|
-
* Resets the registry — only for use in test environments.
|
|
430
|
-
* @internal
|
|
431
|
-
*/
|
|
432
408
|
declare function _resetProviders(): void;
|
|
433
409
|
|
|
434
410
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -389,46 +389,22 @@ interface IStyleAdapter {
|
|
|
389
389
|
token(name: string): string;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
/**
|
|
393
|
-
* The single DI container. Populated once at app startup via registerProviders().
|
|
394
|
-
* Feature packages access concrete implementations via getProviders() — they
|
|
395
|
-
* never import a concrete provider directly (Dependency Inversion Principle).
|
|
396
|
-
*/
|
|
397
392
|
interface ProviderRegistry {
|
|
398
393
|
auth: IAuthProvider;
|
|
399
394
|
session: ISessionProvider;
|
|
400
395
|
email: IEmailProvider;
|
|
401
396
|
storage: IStorageProvider;
|
|
402
397
|
style: IStyleAdapter;
|
|
403
|
-
/** Optional — database provider; enables true 2-line API route stubs in feat-* packages */
|
|
404
398
|
db?: IDbProvider;
|
|
405
|
-
/** Optional — only required for projects with payment flows */
|
|
406
399
|
payment?: IPaymentProvider;
|
|
407
|
-
/** Optional — only required for projects with order shipping */
|
|
408
400
|
shipping?: IShippingProvider;
|
|
409
|
-
/** Optional — only required for projects with full-text search */
|
|
410
401
|
search?: ISearchProvider;
|
|
411
|
-
/** Optional — falls back to in-memory cache if not provided */
|
|
412
402
|
cache?: ICacheProvider;
|
|
413
|
-
/** Optional — falls back to in-memory queue if not provided */
|
|
414
403
|
queue?: IQueueProvider;
|
|
415
|
-
/** Optional — falls back to EventEmitter if not provided */
|
|
416
404
|
eventBus?: IEventBus;
|
|
417
405
|
}
|
|
418
|
-
/**
|
|
419
|
-
* Call once at app startup (e.g. in providers.config.ts).
|
|
420
|
-
* Subsequent calls replace the registry — useful in tests.
|
|
421
|
-
*/
|
|
422
406
|
declare function registerProviders(registry: ProviderRegistry): void;
|
|
423
|
-
/**
|
|
424
|
-
* Returns the registry. Throws if registerProviders() has not been called.
|
|
425
|
-
* Feature packages call this to resolve concrete implementations.
|
|
426
|
-
*/
|
|
427
407
|
declare function getProviders(): ProviderRegistry;
|
|
428
|
-
/**
|
|
429
|
-
* Resets the registry — only for use in test environments.
|
|
430
|
-
* @internal
|
|
431
|
-
*/
|
|
432
408
|
declare function _resetProviders(): void;
|
|
433
409
|
|
|
434
410
|
/**
|