@saasicat/nest 0.22.0 → 0.22.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.
Files changed (27) hide show
  1. package/dist/_entries.cjs +390 -263
  2. package/dist/billing/index.d.cts +6 -4
  3. package/dist/billing/index.d.ts +6 -4
  4. package/dist/billing/index.js +5 -1
  5. package/dist/{chunk-UO64MK3Q.js → chunk-A7FHAN2I.js} +14 -0
  6. package/dist/{chunk-UFS344JD.js → chunk-LPCUHZWC.js} +173 -60
  7. package/dist/{define-saasicat-C99hWAUK.d.ts → define-saasicat-BK6RRWWG.d.ts} +1 -1
  8. package/dist/{define-saasicat-ByPjtKPy.d.cts → define-saasicat-D30I-WET.d.cts} +1 -1
  9. package/dist/{enforce-quota.interceptor-BrsU1UYJ.d.cts → enforce-quota.interceptor-B9QueAFf.d.ts} +4 -1
  10. package/dist/{enforce-quota.interceptor-reO-i71U.d.ts → enforce-quota.interceptor-DY6CLjoP.d.cts} +4 -1
  11. package/dist/index.d.cts +5 -5
  12. package/dist/index.d.ts +5 -5
  13. package/dist/index.js +7 -3
  14. package/dist/platform/index.d.cts +28 -10
  15. package/dist/platform/index.d.ts +28 -10
  16. package/dist/platform/index.js +5 -3
  17. package/dist/{saas-platform.module-HCDNZTiE.d.cts → saas-platform.module-CgalxzcT.d.cts} +1 -1
  18. package/dist/{saas-platform.module-DolE41YY.d.ts → saas-platform.module-D1mUZPrz.d.ts} +1 -1
  19. package/dist/{subscription-bundles.module-BQmoozm5.d.ts → subscription-bundles.module-BDbODWvA.d.ts} +9 -1
  20. package/dist/{subscription-bundles.module-DCpV-Pb5.d.cts → subscription-bundles.module-Cfi-lFWF.d.cts} +9 -1
  21. package/dist/{tenant-billing.controller-7o4ObzGs.d.ts → tenant-billing.controller-BSlpFqVA.d.ts} +1 -1
  22. package/dist/{tenant-billing.controller-DubP6-Md.d.cts → tenant-billing.controller-DHSUrT_N.d.cts} +1 -1
  23. package/dist/testing/index.d.cts +4 -4
  24. package/dist/testing/index.d.ts +4 -4
  25. package/dist/testing/index.js +2 -2
  26. package/package.json +3 -3
  27. /package/dist/{chunk-EWPF57AG.js → chunk-FY4EJTV4.js} +0 -0
@@ -1,14 +1,14 @@
1
1
  import { BillingCycle, FeatureKey, UpsellOfferResolver, BundleRepository, CatalogEntryRepository, UpsellOffer, PlanCatalog, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, PlanCatalogImportReport, PlanId, PlanDef, QuotaKey, MarketingTopFeature, FeatureUiRegistry, MarketingProjectionRepository, ConfiguratorSourcesLookup, ConfiguratorMarketingProvider, ConfiguratorCatalog } from '@saasicat/types';
2
2
  export { BundleVersionFields, ChangeDirection, DiffResult, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
3
+ import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-Cfi-lFWF.cjs';
4
+ export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, M as MarkedFeatureGuard, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver, E as isPlatformFeatureGuard } from '../subscription-bundles.module-Cfi-lFWF.cjs';
3
5
  import * as _nestjs_common from '@nestjs/common';
4
6
  import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
5
7
  export { Type as NestType } from '@nestjs/common';
6
8
  import { Reflector, BaseExceptionFilter } from '@nestjs/core';
7
9
  import { c as EntitlementService } from '../aggregation-mZ7WZROK.cjs';
8
10
  import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
