@happyvertical/smrt-cli 0.51.24 → 0.51.26

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.md +1 -0
  2. package/README.md +1 -0
  3. package/dist/{ApiKey-BZmbOTnL-niFNV-7x.js → ApiKey-BZmbOTnL-R0YuUNnd.js} +2 -2
  4. package/dist/ApiKeyCollection-Bfb_nw81-BjaP6WB4.js +2 -0
  5. package/dist/AuditLogCollection-B1YonCAP-Bp6kDil8.js +2 -0
  6. package/dist/{NostrIdentity-n70E0vck-C3qsu8zD.js → NostrIdentity-n70E0vck-C3A6vRT7.js} +3 -3
  7. package/dist/NostrIdentityCollection-Ca74dkaL-oEUnuR0g.js +2 -0
  8. package/dist/{OidcIdentity-K8V4u0CR-CwvImYYY.js → OidcIdentity-K8V4u0CR--RbxfFxK.js} +2 -2
  9. package/dist/OidcIdentityCollection-gnrLoF08-5tNcW3tG.js +2 -0
  10. package/dist/ProfileAssetCollection-CmbeSgDi-CuuWlS3F.js +2 -0
  11. package/dist/{ProfileCollection-DTT4KNpQ-BSl_c1i_.js → ProfileCollection-DTT4KNpQ-BAPC6Q3f.js} +30 -653
  12. package/dist/{ProfileMetadataCollection-DxX_BJKV-kpa3rgiI.js → ProfileMetadataCollection-DxX_BJKV-jSqlQyvB.js} +1 -1
  13. package/dist/{ProfileMetafieldCollection-CMKhVi2I-HKsCJDn7.js → ProfileMetafieldCollection-CMKhVi2I-CHI-aX_c.js} +1 -1
  14. package/dist/{ProfileRelationshipCollection-DUVgaIqf-DVwIEN1I.js → ProfileRelationshipCollection-DUVgaIqf-DkDxcHHB.js} +1 -1
  15. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-DhMqV5y2.js → ProfileRelationshipTermCollection-DtA9OM23-BYAqAb7S.js} +1 -1
  16. package/dist/{ProfileRelationshipType-BRiRka6t-CZxd9f0l.js → ProfileRelationshipType-BRiRka6t-CBf_ReQk.js} +1 -1
  17. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-DWDh61w6.js → ProfileRelationshipTypeCollection-BdXwd7Kf-gXXsCQrv.js} +1 -1
  18. package/dist/{commands-CclKGZRp.js → commands-CF3-GhBK.js} +61 -1
  19. package/dist/dist--NU7xe0a.js +813 -0
  20. package/dist/{dist-C-yxvpyT.js → dist-C2Irk8dl.js} +25 -25
  21. package/dist/{dist-BHR0tsIO.js → dist-CACaNztx.js} +3 -3
  22. package/dist/dist-CbOoSQdV.js +1235 -0
  23. package/dist/index.js +9 -9
  24. package/dist/{oidcProvisioningPrimitives-0-3n3D6f-iCSXDIAZ.js → oidcProvisioningPrimitives-0-3n3D6f-bOuKYhnr.js} +4 -4
  25. package/dist/resolveIdentity-BrJDCjYi-wdS1avq8.js +2 -0
  26. package/package.json +9 -8
  27. package/dist/ApiKeyCollection-Bfb_nw81-CNPNkzCL.js +0 -2
  28. package/dist/AuditLogCollection-B1YonCAP-IB02mJPz.js +0 -2
  29. package/dist/NostrIdentityCollection-Ca74dkaL-CUV-1Hzs.js +0 -2
  30. package/dist/OidcIdentityCollection-gnrLoF08-WIx_hLet.js +0 -2
  31. package/dist/ProfileAssetCollection-CmbeSgDi-BQd2qiDK.js +0 -2
  32. package/dist/dist-0QjiSFH4.js +0 -190
  33. package/dist/resolveIdentity-BrJDCjYi-BtP8skcX.js +0 -2
package/AGENTS.md CHANGED
@@ -18,6 +18,7 @@ smrt db:migrate --apply-unblocked / --null-orphans # agents/db-migrate-partial-a
18
18
  smrt db:migrate-uuid # Convert schema-declared UUID text columns after data remap
19
19
  smrt db:migrate-int8
20
20
  smrt db:migrate-null-equal-indexes # ../core/agents/null-equal-indexes.md
21
+ smrt db:migrate-ledger-accounts [--dry-run] # Move pre-#3098 ledger rows out of `accounts` (smrt-ledgers README)
21
22
  smrt db:materialize-tenant-hierarchy [--dry-run] # smrt-users tenant hierarchy_path backfill (#3036)
22
23
  smrt db:drop-framework-base-tables # One-time drop of the five #2644-orphaned framework-base tables
23
24
  smrt db:drop-framework-base-tables --dry-run # Print the drop plan without executing
package/README.md CHANGED
@@ -48,6 +48,7 @@ The four snapshot options are atomic: supplying any one requires all four.
48
48
  | `smrt db:migrate --force-migration <exact-id> [--force-migration <exact-id>...]` | Force one or more exact generated migrations in one atomic batch while preserving every other guard |
