@happyvertical/smrt-cli 0.53.4 → 0.53.6
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 +2 -0
- package/README.md +24 -0
- package/agents/app-commands.md +28 -3
- package/dist/{ApiKey-BZmbOTnL-DPPF6Swn.js → ApiKey-BZmbOTnL-BbZupUZ3.js} +2 -2
- package/dist/ApiKeyCollection-Bfb_nw81-DYAZwx0O.js +87 -0
- package/dist/AuditLogCollection-B1YonCAP-Crf-dCr_.js +193 -0
- package/dist/{NostrIdentity-n70E0vck-D60BSg6H.js → NostrIdentity-n70E0vck-Di3_eNCq.js} +4 -4
- package/dist/NostrIdentityCollection-Ca74dkaL-DvjOg9Xy.js +127 -0
- package/dist/{OidcIdentity-Cb1bxreM-B2eV2ahq.js → OidcIdentity-Cb1bxreM-B6XDawZQ.js} +2 -2
- package/dist/OidcIdentityCollection-TV8VdK69-ZwKF9iwf.js +86 -0
- package/dist/ProfileAssetCollection-B9hacUJa-BS8VMInH.js +101 -0
- package/dist/{ProfileCollection-DuJT7Mum-B3Uhqphs.js → ProfileCollection-DuJT7Mum-CCKEl9oT.js} +31 -31
- package/dist/ProfileLinkCollection-4uNURz32-Vo7wyan6.js +233 -0
- package/dist/ProfileMetadataCollection-DQhbfEfa-OvHyg4k0.js +108 -0
- package/dist/ProfileMetafieldCollection-CoBuM_5G-KUHXgANZ.js +145 -0
- package/dist/ProfileRelationshipCollection-DUVgaIqf-CedyrKgX.js +161 -0
- package/dist/ProfileRelationshipTermCollection-DtA9OM23-BoGhQBSQ.js +107 -0
- package/dist/{ProfileRelationshipType-BRiRka6t-Ci-qvFhm.js → ProfileRelationshipType-BRiRka6t-Dezjv5jP.js} +1 -1
- package/dist/ProfileRelationshipTypeCollection-BdXwd7Kf-HoTmV1q-.js +57 -0
- package/dist/app/cli.d.ts +7 -0
- package/dist/app/cli.d.ts.map +1 -1
- package/dist/app/errors.d.ts +34 -1
- package/dist/app/errors.d.ts.map +1 -1
- package/dist/app/index.d.ts +4 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/launchers.d.ts +11 -0
- package/dist/app/launchers.d.ts.map +1 -1
- package/dist/app/operations.d.ts +2 -0
- package/dist/app/operations.d.ts.map +1 -1
- package/dist/app/runtime.d.ts +17 -2
- package/dist/app/runtime.d.ts.map +1 -1
- package/dist/app/tokens.d.ts +21 -0
- package/dist/app/tokens.d.ts.map +1 -0
- package/dist/app.js +3 -3
- package/dist/{cli-BRFsobey.js → cli-OZsH5cdL.js} +403 -76
- package/dist/cli-generator.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/utilities.d.ts.map +1 -1
- package/dist/{commands-dFz1e9A6.js → commands-C8SM-WRo.js} +35 -51
- package/dist/database-environment-D_Gk1Brf.js +20 -0
- package/dist/database-environment.d.ts +43 -0
- package/dist/database-environment.d.ts.map +1 -0
- package/dist/dist-BbDBCq3u.js +20 -0
- package/dist/{dist-D4BNILLN.js → dist-BcPl3hiD.js} +3 -3
- package/dist/{dist-Berwe80z.js → dist-BdrRmnpP.js} +4 -4
- package/dist/{dist-EJ63xUEp.js → dist-DbMWqynv.js} +2 -2
- package/dist/{dist-C2BqYVu7.js → dist-VNy6NiC_.js} +1654 -1748
- package/dist/index.js +15 -10
- package/dist/{oidcProvisioningPrimitives-D9OYu5-F-B-kYsBTM.js → oidcProvisioningPrimitives-D9OYu5-F-Cc2KYoAb.js} +5 -5
- package/dist/{portability-DmQWSSXA.js → portability-CES1YC2m.js} +1 -1
- package/dist/resolveIdentity-B-PK6RwU-JMNQ4YZ7.js +269 -0
- package/package.json +15 -15
- package/dist/ApiKeyCollection-Bfb_nw81-B1-2YKj8.js +0 -2
- package/dist/AuditLogCollection-B1YonCAP-DP4PCCw-.js +0 -2
- package/dist/NostrIdentityCollection-Ca74dkaL-C-v57o9N.js +0 -2
- package/dist/OidcIdentityCollection-TV8VdK69-BodvOtPJ.js +0 -2
- package/dist/ProfileAssetCollection-B9hacUJa-B7PLe0ld.js +0 -2
- package/dist/ProfileLinkCollection-4uNURz32-CLY1cBnn.js +0 -2
- package/dist/ProfileMetadataCollection-DQhbfEfa-Bzv-E4ep.js +0 -2
- package/dist/ProfileMetafieldCollection-CoBuM_5G-D-VqQuY1.js +0 -2
- package/dist/ProfileRelationshipCollection-DUVgaIqf-gEkDBmkh.js +0 -2
- package/dist/ProfileRelationshipTermCollection-DtA9OM23-DI_awdol.js +0 -2
- package/dist/ProfileRelationshipTypeCollection-BdXwd7Kf-CaQMLH9f.js +0 -2
- package/dist/resolveIdentity-B-PK6RwU-BmAU1Kse.js +0 -2
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-DbMWqynv.js";
|
|
3
|
+
import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Di3_eNCq.js";
|
|
4
|
+
import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileMetafieldCollection-CoBuM_5G.js
|
|
6
|
+
var ProfileMetafieldCollection_CoBuM_5G_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
n: () => ProfileMetafieldCollection_exports,
|
|
8
|
+
r: () => ProfileMetafield,
|
|
9
|
+
t: () => ProfileMetafieldCollection
|
|
10
|
+
});
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
function getCustomValidators() {
|
|
20
|
+
if (!globalThis.__smrtProfileMetafieldValidators) globalThis.__smrtProfileMetafieldValidators = /* @__PURE__ */ new Map();
|
|
21
|
+
return globalThis.__smrtProfileMetafieldValidators;
|
|
22
|
+
}
|
|
23
|
+
var ProfileMetafield = class extends SmrtObject {
|
|
24
|
+
tenantId = null;
|
|
25
|
+
name = "";
|
|
26
|
+
description;
|
|
27
|
+
validation;
|
|
28
|
+
constructor(options = {}) {
|
|
29
|
+
super(options);
|
|
30
|
+
if (options.name) this.name = options.name;
|
|
31
|
+
if (options.description !== void 0) this.description = options.description;
|
|
32
|
+
if (options.validation !== void 0) this.validation = options.validation;
|
|
33
|
+
if (options.tenantId !== void 0) this.tenantId = options.tenantId;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Convenience method for slug-based lookup
|
|
37
|
+
*
|
|
38
|
+
* @param slug - The slug to search for
|
|
39
|
+
* @returns ProfileMetafield instance or null if not found
|
|
40
|
+
*/
|
|
41
|
+
static async getBySlug(_slug) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Register a custom validator function
|
|
46
|
+
*
|
|
47
|
+
* @param name - Name of the validator (used in validation.custom field)
|
|
48
|
+
* @param validator - The validator function
|
|
49
|
+
*/
|
|
50
|
+
static registerValidator(name, validator) {
|
|
51
|
+
getCustomValidators().set(name, validator);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get a registered custom validator
|
|
55
|
+
*
|
|
56
|
+
* @param name - Name of the validator
|
|
57
|
+
* @returns The validator function or undefined
|
|
58
|
+
*/
|
|
59
|
+
static getValidator(name) {
|
|
60
|
+
return getCustomValidators().get(name);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Validate a value against this metafield's validation schema
|
|
64
|
+
*
|
|
65
|
+
* @param value - The value to validate
|
|
66
|
+
* @returns True if valid, throws ValidationError if invalid
|
|
67
|
+
*/
|
|
68
|
+
async validateValue(value) {
|
|
69
|
+
if (!this.validation) return true;
|
|
70
|
+
const schema = this.validation;
|
|
71
|
+
if (schema.type) {
|
|
72
|
+
const actualType = typeof value;
|
|
73
|
+
const expectedType = schema.type;
|
|
74
|
+
if (expectedType === "number" && actualType !== "number") throw new Error(schema.message || `Expected ${expectedType}, got ${actualType}`);
|
|
75
|
+
if (expectedType === "string" && actualType !== "string") throw new Error(schema.message || `Expected ${expectedType}, got ${actualType}`);
|
|
76
|
+
if (expectedType === "boolean" && actualType !== "boolean") throw new Error(schema.message || `Expected ${expectedType}, got ${actualType}`);
|
|
77
|
+
}
|
|
78
|
+
if (schema.pattern && typeof value === "string") {
|
|
79
|
+
if (!new RegExp(schema.pattern).test(value)) throw new Error(schema.message || "Pattern validation failed");
|
|
80
|
+
}
|
|
81
|
+
if (schema.minLength && typeof value === "string") {
|
|
82
|
+
if (value.length < schema.minLength) throw new Error(schema.message || `Minimum length is ${schema.minLength}, got ${value.length}`);
|
|
83
|
+
}
|
|
84
|
+
if (schema.maxLength && typeof value === "string") {
|
|
85
|
+
if (value.length > schema.maxLength) throw new Error(schema.message || `Maximum length is ${schema.maxLength}, got ${value.length}`);
|
|
86
|
+
}
|
|
87
|
+
if (schema.min !== void 0 && typeof value === "number") {
|
|
88
|
+
if (value < schema.min) throw new Error(schema.message || `Value must be at least ${schema.min}`);
|
|
89
|
+
}
|
|
90
|
+
if (schema.max !== void 0 && typeof value === "number") {
|
|
91
|
+
if (value > schema.max) throw new Error(schema.message || `Value must be at most ${schema.max}`);
|
|
92
|
+
}
|
|
93
|
+
if (schema.custom) {
|
|
94
|
+
const validator = ProfileMetafield.getValidator(schema.custom);
|
|
95
|
+
if (!validator) throw new Error(`Custom validator '${schema.custom}' not registered`);
|
|
96
|
+
if (!await validator(value)) throw new Error(schema.message || "Custom validation failed");
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
__decorateClass([tenantId({ nullable: true })], ProfileMetafield.prototype, "tenantId", 2);
|
|
102
|
+
__decorateClass([field({ required: true })], ProfileMetafield.prototype, "name", 2);
|
|
103
|
+
ProfileMetafield = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
|
|
104
|
+
tableStrategy: "sti",
|
|
105
|
+
api: { include: [
|
|
106
|
+
"list",
|
|
107
|
+
"get",
|
|
108
|
+
"create",
|
|
109
|
+
"update"
|
|
110
|
+
] },
|
|
111
|
+
mcp: { include: ["list", "get"] },
|
|
112
|
+
cli: { skipApiCheck: true }
|
|
113
|
+
})], ProfileMetafield);
|
|
114
|
+
var ProfileMetafieldCollection_exports = /* @__PURE__ */ __exportAll$1({ ProfileMetafieldCollection: () => ProfileMetafieldCollection });
|
|
115
|
+
var ProfileMetafieldCollection = class extends SmrtCollection {
|
|
116
|
+
static _itemClass = ProfileMetafield;
|
|
117
|
+
/**
|
|
118
|
+
* Get metafield by slug
|
|
119
|
+
*
|
|
120
|
+
* @param slug - The slug to search for
|
|
121
|
+
* @returns ProfileMetafield instance or null
|
|
122
|
+
*/
|
|
123
|
+
async getBySlug(slug) {
|
|
124
|
+
return await this.get({ slug });
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get or create a metafield by slug
|
|
128
|
+
*
|
|
129
|
+
* @param slug - The slug to search for
|
|
130
|
+
* @param defaults - Default values if creating
|
|
131
|
+
* @returns ProfileMetafield instance
|
|
132
|
+
*/
|
|
133
|
+
async getOrCreateBySlug(slug, defaults) {
|
|
134
|
+
const existing = await this.getBySlug(slug);
|
|
135
|
+
if (existing) return existing;
|
|
136
|
+
const metafield = await this.create({
|
|
137
|
+
slug,
|
|
138
|
+
...defaults
|
|
139
|
+
});
|
|
140
|
+
await metafield.save();
|
|
141
|
+
return metafield;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { ProfileMetafieldCollection as n, ProfileMetafieldCollection_CoBuM_5G_exports as r, ProfileMetafield as t };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { i as tenantId, r as TenantScoped } from "./dist-DbMWqynv.js";
|
|
3
|
+
import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Di3_eNCq.js";
|
|
4
|
+
import { SmrtCollection, SmrtObject, foreignKey, oneToMany, smrt } from "@happyvertical/smrt-core";
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipCollection-DUVgaIqf.js
|
|
6
|
+
var ProfileRelationshipCollection_DUVgaIqf_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
n: () => ProfileRelationshipCollection_exports,
|
|
8
|
+
r: () => ProfileRelationship,
|
|
9
|
+
t: () => ProfileRelationshipCollection
|
|
10
|
+
});
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
var ProfileRelationship = class extends SmrtObject {
|
|
20
|
+
tenantId = null;
|
|
21
|
+
fromProfileId;
|
|
22
|
+
toProfileId;
|
|
23
|
+
typeId;
|
|
24
|
+
contextProfileId;
|
|
25
|
+
terms = [];
|
|
26
|
+
constructor(options = {}) {
|
|
27
|
+
super(options);
|
|
28
|
+
if (options.fromProfileId !== void 0) this.fromProfileId = options.fromProfileId;
|
|
29
|
+
if (options.toProfileId !== void 0) this.toProfileId = options.toProfileId;
|
|
30
|
+
if (options.typeId !== void 0) this.typeId = options.typeId;
|
|
31
|
+
if (options.contextProfileId !== void 0) this.contextProfileId = options.contextProfileId;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get the relationship type slug
|
|
35
|
+
*
|
|
36
|
+
* @returns The slug of the relationship type
|
|
37
|
+
*/
|
|
38
|
+
async getTypeSlug() {
|
|
39
|
+
return (await this.loadRelated("typeId"))?.slug || "";
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Add a term (time period) to this relationship
|
|
43
|
+
*
|
|
44
|
+
* @param startedAt - Start date of the term
|
|
45
|
+
* @param endedAt - Optional end date of the term
|
|
46
|
+
*/
|
|
47
|
+
async addTerm(startedAt, endedAt) {
|
|
48
|
+
if (!this.id) throw new Error("ProfileRelationship.addTerm requires a persisted relationship (missing id)");
|
|
49
|
+
const relationshipId = this.id;
|
|
50
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-DtA9OM23-BoGhQBSQ.js").then((n) => n.r).then((n) => n.n);
|
|
51
|
+
await (await (await ProfileRelationshipTermCollection.create(this.options)).create({
|
|
52
|
+
relationshipId,
|
|
53
|
+
startedAt,
|
|
54
|
+
endedAt
|
|
55
|
+
})).save();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* End the current active term
|
|
59
|
+
*
|
|
60
|
+
* @param endedAt - End date for the term
|
|
61
|
+
*/
|
|
62
|
+
async endCurrentTerm(endedAt) {
|
|
63
|
+
const activeTerm = await this.getActiveTerm();
|
|
64
|
+
if (activeTerm) await activeTerm.end(endedAt);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get all terms for this relationship
|
|
68
|
+
*
|
|
69
|
+
* @returns Array of ProfileRelationshipTerm instances
|
|
70
|
+
*/
|
|
71
|
+
async getTerms() {
|
|
72
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-DtA9OM23-BoGhQBSQ.js").then((n) => n.r).then((n) => n.n);
|
|
73
|
+
return await (await ProfileRelationshipTermCollection.create(this.options)).getByRelationship(this.id);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the active term (no end date)
|
|
77
|
+
*
|
|
78
|
+
* @returns Current term or null if none active
|
|
79
|
+
*/
|
|
80
|
+
async getActiveTerm() {
|
|
81
|
+
const { ProfileRelationshipTermCollection } = await import("./ProfileRelationshipTermCollection-DtA9OM23-BoGhQBSQ.js").then((n) => n.r).then((n) => n.n);
|
|
82
|
+
return await (await ProfileRelationshipTermCollection.create(this.options)).getActiveTerm(this.id);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorateClass([tenantId({ nullable: true })], ProfileRelationship.prototype, "tenantId", 2);
|
|
86
|
+
__decorateClass([foreignKey("Profile", { required: true })], ProfileRelationship.prototype, "fromProfileId", 2);
|
|
87
|
+
__decorateClass([foreignKey("Profile", { required: true })], ProfileRelationship.prototype, "toProfileId", 2);
|
|
88
|
+
__decorateClass([foreignKey("ProfileRelationshipType", { required: true })], ProfileRelationship.prototype, "typeId", 2);
|
|
89
|
+
__decorateClass([foreignKey("Profile")], ProfileRelationship.prototype, "contextProfileId", 2);
|
|
90
|
+
__decorateClass([oneToMany("ProfileRelationshipTerm")], ProfileRelationship.prototype, "terms", 2);
|
|
91
|
+
ProfileRelationship = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
|
|
92
|
+
tableStrategy: "sti",
|
|
93
|
+
api: { include: [
|
|
94
|
+
"list",
|
|
95
|
+
"get",
|
|
96
|
+
"create",
|
|
97
|
+
"delete"
|
|
98
|
+
] },
|
|
99
|
+
mcp: { include: ["list", "get"] },
|
|
100
|
+
cli: { skipApiCheck: true }
|
|
101
|
+
})], ProfileRelationship);
|
|
102
|
+
var ProfileRelationshipCollection_exports = /* @__PURE__ */ __exportAll$1({ ProfileRelationshipCollection: () => ProfileRelationshipCollection });
|
|
103
|
+
var ProfileRelationshipCollection = class extends SmrtCollection {
|
|
104
|
+
static _itemClass = ProfileRelationship;
|
|
105
|
+
/**
|
|
106
|
+
* Get all relationships from a profile
|
|
107
|
+
*
|
|
108
|
+
* @param fromProfileId - The origin profile UUID
|
|
109
|
+
* @param typeId - Optional filter by relationship type UUID
|
|
110
|
+
* @returns Array of ProfileRelationship instances
|
|
111
|
+
*/
|
|
112
|
+
async getFromProfile(fromProfileId, typeId) {
|
|
113
|
+
const where = { fromProfileId };
|
|
114
|
+
if (typeId) where.typeId = typeId;
|
|
115
|
+
return await this.list({ where });
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get all relationships to a profile
|
|
119
|
+
*
|
|
120
|
+
* @param toProfileId - The target profile UUID
|
|
121
|
+
* @param typeId - Optional filter by relationship type UUID
|
|
122
|
+
* @returns Array of ProfileRelationship instances
|
|
123
|
+
*/
|
|
124
|
+
async getToProfile(toProfileId, typeId) {
|
|
125
|
+
const where = { toProfileId };
|
|
126
|
+
if (typeId) where.typeId = typeId;
|
|
127
|
+
return await this.list({ where });
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get all relationships for a profile (both directions)
|
|
131
|
+
*
|
|
132
|
+
* @param profileId - The profile UUID
|
|
133
|
+
* @param typeId - Optional filter by relationship type UUID
|
|
134
|
+
* @returns Array of ProfileRelationship instances
|
|
135
|
+
*/
|
|
136
|
+
async getForProfile(profileId, typeId) {
|
|
137
|
+
const fromRelationships = await this.getFromProfile(profileId, typeId);
|
|
138
|
+
const toRelationships = await this.getToProfile(profileId, typeId);
|
|
139
|
+
return [...fromRelationships, ...toRelationships];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Check if a relationship exists between two profiles
|
|
143
|
+
*
|
|
144
|
+
* @param fromProfileId - The origin profile UUID
|
|
145
|
+
* @param toProfileId - The target profile UUID
|
|
146
|
+
* @param typeId - The relationship type UUID
|
|
147
|
+
* @returns True if relationship exists
|
|
148
|
+
*/
|
|
149
|
+
async exists(fromProfileId, toProfileId, typeId) {
|
|
150
|
+
return (await this.list({
|
|
151
|
+
where: {
|
|
152
|
+
fromProfileId,
|
|
153
|
+
toProfileId,
|
|
154
|
+
typeId
|
|
155
|
+
},
|
|
156
|
+
limit: 1
|
|
157
|
+
})).length > 0;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
//#endregion
|
|
161
|
+
export { ProfileRelationshipCollection as n, ProfileRelationshipCollection_DUVgaIqf_exports as r, ProfileRelationship as t };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Di3_eNCq.js";
|
|
3
|
+
import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
4
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipTermCollection-DtA9OM23.js
|
|
5
|
+
var ProfileRelationshipTermCollection_DtA9OM23_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
n: () => ProfileRelationshipTermCollection_exports,
|
|
7
|
+
r: () => ProfileRelationshipTerm,
|
|
8
|
+
t: () => ProfileRelationshipTermCollection
|
|
9
|
+
});
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
var ProfileRelationshipTerm = class extends SmrtObject {
|
|
19
|
+
relationshipId;
|
|
20
|
+
startedAt = /* @__PURE__ */ new Date();
|
|
21
|
+
endedAt;
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
super(options);
|
|
24
|
+
if (options.relationshipId !== void 0) this.relationshipId = options.relationshipId;
|
|
25
|
+
if (options.startedAt) this.startedAt = options.startedAt;
|
|
26
|
+
if (options.endedAt !== void 0) this.endedAt = options.endedAt;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check if this term is currently active
|
|
30
|
+
*
|
|
31
|
+
* @returns True if active (no end date or end date in future)
|
|
32
|
+
*/
|
|
33
|
+
isActive() {
|
|
34
|
+
if (!this.endedAt) return true;
|
|
35
|
+
return this.endedAt > /* @__PURE__ */ new Date();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* End this term
|
|
39
|
+
*
|
|
40
|
+
* @param endedAt - End date for the term (defaults to now)
|
|
41
|
+
*/
|
|
42
|
+
async end(endedAt = /* @__PURE__ */ new Date()) {
|
|
43
|
+
this.endedAt = endedAt;
|
|
44
|
+
await this.save();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get the duration of this term in days
|
|
48
|
+
*
|
|
49
|
+
* @returns Duration in days
|
|
50
|
+
*/
|
|
51
|
+
getDurationDays() {
|
|
52
|
+
const diffMs = (this.endedAt || /* @__PURE__ */ new Date()).getTime() - this.startedAt.getTime();
|
|
53
|
+
return Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
__decorateClass([foreignKey("ProfileRelationship", { required: true })], ProfileRelationshipTerm.prototype, "relationshipId", 2);
|
|
57
|
+
__decorateClass([field({ required: true })], ProfileRelationshipTerm.prototype, "startedAt", 2);
|
|
58
|
+
ProfileRelationshipTerm = __decorateClass([smrt({
|
|
59
|
+
tableStrategy: "sti",
|
|
60
|
+
api: { include: [
|
|
61
|
+
"list",
|
|
62
|
+
"get",
|
|
63
|
+
"create",
|
|
64
|
+
"update",
|
|
65
|
+
"delete"
|
|
66
|
+
] },
|
|
67
|
+
mcp: { include: ["list", "get"] },
|
|
68
|
+
cli: { skipApiCheck: true }
|
|
69
|
+
})], ProfileRelationshipTerm);
|
|
70
|
+
var ProfileRelationshipTermCollection_exports = /* @__PURE__ */ __exportAll$1({ ProfileRelationshipTermCollection: () => ProfileRelationshipTermCollection });
|
|
71
|
+
var ProfileRelationshipTermCollection = class extends SmrtCollection {
|
|
72
|
+
static _itemClass = ProfileRelationshipTerm;
|
|
73
|
+
/**
|
|
74
|
+
* Get all terms for a relationship
|
|
75
|
+
*
|
|
76
|
+
* @param relationshipId - The relationship UUID
|
|
77
|
+
* @returns Array of ProfileRelationshipTerm instances
|
|
78
|
+
*/
|
|
79
|
+
async getByRelationship(relationshipId) {
|
|
80
|
+
return await this.list({
|
|
81
|
+
where: { relationshipId },
|
|
82
|
+
orderBy: ["startedAt DESC"]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get the active term for a relationship (no end date or future end date)
|
|
87
|
+
*
|
|
88
|
+
* @param relationshipId - The relationship UUID
|
|
89
|
+
* @returns Active term or null
|
|
90
|
+
*/
|
|
91
|
+
async getActiveTerm(relationshipId) {
|
|
92
|
+
const terms = await this.getByRelationship(relationshipId);
|
|
93
|
+
for (const term of terms) if (term.isActive()) return term;
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get all historical (ended) terms for a relationship
|
|
98
|
+
*
|
|
99
|
+
* @param relationshipId - The relationship UUID
|
|
100
|
+
* @returns Array of ended ProfileRelationshipTerm instances
|
|
101
|
+
*/
|
|
102
|
+
async getHistoricalTerms(relationshipId) {
|
|
103
|
+
return (await this.getByRelationship(relationshipId)).filter((term) => !term.isActive());
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { ProfileRelationshipTermCollection as n, ProfileRelationshipTermCollection_DtA9OM23_exports as r, ProfileRelationshipTerm as t };
|
|
@@ -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-Di3_eNCq.js";
|
|
3
3
|
import { SmrtObject, field, smrt } from "@happyvertical/smrt-core";
|
|
4
4
|
//#region ../profiles/dist/chunks/ProfileRelationshipType-BRiRka6t.js
|
|
5
5
|
var ProfileRelationshipType_BRiRka6t_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-Di3_eNCq.js";
|
|
3
|
+
import { t as ProfileRelationshipType } from "./ProfileRelationshipType-BRiRka6t-Dezjv5jP.js";
|
|
4
|
+
import { SmrtCollection } from "@happyvertical/smrt-core";
|
|
5
|
+
//#region ../profiles/dist/chunks/ProfileRelationshipTypeCollection-BdXwd7Kf.js
|
|
6
|
+
var ProfileRelationshipTypeCollection_BdXwd7Kf_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
n: () => ProfileRelationshipTypeCollection_exports,
|
|
8
|
+
t: () => ProfileRelationshipTypeCollection
|
|
9
|
+
});
|
|
10
|
+
var ProfileRelationshipTypeCollection_exports = /* @__PURE__ */ __exportAll$1({ ProfileRelationshipTypeCollection: () => ProfileRelationshipTypeCollection });
|
|
11
|
+
var ProfileRelationshipTypeCollection = class extends SmrtCollection {
|
|
12
|
+
static _itemClass = ProfileRelationshipType;
|
|
13
|
+
/**
|
|
14
|
+
* Get relationship type by slug
|
|
15
|
+
*
|
|
16
|
+
* @param slug - The slug to search for
|
|
17
|
+
* @returns ProfileRelationshipType instance or null
|
|
18
|
+
*/
|
|
19
|
+
async getBySlug(slug) {
|
|
20
|
+
return await this.get({ slug });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get or create a relationship type by slug
|
|
24
|
+
*
|
|
25
|
+
* @param slug - The slug to search for
|
|
26
|
+
* @param defaults - Default values if creating
|
|
27
|
+
* @returns ProfileRelationshipType instance
|
|
28
|
+
*/
|
|
29
|
+
async getOrCreateBySlug(slug, defaults) {
|
|
30
|
+
const existing = await this.getBySlug(slug);
|
|
31
|
+
if (existing) return existing;
|
|
32
|
+
const relationshipType = await this.create({
|
|
33
|
+
slug,
|
|
34
|
+
...defaults
|
|
35
|
+
});
|
|
36
|
+
await relationshipType.save();
|
|
37
|
+
return relationshipType;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get all reciprocal relationship types
|
|
41
|
+
*
|
|
42
|
+
* @returns Array of reciprocal ProfileRelationshipType instances
|
|
43
|
+
*/
|
|
44
|
+
async getReciprocal() {
|
|
45
|
+
return await this.list({ where: { reciprocal: true } });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get all directional (non-reciprocal) relationship types
|
|
49
|
+
*
|
|
50
|
+
* @returns Array of directional ProfileRelationshipType instances
|
|
51
|
+
*/
|
|
52
|
+
async getDirectional() {
|
|
53
|
+
return await this.list({ where: { reciprocal: false } });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ProfileRelationshipTypeCollection_BdXwd7Kf_exports as n, ProfileRelationshipTypeCollection as t };
|
package/dist/app/cli.d.ts
CHANGED
|
@@ -27,6 +27,13 @@ export interface AppErrorEnvelope {
|
|
|
27
27
|
/** Stable runtime code when the failure carries one (e.g. `migration_failed`). */
|
|
28
28
|
runtimeCode?: string;
|
|
29
29
|
message: string;
|
|
30
|
+
/**
|
|
31
|
+
* `start` only: the redacted, bounded (≤ 8 KiB) tail of the web process's
|
|
32
|
+
* stdout/stderr when it never proved readiness.
|
|
33
|
+
*/
|
|
34
|
+
output?: string;
|
|
35
|
+
/** `start` only: the private (0600) log that `output` was read from. */
|
|
36
|
+
logFile?: string;
|
|
30
37
|
recovery: string;
|
|
31
38
|
secretValuesIncluded: false;
|
|
32
39
|
}
|
package/dist/app/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/app/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
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;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,CAkEjB"}
|
package/dist/app/errors.d.ts
CHANGED
|
@@ -10,6 +10,27 @@ export declare class AppCommandError extends Error {
|
|
|
10
10
|
cause?: unknown;
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* A `smrt app start` whose web process never proved readiness. Carries the
|
|
15
|
+
* already-redacted, bounded tail of that process's output and the private
|
|
16
|
+
* log it came from, for the error envelope.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ApplicationStartError extends Error {
|
|
19
|
+
readonly output: string;
|
|
20
|
+
readonly logFile: string;
|
|
21
|
+
constructor(message: string, output: string, logFile: string);
|
|
22
|
+
}
|
|
23
|
+
/** Options for {@link redactSecrets}. */
|
|
24
|
+
export interface RedactSecretsOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Redact every non-empty secret-named environment value and every Bearer
|
|
27
|
+
* token, whatever its length. The default keeps an 8-character floor so a
|
|
28
|
+
* short flag value (`SMRT_AUTH_ENABLED=1`) does not erase every `1` from an
|
|
29
|
+
* operator message; arbitrary child-process output (the `start` tail) has
|
|
30
|
+
* no such guarantee about what it prints, so it is redacted strictly.
|
|
31
|
+
*/
|
|
32
|
+
strict?: boolean;
|
|
33
|
+
}
|
|
13
34
|
/**
|
|
14
35
|
* Remove secret material from an operator-facing message.
|
|
15
36
|
*
|
|
@@ -17,6 +38,18 @@ export declare class AppCommandError extends Error {
|
|
|
17
38
|
* connection string, credential, or bootstrap token. Redaction covers:
|
|
18
39
|
* literal values of secret-named environment variables, URL userinfo,
|
|
19
40
|
* `token=`/`password=`/`secret=` query values, and bearer tokens.
|
|
41
|
+
*
|
|
42
|
+
* Every span is located on the raw text and the union is masked at once, so
|
|
43
|
+
* a literal value can never split a structural match (an env value that is
|
|
44
|
+
* a Bearer-token prefix, or a URL's scheme and host, used to leave the rest
|
|
45
|
+
* of the token or the URL password visible). A final structural pass over
|
|
46
|
+
* the masked text keeps everything the earlier sequential order masked.
|
|
47
|
+
*/
|
|
48
|
+
export declare function redactSecrets(message: string, environment?: Record<string, string | undefined>, options?: RedactSecretsOptions): string;
|
|
49
|
+
/**
|
|
50
|
+
* The last `maxBytes` of `text`: a leading partial line (and any split
|
|
51
|
+
* multi-byte character) is dropped when the cut lands mid-text. Redact
|
|
52
|
+
* before cutting; cutting never exposes anything redaction masked.
|
|
20
53
|
*/
|
|
21
|
-
export declare function
|
|
54
|
+
export declare function boundedTail(text: string, maxBytes: number): string;
|
|
22
55
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/app/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/app/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uDAAuD;AACvD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAO5D;AAED,sEAAsE;AACtE,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAYzE;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/app/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uDAAuD;AACvD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAO5D;AAED,sEAAsE;AACtE,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAYzE;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAM7D;AAYD,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAqFD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAC7D,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAyBR;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASlE"}
|
package/dist/app/index.d.ts
CHANGED
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { type AcquireWriterLeaseOptions, acquireWriterLease, createProviderReadinessProbe, findInstalledPackage, isStaleOperationLock, lockOwnerPid, type OperationLock, PROVIDER_READINESS_SETTINGS, type ProviderReadinessOptions, processExists, RECLAIM_MUTEX_FILE, type ReadinessComponent, type ReadinessContext, type ReclaimOutcome, readActiveWriterLease, reclaimStaleRecord, resolveReadinessModule, type WriterLease, type WriterLeaseRecord, withOperationLock, } from '@happyvertical/smrt-app-runtime';
|
|
10
10
|
export { APP_COMMANDS, APP_RECOVERY, type AppErrorEnvelope, errorEnvelope, type RunAppCommandOptions, renderAppHelp, runAppCommand, } from './cli.js';
|
|
11
|
-
export { AppCommandError, redactSecrets } from './errors.js';
|
|
11
|
+
export { AppCommandError, ApplicationStartError, type RedactSecretsOptions, redactSecrets, } from './errors.js';
|
|
12
12
|
export { type ApplicationStateRootOptions, assertExternalArtifactPath, type ExternalArtifactPathOptions, type FingerprintRuntime, prepareApplicationStateRoot, type ResolveApplicationIdOptions, resolveApplicationId, resolveApplicationStateRoot, runtimeConfigurationFingerprint, type StateCustodyOptions, } from './identity.js';
|
|
13
|
-
export { launchVite, prepareMigration, resolveViteEntry, runWorker, ViteLauncherError, validateMcpAppsIfPresent, type WorkerKind, } from './launchers.js';
|
|
14
|
-
export { APP_OPERATIONS, type AppOperation, type PortabilityAdapter, runApplicationOperation, } from './operations.js';
|
|
13
|
+
export { devServerArguments, launchVite, prepareMigration, resolveViteEntry, runWorker, ViteLauncherError, validateMcpAppsIfPresent, type WorkerKind, } from './launchers.js';
|
|
14
|
+
export { APP_OPERATIONS, type AppOperation, type PortabilityAdapter, runApplicationOperation, START_OUTPUT_TAIL_BYTES, } from './operations.js';
|
|
15
15
|
export { type ExportResult, executeImportPlan, exportApplication, type ImportExecutor, type ImportResult, importApplication, importedRowsMatchBundle, type LogicalExportBundle, type ManifestTable, manifestTables, type PlannedImportTable, type PortabilityContext, type PortabilityRuntime, planImportTables, serializeExportBundle, validateImportBundle, } from './portability.js';
|
|
16
16
|
export { ASSET_MANIFEST_SCHEMA_VERSION, type AssetBundle, type AssetImportJournal, type AssetManifestEntry, type AssetPayload, AssetPortabilityError, assertAssetRoot, bundleContentDigest, collectFilesystemAssets, digestBytes, finishFilesystemAssets, hasCommittedImportJournal, MAX_ASSET_BYTES, MAX_ASSET_COUNT, MAX_BUNDLE_BYTES, MAX_TOTAL_ASSET_BYTES, markFilesystemAssetsCommitted, type PortableRow, type PortableTable, publishFilesystemAssets, readSensitiveBundle, recoverFilesystemAssets, rollbackFilesystemAssets, type StagedAssets, stageFilesystemAssets, type VerifiedAsset, type VerifiedAssets, verifyFilesystemAssets, verifyPublishedFilesystemAssets, } from './portability-assets.js';
|
|
17
17
|
export { type ApplicationProcessRecord, checkOwnedProcess, matchesApplicationProcess, type OwnedProcessState, readOwnedProcess, sendTerminationSignal, verifyOwnedProcess, WEB_LAUNCHER_NAME, writeProcessRecord, } from './process-record.js';
|
|
18
18
|
export { type AppCommandDependencies, type AppCommandIo, type AppContext, type CommandRunner, cliExecutablePath, type RunOptions, type RuntimeEnvironment, runtimeEnvironment, webLauncherPath, } from './runtime.js';
|
|
19
|
+
export { parseTokenLifetime, runTokenOperation, TOKEN_USAGE, } from './tokens.js';
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,4BAA4B,EAC5B,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,KAAK,aAAa,EAClB,2BAA2B,EAC3B,KAAK,wBAAwB,EAC7B,aAAa,EACb,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,gBAAgB,EACrB,aAAa,EACb,KAAK,oBAAoB,EACzB,aAAa,EACb,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"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"}
|
package/dist/app/launchers.d.ts
CHANGED
|
@@ -27,6 +27,17 @@ export declare class ViteLauncherError extends Error {
|
|
|
27
27
|
}
|
|
28
28
|
/** Resolve the application's installed Vite CLI entry, refusing unsafe paths. */
|
|
29
29
|
export declare function resolveViteEntry(sourceRoot: string): string;
|
|
30
|
+
/** Loopback host every `smrt app` URL (onboarding, `open`, `start`) names. */
|
|
31
|
+
export declare const LOOPBACK_HOST = "127.0.0.1";
|
|
32
|
+
/**
|
|
33
|
+
* Arguments for `smrt app dev`: the caller's Vite arguments, plus
|
|
34
|
+
* `--host 127.0.0.1` unless they name `--host`, and `--port $PORT` when
|
|
35
|
+
* `PORT` is set and they name no `--port`. Vite's own default host is
|
|
36
|
+
* `localhost`, which Node resolves to `[::1]` first, so the dev server would
|
|
37
|
+
* not answer the `http://127.0.0.1:<PORT>` URL onboarding and `app:open` hand
|
|
38
|
+
* out. An explicit `--host`/`--port` (or `smrt app vite dev …`) wins.
|
|
39
|
+
*/
|
|
40
|
+
export declare function devServerArguments(args: readonly string[], env?: NodeJS.ProcessEnv): string[];
|
|
30
41
|
/**
|
|
31
42
|
* Run the application's Vite CLI in this process with `args` verbatim. The
|
|
32
43
|
* caller has already loaded `.env` without overriding the shell.
|
|
@@ -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,CA2GjB;AAED,4EAA4E;AAC5E,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyC3D;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"}
|
|
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,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/operations.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare const APP_OPERATIONS: readonly ["install", "setup", "recover", "s
|
|
|
15
15
|
export type AppOperation = (typeof APP_OPERATIONS)[number];
|
|
16
16
|
/** Throw unless the configured profile is `local`. */
|
|
17
17
|
export declare function assertLocalOperation(context: AppContext, operation: string): Promise<ResolvedApplicationRuntime>;
|
|
18
|
+
/** Upper bound on the web-process output a failed `start` reports. */
|
|
19
|
+
export declare const START_OUTPUT_TAIL_BYTES: number;
|
|
18
20
|
/** Portability adapter contract (built-in or an application override). */
|
|
19
21
|
export interface PortabilityAdapter {
|
|
20
22
|
exportApplication(context: PortabilityContext): Promise<ExportResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/app/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/app/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA6BH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAY7E,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EACL,KAAK,UAAU,EAIhB,MAAM,cAAc,CAAC;AAEtB,6CAA6C;AAC7C,eAAO,MAAM,cAAc,2GAWjB,CAAC;AAEX,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAuH3D,sDAAsD;AACtD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,0BAA0B,CAAC,CAQrC;AAyPD,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,QAAW,CAAC;AAiZhD,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACtE,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACvE;AAkFD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,CAkEjB"}
|