9
- import { f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-DCpV-Pb5.cjs';
10
- export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-DCpV-Pb5.cjs';
11
- export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-DubP6-Md.cjs';
11
+ export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-DHSUrT_N.cjs';
12
12
  import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.cjs';
13
13
  import '../plan-resolution-CFCoUkrE.cjs';
14
14
  import '../service-D48clObR.cjs';
@@ -193,6 +193,8 @@ declare class FeatureGuard implements CanActivate {
193
193
  private readonly entitlements;
194
194
  private readonly config;
195
195
  private readonly upsellResolver;
196
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
197
+ static readonly [FEATURE_GUARD_MARKER] = true;
196
198
  private readonly logger;
197
199
  constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
198
200
  canActivate(context: ExecutionContext): Promise<boolean>;
@@ -594,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
594
596
  */
595
597
  declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
596
598
 
597
- export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead };
599
+ export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead };
@@ -1,14 +1,14 @@
1
1
  import { BillingCycle, FeatureKey, UpsellOfferResolver, BundleRepository, CatalogEntryRepository, UpsellOffer, PlanCatalog, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, PlanCatalogImportReport, PlanId, PlanDef, QuotaKey, MarketingTopFeature, FeatureUiRegistry, MarketingProjectionRepository, ConfiguratorSourcesLookup, ConfiguratorMarketingProvider, ConfiguratorCatalog } from '@saasicat/types';
2
2
  export { BundleVersionFields, ChangeDirection, DiffResult, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
3
+ import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-BDbODWvA.js';
4
+ export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, M as MarkedFeatureGuard, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver, E as isPlatformFeatureGuard } from '../subscription-bundles.module-BDbODWvA.js';
3
5
  import * as _nestjs_common from '@nestjs/common';
4
6
  import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
5
7
  export { Type as NestType } from '@nestjs/common';
6
8
  import { Reflector, BaseExceptionFilter } from '@nestjs/core';
7
9
  import { c as EntitlementService } from '../aggregation-DP5zfKbU.js';
8
10
  import { P as ProviderSpec } from '../di-CcNeq9v-.js';
9
- import { f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-BQmoozm5.js';
10
- export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-BQmoozm5.js';
11
- export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-7o4ObzGs.js';
11
+ export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-BSlpFqVA.js';
12
12
  import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.js';
13
13
  import '../plan-resolution-CFCoUkrE.js';
14
14
  import '../service-D48clObR.js';
@@ -193,6 +193,8 @@ declare class FeatureGuard implements CanActivate {
193
193
  private readonly entitlements;
194
194
  private readonly config;
195
195
  private readonly upsellResolver;
196
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
197
+ static readonly [FEATURE_GUARD_MARKER] = true;
196
198
  private readonly logger;
197
199
  constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
198
200
  canActivate(context: ExecutionContext): Promise<boolean>;
@@ -594,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
594
596
  */
595
597
  declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
596
598
 
597
- export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead };
599
+ export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead };
@@ -9,6 +9,7 @@ import {
9
9
  ComposedTenantAuthGuard,
10
10
  ConfiguratorCatalogBuilder,
11
11
  FEATURE_GUARD_CONFIG_TOKEN,
12
+ FEATURE_GUARD_MARKER,
12
13
  FEATURE_UI_REGISTRY_TOKEN,
13
14
  FeatureGuard,
14
15
  LimitExceededFilter,
@@ -52,13 +53,14 @@ import {
52
53
  computeProration,
53
54
  decideRenewal,
54
55
  initialPeriodWindow,
56
+ isPlatformFeatureGuard,
55
57
  loadPlanCatalogFromFile,
56
58
  loadPlanCatalogFromString,
57
59
  periodEndAfter,
58
60
  periodEndWithMinLead,
59
61
  resolveBundleCancelEffectiveAt,
60
62
  resolveBundlePriceNet
61
- } from "../chunk-UO64MK3Q.js";
63
+ } from "../chunk-A7FHAN2I.js";
62
64
  import "../chunk-VQQWF7MW.js";
63
65
  import "../chunk-B7NRY2LV.js";
