@happyvertical/smrt-cli 0.51.20 → 0.51.23

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 (31) hide show
  1. package/dist/{ApiKey-BZmbOTnL-BIvnSjRj.js → ApiKey-BZmbOTnL-Bo7tbG1k.js} +2 -2
  2. package/dist/ApiKeyCollection-Bfb_nw81-CNAaLULe.js +2 -0
  3. package/dist/AuditLogCollection-B1YonCAP-yweHrz14.js +2 -0
  4. package/dist/{NostrIdentity-n70E0vck-Cq28zw7D.js → NostrIdentity-n70E0vck-G4M4P2GW.js} +3 -3
  5. package/dist/NostrIdentityCollection-Ca74dkaL-aM_-cerc.js +2 -0
  6. package/dist/{OidcIdentity-K8V4u0CR-LRmOMm9i.js → OidcIdentity-K8V4u0CR-D3Zc7yju.js} +2 -2
  7. package/dist/OidcIdentityCollection-gnrLoF08-B5y4FHI0.js +2 -0
  8. package/dist/ProfileAssetCollection-CmbeSgDi-mMSqxPLS.js +2 -0
  9. package/dist/{ProfileCollection-DTT4KNpQ-OBklhN98.js → ProfileCollection-DTT4KNpQ-CFn9nEde.js} +26 -26
  10. package/dist/ProfileMetadataCollection-DxX_BJKV-CXKXBRtU.js +2 -0
  11. package/dist/{ProfileMetafieldCollection-CMKhVi2I-qw3Gl-7E.js → ProfileMetafieldCollection-CMKhVi2I-NPA4NfPL.js} +1 -1
  12. package/dist/{ProfileRelationshipCollection-DUVgaIqf-CYnAId96.js → ProfileRelationshipCollection-DUVgaIqf-BlH89282.js} +1 -1
  13. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-BQyMdaYF.js → ProfileRelationshipTermCollection-DtA9OM23-D3KSY2OS.js} +1 -1
  14. package/dist/{ProfileRelationshipType-BRiRka6t-DIljqfEA.js → ProfileRelationshipType-BRiRka6t-sguU4oDf.js} +1 -1
  15. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-Bx8AnJOa.js → ProfileRelationshipTypeCollection-BdXwd7Kf-DGHj5NYL.js} +1 -1
  16. package/dist/{commands-BBLHcS41.js → commands-CdijcyQl.js} +1 -1
  17. package/dist/dist-B5ngi39H.js +190 -0
  18. package/dist/{dist-BL5DhnWT.js → dist-Cm7M-US-.js} +25 -25
  19. package/dist/{dist-BH0apqW8.js → dist-DPN8zVvb.js} +3 -3
  20. package/dist/index.js +9 -9
  21. package/dist/{oidcProvisioningPrimitives-0-3n3D6f-CEgIXlBy.js → oidcProvisioningPrimitives-0-3n3D6f-2uN0TAcP.js} +4 -4
  22. package/dist/resolveIdentity-BrJDCjYi-CX_TCtNl.js +2 -0
  23. package/package.json +13 -13
  24. package/dist/ApiKeyCollection-Bfb_nw81-CAl7USFN.js +0 -2
  25. package/dist/AuditLogCollection-B1YonCAP-DscU6DN4.js +0 -2
  26. package/dist/NostrIdentityCollection-Ca74dkaL-DEseqWTi.js +0 -2
  27. package/dist/OidcIdentityCollection-gnrLoF08-BSbv11sq.js +0 -2
  28. package/dist/ProfileAssetCollection-CmbeSgDi-aMlnn2nP.js +0 -2
  29. package/dist/ProfileMetadataCollection-DxX_BJKV-OOAUyUMU.js +0 -2
  30. package/dist/dist-DGts1h68.js +0 -142
  31. package/dist/resolveIdentity-BrJDCjYi-CNsh25JL.js +0 -2
package/dist/index.js CHANGED
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
49
49
  var _workbenchCommands = null;
50
50
  async function getGnodeCommands() {
51
51
  if (!_gnodeCommands) {
52
- const { gnodeCommands } = await import("./commands-BBLHcS41.js");
52
+ const { gnodeCommands } = await import("./commands-CdijcyQl.js");
53
53
  _gnodeCommands = gnodeCommands;
54
54
  }
55
55
  return _gnodeCommands;
56
56
  }