49
49
  | `smrt db:migrate-uuid` | Convert schema-declared UUID text columns to native PostgreSQL uuid after data has been remapped |
50
50
  | `smrt db:migrate-int8` | Widen legacy pre-#2373 int4 columns to BIGINT after reviewing the maintenance-window preflight |
51
+ | `smrt db:migrate-ledger-accounts [--dry-run]` | Move smrt-ledgers accounts out of the pre-#3098 shared `accounts` table into `ledger_accounts` (PostgreSQL; run between two `db:migrate` passes — see the smrt-ledgers README) |
51
52
  | `smrt db:drop-framework-base-tables` | One-time removal of the five framework-base tables (`smrt_objects`, `smrt_classes`, `smrt_collections`, `smrt_hierarchicals`, `smrt_polymorphic_associations`) orphaned by #2644; refuses if any target table has rows, an unexpected shape, or an inbound foreign key |
52
53
  | `smrt db:drop-framework-base-tables --dry-run` | Print the drop plan (tables and companion indexes) without executing |
53
54
  | `smrt db:diff` | Show schema differences without generating migration files |
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-C3qsu8zD.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-C3A6vRT7.js";
3
3
  import { SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
4
4
  import { createHash, randomBytes } from "node:crypto";
5
5
  //#region ../profiles/dist/chunks/ApiKey-BZmbOTnL.js
@@ -127,7 +127,7 @@ var ApiKey = class extends SmrtObject {
127
127
  */
128
128
  static async verify(key, options = {}) {
129
129
  const keyHash = ApiKey.hashKey(key);
130
- const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-CNPNkzCL.js").then((n) => n.n);
130
+ const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-BjaP6WB4.js").then((n) => n.n);
131
131
  const apiKey = await (await ApiKeyCollection.create(options)).findOne({ where: { keyHash } });
132
132
  if (!apiKey) return null;
133
133
  if (!apiKey.isValid()) return null;
@@ -0,0 +1,2 @@
1
+ import { j as ApiKeyCollection_exports } from "./dist-C2Irk8dl.js";
2
+ export { ApiKeyCollection_exports as n };
@@ -0,0 +1,2 @@
1
+ import { k as AuditLogCollection_exports } from "./dist-C2Irk8dl.js";
2
+ export { AuditLogCollection_exports as n };
@@ -4097,21 +4097,21 @@ var NostrIdentity = class extends SmrtObject {
4097
4097
  * Find identity by public key
4098
4098
  */
4099
4099
  static async findByPubkey(pubkey, options = {}) {
4100
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-CUV-1Hzs.js").then((n) => n.n);
4100
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-oEUnuR0g.js").then((n) => n.n);
4101
4101
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { pubkey } });
4102
4102
  }
4103
4103
  /**
4104
4104
  * Find identity by email
4105
4105
  */
4106
4106
  static async findByEmail(email, options = {}) {
4107
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-CUV-1Hzs.js").then((n) => n.n);
4107
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-oEUnuR0g.js").then((n) => n.n);
4108
4108
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { email: email.toLowerCase() } });
4109
4109
  }
4110
4110
  /**
4111
4111
  * Find identity by NIP-05 username
4112
4112
  */
4113
4113
  static async findByNip05(username, options = {}) {
4114
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-CUV-1Hzs.js").then((n) => n.n);
4114
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-oEUnuR0g.js").then((n) => n.n);
4115
4115
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { nip05Username: username.toLowerCase() } });
4116
4116
  }
4117
4117
  /**
@@ -0,0 +1,2 @@
1
+ import { E as NostrIdentityCollection_exports } from "./dist-C2Irk8dl.js";
2
+ export { NostrIdentityCollection_exports as n };
@@ -35,7 +35,7 @@ var OidcIdentity = class extends SmrtObject {
35
35
  * Find identity by issuer and subject
36
36
  */
37
37
  static async findBySubject(issuer, subject, options = {}) {
38
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-WIx_hLet.js").then((n) => n.r);
38
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-5tNcW3tG.js").then((n) => n.r);
39
39
  return await (await OidcIdentityCollection.create(options)).findBySubject(issuer, subject);
40
40
  }
41
41
  /** Build the collision-free natural key for one OIDC issuer subject. */
@@ -58,7 +58,7 @@ var OidcIdentity = class extends SmrtObject {
58
58
  static async findOrCreate(profile, oidcData, options = {}) {
59
59
  const profileId = profile.id;
60
60
  if (typeof profileId !== "string" || !profileId) throw new Error("OidcIdentity.findOrCreate() requires a saved Profile.");
61
- const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-BrJDCjYi-BtP8skcX.js").then((n) => n.i);
61
+ const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-BrJDCjYi-wdS1avq8.js").then((n) => n.i);
62
62
  const profileOptions = profile.options ?? {};
63
63
  return (await reuseExistingOidcIdentityForProfile(profileId, {
64
64
  email: oidcData.email,
@@ -0,0 +1,2 @@
1
+ import { w as OidcIdentityCollection_exports } from "./dist-C2Irk8dl.js";
2
+ export { OidcIdentityCollection_exports as r };
@@ -0,0 +1,2 @@
1
+ import { x as ProfileAssetCollection_exports } from "./dist-C2Irk8dl.js";
2
+ export { ProfileAssetCollection_exports as n };