@gaoding/cli 3.0.4 → 3.0.5

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.
@@ -194,6 +194,9 @@ export function createProductionRuntime(options = {}) {
194
194
  const sso = createSsoService({
195
195
  ssoApi: endpoints.ssoApi,
196
196
  clientId: product.deviceClientId,
197
+ ...(product.id === "gaoding" && host.host_application && host.host_application !== "unknown"
198
+ ? { hostApplication: host.host_application }
199
+ : {}),
197
200
  userAgent,
198
201
  traceparent: () => telemetry.traceparent(),
199
202
  fetch,
@@ -112,9 +112,10 @@ export function createSsoService(options) {
112
112
  }
113
113
  return {
114
114
  async startDeviceAuthorization(signal) {
115
- const response = await request(`oauth/device-authorization?${new URLSearchParams({
116
- clientId: options.clientId ?? "gdhub-cli"
117
- })}`, signal);
115
+ const query = new URLSearchParams({ clientId: options.clientId ?? "gdhub-cli" });
116
+ if (options.hostApplication)
117
+ query.set("host_application", options.hostApplication);
118
+ const response = await request(`oauth/device-authorization?${query}`, signal);
118
119
  if (!response.ok)
119
120
  throw await responseError(response);
120
121
  const body = await responseRecord(response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaoding/cli",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Gaoding command-line interface for agents and people.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,8 +65,8 @@
65
65
  }
66
66
  },
67
67
  "gaodingRelease": {
68
- "sourceCommit": "a685f658963a16ae83ed2cad908ac47e85af304f",
69
- "pipelineId": "291245",
70
- "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/291245"
68
+ "sourceCommit": "6e50596ce82b0968db6b25349688a967984de80b",
69
+ "pipelineId": "293644",
70
+ "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/293644"
71
71
  }
72
72
  }