57
57
  async function getGitCommands() {
58
58
  if (!_gitCommands) {
59
- const { gitCommands } = await import("./commands-BBLHcS41.js");
59
+ const { gitCommands } = await import("./commands-CdijcyQl.js");
60
60
  _gitCommands = gitCommands;
61
61
  }
62
62
  return _gitCommands;
63
63
  }
64
64
  async function getGenerateCommands() {
65
65
  if (!_generateCommands) {
66
- const { generateCommands } = await import("./commands-BBLHcS41.js");
66
+ const { generateCommands } = await import("./commands-CdijcyQl.js");
67
67
  _generateCommands = generateCommands;
68
68
  }
69
69
  return _generateCommands;
70
70
  }
71
71
  async function getInitCommands() {
72
72
  if (!_initCommands) {
73
- const { initCommands } = await import("./commands-BBLHcS41.js");
73
+ const { initCommands } = await import("./commands-CdijcyQl.js");
74
74
  _initCommands = initCommands;
75
75
  }
76
76
  return _initCommands;
77
77
  }
78
78
  async function getUtilityCommands() {
79
79
  if (!_utilityCommands) {
80
- const { utilityCommands } = await import("./commands-BBLHcS41.js");
80
+ const { utilityCommands } = await import("./commands-CdijcyQl.js");
81
81
  _utilityCommands = utilityCommands;
82
82
  }
83
83
  return _utilityCommands;
84
84
  }
85
85
  async function getDispatchCommands() {
86
86
  if (!_dispatchCommands) {
87
- const { dispatchCommands } = await import("./commands-BBLHcS41.js");
87
+ const { dispatchCommands } = await import("./commands-CdijcyQl.js");
88
88
  _dispatchCommands = dispatchCommands;
89
89
  }
90
90
  return _dispatchCommands;
91
91
  }
92
92
  async function getDocsCommands() {
93
93
  if (!_docsCommands) {
94
- const { docsCommands } = await import("./commands-BBLHcS41.js");
94
+ const { docsCommands } = await import("./commands-CdijcyQl.js");
95
95
  _docsCommands = docsCommands;
96
96
  }
97
97
  return _docsCommands;
98
98
  }
99
99
  async function getPlaygroundCommands() {
100
100
  if (!_playgroundCommands) {
101
- const { playgroundCommands } = await import("./commands-BBLHcS41.js");
101
+ const { playgroundCommands } = await import("./commands-CdijcyQl.js");
102
102
  _playgroundCommands = playgroundCommands;
103
103
  }
104
104
  return _playgroundCommands;
105
105
  }
