@luvio/service-cache-control
Advanced tools
Comparing version 5.7.1 to 5.8.0
@@ -1,2 +0,2 @@ | ||
import { type NamedService, type Result, type ServiceDescriptor } from '@luvio/utils'; | ||
import { type Result } from '@luvio/utils'; | ||
import type { TypeStore, CacheControlMetadata, NamedCacheService } from '@luvio/service-cache/v1'; | ||
@@ -41,4 +41,1 @@ import type { MaxAgeRequestConfig } from './cache-control-strategies/max-age-cache-control-strategy'; | ||
} | ||
export type NamedCacheControllerService<Name extends string = 'cacheController'> = NamedService<Name, CacheController>; | ||
export type CacheControllerServiceDescriptor = ServiceDescriptor<CacheController, 'cacheControl', '1.0'>; | ||
export declare function buildCacheControlService(services: NamedCacheService): CacheController; |
@@ -1,1 +0,6 @@ | ||
export * from './cache-control'; | ||
import { CacheController } from './cache-control'; | ||
import type { ServiceDescriptor, NamedService } from '@luvio/utils'; | ||
import type { Cache } from '@luvio/service-cache/v1'; | ||
export type NamedCacheControllerService<Name extends string = 'cacheController'> = NamedService<Name, CacheController>; | ||
export type CacheControlServiceDescriptor = ServiceDescriptor<CacheController, 'cacheControl', '1.0'>; | ||
export declare function buildServiceDescriptor(cache: Cache): CacheControlServiceDescriptor; |
@@ -147,6 +147,11 @@ /** | ||
} | ||
function buildCacheControlService(services) { | ||
return new CacheController(services); | ||
function buildServiceDescriptor(cache) { | ||
return { | ||
type: 'cacheControl', | ||
version: '1.0', | ||
service: new CacheController({ cache }), | ||
}; | ||
} | ||
export { CacheController, buildCacheControlService }; | ||
export { buildServiceDescriptor }; |
@@ -1,2 +0,2 @@ | ||
import { type NamedService, type Result, type ServiceDescriptor } from '@luvio/utils'; | ||
import { type Result } from '@luvio/utils'; | ||
import type { TypeStore, CacheControlMetadata, NamedCacheService } from '@luvio/service-cache/v1'; | ||
@@ -41,4 +41,1 @@ import type { MaxAgeRequestConfig } from './cache-control-strategies/max-age-cache-control-strategy'; | ||
} | ||
export type NamedCacheControllerService<Name extends string = 'cacheController'> = NamedService<Name, CacheController>; | ||
export type CacheControllerServiceDescriptor = ServiceDescriptor<CacheController, 'cacheControl', '1.0'>; | ||
export declare function buildCacheControlService(services: NamedCacheService): CacheController; |
@@ -1,1 +0,6 @@ | ||
export * from './cache-control'; | ||
import { CacheController } from './cache-control'; | ||
import type { ServiceDescriptor, NamedService } from '@luvio/utils'; | ||
import type { Cache } from '@luvio/service-cache/v1'; | ||
export type NamedCacheControllerService<Name extends string = 'cacheController'> = NamedService<Name, CacheController>; | ||
export type CacheControlServiceDescriptor = ServiceDescriptor<CacheController, 'cacheControl', '1.0'>; | ||
export declare function buildServiceDescriptor(cache: Cache): CacheControlServiceDescriptor; |
{ | ||
"name": "@luvio/service-cache-control", | ||
"version": "5.7.1", | ||
"version": "5.8.0", | ||
"private": false, | ||
@@ -34,4 +34,4 @@ "description": "OneStore Cache Control Service definition", | ||
"dependencies": { | ||
"@luvio/service-cache": "^5.7.1", | ||
"@luvio/utils": "^5.7.1" | ||
"@luvio/service-cache": "^5.8.0", | ||
"@luvio/utils": "^5.8.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "bundlesize": [ |
22542
352
Updated@luvio/service-cache@^5.8.0
Updated@luvio/utils@^5.8.0