This commit is contained in:
2025-07-28 17:01:34 +00:00
parent b8d707b363
commit 18d8ab0278

15
ts/core/index.ts Normal file
View File

@@ -0,0 +1,15 @@
import * as smartenv from '@push.rocks/smartenv';
let usedImplementation: typeof import('../core_base/index.js');
const smartenvInstance = new smartenv.Smartenv();
export const getImplementation = async () => {
if (smartenvInstance.isNode) {
usedImplementation = await smartenvInstance.getSafeNodeModule<
typeof import('../core_node/index.js')
>('../core_node/index.js');
} else {
usedImplementation = await import('../core_fetch/index.js');
}
};