@happyvertical/smrt-cli 0.54.3 → 0.54.4
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/{AuditLogCollection-WDHL-_AF-BH_fVbtQ.js → AuditLogCollection-WDHL-_AF-Cm6c206j.js} +1 -1
- package/dist/{OidcIdentity-BjRu3n1g-DLxby4jH.js → OidcIdentity-BjRu3n1g-DPfoJOJq.js} +2 -2
- package/dist/{OidcIdentityCollection-B4jYh36_-By9emBa2.js → OidcIdentityCollection-B4jYh36_-CDCS-lBk.js} +1 -1
- package/dist/{ProfileAssetCollection-HeMtjBc0-oIL6YSUZ.js → ProfileAssetCollection-HeMtjBc0-BnvWWbZ6.js} +3 -3
- package/dist/{ProfileCollection-Bt6IJK49-B1_oDwPG.js → ProfileCollection-Bt6IJK49-ir8YINdu.js} +16 -16
- package/dist/{ProfileLinkCollection-u1hhzKTm-Dr0Nz06-.js → ProfileLinkCollection-u1hhzKTm-DN7eng_7.js} +2 -2
- package/dist/{ProfileMetadataCollection-BIYKy4Y3-DIyfp9vR.js → ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js} +1 -1
- package/dist/{ProfileMetafieldCollection-Buz7gzag-DTX_ZzEU.js → ProfileMetafieldCollection-Buz7gzag-DDlih_5j.js} +1 -1
- package/dist/{ProfileRelationshipCollection-C4g_QLI4-DbDLX7wE.js → ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js} +1 -1
- package/dist/{commands-D3EYdGNp.js → commands-iFti-f80.js} +2 -2
- package/dist/{dist-Bzshoi-0.js → dist-Bqg09MUx.js} +2 -2
- package/dist/dist-CrzK6GwA.js +20 -0
- package/dist/{dist-D5MGUBs8.js → dist-D5GdZ8W6.js} +15 -15
- package/dist/{dist-DE7COF_x.js → dist-DIGbZpp6.js} +4 -4
- package/dist/{dist-BJgUA7Bn.js → dist-DJOzoOZn.js} +3 -3
- package/dist/index.js +9 -9
- package/dist/{oidcProvisioningPrimitives-CYood-2M-5BmKJPFx.js → oidcProvisioningPrimitives-CYood-2M-D8npRnlS.js} +3 -3
- package/dist/{resolveIdentity-CvGDegU6--sWLCFfc.js → resolveIdentity-CvGDegU6-DkEz2oV8.js} +14 -14
- package/package.json +10 -10
- package/dist/dist-KGK8QWAS.js +0 -20
package/dist/{AuditLogCollection-WDHL-_AF-BH_fVbtQ.js → AuditLogCollection-WDHL-_AF-Cm6c206j.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/AuditLogCollection-WDHL-_AF.js
|
|
@@ -42,7 +42,7 @@ var OidcIdentity = class extends SmrtObject {
|
|
|
42
42
|
* Find identity by issuer and subject
|
|
43
43
|
*/
|
|
44
44
|
static async findBySubject(issuer, subject, options = {}) {
|
|
45
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-
|
|
45
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js").then((n) => n.r).then((n) => n.r);
|
|
46
46
|
return await (await OidcIdentityCollection.create(options)).findBySubject(issuer, subject);
|
|
47
47
|
}
|
|
48
48
|
/** Build the collision-free natural key for one OIDC issuer subject. */
|
|
@@ -65,7 +65,7 @@ var OidcIdentity = class extends SmrtObject {
|
|
|
65
65
|
static async findOrCreate(profile, oidcData, options = {}) {
|
|
66
66
|
const profileId = profile.id;
|
|
67
67
|
if (typeof profileId !== "string" || !profileId) throw new Error("OidcIdentity.findOrCreate() requires a saved Profile.");
|
|
68
|
-
const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-CvGDegU6
|
|
68
|
+
const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-CvGDegU6-DkEz2oV8.js").then((n) => n.i).then((n) => n.i);
|
|
69
69
|
const profileOptions = profile.options ?? {};
|
|
70
70
|
return (await reuseExistingOidcIdentityForProfile(profileId, {
|
|
71
71
|
email: oidcData.email,
|
|
@@ -1,6 +1,6 @@
|
|
|
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-BjRu3n1g-
|
|
3
|
+
import { t as OidcIdentity } from "./OidcIdentity-BjRu3n1g-DPfoJOJq.js";
|
|
4
4
|
import { SmrtCollection } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/OidcIdentityCollection-B4jYh36_.js
|
|
6
6
|
var OidcIdentityCollection_B4jYh36__exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
|
-
import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-
|
|
4
|
+
import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-DJOzoOZn.js";
|
|
5
5
|
import { SmrtJunction, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
6
6
|
//#region ../profiles/dist/chunks/ProfileAssetCollection-HeMtjBc0.js
|
|
7
7
|
var ProfileAssetCollection_HeMtjBc0_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -84,7 +84,7 @@ var ProfileAssetCollection = class extends SmrtJunction {
|
|
|
84
84
|
profileCollectionPromise = null;
|
|
85
85
|
async getProfileCollection() {
|
|
86
86
|
if (!this.profileCollectionPromise) {
|
|
87
|
-
const { ProfileCollection } = await import("./ProfileCollection-Bt6IJK49-
|
|
87
|
+
const { ProfileCollection } = await import("./ProfileCollection-Bt6IJK49-ir8YINdu.js").then((n) => n.o).then((n) => n.r);
|
|
88
88
|
this.profileCollectionPromise = ProfileCollection.create({ db: this.db });
|
|
89
89
|
}
|
|
90
90
|
return this.profileCollectionPromise;
|
package/dist/{ProfileCollection-Bt6IJK49-B1_oDwPG.js → ProfileCollection-Bt6IJK49-ir8YINdu.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as queryGlobal, i as tenantId, l as withSystemContext, n as resolvePrompt, o as queryWithGlobals, r as TenantScoped, s as getTenantId, t as definePrompt } from "./dist-
|
|
2
|
+
import { a as queryGlobal, i as tenantId, l as withSystemContext, n as resolvePrompt, o as queryWithGlobals, r as TenantScoped, s as getTenantId, t as definePrompt } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
|
-
import { a as getOwnedAssetsFromCollection, i as assertValidOwnedAssetSortOrder, n as assertAssetLinkable, o as removeOwnedAssetFromCollection, r as assertValidOwnedAssetRelationship, s as resolveOwnedAssetsById, t as addOwnedAssetFromCollection } from "./dist-
|
|
4
|
+
import { a as getOwnedAssetsFromCollection, i as assertValidOwnedAssetSortOrder, n as assertAssetLinkable, o as removeOwnedAssetFromCollection, r as assertValidOwnedAssetRelationship, s as resolveOwnedAssetsById, t as addOwnedAssetFromCollection } from "./dist-DJOzoOZn.js";
|
|
5
5
|
import { RuntimeError, SmrtCollection, SmrtObject, ValidationError, field, foreignKey, isAbortedTransactionError, oneToMany, smrt } from "@happyvertical/smrt-core";
|
|
6
6
|
import { BackfillTableUnavailableError, BackfillTracker } from "@happyvertical/smrt-core/migrations";
|
|
7
7
|
//#region ../profiles/dist/chunks/ProfileCollection-Bt6IJK49.js
|
|
@@ -453,8 +453,8 @@ var Profile = class extends SmrtObject {
|
|
|
453
453
|
* @param value - The value to set
|
|
454
454
|
*/
|
|
455
455
|
async addMetadata(metafieldSlug, value) {
|
|
456
|
-
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-Buz7gzag-
|
|
457
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-
|
|
456
|
+
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-Buz7gzag-DDlih_5j.js").then((n) => n.r).then((n) => n.n);
|
|
457
|
+
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js").then((n) => n.r).then((n) => n.n);
|
|
458
458
|
const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
|
|
459
459
|
if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
|
|
460
460
|
await metafield.validateValue(value);
|
|
@@ -487,7 +487,7 @@ var Profile = class extends SmrtObject {
|
|
|
487
487
|
* @returns Object with metafield slugs as keys
|
|
488
488
|
*/
|
|
489
489
|
async getMetadata() {
|
|
490
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-
|
|
490
|
+
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js").then((n) => n.r).then((n) => n.n);
|
|
491
491
|
return await (await ProfileMetadataCollection.create(this.options)).getMetadataObject(this.id);
|
|
492
492
|
}
|
|
493
493
|
/**
|
|
@@ -504,8 +504,8 @@ var Profile = class extends SmrtObject {
|
|
|
504
504
|
* @param metafieldSlug - The slug of the metafield to remove
|
|
505
505
|
*/
|
|
506
506
|
async removeMetadata(metafieldSlug) {
|
|
507
|
-
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-Buz7gzag-
|
|
508
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-
|
|
507
|
+
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-Buz7gzag-DDlih_5j.js").then((n) => n.r).then((n) => n.n);
|
|
508
|
+
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js").then((n) => n.r).then((n) => n.n);
|
|
509
509
|
const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
|
|
510
510
|
if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
|
|
511
511
|
const existing = await (await ProfileMetadataCollection.create(this.options)).list({
|
|
@@ -530,7 +530,7 @@ var Profile = class extends SmrtObject {
|
|
|
530
530
|
return candidates.find((candidate) => ownerTenantId && candidate.tenantId === ownerTenantId) ?? candidates.find((candidate) => !candidate.tenantId) ?? null;
|
|
531
531
|
}
|
|
532
532
|
async getProfileLinkCollection() {
|
|
533
|
-
const { ProfileLinkCollection } = await import("./ProfileLinkCollection-u1hhzKTm-
|
|
533
|
+
const { ProfileLinkCollection } = await import("./ProfileLinkCollection-u1hhzKTm-DN7eng_7.js").then((n) => n.i).then((n) => n.r);
|
|
534
534
|
return ProfileLinkCollection.create({ db: this.db });
|
|
535
535
|
}
|
|
536
536
|
/** This profile's web links in display order. */
|
|
@@ -547,7 +547,7 @@ var Profile = class extends SmrtObject {
|
|
|
547
547
|
return (await this.getProfileLinkCollection()).replaceForProfile(this.id, links);
|
|
548
548
|
}
|
|
549
549
|
async getProfileAssetCollection() {
|
|
550
|
-
const { ProfileAssetCollection } = await import("./ProfileAssetCollection-HeMtjBc0-
|
|
550
|
+
const { ProfileAssetCollection } = await import("./ProfileAssetCollection-HeMtjBc0-BnvWWbZ6.js").then((n) => n.r).then((n) => n.n);
|
|
551
551
|
return ProfileAssetCollection.create({ db: this.db });
|
|
552
552
|
}
|
|
553
553
|
async getAssets(relationship) {
|
|
@@ -579,7 +579,7 @@ var Profile = class extends SmrtObject {
|
|
|
579
579
|
*/
|
|
580
580
|
async addRelationship(toProfile, relationshipSlug, contextProfile) {
|
|
581
581
|
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js").then((n) => n.n).then((n) => n.n);
|
|
582
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-
|
|
582
|
+
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
583
583
|
const { ProfileRelationshipType } = await import("./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js").then((n) => n.n).then((n) => n.n);
|
|
584
584
|
const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
|
|
585
585
|
if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
|
|
@@ -604,7 +604,7 @@ var Profile = class extends SmrtObject {
|
|
|
604
604
|
* @returns Array of ProfileRelationship instances
|
|
605
605
|
*/
|
|
606
606
|
async getRelationships(options) {
|
|
607
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-
|
|
607
|
+
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
608
608
|
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js").then((n) => n.n).then((n) => n.n);
|
|
609
609
|
const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
|
|
610
610
|
const direction = options?.direction || "all";
|
|
@@ -649,7 +649,7 @@ var Profile = class extends SmrtObject {
|
|
|
649
649
|
*/
|
|
650
650
|
async removeRelationship(toProfile, relationshipSlug) {
|
|
651
651
|
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js").then((n) => n.n).then((n) => n.n);
|
|
652
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-
|
|
652
|
+
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
653
653
|
const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
|
|
654
654
|
if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
|
|
655
655
|
const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
|
|
@@ -773,7 +773,7 @@ var Profile = class extends SmrtObject {
|
|
|
773
773
|
* @returns Array of OIDC identity records
|
|
774
774
|
*/
|
|
775
775
|
async getOidcIdentities() {
|
|
776
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-
|
|
776
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js").then((n) => n.r).then((n) => n.r);
|
|
777
777
|
return await (await OidcIdentityCollection.create(this.options)).findByProfile(this.id);
|
|
778
778
|
}
|
|
779
779
|
/**
|
|
@@ -786,7 +786,7 @@ var Profile = class extends SmrtObject {
|
|
|
786
786
|
* type, but refuses to create or rebind authority.
|
|
787
787
|
*/
|
|
788
788
|
async linkOidcIdentity(oidcData) {
|
|
789
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-
|
|
789
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js").then((n) => n.r).then((n) => n.r);
|
|
790
790
|
return await (await OidcIdentityCollection.create(this.options)).linkToProfile(this, oidcData);
|
|
791
791
|
}
|
|
792
792
|
/**
|
|
@@ -815,7 +815,7 @@ var Profile = class extends SmrtObject {
|
|
|
815
815
|
* @returns Array of audit log entries
|
|
816
816
|
*/
|
|
817
817
|
async getAuditLogs(limit = 50) {
|
|
818
|
-
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-
|
|
818
|
+
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-Cm6c206j.js").then((n) => n.r).then((n) => n.n);
|
|
819
819
|
return await (await AuditLogCollection.create(this.options)).getRecentActivity(this.id, limit);
|
|
820
820
|
}
|
|
821
821
|
/**
|
|
@@ -825,7 +825,7 @@ var Profile = class extends SmrtObject {
|
|
|
825
825
|
* @returns The created audit log entry
|
|
826
826
|
*/
|
|
827
827
|
async recordAction(options) {
|
|
828
|
-
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-
|
|
828
|
+
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-Cm6c206j.js").then((n) => n.r).then((n) => n.n);
|
|
829
829
|
return await (await AuditLogCollection.create(this.options)).record({
|
|
830
830
|
profile: this,
|
|
831
831
|
...options
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, field, foreignKey, isEmbeddedDatabase, smrt, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/ProfileLinkCollection-u1hhzKTm.js
|
|
@@ -203,7 +203,7 @@ var ProfileLinkCollection = class ProfileLinkCollection extends SmrtCollection {
|
|
|
203
203
|
/** The profile's tenant; throws when the profile is not visible here. */
|
|
204
204
|
async requireProfileTenant(profileId) {
|
|
205
205
|
if (!profileId) throw new Error("A profile link needs a profile");
|
|
206
|
-
const { ProfileCollection } = await import("./ProfileCollection-Bt6IJK49-
|
|
206
|
+
const { ProfileCollection } = await import("./ProfileCollection-Bt6IJK49-ir8YINdu.js").then((n) => n.o).then((n) => n.r);
|
|
207
207
|
const profile = await (await ProfileCollection.create({ db: this.db })).get({ id: profileId });
|
|
208
208
|
if (!profile) throw new Error(`Profile '${profileId}' not found`);
|
|
209
209
|
return profile.tenantId ?? null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/ProfileMetadataCollection-BIYKy4Y3.js
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/ProfileMetafieldCollection-Buz7gzag.js
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
3
|
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, foreignKey, oneToMany, smrt } from "@happyvertical/smrt-core";
|
|
5
5
|
//#region ../profiles/dist/chunks/ProfileRelationshipCollection-C4g_QLI4.js
|
|
@@ -7112,7 +7112,7 @@ var dbMaterializeTenantHierarchyCommand = {
|
|
|
7112
7112
|
if (!config.database?.url || config.database.url === ":memory:") throw new Error("Database configuration required for db:materialize-tenant-hierarchy. Configure database.url in smrt.config.ts (or DATABASE_URL).");
|
|
7113
7113
|
const dbType = config.database.type || "sqlite";
|
|
7114
7114
|
const { getDatabase } = await import("@happyvertical/sql");
|
|
7115
|
-
const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-
|
|
7115
|
+
const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-D5GdZ8W6.js");
|
|
7116
7116
|
db = await getDatabase({
|
|
7117
7117
|
type: dbType,
|
|
7118
7118
|
url: config.database.url
|
|
@@ -7321,7 +7321,7 @@ var dbMigrateLedgerAccountsCommand = {
|
|
|
7321
7321
|
if (dbType !== "postgres") throw new Error("db:migrate-ledger-accounts currently supports PostgreSQL only; no changes were made. See the smrt-ledgers README for SQLite.");
|
|
7322
7322
|
await autoDiscoverAndLoad();
|
|
7323
7323
|
const { getDatabase } = await import("@happyvertical/sql");
|
|
7324
|
-
const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-
|
|
7324
|
+
const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-DIGbZpp6.js");
|
|
7325
7325
|
db = await getDatabase({
|
|
7326
7326
|
type: dbType,
|
|
7327
7327
|
url: config.database.url
|
|
@@ -246,7 +246,7 @@ async function queryWithGlobals(collection, tenantId, label) {
|
|
|
246
246
|
createLogger({ level: "info" });
|
|
247
247
|
//#endregion
|
|
248
248
|
//#region ../tenancy/dist/index.js
|
|
249
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.54.
|
|
249
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.54.4","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"],"stampsConstructors":true}`));
|
|
250
250
|
var __defProp$2 = Object.defineProperty;
|
|
251
251
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
252
252
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
@@ -361,7 +361,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
361
361
|
if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" });
|
|
362
362
|
return target;
|
|
363
363
|
};
|
|
364
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.54.
|
|
364
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.54.4","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}`));
|
|
365
365
|
var PROMPT_CACHE_TTL_MS = 3e4;
|
|
366
366
|
var promptCache = /* @__PURE__ */ new Map();
|
|
367
367
|
var cacheGenerations = /* @__PURE__ */ new Map();
|
|
@@ -0,0 +1,20 @@
|
|
|
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-Cm6c206j.js";
|
|
5
|
+
import "./NostrIdentityCollection-CctlECpX-fkAPnK02.js";
|
|
6
|
+
import "./OidcIdentity-BjRu3n1g-DPfoJOJq.js";
|
|
7
|
+
import "./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js";
|
|
8
|
+
import "./ProfileAssetCollection-HeMtjBc0-BnvWWbZ6.js";
|
|
9
|
+
import { a as ProfileCollection } from "./ProfileCollection-Bt6IJK49-ir8YINdu.js";
|
|
10
|
+
import "./ProfileLinkCollection-u1hhzKTm-DN7eng_7.js";
|
|
11
|
+
import "./ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js";
|
|
12
|
+
import "./ProfileMetafieldCollection-Buz7gzag-DDlih_5j.js";
|
|
13
|
+
import "./ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js";
|
|
14
|
+
import "./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js";
|
|
15
|
+
import "./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js";
|
|
16
|
+
import "./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js";
|
|
17
|
+
import "./oidcProvisioningPrimitives-CYood-2M-D8npRnlS.js";
|
|
18
|
+
import "./resolveIdentity-CvGDegU6-DkEz2oV8.js";
|
|
19
|
+
import "./dist-D5GdZ8W6.js";
|
|
20
|
+
export { ProfileCollection };
|