@pinixai/core 0.6.0 → 0.6.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/package.json +1 -1
- package/src/manifest.ts +22 -1
package/package.json
CHANGED
package/src/manifest.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface IPCManifest {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
commands: IPCCommandInfo[];
|
|
17
17
|
dependencies: Record<string, { package: string; version: string }>;
|
|
18
|
+
patterns?: string[];
|
|
19
|
+
entities?: Record<string, unknown>;
|
|
18
20
|
package?: string;
|
|
19
21
|
version?: string;
|
|
20
22
|
}
|
|
@@ -207,10 +209,29 @@ export function createIPCManifest(clip: Clip): IPCManifest {
|
|
|
207
209
|
commands.push(cmd);
|
|
208
210
|
}
|
|
209
211
|
|
|
210
|
-
|
|
212
|
+
const manifest: IPCManifest = {
|
|
211
213
|
domain: clip.domain,
|
|
212
214
|
commands,
|
|
213
215
|
dependencies: clip.dependencies,
|
|
214
216
|
...pkgInfo,
|
|
215
217
|
};
|
|
218
|
+
|
|
219
|
+
if (clip.patterns.length > 0) {
|
|
220
|
+
manifest.patterns = clip.patterns;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const entityEntries = Object.entries(clip.entities);
|
|
224
|
+
if (entityEntries.length > 0) {
|
|
225
|
+
const entities: Record<string, unknown> = {};
|
|
226
|
+
for (const [name, schema] of entityEntries) {
|
|
227
|
+
try {
|
|
228
|
+
entities[name] = z.toJSONSchema(schema);
|
|
229
|
+
} catch {}
|
|
230
|
+
}
|
|
231
|
+
if (Object.keys(entities).length > 0) {
|
|
232
|
+
manifest.entities = entities;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return manifest;
|
|
216
237
|
}
|