How to use the bolt.workspacesRun function in bolt

To help you get started, we’ve selected a few bolt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wwselleck / bolt-interactive / src / prompts / commands / run.ts View on Github external
name: "script",
      type: "list",
      message: "Select script to run",
      choices
    }
  ])).script;

  if (scope.kind === ScopeType.PROJECT) {
    projectRun({
      script,
      scriptArgs: []
    });
  } else if (scope.kind === ScopeType.ALL || scope.kind === ScopeType.SELECT) {
    // the trailing comma in the glob is important for some reason
    let glob = `{${scope.workspaces.map(w => w.name).join(",")},}`;
    workspacesRun({
      script,
      scriptArgs: [],
      filterOpts: {
        only: glob
      }
    });
  }
}