@saasicat/adapter-drizzle 1.0.0-rc.0 → 1.0.0-rc.2

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/.build-stamp CHANGED
@@ -1 +1 @@
1
- 6f4798c30619ad25cdb9589cc07964be17170c6fe31ef5c97816e26eff18a34c
1
+ 4db6796a545521dbce56c1203f80c007e1230464feec78da79647c7136a993f1
package/dist/index.cjs CHANGED
@@ -1309,7 +1309,7 @@ DrizzleSubscriptionRepository = _ts_decorate13([
1309
1309
  var import_node_crypto6 = require("node:crypto");
1310
1310
  var import_common14 = require("@nestjs/common");
1311
1311
  var import_drizzle_orm12 = require("drizzle-orm");
1312
- var import_types = require("@saasicat/types");
1312
+ var import_core = require("@saasicat/core");
1313
1313
  function _ts_decorate14(decorators, target, key, desc4) {
1314
1314
  var c = arguments.length, r = c < 3 ? target : desc4 === null ? desc4 = Object.getOwnPropertyDescriptor(target, key) : desc4, d;
1315
1315
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc4);
@@ -1348,7 +1348,7 @@ var DrizzleSuperAdminBootstrapAdapter = class {
1348
1348
  const email = input.email.trim().toLowerCase();
1349
1349
  const existing = await this.db.select().from(superAdminUsers).where((0, import_drizzle_orm12.eq)(superAdminUsers.email, email)).limit(1);
1350
1350
  if (existing[0]) {
1351
- throw new import_types.PlatformUserExistsError(email, existing[0].platformRole);
1351
+ throw new import_core.PlatformUserExistsError(email, existing[0].platformRole);
1352
1352
  }
1353
1353
  const rows = await this.db.insert(superAdminUsers).values({
1354
1354
  id: (0, import_node_crypto6.randomUUID)(),
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
2
  import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
3
- import { PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, TransactionContext, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditEntry, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, 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 } from '@saasicat/types';
3
+ import { PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, TransactionContext, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditEntry, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, 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 } from '@saasicat/core';
4
4
  import * as drizzle_orm from 'drizzle-orm';
5
5
 
6
6
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
2
  import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
3
- import { PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, TransactionContext, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditEntry, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, 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 } from '@saasicat/types';
3
+ import { PersistenceInjectionToken, PasswordHasher, SaaSiCatPersistenceAdapter, TransactionRunner, TransactionContext, MfaPort, AuditPort, AdminActor, AuditQueryPort, AuditQuery, AuditEntry, AuditStatsPort, RlsBypassPort, SubscriptionRepository, SubscriptionRecord, 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 } from '@saasicat/core';
4
4
  import * as drizzle_orm from 'drizzle-orm';
5
5
 
6
6
  /**
package/dist/index.js CHANGED
@@ -1269,7 +1269,7 @@ DrizzleSubscriptionRepository = _ts_decorate13([
1269
1269
  import { randomUUID as randomUUID6 } from "node:crypto";
1270
1270
  import { Inject as Inject13, Injectable as Injectable14 } from "@nestjs/common";
1271
1271
  import { and as and8, count as count2, eq as eq11, isNull as isNull5 } from "drizzle-orm";
1272
- import { PlatformUserExistsError } from "@saasicat/types";
1272
+ import { PlatformUserExistsError } from "@saasicat/core";
1273
1273
  function _ts_decorate14(decorators, target, key, desc4) {
1274
1274
  var c = arguments.length, r = c < 3 ? target : desc4 === null ? desc4 = Object.getOwnPropertyDescriptor(target, key) : desc4, d;
1275
1275
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasicat/adapter-drizzle",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
4
4
  "description": "Drizzle + PostgreSQL persistence adapter for SaaSiCat: drizzlePersistence() bundle plus the individual adapters (MFA, audit, RLS bypass, transaction runner, subscription/plan-version/promo repositories, SuperAdmin bootstrap, plan-catalog sinks). Targets the canonical schema from @saasicat/spec and passes the same executable persistence contract as @saasicat/adapter-prisma.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -16,13 +16,14 @@
16
16
  "types": "./dist/index.d.cts",
17
17
  "default": "./dist/index.cjs"
18
18
  }
19
- }
19
+ },
20
+ "./package.json": "./package.json"
20
21
  },
21
22
  "files": [
22
23
  "dist"
23
24
  ],
24
25
  "dependencies": {
25
- "@saasicat/types": "^1.0.0-rc.0"
26
+ "@saasicat/core": "^1.0.0-rc.2"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "@nestjs/common": "^11.0.0",
@@ -36,8 +37,8 @@
36
37
  "pg": "^8.22.0",
37
38
  "tsup": "^8.0.0",
38
39
  "typescript": "^6.0.0",
39
- "@saasicat/persistence-testing": "^1.0.0-rc.0",
40
- "@saasicat/spec": "^1.0.0-rc.0"
40
+ "@saasicat/persistence-testing": "^1.0.0-rc.2",
41
+ "@saasicat/spec": "^1.0.0-rc.2"
41
42
  },
42
43
  "license": "PolyForm-Shield-1.0.0",
43
44
  "author": "Taci Uelker",