airgen-cli 0.17.0 → 0.17.1
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/dist/uht-client.d.ts +2 -1
- package/dist/uht-client.js +4 -4
- package/package.json +1 -1
package/dist/uht-client.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare class UhtClient {
|
|
|
51
51
|
private request;
|
|
52
52
|
classify(entity: string): Promise<UhtClassification>;
|
|
53
53
|
batchCompare(entity: string, candidates: string[]): Promise<UhtBatchResult>;
|
|
54
|
-
/** Look up an entity by name in a Substrate namespace. Returns null if not found.
|
|
54
|
+
/** Look up an entity by name in a Substrate namespace. Returns null if not found.
|
|
55
|
+
* Only returns exact name matches (case-insensitive) — no fuzzy fallback. */
|
|
55
56
|
lookupEntity(name: string, namespace: string): Promise<UhtEntityRecord | null>;
|
|
56
57
|
}
|
package/dist/uht-client.js
CHANGED
|
@@ -76,11 +76,11 @@ export class UhtClient {
|
|
|
76
76
|
async batchCompare(entity, candidates) {
|
|
77
77
|
return this.request("POST", "/batch-compare", { entity, candidates });
|
|
78
78
|
}
|
|
79
|
-
/** Look up an entity by name in a Substrate namespace. Returns null if not found.
|
|
79
|
+
/** Look up an entity by name in a Substrate namespace. Returns null if not found.
|
|
80
|
+
* Only returns exact name matches (case-insensitive) — no fuzzy fallback. */
|
|
80
81
|
async lookupEntity(name, namespace) {
|
|
81
82
|
const data = await this.request("GET", `/entities?namespace=${encodeURIComponent(namespace)}&name=${encodeURIComponent(name)}&limit=10`);
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
return exact ?? data.entities[0] ?? null;
|
|
83
|
+
// Exact match only — the API does substring filtering, so we must check
|
|
84
|
+
return data.entities.find(e => e.name.toLowerCase() === name.toLowerCase()) ?? null;
|
|
85
85
|
}
|
|
86
86
|
}
|