@happyvertical/smrt-cli 0.51.24 → 0.51.25
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/AGENTS.md +1 -0
- package/README.md +1 -0
- package/dist/{ApiKey-BZmbOTnL-niFNV-7x.js → ApiKey-BZmbOTnL-BHFzurt7.js} +2 -2
- package/dist/ApiKeyCollection-Bfb_nw81-D8b3Nrg4.js +2 -0
- package/dist/AuditLogCollection-B1YonCAP-CpPE8zro.js +2 -0
- package/dist/{NostrIdentity-n70E0vck-C3qsu8zD.js → NostrIdentity-n70E0vck-Cga1lWU1.js} +3 -3
- package/dist/NostrIdentityCollection-Ca74dkaL-BKzq1O2N.js +2 -0
- package/dist/{OidcIdentity-K8V4u0CR-CwvImYYY.js → OidcIdentity-K8V4u0CR-buvSdd8D.js} +2 -2
- package/dist/OidcIdentityCollection-gnrLoF08-BsEJX0w8.js +2 -0
- package/dist/ProfileAssetCollection-CmbeSgDi-CcjX8UeG.js +2 -0
- package/dist/{ProfileCollection-DTT4KNpQ-BSl_c1i_.js → ProfileCollection-DTT4KNpQ-B2yHjF8e.js} +30 -653
- package/dist/ProfileMetadataCollection-DxX_BJKV-CqTZZ7O9.js +2 -0
- package/dist/{ProfileMetafieldCollection-CMKhVi2I-HKsCJDn7.js → ProfileMetafieldCollection-CMKhVi2I-BTguykyW.js} +1 -1
- package/dist/{ProfileRelationshipCollection-DUVgaIqf-DVwIEN1I.js → ProfileRelationshipCollection-DUVgaIqf-CdOJCU07.js} +1 -1
- package/dist/{ProfileRelationshipTermCollection-DtA9OM23-DhMqV5y2.js → ProfileRelationshipTermCollection-DtA9OM23-ug8uUFUp.js} +1 -1
- package/dist/{ProfileRelationshipType-BRiRka6t-CZxd9f0l.js → ProfileRelationshipType-BRiRka6t-B-lkyTB2.js} +1 -1
- package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-DWDh61w6.js → ProfileRelationshipTypeCollection-BdXwd7Kf-BUuZ3P72.js} +1 -1
- package/dist/{commands-CclKGZRp.js → commands-BVFlmHkE.js} +61 -1
- package/dist/dist-4XD0OZmB.js +1235 -0
- package/dist/dist-C-AYkaoT.js +813 -0
- package/dist/{dist-BHR0tsIO.js → dist-CaxtTrhT.js} +3 -3
- package/dist/{dist-C-yxvpyT.js → dist-VEFJWHIY.js} +25 -25
- package/dist/index.js +9 -9
- package/dist/{oidcProvisioningPrimitives-0-3n3D6f-iCSXDIAZ.js → oidcProvisioningPrimitives-0-3n3D6f-DpuGh5Ac.js} +4 -4
- package/dist/resolveIdentity-BrJDCjYi-DrBA1wFo.js +2 -0
- package/package.json +9 -8
- package/dist/ApiKeyCollection-Bfb_nw81-CNPNkzCL.js +0 -2
- package/dist/AuditLogCollection-B1YonCAP-IB02mJPz.js +0 -2
- package/dist/NostrIdentityCollection-Ca74dkaL-CUV-1Hzs.js +0 -2
- package/dist/OidcIdentityCollection-gnrLoF08-WIx_hLet.js +0 -2
- package/dist/ProfileAssetCollection-CmbeSgDi-BQd2qiDK.js +0 -2
- package/dist/ProfileMetadataCollection-DxX_BJKV-kpa3rgiI.js +0 -2
- package/dist/dist-0QjiSFH4.js +0 -190
- 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-
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Cga1lWU1.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-
|
|
130
|
+
const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-D8b3Nrg4.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;
|
|
@@ -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-
|
|
4100
|
+
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-BKzq1O2N.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-
|
|
4107
|
+
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-BKzq1O2N.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-
|
|
4114
|
+
const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-BKzq1O2N.js").then((n) => n.n);
|
|
4115
4115
|
return await (await NostrIdentityCollection.create(options)).findOne({ where: { nip05Username: username.toLowerCase() } });
|
|
4116
4116
|
}
|
|
4117
4117
|
/**
|
|
@@ -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-
|
|
38
|
+
const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-BsEJX0w8.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-
|
|
61
|
+
const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-BrJDCjYi-DrBA1wFo.js").then((n) => n.i);
|
|
62
62
|
const profileOptions = profile.options ?? {};
|
|
63
63
|
return (await reuseExistingOidcIdentityForProfile(profileId, {
|
|
64
64
|
email: oidcData.email,
|