64
66
  import {
@@ -116,6 +118,7 @@ export {
116
118
  ComposedTenantAuthGuard,
117
119
  ConfiguratorCatalogBuilder,
118
120
  FEATURE_GUARD_CONFIG_TOKEN,
121
+ FEATURE_GUARD_MARKER,
119
122
  FEATURE_UI_REGISTRY_TOKEN,
120
123
  FeatureGuard,
121
124
  LimitExceededFilter,
@@ -185,6 +188,7 @@ export {
185
188
  initialPeriodWindow,
186
189
  isFeatureInPlan,
187
190
  isFeaturePlannedOnly,
191
+ isPlatformFeatureGuard,
188
192
  loadPlanCatalogFromFile,
189
193
  loadPlanCatalogFromString,
190
194
  periodEndAfter,
@@ -174,6 +174,16 @@ function computeNextPeriod(sub, now) {
174
174
  }
175
175
  __name(computeNextPeriod, "computeNextPeriod");
176
176
 
177
+ // src/billing/feature-guard-marker.ts
178
+ var FEATURE_GUARD_MARKER = /* @__PURE__ */ Symbol.for("saasicat/nest/feature-guard");
179
+ function isPlatformFeatureGuard(target) {
180
+ if (target === null || typeof target !== "function" && typeof target !== "object") {
181
+ return false;
182
+ }
183
+ return target[FEATURE_GUARD_MARKER] === true;
184
+ }
185
+ __name(isPlatformFeatureGuard, "isPlatformFeatureGuard");
186
+
177
187
  // src/billing/require-feature.decorator.ts
178
188
  import { SetMetadata } from "@nestjs/common";
179
189
  var REQUIRE_FEATURE_KEY = "require-feature";
@@ -217,6 +227,8 @@ var FeatureGuard = class _FeatureGuard {
217
227
  entitlements;
218
228
  config;
219
229
  upsellResolver;
230
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
231
+ static [FEATURE_GUARD_MARKER] = true;
220
232
  logger = new Logger(_FeatureGuard.name);
221
233
  constructor(reflector, entitlements, config = null, upsellResolver = null) {
222
234
  this.reflector = reflector;
@@ -3461,6 +3473,8 @@ export {
3461
3473
  decideRenewal,
3462
3474
  clearPendingPlanVersionFields,
3463
3475
  computeNextPeriod,
3476
+ FEATURE_GUARD_MARKER,
3477
+ isPlatformFeatureGuard,
3464
3478
  REQUIRE_FEATURE_KEY,
3465
3479
  RequireFeature,
3466
3480
  FEATURE_GUARD_CONFIG_TOKEN,
@@ -11,11 +11,13 @@ import {
11
11
  SuperAdminGuard
12
12
  } from "./chunk-SN5UOC43.js";
13
13
  import {
14
+ FEATURE_GUARD_MARKER,
14
15
  PublicCatalogModule,
15
16
  REQUIRE_FEATURE_KEY,
16
17
  SubscriptionBundleModule,
17
- TenantBillingModule
18
- } from "./chunk-UO64MK3Q.js";
18
+ TenantBillingModule,
19
+ isPlatformFeatureGuard
20
+ } from "./chunk-A7FHAN2I.js";
19
21
  import {
20
22
  SubscriptionContractModule
21
23
  } from "./chunk-B7NRY2LV.js";
@@ -445,10 +447,9 @@ StaticEntitlementService = _ts_decorate4([
445
447
  ])
446
448
  ], StaticEntitlementService);
447
449
 
448
- // src/platform/static-feature.guard.ts
449
- import { ForbiddenException as ForbiddenException2, Inject as Inject3, Injectable as Injectable3, Optional } from "@nestjs/common";
450
- import { Reflector } from "@nestjs/core";
451
- import { AUTH_ERROR_CODES, FEATURE_NOT_LICENSED } from "@saasicat/types";
450
+ // src/platform/feature-guard-coverage.check.ts
451
+ import { Inject as Inject3, Injectable as Injectable3, Logger } from "@nestjs/common";
452
+ import { DiscoveryService, MetadataScanner } from "@nestjs/core";
452
453
  function _ts_decorate5(decorators, target, key, desc) {
453
454
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
454
455
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -466,6 +467,115 @@ function _ts_param4(paramIndex, decorator) {
466
467
  };
467
468
  }
468
469
  __name(_ts_param4, "_ts_param");
470
+ var GUARDS_METADATA = "__guards__";
471
+ var METHOD_METADATA = "method";
472
+ var FeatureGuardCoverageCheck = class {
473
+ static {
474
+ __name(this, "FeatureGuardCoverageCheck");
475
+ }
476
+ discoveryService;
477
+ metadataScanner;
478
+ logger = new Logger("SaaSiCat");
479
+ constructor(discoveryService, metadataScanner) {
480
+ this.discoveryService = discoveryService;
481
+ this.metadataScanner = metadataScanner;
482
+ }
483
+ onApplicationBootstrap() {
484
+ const uncovered = this.findUncoveredRoutes();
485
+ if (uncovered.length === 0) return;
486
+ const list = uncovered.map((r) => ` ${r.controller}.${r.handler} \u2014 requires ${r.features.join(" or ")}`).join("\n");
487
+ this.logger.warn(`globalFeatureGuard is off and ${uncovered.length} annotated route(s) have no feature guard in front of them, so they serve unlicensed traffic:
488
+ ${list}
489
+ Bind one behind your auth guard \u2014 @UseGuards(JwtAuthGuard, StaticFeatureGuard), or FeatureGuard from @saasicat/nest/billing on the V3 entitlement path. A guard of your own that wraps either one is not recognised here; if that is what these routes use, they are covered.`);
490
+ }
491
+ /**
492
+ * Annotated handlers whose own guards and whose controller's guards contain
493
+ * no recognisable feature guard.
494
+ *
495
+ * Deliberately conservative in one direction only: an unrecognised wrapper
496
+ * is reported (and the message says so) rather than assumed safe, because
497
+ * the named route is cheap to check. The reverse — staying silent about a
498
+ * route with no guard at all — is the failure this exists to prevent.
499
+ */
500
+ findUncoveredRoutes() {
501
+ const uncovered = [];
502
+ for (const wrapper of this.discoveryService.getControllers()) {
503
+ const instance = wrapper.instance;
504
+ if (!instance || typeof instance !== "object") continue;
505
+ const ctor = instance.constructor;
506
+ if (!ctor) continue;
507
+ const classGuards = readGuards(ctor);
508
+ const prototype = Object.getPrototypeOf(instance);
509
+ for (const method of this.metadataScanner.getAllMethodNames(prototype)) {
510
+ const handler = instance[method];
511
+ if (typeof handler !== "function") continue;
512
+ if (Reflect.getMetadata(METHOD_METADATA, handler) === void 0) continue;
513
+ const features = readFeatures(handler) ?? readFeatures(ctor) ?? /* not annotated */
514
+ null;
515
+ if (!features || features.length === 0) continue;
516
+ const guards = [
517
+ ...classGuards,
518
+ ...readGuards(handler)
519
+ ];
520
+ if (guards.some(isPlatformFeatureGuard)) continue;
521
+ uncovered.push({
522
+ controller: ctor.name,
523
+ handler: method,
524
+ features
525
+ });
526
+ }
527
+ }
528
+ return uncovered;
529
+ }
530
+ };
531
+ FeatureGuardCoverageCheck = _ts_decorate5([
532
+ Injectable3(),
533
+ _ts_param4(0, Inject3(DiscoveryService)),
534
+ _ts_param4(1, Inject3(MetadataScanner)),
535
+ _ts_metadata4("design:type", Function),
536
+ _ts_metadata4("design:paramtypes", [
537
+ typeof DiscoveryService === "undefined" ? Object : DiscoveryService,
538
+ typeof MetadataScanner === "undefined" ? Object : MetadataScanner
539
+ ])
540
+ ], FeatureGuardCoverageCheck);
541
+ function readFeatures(target) {
542
+ const value = Reflect.getMetadata(REQUIRE_FEATURE_KEY, target);
543
+ return Array.isArray(value) ? value : null;
544
+ }
545
+ __name(readFeatures, "readFeatures");
546
+ function readGuards(target) {
547
+ const value = Reflect.getMetadata(GUARDS_METADATA, target);
548
+ if (!Array.isArray(value)) return [];
549
+ return value.flatMap((guard) => typeof guard === "function" ? [
550
+ guard
551
+ ] : [
552
+ guard,
553
+ guard?.constructor
554
+ ]);
555
+ }
556
+ __name(readGuards, "readGuards");
557
+
558
+ // src/platform/static-feature.guard.ts
559
+ import { ForbiddenException as ForbiddenException2, Inject as Inject4, Injectable as Injectable4, Optional } from "@nestjs/common";
560
+ import { Reflector } from "@nestjs/core";
561
+ import { AUTH_ERROR_CODES, FEATURE_NOT_LICENSED } from "@saasicat/types";
562
+ function _ts_decorate6(decorators, target, key, desc) {
563
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
564
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
565
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
566
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
567
+ }
568
+ __name(_ts_decorate6, "_ts_decorate");
569
+ function _ts_metadata5(k, v) {
570
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
571
+ }
572
+ __name(_ts_metadata5, "_ts_metadata");
573
+ function _ts_param5(paramIndex, decorator) {
574
+ return function(target, key) {
575
+ decorator(target, key, paramIndex);
576
+ };
577
+ }
578
+ __name(_ts_param5, "_ts_param");
469
579
  var STATIC_FEATURE_GUARD_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform-nest/StaticFeatureGuardConfig");
470
580
  var StaticFeatureGuard = class {
471
581
  static {
@@ -474,6 +584,8 @@ var StaticFeatureGuard = class {
474
584
  reflector;
475
585
  entitlements;
476
586
  config;
587
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
588
+ static [FEATURE_GUARD_MARKER] = true;
477
589
  constructor(reflector, entitlements, config = null) {
478
590
  this.reflector = reflector;
479
591
  this.entitlements = entitlements;
@@ -517,14 +629,14 @@ var StaticFeatureGuard = class {
517
629
  return true;
518
630
  }
519
631
  };
520
- StaticFeatureGuard = _ts_decorate5([
521
- Injectable3(),
522
- _ts_param4(0, Inject3(Reflector)),
523
- _ts_param4(1, Inject3(StaticEntitlementService)),
524
- _ts_param4(2, Optional()),
525
- _ts_param4(2, Inject3(STATIC_FEATURE_GUARD_CONFIG_TOKEN)),
526
- _ts_metadata4("design:type", Function),
527
- _ts_metadata4("design:paramtypes", [
632
+ StaticFeatureGuard = _ts_decorate6([
633
+ Injectable4(),
634
+ _ts_param5(0, Inject4(Reflector)),
635
+ _ts_param5(1, Inject4(StaticEntitlementService)),
636
+ _ts_param5(2, Optional()),
637
+ _ts_param5(2, Inject4(STATIC_FEATURE_GUARD_CONFIG_TOKEN)),
638
+ _ts_metadata5("design:type", Function),
639
+ _ts_metadata5("design:paramtypes", [
528
640
  typeof Reflector === "undefined" ? Object : Reflector,
529
641
  typeof StaticEntitlementService === "undefined" ? Object : StaticEntitlementService,
530
642
  Object
@@ -532,27 +644,27 @@ StaticFeatureGuard = _ts_decorate5([
532
644
  ], StaticFeatureGuard);
533
645
 
534
646
  // src/platform/enforce-quota.interceptor.ts
535
- import { Inject as Inject4, Injectable as Injectable4, Optional as Optional2 } from "@nestjs/common";
647
+ import { Inject as Inject5, Injectable as Injectable5, Optional as Optional2 } from "@nestjs/common";
536
648
  import { Reflector as Reflector2 } from "@nestjs/core";
537
649
  import { from } from "rxjs";
538
650
  import { switchMap } from "rxjs/operators";
539
- function _ts_decorate6(decorators, target, key, desc) {
651
+ function _ts_decorate7(decorators, target, key, desc) {
540
652
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
541
653
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
542
654
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
543
655
  return c > 3 && r && Object.defineProperty(target, key, r), r;
544
656
  }
545
- __name(_ts_decorate6, "_ts_decorate");
546
- function _ts_metadata5(k, v) {
657
+ __name(_ts_decorate7, "_ts_decorate");
658
+ function _ts_metadata6(k, v) {
547
659
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
548
660
  }
549
- __name(_ts_metadata5, "_ts_metadata");
550
- function _ts_param5(paramIndex, decorator) {
661
+ __name(_ts_metadata6, "_ts_metadata");
662
+ function _ts_param6(paramIndex, decorator) {
551
663
  return function(target, key) {
552
664
  decorator(target, key, paramIndex);
553
665
  };
554
666
  }
555
- __name(_ts_param5, "_ts_param");
667
+ __name(_ts_param6, "_ts_param");
556
668
  var QUOTA_PROVIDERS_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform-nest/QuotaProviders");
557
669
  var EnforceQuotaInterceptor = class {
558
670
  static {
@@ -595,14 +707,14 @@ var EnforceQuotaInterceptor = class {
595
707
  }
596
708
  }
597
709
  };
598
- EnforceQuotaInterceptor = _ts_decorate6([
599
- Injectable4(),
600
- _ts_param5(0, Inject4(Reflector2)),
601
- _ts_param5(1, Inject4(StaticEntitlementService)),
602
- _ts_param5(2, Optional2()),
603
- _ts_param5(2, Inject4(QUOTA_PROVIDERS_TOKEN)),
604
- _ts_metadata5("design:type", Function),
605
- _ts_metadata5("design:paramtypes", [
710
+ EnforceQuotaInterceptor = _ts_decorate7([
711
+ Injectable5(),
712
+ _ts_param6(0, Inject5(Reflector2)),
713
+ _ts_param6(1, Inject5(StaticEntitlementService)),
714
+ _ts_param6(2, Optional2()),
715
+ _ts_param6(2, Inject5(QUOTA_PROVIDERS_TOKEN)),
716
+ _ts_metadata6("design:type", Function),
717
+ _ts_metadata6("design:paramtypes", [
606
718
  typeof Reflector2 === "undefined" ? Object : Reflector2,
607
719
  typeof StaticEntitlementService === "undefined" ? Object : StaticEntitlementService,
608
720
  Object
@@ -650,18 +762,18 @@ var SubscriptionPlanResolver = class {
650
762
  };
651
763
 
652
764
  // src/platform/tenant-manifest.service.ts
653
- import { Injectable as Injectable5 } from "@nestjs/common";
654
- function _ts_decorate7(decorators, target, key, desc) {
765
+ import { Injectable as Injectable6 } from "@nestjs/common";
766
+ function _ts_decorate8(decorators, target, key, desc) {
655
767
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
656
768
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
657
769
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
658
770
  return c > 3 && r && Object.defineProperty(target, key, r), r;
659
771
  }
660
- __name(_ts_decorate7, "_ts_decorate");
661
- function _ts_metadata6(k, v) {
772
+ __name(_ts_decorate8, "_ts_decorate");
773
+ function _ts_metadata7(k, v) {
662
774
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
663
775
  }
664
- __name(_ts_metadata6, "_ts_metadata");
776
+ __name(_ts_metadata7, "_ts_metadata");
665
777
  var TenantManifestService = class {
666
778
  static {
667
779
  __name(this, "TenantManifestService");
@@ -707,10 +819,10 @@ var TenantManifestService = class {
707
819
  };
708
820
  }
709
821
  };
710
- TenantManifestService = _ts_decorate7([
711
- Injectable5(),
712
- _ts_metadata6("design:type", Function),
713
- _ts_metadata6("design:paramtypes", [
822
+ TenantManifestService = _ts_decorate8([
823
+ Injectable6(),
824
+ _ts_metadata7("design:type", Function),
825
+ _ts_metadata7("design:paramtypes", [
714
826
  typeof StaticEntitlementService === "undefined" ? Object : StaticEntitlementService
715
827
  ])
716
828
  ], TenantManifestService);
@@ -724,24 +836,24 @@ function isVisible(item, features) {
724
836
  __name(isVisible, "isVisible");
725
837
 
726
838
  // src/platform/tenant-manifest.controller.ts
727
- import { Controller as Controller2, Get as Get2, Inject as Inject5, Req, UseGuards } from "@nestjs/common";
728
- function _ts_decorate8(decorators, target, key, desc) {
839
+ import { Controller as Controller2, Get as Get2, Inject as Inject6, Req, UseGuards } from "@nestjs/common";
840
+ function _ts_decorate9(decorators, target, key, desc) {
729
841
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
730
842
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
731
843
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
732
844
  return c > 3 && r && Object.defineProperty(target, key, r), r;
733
845
  }
734
- __name(_ts_decorate8, "_ts_decorate");
735
- function _ts_metadata7(k, v) {
846
+ __name(_ts_decorate9, "_ts_decorate");
847
+ function _ts_metadata8(k, v) {
736
848
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
737
849
  }
738
- __name(_ts_metadata7, "_ts_metadata");
739
- function _ts_param6(paramIndex, decorator) {
850
+ __name(_ts_metadata8, "_ts_metadata");
851
+ function _ts_param7(paramIndex, decorator) {
740
852
  return function(target, key) {
741
853
  decorator(target, key, paramIndex);
742
854
  };
743
855
  }
744
- __name(_ts_param6, "_ts_param");
856
+ __name(_ts_param7, "_ts_param");
745
857
  function buildTenantManifestController(options) {
746
858
  const path = options.path ?? "tenant/manifest";
747
859
  let GeneratedTenantManifestController = class GeneratedTenantManifestController {
@@ -760,21 +872,21 @@ function buildTenantManifestController(options) {
760
872
  return this.svc.getManifest(tenantId);
761
873
  }
762
874
  };
763
- _ts_decorate8([
875
+ _ts_decorate9([
764
876
  Get2(),
765
- _ts_param6(0, Req()),
766
- _ts_metadata7("design:type", Function),
767
- _ts_metadata7("design:paramtypes", [
877
+ _ts_param7(0, Req()),
878
+ _ts_metadata8("design:type", Function),
879
+ _ts_metadata8("design:paramtypes", [
768
880
  typeof RequestWithUser === "undefined" ? Object : RequestWithUser
769
881
  ]),
770
- _ts_metadata7("design:returntype", Promise)
882
+ _ts_metadata8("design:returntype", Promise)
771
883
  ], GeneratedTenantManifestController.prototype, "get", null);
772
- GeneratedTenantManifestController = _ts_decorate8([
884
+ GeneratedTenantManifestController = _ts_decorate9([
773
885
  Controller2(path),
774
886
  UseGuards(...options.guards),
775
- _ts_param6(0, Inject5(TenantManifestService)),
776
- _ts_metadata7("design:type", Function),
777
- _ts_metadata7("design:paramtypes", [
887
+ _ts_param7(0, Inject6(TenantManifestService)),
888
+ _ts_metadata8("design:type", Function),
889
+ _ts_metadata8("design:paramtypes", [
778
890
  typeof TenantManifestService === "undefined" ? Object : TenantManifestService
779
891
  ])
780
892
  ], GeneratedTenantManifestController);
@@ -783,17 +895,17 @@ function buildTenantManifestController(options) {
783
895
  __name(buildTenantManifestController, "buildTenantManifestController");
784
896
 
785
897
  // src/platform/saas-platform.module.ts
786
- import { Logger, Module as Module2 } from "@nestjs/common";
898
+ import { Logger as Logger2, Module as Module2 } from "@nestjs/common";
787
899
  import { APP_GUARD, APP_INTERCEPTOR } from "@nestjs/core";
788
900
  import { assertPersistenceCapabilities } from "@saasicat/types";
789
- function _ts_decorate9(decorators, target, key, desc) {
901
+ function _ts_decorate10(decorators, target, key, desc) {
790
902
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
791
903
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
792
904
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
793
905
  return c > 3 && r && Object.defineProperty(target, key, r), r;
794
906
  }
795
- __name(_ts_decorate9, "_ts_decorate");
796
- var PLATFORM_LOGGER = new Logger("SaaSiCat");
907
+ __name(_ts_decorate10, "_ts_decorate");
908
+ var PLATFORM_LOGGER = new Logger2("SaaSiCat");
797
909
  var PLATFORM_SUBSCRIPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform-nest/PlatformSubscriptionRepository");
798
910
  var STANDARD_MANIFEST_REGISTRATION_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform-nest/StandardManifestRegistration");
799
911
  function buildStandardManifestContribution(catalog, adminResources, promoCodes) {
@@ -1259,7 +1371,7 @@ var SaasPlatformModule = class _SaasPlatformModule {
1259
1371
  });
1260
1372
  lightweightExports.push(PLAN_RESOLVER_PORT_TOKEN, StaticEntitlementService, StaticFeatureGuard, EnforceQuotaInterceptor, QUOTA_PROVIDERS_TOKEN);
1261
1373
  if (options.globalFeatureGuard === false) {
1262
- PLATFORM_LOGGER.warn("globalFeatureGuard is off \u2014 the platform did NOT bind StaticFeatureGuard as an APP_GUARD. @RequireFeature only blocks on routes where you bound a feature guard yourself, behind your auth guard: @UseGuards(JwtAuthGuard, StaticFeatureGuard), or FeatureGuard from @saasicat/nest/billing on the V3 entitlement path. Any annotated route without one serves unlicensed traffic.");
1374
+ lightweightProviders.push(FeatureGuardCoverageCheck);
1263
1375
  }
1264
1376
  } else {
1265
1377
  PLATFORM_LOGGER.warn("No plan resolver configured \u2014 @RequireFeature and @EnforceQuota are INERT. The platform registered neither StaticFeatureGuard nor EnforceQuotaInterceptor, so every annotated route serves unlicensed traffic and every quota is unlimited. Set one of: adapters.planResolver, defaultPlanId, or tenantBilling.");
@@ -1324,7 +1436,7 @@ var SaasPlatformModule = class _SaasPlatformModule {
1324
1436
  };
1325
1437
  }
1326
1438
  };
1327
- SaasPlatformModule = _ts_decorate9([
1439
+ SaasPlatformModule = _ts_decorate10([
1328
1440
  Module2({})
1329
1441
  ], SaasPlatformModule);
1330
1442
 
@@ -1337,6 +1449,7 @@ export {
1337
1449
  PLAN_RESOLVER_PORT_TOKEN,
1338
1450
  StaticPlanResolver,
1339
1451
  StaticEntitlementService,
1452
+ FeatureGuardCoverageCheck,
1340
1453
  STATIC_FEATURE_GUARD_CONFIG_TOKEN,
1341
1454
  StaticFeatureGuard,
1342
1455
  QUOTA_PROVIDERS_TOKEN,
@@ -3,7 +3,7 @@ import { ExecutionContext } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
5
5
  import { h as MfaService } from './admin-stats.service-Db2exT_d.js';
6
- import { f as SaasPlatformModuleOptions } from './saas-platform.module-DolE41YY.js';
6
+ import { f as SaasPlatformModuleOptions } from './saas-platform.module-D1mUZPrz.js';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -3,7 +3,7 @@ import { ExecutionContext } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
5
5
  import { h as MfaService } from './admin-stats.service-HUZIU448.cjs';
6
- import { f as SaasPlatformModuleOptions } from './saas-platform.module-HCDNZTiE.cjs';
6
+ import { f as SaasPlatformModuleOptions } from './saas-platform.module-CgalxzcT.cjs';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -1,8 +1,9 @@
1
1
  import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
2
2
  import { Reflector } from '@nestjs/core';
3
+ import { F as FEATURE_GUARD_MARKER } from './subscription-bundles.module-BDbODWvA.js';
3
4
  import { Observable } from 'rxjs';
4
5
  import { PlanCatalog, QuotaProvider } from '@saasicat/types';
5
- import { p as PlanResolverPort } from './saas-platform.module-HCDNZTiE.cjs';
6
+ import { p as PlanResolverPort } from './saas-platform.module-D1mUZPrz.js';
6
7
 
7
8
  interface StaticEntitlementSnapshot {
8
9
  planId: string | null;
@@ -43,6 +44,8 @@ declare class StaticFeatureGuard implements CanActivate {
43
44
  private readonly reflector;
44
45
  private readonly entitlements;
45
46
  private readonly config;
47
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
48
+ static readonly [FEATURE_GUARD_MARKER] = true;
46
49
  constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
47
50
  canActivate(context: ExecutionContext): Promise<boolean>;
48
51
  }
@@ -1,8 +1,9 @@
1
1
  import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
2
2
  import { Reflector } from '@nestjs/core';
3
+ import { F as FEATURE_GUARD_MARKER } from './subscription-bundles.module-Cfi-lFWF.cjs';
3
4
  import { Observable } from 'rxjs';
4
5
  import { PlanCatalog, QuotaProvider } from '@saasicat/types';
5
- import { p as PlanResolverPort } from './saas-platform.module-DolE41YY.js';
6
+ import { p as PlanResolverPort } from './saas-platform.module-CgalxzcT.cjs';
6
7
 
7
8
  interface StaticEntitlementSnapshot {
8
9
  planId: string | null;
@@ -43,6 +44,8 @@ declare class StaticFeatureGuard implements CanActivate {
43
44
  private readonly reflector;
44
45
  private readonly entitlements;
45
46
  private readonly config;
47
+ /** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
48
+ static readonly [FEATURE_GUARD_MARKER] = true;
46
49
  constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
47
50
  canActivate(context: ExecutionContext): Promise<boolean>;
48
51
  }