public static void Publish(NpmCommandCallback action, string registry) { if (string.IsNullOrEmpty(registry)) { NpmUtils.ExecuteNpmCommand($"publish ", action); } else { NpmUtils.ExecuteNpmCommand($"publish --registry {registry}", action); } }
public static void WhoAmI(string registry, Action <string> callback) { NpmUtils.ExecuteNpmCommand($"whoami --registry {registry}", (code, result) => { if (code == 0) { callback(result.Trim()); } else { callback(null); } }); }