opencode-rehydar 0.14.1 → 0.14.2
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/index.js +12 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// npm install
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
export const rehydra = sdkDefault;
|
|
1
|
+
// Loads the published V2 SDK. Resolves to `opencode-rehydra-core`'s
|
|
2
|
+
// `opencode-plugin` entry via its `exports` map, so the plugin works from an
|
|
3
|
+
// npm install (no in-repo `dist/` required at runtime).
|
|
4
|
+
const sdk = await import("opencode-rehydra-core/opencode-plugin");
|
|
5
|
+
const sdkDefault = sdk.default;
|
|
6
|
+
const sdkPlugin = sdk.plugin;
|
|
7
|
+
const sdkCreate = sdk.createRehydraPlugin;
|
|
8
|
+
export { sdkDefault as default, sdkPlugin as plugin, sdkCreate as createRehydraPlugin };
|
|
9
|
+
// Backwards-compatible named export for consumers that still use the V1-style
|
|
10
|
+
// entry: `import rehydra from "@rehydra/opencode"`. V2 reads the default
|
|
11
|
+
// export, but keep `rehydra` available for code that imports it explicitly.
|
|
12
|
+
export const rehydra = sdkDefault;
|