@computesdk/workbench 13.0.0 → 14.0.0
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/bin/workbench.js +3 -2
- package/dist/bin/workbench.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -689,7 +689,8 @@ async function getComputeInstance(state) {
|
|
|
689
689
|
let compute2;
|
|
690
690
|
if (useDirect) {
|
|
691
691
|
const providerModule = await loadProvider(providerName);
|
|
692
|
-
const
|
|
692
|
+
const exportName = providerName.replace(/-([a-z])/g, (_, c2) => c2.toUpperCase());
|
|
693
|
+
const providerFactory = providerModule[exportName] ?? providerModule[providerName];
|
|
693
694
|
if (!providerFactory) {
|
|
694
695
|
throw new Error(`Provider ${providerName} does not export a factory function`);
|
|
695
696
|
}
|
|
@@ -1689,7 +1690,7 @@ function setupSmartEvaluator(replServer, state) {
|
|
|
1689
1690
|
originalEval.call(this, providerCmd, context, filename, callback);
|
|
1690
1691
|
return;
|
|
1691
1692
|
}
|
|
1692
|
-
const providerMatch = trimmedCmd.match(/^provider(?:\s+(direct|gateway))?\s+(\w+)$/);
|
|
1693
|
+
const providerMatch = trimmedCmd.match(/^provider(?:\s+(direct|gateway))?\s+([\w-]+)$/);
|
|
1693
1694
|
if (providerMatch) {
|
|
1694
1695
|
const mode = providerMatch[1] || null;
|
|
1695
1696
|
const providerName = providerMatch[2];
|