@happyvertical/smrt-tenancy 0.51.33 → 0.51.35

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/index.js CHANGED
@@ -3,7 +3,7 @@ import { n as createExpressMiddleware, r as createCliContext, t as createSvelteK
3
3
  import { S as unregisterTenantScopedClass, _ as getAllTenantScopedClasses, a as setupTestTenancy, b as registerTenantScopedClass, c as disableTenancy, d as queryGlobal, f as queryWithGlobals, g as clearTenantScopedRegistry, h as isTenancyEnabled, i as resetTenancy, l as enableTenancy, m as runTenantScopedEntryPoint, n as assertTenantIsolationViolation, o as testTenantIsolation, p as withTenantGlobalRead, r as createTestTenantContext, s as createTenantInterceptor, t as assertTenantContextRequired, u as assertTenantReadAllowed, v as getTenantScopedConfig, x as registerTenantScopedConstructor, y as isTenantScopedClass } from "./chunks/testing-s12-pjzJ.js";
4
4
  import { ObjectRegistry, SmrtCollection, SmrtObject, applyPendingDecoratorRegistrations, crossPackageRef, field, isEmbeddedDatabase, isPostgresDatabase, registerCompatibleFieldDecorator, smrt, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
5
5
  //#region src/__smrt-register__.ts
6
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tenancy\",\"packageVersion\":\"0.51.33\",\"objects\":{\"@happyvertical/smrt-tenancy:BillingRelationship\":{\"name\":\"billingrelationship\",\"className\":\"BillingRelationship\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationship\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{\"childTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"resellerTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"billingOwnerMode\":{\"type\":\"text\",\"required\":false,\"default\":\"self\"}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"conflictColumns\":[\"child_tenant_id\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"BillingRelationship\",\"collectionExportName\":\"BillingRelationshipCollection\",\"validationRules\":[{\"field\":\"childTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"resellerTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"}],\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"},\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\":{\"name\":\"billingrelationshipcollection\",\"className\":\"BillingRelationshipCollection\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"BillingRelationship\",\"exportName\":\"BillingRelationshipCollection\",\"collectionExportName\":\"BillingRelationshipCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\"]}"));
6
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tenancy\",\"packageVersion\":\"0.51.35\",\"objects\":{\"@happyvertical/smrt-tenancy:BillingRelationship\":{\"name\":\"billingrelationship\",\"className\":\"BillingRelationship\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationship\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{\"childTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"resellerTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"billingOwnerMode\":{\"type\":\"text\",\"required\":false,\"default\":\"self\"}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"conflictColumns\":[\"child_tenant_id\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"BillingRelationship\",\"collectionExportName\":\"BillingRelationshipCollection\",\"validationRules\":[{\"field\":\"childTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"resellerTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"}],\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"},\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\":{\"name\":\"billingrelationshipcollection\",\"className\":\"BillingRelationshipCollection\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"BillingRelationship\",\"exportName\":\"BillingRelationshipCollection\",\"collectionExportName\":\"BillingRelationshipCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\"]}"));
7
7
  //#endregion
8
8
  //#region src/billing-relationship.ts
9
9
  var __defProp = Object.defineProperty;
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-tenancy",
5
- "packageVersion": "0.51.33",
5
+ "packageVersion": "0.51.35",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-tenancy:BillingRelationship": {
8
8
  "name": "billingrelationship",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-tenancy",
6
- "packageVersion": "0.51.33",
6
+ "packageVersion": "0.51.35",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "ac7c5c8df2bd76523e33241d7f4d6c0601531c80627181cdf9e28cbc496aebcf",
11
- "packageJson": "323b6a7f53dd497888818e5e04fe17fa3f6cfe40444af722925976e846364824",
10
+ "manifest": "2fbfc00f1cb2c93d21c9190393f2f6317ed24d0aada830771810254dc2e8736f",
11
+ "packageJson": "32a3cbef487c6ae948ea66fb7dfaf27565b2c298beacfd5a53206af407ede8f2",
12
12
  "agents": "7aaa00d7fb58fd1d31bafcbeeea9aace247a00c1332ad943e101023617b9aa93"
13
13
  },
14
14
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-tenancy",
3
- "version": "0.51.33",
3
+ "version": "0.51.35",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Production-ready multi-tenancy framework for SMRT with automatic tenant isolation and enforcement",
6
6
  "type": "module",
@@ -43,9 +43,9 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@happyvertical/logger": "^0.94.1",
46
- "@happyvertical/smrt-core": "0.51.33",
47
- "@happyvertical/smrt-types": "0.51.33",
48
- "@happyvertical/smrt-ui": "0.51.33",
46
+ "@happyvertical/smrt-core": "0.51.35",
47
+ "@happyvertical/smrt-types": "0.51.35",
48
+ "@happyvertical/smrt-ui": "0.51.35",
49
49
  "@happyvertical/sql": "^0.94.1",
50
50
  "@happyvertical/utils": "^0.94.1"
51
51
  },
@@ -58,7 +58,7 @@
58
58
  }
59
59
  },
60
60
  "devDependencies": {
61
- "@happyvertical/smrt-vitest": "0.51.33",
61
+ "@happyvertical/smrt-vitest": "0.51.35",
62
62
  "@sveltejs/package": "^2.5.8",
63
63
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
64
64
  "@types/node": "24.13.6",