@unchainedshop/core 4.8.6 → 4.8.10

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.
@@ -1,5 +1,7 @@
1
1
  import type { TokenSurrogate } from '@unchainedshop/core-warehousing';
2
+ import type { Product } from '@unchainedshop/core-products';
2
3
  import type { Modules } from '../modules.ts';
3
- export declare function isTokenInvalidateableService(this: Modules, { token, }: {
4
+ export declare function isTokenInvalidateableService(this: Modules, { token, product: providedProduct, }: {
4
5
  token: TokenSurrogate;
6
+ product?: Product;
5
7
  }): Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { WarehousingProviderType } from '@unchainedshop/core-warehousing';
2
2
  import { WarehousingDirector } from "../directors/WarehousingDirector.js";
3
- export async function isTokenInvalidateableService({ token, }) {
4
- const product = await this.products.findProduct({ productId: token.productId });
3
+ export async function isTokenInvalidateableService({ token, product: providedProduct, }) {
4
+ const product = providedProduct || (await this.products.findProduct({ productId: token.productId }));
5
5
  if (!product)
6
6
  return false;
7
7
  const virtualProviders = (await this.warehousing.allProviders()).filter(({ type }) => type === WarehousingProviderType.VIRTUAL);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/core",
3
3
  "description": "Core orchestration package for the Unchained Engine with business services and directors",
4
- "version": "4.8.6",
4
+ "version": "4.8.10",
5
5
  "main": "lib/core-index.js",
6
6
  "types": "lib/core-index.d.ts",
7
7
  "type": "module",