@happyvertical/smrt-core 0.57.14 → 0.57.15
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/generators.md +35 -0
- package/dist/manifest/static-manifest.js +1 -1
- package/dist/manifest/static-manifest.js.map +1 -1
- package/dist/manifest/store.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/registry/collection-resolution.d.ts.map +1 -1
- package/dist/registry/collection-resolution.js +6 -0
- package/dist/registry/collection-resolution.js.map +1 -1
- package/dist/scanner/manifest-generator.d.ts.map +1 -1
- package/dist/scanner/manifest-generator.js +2 -1
- package/dist/scanner/manifest-generator.js.map +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
- package/dist/vite-plugin/sveltekit-generator.js +44 -5
- package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
- package/package.json +4 -4
package/dist/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-resolution.d.ts","sourceRoot":"","sources":["../../src/registry/collection-resolution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collection-resolution.d.ts","sourceRoot":"","sources":["../../src/registry/collection-resolution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAS,CAAC;AAE/C,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,eAAe,GAAG,SAAS,CAAC;IACzD,kBAAkB,CAAC,EAAE,CACnB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,eAAe,GAAG,SAAS,CAAC;IACjC,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,0BAA0B,yFAK7B,CAAC;AAEX,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,OAAO,CAOT;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,4BAA4B,GACnC,eAAe,GAAG,SAAS,CAa7B;AAED,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,4BAA4B,GACnC,eAAe,EAAE,CAiBnB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAoBT;AA+DD,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,4BAA4B,GACnC,MAAM,GAAG,SAAS,CAmCpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SmrtCollection } from "../collection.js";
|
|
1
2
|
//#region src/registry/collection-resolution.ts
|
|
2
3
|
/**
|
|
3
4
|
* Framework base classes that ARE collections (extend `SmrtCollection`).
|
|
@@ -64,6 +65,11 @@ function getCollectionChainRegistrations(className, registered, lookup) {
|
|
|
64
65
|
}
|
|
65
66
|
function isCollectionRegistration(className, registered, lookup) {
|
|
66
67
|
if (isSmrtCollectionExtendsName(registered.extends)) return true;
|
|
68
|
+
let prototype = typeof registered.constructor === "function" ? registered.constructor.prototype : void 0;
|
|
69
|
+
for (let depth = 0; prototype && depth < 64; depth += 1) {
|
|
70
|
+
if (prototype === SmrtCollection.prototype) return true;
|
|
71
|
+
prototype = Object.getPrototypeOf(prototype);
|
|
72
|
+
}
|
|
67
73
|
return getCollectionChainRegistrations(className, registered, lookup).some((chainEntry) => isSmrtCollectionExtendsName(chainEntry.extends));
|
|
68
74
|
}
|
|
69
75
|
function getStaticItemClassName(registered) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-resolution.js","names":[],"sources":["../../src/registry/collection-resolution.ts"],"sourcesContent":["import type { RegisteredClass } from './types';\n\nexport interface CollectionRegistrationLookup {\n findClass: (name: string) => RegisteredClass | undefined;\n findClassInPackage?: (\n packageName: string,\n className: string,\n ) => RegisteredClass | undefined;\n getInheritanceChain: (className: string) => string[];\n}\n\n/**\n * Framework base classes that ARE collections (extend `SmrtCollection`).\n *\n * `SmrtJunction` and `SmrtJunctionBase` are abstract collection bases — junction collections declare\n * `extends SmrtJunction<Item>`, and the manifest records that *direct* parent.\n * `SmrtJunction` is itself never registered in a consumer's registry, so the\n * inheritance-chain walk in `isCollectionRegistration()` cannot reach\n * `SmrtCollection` through it. Recognizing the junction base by name here is\n * what keeps a junction Collection classified as a collection (and therefore\n * redirected to its item class for schema generation) regardless of\n * registration order. Without it, a junction Collection that is iterated\n * before its item class is mistaken for a regular table-bearing class and\n * creates a base-columns-only table, dropping the junction's FK columns\n * (#1342 — `place_assets` vs `profile_assets` asymmetry).\n *\n * `SmrtReportCollection` (`@happyvertical/smrt-reports`) is the same case: a\n * framework collection base that is never registered, so a report collection\n * (`class XCollection extends SmrtReportCollection<X>`) was classified as a\n * table-bearing class and claimed its item's table. The schema planner then\n * rejected the pair as two unrelated owners of one table (#3110).\n *\n * Keep in sync with the collection bases that extend `SmrtCollection` in\n * `packages/core/src/junction.ts` and `packages/reports/src/report.ts`. (`SmrtHierarchical` and\n * `SmrtPolymorphicAssociation` extend `SmrtObject`, not `SmrtCollection`, so\n * they deliberately do NOT belong here.)\n *\n * A new framework collection base must also be added to the other parallel\n * framework-base lists so it is recognized everywhere it matters:\n * - `FRAMEWORK_BASE_CLASSES` in\n * `packages/scanner/src/inheritance-resolver.ts` (scanner chain termination).\n * - `FRAMEWORK_ABSTRACT_BASE_NAMES` in\n * `packages/core/src/scanner/manifest-generator.ts` (field-merge skipping).\n *\n * Downstream tooling that needs this detector (e.g. @happyvertical/smrt-vitest)\n * should IMPORT it from `@happyvertical/smrt-core` rather than keep a copy — a\n * duplicate detector is exactly how the #1342 junction schema-drop bug\n * half-survived the original core fix.\n */\nexport const SMRT_COLLECTION_BASE_NAMES = [\n 'SmrtCollection',\n 'SmrtJunction',\n 'SmrtJunctionBase',\n 'SmrtReportCollection',\n] as const;\n\nexport function isSmrtCollectionExtendsName(\n extendsName: string | undefined,\n): boolean {\n if (!extendsName) {\n return false;\n }\n return SMRT_COLLECTION_BASE_NAMES.some(\n (base) => extendsName === base || extendsName.endsWith(`:${base}`),\n );\n}\n\nexport function resolveRelatedRegistration(\n className: string,\n origin: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): RegisteredClass | undefined {\n if (className.includes(':')) {\n return lookup.findClass(className);\n }\n\n if (origin.packageName && lookup.findClassInPackage) {\n return (\n lookup.findClassInPackage(origin.packageName, className) ||\n lookup.findClass(className)\n );\n }\n\n return lookup.findClass(className);\n}\n\nexport function getCollectionChainRegistrations(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): RegisteredClass[] {\n const lookupName = registered.qualifiedName || registered.name || className;\n const chain = lookup.getInheritanceChain(lookupName);\n const registrations: RegisteredClass[] = [];\n\n for (const chainName of chain) {\n const chainEntry = resolveRelatedRegistration(\n chainName,\n registered,\n lookup,\n );\n if (chainEntry) {\n registrations.push(chainEntry);\n }\n }\n\n return registrations;\n}\n\nexport function isCollectionRegistration(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): boolean {\n if (isSmrtCollectionExtendsName(registered.extends)) {\n return true;\n }\n\n return getCollectionChainRegistrations(className, registered, lookup).some(\n (chainEntry) => isSmrtCollectionExtendsName(chainEntry.extends),\n );\n}\n\nfunction getStaticItemClassName(\n registered: RegisteredClass,\n): string | undefined {\n const itemClass = (\n registered.constructor as unknown as {\n _itemClass?: { name?: string };\n }\n )._itemClass;\n return itemClass?.name;\n}\n\nfunction getCollectionItemNameCandidates(className: string): string[] {\n const candidates: string[] = [];\n const simpleName = className.includes(':')\n ? className.slice(className.lastIndexOf(':') + 1)\n : className;\n\n const addCandidate = (candidate: string): void => {\n if (\n candidate &&\n candidate !== simpleName &&\n !candidates.includes(candidate)\n ) {\n candidates.push(candidate);\n }\n };\n\n if (simpleName.endsWith('Collection')) {\n addCandidate(simpleName.slice(0, -'Collection'.length));\n }\n\n if (simpleName.endsWith('ies')) {\n addCandidate(`${simpleName.slice(0, -3)}y`);\n } else if (simpleName.endsWith('s')) {\n addCandidate(simpleName.slice(0, -1));\n }\n\n return candidates;\n}\n\nfunction inferCollectionItemClassName(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): string | undefined {\n const lookupName = registered.name || className;\n\n for (const candidate of getCollectionItemNameCandidates(lookupName)) {\n const candidateRegistration = resolveRelatedRegistration(\n candidate,\n registered,\n lookup,\n );\n if (candidateRegistration) {\n return candidate;\n }\n }\n\n return undefined;\n}\n\nexport function resolveCollectionItemClassName(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): string | undefined {\n const staticItemClassName = getStaticItemClassName(registered);\n if (staticItemClassName) {\n return staticItemClassName;\n }\n\n if (registered.extendsTypeArg) {\n return registered.extendsTypeArg;\n }\n\n const inferredItemClassName = inferCollectionItemClassName(\n className,\n registered,\n lookup,\n );\n if (inferredItemClassName) {\n return inferredItemClassName;\n }\n\n const chain = getCollectionChainRegistrations(\n className,\n registered,\n lookup,\n ).reverse();\n\n for (const chainEntry of chain) {\n if (chainEntry === registered) {\n continue;\n }\n if (chainEntry.extendsTypeArg) {\n return chainEntry.extendsTypeArg;\n }\n }\n\n return undefined;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"collection-resolution.js","names":[],"sources":["../../src/registry/collection-resolution.ts"],"sourcesContent":["import { SmrtCollection } from '../collection.js';\nimport type { RegisteredClass } from './types';\n\nexport interface CollectionRegistrationLookup {\n findClass: (name: string) => RegisteredClass | undefined;\n findClassInPackage?: (\n packageName: string,\n className: string,\n ) => RegisteredClass | undefined;\n getInheritanceChain: (className: string) => string[];\n}\n\n/**\n * Framework base classes that ARE collections (extend `SmrtCollection`).\n *\n * `SmrtJunction` and `SmrtJunctionBase` are abstract collection bases — junction collections declare\n * `extends SmrtJunction<Item>`, and the manifest records that *direct* parent.\n * `SmrtJunction` is itself never registered in a consumer's registry, so the\n * inheritance-chain walk in `isCollectionRegistration()` cannot reach\n * `SmrtCollection` through it. Recognizing the junction base by name here is\n * what keeps a junction Collection classified as a collection (and therefore\n * redirected to its item class for schema generation) regardless of\n * registration order. Without it, a junction Collection that is iterated\n * before its item class is mistaken for a regular table-bearing class and\n * creates a base-columns-only table, dropping the junction's FK columns\n * (#1342 — `place_assets` vs `profile_assets` asymmetry).\n *\n * `SmrtReportCollection` (`@happyvertical/smrt-reports`) is the same case: a\n * framework collection base that is never registered, so a report collection\n * (`class XCollection extends SmrtReportCollection<X>`) was classified as a\n * table-bearing class and claimed its item's table. The schema planner then\n * rejected the pair as two unrelated owners of one table (#3110).\n *\n * Keep in sync with the collection bases that extend `SmrtCollection` in\n * `packages/core/src/junction.ts` and `packages/reports/src/report.ts`. (`SmrtHierarchical` and\n * `SmrtPolymorphicAssociation` extend `SmrtObject`, not `SmrtCollection`, so\n * they deliberately do NOT belong here.)\n *\n * A new framework collection base must also be added to the other parallel\n * framework-base lists so it is recognized everywhere it matters:\n * - `FRAMEWORK_BASE_CLASSES` in\n * `packages/scanner/src/inheritance-resolver.ts` (scanner chain termination).\n * - `FRAMEWORK_ABSTRACT_BASE_NAMES` in\n * `packages/core/src/scanner/manifest-generator.ts` (field-merge skipping).\n *\n * Downstream tooling that needs this detector (e.g. @happyvertical/smrt-vitest)\n * should IMPORT it from `@happyvertical/smrt-core` rather than keep a copy — a\n * duplicate detector is exactly how the #1342 junction schema-drop bug\n * half-survived the original core fix.\n */\nexport const SMRT_COLLECTION_BASE_NAMES = [\n 'SmrtCollection',\n 'SmrtJunction',\n 'SmrtJunctionBase',\n 'SmrtReportCollection',\n] as const;\n\nexport function isSmrtCollectionExtendsName(\n extendsName: string | undefined,\n): boolean {\n if (!extendsName) {\n return false;\n }\n return SMRT_COLLECTION_BASE_NAMES.some(\n (base) => extendsName === base || extendsName.endsWith(`:${base}`),\n );\n}\n\nexport function resolveRelatedRegistration(\n className: string,\n origin: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): RegisteredClass | undefined {\n if (className.includes(':')) {\n return lookup.findClass(className);\n }\n\n if (origin.packageName && lookup.findClassInPackage) {\n return (\n lookup.findClassInPackage(origin.packageName, className) ||\n lookup.findClass(className)\n );\n }\n\n return lookup.findClass(className);\n}\n\nexport function getCollectionChainRegistrations(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): RegisteredClass[] {\n const lookupName = registered.qualifiedName || registered.name || className;\n const chain = lookup.getInheritanceChain(lookupName);\n const registrations: RegisteredClass[] = [];\n\n for (const chainName of chain) {\n const chainEntry = resolveRelatedRegistration(\n chainName,\n registered,\n lookup,\n );\n if (chainEntry) {\n registrations.push(chainEntry);\n }\n }\n\n return registrations;\n}\n\nexport function isCollectionRegistration(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): boolean {\n if (isSmrtCollectionExtendsName(registered.extends)) {\n return true;\n }\n\n // A concrete collection may extend an undecorated domain collection whose\n // metadata was never registered. Match real prototype identity, not names or\n // an _itemClass property that an unrelated model could also declare.\n let prototype: object | null | undefined =\n typeof registered.constructor === 'function'\n ? registered.constructor.prototype\n : undefined;\n for (let depth = 0; prototype && depth < 64; depth += 1) {\n if (prototype === SmrtCollection.prototype) return true;\n prototype = Object.getPrototypeOf(prototype);\n }\n\n return getCollectionChainRegistrations(className, registered, lookup).some(\n (chainEntry) => isSmrtCollectionExtendsName(chainEntry.extends),\n );\n}\n\nfunction getStaticItemClassName(\n registered: RegisteredClass,\n): string | undefined {\n const itemClass = (\n registered.constructor as unknown as {\n _itemClass?: { name?: string };\n }\n )._itemClass;\n return itemClass?.name;\n}\n\nfunction getCollectionItemNameCandidates(className: string): string[] {\n const candidates: string[] = [];\n const simpleName = className.includes(':')\n ? className.slice(className.lastIndexOf(':') + 1)\n : className;\n\n const addCandidate = (candidate: string): void => {\n if (\n candidate &&\n candidate !== simpleName &&\n !candidates.includes(candidate)\n ) {\n candidates.push(candidate);\n }\n };\n\n if (simpleName.endsWith('Collection')) {\n addCandidate(simpleName.slice(0, -'Collection'.length));\n }\n\n if (simpleName.endsWith('ies')) {\n addCandidate(`${simpleName.slice(0, -3)}y`);\n } else if (simpleName.endsWith('s')) {\n addCandidate(simpleName.slice(0, -1));\n }\n\n return candidates;\n}\n\nfunction inferCollectionItemClassName(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): string | undefined {\n const lookupName = registered.name || className;\n\n for (const candidate of getCollectionItemNameCandidates(lookupName)) {\n const candidateRegistration = resolveRelatedRegistration(\n candidate,\n registered,\n lookup,\n );\n if (candidateRegistration) {\n return candidate;\n }\n }\n\n return undefined;\n}\n\nexport function resolveCollectionItemClassName(\n className: string,\n registered: RegisteredClass,\n lookup: CollectionRegistrationLookup,\n): string | undefined {\n const staticItemClassName = getStaticItemClassName(registered);\n if (staticItemClassName) {\n return staticItemClassName;\n }\n\n if (registered.extendsTypeArg) {\n return registered.extendsTypeArg;\n }\n\n const inferredItemClassName = inferCollectionItemClassName(\n className,\n registered,\n lookup,\n );\n if (inferredItemClassName) {\n return inferredItemClassName;\n }\n\n const chain = getCollectionChainRegistrations(\n className,\n registered,\n lookup,\n ).reverse();\n\n for (const chainEntry of chain) {\n if (chainEntry === registered) {\n continue;\n }\n if (chainEntry.extendsTypeArg) {\n return chainEntry.extendsTypeArg;\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAa,6BAA6B;CACxC;CACA;CACA;CACA;AACF;AAEA,SAAgB,4BACd,aACS;CACT,IAAI,CAAC,aACH,OAAO;CAET,OAAO,2B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AAS,SAAS,GAE9B,WAAW,KAAK,SAAS;CAE7B;CAEA,IAAI,WAAW,SAAS,YAAY,GAClC,aAAa,WAAW,MAAM,GAAG,GAAoB,CAAC;CAGxD,IAAI,WAAW,SAAS,KAAK,GAC3B,aAAa,GAAG,WAAW,MAAM,GAAG,EAAE,EAAE,EAAE;MACrC,IAAI,WAAW,SAAS,GAAG,GAChC,aAAa,WAAW,MAAM,GAAG,EAAE,CAAC;CAGtC,OAAO;AACT;AAEA,SAAS,6BACP,WACA,YACA,QACoB;CACpB,MAAM,aAAa,WAAW,QAAQ;CAEtC,KAAK,MAAM,aAAa,gCAAgC,UAAU,GAMhE,IAL8B,2BAC5B,WACA,YACA,MAEE,GACF,OAAO;AAKb;AAEA,SAAgB,+BACd,WACA,YACA,QACoB;CACpB,MAAM,sBAAsB,uBAAuB,UAAU;CAC7D,IAAI,qBACF,OAAO;CAGT,IAAI,WAAW,gBACb,OAAO,WAAW;CAGpB,MAAM,wBAAwB,6BAC5B,WACA,YACA,MACF;CACA,IAAI,uBACF,OAAO;CAGT,MAAM,QAAQ,gCACZ,WACA,YACA,MACF,CAAC,CAAC,QAAQ;CAEV,KAAK,MAAM,cAAc,OAAO;EAC9B,IAAI,eAAe,YACjB;EAEF,IAAI,WAAW,gBACb,OAAO,WAAW;CAEtB;AAGF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-generator.d.ts","sourceRoot":"","sources":["../../src/scanner/manifest-generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuEH,OAAO,KAAK,EAaV,UAAU,EAEV,mBAAmB,EACnB,cAAc,EAEf,MAAM,YAAY,CAAC;AAGpB,2EAA2E;AAC3E,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG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,CAAC,EAAE,eAAe,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,cAAc,EAAE,CAAC;CACtC,GACA,mBAAmB,CAGrB"}
|
|
@@ -1179,7 +1179,8 @@ var ManifestGenerator = class {
|
|
|
1179
1179
|
obj.decoratorConfig.tableName = itemClass.decoratorConfig.tableName;
|
|
1180
1180
|
logger.debug(`[manifest-generator] ${obj.className} inherits tableName: '${itemClass.decoratorConfig.tableName}' from item class ${itemClass.className}`);
|
|
1181
1181
|
}
|
|
1182
|
-
if (
|
|
1182
|
+
if (typeof obj.decoratorConfig?.collection === "string") obj.collection = obj.decoratorConfig.collection;
|
|
1183
|
+
else if (itemClass.collection !== obj.collection) {
|
|
1183
1184
|
logger.debug(`[manifest-generator] ${obj.className} inherits collection: '${itemClass.collection}' from item class ${itemClass.className} (was '${obj.collection}')`);
|
|
1184
1185
|
obj.collection = itemClass.collection;
|
|
1185
1186
|
}
|