@happyvertical/smrt-cli 0.57.32 → 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 (33) hide show
  1. package/agents/app-commands.md +7 -0
  2. package/dist/{AuditLogCollection-BBbvr8Qc-CQO_jEU3.js → AuditLogCollection-BBbvr8Qc-C9rh5Bnq.js} +1 -1
  3. package/dist/{OidcIdentity-MVVO3MfG-DAJKtwvN.js → OidcIdentity-MVVO3MfG-CrJ6TKIo.js} +2 -2
  4. package/dist/{OidcIdentityCollection-s4mp3n62-MCk1oWcd.js → OidcIdentityCollection-s4mp3n62-CQmuAddQ.js} +1 -1
  5. package/dist/{PasswordCredentialService-DA2Y6H2X-KNcRQ8wr.js → PasswordCredentialService-DA2Y6H2X-B0tNMDWQ.js} +14 -14
  6. package/dist/{ProfileAssetCollection-BuVAdOiv-BwupfPyf.js → ProfileAssetCollection-BuVAdOiv-BXzD6rfR.js} +3 -3
  7. package/dist/{ProfileCollection-CMS9dFc0-CWXk_pS6.js → ProfileCollection-CMS9dFc0-BCWVwq2Z.js} +17 -17
  8. package/dist/{ProfileLinkCollection-ChK9iEBp-CYQf8PGl.js → ProfileLinkCollection-ChK9iEBp-bPqQu6Ik.js} +2 -2
  9. package/dist/{ProfileMetadataCollection-CAgJyjze-Da5AHKhY.js → ProfileMetadataCollection-CAgJyjze-Bs-f2gpY.js} +1 -1
  10. package/dist/{ProfileMetafieldCollection-19ae6Lpf-B-PZK-bQ.js → ProfileMetafieldCollection-19ae6Lpf-CULYYG5_.js} +1 -1
  11. package/dist/{ProfileRelationshipCollection-BFSlTQ7J-tV_Pf9EF.js → ProfileRelationshipCollection-BFSlTQ7J-BoaZirbE.js} +1 -1
  12. package/dist/{ProfileTypeCollection-B7m698Bl-YjI99YAL.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/json-validator.d.ts.map +1 -1
  19. package/dist/{commands-zAGW1smp.js → commands-DCI5b9aZ.js} +18 -9
  20. package/dist/discovery/manifest-discovery.d.ts.map +1 -1
  21. package/dist/{dist-C5FoIZTD.js → dist-B5Sc_4gt.js} +4 -4
  22. package/dist/{dist-UmF1WCLA.js → dist-ChjdBCfz.js} +3 -3
  23. package/dist/{dist-CJFtF_bS.js → dist-DT24mzvY.js} +5 -5
  24. package/dist/{dist-C9eoVZ4F.js → dist-tYOaRDZB.js} +2 -2
  25. package/dist/index.js +12 -12
  26. package/dist/{json-validator-CF2oQNDw.js → json-validator-CvSNoBrh.js} +10 -3
  27. package/dist/loaders/npm-loader.d.ts.map +1 -1
  28. package/dist/{oidcProvisioningPrimitives-Dl9qIcYS-IWZUKyf0.js → oidcProvisioningPrimitives-Dl9qIcYS-CnLvtTJk.js} +3 -3
  29. package/dist/{operator-CaW_RJ8E.js → operator-WT5To5kM.js} +2 -2
  30. package/dist/{portability-ClYZy8ut.js → portability-V05XvEu-.js} +1 -1
  31. package/dist/{resolveIdentity-CR5p_g7K-BzU4afEr.js → resolveIdentity-CR5p_g7K-JYvmLdOe.js} +14 -14
  32. package/dist/utils/generator.d.ts.map +1 -1
  33. package/package.json +13 -13
@@ -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-C9eoVZ4F.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-UmF1WCLA.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-CWXk_pS6.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-C9eoVZ4F.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-UmF1WCLA.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-YjI99YAL.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-B-PZK-bQ.js").then((n) => n.t).then((n) => n.n);
462
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Da5AHKhY.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-Da5AHKhY.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-B-PZK-bQ.js").then((n) => n.t).then((n) => n.n);
513
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-Da5AHKhY.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-CYQf8PGl.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-BwupfPyf.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-tV_Pf9EF.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-tV_Pf9EF.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-tV_Pf9EF.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-MCk1oWcd.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-MCk1oWcd.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-CQO_jEU3.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-CQO_jEU3.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-C9eoVZ4F.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-CWXk_pS6.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-C9eoVZ4F.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-C9eoVZ4F.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-C9eoVZ4F.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-C9eoVZ4F.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-CWXk_pS6.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,aA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C,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;IAChB,wEAAwE;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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ACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,CA2GjB;AAED,4EAA4E;AAC5E,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,UAAU,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}`);
@@ -1 +1 @@
1
- {"version":3,"file":"json-validator.d.ts","sourceRoot":"","sources":["../../src/commands/json-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAyB/B,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CACnC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqDxB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAM3E;AAuFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAA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AAI,CAAC,CA2DxB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAO3E;AAuFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,UAAU,CAAgC;gBAEtC,OAAO,EAAE,gBAAgB;IAMrC;;OAEG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA4B/D;;;;;;;OAOG;YACW,YAAY;IAwB1B;;OAEG;YACW,YAAY;IA8F1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAoFtB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAqEzB;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAoErB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA2HzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyF3B;;;;;;;;;;;;;;OAcG;YACW,mBAAmB;IAuGjC;;;;;;;;;OASG;IACG,UAAU,CAAC,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAoEnE;;OAEG;IACH,eAAe,CACb,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,MAAM,EAChB,YAAY,GAAE,MAAM,GAAG,IAAW,GACjC,iBAAiB;IAkCpB;;OAEG;IACH,OAAO,CAAC,YAAY;CAkBrB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,GACf,IAAI,CA0EN"}
@@ -17,7 +17,7 @@ import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
17
17
  import { extract } from "tar";
18
18
  import { access, cp, mkdir, open, readFile, rm, writeFile } from "node:fs/promises";
19
19
  import { createLogger } from "@happyvertical/logger";
20
- import glob from "fast-glob";
20
+ import { glob } from "tinyglobby";
21
21
  import { getPackageConfig, loadConfig, toAIClientOptions, tryResolveConfiguredAIProvider } from "@happyvertical/smrt-config";
22
22
  import { toSnakeCase as toSnakeCase$1 } from "@happyvertical/smrt-core/utils";
23
23
  import { checkKnowledgeGraphFreshness, discoverScopedPackageDirectories, readAgentModuleDocs, readPackageAgentDoc, resolveAgentModuleDocPaths } from "@happyvertical/smrt-core/knowledge";
@@ -416,6 +416,7 @@ async function findPackageManifests(projectRoot) {
416
416
  try {
417
417
  const packageJsonFiles = await glob("**/package.json", {
418
418
  cwd: nodeModulesPath,
419
+ expandDirectories: false,
419
420
  ignore: ["**/node_modules/**"],
420
421
  absolute: true,
421
422
  followSymbolicLinks: true
@@ -3097,9 +3098,9 @@ async function assertNoUnsupportedMigrationFiles(config, projectRoot = process.c
3097
3098
  const directory = resolve(projectRoot, config.migrations?.directory ?? "./migrations");
3098
3099
  const files = await glob(["*.sql", "*.ts"], {
3099
3100
  cwd: directory,
3101
+ expandDirectories: false,
3100
3102
  absolute: false,
3101
3103
  onlyFiles: true,
3102
- suppressErrors: true,
3103
3104
  ignore: ["*.d.ts"]
3104
3105
  });
3105
3106
  if (files.length > 0) throw new UnsupportedFileMigrationsError(files.sort(), directory);
@@ -6254,7 +6255,10 @@ async function findTemplateInPackages(shortName) {
6254
6255
  `${nodeModulesPath}/*/templates/${shortName}/template.config.{js,ts}`
6255
6256
  ];
6256
6257
  for (const pattern of patterns) {
6257
- const matches = await glob(pattern, { absolute: true });
6258
+ const matches = await glob(pattern, {
6259
+ absolute: true,
6260
+ expandDirectories: false
6261
+ });
6258
6262
  if (matches.length > 0) {
6259
6263
  const configPath = matches[0];
6260
6264
  return dirname(configPath);
@@ -6272,7 +6276,10 @@ async function discoverInstalledTemplates() {
6272
6276
  const patterns = [`${nodeModulesPath}/@*/templates/*/template.config.{js,ts}`, `${nodeModulesPath}/*/template.config.{js,ts}`];
6273
6277
  const templates = [];
6274
6278
  for (const pattern of patterns) {
6275
- const matches = await glob(pattern, { absolute: true });
6279
+ const matches = await glob(pattern, {
6280
+ absolute: true,
6281
+ expandDirectories: false
6282
+ });
6276
6283
  for (const configPath of matches) try {
6277
6284
  const module = await import(pathToFileURL(configPath).href);
6278
6285
  const config = module.default || module;
@@ -6502,6 +6509,7 @@ async function overlayTemplate(source, config, outputDir) {
6502
6509
  }
6503
6510
  const files = await glob("**/*", {
6504
6511
  cwd: sourceDir,
6512
+ expandDirectories: false,
6505
6513
  dot: true,
6506
6514
  onlyFiles: true,
6507
6515
  ignore: ["**/.gitkeep"]
@@ -6577,6 +6585,7 @@ async function processPlaceholders(outputDir, config, options) {
6577
6585
  else replacements[placeholder] = String(replacer);
6578
6586
  const files = await glob("**/*.{ts,js,mjs,cjs,json,svelte,html,css,md,txt,yml,yaml}", {
6579
6587
  cwd: outputDir,
6588
+ expandDirectories: false,
6580
6589
  onlyFiles: true,
6581
6590
  ignore: [
6582
6591
  "**/node_modules/**",
@@ -8404,7 +8413,7 @@ var dbMaterializeTenantHierarchyCommand = {
8404
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).");
8405
8414
  const dbType = config.database.type || "sqlite";
8406
8415
  const { getDatabase } = await import("@happyvertical/sql");
8407
- const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-C5FoIZTD.js");
8416
+ const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-B5Sc_4gt.js");
8408
8417
  db = await getDatabase({
8409
8418
  type: dbType,
8410
8419
  url: config.database.url
@@ -8613,7 +8622,7 @@ var dbMigrateLedgerAccountsCommand = {
8613
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.");
8614
8623
  await autoDiscoverAndLoad();
8615
8624
  const { getDatabase } = await import("@happyvertical/sql");
8616
- const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-CJFtF_bS.js");
8625
+ const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-DT24mzvY.js");
8617
8626
  db = await getDatabase({
8618
8627
  type: dbType,
8619
8628
  url: config.database.url
@@ -10788,7 +10797,7 @@ var usersProvisionOwnerCommand = {
10788
10797
  const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
10789
10798
  if (config.database?.type !== "postgres" || !config.database.url) throw new Error(FAILURE);
10790
10799
  const { getDatabase } = await import("@happyvertical/sql");
10791
- const { provisionPasswordOwner } = await import("./operator-CaW_RJ8E.js");
10800
+ const { provisionPasswordOwner } = await import("./operator-WT5To5kM.js");
10792
10801
  db = await getDatabase({
10793
10802
  type: "postgres",
10794
10803
  url: config.database.url
@@ -11145,7 +11154,7 @@ var utilityCommands = {
11145
11154
  description: "Application operations: install, setup, recover, start, stop, doctor, open, backup, export, import, migrate, worker, dev, build (`smrt app help`)",
11146
11155
  args: ["[operation]", "[args...]"],
11147
11156
  handler: async (args) => {
11148
- 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);
11149
11158
  const code = await runAppCommand(args);
11150
11159
  if (code !== 0) process.exitCode = code;
11151
11160
  }
@@ -11608,7 +11617,7 @@ export default testManifest;
11608
11617
  }
11609
11618
  }
11610
11619
  try {
11611
- const { resolveDataPath, discoverJsonFiles, JsonDatabaseValidator, displayValidationResults } = await import("./json-validator-CF2oQNDw.js");
11620
+ const { resolveDataPath, discoverJsonFiles, JsonDatabaseValidator, displayValidationResults } = await import("./json-validator-CvSNoBrh.js");
11612
11621
  const dataPath = await resolveDataPath(options.data);
11613
11622
  if (!dataPath) {
11614
11623
  console.error("\n❌ Could not find data directory");
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-discovery.d.ts","sourceRoot":"","sources":["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yBD"}
1
+ {"version":3,"file":"manifest-discovery.d.ts","sourceRoot":"","sources":["../../src/discovery/manifest-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAQD;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CA0ChD;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAY/B;AA2LD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAY7B;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBtE;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC;IACT,UAAU,EAAE,kBAAkB,E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