@happyvertical/smrt-cli 0.57.33 → 0.57.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/agents/app-commands.md +7 -0
  2. package/dist/{AuditLogCollection-BBbvr8Qc-C7vaibgn.js → AuditLogCollection-BBbvr8Qc-C9rh5Bnq.js} +1 -1
  3. package/dist/{OidcIdentity-MVVO3MfG-CDHPYDKP.js → OidcIdentity-MVVO3MfG-CrJ6TKIo.js} +2 -2
  4. package/dist/{OidcIdentityCollection-s4mp3n62-ClPe-MxG.js → OidcIdentityCollection-s4mp3n62-CQmuAddQ.js} +1 -1
  5. package/dist/{PasswordCredentialService-DA2Y6H2X-BkTtZgep.js → PasswordCredentialService-DA2Y6H2X-B0tNMDWQ.js} +14 -14
  6. package/dist/{ProfileAssetCollection-BuVAdOiv-CKDGq0OO.js → ProfileAssetCollection-BuVAdOiv-BXzD6rfR.js} +3 -3
  7. package/dist/{ProfileCollection-CMS9dFc0-B0_kJJIG.js → ProfileCollection-CMS9dFc0-BCWVwq2Z.js} +17 -17
  8. package/dist/{ProfileLinkCollection-ChK9iEBp-Beu_n0ym.js → ProfileLinkCollection-ChK9iEBp-bPqQu6Ik.js} +2 -2
  9. package/dist/{ProfileMetadataCollection-CAgJyjze-Dn6j8TLu.js → ProfileMetadataCollection-CAgJyjze-Bs-f2gpY.js} +1 -1
  10. package/dist/{ProfileMetafieldCollection-19ae6Lpf-DZnRqyHn.js → ProfileMetafieldCollection-19ae6Lpf-CULYYG5_.js} +1 -1
  11. package/dist/{ProfileRelationshipCollection-BFSlTQ7J-0GTVXG3H.js → ProfileRelationshipCollection-BFSlTQ7J-BoaZirbE.js} +1 -1
  12. package/dist/{ProfileTypeCollection-B7m698Bl-CKUBK94F.js → ProfileTypeCollection-B7m698Bl-4HCt4RyO.js} +2 -2
  13. package/dist/app/cli.d.ts.map +1 -1
  14. package/dist/app/launchers.d.ts +1 -1
  15. package/dist/app/launchers.d.ts.map +1 -1
  16. package/dist/app.js +2 -2
  17. package/dist/{cli-Cgj-996T.js → cli-CBuBU_5T.js} +6 -5
  18. package/dist/{commands-CBfRFp3s.js → commands-DCI5b9aZ.js} +4 -4
  19. package/dist/{dist-BwgLxo12.js → dist-B5Sc_4gt.js} +4 -4
  20. package/dist/{dist-Z6JJM0us.js → dist-ChjdBCfz.js} +3 -3
  21. package/dist/{dist-BecJGLYp.js → dist-DT24mzvY.js} +5 -5
  22. package/dist/{dist-DcVlOGxM.js → dist-tYOaRDZB.js} +2 -2
  23. package/dist/index.js +12 -12
  24. package/dist/{oidcProvisioningPrimitives-Dl9qIcYS-Yu7lvx1k.js → oidcProvisioningPrimitives-Dl9qIcYS-CnLvtTJk.js} +3 -3
  25. package/dist/{operator-BZ56_M87.js → operator-WT5To5kM.js} +2 -2
  26. package/dist/{portability-ClYZy8ut.js → portability-V05XvEu-.js} +1 -1
  27. package/dist/{resolveIdentity-CR5p_g7K-hJCNYtZ7.js → resolveIdentity-CR5p_g7K-JYvmLdOe.js} +14 -14
  28. package/package.json +10 -10
