@happyvertical/smrt-core 0.57.8 → 0.57.10
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 +7 -1
- package/agents/build-knowledge.md +19 -3
- package/dist/knowledge.js +1 -0
- package/dist/knowledge.js.map +1 -1
- package/dist/manifest/browser-capability.generated.js +8 -1
- package/dist/manifest/browser-capability.generated.js.map +1 -1
- 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/class-registration.d.ts.map +1 -1
- package/dist/registry/class-registration.js +18 -2
- package/dist/registry/class-registration.js.map +1 -1
- package/dist/registry/inheritance-resolver.d.ts.map +1 -1
- package/dist/registry/inheritance-resolver.js +19 -1
- package/dist/registry/inheritance-resolver.js.map +1 -1
- package/dist/scanner/manifest-generator.d.ts +30 -0
- package/dist/scanner/manifest-generator.d.ts.map +1 -1
- package/dist/scanner/manifest-generator.js +76 -30
- package/dist/scanner/manifest-generator.js.map +1 -1
- package/dist/schema/generator.d.ts.map +1 -1
- package/dist/schema/generator.js +1 -1
- package/dist/schema/generator.js.map +1 -1
- package/dist/smrt-knowledge.json +7 -7
- package/dist/vite-plugin/worker-registration.d.ts +5 -3
- package/dist/vite-plugin/worker-registration.d.ts.map +1 -1
- package/dist/vite-plugin/worker-registration.js +6 -3
- package/dist/vite-plugin/worker-registration.js.map +1 -1
- package/dist/vite-preset/index.d.ts +4 -3
- package/dist/vite-preset/index.d.ts.map +1 -1
- package/dist/vite-preset/index.js +21 -5
- package/dist/vite-preset/index.js.map +1 -1
- package/package.json +10 -10
package/dist/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-registration.d.ts","sourceRoot":"","sources":["../../src/registry/class-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwBH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAW,CAAC;AACvC,OAAO,KAAK,EAKV,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAsD7B,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EAElB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"class-registration.d.ts","sourceRoot":"","sources":["../../src/registry/class-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwBH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAW,CAAC;AACvC,OAAO,KAAK,EAKV,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAsD7B,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAiGpB;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAS3E;AA4BD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAeT;AAstBD;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,OAAO,UAAU,EACvB,MAAM,GAAE,iBAAsB,GAC7B,IAAI,CASN;AAioCD,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAMlB,qBAAqB,EAAE,WAAW,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC,GAC3E,IAAI,CAeN;AA+BD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EACpC,kBAAkB,EAAE,eAAe,CAAC,oBAAoB,CAAC,GAAG,SAAS,GACpE,IAAI,CAyCN;AAoHD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,eAAe,EACzB,gBAAgB,CAAC,EAAE;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GACA,IAAI,CA4CN;AAmMD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,qBAAqB,EAChC,mBAAmB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAUN"}
|
|
@@ -47,6 +47,19 @@ function pluralizeCollection(className) {
|
|
|
47
47
|
return `${lower}s`;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
+
* The registry key of the class `ctor` actually extends, when that parent is
|
|
51
|
+
* registered under a qualified name and (if the manifest names a parent) has
|
|
52
|
+
* the manifest's simple name (#4145). Constructor identity is exact: two
|
|
53
|
+
* packages may export a same-named class, and only the prototype says which
|
|
54
|
+
* one this class extends, even when the manifest predates `extendsQualified`.
|
|
55
|
+
*/
|
|
56
|
+
function registeredParentKey(ctor, manifestParent) {
|
|
57
|
+
const parentKey = getConstructorIndex().get(Object.getPrototypeOf(ctor));
|
|
58
|
+
if (!parentKey || !isQualifiedName(parentKey)) return void 0;
|
|
59
|
+
if (manifestParent && manifestParent !== parentKey && parseQualifiedName(parentKey).className !== manifestParent) return;
|
|
60
|
+
return parentKey;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
50
63
|
* The collection an STI subtype shares with its STI base, for a class that
|
|
51
64
|
* registers with no manifest `collection` (#3125). The manifest generator
|
|
52
65
|
* gives every STI subtype its base's collection (`findSTIBase`: the oldest
|
|
@@ -870,7 +883,7 @@ function registerUntracked(ctor, config = {}) {
|
|
|
870
883
|
let validators;
|
|
871
884
|
if (validationRules === void 0) validators = compileValidators(name, fields);
|
|
872
885
|
else verboseLog(`[registry] Using ${validationRules.length} pre-computed validation rules for ${name}`);
|
|
873
|
-
let extendsClass = manifestEntry?.extendsQualified ?? manifestEntry?.extends;
|
|
886
|
+
let extendsClass = manifestEntry?.extendsQualified ?? registeredParentKey(ctor, manifestEntry?.extends) ?? manifestEntry?.extends;
|
|
874
887
|
assertRegisteredStiParent(ctor);
|
|
875
888
|
if (!extendsClass) {
|
|
876
889
|
const proto = Object.getPrototypeOf(ctor);
|
|
@@ -1185,7 +1198,10 @@ function mergeManifestIntoExistingRegistration(existing, objectDef, packageName)
|
|
|
1185
1198
|
existing.qualifiedName = createQualifiedName(packageName, existing.name);
|
|
1186
1199
|
} else if (!existing.packageName && objectDef.packageName) existing.packageName = objectDef.packageName;
|
|
1187
1200
|
const manifestParent = objectDef.extendsQualified ?? objectDef.extends;
|
|
1188
|
-
if (manifestParent)
|
|
1201
|
+
if (manifestParent) {
|
|
1202
|
+
const qualifiedParent = packageName ? qualifyExtendsName(manifestParent, packageName) : manifestParent;
|
|
1203
|
+
if (!(!isQualifiedName(qualifiedParent) && !!existing.extends && isQualifiedName(existing.extends) && parseQualifiedName(existing.extends).className === qualifiedParent)) existing.extends = qualifiedParent;
|
|
1204
|
+
}
|
|
1189
1205
|
if (!existing.sourceFilePath && objectDef.filePath) existing.sourceFilePath = objectDef.filePath;
|
|
1190
1206
|
if (objectDef.collection) existing.collection = existing.config.collection ?? objectDef.collection;
|
|
1191
1207
|
existing.visibility = objectDef.visibility || manifestConfig.visibility || existing.visibility;
|