@ai-matrx/records 0.29.0 → 0.30.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.
- package/CHANGELOG.md +28 -0
- package/dist/core/index.cjs +18 -7
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +18 -7
- package/dist/core/index.js.map +1 -1
- package/dist/{field-DrOTIPCF.d.cts → field-D08d_e7R.d.cts} +61 -7
- package/dist/{field-DrOTIPCF.d.ts → field-D08d_e7R.d.ts} +61 -7
- package/dist/index.cjs +18 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +18 -7
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +61 -7
- package/dist/react/index.d.ts +61 -7
- package/dist/react/index.js +18 -7
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs +57 -0
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js +57 -0
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TableType, a as TableDisplay, S as StorageMode, F as FieldTypeWord, b as FieldSource, C as ComputeOn, c as FieldRule, d as FieldSensitivity, e as ContextPolicy, R as RelationFlavor, f as RelationCardinality, O as OnDelete } from '../field-
|
|
1
|
+
import { T as TableType, a as TableDisplay, S as StorageMode, F as FieldTypeWord, b as FieldSource, C as ComputeOn, c as FieldRule, d as FieldSensitivity, e as ContextPolicy, R as RelationFlavor, f as RelationCardinality, O as OnDelete } from '../field-D08d_e7R.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Who the data belongs to. A test organization is created under this name — the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TableType, a as TableDisplay, S as StorageMode, F as FieldTypeWord, b as FieldSource, C as ComputeOn, c as FieldRule, d as FieldSensitivity, e as ContextPolicy, R as RelationFlavor, f as RelationCardinality, O as OnDelete } from '../field-
|
|
1
|
+
import { T as TableType, a as TableDisplay, S as StorageMode, F as FieldTypeWord, b as FieldSource, C as ComputeOn, c as FieldRule, d as FieldSensitivity, e as ContextPolicy, R as RelationFlavor, f as RelationCardinality, O as OnDelete } from '../field-D08d_e7R.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Who the data belongs to. A test organization is created under this name — the
|
package/dist/use-cases/index.js
CHANGED
|
@@ -2165,6 +2165,38 @@ var PLACEHOLDER_PATTERNS = [
|
|
|
2165
2165
|
why: "A repeated stand-in person is the tell that nobody modelled the domain.",
|
|
2166
2166
|
instead: "Synthesize varied, plausible people who belong to nobody \u2014 and never copy a real person."
|
|
2167
2167
|
},
|
|
2168
|
+
{
|
|
2169
|
+
// THE CHAIR'S RULING, 2026-09-21. People in a template are fictional but
|
|
2170
|
+
// REALISTIC, and a realistic person's mailbox is a mailbox — not a mailbox
|
|
2171
|
+
// with a counter welded to the end of it. `linda.reyes0@…`,
|
|
2172
|
+
// `wei.singh.m34@…` are the tell that a loop wrote the row, and the owner
|
|
2173
|
+
// reads a whole column of them as one fake person repeated.
|
|
2174
|
+
//
|
|
2175
|
+
// NARROW ON PURPOSE: it fires only when the local part is name-shaped
|
|
2176
|
+
// (two or more words joined by . _ or -) AND ends in a bare counter. That
|
|
2177
|
+
// is exactly the generator's signature and leaves the real mailboxes a
|
|
2178
|
+
// business has — `support365@`, `ap2@`, `frontdesk@` — alone.
|
|
2179
|
+
id: "suffixed-mailbox",
|
|
2180
|
+
test: /\b[a-z]+(?:[._-][a-z]+)+\d{1,3}@/gi,
|
|
2181
|
+
why: "A mailbox whose name ends in a counter (linda.reyes0@, wei.singh.m34@) is a generated row wearing a person's name.",
|
|
2182
|
+
instead: "Give each person their own mailbox on the fictional business's own domain \u2014 'linda.reyes@handsandhopealliance.org' \u2014 and vary the people instead of numbering one."
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
// THE CHAIR'S RULING, 2026-09-21. "Test fixture" is a CLASSIFICATION, and a
|
|
2186
|
+
// classification lives in the organization's kind/metadata — the
|
|
2187
|
+
// `test_fixture` flag in its settings, which is how cleanup finds it. It is
|
|
2188
|
+
// never part of a NAME, because a name is what the owner reads on the
|
|
2189
|
+
// screen and "Birchwood Ave Renovation (test fixture)" tells him the
|
|
2190
|
+
// product is a rehearsal.
|
|
2191
|
+
//
|
|
2192
|
+
// The settings KEY is the right place, so a line that is writing the key is
|
|
2193
|
+
// exempt; a line that is writing the words into text is not.
|
|
2194
|
+
id: "fixture-in-name",
|
|
2195
|
+
test: /\(\s*test\s+fixture\s*\)|\btest[\s_-]fixture\b|\bfixture[\s_-]org(?:anization|anisation)?\b/gi,
|
|
2196
|
+
unlessLineMatches: /["'`]?test_fixture["'`]?\s*[:=]|\bp_settings\b|\bcleanupTag\b|\bsettings\.[a-z_]*fixture\b/i,
|
|
2197
|
+
why: "'Test fixture' is a classification, not a name. In a name it tells the owner the screen he is looking at is a rehearsal.",
|
|
2198
|
+
instead: "Name the organization after the business the use case is about, and carry the classification in its settings (`test_fixture: true`), which is also how cleanup finds it."
|
|
2199
|
+
},
|
|
2168
2200
|
{
|
|
2169
2201
|
id: "keyboard-mash",
|
|
2170
2202
|
test: /\basdf+\b|\bqwerty\b|\bxxx+\b|\btodo name\b|\bfixme\b|\btbd\b/gi,
|
|
@@ -2200,6 +2232,7 @@ function describePlaceholder(hit) {
|
|
|
2200
2232
|
var STORAGE_MODES = ["light", "heavy"];
|
|
2201
2233
|
var PARITY_FIELD_TYPES = [
|
|
2202
2234
|
{ parity_type: "attachment", behavior: "relation", made_of: "REC-31: a File record reached through a relation, target the kernel `File` Table" },
|
|
2235
|
+
{ parity_type: "checkbox", behavior: "boolean", made_of: "a ticked or unticked answer, stored as a REAL boolean \u2014 and a record that never answered holds neither, so filters and group-by see three states, not two" },
|
|
2203
2236
|
{ parity_type: "currency", behavior: "range", made_of: "FLD-N-1: a number whose UNIT is the currency and whose format is currency \u2014 on the Field, never in presentation" },
|
|
2204
2237
|
{ parity_type: "datetime", behavior: "range", made_of: "a range of kind date or datetime \u2014 the dated modifier says the VALUES are dated, which is a different question" },
|
|
2205
2238
|
{ parity_type: "email", behavior: "text", made_of: "text whose format is email" },
|
|
@@ -2253,6 +2286,21 @@ var MIN_ROWS_IN_PRIMARY_TABLE = 5;
|
|
|
2253
2286
|
function fieldsByKey(table) {
|
|
2254
2287
|
return new Map(table.fields.map((f) => [f.key, f]));
|
|
2255
2288
|
}
|
|
2289
|
+
var FIXTURE_IN_NAME = /\(\s*test\s+fixture\s*\)|\btest[\s_-]fixture\b|^\s*fixtures?\b/i;
|
|
2290
|
+
function nameFields(useCase5) {
|
|
2291
|
+
const out = [
|
|
2292
|
+
["business.name", useCase5.business?.name],
|
|
2293
|
+
["business.legalName", useCase5.business?.legalName],
|
|
2294
|
+
["form.name", useCase5.form?.name],
|
|
2295
|
+
["pipeline.name", useCase5.pipeline?.name]
|
|
2296
|
+
];
|
|
2297
|
+
useCase5.tables?.forEach((table, ti) => {
|
|
2298
|
+
out.push([`tables[${ti}].name`, table.name]);
|
|
2299
|
+
out.push([`tables[${ti}].labelSingular`, table.labelSingular]);
|
|
2300
|
+
out.push([`tables[${ti}].labelPlural`, table.labelPlural]);
|
|
2301
|
+
});
|
|
2302
|
+
return out;
|
|
2303
|
+
}
|
|
2256
2304
|
function validateUseCase(useCase5) {
|
|
2257
2305
|
const problems = [];
|
|
2258
2306
|
const say = (at, says) => problems.push({ at, says });
|
|
@@ -2269,6 +2317,15 @@ function validateUseCase(useCase5) {
|
|
|
2269
2317
|
for (const hit of findPlaceholders(JSON.stringify(useCase5, null, 1))) {
|
|
2270
2318
|
say(useCase5.id, describePlaceholder(hit));
|
|
2271
2319
|
}
|
|
2320
|
+
for (const [at, value] of nameFields(useCase5)) {
|
|
2321
|
+
if (!value) continue;
|
|
2322
|
+
if (FIXTURE_IN_NAME.test(value)) {
|
|
2323
|
+
say(
|
|
2324
|
+
at,
|
|
2325
|
+
`"${value}" carries the test-fixture classification in a name. Name it after the business this use case is about, and carry the classification where it belongs \u2014 \`test_fixture: true\` in the organization's settings, which is also how cleanup finds it (never by a junk name).`
|
|
2326
|
+
);
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2272
2329
|
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(useCase5.id ?? "")) {
|
|
2273
2330
|
say("id", `The id "${useCase5.id}" should be kebab-case, like "harbor-dental-new-patient-intake".`);
|
|
2274
2331
|
}
|