@cueloop/extension-api 0.1.0-alpha.59 → 0.1.0-alpha.60
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 +2 -2
- package/src/registry.test.ts +1 -0
- package/src/registry.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueloop/extension-api",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.60",
|
|
4
4
|
"description": "The typed contract for extending cueloop: renderers, commands, keybindings, exporters",
|
|
5
5
|
"homepage": "https://github.com/mmurakaru/cueloop#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
27
|
+
"@cueloop/schema": "0.1.0-alpha.60"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"bun": ">=1.3.0"
|
package/src/registry.test.ts
CHANGED
|
@@ -20,6 +20,7 @@ describe("Registry", () => {
|
|
|
20
20
|
// Assert
|
|
21
21
|
expect(registry.extensions.map((extension) => extension.name)).toEqual(["obsidian", "bear"]);
|
|
22
22
|
const obsidian = registry.extensions[0]!.exporters.get("obsidian")!;
|
|
23
|
+
|
|
23
24
|
expect(await obsidian(SESSION)).toEqual({ success: true, path: "/vault/note.md" });
|
|
24
25
|
});
|
|
25
26
|
|
package/src/registry.ts
CHANGED
|
@@ -23,12 +23,14 @@ export class Registry {
|
|
|
23
23
|
record.exporters.set(exporterName, exporter);
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
|
+
|
|
26
27
|
try {
|
|
27
28
|
await factory(api);
|
|
28
29
|
} catch (err) {
|
|
29
30
|
record.errors.push(err instanceof Error ? err.message : String(err));
|
|
30
31
|
}
|
|
31
32
|
this.extensions.push(record);
|
|
33
|
+
|
|
32
34
|
return record;
|
|
33
35
|
}
|
|
34
36
|
}
|