@hangox/pm-cli 1.1.0 → 1.1.2

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/index.js CHANGED
@@ -855,6 +855,12 @@ function extractHours(text) {
855
855
  const value = parseFloat(daysMatch[1]);
856
856
  return isNaN(value) ? void 0 : value;
857
857
  }
858
+ const chineseDaysRegex = /[((]([\d.]+)天[))]/;
859
+ const chineseDaysMatch = text.match(chineseDaysRegex);
860
+ if (chineseDaysMatch) {
861
+ const value = parseFloat(chineseDaysMatch[1]);
862
+ return isNaN(value) ? void 0 : value;
863
+ }
858
864
  const hoursRegex = /[((]([\d.]+)[))]/;
859
865
  const hoursMatch = text.match(hoursRegex);
860
866
  if (hoursMatch) {
@@ -2057,7 +2063,7 @@ function createIssueCommand() {
2057
2063
  ...options,
2058
2064
  host: urlHost || options.host
2059
2065
  });
2060
- const validation = validateCredentials(creds);
2066
+ const validation = validateCredentials(creds, ["token", "host"]);
2061
2067
  if (!validation.valid) {
2062
2068
  outputError(`\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570: ${validation.missing.join(", ")}`, options.pretty);
2063
2069
  process.exit(1);
@@ -2970,6 +2976,9 @@ function createTimeCommand() {
2970
2976
  const configUserId = getConfigValue("userId", options.config);
2971
2977
  if (configUserId) {
2972
2978
  userId = parseInt(configUserId, 10);
2979
+ } else {
2980
+ outputError("\u672A\u914D\u7F6E\u7528\u6237 ID\uFF0C\u8BF7\u5148\u8BBE\u7F6E: pm-cli config set user-id <\u60A8\u7684\u7528\u6237ID>", options.pretty);
2981
+ process.exit(1);
2973
2982
  }
2974
2983
  }
2975
2984
  logger_default.info(`\u67E5\u8BE2\u5DE5\u65F6\u7EDF\u8BA1: ${periodLabel}`);