@ai-matrx/records 0.71.3 → 0.72.0
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.
|
@@ -1098,6 +1098,8 @@ interface TemplateFootprint {
|
|
|
1098
1098
|
dimensions: number;
|
|
1099
1099
|
extras: Partial<Record<TemplateExtraKind, number>>;
|
|
1100
1100
|
agents: number;
|
|
1101
|
+
/** Workflows an install creates (host step). */
|
|
1102
|
+
workflows: number;
|
|
1101
1103
|
/**
|
|
1102
1104
|
* custom.portal_declare opens the organization's outside sign-in. Q7: uninstall restores
|
|
1103
1105
|
* the setting it found (the installer records the before-value).
|
|
@@ -1106,7 +1108,7 @@ interface TemplateFootprint {
|
|
|
1106
1108
|
line: string;
|
|
1107
1109
|
}
|
|
1108
1110
|
/** The footprint, DERIVED from the spec — never written by hand, so it cannot drift. */
|
|
1109
|
-
declare function footprintOf(spec: Pick<TemplateSpec, "tables" | "views" | "forms" | "extras" | "agent" | "dimensions" | "sharedBlocks">): TemplateFootprint;
|
|
1111
|
+
declare function footprintOf(spec: Pick<TemplateSpec, "tables" | "views" | "forms" | "extras" | "agent" | "dimensions" | "sharedBlocks"> & Partial<Pick<TemplateSpec, "extraAgents" | "workflows">>): TemplateFootprint;
|
|
1110
1112
|
declare const CATALOGUE_STATUSES: readonly ["planned", "authoring", "checking", "waiting_on_lane_10", "ready", "published", "retired"];
|
|
1111
1113
|
type CatalogueStatus = (typeof CATALOGUE_STATUSES)[number];
|
|
1112
1114
|
interface CatalogueRow {
|
|
@@ -1098,6 +1098,8 @@ interface TemplateFootprint {
|
|
|
1098
1098
|
dimensions: number;
|
|
1099
1099
|
extras: Partial<Record<TemplateExtraKind, number>>;
|
|
1100
1100
|
agents: number;
|
|
1101
|
+
/** Workflows an install creates (host step). */
|
|
1102
|
+
workflows: number;
|
|
1101
1103
|
/**
|
|
1102
1104
|
* custom.portal_declare opens the organization's outside sign-in. Q7: uninstall restores
|
|
1103
1105
|
* the setting it found (the installer records the before-value).
|
|
@@ -1106,7 +1108,7 @@ interface TemplateFootprint {
|
|
|
1106
1108
|
line: string;
|
|
1107
1109
|
}
|
|
1108
1110
|
/** The footprint, DERIVED from the spec — never written by hand, so it cannot drift. */
|
|
1109
|
-
declare function footprintOf(spec: Pick<TemplateSpec, "tables" | "views" | "forms" | "extras" | "agent" | "dimensions" | "sharedBlocks">): TemplateFootprint;
|
|
1111
|
+
declare function footprintOf(spec: Pick<TemplateSpec, "tables" | "views" | "forms" | "extras" | "agent" | "dimensions" | "sharedBlocks"> & Partial<Pick<TemplateSpec, "extraAgents" | "workflows">>): TemplateFootprint;
|
|
1110
1112
|
declare const CATALOGUE_STATUSES: readonly ["planned", "authoring", "checking", "waiting_on_lane_10", "ready", "published", "retired"];
|
|
1111
1113
|
type CatalogueStatus = (typeof CATALOGUE_STATUSES)[number];
|
|
1112
1114
|
interface CatalogueRow {
|
package/dist/templates/index.js
CHANGED
|
@@ -306,8 +306,10 @@ function footprintOf(spec) {
|
|
|
306
306
|
...dimensions ? [counted(dimensions, ["dimension set", "dimension sets"])] : [],
|
|
307
307
|
...TEMPLATE_EXTRA_KINDS.filter((k) => extras[k]).map((k) => counted(extras[k] ?? 0, EXTRA_WORDS[k]))
|
|
308
308
|
];
|
|
309
|
-
const agents = spec.agent ? 1 : 0;
|
|
310
|
-
if (agents) parts.push("
|
|
309
|
+
const agents = (spec.agent ? 1 : 0) + (spec.extraAgents?.length ?? 0);
|
|
310
|
+
if (agents) parts.push(counted(agents, ["agent", "agents"]));
|
|
311
|
+
const workflows = spec.workflows?.length ?? 0;
|
|
312
|
+
if (workflows) parts.push(counted(workflows, ["workflow", "workflows"]));
|
|
311
313
|
return {
|
|
312
314
|
tables,
|
|
313
315
|
sharedBlocks: spec.sharedBlocks?.length ?? 0,
|
|
@@ -316,6 +318,7 @@ function footprintOf(spec) {
|
|
|
316
318
|
dimensions,
|
|
317
319
|
extras,
|
|
318
320
|
agents,
|
|
321
|
+
workflows,
|
|
319
322
|
opensOutsideSignIn: (extras.portal ?? 0) > 0,
|
|
320
323
|
line: parts.join(" \xB7 ")
|
|
321
324
|
};
|
|
@@ -3459,6 +3462,10 @@ function validateTemplate(raw, options = {}) {
|
|
|
3459
3462
|
const tz = raw.business?.timezone || "UTC";
|
|
3460
3463
|
const tablesRaw = allTables(raw);
|
|
3461
3464
|
const ISO_DAY = /\b\d{4}-\d{2}-\d{2}\b/;
|
|
3465
|
+
for (const table of tablesRaw) {
|
|
3466
|
+
const tf = table.fields.find((f) => f.key === table.titleField);
|
|
3467
|
+
if (tf && tf.default !== void 0) say(`tables (${table.token}).fields (${tf.key})`, `"${tf.label}" names each ${table.labelSingular.toLowerCase()}, so it takes no default; ask it on the form instead.`);
|
|
3468
|
+
}
|
|
3462
3469
|
for (const table of tablesRaw) {
|
|
3463
3470
|
for (const f of table.fields.filter((x) => isRelation(x) && x.parityType !== "attachment")) {
|
|
3464
3471
|
const max = f.relationMax ?? (f.multi ? STORE_LIST_RELATION_MAX : 1);
|