standup-mr 1.1.0 → 1.1.1

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.
@@ -151,9 +151,9 @@ function resolveHost(cliHost, envHost, hostList, labels = GITLAB_LABELS) {
151
151
  `Multiple ${labels.name} hosts found (${[...hosts].sort().join(", ")}). Pick one with --host or ${labels.envHost}.`
152
152
  );
153
153
  }
154
- function resolveToken(host, cliToken, envToken, lookup, labels = GITLAB_LABELS) {
154
+ function resolveToken(host, cliToken, envToken, lookup, labels = GITLAB_LABELS, envHost) {
155
155
  if (cliToken) return cliToken;
156
- if (envToken) return envToken;
156
+ if (envToken && (envHost === void 0 || host === envHost)) return envToken;
157
157
  if (lookup) {
158
158
  const token = lookup(host);
159
159
  if (token) return token;
@@ -1014,6 +1014,7 @@ var GitLabProvider = class {
1014
1014
 
1015
1015
  // src/providers/select.ts
1016
1016
  var DEFAULT_PROBE = { gitlab: glabHosts, github: ghHosts };
1017
+ var GITLAB_DOT_COM = "gitlab.com";
1017
1018
  function hostFrom(cliHost, envHost, probe, fallback, labels) {
1018
1019
  if (cliHost) return cliHost;
1019
1020
  if (envHost) return envHost;
@@ -1088,7 +1089,8 @@ function connect(options = {}) {
1088
1089
  options.token,
1089
1090
  env.GITHUB_TOKEN,
1090
1091
  ghToken,
1091
- GITHUB_LABELS
1092
+ GITHUB_LABELS,
1093
+ env.GITHUB_HOST ?? DOT_COM
1092
1094
  );
1093
1095
  return new GitHubProvider(host2, token2);
1094
1096
  }
@@ -1104,7 +1106,8 @@ function connect(options = {}) {
1104
1106
  options.token,
1105
1107
  env.GITLAB_TOKEN,
1106
1108
  glabToken,
1107
- GITLAB_LABELS
1109
+ GITLAB_LABELS,
1110
+ env.GITLAB_HOST ?? GITLAB_DOT_COM
1108
1111
  );
1109
1112
  return new GitLabProvider(host, token);
1110
1113
  }
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  postWebhook,
9
9
  readStandupSkillBody,
10
10
  toMarkdown
11
- } from "./chunk-RPKMLYHH.js";
11
+ } from "./chunk-FOOXHVBP.js";
12
12
 
13
13
  // src/cli/cli.ts
14
14
  import { realpathSync } from "fs";
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ interface ProviderLabels {
106
106
  declare const GITLAB_LABELS: ProviderLabels;
107
107
  declare const GITHUB_LABELS: ProviderLabels;
108
108
  declare function resolveHost(cliHost?: string, envHost?: string, hostList?: string[], labels?: ProviderLabels): string;
109
- declare function resolveToken(host: string, cliToken?: string, envToken?: string, lookup?: (host: string) => string, labels?: ProviderLabels): string;
109
+ declare function resolveToken(host: string, cliToken?: string, envToken?: string, lookup?: (host: string) => string, labels?: ProviderLabels, envHost?: string): string;
110
110
  declare function parseLoggedInHosts(statusOutput: string): string[];
111
111
  declare const parseGlabHosts: typeof parseLoggedInHosts;
112
112
  declare function glabHosts(): string[];
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  toMarkdown,
49
49
  undiagnosed,
50
50
  unreachable
51
- } from "./chunk-RPKMLYHH.js";
51
+ } from "./chunk-FOOXHVBP.js";
52
52
 
53
53
  // src/render/digest.constants.ts
54
54
  var MAX_DAY_LINES = 8;
@@ -137,9 +137,9 @@ function resolveHost(cliHost, envHost, hostList, labels = GITLAB_LABELS) {
137
137
  `Multiple ${labels.name} hosts found (${[...hosts].sort().join(", ")}). Pick one with --host or ${labels.envHost}.`
138
138
  );
139
139
  }
140
- function resolveToken(host, cliToken, envToken, lookup, labels = GITLAB_LABELS) {
140
+ function resolveToken(host, cliToken, envToken, lookup, labels = GITLAB_LABELS, envHost) {
141
141
  if (cliToken) return cliToken;
142
- if (envToken) return envToken;
142
+ if (envToken && (envHost === void 0 || host === envHost)) return envToken;
143
143
  if (lookup) {
144
144
  const token = lookup(host);
145
145
  if (token) return token;
@@ -1046,6 +1046,7 @@ var GitLabProvider = class {
1046
1046
 
1047
1047
  // src/providers/select.ts
1048
1048
  var DEFAULT_PROBE = { gitlab: glabHosts, github: ghHosts };
1049
+ var GITLAB_DOT_COM = "gitlab.com";
1049
1050
  function hostFrom(cliHost, envHost, probe, fallback, labels) {
1050
1051
  if (cliHost) return cliHost;
1051
1052
  if (envHost) return envHost;
@@ -1120,7 +1121,8 @@ function connect(options = {}) {
1120
1121
  options.token,
1121
1122
  env.GITHUB_TOKEN,
1122
1123
  ghToken,
1123
- GITHUB_LABELS
1124
+ GITHUB_LABELS,
1125
+ env.GITHUB_HOST ?? DOT_COM
1124
1126
  );
1125
1127
  return new GitHubProvider(host2, token2);
1126
1128
  }
@@ -1136,7 +1138,8 @@ function connect(options = {}) {
1136
1138
  options.token,
1137
1139
  env.GITLAB_TOKEN,
1138
1140
  glabToken,
1139
- GITLAB_LABELS
1141
+ GITLAB_LABELS,
1142
+ env.GITLAB_HOST ?? GITLAB_DOT_COM
1140
1143
  );
1141
1144
  return new GitLabProvider(host, token);
1142
1145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "standup-mr",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "mcpName": "io.github.Jubstaaa/standup-mr",
5
5
  "description": "Standup notes from merge request state, not commit logs.",
6
6
  "keywords": [