@hmawla/co-assistant 1.0.4 → 1.0.5
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/cli/index.js +7 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1692,7 +1692,7 @@ function createPluginRegistry(pluginsDir) {
|
|
|
1692
1692
|
init_logger();
|
|
1693
1693
|
import path3 from "path";
|
|
1694
1694
|
import { existsSync as existsSync4 } from "fs";
|
|
1695
|
-
import {
|
|
1695
|
+
import { register } from "tsx/esm/api";
|
|
1696
1696
|
var PluginManager = class {
|
|
1697
1697
|
constructor(registry, sandbox, credentials, stateRepo) {
|
|
1698
1698
|
this.registry = registry;
|
|
@@ -1792,7 +1792,12 @@ var PluginManager = class {
|
|
|
1792
1792
|
let mod;
|
|
1793
1793
|
try {
|
|
1794
1794
|
if (pluginPath.endsWith(".ts")) {
|
|
1795
|
-
|
|
1795
|
+
const unregister = register();
|
|
1796
|
+
try {
|
|
1797
|
+
mod = await import(pluginPath);
|
|
1798
|
+
} finally {
|
|
1799
|
+
unregister();
|
|
1800
|
+
}
|
|
1796
1801
|
} else {
|
|
1797
1802
|
mod = await import(pluginPath);
|
|
1798
1803
|
}
|