@ondrej-svec/hog 1.1.2 → 1.1.3

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/cli.js CHANGED
@@ -4049,14 +4049,22 @@ function listAllRepos() {
4049
4049
  }
4050
4050
  function listOrgProjects(owner) {
4051
4051
  try {
4052
- return ghJson(["project", "list", "--owner", owner, "--format", "json"]);
4052
+ const result = ghJson([
4053
+ "project",
4054
+ "list",
4055
+ "--owner",
4056
+ owner,
4057
+ "--format",
4058
+ "json"
4059
+ ]);
4060
+ return result.projects ?? [];
4053
4061
  } catch {
4054
4062
  return [];
4055
4063
  }
4056
4064
  }
4057
4065
  function listProjectFields(owner, projectNumber) {
4058
4066
  try {
4059
- return ghJson([
4067
+ const result = ghJson([
4060
4068
  "project",
4061
4069
  "field-list",
4062
4070
  String(projectNumber),
@@ -4065,6 +4073,7 @@ function listProjectFields(owner, projectNumber) {
4065
4073
  "--format",
4066
4074
  "json"
4067
4075
  ]);
4076
+ return result.fields ?? [];
4068
4077
  } catch {
4069
4078
  return [];
4070
4079
  }
@@ -4665,7 +4674,7 @@ function resolveProjectId(projectId) {
4665
4674
  process.exit(1);
4666
4675
  }
4667
4676
  var program = new Command();
4668
- program.name("hog").description("Personal command deck \u2014 unified task dashboard for GitHub Projects + TickTick").version("1.1.2").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
4677
+ program.name("hog").description("Personal command deck \u2014 unified task dashboard for GitHub Projects + TickTick").version("1.1.3").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
4669
4678
  const opts = thisCommand.opts();
4670
4679
  if (opts.json) setFormat("json");
4671
4680
  if (opts.human) setFormat("human");