106
106
  async function getWorkbenchCommands() {
107
107
  if (!_workbenchCommands) {
108
- const { workbenchCommands } = await import("./commands-BBLHcS41.js");
108
+ const { workbenchCommands } = await import("./commands-CdijcyQl.js");
109
109
  _workbenchCommands = workbenchCommands;
110
110
  }
111
111
  return _workbenchCommands;
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Cq28zw7D.js";
3
- import { o as isSystemContext } from "./dist-DGts1h68.js";
4
- import { t as OidcIdentity } from "./OidcIdentity-K8V4u0CR-LRmOMm9i.js";
5
- import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DTT4KNpQ-OBklhN98.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-G4M4P2GW.js";
3
+ import { o as isSystemContext } from "./dist-B5ngi39H.js";
4
+ import { t as OidcIdentity } from "./OidcIdentity-K8V4u0CR-D3Zc7yju.js";
5
+ import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DTT4KNpQ-CFn9nEde.js";
6
6
  import { SmrtCollection, smrt } from "@happyvertical/smrt-core";
7
7
  //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-0-3n3D6f.js
8
8
  var oidcProvisioningPrimitives_0_3n3D6f_exports = /* @__PURE__ */ __exportAll({
@@ -0,0 +1,2 @@
1
+ import { i as resolveIdentity_exports } from "./dist-Cm7M-US-.js";
2
+ export { resolveIdentity_exports as i };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.51.20",
3
+ "version": "0.51.23",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,18 +25,18 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@happyvertical/ai": "^0.89.12",
29
- "@happyvertical/files": "^0.89.12",
30
- "@happyvertical/logger": "^0.89.12",
31
- "@happyvertical/smrt-agents": "0.51.20",
32
- "@happyvertical/smrt-config": "0.51.20",
33
- "@happyvertical/smrt-core": "0.51.20",
34
- "@happyvertical/smrt-dev-mcp": "0.51.20",
35
- "@happyvertical/smrt-playground": "0.51.20",
36
- "@happyvertical/smrt-types": "0.51.20",
37
- "@happyvertical/smrt-users": "0.51.20",
38
- "@happyvertical/sql": "^0.89.12",
39
- "@happyvertical/utils": "^0.89.12",
28
+ "@happyvertical/ai": "^0.90.0",
29
+ "@happyvertical/files": "^0.90.0",
30
+ "@happyvertical/logger": "^0.90.0",
31
+ "@happyvertical/smrt-agents": "0.51.23",
32
+ "@happyvertical/smrt-config": "0.51.23",
33
+ "@happyvertical/smrt-core": "0.51.23",
34
+ "@happyvertical/smrt-dev-mcp": "0.51.23",
35
+ "@happyvertical/smrt-playground": "0.51.23",
36
+ "@happyvertical/smrt-types": "0.51.23",
37
+ "@happyvertical/smrt-users": "0.51.23",
38
+ "@happyvertical/sql": "^0.90.0",
39
+ "@happyvertical/utils": "^0.90.0",
40
40
  "acorn": "^8.18.0",
41
41
  "fast-glob": "3.3.3",
42
42
  "tar": "^7.5.22"
@@ -1,2 +0,0 @@
1
- import { j as ApiKeyCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { ApiKeyCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { k as AuditLogCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { AuditLogCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { E as NostrIdentityCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { NostrIdentityCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { w as OidcIdentityCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { OidcIdentityCollection_exports as r };
@@ -1,2 +0,0 @@
1
- import { x as ProfileAssetCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { ProfileAssetCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { v as ProfileMetadataCollection_exports } from "./dist-BL5DhnWT.js";
2
- export { ProfileMetadataCollection_exports as n };
@@ -1,142 +0,0 @@
1
- import { ObjectRegistry, applyPendingDecoratorRegistrations, registerCompatibleFieldDecorator } from "@happyvertical/smrt-core";
2
- import { createLogger } from "@happyvertical/logger";
3
- import { AsyncLocalStorage } from "node:async_hooks";
4
- //#region ../tenancy/dist/chunks/context-CwbLwyIV.js
5
- var SYSTEM_CONTEXT_MARKER = /* @__PURE__ */ Symbol.for("smrt:system-context");
6
- var TENANT_STORAGE_KEY = /* @__PURE__ */ Symbol.for("smrt:tenant-context-storage");
7
- function resolveTenantStorage() {
8
- const root = globalThis;
9
- root[TENANT_STORAGE_KEY] ??= new AsyncLocalStorage();
10
- return root[TENANT_STORAGE_KEY];
11
- }
12
- var tenantStorage = resolveTenantStorage();
13
- function getCurrentTenant() {
14
- const store = tenantStorage.getStore();
15
- if (store === SYSTEM_CONTEXT_MARKER) return;
16
- return store;
17
- }
18
- function getTenantId() {
19
- const store = tenantStorage.getStore();
20
- if (store === SYSTEM_CONTEXT_MARKER) return;
21
- return store?.tenantId;
22
- }
23
- function isSystemContext() {
24
- return tenantStorage.getStore() === SYSTEM_CONTEXT_MARKER;
25
- }
26
- function isSuperAdminBypass() {
27
- const store = tenantStorage.getStore();
28
- if (store === SYSTEM_CONTEXT_MARKER) return false;
29
- return store?.superAdminBypass === true;
30
- }
31
- async function withSystemContext(fn) {
32
- return tenantStorage.run(SYSTEM_CONTEXT_MARKER, fn);
33
- }
34
- var TenantIsolationError = class extends Error {
35
- /** Stable error code; always `'TENANT_ISOLATION_VIOLATION'`. */
36
- code = "TENANT_ISOLATION_VIOLATION";
37
- /** The tenant ID that is active in the current context. */
38
- tenantId;
39
- /** The tenant ID that was attempted (and rejected). */
40
- attemptedTenantId;
41
- constructor(message, details) {
42
- super(message);
43
- this.name = "TenantIsolationError";
44
- this.tenantId = details?.tenantId;
45
- this.attemptedTenantId = details?.attemptedTenantId;
46
- }
47
- };
48
- //#endregion
49
- //#region ../tenancy/dist/chunks/testing-s12-pjzJ.js
50
- var DEFAULT_CONFIG = {
51
- mode: "required",
52
- field: "tenantId",
53
- autoFilter: true,
54
- autoPopulate: true,
55
- allowSuperAdminBypass: false
56
- };
57
- var tenantScopedClasses = /* @__PURE__ */ new Map();
58
- var unregisteredDecoratorRegistrations = /* @__PURE__ */ new Map();
59
- function registerTenantScopedConstructor(target, config = {}) {
60
- const resolved = {
61
- ...DEFAULT_CONFIG,
62
- ...config
63
- };
64
- unregisteredDecoratorRegistrations.set(target.name, resolved);
65
- tenantScopedClasses.set(target.name, resolved);
66
- }
67
- var KEY = /* @__PURE__ */ Symbol.for("smrt:tenant-global-read-scope");
68
- var root = globalThis;
69
- root[KEY] ??= new AsyncLocalStorage();
70
- root[KEY];
71
- function assertTenantReadAllowed(tenantId, label) {
72
- const tenantContext = getCurrentTenant();
73
- if (tenantContext && !isSuperAdminBypass() && tenantContext.tenantId !== tenantId) throw new TenantIsolationError(`Tenant isolation violation in ${label}: context tenant is '${tenantContext.tenantId}' but query requested '${tenantId}'`, {
74
- tenantId: tenantContext.tenantId,
75
- attemptedTenantId: tenantId
76
- });
77
- }
78
- async function queryGlobal(collection) {
79
- const metaType = collection.getStiChildMetaType();
80
- const where = metaType ? "WHERE _meta_type = ? AND tenant_id IS NULL" : "WHERE tenant_id IS NULL";
81
- const params = metaType ? [metaType] : [];
82
- return await collection.query(`SELECT * FROM ${collection.tableName} ${where}`, params, { allowRawOnTenantScoped: true });
83
- }
84
- async function queryWithGlobals(collection, tenantId, label) {
85
- assertTenantReadAllowed(tenantId, label);
86
- const metaType = collection.getStiChildMetaType();
87
- const where = metaType ? "WHERE _meta_type = ? AND (tenant_id = ? OR tenant_id IS NULL)" : "WHERE tenant_id = ? OR tenant_id IS NULL";
88
- const params = metaType ? [metaType, tenantId] : [tenantId];
89
- return await collection.query(`SELECT * FROM ${collection.tableName} ${where}`, params, { allowRawOnTenantScoped: true });
90
- }
91
- createLogger({ level: "info" });
92
- //#endregion
93
- //#region ../tenancy/dist/index.js
94
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tenancy\",\"packageVersion\":\"0.51.20\",\"objects\":{},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\"]}"));
95
- function TenantScoped(options = {}) {
96
- return (target, decoratorContext) => {
97
- applyPendingDecoratorRegistrations(target, decoratorContext);
98
- const config = {
99
- mode: options.mode ?? "required",
100
- field: options.field ?? "tenantId",
101
- autoFilter: options.autoFilter ?? true,
102
- autoPopulate: options.autoPopulate ?? true,
103
- allowSuperAdminBypass: options.allowSuperAdminBypass ?? false
104
- };
105
- registerTenantScopedConstructor(target, config);
106
- ObjectRegistry.reconcileTenantScopedConfig(target, {
107
- mode: config.mode ?? "required",
108
- field: config.field ?? "tenantId",
109
- autoFilter: config.autoFilter ?? true,
110
- autoPopulate: config.autoPopulate ?? true,
111
- allowSuperAdminBypass: config.allowSuperAdminBypass ?? false
112
- });
113
- return target;
114
- };
115
- }
116
- function tenantId(options = {}) {
117
- const opts = {
118
- autoFilter: true,
119
- required: true,
120
- autoPopulate: true,
121
- nullable: false,
122
- ...options
123
- };
124
- return ((targetOrValue, propertyKeyOrContext) => {
125
- registerCompatibleFieldDecorator(targetOrValue, propertyKeyOrContext, (className, propertyKey, ctor) => {
126
- const fieldOptions = {
127
- type: "foreignKey",
128
- related: "Tenant",
129
- sqlType: "UUID",
130
- required: opts.required,
131
- nullable: opts.nullable,
132
- __tenancy: {
133
- ...opts,
134
- isTenantIdField: true
135
- }
136
- };
137
- ObjectRegistry.registerFieldDecorator(className, propertyKey, fieldOptions, ctor);
138
- });
139
- });
140
- }
141
- //#endregion
142
- export { getTenantId as a, queryWithGlobals as i, tenantId as n, isSystemContext as o, queryGlobal as r, withSystemContext as s, TenantScoped as t };
@@ -1,2 +0,0 @@
1
- import { i as resolveIdentity_exports } from "./dist-BL5DhnWT.js";
2
- export { resolveIdentity_exports as i };