@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.
@@ -694,7 +694,8 @@ async function getComputeInstance(state) {
694
694
  let compute2;
695
695
  if (useDirect) {
696
696
  const providerModule = await loadProvider(providerName);
697
- const providerFactory = providerModule[providerName];
697
+ const exportName = providerName.replace(/-([a-z])/g, (_, c2) => c2.toUpperCase());
698
+ const providerFactory = providerModule[exportName] ?? providerModule[providerName];
698
699
  if (!providerFactory) {
699
700
  throw new Error(`Provider ${providerName} does not export a factory function`);
700
701
  }
@@ -1698,7 +1699,7 @@ function setupSmartEvaluator(replServer, state) {
1698
1699
  originalEval.call(this, providerCmd, context, filename, callback);
1699
1700
  return;
1700
1701
  }
1701
- const providerMatch = trimmedCmd.match(/^provider(?:\s+(direct|gateway))?\s+(\w+)$/);
1702
+ const providerMatch = trimmedCmd.match(/^provider(?:\s+(direct|gateway))?\s+([\w-]+)$/);
1702
1703
  if (providerMatch) {
1703
1704
  const mode = providerMatch[1] || null;
1704
1705
  const providerName = providerMatch[2];