@saasicat/adapter-prisma 0.27.0 → 1.0.0-rc.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/README.md +4 -4
- package/dist/.build-stamp +1 -0
- package/dist/index.cjs +18 -18
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -10
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ transaction rollback and atomic promo claims are verified, not asserted.
|
|
|
15
15
|
import { prismaPersistence } from '@saasicat/adapter-prisma';
|
|
16
16
|
import { PrismaService } from './prisma/prisma.service';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
SaaSiCatModule.forRoot({
|
|
19
19
|
planCatalog: loadPlanCatalogFromFile({ path: 'config/saas.yaml' }),
|
|
20
20
|
controller: { guards: [JwtAuthGuard] },
|
|
21
21
|
imports: [AuthModule],
|
|
@@ -26,8 +26,8 @@ SaasPlatformModule.forRoot({
|
|
|
26
26
|
|
|
27
27
|
`prismaPersistence({ client })` accepts your `PrismaService` class token (or
|
|
28
28
|
a ready `PrismaLike` instance in tests) and returns a
|
|
29
|
-
`
|
|
30
|
-
for every shipped port. `
|
|
29
|
+
`SaaSiCatPersistenceAdapter` bundle: declared capabilities + provider specs
|
|
30
|
+
for every shipped port. `SaaSiCatModule.forRoot` validates the
|
|
31
31
|
capabilities fail-fast (entitlement requires transactions + row locks) and
|
|
32
32
|
wires the slices; individual `adapters` entries still override field by field.
|
|
33
33
|
|
|
@@ -42,7 +42,7 @@ Options:
|
|
|
42
42
|
|
|
43
43
|
The bundle also ships `planCatalogReadSink` for DB hydration. To use it,
|
|
44
44
|
omit `planCatalog` and pass the identity the database cannot provide:
|
|
45
|
-
`
|
|
45
|
+
`SaaSiCatModule.forRoot({ persistence, dbCatalog: { projectKey,
|
|
46
46
|
currency, vatRate } })` — without `dbCatalog` the module refuses to boot
|
|
47
47
|
(the sink would otherwise load an empty catalog for project key `''`).
|
|
48
48
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f71835e55e071fcd37de83ab4cb24650d83bf9c2d1ee940268333ba636cab8ad
|
package/dist/index.cjs
CHANGED
|
@@ -777,7 +777,7 @@ __name(validDateString, "validDateString");
|
|
|
777
777
|
|
|
778
778
|
// src/prisma-bundle.repository.ts
|
|
779
779
|
var import_common5 = require("@nestjs/common");
|
|
780
|
-
var
|
|
780
|
+
var import_core = require("@saasicat/core");
|
|
781
781
|
|
|
782
782
|
// src/tx.ts
|
|
783
783
|
function resolveClient(client, tx) {
|
|
@@ -1004,7 +1004,7 @@ var PrismaBundleRepository = class {
|
|
|
1004
1004
|
const row = await db.bundleVersion.findFirst({
|
|
1005
1005
|
where: {
|
|
1006
1006
|
bundleId,
|
|
1007
|
-
...(0,
|
|
1007
|
+
...(0, import_core.buildActiveVersionWhere)(asOf)
|
|
1008
1008
|
},
|
|
1009
1009
|
orderBy: [
|
|
1010
1010
|
{
|
|
@@ -2131,7 +2131,7 @@ PrismaMfaAdapter = _ts_decorate9([
|
|
|
2131
2131
|
])
|
|
2132
2132
|
], PrismaMfaAdapter);
|
|
2133
2133
|
|
|
2134
|
-
// src/prisma-plan-catalog-import-sink.ts
|
|
2134
|
+
// src/prisma-plan-catalog-import-sink.adapter.ts
|
|
2135
2135
|
var import_common10 = require("@nestjs/common");
|
|
2136
2136
|
function _ts_decorate10(decorators, target, key, desc) {
|
|
2137
2137
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2285,7 +2285,7 @@ PrismaPlanCatalogImportSink = _ts_decorate10([
|
|
|
2285
2285
|
])
|
|
2286
2286
|
], PrismaPlanCatalogImportSink);
|
|
2287
2287
|
|
|
2288
|
-
// src/prisma-plan-catalog-read-sink.ts
|
|
2288
|
+
// src/prisma-plan-catalog-read-sink.adapter.ts
|
|
2289
2289
|
var import_common11 = require("@nestjs/common");
|
|
2290
2290
|
function _ts_decorate11(decorators, target, key, desc) {
|
|
2291
2291
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2483,7 +2483,7 @@ __name(toFeatureCatalogEntryRow, "toFeatureCatalogEntryRow");
|
|
|
2483
2483
|
|
|
2484
2484
|
// src/prisma-plan.repository.ts
|
|
2485
2485
|
var import_common12 = require("@nestjs/common");
|
|
2486
|
-
var
|
|
2486
|
+
var import_core2 = require("@saasicat/core");
|
|
2487
2487
|
function _ts_decorate12(decorators, target, key, desc) {
|
|
2488
2488
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2489
2489
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2766,9 +2766,9 @@ var PrismaPlanRepository = class {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
const db = this.db(tx);
|
|
2768
2768
|
const storedPlanId = await this.binding.toStoragePlanId(db, planKey);
|
|
2769
|
-
const activeWhere = this.fields.endsAt ? (0,
|
|
2769
|
+
const activeWhere = this.fields.endsAt ? (0, import_core2.buildActivePlanVersionWhere)(asOf, {
|
|
2770
2770
|
withEndsAt: true
|
|
2771
|
-
}) : (0,
|
|
2771
|
+
}) : (0, import_core2.buildActivePlanVersionWhere)(asOf);
|
|
2772
2772
|
const row = await this.versions(db).findFirst({
|
|
2773
2773
|
where: {
|
|
2774
2774
|
planId: storedPlanId,
|
|
@@ -3016,7 +3016,7 @@ __name(toPlanVersionRow2, "toPlanVersionRow");
|
|
|
3016
3016
|
|
|
3017
3017
|
// src/prisma-plan-version.repository.ts
|
|
3018
3018
|
var import_common13 = require("@nestjs/common");
|
|
3019
|
-
var
|
|
3019
|
+
var import_core3 = require("@saasicat/core");
|
|
3020
3020
|
function _ts_decorate13(decorators, target, key, desc) {
|
|
3021
3021
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3022
3022
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3077,9 +3077,9 @@ var PrismaPlanVersionRepository = class {
|
|
|
3077
3077
|
async findActivePlanVersion(planId, asOf, tx) {
|
|
3078
3078
|
const db = this.db(tx);
|
|
3079
3079
|
const storedPlanId = await this.binding.toStoragePlanId(db, planId);
|
|
3080
|
-
const activeWhere = this.fields.endsAt ? (0,
|
|
3080
|
+
const activeWhere = this.fields.endsAt ? (0, import_core3.buildActivePlanVersionWhere)(asOf, {
|
|
3081
3081
|
withEndsAt: true
|
|
3082
|
-
}) : (0,
|
|
3082
|
+
}) : (0, import_core3.buildActivePlanVersionWhere)(asOf);
|
|
3083
3083
|
const row = await this.versions(db).findFirst({
|
|
3084
3084
|
where: {
|
|
3085
3085
|
planId: storedPlanId,
|
|
@@ -3715,7 +3715,7 @@ PrismaPromoCodeValidationLogRepository = _ts_decorate17([
|
|
|
3715
3715
|
])
|
|
3716
3716
|
], PrismaPromoCodeValidationLogRepository);
|
|
3717
3717
|
|
|
3718
|
-
// src/prisma-promo-subscription-lookup.ts
|
|
3718
|
+
// src/prisma-promo-subscription-lookup.adapter.ts
|
|
3719
3719
|
var import_common18 = require("@nestjs/common");
|
|
3720
3720
|
function _ts_decorate18(decorators, target, key, desc) {
|
|
3721
3721
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4526,7 +4526,7 @@ PrismaSubscriptionUsageAdapter = _ts_decorate22([
|
|
|
4526
4526
|
|
|
4527
4527
|
// src/prisma-super-admin-bootstrap.adapter.ts
|
|
4528
4528
|
var import_common23 = require("@nestjs/common");
|
|
4529
|
-
var
|
|
4529
|
+
var import_core4 = require("@saasicat/core");
|
|
4530
4530
|
function _ts_decorate23(decorators, target, key, desc) {
|
|
4531
4531
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4532
4532
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4571,7 +4571,7 @@ var PrismaSuperAdminBootstrapAdapter = class {
|
|
|
4571
4571
|
}
|
|
4572
4572
|
});
|
|
4573
4573
|
if (existing) {
|
|
4574
|
-
throw new
|
|
4574
|
+
throw new import_core4.PlatformUserExistsError(email, existing.platformRole);
|
|
4575
4575
|
}
|
|
4576
4576
|
const row = await this.prisma.superAdminUser.create({
|
|
4577
4577
|
data: {
|
|
@@ -4606,7 +4606,7 @@ PrismaSuperAdminBootstrapAdapter = _ts_decorate23([
|
|
|
4606
4606
|
|
|
4607
4607
|
// src/prisma-tenant-subscription-write.adapter.ts
|
|
4608
4608
|
var import_common24 = require("@nestjs/common");
|
|
4609
|
-
var
|
|
4609
|
+
var import_core5 = require("@saasicat/core");
|
|
4610
4610
|
function _ts_decorate24(decorators, target, key, desc) {
|
|
4611
4611
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4612
4612
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4823,9 +4823,9 @@ var PrismaTenantSubscriptionWriteAdapter = class {
|
|
|
4823
4823
|
}
|
|
4824
4824
|
async findTargetPlanVersionId(client, storagePlanId, asOf) {
|
|
4825
4825
|
const activeWindow = this.schema.tenantSubscription.activeVersionSelection === "validity-window";
|
|
4826
|
-
const activeVersionWhere = this.schema.tenantSubscription.withEndsAt ? (0,
|
|
4826
|
+
const activeVersionWhere = this.schema.tenantSubscription.withEndsAt ? (0, import_core5.buildActivePlanVersionWhere)(asOf, {
|
|
4827
4827
|
withEndsAt: true
|
|
4828
|
-
}) : (0,
|
|
4828
|
+
}) : (0, import_core5.buildActivePlanVersionWhere)(asOf);
|
|
4829
4829
|
const where = activeWindow ? {
|
|
4830
4830
|
planId: storagePlanId,
|
|
4831
4831
|
...activeVersionWhere
|
|
@@ -4913,7 +4913,7 @@ function clearedPendingVersionData() {
|
|
|
4913
4913
|
}
|
|
4914
4914
|
__name(clearedPendingVersionData, "clearedPendingVersionData");
|
|
4915
4915
|
|
|
4916
|
-
// src/prisma-transaction-runner.ts
|
|
4916
|
+
// src/prisma-transaction-runner.adapter.ts
|
|
4917
4917
|
var import_common25 = require("@nestjs/common");
|
|
4918
4918
|
function _ts_decorate25(decorators, target, key, desc) {
|
|
4919
4919
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4954,7 +4954,7 @@ PrismaTransactionRunner = _ts_decorate25([
|
|
|
4954
4954
|
])
|
|
4955
4955
|
], PrismaTransactionRunner);
|
|
4956
4956
|
|
|
4957
|
-
// src/zero-promo-revenue-aggregator.ts
|
|
4957
|
+
// src/zero-promo-revenue-aggregator.adapter.ts
|
|
4958
4958
|
var import_common26 = require("@nestjs/common");
|
|
4959
4959
|
function _ts_decorate26(decorators, target, key, desc) {
|
|
4960
4960
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminTenantStateResult, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, BundleRepository, TransactionContext, BundleVersionRow, BundleListFilter, BundleRow, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, PersistenceInjectionToken, PasswordHasher,
|
|
1
|
+
import { AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminTenantStateResult, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, BundleRepository, TransactionContext, BundleVersionRow, BundleListFilter, BundleRow, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, SubscriptionUsagePort, SubscriptionUsageRecord, SubscriptionBundleRepository, SubscriptionBundleRecord, CreateSubscriptionBundleData, CancelSubscriptionBundleData, TenantSubscriptionWritePort, ApplyOnboardingSelectionInput, RedeemPromoInTransactionCallback, ApplyOnboardingSelectionResult, ImmediatePlanChangeInput, ScheduledPlanChangeInput, PlanVersionRepository, PlanVersionRecord, PromoCodeRepository, PromoCodeRecord, PromoCodeFilter, CreatePromoCodeData, UpdatePromoCodeData, PromoCodeRedemptionRepository, PromoCodeRedemptionRecord, PromoCodeRedemptionStatus, PromoCodeRedemptionListItem, PromoCodeValidationLogRepository, PromoSubscriptionLookup, BillingCycle, PromoRevenueDeductionAggregator, SuperAdminProvisioningPort, CreateSuperAdminCliInput, PlatformUserDto, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, UpsertPlanInput, UpsertResult, UpsertPlanVersionInput, UpsertFeatureCatalogEntryInput, PlanRepository, PlanListFilter, PlanRow, CreatePlanData, UpdatePlanData, PlanVersionRow, CreatePlanVersionDraftData, UpdatePlanVersionDraftData, CatalogEntryRepository, CatalogEntryFilter, CapabilityCatalogEntryRow, FeatureCatalogEntryRow, QuotaCatalogEntryRow, UpsertCapabilityEntryData, UpsertFeatureEntryData, UpsertQuotaEntryData, SetCatalogEntryReviewData, CatalogEntryI18n, UpdateCatalogEntryBaseData, MarketingProjectionRepository, MarketingProjectionFilter, MarketingProjectionRow, CreateMarketingProjectionData, UpdateMarketingProjectionData, MarketingSettingsRepository, MarketingSettingsRow, UpdateMarketingSettingsData, PromotionRepository, PromotionFilter, PromotionRow, CreatePromotionData, UpdatePromotionData, SubscriptionContractRepository, SubscriptionContractFilter, SubscriptionContractRecord, CreateSubscriptionContractData, TerminateSubscriptionContractData } from '@saasicat/core';
|
|
2
2
|
|
|
3
3
|
declare const PRISMA_CLIENT_TOKEN: unique symbol;
|
|
4
4
|
/** Prisma `Decimal` values arrive as objects with `toString()`; tests may use plain values. */
|
|
@@ -954,11 +954,11 @@ interface PrismaPersistenceOptions {
|
|
|
954
954
|
bundle?: PrismaBundleRepositoryOptions;
|
|
955
955
|
}
|
|
956
956
|
/**
|
|
957
|
-
* Builds the `
|
|
957
|
+
* Builds the `SaaSiCatPersistenceAdapter` bundle for Prisma + PostgreSQL on
|
|
958
958
|
* the canonical schema (`@saasicat/spec` prisma-fragments):
|
|
959
959
|
*
|
|
960
960
|
* ```ts
|
|
961
|
-
*
|
|
961
|
+
* SaaSiCatModule.forRoot({
|
|
962
962
|
* persistence: prismaPersistence({ client: PrismaService }),
|
|
963
963
|
* // ...
|
|
964
964
|
* });
|
|
@@ -968,7 +968,7 @@ interface PrismaPersistenceOptions {
|
|
|
968
968
|
* tenant-billing, promo and plan-catalog persistence. App-specific behavior
|
|
969
969
|
* such as quota counters and authentication remains in the consumer.
|
|
970
970
|
*/
|
|
971
|
-
declare function prismaPersistence(options: PrismaPersistenceOptions):
|
|
971
|
+
declare function prismaPersistence(options: PrismaPersistenceOptions): SaaSiCatPersistenceAdapter;
|
|
972
972
|
|
|
973
973
|
/**
|
|
974
974
|
* `TransactionRunner` over `prisma.$transaction`. The interactive transaction
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminTenantStateResult, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, BundleRepository, TransactionContext, BundleVersionRow, BundleListFilter, BundleRow, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, PersistenceInjectionToken, PasswordHasher,
|
|
1
|
+
import { AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminTenantStateResult, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, BundleRepository, TransactionContext, BundleVersionRow, BundleListFilter, BundleRow, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, SubscriptionUsagePort, SubscriptionUsageRecord, SubscriptionBundleRepository, SubscriptionBundleRecord, CreateSubscriptionBundleData, CancelSubscriptionBundleData, TenantSubscriptionWritePort, ApplyOnboardingSelectionInput, RedeemPromoInTransactionCallback, ApplyOnboardingSelectionResult, ImmediatePlanChangeInput, ScheduledPlanChangeInput, PlanVersionRepository, PlanVersionRecord, PromoCodeRepository, PromoCodeRecord, PromoCodeFilter, CreatePromoCodeData, UpdatePromoCodeData, PromoCodeRedemptionRepository, PromoCodeRedemptionRecord, PromoCodeRedemptionStatus, PromoCodeRedemptionListItem, PromoCodeValidationLogRepository, PromoSubscriptionLookup, BillingCycle, PromoRevenueDeductionAggregator, SuperAdminProvisioningPort, CreateSuperAdminCliInput, PlatformUserDto, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, UpsertPlanInput, UpsertResult, UpsertPlanVersionInput, UpsertFeatureCatalogEntryInput, PlanRepository, PlanListFilter, PlanRow, CreatePlanData, UpdatePlanData, PlanVersionRow, CreatePlanVersionDraftData, UpdatePlanVersionDraftData, CatalogEntryRepository, CatalogEntryFilter, CapabilityCatalogEntryRow, FeatureCatalogEntryRow, QuotaCatalogEntryRow, UpsertCapabilityEntryData, UpsertFeatureEntryData, UpsertQuotaEntryData, SetCatalogEntryReviewData, CatalogEntryI18n, UpdateCatalogEntryBaseData, MarketingProjectionRepository, MarketingProjectionFilter, MarketingProjectionRow, CreateMarketingProjectionData, UpdateMarketingProjectionData, MarketingSettingsRepository, MarketingSettingsRow, UpdateMarketingSettingsData, PromotionRepository, PromotionFilter, PromotionRow, CreatePromotionData, UpdatePromotionData, SubscriptionContractRepository, SubscriptionContractFilter, SubscriptionContractRecord, CreateSubscriptionContractData, TerminateSubscriptionContractData } from '@saasicat/core';
|
|
2
2
|
|
|
3
3
|
declare const PRISMA_CLIENT_TOKEN: unique symbol;
|
|
4
4
|
/** Prisma `Decimal` values arrive as objects with `toString()`; tests may use plain values. */
|
|
@@ -954,11 +954,11 @@ interface PrismaPersistenceOptions {
|
|
|
954
954
|
bundle?: PrismaBundleRepositoryOptions;
|
|
955
955
|
}
|
|
956
956
|
/**
|
|
957
|
-
* Builds the `
|
|
957
|
+
* Builds the `SaaSiCatPersistenceAdapter` bundle for Prisma + PostgreSQL on
|
|
958
958
|
* the canonical schema (`@saasicat/spec` prisma-fragments):
|
|
959
959
|
*
|
|
960
960
|
* ```ts
|
|
961
|
-
*
|
|
961
|
+
* SaaSiCatModule.forRoot({
|
|
962
962
|
* persistence: prismaPersistence({ client: PrismaService }),
|
|
963
963
|
* // ...
|
|
964
964
|
* });
|
|
@@ -968,7 +968,7 @@ interface PrismaPersistenceOptions {
|
|
|
968
968
|
* tenant-billing, promo and plan-catalog persistence. App-specific behavior
|
|
969
969
|
* such as quota counters and authentication remains in the consumer.
|
|
970
970
|
*/
|
|
971
|
-
declare function prismaPersistence(options: PrismaPersistenceOptions):
|
|
971
|
+
declare function prismaPersistence(options: PrismaPersistenceOptions): SaaSiCatPersistenceAdapter;
|
|
972
972
|
|
|
973
973
|
/**
|
|
974
974
|
* `TransactionRunner` over `prisma.$transaction`. The interactive transaction
|
package/dist/index.js
CHANGED
|
@@ -716,7 +716,7 @@ __name(validDateString, "validDateString");
|
|
|
716
716
|
|
|
717
717
|
// src/prisma-bundle.repository.ts
|
|
718
718
|
import { Inject as Inject4, Injectable as Injectable5, Optional } from "@nestjs/common";
|
|
719
|
-
import { buildActiveVersionWhere } from "@saasicat/
|
|
719
|
+
import { buildActiveVersionWhere } from "@saasicat/core";
|
|
720
720
|
|
|
721
721
|
// src/tx.ts
|
|
722
722
|
function resolveClient(client, tx) {
|
|
@@ -2070,7 +2070,7 @@ PrismaMfaAdapter = _ts_decorate9([
|
|
|
2070
2070
|
])
|
|
2071
2071
|
], PrismaMfaAdapter);
|
|
2072
2072
|
|
|
2073
|
-
// src/prisma-plan-catalog-import-sink.ts
|
|
2073
|
+
// src/prisma-plan-catalog-import-sink.adapter.ts
|
|
2074
2074
|
import { Inject as Inject9, Injectable as Injectable10, Optional as Optional2 } from "@nestjs/common";
|
|
2075
2075
|
function _ts_decorate10(decorators, target, key, desc) {
|
|
2076
2076
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2224,7 +2224,7 @@ PrismaPlanCatalogImportSink = _ts_decorate10([
|
|
|
2224
2224
|
])
|
|
2225
2225
|
], PrismaPlanCatalogImportSink);
|
|
2226
2226
|
|
|
2227
|
-
// src/prisma-plan-catalog-read-sink.ts
|
|
2227
|
+
// src/prisma-plan-catalog-read-sink.adapter.ts
|
|
2228
2228
|
import { Inject as Inject10, Injectable as Injectable11, Optional as Optional3 } from "@nestjs/common";
|
|
2229
2229
|
function _ts_decorate11(decorators, target, key, desc) {
|
|
2230
2230
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2422,7 +2422,7 @@ __name(toFeatureCatalogEntryRow, "toFeatureCatalogEntryRow");
|
|
|
2422
2422
|
|
|
2423
2423
|
// src/prisma-plan.repository.ts
|
|
2424
2424
|
import { Inject as Inject11, Injectable as Injectable12, Optional as Optional4 } from "@nestjs/common";
|
|
2425
|
-
import { buildActivePlanVersionWhere } from "@saasicat/
|
|
2425
|
+
import { buildActivePlanVersionWhere } from "@saasicat/core";
|
|
2426
2426
|
function _ts_decorate12(decorators, target, key, desc) {
|
|
2427
2427
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2428
2428
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2955,7 +2955,7 @@ __name(toPlanVersionRow2, "toPlanVersionRow");
|
|
|
2955
2955
|
|
|
2956
2956
|
// src/prisma-plan-version.repository.ts
|
|
2957
2957
|
import { Inject as Inject12, Injectable as Injectable13, Optional as Optional5 } from "@nestjs/common";
|
|
2958
|
-
import { buildActivePlanVersionWhere as buildActivePlanVersionWhere2 } from "@saasicat/
|
|
2958
|
+
import { buildActivePlanVersionWhere as buildActivePlanVersionWhere2 } from "@saasicat/core";
|
|
2959
2959
|
function _ts_decorate13(decorators, target, key, desc) {
|
|
2960
2960
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2961
2961
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3654,7 +3654,7 @@ PrismaPromoCodeValidationLogRepository = _ts_decorate17([
|
|
|
3654
3654
|
])
|
|
3655
3655
|
], PrismaPromoCodeValidationLogRepository);
|
|
3656
3656
|
|
|
3657
|
-
// src/prisma-promo-subscription-lookup.ts
|
|
3657
|
+
// src/prisma-promo-subscription-lookup.adapter.ts
|
|
3658
3658
|
import { Inject as Inject17, Injectable as Injectable18 } from "@nestjs/common";
|
|
3659
3659
|
function _ts_decorate18(decorators, target, key, desc) {
|
|
3660
3660
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4465,7 +4465,7 @@ PrismaSubscriptionUsageAdapter = _ts_decorate22([
|
|
|
4465
4465
|
|
|
4466
4466
|
// src/prisma-super-admin-bootstrap.adapter.ts
|
|
4467
4467
|
import { Inject as Inject22, Injectable as Injectable23 } from "@nestjs/common";
|
|
4468
|
-
import { PlatformUserExistsError } from "@saasicat/
|
|
4468
|
+
import { PlatformUserExistsError } from "@saasicat/core";
|
|
4469
4469
|
function _ts_decorate23(decorators, target, key, desc) {
|
|
4470
4470
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4471
4471
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4545,7 +4545,7 @@ PrismaSuperAdminBootstrapAdapter = _ts_decorate23([
|
|
|
4545
4545
|
|
|
4546
4546
|
// src/prisma-tenant-subscription-write.adapter.ts
|
|
4547
4547
|
import { Inject as Inject23, Injectable as Injectable24, Optional as Optional8 } from "@nestjs/common";
|
|
4548
|
-
import { buildActivePlanVersionWhere as buildActivePlanVersionWhere3 } from "@saasicat/
|
|
4548
|
+
import { buildActivePlanVersionWhere as buildActivePlanVersionWhere3 } from "@saasicat/core";
|
|
4549
4549
|
function _ts_decorate24(decorators, target, key, desc) {
|
|
4550
4550
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4551
4551
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4852,7 +4852,7 @@ function clearedPendingVersionData() {
|
|
|
4852
4852
|
}
|
|
4853
4853
|
__name(clearedPendingVersionData, "clearedPendingVersionData");
|
|
4854
4854
|
|
|
4855
|
-
// src/prisma-transaction-runner.ts
|
|
4855
|
+
// src/prisma-transaction-runner.adapter.ts
|
|
4856
4856
|
import { Inject as Inject24, Injectable as Injectable25 } from "@nestjs/common";
|
|
4857
4857
|
function _ts_decorate25(decorators, target, key, desc) {
|
|
4858
4858
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4893,7 +4893,7 @@ PrismaTransactionRunner = _ts_decorate25([
|
|
|
4893
4893
|
])
|
|
4894
4894
|
], PrismaTransactionRunner);
|
|
4895
4895
|
|
|
4896
|
-
// src/zero-promo-revenue-aggregator.ts
|
|
4896
|
+
// src/zero-promo-revenue-aggregator.adapter.ts
|
|
4897
4897
|
import { Injectable as Injectable26 } from "@nestjs/common";
|
|
4898
4898
|
function _ts_decorate26(decorators, target, key, desc) {
|
|
4899
4899
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasicat/adapter-prisma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "Prisma + PostgreSQL persistence for SaaSiCat: one standard bundle for core, catalog, entitlement, tenant billing, Admin resources and promo, plus individual adapters for custom compositions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@saasicat/
|
|
25
|
+
"@saasicat/core": "^1.0.0-rc.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@nestjs/common": "^11.0.0"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@prisma/client": "^6.19.0",
|
|
35
35
|
"tsup": "^8.0.0",
|
|
36
36
|
"typescript": "^6.0.0",
|
|
37
|
-
"@saasicat/persistence-testing": "^0.
|
|
38
|
-
"@saasicat/spec": "^0.
|
|
37
|
+
"@saasicat/persistence-testing": "^1.0.0-rc.1",
|
|
38
|
+
"@saasicat/spec": "^1.0.0-rc.1"
|
|
39
39
|
},
|
|
40
40
|
"license": "PolyForm-Shield-1.0.0",
|
|
41
41
|
"author": "Taci Uelker",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
45
45
|
"url": "https://github.com/uelker70/saasicat.git",
|
|
46
|
-
"directory": "packages/
|
|
46
|
+
"directory": "packages/adapter-prisma"
|
|
47
47
|
},
|
|
48
48
|
"bugs": {
|
|
49
49
|
"url": "https://github.com/uelker70/saasicat/issues"
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "node ../../scripts/build-and-prune.mjs \"tsup src/index.ts --format esm,cjs --dts --external @saasicat/
|
|
55
|
+
"build": "node ../../scripts/build-and-prune.mjs \"tsup src/index.ts --format esm,cjs --dts --external @saasicat/core --external @nestjs/common\"",
|
|
56
56
|
"pretest": "pnpm run build",
|
|
57
|
-
"test": "node --test tests
|
|
58
|
-
"test:integration": "node --test tests
|
|
57
|
+
"test": "node --test 'tests/*.test.js'",
|
|
58
|
+
"test:integration": "node --test 'tests/integration/*.test.js'"
|
|
59
59
|
}
|
|
60
60
|
}
|