@huaqiu/dsh-auth 0.6.22 → 0.6.24
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/lib/client.js +209 -20
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +12 -0
- package/lib/index.mjs +8 -2
- package/package.json +2 -2
- package/src/client/client.ts +56 -14
- package/src/client/i18n.ts +10 -0
- package/src/client/index.tsx +15 -3
- package/src/client/lib.ts +18 -8
- package/src/client/transport.ts +13 -5
- package/src/client/ui/sidebar-action.tsx +8 -1
- package/src/client/ui/turn-error-cta.tsx +165 -0
- package/src/host.ts +7 -0
- package/src/routes.ts +3 -0
- package/src/service.ts +8 -0
package/src/service.ts
CHANGED
|
@@ -112,6 +112,11 @@ export interface HuaqiuAuthService {
|
|
|
112
112
|
* or null when none was configured (standalone keeps its PROD default).
|
|
113
113
|
*/
|
|
114
114
|
readonly subscriptionOrigin: string | null
|
|
115
|
+
/**
|
|
116
|
+
* Full「Go to profile」URL injected by HQ Edge (`config.profileUrl`), or null
|
|
117
|
+
* when none was configured — the browser half then keeps its PROD default.
|
|
118
|
+
*/
|
|
119
|
+
readonly profileUrl: string | null
|
|
115
120
|
}
|
|
116
121
|
|
|
117
122
|
const PERSIST_FILE = 'session.json'
|
|
@@ -246,6 +251,7 @@ export class InMemoryHuaqiuAuthService implements HuaqiuAuthService {
|
|
|
246
251
|
this.subscriptionOrigin = resolved.subscriptionOrigin?.length
|
|
247
252
|
? resolved.subscriptionOrigin
|
|
248
253
|
: null
|
|
254
|
+
this.profileUrl = resolved.profileUrl?.length ? resolved.profileUrl : null
|
|
249
255
|
this.log.info('auth service started', {
|
|
250
256
|
hostMode: this.hostMode,
|
|
251
257
|
hostAuthPath: resolved.hostAuthPath,
|
|
@@ -266,6 +272,8 @@ export class InMemoryHuaqiuAuthService implements HuaqiuAuthService {
|
|
|
266
272
|
readonly subscriptionApiBaseUrl: string | null
|
|
267
273
|
/** Subscription origin resolved by HQ Edge (`HQ_AI_ENV`); null → standalone. */
|
|
268
274
|
readonly subscriptionOrigin: string | null
|
|
275
|
+
/**「Go to profile」URL resolved by HQ Edge (`HQ_AI_ENV`); null → standalone. */
|
|
276
|
+
readonly profileUrl: string | null
|
|
269
277
|
|
|
270
278
|
readonly auth: HuaqiuAuthApi = {
|
|
271
279
|
isAuthenticated: async () => {
|