@happyvertical/smrt-cli 0.55.2 → 0.55.3
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/AGENTS.md +1 -1
- package/agents/db-migrate-concurrency.md +55 -0
- package/dist/{AuditLogCollection-WDHL-_AF-CICn3ykM.js → AuditLogCollection-WDHL-_AF-Bgyxf5sF.js} +1 -1
- package/dist/{OidcIdentity-BUblgQLs-tEgHhtuW.js → OidcIdentity-BUblgQLs-B4mzosmT.js} +2 -2
- package/dist/{OidcIdentityCollection-ClOyaHeF-DekKuRWf.js → OidcIdentityCollection-ClOyaHeF-DqB9Ex4b.js} +1 -1
- package/dist/{ProfileAssetCollection-CRMcjLJ--BDBGju83.js → ProfileAssetCollection-CRMcjLJ--CIoZ9Fd2.js} +3 -3
- package/dist/{ProfileCollection-C4INKh7Y-DFI7PkHq.js → ProfileCollection-C4INKh7Y-DU6dPYSG.js} +17 -17
- package/dist/{ProfileLinkCollection-DFfZRsgv-DM1Fvdmp.js → ProfileLinkCollection-DFfZRsgv-qtgfWKFC.js} +2 -2
- package/dist/{ProfileMetadataCollection-BIYKy4Y3-Bms52D92.js → ProfileMetadataCollection-BIYKy4Y3-BS9BY4vO.js} +1 -1
- package/dist/{ProfileMetafieldCollection-Buz7gzag-D114BiEu.js → ProfileMetafieldCollection-Buz7gzag-DyUWqbh9.js} +1 -1
- package/dist/{ProfileRelationshipCollection-C4g_QLI4-D4BlqOng.js → ProfileRelationshipCollection-C4g_QLI4-Ci7IHfeW.js} +1 -1
- package/dist/{ProfileTypeCollection-B7kwi1mU-DmJhE1J9.js → ProfileTypeCollection-B7kwi1mU-6KYMumQp.js} +2 -2
- package/dist/commands/utilities.d.ts.map +1 -1
- package/dist/{commands-DKomWuM0.js → commands-KDgVSMM3.js} +46 -27
- package/dist/{config-hqNo4lzH.js → config-CdJRSMRi.js} +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/{dist-D8UeHLmJ.js → dist-C8iSkjym.js} +4 -4
- package/dist/{dist-BtQYiFJl.js → dist-CTMZBIem.js} +16 -16
- package/dist/dist-CoCIu5cW.js +21 -0
- package/dist/{dist-Bd7Vrmjk.js → dist-DQg_1csT.js} +3 -3
- package/dist/{dist-COLaRvbz.js → dist-DRSQUACn.js} +16 -4
- package/dist/index.js +14 -14
- package/dist/{json-validator-BiAdsE1O.js → json-validator-CF2oQNDw.js} +1 -1
- package/dist/{oidcProvisioningPrimitives-DNP9EZlU-CV2h9ajo.js → oidcProvisioningPrimitives-DNP9EZlU-CUDQKgU2.js} +3 -3
- package/dist/{resolveIdentity-CkyqvctR-BESNBdig.js → resolveIdentity-CkyqvctR-DFVUhcM1.js} +14 -14
- package/package.json +11 -11
- package/dist/dist-lQnuqeJb.js +0 -21
|
@@ -47,7 +47,7 @@ var TenantIsolationError = class extends Error {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region ../tenancy/dist/chunks/testing-
|
|
50
|
+
//#region ../tenancy/dist/chunks/testing-Cs_C_Q-y.js
|
|
51
51
|
var logger$1 = createLogger({ level: "info" });
|
|
52
52
|
var DEFAULT_CONFIG = {
|
|
53
53
|
mode: "required",
|
|
@@ -169,12 +169,24 @@ function resolveSelectorClass(selector) {
|
|
|
169
169
|
const matches = ObjectRegistry.findClassesByName(selector);
|
|
170
170
|
return matches.length === 1 ? matches[0] : void 0;
|
|
171
171
|
}
|
|
172
|
+
function declaresFieldInChain(registered, fieldName) {
|
|
173
|
+
if (registered.fields.has(fieldName)) return true;
|
|
174
|
+
if (registered.inheritedFields?.has(fieldName)) return true;
|
|
175
|
+
const visited = /* @__PURE__ */ new Set([registered.constructor]);
|
|
176
|
+
let ctor = Object.getPrototypeOf(registered.constructor);
|
|
177
|
+
while (typeof ctor === "function" && !visited.has(ctor)) {
|
|
178
|
+
visited.add(ctor);
|
|
179
|
+
if (ObjectRegistry.getClassByConstructor(ctor)?.fields.has(fieldName)) return true;
|
|
180
|
+
ctor = Object.getPrototypeOf(ctor);
|
|
181
|
+
}
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
172
184
|
function auditSelector(selector, config) {
|
|
173
185
|
const registered = resolveSelectorClass(selector);
|
|
174
186
|
if (!registered) return [];
|
|
175
187
|
const className = registered.qualifiedName || registered.name;
|
|
176
188
|
const findings = [];
|
|
177
|
-
if (!registered
|
|
189
|
+
if (!declaresFieldInChain(registered, config.field)) {
|
|
178
190
|
findings.push({
|
|
179
191
|
selector,
|
|
180
192
|
className,
|
|
@@ -254,7 +266,7 @@ async function queryWithGlobals(collection, tenantId, label) {
|
|
|
254
266
|
createLogger({ level: "info" });
|
|
255
267
|
//#endregion
|
|
256
268
|
//#region ../tenancy/dist/index.js
|
|
257
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.55.
|
|
269
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.55.3","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","enum":["self","reseller"]}},"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"],"stampsConstructors":true}`));
|
|
258
270
|
var __defProp$2 = Object.defineProperty;
|
|
259
271
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
260
272
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
@@ -369,7 +381,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
369
381
|
if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" });
|
|
370
382
|
return target;
|
|
371
383
|
};
|
|
372
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.55.
|
|
384
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.55.3","objects":{"@happyvertical/smrt-prompts:PromptOverrideCollection":{"name":"promptoverridecollection","className":"PromptOverrideCollection","qualifiedName":"@happyvertical/smrt-prompts:PromptOverrideCollection","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/collections/PromptOverrideCollection.ts","packageName":"@happyvertical/smrt-prompts","fields":{},"methods":{"getAppOverride":{"name":"getAppOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getTenantOverride":{"name":"getTenantOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getResolutionLayers":{"name":"getResolutionLayers","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string | null","optional":true,"unionBranches":[{"type":"string"},{"type":"null"}]},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<object>","isStatic":false,"isPublic":true},"getOverrideMapForKeys":{"name":"getOverrideMapForKeys","async":true,"parameters":[{"name":"keys","type":"string[]","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<Map<string, PromptOverride>>","isStatic":false,"isPublic":true},"findByScope":{"name":"findByScope","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"setTemplateOverride":{"name":"setTemplateOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false},{"name":"template","type":"string | null","optional":false,"unionBranches":[{"type":"string"},{"type":"null"}]}],"returnType":"Promise<PromptOverride>","isStatic":false,"isPublic":true},"removeOverride":{"name":"removeOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<boolean>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"PromptOverride","exportName":"PromptOverrideCollection","collectionExportName":"PromptOverrideCollectionCollection","schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\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 \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\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"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"},"@happyvertical/smrt-prompts:PromptOverride":{"name":"promptoverride","className":"PromptOverride","qualifiedName":"@happyvertical/smrt-prompts:PromptOverride","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/models/PromptOverride.ts","packageName":"@happyvertical/smrt-prompts","fields":{"key":{"type":"text","required":true,"default":"","_meta":{"required":true}},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true}},"template":{"type":"text","required":false,"_meta":{"nullable":true}},"profile":{"type":"text","required":false,"_meta":{"nullable":true}},"model":{"type":"text","required":false,"_meta":{"nullable":true}},"params":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"getParams":{"name":"getParams","async":false,"parameters":[],"returnType":"PromptParams","isStatic":false,"isPublic":true},"setParams":{"name":"setParams","async":false,"parameters":[{"name":"params","type":"PromptParams | null","optional":false,"unionBranches":[{"type":"PromptParams"},{"type":"null"}]}],"returnType":"void","isStatic":false,"isPublic":true},"toPromptLayer":{"name":"toPromptLayer","async":false,"parameters":[],"returnType":"PromptLayer","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","conflictColumns":["key","context"],"api":false,"cli":false,"mcp":false},"extends":"SmrtObject","exportName":"PromptOverride","collectionExportName":"PromptOverrideCollection","validationRules":[{"field":"key","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\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 \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\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"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-tenancy"],"stampsConstructors":true}`));
|
|
373
385
|
var PROMPT_CACHE_TTL_MS = 3e4;
|
|
374
386
|
var promptCache = /* @__PURE__ */ new Map();
|
|
375
387
|
var cacheGenerations = /* @__PURE__ */ new Map();
|
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-
|
|
52
|
+
const { gnodeCommands } = await import("./commands-KDgVSMM3.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-
|
|
59
|
+
const { gitCommands } = await import("./commands-KDgVSMM3.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-
|
|
66
|
+
const { generateCommands } = await import("./commands-KDgVSMM3.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-
|
|
73
|
+
const { initCommands } = await import("./commands-KDgVSMM3.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-
|
|
80
|
+
const { utilityCommands } = await import("./commands-KDgVSMM3.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-
|
|
87
|
+
const { dispatchCommands } = await import("./commands-KDgVSMM3.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-
|
|
94
|
+
const { docsCommands } = await import("./commands-KDgVSMM3.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-
|
|
101
|
+
const { playgroundCommands } = await import("./commands-KDgVSMM3.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-
|
|
108
|
+
const { workbenchCommands } = await import("./commands-KDgVSMM3.js");
|
|
109
109
|
_workbenchCommands = workbenchCommands;
|
|
110
110
|
}
|
|
111
111
|
return _workbenchCommands;
|
|
@@ -322,7 +322,7 @@ var CLIGenerator = class {
|
|
|
322
322
|
if (verbose) console.log("[CLI] Loading external classes...");
|
|
323
323
|
await this.loadExternalClasses();
|
|
324
324
|
const { getPackageConfig } = await import("@happyvertical/smrt-config");
|
|
325
|
-
const { DEFAULT_CLI_CONFIG } = await import("./config-
|
|
325
|
+
const { DEFAULT_CLI_CONFIG } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
326
326
|
const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
|
|
327
327
|
const registeredCount = ObjectRegistry.getAllClasses().size;
|
|
328
328
|
if (verbose || config.verbose) console.log(`[CLI] Successfully loaded ${registeredCount} SMRT objects`);
|
|
@@ -337,7 +337,7 @@ var CLIGenerator = class {
|
|
|
337
337
|
*/
|
|
338
338
|
async loadLocalClasses() {
|
|
339
339
|
const { getPackageConfig } = await import("@happyvertical/smrt-config");
|
|
340
|
-
const { DEFAULT_CLI_CONFIG } = await import("./config-
|
|
340
|
+
const { DEFAULT_CLI_CONFIG } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
341
341
|
const fs = await import("node:fs");
|
|
342
342
|
const path = await import("node:path");
|
|
343
343
|
const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
|
|
@@ -382,7 +382,7 @@ var CLIGenerator = class {
|
|
|
382
382
|
*/
|
|
383
383
|
async loadExternalClasses() {
|
|
384
384
|
const { getPackageConfig } = await import("@happyvertical/smrt-config");
|
|
385
|
-
const { DEFAULT_CLI_CONFIG } = await import("./config-
|
|
385
|
+
const { DEFAULT_CLI_CONFIG } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
386
386
|
const { loadLocalTestManifestSync } = await import("@happyvertical/smrt-core/manifest");
|
|
387
387
|
const fs = await import("node:fs");
|
|
388
388
|
const path = await import("node:path");
|
|
@@ -1376,7 +1376,7 @@ var CLIGenerator = class {
|
|
|
1376
1376
|
const { getConfig, getPackageConfig, getModuleConfig } = await import("@happyvertical/smrt-config");
|
|
1377
1377
|
const smrtConfig = getConfig() || {};
|
|
1378
1378
|
const moduleConfig = getModuleConfig(objectName.toLowerCase(), {});
|
|
1379
|
-
const { DEFAULT_CLI_CONFIG } = await import("./config-
|
|
1379
|
+
const { DEFAULT_CLI_CONFIG } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
1380
1380
|
const cliConfig = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
|
|
1381
1381
|
let db = this.context.db;
|
|
1382
1382
|
if (!db && cliConfig?.database?.url) {
|
|
@@ -1479,7 +1479,7 @@ var CLIGenerator = class {
|
|
|
1479
1479
|
let db = this.context.db;
|
|
1480
1480
|
if (!db) {
|
|
1481
1481
|
const { getPackageConfig } = await import("@happyvertical/smrt-config");
|
|
1482
|
-
const { DEFAULT_CLI_CONFIG } = await import("./config-
|
|
1482
|
+
const { DEFAULT_CLI_CONFIG } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
1483
1483
|
const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
|
|
1484
1484
|
const { getDatabase } = await import("@happyvertical/sql");
|
|
1485
1485
|
db = await getDatabase({
|
|
@@ -85,7 +85,7 @@ async function resolveDataPath(explicitPath) {
|
|
|
85
85
|
return resolved;
|
|
86
86
|
}
|
|
87
87
|
try {
|
|
88
|
-
const { DEFAULT_CLI_CONFIG: defaultConfig } = await import("./config-
|
|
88
|
+
const { DEFAULT_CLI_CONFIG: defaultConfig } = await import("./config-CdJRSMRi.js").then((n) => n.n);
|
|
89
89
|
const config = getPackageConfig("cli", defaultConfig);
|
|
90
90
|
if (config.database?.url) {
|
|
91
91
|
const dbUrl = config.database.url;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
3
|
-
import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-
|
|
4
|
-
import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-
|
|
5
|
-
import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-
|
|
3
|
+
import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-B4mzosmT.js";
|
|
4
|
+
import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-DU6dPYSG.js";
|
|
5
|
+
import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-6KYMumQp.js";
|
|
6
6
|
import { smrt } from "@happyvertical/smrt-core";
|
|
7
7
|
//#region ../profiles/dist/chunks/oidcProvisioningPrimitives-DNP9EZlU.js
|
|
8
8
|
var oidcProvisioningPrimitives_DNP9EZlU_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { u as withSystemContext } from "./dist-
|
|
2
|
+
import { u as withSystemContext } from "./dist-DRSQUACn.js";
|
|
3
3
|
import { n as __exportAll$1, t as NostrIdentity, u as verifyAuthEvent } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { t as ApiKey } from "./ApiKey-CVmlf3V6-BAeHuH48.js";
|
|
5
|
-
import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-
|
|
6
|
-
import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-
|
|
7
|
-
import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-
|
|
5
|
+
import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-B4mzosmT.js";
|
|
6
|
+
import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-DU6dPYSG.js";
|
|
7
|
+
import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-CUDQKgU2.js";
|
|
8
8
|
import { resolveDatabase } from "@happyvertical/smrt-core";
|
|
9
9
|
//#region ../profiles/dist/chunks/resolveIdentity-CkyqvctR.js
|
|
10
10
|
var resolveIdentity_CkyqvctR_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -72,13 +72,13 @@ async function resolveIdentity(context) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
async function findProfileByExternalId(provider, externalId, options) {
|
|
75
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-
|
|
75
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DqB9Ex4b.js").then((n) => n.r).then((n) => n.r);
|
|
76
76
|
const identities = await (await OidcIdentityCollection.create(options)).findByProvider(provider);
|
|
77
77
|
for (const identity of identities) if (identity.subject === externalId || identity.email?.includes(externalId)) {
|
|
78
78
|
const profile = await identity.getProfile();
|
|
79
79
|
if (profile) return profile;
|
|
80
80
|
}
|
|
81
|
-
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-
|
|
81
|
+
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DU6dPYSG.js").then((n) => n.o).then((n) => n.r);
|
|
82
82
|
const profiles = await (await ProfileCollection.create(options)).list({
|
|
83
83
|
where: { email: `${externalId}@users.noreply.github.com` },
|
|
84
84
|
limit: 1
|
|
@@ -99,7 +99,7 @@ async function reuseExistingOidcIdentityForProfile(profileId, claims, provider,
|
|
|
99
99
|
createConcurrencyError: (cause) => new Error("Concurrent exact OIDC identity reuse did not converge.", cause === void 0 ? void 0 : { cause }),
|
|
100
100
|
rebindRootResult: rebindOidcProfileResult,
|
|
101
101
|
provision: (tx) => withSystemContext(async () => {
|
|
102
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-
|
|
102
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DqB9Ex4b.js").then((n) => n.r).then((n) => n.r);
|
|
103
103
|
const identity = await (await OidcIdentityCollection.create({ db: tx })).findBySubject(normalizedClaims.iss, normalizedClaims.sub);
|
|
104
104
|
if (!identity) throw new Error("OidcIdentity.findOrCreate() no longer creates authentication links; use UserCollection.getOrCreateFromOidc() or createProfileFromOidc().");
|
|
105
105
|
if (identity.profileId !== profileId) throw new Error(`OIDC identity ${normalizedClaims.iss} subject ${normalizedClaims.sub} belongs to a different Profile.`);
|
|
@@ -133,7 +133,7 @@ async function coordinateProfileOidcProvisioning(claims, provider, options) {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
async function provisionOidcProfile(claims, provider, options) {
|
|
136
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-
|
|
136
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DqB9Ex4b.js").then((n) => n.r).then((n) => n.r);
|
|
137
137
|
const existingIdentity = await (await OidcIdentityCollection.create(options)).findBySubject(claims.iss, claims.sub);
|
|
138
138
|
if (existingIdentity) {
|
|
139
139
|
const profile2 = await existingIdentity.getProfile();
|
|
@@ -148,7 +148,7 @@ async function provisionOidcProfile(claims, provider, options) {
|
|
|
148
148
|
created: false
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-
|
|
151
|
+
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DU6dPYSG.js").then((n) => n.o).then((n) => n.r);
|
|
152
152
|
const profileCollection = await ProfileCollection.create(options);
|
|
153
153
|
if (claims.email) {
|
|
154
154
|
if (await profileCollection.findUniqueGlobalPersonByEmail(claims.email)) {
|
|
@@ -175,8 +175,8 @@ async function provisionOidcProfile(claims, provider, options) {
|
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
async function rebindOidcProfileResult(result, rootDb) {
|
|
178
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-
|
|
179
|
-
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-
|
|
178
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DqB9Ex4b.js").then((n) => n.r).then((n) => n.r);
|
|
179
|
+
const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DU6dPYSG.js").then((n) => n.o).then((n) => n.r);
|
|
180
180
|
const profileId = requireOidcProfileId(result.profile.id);
|
|
181
181
|
const identityId = requireOidcProfileId(result.oidcIdentity.id);
|
|
182
182
|
const [profile, oidcIdentity] = await withSystemContext(async () => {
|
|
@@ -225,11 +225,11 @@ async function createProfileFromNostr(email, nostrData, options) {
|
|
|
225
225
|
created: false
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-
|
|
229
|
-
const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-
|
|
228
|
+
const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-CUDQKgU2.js").then((n) => n.o).then((n) => n.o);
|
|
229
|
+
const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-6KYMumQp.js").then((n) => n.n).then((n) => n.n);
|
|
230
230
|
let personType = await (await ProfileTypeCollection.create(options)).getBySlug("person");
|
|
231
231
|
if (!personType) {
|
|
232
|
-
const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-
|
|
232
|
+
const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-DU6dPYSG.js").then((n) => n.o).then((n) => n.h);
|
|
233
233
|
personType = new ProfileType({
|
|
234
234
|
...options,
|
|
235
235
|
slug: "person",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-cli",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.3",
|
|
4
4
|
"description": "Developer CLI for SMRT framework - introspection, testing, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"@happyvertical/ai": "^0.102.2",
|
|
33
33
|
"@happyvertical/files": "^0.102.2",
|
|
34
34
|
"@happyvertical/logger": "^0.102.2",
|
|
35
|
-
"@happyvertical/smrt-agents": "0.55.
|
|
36
|
-
"@happyvertical/smrt-app-runtime": "0.55.
|
|
37
|
-
"@happyvertical/smrt-config": "0.55.
|
|
38
|
-
"@happyvertical/smrt-core": "0.55.
|
|
39
|
-
"@happyvertical/smrt-dev-mcp": "0.55.
|
|
40
|
-
"@happyvertical/smrt-ledgers": "0.55.
|
|
41
|
-
"@happyvertical/smrt-playground": "0.55.
|
|
42
|
-
"@happyvertical/smrt-types": "0.55.
|
|
43
|
-
"@happyvertical/smrt-users": "0.55.
|
|
35
|
+
"@happyvertical/smrt-agents": "0.55.3",
|
|
36
|
+
"@happyvertical/smrt-app-runtime": "0.55.3",
|
|
37
|
+
"@happyvertical/smrt-config": "0.55.3",
|
|
38
|
+
"@happyvertical/smrt-core": "0.55.3",
|
|
39
|
+
"@happyvertical/smrt-dev-mcp": "0.55.3",
|
|
40
|
+
"@happyvertical/smrt-ledgers": "0.55.3",
|
|
41
|
+
"@happyvertical/smrt-playground": "0.55.3",
|
|
42
|
+
"@happyvertical/smrt-types": "0.55.3",
|
|
43
|
+
"@happyvertical/smrt-users": "0.55.3",
|
|
44
44
|
"@happyvertical/sql": "^0.102.2",
|
|
45
45
|
"@happyvertical/utils": "^0.102.2",
|
|
46
46
|
"acorn": "^8.18.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"clean": "rm -rf dist",
|
|
81
81
|
"dev": "npm run build:watch",
|
|
82
82
|
"test": "vitest run",
|
|
83
|
-
"test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run --no-file-parallelism src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts src/commands/__tests__/sti-upgrade.test.ts src/commands/__tests__/db-migrate-partial-apply-postgres.test.ts",
|
|
83
|
+
"test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run --no-file-parallelism src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts src/commands/__tests__/sti-upgrade.test.ts src/commands/__tests__/db-migrate-partial-apply-postgres.test.ts src/commands/__tests__/db-migrate-concurrent-postgres.test.ts",
|
|
84
84
|
"test:watch": "vitest",
|
|
85
85
|
"typecheck": "tsc -p tsconfig.typecheck.json && tsc -p tsconfig.test.json",
|
|
86
86
|
"cli": "tsx src/index.ts"
|
package/dist/dist-lQnuqeJb.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
2
|
-
import "./ApiKey-CVmlf3V6-BAeHuH48.js";
|
|
3
|
-
import "./ApiKeyCollection-CiiDNFdD-CMGF3_ul.js";
|
|
4
|
-
import "./AuditLogCollection-WDHL-_AF-CICn3ykM.js";
|
|
5
|
-
import "./NostrIdentityCollection-CctlECpX-fkAPnK02.js";
|
|
6
|
-
import "./OidcIdentity-BUblgQLs-tEgHhtuW.js";
|
|
7
|
-
import "./OidcIdentityCollection-ClOyaHeF-DekKuRWf.js";
|
|
8
|
-
import "./ProfileAssetCollection-CRMcjLJ--BDBGju83.js";
|
|
9
|
-
import { a as ProfileCollection } from "./ProfileCollection-C4INKh7Y-DFI7PkHq.js";
|
|
10
|
-
import "./ProfileLinkCollection-DFfZRsgv-DM1Fvdmp.js";
|
|
11
|
-
import "./ProfileMetadataCollection-BIYKy4Y3-Bms52D92.js";
|
|
12
|
-
import "./ProfileMetafieldCollection-Buz7gzag-D114BiEu.js";
|
|
13
|
-
import "./ProfileRelationshipCollection-C4g_QLI4-D4BlqOng.js";
|
|
14
|
-
import "./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js";
|
|
15
|
-
import "./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js";
|
|
16
|
-
import "./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js";
|
|
17
|
-
import "./ProfileTypeCollection-B7kwi1mU-DmJhE1J9.js";
|
|
18
|
-
import "./oidcProvisioningPrimitives-DNP9EZlU-CV2h9ajo.js";
|
|
19
|
-
import "./resolveIdentity-CkyqvctR-BESNBdig.js";
|
|
20
|
-
import "./dist-BtQYiFJl.js";
|
|
21
|
-
export { ProfileCollection };
|