@@ -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-DcVlOGxM.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
- import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-Z6JJM0us.js";
4
+ import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-ChjdBCfz.js";
5
5
  import { SmrtJunction, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
6
6
  //#region ../profiles/dist/chunks/ProfileAssetCollection-BuVAdOiv.js
7
7
  var ProfileAssetCollection_BuVAdOiv_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-CMS9dFc0-B0_kJJIG.js").then((n) => n.r).then((n) => n.r);
87
+ const { ProfileCollection } = await import("./ProfileCollection-CMS9dFc0-BCWVwq2Z.js").then((n) => n.r).then((n) => n.r);
88
88
  this.profileCollectionPromise = ProfileCollection.create({ db: this.db });
89
89
  }
90
90
  return this.profileCollectionPromise;
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { d as getTenantId, i as tenantId, m as withSystemContext, n as resolvePrompt, o as queryGlobal, r as TenantScoped, s as queryWithGlobals, t as definePrompt } from "./dist-DcVlOGxM.js";
2
+ import { d as getTenantId, i as tenantId, m as withSystemContext, n as resolvePrompt, o as queryGlobal, r as TenantScoped, s as queryWithGlobals, t as definePrompt } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.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-Z6JJM0us.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-ChjdBCfz.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-CMS9dFc0.js
@@ -435,7 +435,7 @@ var Profile = class extends SmrtObject {
435
435
  async getTypeSlug() {
436
436
  const tenantId2 = this.tenantId || getTenantId();
437
437
  if (this.typeId && tenantId2) {
438
- const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7m698Bl-CKUBK94F.js").then((n) => n.n).then((n) => n.n);
438
+ const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7m698Bl-4HCt4RyO.js").then((n) => n.n).then((n) => n.n);
439
439
  return (await (await ProfileTypeCollection.create(this.options)).getAvailableById(this.typeId, tenantId2))?.slug ?? "";
440
440
  }
441
441
  return (await this.loadRelated("typeId"))?.slug || "";
@@ -458,8 +458,8 @@ var Profile = class extends SmrtObject {
458
458
  * @param value - The value to set
459
459
  */
460
460
  async addMetadata(metafieldSlug, value) {
461
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-DZnRqyHn.js").then((n) => n.t).then((n) => n.n);
462
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Dn6j8TLu.js").then((n) => n.t).then((n) => n.n);
461
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-CULYYG5_.js").then((n) => n.t).then((n) => n.n);
462
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Bs-f2gpY.js").then((n) => n.t).then((n) => n.n);
463
463
  const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
464
464
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
465
465
  await metafield.validateValue(value);
@@ -492,7 +492,7 @@ var Profile = class extends SmrtObject {
492
492
  * @returns Object with metafield slugs as keys
493
493
  */
494
494
  async getMetadata() {
495
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Dn6j8TLu.js").then((n) => n.t).then((n) => n.n);
495
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Bs-f2gpY.js").then((n) => n.t).then((n) => n.n);
496
496
  return await (await ProfileMetadataCollection.create(this.options)).getMetadataObject(this.id);
497
497
  }
498
498
  /**
@@ -509,8 +509,8 @@ var Profile = class extends SmrtObject {
509
509
  * @param metafieldSlug - The slug of the metafield to remove
510
510
  */
511
511
  async removeMetadata(metafieldSlug) {
512
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-DZnRqyHn.js").then((n) => n.t).then((n) => n.n);
513
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Dn6j8TLu.js").then((n) => n.t).then((n) => n.n);
512
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-CULYYG5_.js").then((n) => n.t).then((n) => n.n);
513
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Bs-f2gpY.js").then((n) => n.t).then((n) => n.n);
514
514
  const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
515
515
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
516
516
  const existing = await (await ProfileMetadataCollection.create(this.options)).list({
@@ -535,7 +535,7 @@ var Profile = class extends SmrtObject {
535
535
  return candidates.find((candidate) => ownerTenantId && candidate.tenantId === ownerTenantId) ?? candidates.find((candidate) => !candidate.tenantId) ?? null;
536
536
  }
537
537
  async getProfileLinkCollection() {
538
- const { ProfileLinkCollection } = await import("./ProfileLinkCollection-ChK9iEBp-Beu_n0ym.js").then((n) => n.t).then((n) => n.r);
538
+ const { ProfileLinkCollection } = await import("./ProfileLinkCollection-ChK9iEBp-bPqQu6Ik.js").then((n) => n.t).then((n) => n.r);
539
539
  return ProfileLinkCollection.create({ db: this.db });
540
540
  }
541
541
  /** This profile's web links in display order. */
@@ -552,7 +552,7 @@ var Profile = class extends SmrtObject {
552
552
  return (await this.getProfileLinkCollection()).replaceForProfile(this.id, links);
553
553
  }
554
554
  async getProfileAssetCollection() {
555
- const { ProfileAssetCollection } = await import("./ProfileAssetCollection-BuVAdOiv-CKDGq0OO.js").then((n) => n.t).then((n) => n.n);
555
+ const { ProfileAssetCollection } = await import("./ProfileAssetCollection-BuVAdOiv-BXzD6rfR.js").then((n) => n.t).then((n) => n.n);
556
556
  return ProfileAssetCollection.create({ db: this.db });
557
557
  }
558
558
  async getAssets(relationship) {
@@ -584,7 +584,7 @@ var Profile = class extends SmrtObject {
584
584
  */
585
585
  async addRelationship(toProfile, relationshipSlug, contextProfile) {
586
586
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
587
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-0GTVXG3H.js").then((n) => n.t).then((n) => n.n);
587
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BoaZirbE.js").then((n) => n.t).then((n) => n.n);
588
588
  const { ProfileRelationshipType } = await import("./ProfileRelationshipType-Cevy-vaF-G82Gg40q.js").then((n) => n.n).then((n) => n.n);
589
589
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
590
590
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
@@ -609,7 +609,7 @@ var Profile = class extends SmrtObject {
609
609
  * @returns Array of ProfileRelationship instances
610
610
  */
611
611
  async getRelationships(options) {
612
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-0GTVXG3H.js").then((n) => n.t).then((n) => n.n);
612
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BoaZirbE.js").then((n) => n.t).then((n) => n.n);
613
613
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
614
614
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
615
615
  const direction = options?.direction || "all";
@@ -654,7 +654,7 @@ var Profile = class extends SmrtObject {
654
654
  */
655
655
  async removeRelationship(toProfile, relationshipSlug) {
656
656
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
657
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-0GTVXG3H.js").then((n) => n.t).then((n) => n.n);
657
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BoaZirbE.js").then((n) => n.t).then((n) => n.n);
658
658
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
659
659
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
660
660
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
@@ -778,7 +778,7 @@ var Profile = class extends SmrtObject {
778
778
  * @returns Array of OIDC identity records
779
779
  */
780
780
  async getOidcIdentities() {
781
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-s4mp3n62-ClPe-MxG.js").then((n) => n.r).then((n) => n.r);
781
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-s4mp3n62-CQmuAddQ.js").then((n) => n.r).then((n) => n.r);
782
782
  return await (await OidcIdentityCollection.create(this.options)).findByProfile(this.id);
783
783
  }
784
784
  /**
@@ -791,7 +791,7 @@ var Profile = class extends SmrtObject {
791
791
  * type, but refuses to create or rebind authority.
792
792
  */
793
793
  async linkOidcIdentity(oidcData) {
794
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-s4mp3n62-ClPe-MxG.js").then((n) => n.r).then((n) => n.r);
794
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-s4mp3n62-CQmuAddQ.js").then((n) => n.r).then((n) => n.r);
795
795
  return await (await OidcIdentityCollection.create(this.options)).linkToProfile(this, oidcData);
796
796
  }
797
797
  /**
@@ -820,7 +820,7 @@ var Profile = class extends SmrtObject {
820
820
  * @returns Array of audit log entries
821
821
  */
822
822
  async getAuditLogs(limit = 50) {
823
- const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C7vaibgn.js").then((n) => n.t).then((n) => n.n);
823
+ const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C9rh5Bnq.js").then((n) => n.t).then((n) => n.n);
824
824
  return await (await AuditLogCollection.create(this.options)).getRecentActivity(this.id, limit);
825
825
  }
826
826
  /**
@@ -830,7 +830,7 @@ var Profile = class extends SmrtObject {
830
830
  * @returns The created audit log entry
831
831
  */
832
832
  async recordAction(options) {
833
- const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C7vaibgn.js").then((n) => n.t).then((n) => n.n);
833
+ const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C9rh5Bnq.js").then((n) => n.t).then((n) => n.n);
834
834
  return await (await AuditLogCollection.create(this.options)).record({
835
835
  profile: this,
836
836
  ...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-DcVlOGxM.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, foreignKey, isEmbeddedDatabase, smrt, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileLinkCollection-ChK9iEBp.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-CMS9dFc0-B0_kJJIG.js").then((n) => n.r).then((n) => n.r);
206
+ const { ProfileCollection } = await import("./ProfileCollection-CMS9dFc0-BCWVwq2Z.js").then((n) => n.r).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-DcVlOGxM.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileMetadataCollection-CAgJyjze.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-DcVlOGxM.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileMetafieldCollection-19ae6Lpf.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-DcVlOGxM.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, foreignKey, oneToMany, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileRelationshipCollection-BFSlTQ7J.js
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { l as withTenantGlobalRead, p as isSystemContext } from "./dist-DcVlOGxM.js";
2
+ import { l as withTenantGlobalRead, p as isSystemContext } from "./dist-tYOaRDZB.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
- import { i as ProfileType } from "./ProfileCollection-CMS9dFc0-B0_kJJIG.js";
4
+ import { i as ProfileType } from "./ProfileCollection-CMS9dFc0-BCWVwq2Z.js";
5
5
  import { SmrtCollection } from "@happyvertical/smrt-core";
6
6
  //#region ../profiles/dist/chunks/ProfileTypeCollection-B7m698Bl.js
7
7
  var ProfileTypeCollection_B7m698Bl_exports = /* @__PURE__ */ __exportAll({
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/app/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAKlB,MAAM,cAAc,CAAC;AAGtB,qDAAqD;AACrD,eAAO,MAAM,YAAY,8DACoC,CAAC;AAE9D,8EAA8E;AAC9E,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoBxD,CAAC;AAEH,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,EAAE,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3B,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAChD;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,kBAAkB,CAAC;IACzB,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC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E;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,KAAK,CAAC;CAC7B;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CA+B9D;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,MAAM,CAMtC;AAWD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,MAAM,CAAC,CA0EjB"}
@@ -12,7 +12,7 @@ import { type AppContext } from './runtime.js';
12
12
  * local writer is live, establish local storage custody without creating
13
13
  * schema or bootstrap records, then run `smrt db:migrate`.
14
14
  */
15
- export declare function prepareMigration(context: AppContext): Promise<number>;
15
+ export declare function prepareMigration(context: AppContext, args?: readonly string[]): Promise<number>;
16
16
  /** Worker kinds. `task` when omitted; anything else is a usage error. */
17
17
  export type WorkerKind = 'task' | 'schedule';
18
18
  /** Parse `smrt app worker [kind]`, refusing anything but `task`/`schedule`. */
@@ -1 +1 @@
1
- {"version":3,"file":"launchers.d.ts","sourceRoot":"","sources":["../../src/app/launchers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,cAAc,CAAC;AAElE;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC3E;AAED,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAI7C,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAOnE;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,CA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AU,EAAE,MAAM,GAAG,MAAM,CAyC3D;AAED,8EAA8E;AAC9E,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,EAAE,CAOV;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as assertExternalArtifactPath, C as prepareMigration, D as cliExecutablePath, E as validateMcpAppsIfPresent, F as AppCommandError, I as ApplicationStartError, M as resolveApplicationId, N as resolveApplicationStateRoot, O as runtimeEnvironment, P as runtimeConfigurationFingerprint, R as redactSecrets, S as launchVite, T as runWorker, _ as sendTerminationSignal, a as renderAppHelp, b as ViteLauncherError, c as parseTokenLifetime, d as START_OUTPUT_TAIL_BYTES, f as runApplicationOperation, g as readOwnedProcess, h as matchesApplicationProcess, i as errorEnvelope, j as prepareApplicationStateRoot, k as webLauncherPath, l as runTokenOperation, m as checkOwnedProcess, n as APP_RECOVERY, o as runAppCommand, p as WEB_LAUNCHER_NAME, s as TOKEN_USAGE, t as APP_COMMANDS, u as APP_OPERATIONS, v as verifyOwnedProcess, w as resolveViteEntry, x as devServerArguments, y as writeProcessRecord } from "./cli-Cgj-996T.js";
2
- import { C as publishFilesystemAssets, D as stageFilesystemAssets, E as rollbackFilesystemAssets, O as verifyFilesystemAssets, S as markFilesystemAssetsCommitted, T as recoverFilesystemAssets, _ as bundleContentDigest, a as manifestTables, b as finishFilesystemAssets, c as serializeExportBundle, d as AssetPortabilityError, f as MAX_ASSET_BYTES, g as assertAssetRoot, h as MAX_TOTAL_ASSET_BYTES, i as importedRowsMatchBundle, k as verifyPublishedFilesystemAssets, l as validateImportBundle, m as MAX_BUNDLE_BYTES, n as exportApplication, o as planImportTables, p as MAX_ASSET_COUNT, r as importApplication, t as executeImportPlan, u as ASSET_MANIFEST_SCHEMA_VERSION, v as collectFilesystemAssets, w as readSensitiveBundle, x as hasCommittedImportJournal, y as digestBytes } from "./portability-ClYZy8ut.js";
1
+ import { A as assertExternalArtifactPath, C as prepareMigration, D as cliExecutablePath, E as validateMcpAppsIfPresent, F as AppCommandError, I as ApplicationStartError, M as resolveApplicationId, N as resolveApplicationStateRoot, O as runtimeEnvironment, P as runtimeConfigurationFingerprint, R as redactSecrets, S as launchVite, T as runWorker, _ as sendTerminationSignal, a as renderAppHelp, b as ViteLauncherError, c as parseTokenLifetime, d as START_OUTPUT_TAIL_BYTES, f as runApplicationOperation, g as readOwnedProcess, h as matchesApplicationProcess, i as errorEnvelope, j as prepareApplicationStateRoot, k as webLauncherPath, l as runTokenOperation, m as checkOwnedProcess, n as APP_RECOVERY, o as runAppCommand, p as WEB_LAUNCHER_NAME, s as TOKEN_USAGE, t as APP_COMMANDS, u as APP_OPERATIONS, v as verifyOwnedProcess, w as resolveViteEntry, x as devServerArguments, y as writeProcessRecord } from "./cli-CBuBU_5T.js";
2
+ import { C as publishFilesystemAssets, D as stageFilesystemAssets, E as rollbackFilesystemAssets, O as verifyFilesystemAssets, S as markFilesystemAssetsCommitted, T as recoverFilesystemAssets, _ as bundleContentDigest, a as manifestTables, b as finishFilesystemAssets, c as serializeExportBundle, d as AssetPortabilityError, f as MAX_ASSET_BYTES, g as assertAssetRoot, h as MAX_TOTAL_ASSET_BYTES, i as importedRowsMatchBundle, k as verifyPublishedFilesystemAssets, l as validateImportBundle, m as MAX_BUNDLE_BYTES, n as exportApplication, o as planImportTables, p as MAX_ASSET_COUNT, r as importApplication, t as executeImportPlan, u as ASSET_MANIFEST_SCHEMA_VERSION, v as collectFilesystemAssets, w as readSensitiveBundle, x as hasCommittedImportJournal, y as digestBytes } from "./portability-V05XvEu-.js";
3
3
  import { PROVIDER_READINESS_SETTINGS, RECLAIM_MUTEX_FILE, acquireWriterLease, createProviderReadinessProbe, findInstalledPackage, isStaleOperationLock, lockOwnerPid, processExists, readActiveWriterLease, reclaimStaleRecord, resolveReadinessModule, withOperationLock } from "@happyvertical/smrt-app-runtime";
4
4
  export { APP_COMMANDS, APP_OPERATIONS, APP_RECOVERY, ASSET_MANIFEST_SCHEMA_VERSION, AppCommandError, ApplicationStartError, AssetPortabilityError, MAX_ASSET_BYTES, MAX_ASSET_COUNT, MAX_BUNDLE_BYTES, MAX_TOTAL_ASSET_BYTES, PROVIDER_READINESS_SETTINGS, RECLAIM_MUTEX_FILE, START_OUTPUT_TAIL_BYTES, TOKEN_USAGE, ViteLauncherError, WEB_LAUNCHER_NAME, acquireWriterLease, assertAssetRoot, assertExternalArtifactPath, bundleContentDigest, checkOwnedProcess, cliExecutablePath, collectFilesystemAssets, createProviderReadinessProbe, devServerArguments, digestBytes, errorEnvelope, executeImportPlan, exportApplication, findInstalledPackage, finishFilesystemAssets, hasCommittedImportJournal, importApplication, importedRowsMatchBundle, isStaleOperationLock, launchVite, lockOwnerPid, manifestTables, markFilesystemAssetsCommitted, matchesApplicationProcess, parseTokenLifetime, planImportTables, prepareApplicationStateRoot, prepareMigration, processExists, publishFilesystemAssets, readActiveWriterLease, readOwnedProcess, readSensitiveBundle, reclaimStaleRecord, recoverFilesystemAssets, redactSecrets, renderAppHelp, resolveApplicationId, resolveApplicationStateRoot, resolveReadinessModule, resolveViteEntry, rollbackFilesystemAssets, runAppCommand, runApplicationOperation, runTokenOperation, runWorker, runtimeConfigurationFingerprint, runtimeEnvironment, sendTerminationSignal, serializeExportBundle, stageFilesystemAssets, validateImportBundle, validateMcpAppsIfPresent, verifyFilesystemAssets, verifyOwnedProcess, verifyPublishedFilesystemAssets, webLauncherPath, withOperationLock, writeProcessRecord };
@@ -363,7 +363,8 @@ function runtimeEnvironment(context, runtime) {
363
363
  * local writer is live, establish local storage custody without creating
364
364
  * schema or bootstrap records, then run `smrt db:migrate`.
365
365
  */
366
- async function prepareMigration(context) {
366
+ async function prepareMigration(context, args = []) {
367
+ if (args.some((arg) => arg !== "--relax-columns") || args.length > 1) throw new AppCommandError("Usage: smrt app migrate [--relax-columns]", 2);
367
368
  const runtime = await context.deps.resolveRuntime(context.sourceRoot);
368
369
  const stateRoot = preparedStateRoot(context);
369
370
  await withOperationLock(stateRoot, "db:migrate", async () => {
@@ -387,7 +388,7 @@ async function prepareMigration(context) {
387
388
  env.DATABASE_URL = paths.database;
388
389
  env.SMRT_ASSETS_DIR = paths.assets;
389
390
  }
390
- const result = context.deps.runSmrt(["db:migrate"], {
391
+ const result = context.deps.runSmrt(["db:migrate", ...args], {
391
392
  env,
392
393
  allowFailure: true
393
394
  });
@@ -1291,7 +1292,7 @@ async function backup(context, args) {
1291
1292
  async function loadPortabilityAdapter(context) {
1292
1293
  const override = join(context.sourceRoot, "scripts", "smrt-portability.mjs");
1293
1294
  if (existsSync(override)) return await import(pathToFileURL(override).href);
1294
- return import("./portability-ClYZy8ut.js").then((n) => n.s);
1295
+ return import("./portability-V05XvEu-.js").then((n) => n.s);
1295
1296
  }
1296
1297
  async function portability(context, operation, args, operationLock) {
1297
1298
  const adapter = await loadPortabilityAdapter(context);
@@ -1543,7 +1544,7 @@ var APP_COMMANDS = Object.freeze({
1543
1544
  "backup [destination]": "Local: copy the private data root to a new directory",
1544
1545
  "export [path]": "Write a logical, asset-aware export bundle",
1545
1546
  "import <path>": "Import a logical export bundle into an empty application",
1546
- migrate: "Prepare storage custody and run smrt db:migrate under the lock",
1547
+ "migrate [--relax-columns]": "Prepare storage custody and run smrt db:migrate under the lock",
1547
1548
  "token [list|revoke <id>] [--scopes ...]": "Local: issue, list, or revoke a scoped bearer token for a local MCP client",
1548
1549
  "worker [task|schedule]": "Deployed: run the task or schedule worker",
1549
1550
  "dev [...vite args]": "Run the application's Vite dev server",
@@ -1634,7 +1635,7 @@ async function runAppCommand(argv, options = {}) {
1634
1635
  io,
1635
1636
  deps
1636
1637
  };
1637
- if (operation === "migrate") return await prepareMigration(context);
1638
+ if (operation === "migrate") return await prepareMigration(context, args);
1638
1639
  if (operation === "worker") return await runWorker(context, args);
1639
1640
  if (operation === "token") return await runTokenOperation(context, args);
1640
1641
  if (!APP_OPERATIONS.includes(operation)) throw new Error(`Unknown app operation: ${operation}`);
@@ -8413,7 +8413,7 @@ var dbMaterializeTenantHierarchyCommand = {
8413
8413
  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).");
8414
8414
  const dbType = config.database.type || "sqlite";
8415
8415
  const { getDatabase } = await import("@happyvertical/sql");
8416
- const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-BwgLxo12.js");
8416
+ const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-B5Sc_4gt.js");
8417
8417
  db = await getDatabase({
8418
8418
  type: dbType,
8419
8419
  url: config.database.url
@@ -8622,7 +8622,7 @@ var dbMigrateLedgerAccountsCommand = {
8622
8622
  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.");
8623
8623
  await autoDiscoverAndLoad();
8624
8624
  const { getDatabase } = await import("@happyvertical/sql");
8625
- const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-BecJGLYp.js");
8625
+ const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-DT24mzvY.js");
8626
8626
  db = await getDatabase({
8627
8627
  type: dbType,
8628
8628
  url: config.database.url
@@ -10797,7 +10797,7 @@ var usersProvisionOwnerCommand = {
10797
10797
  const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
10798
10798
  if (config.database?.type !== "postgres" || !config.database.url) throw new Error(FAILURE);
10799
10799
  const { getDatabase } = await import("@happyvertical/sql");
10800
- const { provisionPasswordOwner } = await import("./operator-BZ56_M87.js");
10800
+ const { provisionPasswordOwner } = await import("./operator-WT5To5kM.js");
10801
10801
  db = await getDatabase({
10802
10802
  type: "postgres",
10803
10803
  url: config.database.url
@@ -11154,7 +11154,7 @@ var utilityCommands = {
11154
11154
  description: "Application operations: install, setup, recover, start, stop, doctor, open, backup, export, import, migrate, worker, dev, build (`smrt app help`)",
11155
11155
  args: ["[operation]", "[args...]"],
11156
11156
  handler: async (args) => {
11157
- const { runAppCommand } = await import("./cli-Cgj-996T.js").then((n) => n.r);
11157
+ const { runAppCommand } = await import("./cli-CBuBU_5T.js").then((n) => n.r);
11158
11158
  const code = await runAppCommand(args);
11159
11159
  if (code !== 0) process.exitCode = code;
11160
11160
  }