@happyvertical/smrt-cli 0.54.2 → 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/{ApiKey-BZmbOTnL-BbZupUZ3.js → ApiKey-CVmlf3V6-BAeHuH48.js} +13 -5
- package/dist/{ApiKeyCollection-Bfb_nw81-DYAZwx0O.js → ApiKeyCollection-CiiDNFdD-CMGF3_ul.js} +5 -5
- package/dist/{AuditLogCollection-B1YonCAP-BPTsPePh.js → AuditLogCollection-WDHL-_AF-Cm6c206j.js} +33 -15
- package/dist/{NostrIdentity-n70E0vck-Di3_eNCq.js → NostrIdentity-AC8fAdxe-DKxKyu_a.js} +12 -4
- package/dist/{NostrIdentityCollection-Ca74dkaL-DvjOg9Xy.js → NostrIdentityCollection-CctlECpX-fkAPnK02.js} +4 -4
- package/dist/{OidcIdentity-Cb1bxreM-DO8v8PPX.js → OidcIdentity-BjRu3n1g-DPfoJOJq.js} +11 -3
- package/dist/{OidcIdentityCollection-TV8VdK69-CKJPi8VX.js → OidcIdentityCollection-B4jYh36_-CDCS-lBk.js} +5 -5
- package/dist/{ProfileAssetCollection-B9hacUJa-60k6WDBo.js → ProfileAssetCollection-HeMtjBc0-BnvWWbZ6.js} +16 -7
- package/dist/{ProfileCollection-DuJT7Mum-DuFdSzQj.js → ProfileCollection-Bt6IJK49-ir8YINdu.js} +53 -29
- package/dist/{ProfileLinkCollection-4uNURz32-DMtNzJcf.js → ProfileLinkCollection-u1hhzKTm-DN7eng_7.js} +14 -6
- package/dist/{ProfileMetadataCollection-DQhbfEfa-BKwTBhrv.js → ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js} +13 -5
- package/dist/{ProfileMetafieldCollection-CoBuM_5G-BMLo_Rie.js → ProfileMetafieldCollection-Buz7gzag-DDlih_5j.js} +13 -5
- package/dist/{ProfileRelationshipCollection-DUVgaIqf-c_BIh5H0.js → ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js} +16 -8
- package/dist/{ProfileRelationshipTermCollection-DtA9OM23-BoGhQBSQ.js → ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js} +12 -4
- package/dist/{ProfileRelationshipType-BRiRka6t-Dezjv5jP.js → ProfileRelationshipType-U7IwF6Wf-DNavf24e.js} +12 -4
- package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-HoTmV1q-.js → ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js} +5 -5
- package/dist/cli-generator.d.ts.map +1 -1
- package/dist/{commands-D-XOOzpO.js → commands-iFti-f80.js} +2 -2
- package/dist/{dist-DxolxjaP.js → dist-Bqg09MUx.js} +18 -2
- package/dist/dist-CrzK6GwA.js +20 -0
- package/dist/dist-D5GdZ8W6.js +4112 -0
- package/dist/{dist-DWOviNjs.js → dist-DIGbZpp6.js} +29 -5
- package/dist/dist-DJOzoOZn.js +1778 -0
- package/dist/index.js +26 -16
- package/dist/{oidcProvisioningPrimitives-D9OYu5-F-jUSih8OU.js → oidcProvisioningPrimitives-CYood-2M-D8npRnlS.js} +17 -7
- package/dist/{resolveIdentity-B-PK6RwU-Dp7_W7kZ.js → resolveIdentity-CvGDegU6-DkEz2oV8.js} +19 -19
- package/package.json +15 -15
- package/dist/dist-DqXOUqT-.js +0 -20
- package/dist/dist-NvkfhAbI.js +0 -3928
- package/dist/dist-RDQR2enZ.js +0 -1705
package/dist/{ProfileCollection-DuJT7Mum-DuFdSzQj.js → ProfileCollection-Bt6IJK49-ir8YINdu.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
3
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
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-
|
|
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
|
+
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-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
|
-
//#region ../profiles/dist/chunks/ProfileCollection-
|
|
8
|
-
var
|
|
7
|
+
//#region ../profiles/dist/chunks/ProfileCollection-Bt6IJK49.js
|
|
8
|
+
var ProfileCollection_Bt6IJK49_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
_: () => smrtProfilesGenerateBioPrompt,
|
|
10
10
|
a: () => Profile,
|
|
11
11
|
d: () => isOidcProvisioningRaceConflict,
|
|
@@ -49,12 +49,19 @@ function promptMessageOptions(ai) {
|
|
|
49
49
|
var ProfileType_exports = /* @__PURE__ */ __exportAll$1({ ProfileType: () => ProfileType });
|
|
50
50
|
var __defProp$2 = Object.defineProperty;
|
|
51
51
|
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
52
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value
|
|
57
|
+
}) : obj[key] = value;
|
|
52
58
|
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
53
59
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
54
60
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
55
61
|
if (kind && result) __defProp$2(target, key, result);
|
|
56
62
|
return result;
|
|
57
63
|
};
|
|
64
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
58
65
|
var ProfileType = class extends SmrtObject {
|
|
59
66
|
tenantId = null;
|
|
60
67
|
name = "";
|
|
@@ -74,6 +81,7 @@ var ProfileType = class extends SmrtObject {
|
|
|
74
81
|
return null;
|
|
75
82
|
}
|
|
76
83
|
};
|
|
84
|
+
__publicField$2(ProfileType, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
77
85
|
__decorateClass$2([tenantId({ nullable: true })], ProfileType.prototype, "tenantId", 2);
|
|
78
86
|
__decorateClass$2([field({ required: true })], ProfileType.prototype, "name", 2);
|
|
79
87
|
ProfileType = __decorateClass$2([TenantScoped({ mode: "optional" }), smrt({
|
|
@@ -341,12 +349,19 @@ async function withSavepoint(db, callback, createTransactionError) {
|
|
|
341
349
|
}
|
|
342
350
|
var __defProp$1 = Object.defineProperty;
|
|
343
351
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
352
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
353
|
+
enumerable: true,
|
|
354
|
+
configurable: true,
|
|
355
|
+
writable: true,
|
|
356
|
+
value
|
|
357
|
+
}) : obj[key] = value;
|
|
344
358
|
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
345
359
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
346
360
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
347
361
|
if (kind && result) __defProp$1(target, key, result);
|
|
348
362
|
return result;
|
|
349
363
|
};
|
|
364
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
350
365
|
var OidcProfileEmailReservation = class extends SmrtObject {
|
|
351
366
|
profileId;
|
|
352
367
|
emailKey = "";
|
|
@@ -356,6 +371,7 @@ var OidcProfileEmailReservation = class extends SmrtObject {
|
|
|
356
371
|
if (options.emailKey !== void 0) this.emailKey = options.emailKey;
|
|
357
372
|
}
|
|
358
373
|
};
|
|
374
|
+
__publicField$1(OidcProfileEmailReservation, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
359
375
|
__decorateClass$1([foreignKey("Profile", {
|
|
360
376
|
required: true,
|
|
361
377
|
unique: true
|
|
@@ -374,12 +390,19 @@ OidcProfileEmailReservation = __decorateClass$1([smrt({
|
|
|
374
390
|
})], OidcProfileEmailReservation);
|
|
375
391
|
var __defProp = Object.defineProperty;
|
|
376
392
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
393
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
394
|
+
enumerable: true,
|
|
395
|
+
configurable: true,
|
|
396
|
+
writable: true,
|
|
397
|
+
value
|
|
398
|
+
}) : obj[key] = value;
|
|
377
399
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
378
400
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
379
401
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
380
402
|
if (kind && result) __defProp(target, key, result);
|
|
381
403
|
return result;
|
|
382
404
|
};
|
|
405
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
383
406
|
var Profile = class extends SmrtObject {
|
|
384
407
|
tenantId = null;
|
|
385
408
|
typeId;
|
|
@@ -430,8 +453,8 @@ var Profile = class extends SmrtObject {
|
|
|
430
453
|
* @param value - The value to set
|
|
431
454
|
*/
|
|
432
455
|
async addMetadata(metafieldSlug, value) {
|
|
433
|
-
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-
|
|
434
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-
|
|
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);
|
|
435
458
|
const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
|
|
436
459
|
if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
|
|
437
460
|
await metafield.validateValue(value);
|
|
@@ -464,7 +487,7 @@ var Profile = class extends SmrtObject {
|
|
|
464
487
|
* @returns Object with metafield slugs as keys
|
|
465
488
|
*/
|
|
466
489
|
async getMetadata() {
|
|
467
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-
|
|
490
|
+
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-BIYKy4Y3-BUDJszIc.js").then((n) => n.r).then((n) => n.n);
|
|
468
491
|
return await (await ProfileMetadataCollection.create(this.options)).getMetadataObject(this.id);
|
|
469
492
|
}
|
|
470
493
|
/**
|
|
@@ -481,8 +504,8 @@ var Profile = class extends SmrtObject {
|
|
|
481
504
|
* @param metafieldSlug - The slug of the metafield to remove
|
|
482
505
|
*/
|
|
483
506
|
async removeMetadata(metafieldSlug) {
|
|
484
|
-
const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-
|
|
485
|
-
const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-
|
|
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);
|
|
486
509
|
const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
|
|
487
510
|
if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
|
|
488
511
|
const existing = await (await ProfileMetadataCollection.create(this.options)).list({
|
|
@@ -507,7 +530,7 @@ var Profile = class extends SmrtObject {
|
|
|
507
530
|
return candidates.find((candidate) => ownerTenantId && candidate.tenantId === ownerTenantId) ?? candidates.find((candidate) => !candidate.tenantId) ?? null;
|
|
508
531
|
}
|
|
509
532
|
async getProfileLinkCollection() {
|
|
510
|
-
const { ProfileLinkCollection } = await import("./ProfileLinkCollection-
|
|
533
|
+
const { ProfileLinkCollection } = await import("./ProfileLinkCollection-u1hhzKTm-DN7eng_7.js").then((n) => n.i).then((n) => n.r);
|
|
511
534
|
return ProfileLinkCollection.create({ db: this.db });
|
|
512
535
|
}
|
|
513
536
|
/** This profile's web links in display order. */
|
|
@@ -524,7 +547,7 @@ var Profile = class extends SmrtObject {
|
|
|
524
547
|
return (await this.getProfileLinkCollection()).replaceForProfile(this.id, links);
|
|
525
548
|
}
|
|
526
549
|
async getProfileAssetCollection() {
|
|
527
|
-
const { ProfileAssetCollection } = await import("./ProfileAssetCollection-
|
|
550
|
+
const { ProfileAssetCollection } = await import("./ProfileAssetCollection-HeMtjBc0-BnvWWbZ6.js").then((n) => n.r).then((n) => n.n);
|
|
528
551
|
return ProfileAssetCollection.create({ db: this.db });
|
|
529
552
|
}
|
|
530
553
|
async getAssets(relationship) {
|
|
@@ -555,9 +578,9 @@ var Profile = class extends SmrtObject {
|
|
|
555
578
|
* @param contextProfile - Optional context profile for tertiary relationships
|
|
556
579
|
*/
|
|
557
580
|
async addRelationship(toProfile, relationshipSlug, contextProfile) {
|
|
558
|
-
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-
|
|
559
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-
|
|
560
|
-
const { ProfileRelationshipType } = await import("./ProfileRelationshipType-
|
|
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-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
583
|
+
const { ProfileRelationshipType } = await import("./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js").then((n) => n.n).then((n) => n.n);
|
|
561
584
|
const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
|
|
562
585
|
if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
|
|
563
586
|
const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
|
|
@@ -581,8 +604,8 @@ var Profile = class extends SmrtObject {
|
|
|
581
604
|
* @returns Array of ProfileRelationship instances
|
|
582
605
|
*/
|
|
583
606
|
async getRelationships(options) {
|
|
584
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-
|
|
585
|
-
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-
|
|
607
|
+
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-C4g_QLI4-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
608
|
+
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js").then((n) => n.n).then((n) => n.n);
|
|
586
609
|
const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
|
|
587
610
|
const direction = options?.direction || "all";
|
|
588
611
|
let typeId;
|
|
@@ -625,8 +648,8 @@ var Profile = class extends SmrtObject {
|
|
|
625
648
|
* @param relationshipSlug - The type of relationship to remove
|
|
626
649
|
*/
|
|
627
650
|
async removeRelationship(toProfile, relationshipSlug) {
|
|
628
|
-
const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-
|
|
629
|
-
const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-
|
|
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-QJJ__ROk.js").then((n) => n.r).then((n) => n.n);
|
|
630
653
|
const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
|
|
631
654
|
if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
|
|
632
655
|
const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
|
|
@@ -719,7 +742,7 @@ var Profile = class extends SmrtObject {
|
|
|
719
742
|
* @returns Array of API keys
|
|
720
743
|
*/
|
|
721
744
|
async getApiKeys() {
|
|
722
|
-
const { ApiKeyCollection } = await import("./ApiKeyCollection-
|
|
745
|
+
const { ApiKeyCollection } = await import("./ApiKeyCollection-CiiDNFdD-CMGF3_ul.js").then((n) => n.n).then((n) => n.n);
|
|
723
746
|
return await (await ApiKeyCollection.create(this.options)).findByProfile(this.id);
|
|
724
747
|
}
|
|
725
748
|
/**
|
|
@@ -728,7 +751,7 @@ var Profile = class extends SmrtObject {
|
|
|
728
751
|
* @returns Array of active API keys
|
|
729
752
|
*/
|
|
730
753
|
async getActiveApiKeys() {
|
|
731
|
-
const { ApiKeyCollection } = await import("./ApiKeyCollection-
|
|
754
|
+
const { ApiKeyCollection } = await import("./ApiKeyCollection-CiiDNFdD-CMGF3_ul.js").then((n) => n.n).then((n) => n.n);
|
|
732
755
|
return await (await ApiKeyCollection.create(this.options)).findActiveByProfile(this.id);
|
|
733
756
|
}
|
|
734
757
|
/**
|
|
@@ -738,7 +761,7 @@ var Profile = class extends SmrtObject {
|
|
|
738
761
|
* @returns The generated key (plaintext) and ApiKey record
|
|
739
762
|
*/
|
|
740
763
|
async generateApiKey(options) {
|
|
741
|
-
const { ApiKey } = await import("./ApiKey-
|
|
764
|
+
const { ApiKey } = await import("./ApiKey-CVmlf3V6-BAeHuH48.js").then((n) => n.n).then((n) => n.n);
|
|
742
765
|
return await ApiKey.generate(this, {
|
|
743
766
|
...options,
|
|
744
767
|
db: this.options?.db
|
|
@@ -750,7 +773,7 @@ var Profile = class extends SmrtObject {
|
|
|
750
773
|
* @returns Array of OIDC identity records
|
|
751
774
|
*/
|
|
752
775
|
async getOidcIdentities() {
|
|
753
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-
|
|
776
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js").then((n) => n.r).then((n) => n.r);
|
|
754
777
|
return await (await OidcIdentityCollection.create(this.options)).findByProfile(this.id);
|
|
755
778
|
}
|
|
756
779
|
/**
|
|
@@ -763,7 +786,7 @@ var Profile = class extends SmrtObject {
|
|
|
763
786
|
* type, but refuses to create or rebind authority.
|
|
764
787
|
*/
|
|
765
788
|
async linkOidcIdentity(oidcData) {
|
|
766
|
-
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-
|
|
789
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-B4jYh36_-CDCS-lBk.js").then((n) => n.r).then((n) => n.r);
|
|
767
790
|
return await (await OidcIdentityCollection.create(this.options)).linkToProfile(this, oidcData);
|
|
768
791
|
}
|
|
769
792
|
/**
|
|
@@ -772,7 +795,7 @@ var Profile = class extends SmrtObject {
|
|
|
772
795
|
* @returns Array of Nostr identity records
|
|
773
796
|
*/
|
|
774
797
|
async getNostrIdentities() {
|
|
775
|
-
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-
|
|
798
|
+
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-fkAPnK02.js").then((n) => n.n).then((n) => n.n);
|
|
776
799
|
return await (await NostrIdentityCollection.create(this.options)).findByProfile(this.id);
|
|
777
800
|
}
|
|
778
801
|
/**
|
|
@@ -782,7 +805,7 @@ var Profile = class extends SmrtObject {
|
|
|
782
805
|
* @returns The linked Nostr identity record
|
|
783
806
|
*/
|
|
784
807
|
async linkNostrIdentity(nostrData) {
|
|
785
|
-
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-
|
|
808
|
+
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-fkAPnK02.js").then((n) => n.n).then((n) => n.n);
|
|
786
809
|
return await (await NostrIdentityCollection.create(this.options)).linkToProfile(this, nostrData);
|
|
787
810
|
}
|
|
788
811
|
/**
|
|
@@ -792,7 +815,7 @@ var Profile = class extends SmrtObject {
|
|
|
792
815
|
* @returns Array of audit log entries
|
|
793
816
|
*/
|
|
794
817
|
async getAuditLogs(limit = 50) {
|
|
795
|
-
const { AuditLogCollection } = await import("./AuditLogCollection-
|
|
818
|
+
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-Cm6c206j.js").then((n) => n.r).then((n) => n.n);
|
|
796
819
|
return await (await AuditLogCollection.create(this.options)).getRecentActivity(this.id, limit);
|
|
797
820
|
}
|
|
798
821
|
/**
|
|
@@ -802,13 +825,14 @@ var Profile = class extends SmrtObject {
|
|
|
802
825
|
* @returns The created audit log entry
|
|
803
826
|
*/
|
|
804
827
|
async recordAction(options) {
|
|
805
|
-
const { AuditLogCollection } = await import("./AuditLogCollection-
|
|
828
|
+
const { AuditLogCollection } = await import("./AuditLogCollection-WDHL-_AF-Cm6c206j.js").then((n) => n.r).then((n) => n.n);
|
|
806
829
|
return await (await AuditLogCollection.create(this.options)).record({
|
|
807
830
|
profile: this,
|
|
808
831
|
...options
|
|
809
832
|
});
|
|
810
833
|
}
|
|
811
834
|
};
|
|
835
|
+
__publicField(Profile, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
812
836
|
__decorateClass([tenantId({ nullable: true })], Profile.prototype, "tenantId", 2);
|
|
813
837
|
__decorateClass([foreignKey("ProfileType", { required: true })], Profile.prototype, "typeId", 2);
|
|
814
838
|
__decorateClass([field({
|
|
@@ -1165,4 +1189,4 @@ function readRequiredString(row, key) {
|
|
|
1165
1189
|
return value;
|
|
1166
1190
|
}
|
|
1167
1191
|
//#endregion
|
|
1168
|
-
export { ProfileCollection as a, coordinateOidcProvisioning as c, promptMessageOptions as d, saveOidcRaceArbiter as f, Profile as i, isOidcProvisioningRaceConflict as l, OidcProfileEmailReservation as n,
|
|
1192
|
+
export { ProfileCollection as a, coordinateOidcProvisioning as c, promptMessageOptions as d, saveOidcRaceArbiter as f, Profile as i, isOidcProvisioningRaceConflict as l, OidcProfileEmailReservation as n, ProfileCollection_Bt6IJK49_exports as o, smrtProfilesGenerateBioPrompt as p, OidcProfileEmailReservationCollection as r, ProfileType as s, CanonicalPersonProfileError as t, normalizeIdentityEmail as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
3
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
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
|
-
//#region ../profiles/dist/chunks/ProfileLinkCollection-
|
|
6
|
-
var
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileLinkCollection-u1hhzKTm.js
|
|
6
|
+
var ProfileLinkCollection_u1hhzKTm_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
a: () => PROFILE_LINK_MAX_URL_LENGTH,
|
|
8
8
|
c: () => isProfileLinkPlatform,
|
|
9
9
|
i: () => 200,
|
|
@@ -16,12 +16,19 @@ var ProfileLinkCollection_4uNURz32_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
});
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
19
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value
|
|
24
|
+
}) : obj[key] = value;
|
|
19
25
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
26
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
27
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
22
28
|
if (kind && result) __defProp(target, key, result);
|
|
23
29
|
return result;
|
|
24
30
|
};
|
|
31
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
25
32
|
var PROFILE_LINK_PLATFORMS = [
|
|
26
33
|
"facebook",
|
|
27
34
|
"instagram",
|
|
@@ -89,6 +96,7 @@ var ProfileLink = class extends SmrtObject {
|
|
|
89
96
|
return super.save(...args);
|
|
90
97
|
}
|
|
91
98
|
};
|
|
99
|
+
__publicField(ProfileLink, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
92
100
|
__decorateClass([tenantId({ nullable: true })], ProfileLink.prototype, "tenantId", 2);
|
|
93
101
|
__decorateClass([foreignKey("Profile", {
|
|
94
102
|
required: true,
|
|
@@ -195,7 +203,7 @@ var ProfileLinkCollection = class ProfileLinkCollection extends SmrtCollection {
|
|
|
195
203
|
/** The profile's tenant; throws when the profile is not visible here. */
|
|
196
204
|
async requireProfileTenant(profileId) {
|
|
197
205
|
if (!profileId) throw new Error("A profile link needs a profile");
|
|
198
|
-
const { ProfileCollection } = await import("./ProfileCollection-
|
|
206
|
+
const { ProfileCollection } = await import("./ProfileCollection-Bt6IJK49-ir8YINdu.js").then((n) => n.o).then((n) => n.r);
|
|
199
207
|
const profile = await (await ProfileCollection.create({ db: this.db })).get({ id: profileId });
|
|
200
208
|
if (!profile) throw new Error(`Profile '${profileId}' not found`);
|
|
201
209
|
return profile.tenantId ?? null;
|
|
@@ -230,4 +238,4 @@ function normalizeInputs(links) {
|
|
|
230
238
|
return out;
|
|
231
239
|
}
|
|
232
240
|
//#endregion
|
|
233
|
-
export { isProfileLinkPlatform as a,
|
|
241
|
+
export { isProfileLinkPlatform as a, ProfileLinkCollection_u1hhzKTm_exports as i, ProfileLink as n, normalizeProfileLinkUrl as o, ProfileLinkCollection as r, PROFILE_LINK_PLATFORMS as t };
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
3
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
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
|
-
//#region ../profiles/dist/chunks/ProfileMetadataCollection-
|
|
6
|
-
var
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileMetadataCollection-BIYKy4Y3.js
|
|
6
|
+
var ProfileMetadataCollection_BIYKy4Y3_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
n: () => ProfileMetadataCollection_exports,
|
|
8
8
|
r: () => ProfileMetadata,
|
|
9
9
|
t: () => ProfileMetadataCollection
|
|
10
10
|
});
|
|
11
11
|
var __defProp = Object.defineProperty;
|
|
12
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value
|
|
18
|
+
}) : obj[key] = value;
|
|
13
19
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
20
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
21
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
22
|
if (kind && result) __defProp(target, key, result);
|
|
17
23
|
return result;
|
|
18
24
|
};
|
|
25
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
26
|
var ProfileMetadata = class extends SmrtObject {
|
|
20
27
|
tenantId = null;
|
|
21
28
|
profileId;
|
|
@@ -47,6 +54,7 @@ var ProfileMetadata = class extends SmrtObject {
|
|
|
47
54
|
return (await this.loadRelated("metafieldId"))?.slug || "";
|
|
48
55
|
}
|
|
49
56
|
};
|
|
57
|
+
__publicField(ProfileMetadata, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
50
58
|
__decorateClass([tenantId({ nullable: true })], ProfileMetadata.prototype, "tenantId", 2);
|
|
51
59
|
__decorateClass([foreignKey("Profile", { required: true })], ProfileMetadata.prototype, "profileId", 2);
|
|
52
60
|
__decorateClass([foreignKey("ProfileMetafield", { required: true })], ProfileMetadata.prototype, "metafieldId", 2);
|
|
@@ -105,4 +113,4 @@ var ProfileMetadataCollection = class extends SmrtCollection {
|
|
|
105
113
|
}
|
|
106
114
|
};
|
|
107
115
|
//#endregion
|
|
108
|
-
export { ProfileMetadataCollection as n,
|
|
116
|
+
export { ProfileMetadataCollection as n, ProfileMetadataCollection_BIYKy4Y3_exports as r, ProfileMetadata as t };
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
3
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
3
|
+
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
4
4
|
import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
|
|
5
|
-
//#region ../profiles/dist/chunks/ProfileMetafieldCollection-
|
|
6
|
-
var
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileMetafieldCollection-Buz7gzag.js
|
|
6
|
+
var ProfileMetafieldCollection_Buz7gzag_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
n: () => ProfileMetafieldCollection_exports,
|
|
8
8
|
r: () => ProfileMetafield,
|
|
9
9
|
t: () => ProfileMetafieldCollection
|
|
10
10
|
});
|
|
11
11
|
var __defProp = Object.defineProperty;
|
|
12
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value
|
|
18
|
+
}) : obj[key] = value;
|
|
13
19
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
20
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
21
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
22
|
if (kind && result) __defProp(target, key, result);
|
|
17
23
|
return result;
|
|
18
24
|
};
|
|
25
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
26
|
function getCustomValidators() {
|
|
20
27
|
if (!globalThis.__smrtProfileMetafieldValidators) globalThis.__smrtProfileMetafieldValidators = /* @__PURE__ */ new Map();
|
|
21
28
|
return globalThis.__smrtProfileMetafieldValidators;
|
|
@@ -98,6 +105,7 @@ var ProfileMetafield = class extends SmrtObject {
|
|
|
98
105
|
return true;
|
|
99
106
|
}
|
|
100
107
|
};
|
|
108
|
+
__publicField(ProfileMetafield, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
101
109
|
__decorateClass([tenantId({ nullable: true })], ProfileMetafield.prototype, "tenantId", 2);
|
|
102
110
|
__decorateClass([field({ required: true })], ProfileMetafield.prototype, "name", 2);
|
|
103
111
|
ProfileMetafield = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
|
|
@@ -142,4 +150,4 @@ var ProfileMetafieldCollection = class extends SmrtCollection {
|
|
|
142
150
|
}
|
|
143
151
|
};
|
|
144
152
|
//#endregion
|
|
145
|
-
export { ProfileMetafieldCollection as n,
|
|
153
|
+
export { ProfileMetafieldCollection as n, ProfileMetafieldCollection_Buz7gzag_exports as r, ProfileMetafield as t };
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { i as tenantId, r as TenantScoped } from "./dist-
|
|
3
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-Bqg09MUx.js";
|
|
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
|
-
//#region ../profiles/dist/chunks/ProfileRelationshipCollection-
|
|
6
|
-
var
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipCollection-C4g_QLI4.js
|
|
6
|
+
var ProfileRelationshipCollection_C4g_QLI4_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
n: () => ProfileRelationshipCollection_exports,
|
|
8
8
|
r: () => ProfileRelationship,
|
|
9
9
|
t: () => ProfileRelationshipCollection
|
|
10
10
|
});
|
|
11
11
|
var __defProp = Object.defineProperty;
|
|
12
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value
|
|
18
|
+
}) : obj[key] = value;
|
|
13
19
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
20
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
21
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
22
|
if (kind && result) __defProp(target, key, result);
|
|
17
23
|
return result;
|
|
18
24
|
};
|
|
25
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
26
|
var ProfileRelationship = class extends SmrtObject {
|
|
20
27
|
tenantId = null;
|
|
21
28
|
fromProfileId;
|
|
@@ -47,7 +54,7 @@ var ProfileRelationship = class extends SmrtObject {
|
|
|
47
54
|
async addTerm(startedAt, endedAt) {
|
|
48
55
|
if (!this.id) throw new Error("ProfileRelationship.addTerm requires a persisted relationship (missing id)");
|
|
49
56
|
const relationshipId = this.id;
|
|
50
|
-
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-
|
|
57
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js").then((n) => n.r).then((n) => n.n);
|
|
51
58
|
await (await (await ProfileRelationshipTermCollection.create(this.options)).create({
|
|
52
59
|
relationshipId,
|
|
53
60
|
startedAt,
|
|
@@ -69,7 +76,7 @@ var ProfileRelationship = class extends SmrtObject {
|
|
|
69
76
|
* @returns Array of ProfileRelationshipTerm instances
|
|
70
77
|
*/
|
|
71
78
|
async getTerms() {
|
|
72
|
-
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-
|
|
79
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js").then((n) => n.r).then((n) => n.n);
|
|
73
80
|
return await (await ProfileRelationshipTermCollection.create(this.options)).getByRelationship(this.id);
|
|
74
81
|
}
|
|
75
82
|
/**
|
|
@@ -78,10 +85,11 @@ var ProfileRelationship = class extends SmrtObject {
|
|
|
78
85
|
* @returns Current term or null if none active
|
|
79
86
|
*/
|
|
80
87
|
async getActiveTerm() {
|
|
81
|
-
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-
|
|
88
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js").then((n) => n.r).then((n) => n.n);
|
|
82
89
|
return await (await ProfileRelationshipTermCollection.create(this.options)).getActiveTerm(this.id);
|
|
83
90
|
}
|
|
84
91
|
};
|
|
92
|
+
__publicField(ProfileRelationship, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
85
93
|
__decorateClass([tenantId({ nullable: true })], ProfileRelationship.prototype, "tenantId", 2);
|
|
86
94
|
__decorateClass([foreignKey("Profile", { required: true })], ProfileRelationship.prototype, "fromProfileId", 2);
|
|
87
95
|
__decorateClass([foreignKey("Profile", { required: true })], ProfileRelationship.prototype, "toProfileId", 2);
|
|
@@ -158,4 +166,4 @@ var ProfileRelationshipCollection = class extends SmrtCollection {
|
|
|
158
166
|
}
|
|
159
167
|
};
|
|
160
168
|
//#endregion
|
|
161
|
-
export { ProfileRelationshipCollection as n,
|
|
169
|
+
export { ProfileRelationshipCollection as n, ProfileRelationshipCollection_C4g_QLI4_exports as r, ProfileRelationship as t };
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
3
3
|
import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
4
|
-
//#region ../profiles/dist/chunks/ProfileRelationshipTermCollection-
|
|
5
|
-
var
|
|
4
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipTermCollection-C9J7mC7P.js
|
|
5
|
+
var ProfileRelationshipTermCollection_C9J7mC7P_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
n: () => ProfileRelationshipTermCollection_exports,
|
|
7
7
|
r: () => ProfileRelationshipTerm,
|
|
8
8
|
t: () => ProfileRelationshipTermCollection
|
|
9
9
|
});
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value
|
|
17
|
+
}) : obj[key] = value;
|
|
12
18
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
19
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
20
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
21
|
if (kind && result) __defProp(target, key, result);
|
|
16
22
|
return result;
|
|
17
23
|
};
|
|
24
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18
25
|
var ProfileRelationshipTerm = class extends SmrtObject {
|
|
19
26
|
relationshipId;
|
|
20
27
|
startedAt = /* @__PURE__ */ new Date();
|
|
@@ -53,6 +60,7 @@ var ProfileRelationshipTerm = class extends SmrtObject {
|
|
|
53
60
|
return Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
54
61
|
}
|
|
55
62
|
};
|
|
63
|
+
__publicField(ProfileRelationshipTerm, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
56
64
|
__decorateClass([foreignKey("ProfileRelationship", { required: true })], ProfileRelationshipTerm.prototype, "relationshipId", 2);
|
|
57
65
|
__decorateClass([field({ required: true })], ProfileRelationshipTerm.prototype, "startedAt", 2);
|
|
58
66
|
ProfileRelationshipTerm = __decorateClass([smrt({
|
|
@@ -104,4 +112,4 @@ var ProfileRelationshipTermCollection = class extends SmrtCollection {
|
|
|
104
112
|
}
|
|
105
113
|
};
|
|
106
114
|
//#endregion
|
|
107
|
-
export { ProfileRelationshipTermCollection as n,
|
|
115
|
+
export { ProfileRelationshipTermCollection as n, ProfileRelationshipTermCollection_C9J7mC7P_exports as r, ProfileRelationshipTerm as t };
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
3
3
|
import { SmrtObject, field, smrt } from "@happyvertical/smrt-core";
|
|
4
|
-
//#region ../profiles/dist/chunks/ProfileRelationshipType-
|
|
5
|
-
var
|
|
4
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipType-U7IwF6Wf.js
|
|
5
|
+
var ProfileRelationshipType_U7IwF6Wf_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
n: () => ProfileRelationshipType_exports,
|
|
7
7
|
t: () => ProfileRelationshipType
|
|
8
8
|
});
|
|
9
9
|
var ProfileRelationshipType_exports = /* @__PURE__ */ __exportAll$1({ ProfileRelationshipType: () => ProfileRelationshipType });
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value
|
|
17
|
+
}) : obj[key] = value;
|
|
12
18
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
19
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
20
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
21
|
if (kind && result) __defProp(target, key, result);
|
|
16
22
|
return result;
|
|
17
23
|
};
|
|
24
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18
25
|
function getReciprocalHandlers() {
|
|
19
26
|
if (!globalThis.__smrtProfileRelationshipHandlers) globalThis.__smrtProfileRelationshipHandlers = /* @__PURE__ */ new Map();
|
|
20
27
|
return globalThis.__smrtProfileRelationshipHandlers;
|
|
@@ -85,6 +92,7 @@ var ProfileRelationshipType = class extends SmrtObject {
|
|
|
85
92
|
return (await ProfileRelationshipType.getBySlug(slug))?.reciprocal || false;
|
|
86
93
|
}
|
|
87
94
|
};
|
|
95
|
+
__publicField(ProfileRelationshipType, "__smrtPackage__", "@happyvertical/smrt-profiles");
|
|
88
96
|
__decorateClass([field({ required: true })], ProfileRelationshipType.prototype, "name", 2);
|
|
89
97
|
ProfileRelationshipType = __decorateClass([smrt({
|
|
90
98
|
tableStrategy: "sti",
|
|
@@ -98,4 +106,4 @@ ProfileRelationshipType = __decorateClass([smrt({
|
|
|
98
106
|
cli: { skipApiCheck: true }
|
|
99
107
|
})], ProfileRelationshipType);
|
|
100
108
|
//#endregion
|
|
101
|
-
export {
|
|
109
|
+
export { ProfileRelationshipType_U7IwF6Wf_exports as n, ProfileRelationshipType as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { n as __exportAll$1 } from "./NostrIdentity-
|
|
3
|
-
import { t as ProfileRelationshipType } from "./ProfileRelationshipType-
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
|
|
3
|
+
import { t as ProfileRelationshipType } from "./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js";
|
|
4
4
|
import { SmrtCollection } from "@happyvertical/smrt-core";
|
|
5
|
-
//#region ../profiles/dist/chunks/ProfileRelationshipTypeCollection-
|
|
6
|
-
var
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipTypeCollection-_n22WqTb.js
|
|
6
|
+
var ProfileRelationshipTypeCollection__n22WqTb_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
n: () => ProfileRelationshipTypeCollection_exports,
|
|
8
8
|
t: () => ProfileRelationshipTypeCollection
|
|
9
9
|
});
|
|
@@ -54,4 +54,4 @@ var ProfileRelationshipTypeCollection = class extends SmrtCollection {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
//#endregion
|
|
57
|
-
export {
|
|
57
|
+
export { ProfileRelationshipTypeCollection__n22WqTb_exports as n, ProfileRelationshipTypeCollection as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-generator.d.ts","sourceRoot":"","sources":["../src/cli-generator.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAiBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AA2G9B,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IAC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;;;;;;OAcG;IACH,OAAO,CAAC,wBAAwB;IA2DhC;;;;OAIG;YACW,oBAAoB;IAuDlC;;OAEG;YACW,qBAAqB;IAsCnC;;OAEG;YACW,iBAAiB;IA6B/B;;;;;;;;OAQG;YACW,gBAAgB;IAmD9B;;;OAGG;YACW,mBAAmB;IA0CjC;;OAEG;YACW,sBAAsB;IAiUpC;;OAEG;IACG,cAAc,CAClB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,UAAU,EAAE,EACtB,aAAa,GAAE,MAAM,EAA0B,GAC9C,OAAO,CAAC,IAAI,CAAC;IAgLhB;;OAEG;YACW,cAAc;IAoD5B;;OAEG;IACH,uBAAuB,IAAI,UAAU,EAAE;IAqLvC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAwB3B;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA8GrD;;OAEG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAiCrB;;OAEG;YACW,MAAM;IAcpB;;OAEG;YACW,OAAO;IAKrB;;OAEG;YACW,UAAU;IA4CxB;;OAEG;YACW,SAAS;IAiCvB;;OAEG;YACW,YAAY;IA8C1B;;OAEG;YACW,YAAY;IA6D1B;;OAEG;YACW,YAAY;IAyC1B;;OAEG;YACW,kBAAkB;IA8HhC;;;OAGG;YACW,qBAAqB;IAyOnC;;;OAGG;YACW,aAAa;IA0D3B;;OAEG;YACW,eAAe;IAiC7B;;OAEG;IACH,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACH,OAAO,CAAC,YAAY;IAuBpB;;OAEG;IACH,OAAO,CAAC,YAAY;CAqBrB;AAGD,wBAAsB,IAAI,kBAuGzB"}
|
|
@@ -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
|