dsh-auth-remote 0.1.0 → 0.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/login.css CHANGED
@@ -2,36 +2,53 @@
2
2
  :root {
3
3
  color-scheme: light dark;
4
4
  font-family:
5
- Inter,
6
- ui-sans-serif,
7
- system-ui,
8
5
  -apple-system,
9
6
  BlinkMacSystemFont,
10
7
  "Segoe UI",
8
+ "PingFang SC",
9
+ "Hiragino Sans GB",
10
+ "Microsoft YaHei",
11
+ "Helvetica Neue",
12
+ Helvetica,
13
+ Arial,
11
14
  sans-serif;
12
15
  font-synthesis: none;
13
16
  text-rendering: optimizeLegibility;
14
- --surface: #fff;
15
- --background: #f4f6fa;
16
- --text: #172033;
17
- --muted: #526077;
18
- --border: #d6dce6;
19
- --accent: #255ad7;
20
- --accent-hover: #1749bc;
21
- --error: #b42332;
22
- --info: #195b3b;
17
+ --dsw-radius-sm: 8px;
18
+ --dsw-radius-md: 12px;
19
+ --dsw-radius-lg: 16px;
20
+ --dsw-radius-panel: 28px;
21
+ --dsw-alias-bg-base: #fff;
22
+ --dsw-alias-bg-layer-1: #fff;
23
+ --dsw-alias-bg-layer-2: #fff;
24
+ --dsw-alias-bg-module-platform: #f5f6f7;
25
+ --dsw-alias-label-primary: #0f1115;
26
+ --dsw-alias-label-primary-foreground: #fff;
27
+ --dsw-alias-label-secondary: #61666b;
28
+ --dsw-alias-border-l2: rgb(0 0 0 / 10%);
29
+ --dsw-alias-border-l4: rgb(0 0 0 / 16%);
30
+ --dsw-alias-button-primary-fill: #0f1115;
31
+ --dsw-alias-button-primary-hover: #43454a;
32
+ --dsw-alias-interactive-bg-hover: rgb(38 49 72 / 6%);
33
+ --dsw-alias-state-business-primary: #4176e6;
34
+ --dsw-alias-state-error-primary: #ec1313;
23
35
  }
24
36
  @media (prefers-color-scheme: dark) {
25
37
  :root {
26
- --surface: #202634;
27
- --background: #141923;
28
- --text: #f0f3f9;
29
- --muted: #b8c0cf;
30
- --border: #465168;
31
- --accent: #7b9dff;
32
- --accent-hover: #a6bbff;
33
- --error: #ff9a9f;
34
- --info: #95ddb4;
38
+ --dsw-alias-bg-base: #151517;
39
+ --dsw-alias-bg-layer-1: #232324;
40
+ --dsw-alias-bg-layer-2: #2c2c2e;
41
+ --dsw-alias-bg-module-platform: #353638;
42
+ --dsw-alias-label-primary: #f9fafb;
43
+ --dsw-alias-label-primary-foreground: #0f1115;
44
+ --dsw-alias-label-secondary: #cfd3d6;
45
+ --dsw-alias-border-l2: rgb(255 255 255 / 12%);
46
+ --dsw-alias-border-l4: rgb(255 255 255 / 20%);
47
+ --dsw-alias-button-primary-fill: #f9fafb;
48
+ --dsw-alias-button-primary-hover: #ebeef2;
49
+ --dsw-alias-interactive-bg-hover: rgb(255 255 255 / 8%);
50
+ --dsw-alias-state-business-primary: #7aaaff;
51
+ --dsw-alias-state-error-primary: #f25a5a;
35
52
  }
36
53
  }
37
54
  * {
@@ -39,8 +56,8 @@
39
56
  }
40
57
  body {
41
58
  margin: 0;
42
- background: var(--background);
43
- color: var(--text);
59
+ background: var(--dsw-alias-bg-base);
60
+ color: var(--dsw-alias-label-primary);
44
61
  }
45
62
  .login-page {
46
63
  min-height: 100svh;
@@ -49,18 +66,17 @@ body {
49
66
  padding: 24px;
50
67
  }
51
68
  .login-card {
52
- width: min(100%, 430px);
69
+ width: min(100%, 440px);
53
70
  padding: 32px;
54
- border: 1px solid var(--border);
55
- border-radius: 16px;
56
- background: var(--surface);
57
- box-shadow: 0 12px 36px #101a3012;
71
+ border: 0.5px solid var(--dsw-alias-border-l2);
72
+ border-radius: var(--dsw-radius-panel);
73
+ background: var(--dsw-alias-bg-layer-2);
58
74
  }
59
75
  .brand {
60
- color: var(--accent);
76
+ color: var(--dsw-alias-button-primary-fill);
61
77
  font-size: 14px;
62
- font-weight: 700;
63
- letter-spacing: 0.02em;
78
+ font-weight: 500;
79
+ line-height: 22px;
64
80
  }
65
81
  .login-header {
66
82
  display: flex;
@@ -77,83 +93,88 @@ body {
77
93
  .language-control select {
78
94
  min-height: 36px;
79
95
  padding: 5px 7px;
80
- border: 1px solid var(--border);
81
- border-radius: 6px;
82
- background: var(--surface);
83
- color: var(--text);
96
+ border: 1px solid var(--dsw-alias-border-l4);
97
+ border-radius: var(--dsw-radius-sm);
98
+ background: var(--dsw-alias-bg-layer-2);
99
+ color: var(--dsw-alias-label-primary);
84
100
  font: inherit;
85
101
  }
86
102
  h1 {
87
103
  margin: 16px 0 12px;
88
- font-size: 26px;
89
- line-height: 1.25;
104
+ font-size: 24px;
105
+ line-height: 32px;
106
+ font-weight: 500;
90
107
  }
91
108
  p {
92
- color: var(--muted);
93
- line-height: 1.6;
109
+ color: var(--dsw-alias-label-secondary);
110
+ font-size: 14px;
111
+ line-height: 22px;
94
112
  }
95
113
  form {
96
114
  display: grid;
97
- gap: 10px;
115
+ gap: 6px;
98
116
  margin-top: 24px;
99
117
  }
100
118
  label {
101
119
  font-size: 14px;
102
- font-weight: 600;
120
+ font-weight: 400;
103
121
  }
104
122
  input {
105
123
  width: 100%;
106
- min-height: 44px;
107
- margin-bottom: 8px;
108
- padding: 10px 12px;
109
- border: 1px solid var(--border);
110
- border-radius: 8px;
111
- background: var(--surface);
112
- color: var(--text);
124
+ min-height: 40px;
125
+ margin-bottom: 12px;
126
+ padding: 8px 12px;
127
+ border: 1px solid var(--dsw-alias-border-l4);
128
+ border-radius: var(--dsw-radius-md);
129
+ background: var(--dsw-alias-bg-layer-2);
130
+ color: var(--dsw-alias-label-primary);
113
131
  font: inherit;
114
132
  }
115
133
  input:focus-visible,
116
134
  select:focus-visible,
117
135
  button:focus-visible {
118
- outline: 3px solid var(--accent);
136
+ outline: 2px solid var(--dsw-alias-state-business-primary);
119
137
  outline-offset: 2px;
120
138
  }
121
139
  button {
122
- min-height: 42px;
140
+ min-height: 40px;
123
141
  padding: 9px 15px;
124
- border: 1px solid var(--accent);
125
- border-radius: 8px;
126
- background: var(--accent);
127
- color: var(--background);
142
+ border: 1px solid var(--dsw-alias-button-primary-fill);
143
+ border-radius: var(--dsw-radius-md);
144
+ background: var(--dsw-alias-button-primary-fill);
145
+ color: var(--dsw-alias-label-primary-foreground);
128
146
  font: inherit;
129
- font-weight: 650;
147
+ font-size: 14px;
148
+ line-height: 22px;
149
+ font-weight: 400;
130
150
  cursor: pointer;
131
151
  }
132
- button:hover {
133
- background: var(--accent-hover);
134
- border-color: var(--accent-hover);
152
+ button:hover:not(:disabled) {
153
+ background: var(--dsw-alias-button-primary-hover);
154
+ border-color: var(--dsw-alias-button-primary-hover);
135
155
  }
136
156
  button:disabled {
137
- opacity: 0.55;
138
- cursor: wait;
157
+ opacity: 0.4;
158
+ cursor: not-allowed;
139
159
  }
140
160
  button.secondary {
161
+ border-color: var(--dsw-alias-border-l4);
141
162
  background: transparent;
142
- color: var(--accent);
163
+ color: var(--dsw-alias-button-primary-fill);
143
164
  }
144
165
  button.secondary:hover {
145
- background: color-mix(in srgb, var(--accent) 10%, transparent);
166
+ background: var(--dsw-alias-interactive-bg-hover);
146
167
  }
147
168
  .link-button {
148
169
  margin-top: 15px;
149
170
  padding-left: 0;
150
171
  border: 0;
151
172
  background: transparent;
152
- color: var(--accent);
173
+ color: var(--dsw-alias-button-primary-fill);
153
174
  }
154
- .link-button:hover {
175
+ .link-button:hover:not(:disabled) {
155
176
  background: transparent;
156
- color: var(--accent-hover);
177
+ color: var(--dsw-alias-button-primary-hover);
157
178
  text-decoration: underline;
158
179
  }
159
180
  .command {
@@ -165,9 +186,11 @@ button.secondary:hover {
165
186
  .secret code {
166
187
  overflow-wrap: anywhere;
167
188
  padding: 12px;
168
- border: 1px solid var(--border);
169
- border-radius: 8px;
189
+ border: 1px solid var(--dsw-alias-border-l4);
190
+ border-radius: var(--dsw-radius-md);
191
+ background: var(--dsw-alias-bg-module-platform);
170
192
  font-size: 13px;
193
+ line-height: 20px;
171
194
  user-select: all;
172
195
  }
173
196
  .secret {
@@ -176,7 +199,7 @@ button.secondary:hover {
176
199
  margin: 14px 0;
177
200
  }
178
201
  .secret span {
179
- color: var(--muted);
202
+ color: var(--dsw-alias-label-secondary);
180
203
  font-size: 13px;
181
204
  }
182
205
  #totp-qr {
@@ -184,7 +207,7 @@ button.secondary:hover {
184
207
  max-width: 100%;
185
208
  margin: 18px auto;
186
209
  background: #fff;
187
- border-radius: 6px;
210
+ border-radius: var(--dsw-radius-sm);
188
211
  }
189
212
  .actions {
190
213
  display: grid;
@@ -196,7 +219,9 @@ button.secondary:hover {
196
219
  grid-template-columns: repeat(2, minmax(0, 1fr));
197
220
  gap: 10px 22px;
198
221
  margin: 22px 0;
199
- padding-left: 24px;
222
+ padding: 16px 16px 16px 40px;
223
+ border-radius: var(--dsw-radius-lg);
224
+ background: var(--dsw-alias-bg-module-platform);
200
225
  font-family:
201
226
  ui-monospace,
202
227
  SFMono-Regular,
@@ -209,15 +234,14 @@ button.secondary:hover {
209
234
  overflow-wrap: anywhere;
210
235
  }
211
236
  .message {
212
- min-height: 1.5em;
213
237
  margin: 18px 0 0;
214
238
  font-size: 14px;
215
239
  }
216
240
  .message.error {
217
- color: var(--error);
241
+ color: var(--dsw-alias-state-error-primary);
218
242
  }
219
243
  .message.info {
220
- color: var(--info);
244
+ color: var(--dsw-alias-label-secondary);
221
245
  }
222
246
  @media (max-width: 480px) {
223
247
  .login-page {
@@ -227,4 +251,7 @@ button.secondary:hover {
227
251
  padding: 24px 20px;
228
252
  }
229
253
  }
254
+ .message:empty {
255
+ display: none;
256
+ }
230
257
  /*# sourceMappingURL=login.css.map */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/client/login/style.css"],
4
- "sourcesContent": [":root {\n color-scheme: light dark;\n font-family:\n Inter,\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-synthesis: none;\n text-rendering: optimizeLegibility;\n --surface: #fff;\n --background: #f4f6fa;\n --text: #172033;\n --muted: #526077;\n --border: #d6dce6;\n --accent: #255ad7;\n --accent-hover: #1749bc;\n --error: #b42332;\n --info: #195b3b;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --surface: #202634;\n --background: #141923;\n --text: #f0f3f9;\n --muted: #b8c0cf;\n --border: #465168;\n --accent: #7b9dff;\n --accent-hover: #a6bbff;\n --error: #ff9a9f;\n --info: #95ddb4;\n }\n}\n\n* {\n box-sizing: border-box;\n}\nbody {\n margin: 0;\n background: var(--background);\n color: var(--text);\n}\n.login-page {\n min-height: 100svh;\n display: grid;\n place-items: center;\n padding: 24px;\n}\n.login-card {\n width: min(100%, 430px);\n padding: 32px;\n border: 1px solid var(--border);\n border-radius: 16px;\n background: var(--surface);\n box-shadow: 0 12px 36px #101a3012;\n}\n.brand {\n color: var(--accent);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 0.02em;\n}\n.login-header {\n display: flex;\n flex-wrap: wrap;\n align-items: start;\n justify-content: space-between;\n gap: 12px;\n}\n.language-control {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.language-control select {\n min-height: 36px;\n padding: 5px 7px;\n border: 1px solid var(--border);\n border-radius: 6px;\n background: var(--surface);\n color: var(--text);\n font: inherit;\n}\nh1 {\n margin: 16px 0 12px;\n font-size: 26px;\n line-height: 1.25;\n}\np {\n color: var(--muted);\n line-height: 1.6;\n}\nform {\n display: grid;\n gap: 10px;\n margin-top: 24px;\n}\nlabel {\n font-size: 14px;\n font-weight: 600;\n}\ninput {\n width: 100%;\n min-height: 44px;\n margin-bottom: 8px;\n padding: 10px 12px;\n border: 1px solid var(--border);\n border-radius: 8px;\n background: var(--surface);\n color: var(--text);\n font: inherit;\n}\ninput:focus-visible,\nselect:focus-visible,\nbutton:focus-visible {\n outline: 3px solid var(--accent);\n outline-offset: 2px;\n}\nbutton {\n min-height: 42px;\n padding: 9px 15px;\n border: 1px solid var(--accent);\n border-radius: 8px;\n background: var(--accent);\n color: var(--background);\n font: inherit;\n font-weight: 650;\n cursor: pointer;\n}\nbutton:hover {\n background: var(--accent-hover);\n border-color: var(--accent-hover);\n}\nbutton:disabled {\n opacity: 0.55;\n cursor: wait;\n}\nbutton.secondary {\n background: transparent;\n color: var(--accent);\n}\nbutton.secondary:hover {\n background: color-mix(in srgb, var(--accent) 10%, transparent);\n}\n.link-button {\n margin-top: 15px;\n padding-left: 0;\n border: 0;\n background: transparent;\n color: var(--accent);\n}\n.link-button:hover {\n background: transparent;\n color: var(--accent-hover);\n text-decoration: underline;\n}\n.command {\n display: grid;\n gap: 12px;\n margin: 22px 0;\n}\n.command code,\n.secret code {\n overflow-wrap: anywhere;\n padding: 12px;\n border: 1px solid var(--border);\n border-radius: 8px;\n font-size: 13px;\n user-select: all;\n}\n.secret {\n display: grid;\n gap: 8px;\n margin: 14px 0;\n}\n.secret span {\n color: var(--muted);\n font-size: 13px;\n}\n#totp-qr {\n display: block;\n max-width: 100%;\n margin: 18px auto;\n background: #fff;\n border-radius: 6px;\n}\n.actions {\n display: grid;\n gap: 12px;\n margin-top: 22px;\n}\n.backup-codes {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px 22px;\n margin: 22px 0;\n padding-left: 24px;\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 14px;\n}\n.backup-codes li {\n padding-left: 3px;\n overflow-wrap: anywhere;\n}\n.message {\n min-height: 1.5em;\n margin: 18px 0 0;\n font-size: 14px;\n}\n.message.error {\n color: var(--error);\n}\n.message.info {\n color: var(--info);\n}\n\n@media (max-width: 480px) {\n .login-page {\n padding: 12px;\n }\n .login-card {\n padding: 24px 20px;\n }\n}\n"],
5
- "mappings": ";AAAA;AACE,gBAAc,MAAM;AACpB;AAAA,IACE,KAAK;AAAA,IACL,aAAa;AAAA,IACb,SAAS;AAAA,IACT,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV;AACF,kBAAgB;AAChB,kBAAgB;AAChB,aAAW;AACX,gBAAc;AACd,UA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,UAAQ,KAAK,EAAE;AACf,aAAW;AACb;AACA,CALC,OAKO,CAAC;AACP,SAAO,IAAI;AACb;AACA,CARC,OAQO,CAAC;AACP,SAAO,IAAI;AACb;AAEA,QAAO,WAAY;AACjB,GA/KD;AAgLG,aAAS;AACX;AACA,GA5KD;AA6KG,aAAS,KAAK;AAChB;AACF;",
4
+ "sourcesContent": ["/* Standalone subset of DSH ui-theme's base/design-platform tokens (0.2.0-rc.1).\n * The unauthenticated page cannot load host modules or read host preferences. */\n:root {\n color-scheme: light dark;\n font-family:\n -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-synthesis: none;\n text-rendering: optimizeLegibility;\n --dsw-radius-sm: 8px;\n --dsw-radius-md: 12px;\n --dsw-radius-lg: 16px;\n --dsw-radius-panel: 28px;\n --dsw-alias-bg-base: #fff;\n --dsw-alias-bg-layer-1: #fff;\n --dsw-alias-bg-layer-2: #fff;\n --dsw-alias-bg-module-platform: #f5f6f7;\n --dsw-alias-label-primary: #0f1115;\n --dsw-alias-label-primary-foreground: #fff;\n --dsw-alias-label-secondary: #61666b;\n --dsw-alias-border-l2: rgb(0 0 0 / 10%);\n --dsw-alias-border-l4: rgb(0 0 0 / 16%);\n --dsw-alias-button-primary-fill: #0f1115;\n --dsw-alias-button-primary-hover: #43454a;\n --dsw-alias-interactive-bg-hover: rgb(38 49 72 / 6%);\n --dsw-alias-state-business-primary: #4176e6;\n --dsw-alias-state-error-primary: #ec1313;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --dsw-alias-bg-base: #151517;\n --dsw-alias-bg-layer-1: #232324;\n --dsw-alias-bg-layer-2: #2c2c2e;\n --dsw-alias-bg-module-platform: #353638;\n --dsw-alias-label-primary: #f9fafb;\n --dsw-alias-label-primary-foreground: #0f1115;\n --dsw-alias-label-secondary: #cfd3d6;\n --dsw-alias-border-l2: rgb(255 255 255 / 12%);\n --dsw-alias-border-l4: rgb(255 255 255 / 20%);\n --dsw-alias-button-primary-fill: #f9fafb;\n --dsw-alias-button-primary-hover: #ebeef2;\n --dsw-alias-interactive-bg-hover: rgb(255 255 255 / 8%);\n --dsw-alias-state-business-primary: #7aaaff;\n --dsw-alias-state-error-primary: #f25a5a;\n }\n}\n\n* {\n box-sizing: border-box;\n}\nbody {\n margin: 0;\n background: var(--dsw-alias-bg-base);\n color: var(--dsw-alias-label-primary);\n}\n.login-page {\n min-height: 100svh;\n display: grid;\n place-items: center;\n padding: 24px;\n}\n.login-card {\n width: min(100%, 440px);\n padding: 32px;\n border: 0.5px solid var(--dsw-alias-border-l2);\n border-radius: var(--dsw-radius-panel);\n background: var(--dsw-alias-bg-layer-2);\n}\n.brand {\n color: var(--dsw-alias-button-primary-fill);\n font-size: 14px;\n font-weight: 500;\n line-height: 22px;\n}\n.login-header {\n display: flex;\n flex-wrap: wrap;\n align-items: start;\n justify-content: space-between;\n gap: 12px;\n}\n.language-control {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.language-control select {\n min-height: 36px;\n padding: 5px 7px;\n border: 1px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n}\nh1 {\n margin: 16px 0 12px;\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n}\np {\n color: var(--dsw-alias-label-secondary);\n font-size: 14px;\n line-height: 22px;\n}\nform {\n display: grid;\n gap: 6px;\n margin-top: 24px;\n}\nlabel {\n font-size: 14px;\n font-weight: 400;\n}\ninput {\n width: 100%;\n min-height: 40px;\n margin-bottom: 12px;\n padding: 8px 12px;\n border: 1px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n}\ninput:focus-visible,\nselect:focus-visible,\nbutton:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: 2px;\n}\nbutton {\n min-height: 40px;\n padding: 9px 15px;\n border: 1px solid var(--dsw-alias-button-primary-fill);\n border-radius: var(--dsw-radius-md);\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n font-weight: 400;\n cursor: pointer;\n}\nbutton:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover);\n border-color: var(--dsw-alias-button-primary-hover);\n}\nbutton:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\nbutton.secondary {\n border-color: var(--dsw-alias-border-l4);\n background: transparent;\n color: var(--dsw-alias-button-primary-fill);\n}\nbutton.secondary:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.link-button {\n margin-top: 15px;\n padding-left: 0;\n border: 0;\n background: transparent;\n color: var(--dsw-alias-button-primary-fill);\n}\n.link-button:hover:not(:disabled) {\n background: transparent;\n color: var(--dsw-alias-button-primary-hover);\n text-decoration: underline;\n}\n.command {\n display: grid;\n gap: 12px;\n margin: 22px 0;\n}\n.command code,\n.secret code {\n overflow-wrap: anywhere;\n padding: 12px;\n border: 1px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md);\n background: var(--dsw-alias-bg-module-platform);\n font-size: 13px;\n line-height: 20px;\n user-select: all;\n}\n.secret {\n display: grid;\n gap: 8px;\n margin: 14px 0;\n}\n.secret span {\n color: var(--dsw-alias-label-secondary);\n font-size: 13px;\n}\n#totp-qr {\n display: block;\n max-width: 100%;\n margin: 18px auto;\n background: #fff;\n border-radius: var(--dsw-radius-sm);\n}\n.actions {\n display: grid;\n gap: 12px;\n margin-top: 22px;\n}\n.backup-codes {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px 22px;\n margin: 22px 0;\n padding: 16px 16px 16px 40px;\n border-radius: var(--dsw-radius-lg);\n background: var(--dsw-alias-bg-module-platform);\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 14px;\n}\n.backup-codes li {\n padding-left: 3px;\n overflow-wrap: anywhere;\n}\n.message {\n margin: 18px 0 0;\n font-size: 14px;\n}\n.message.error {\n color: var(--dsw-alias-state-error-primary);\n}\n.message.info {\n color: var(--dsw-alias-label-secondary);\n}\n\n@media (max-width: 480px) {\n .login-page {\n padding: 12px;\n }\n .login-card {\n padding: 24px 20px;\n }\n}\n\n.message:empty {\n display: none;\n}\n"],
5
+ "mappings": ";AAEA;AACE,gBAAc,MAAM;AACpB;AAAA,IACE,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAChF,iBAAiB;AAAA,IAAE,gBAAgB;AAAA,IAAE,SAAS;AAAA,IAAE,KAAK;AAAA,IAAE;AACzD,kBAAgB;AAChB,kBAAgB;AAChB,mBAAiB;AACjB,mBAAiB;AACjB,mBAAiB;AACjB,sBAAoB;AACpB,uBAAqB;AACrB,0BAAwB;AACxB,0BAAwB;AACxB,kCAAgC;AAChC,6BAA2B;AAC3B,wCAAsC;AACtC,+BAA6B;AAC7B,yBAAuB,IAAI,EAAE,EAAE,EAAE,EAAE;AACnC,yBAAuB,IAAI,EAAE,EAAE,EAAE,EAAE;AACnC,mCAAiC;AACjC,oCAAkC;AAClC,oCAAkC,IAAI,GAAG,GAAG,GAAG,EAAE;AACjD,sCAAoC;AACpC,mCAAiC;AACnC;AAEA,QAAO,sBAAuB;AAC5B;AACE,yBAAqB;AACrB,4BAAwB;AACxB,4BAAwB;AACxB,oCAAgC;AAChC,+BAA2B;AAC3B,0CAAsC;AACtC,iCAA6B;AAC7B,2BAAuB,IAAI,IAAI,IAAI,IAAI,EAAE;AACzC,2BAAuB,IAAI,IAAI,IAAI,IAAI,EAAE;AACzC,qCAAiC;AACjC,sCAAkC;AAClC,sCAAkC,IAAI,IAAI,IAAI,IAAI,EAAE;AACpD,wCAAoC;AACpC,qCAAiC;AAC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CAPC,OAOO,CAAC;AACP,SAAO,IAAI;AACb;AAEA,QAAO,WAAY;AACjB,GAtLD;AAuLG,aAAS;AACX;AACA,GAnLD;AAoLG,aAAS,KAAK;AAChB;AACF;AAEA,CApBC,OAoBO;AACN,WAAS;AACX;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
3
+ export declare const SUPPORTED_DSH_RANGE = ">=0.1.7-rc.1";
3
4
  /** Verify the loaded module and the profile's host resolve to one DSH copy. */
4
5
  export declare function assertWebServerCompatibility(ctx: Context): string;
5
6
  /** Check Connection after it appears; readiness must be withdrawn on its loss. */
@@ -1 +1 @@
1
- {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/compatibility.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AA2B9E,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAsBjE;AAED,kFAAkF;AAClF,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,oBAAoB,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAgBR"}
1
+ {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/compatibility.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAQ9E,eAAO,MAAM,mBAAmB,iBAAiB,CAAA;AAsBjD,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAsBjE;AAED,kFAAkF;AAClF,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,oBAAoB,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAgBR"}
@@ -2,20 +2,21 @@
2
2
 
3
3
  [简体中文](deployment.zh-CN.md)
4
4
 
5
- This guide describes a new installation with the verified DSH `0.1.7-rc.1` runtime and its default `~/.dsh` data directory. It does not depend on a particular public hostname, proxy network, service manager, or existing account database.
5
+ This guide describes a new installation with the verified DSH `0.2.0-rc.1` runtime and its default `~/.dsh` data directory. It does not depend on a particular public hostname, proxy network, service manager, or existing account database.
6
6
 
7
- ## Minimal local installation
7
+ The npm steps below use plugin `0.1.2`. Before upgrading an existing installation, review [compatibility](../README.md#dsh-compatibility); for source builds, see the [development guide](development.md).
8
8
 
9
- From the source checkout, build the local archive and install it into the default `web` profile:
9
+ ## Minimal installation from npm
10
+
11
+ Install the published package into the default `web` profile:
10
12
 
11
13
  ```sh
12
- pnpm install --frozen-lockfile
13
- pnpm pack:local
14
14
  dsh --version
15
- dsh plugin --profile web add "$PWD/artifacts/dsh-auth-remote-0.1.0.tgz"
15
+ dsh plugin --profile web add dsh-auth-remote@0.1.2
16
+ dsh plugin --profile web list
16
17
  ```
17
18
 
18
- Verify that `dsh --version` prints `0.1.7-rc.1`. DSH runs the plugin installer inside the profile directory, so `$PWD` supplies an absolute archive path. The bundle supplies an auth listener with `allowedOrigins: []`, which admits only literal loopback hosts. No profile patch is needed for this setup. Start DSH in one terminal:
19
+ Verify that `dsh --version` prints `0.2.0-rc.1` and the list includes `dsh-auth-remote@0.1.2`. The bundle supplies an auth listener with `allowedOrigins: []`, which admits only literal loopback hosts. No profile patch is needed for this setup. Start DSH in one terminal:
19
20
 
20
21
  ```sh
21
22
  dsh web --no-open --port 13090
@@ -73,7 +74,7 @@ Binding to an interface does not restrict client source addresses. Apply any req
73
74
 
74
75
  ## Start and verify the public entry
75
76
 
76
- 1. Verify Linux, Node.js 24+, pnpm 12.5.1, and the installed DSH version. Install the archive with the minimal commands above. Keep any test or development runtime separate from the default account profile.
77
+ 1. Verify Linux, Node.js 24+, and the installed DSH version. Install the npm package with the minimal commands above. Keep any test or development runtime separate from the default account profile.
77
78
  2. Merge the public-origin profile configuration above. The independent `webserver` disable is recommended. A proxy should reach only the private listener through a transport you control; see the [proxy guide](reverse-proxy.md).
78
79
  3. Start with `dsh web --no-open --port 13090`. Before opening external access, inspect `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready` and require JSON containing `"plugin":"dsh-auth-remote"`, `"protocolVersion":1`, and `"ready":true`.
79
80
  4. Confirm an anonymous HTML request redirects to `/auth-remote/login`, and an anonymous API request such as `/api/settings` is denied. Initialize through the local CLI if needed, then sign in, bind TOTP, save backup codes and exercise official settings, workspace, preview, uploads and streams through the chosen browser origin.
@@ -2,20 +2,21 @@
2
2
 
3
3
  [English](deployment.md)
4
4
 
5
- 本指南说明使用已验证的 DSH `0.1.7-rc.1` 和默认的 `~/.dsh` 数据目录进行全新安装,不假定公网域名、代理网络、服务管理器或现有账号数据库。
5
+ 本指南说明使用已验证的 DSH `0.2.0-rc.1` 和默认的 `~/.dsh` 数据目录进行全新安装,不假定公网域名、代理网络、服务管理器或现有账号数据库。
6
6
 
7
- ## 最小化本地安装
7
+ 下面的 npm 步骤使用插件 `0.1.2`。升级已有安装前,请参阅[兼容说明](../README.zh-CN.md#dsh-兼容性);源码构建参见[开发指南](development.zh-CN.md)。
8
8
 
9
- 在源码检出目录构建本地压缩包,并安装到默认的 `web` profile:
9
+ ## 从 npm 最小化安装
10
+
11
+ 把已发布的包安装到默认 `web` profile:
10
12
 
11
13
  ```sh
12
- pnpm install --frozen-lockfile
13
- pnpm pack:local
14
14
  dsh --version
15
- dsh plugin --profile web add "$PWD/artifacts/dsh-auth-remote-0.1.0.tgz"
15
+ dsh plugin --profile web add dsh-auth-remote@0.1.2
16
+ dsh plugin --profile web list
16
17
  ```
17
18
 
18
- 确认 `dsh --version` 输出 `0.1.7-rc.1`。DSH 会在 profile 目录执行插件安装,因此 `$PWD` 为压缩包提供绝对路径。bundle 提供认证监听,默认 `allowedOrigins: []`,因此只准入字面回环主机。最小安装无需修改 profile 补丁。在一个终端启动 DSH:
19
+ 确认 `dsh --version` 输出 `0.2.0-rc.1`,且列表中有 `dsh-auth-remote@0.1.2`。bundle 提供认证监听,默认 `allowedOrigins: []`,因此只准入字面回环主机。最小安装无需修改 profile 补丁。在一个终端启动 DSH:
19
20
 
20
21
  ```sh
21
22
  dsh web --no-open --port 13090
@@ -73,7 +74,7 @@ dsh plugin --profile web exec dsh-auth-remote init --lang zh
73
74
 
74
75
  ## 启动并检查公网入口
75
76
 
76
- 1. 核对 Linux、Node.js 24+、pnpm 12.5.1 和已安装的 DSH 版本。按上文最小化命令安装压缩包。测试和开发运行时应与默认账号 profile 分开。
77
+ 1. 核对 Linux、Node.js 24+ 和已安装的 DSH 版本。按上文最小化命令安装 npm 包。测试和开发运行时应与默认账号 profile 分开。
77
78
  2. 合并上文公网入口的 profile 配置;建议独立禁用 `webserver`。代理只应通过受控私有传输访问监听;参见[代理指南](reverse-proxy.zh-CN.md)。
78
79
  3. 用 `dsh web --no-open --port 13090` 启动。开放外部入口前检查 `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready`,要求 JSON 同时包含 `"plugin":"dsh-auth-remote"`、`"protocolVersion":1` 和 `"ready":true`。
79
80
  4. 确认匿名 HTML 请求跳转 `/auth-remote/login`,匿名 `/api/settings` 等 API 被拒绝。若尚未初始化账号,先用本地 CLI 初始化;随后登录、绑定 TOTP、保存备用码,并经选定浏览器入口测试官方设置、工作区、预览、上传和流。
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](development.zh-CN.md)
4
4
 
5
- Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.1.7-rc.1`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
5
+ Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.0-rc.1`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
6
6
 
7
7
  ## Set up and check a checkout
8
8
 
@@ -14,7 +14,7 @@ pnpm pack:local
14
14
  pnpm smoke
15
15
  ```
16
16
 
17
- `pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.1.0.tgz` after static checks; it does not publish. `pnpm smoke` installs that archive into an isolated DSH home, starts the pinned DSH runtime briefly, checks readiness, anonymous redirection/denial and an online CLI status, then stops it.
17
+ `pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.1.2.tgz` after static checks; it does not publish. `pnpm smoke` installs that archive into an isolated DSH home, starts the pinned DSH runtime briefly, checks readiness, anonymous redirection/denial and an online CLI status, then stops it.
18
18
 
19
19
  ## Use the isolated development profile
20
20
 
@@ -24,20 +24,35 @@ pnpm dev:install
24
24
  pnpm dev:start
25
25
  ```
26
26
 
27
- The scripts manage only `.dev/runtime` and `.dev/dsh-home` under this checkout; the default listener is `127.0.0.1:13090`. They reject an ambient `DSH_HOME` pointing elsewhere and symlinked development paths. `dev:install` rebuilds and installs the current archive even when the version stays the same. `dev:start` runs DSH in the foreground; Ctrl+C stops it. A source watcher can run in another terminal with `pnpm dev`, but rebuilds still need `dev:install` and a `dev:start` restart to load the new package.
27
+ The scripts manage only `.dev/runtime-<version>` and `.dev/dsh-home` under this checkout; the default listener is `127.0.0.1:13090`. They reject an ambient `DSH_HOME` pointing elsewhere and symlinked development paths. `dev:install` rebuilds and installs the current archive even when the version stays the same. `dev:start` runs DSH in the foreground; Ctrl+C stops it. A source watcher can run in another terminal with `pnpm dev`, but rebuilds still need `dev:install` and a `dev:start` restart to load the new package.
28
28
 
29
29
  For direct inspection, use the same isolated home explicitly:
30
30
 
31
31
  ```sh
32
- DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
32
+ DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.0-rc.1/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
33
33
  ```
34
34
 
35
35
  The development home contains test account data. Keep it private and do not commit or copy it into a deployment profile.
36
36
 
37
37
  ## Test boundaries
38
38
 
39
- `pnpm test:unit` covers the auth state machine, TOTP, backup codes, origin policy, translations, storage durability and lock recovery. `pnpm test:integration` exercises real HTTP/WebSocket sockets, native readiness, cookies, origin decisions and revocation. `pnpm test:cli` builds the real archive and tests interactive and noninteractive commands against isolated profiles and Unix sockets. `pnpm test:browser` boots rc.1 with temporary profiles and verifies the login and Security UI, native settings, workspace, upload/preview, SSE, WebSocket and an HTTPS forwarding chain.
39
+ `pnpm test:unit` covers the auth state machine, TOTP, backup codes, origin policy, translations, storage durability and lock recovery. `pnpm test:integration` exercises real HTTP/WebSocket sockets, native readiness, cookies, origin decisions and revocation. `pnpm test:cli` builds the real archive and tests interactive and noninteractive commands against isolated profiles and Unix sockets. `pnpm test:browser` boots the selected DSH version with temporary profiles and verifies the login and Security UI, native settings, workspace, upload/preview, SSE, WebSocket and an HTTPS forwarding chain.
40
40
 
41
- Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports exactly `0.1.7-rc.1`.
41
+ Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.0-rc.1`).
42
42
 
43
- The DSH test runtime lives in `.cache/test-runtime` and is pinned separately from the source dependencies. Host services and React remain external to the client bundle. The [deployment guide](deployment.md) describes profile and backup rules.
43
+ The DSH test runtime lives in `.cache/test-runtime/<version>` and is pinned separately from the source dependencies. Host services and React remain external to the client bundle. The [deployment guide](deployment.md) describes profile and backup rules.
44
+
45
+ ## Cross-version verification
46
+
47
+ The default test target is DSH `0.2.0-rc.1`. Set `DSH_TEST_VERSION` to `0.1.7-rc.1`, `0.1.7-rc.2`, or `0.2.0-rc.1`; test runtimes live separately under `.cache/test-runtime/<version>` and development runtimes under `.dev/runtime-<version>`. `DSH_TEST_BIN` must report the exact selected version. CI runs CLI, installation smoke, and browser tests for all three versions. Development types and integration tests use the pinned 0.2.0-rc.1 packages.
48
+
49
+ ```sh
50
+ DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
51
+ DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:browser
52
+ DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:cli
53
+ DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:browser
54
+ pnpm test:cli
55
+ pnpm test:browser
56
+ ```
57
+
58
+ Browser tests save light/dark, desktop/narrow-screen screenshots under `.cache/ui-review/<version>` for visual review. Security CSS is installed and removed with the plugin, scopes its selectors to the plugin page, and reads the host's live `--dsw-*` tokens. The standalone login uses a subset of DSH 0.2.0-rc.1 theme tokens and the system color scheme without reading host preferences before authentication.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](development.md)
4
4
 
5
- 开发和完整测试需要 Linux(profile 锁依赖 `/proc`)、Node.js 24+、pnpm 12.5.1,以及 DSH `0.1.7-rc.1`。浏览器测试使用 Playwright 管理的 Chromium 和 Node HTTP/HTTPS 转发器。
5
+ 开发和完整测试需要 Linux(profile 锁依赖 `/proc`)、Node.js 24+、pnpm 12.5.1,以及 DSH `0.2.0-rc.1`。浏览器测试使用 Playwright 管理的 Chromium 和 Node HTTP/HTTPS 转发器。
6
6
 
7
7
  ## 准备和检查源码检出
8
8
 
@@ -14,7 +14,7 @@ pnpm pack:local
14
14
  pnpm smoke
15
15
  ```
16
16
 
17
- `pnpm check` 依次执行类型、格式、构建、包/部署/文档检查,以及单元、集成、CLI 和浏览器测试。`pnpm pack:local` 在静态检查后写出 `artifacts/dsh-auth-remote-0.1.0.tgz`,不会发布。`pnpm smoke` 将包安装到隔离 DSH_HOME,短暂启动固定版本的 DSH,验证就绪、匿名重定向/拒绝和在线 CLI 状态,然后停止。
17
+ `pnpm check` 依次执行类型、格式、构建、包/部署/文档检查,以及单元、集成、CLI 和浏览器测试。`pnpm pack:local` 在静态检查后写出 `artifacts/dsh-auth-remote-0.1.2.tgz`,不会发布。`pnpm smoke` 将包安装到隔离 DSH_HOME,短暂启动固定版本的 DSH,验证就绪、匿名重定向/拒绝和在线 CLI 状态,然后停止。
18
18
 
19
19
  ## 使用隔离开发 profile
20
20
 
@@ -24,20 +24,35 @@ pnpm dev:install
24
24
  pnpm dev:start
25
25
  ```
26
26
 
27
- 脚本只管理当前源码目录下的 `.dev/runtime` 和 `.dev/dsh-home`,默认监听 `127.0.0.1:13090`。终端的 `DSH_HOME` 若指向其他位置,或开发路径为符号链接,脚本会拒绝执行。即使版本号不变,`dev:install` 也会重建并安装当前压缩包。`dev:start` 在前台运行,Ctrl+C 停止。可在另一个终端执行 `pnpm dev` 监听源码,但重建后仍需重新 `dev:install` 并重启 `dev:start` 才会载入新包。
27
+ 脚本只管理当前源码目录下的 `.dev/runtime-<version>` 和 `.dev/dsh-home`,默认监听 `127.0.0.1:13090`。终端的 `DSH_HOME` 若指向其他位置,或开发路径为符号链接,脚本会拒绝执行。即使版本号不变,`dev:install` 也会重建并安装当前压缩包。`dev:start` 在前台运行,Ctrl+C 停止。可在另一个终端执行 `pnpm dev` 监听源码,但重建后仍需重新 `dev:install` 并重启 `dev:start` 才会载入新包。
28
28
 
29
29
  直接查看状态时显式使用同一隔离 home:
30
30
 
31
31
  ```sh
32
- DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
32
+ DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.0-rc.1/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
33
33
  ```
34
34
 
35
35
  开发 home 可能含测试账号数据,须保持私有,不要提交或复制到部署 profile。
36
36
 
37
37
  ## 测试边界
38
38
 
39
- `pnpm test:unit` 覆盖认证状态机、TOTP、备用码、来源策略、翻译、存储持久性和锁恢复。`pnpm test:integration` 使用真实 HTTP/WebSocket socket 验证原生就绪、Cookie、来源判定与撤销。`pnpm test:cli` 构建真实压缩包,并用隔离 profile/Unix socket 验证交互与非交互命令。`pnpm test:browser` 用临时 profile 启动 rc.1,验证登录、安全页、原生设置、工作区、上传/预览、SSE、WebSocket 和 HTTPS 转发链。
39
+ `pnpm test:unit` 覆盖认证状态机、TOTP、备用码、来源策略、翻译、存储持久性和锁恢复。`pnpm test:integration` 使用真实 HTTP/WebSocket socket 验证原生就绪、Cookie、来源判定与撤销。`pnpm test:cli` 构建真实压缩包,并用隔离 profile/Unix socket 验证交互与非交互命令。`pnpm test:browser` 用临时 profile 启动所选的 DSH 版本,验证登录、安全页、原生设置、工作区、上传/预览、SSE、WebSocket 和 HTTPS 转发链。
40
40
 
41
- 浏览器网络链路使用 Node HTTP/HTTPS 转发器。`tests/fixtures/tls/` 下的专用自签证书与私钥仅为测试夹具,不进入安装包,也不是部署凭证。聊天使用本地模型替身;不执行真实第三方授权或付费模型请求。默认浏览器为 Playwright Chromium;`DSH_TEST_BROWSER` 可选择本地浏览器程序,`DSH_TEST_BIN` 仅在报告精确版本 `0.1.7-rc.1` 时可替换 DSH 二进制。
41
+ 浏览器网络链路使用 Node HTTP/HTTPS 转发器。`tests/fixtures/tls/` 下的专用自签证书与私钥仅为测试夹具,不进入安装包,也不是部署凭证。聊天使用本地模型替身;不执行真实第三方授权或付费模型请求。默认浏览器为 Playwright Chromium;`DSH_TEST_BROWSER` 可选择本地浏览器程序,`DSH_TEST_BIN` 仅在报告所选精确版本(默认 `0.2.0-rc.1`)时可替换 DSH 二进制。
42
42
 
43
- DSH 测试运行时位于 `.cache/test-runtime`,与源码依赖分别固定。宿主服务和 React 不打入客户端 bundle。[部署指南](deployment.zh-CN.md)说明 profile 与备份规则。
43
+ DSH 测试运行时位于 `.cache/test-runtime/<version>`,与源码依赖分别固定。宿主服务和 React 不打入客户端 bundle。[部署指南](deployment.zh-CN.md)说明 profile 与备份规则。
44
+
45
+ ## 跨版本验证
46
+
47
+ 默认测试 DSH `0.2.0-rc.1`;`DSH_TEST_VERSION` 可选择 `0.1.7-rc.1`、`0.1.7-rc.2` 或 `0.2.0-rc.1`,测试运行时分别位于 `.cache/test-runtime/<version>`,开发运行时位于 `.dev/runtime-<version>`。`DSH_TEST_BIN` 必须报告所选的精确版本。CI 对三个版本分别运行 CLI、安装冒烟和浏览器测试。开发类型和集成测试使用锁定的 0.2.0-rc.1 包。
48
+
49
+ ```sh
50
+ DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
51
+ DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:browser
52
+ DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:cli
53
+ DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:browser
54
+ pnpm test:cli
55
+ pnpm test:browser
56
+ ```
57
+
58
+ 浏览器测试把浅色/深色、桌面/窄屏截图保存在 `.cache/ui-review/<version>`,供人工检查。安全页的 CSS 在插件生效时注入、销毁时移除,所有选择器只作用于插件页面,并直接引用宿主 `--dsw-*` 主题变量。独立登录页使用 dsh 0.2.0-rc.1 的主题变量子集并跟随系统配色,不读取登录前不可用的宿主设置。
package/docs/releasing.md CHANGED
@@ -14,11 +14,11 @@ To verify the merged checkout locally, run:
14
14
  pnpm install --frozen-lockfile
15
15
  pnpm exec playwright install chromium
16
16
  pnpm check
17
- pnpm pack:local
18
- pnpm smoke
17
+ pnpm release:pack
18
+ pnpm smoke:packed
19
19
  ```
20
20
 
21
- `pnpm pack:local` creates and checks `artifacts/dsh-auth-remote-X.Y.Z.tgz`; `pnpm smoke` installs that archive into an isolated DSH home and tests startup. Neither command publishes a package.
21
+ `pnpm release:pack` runs static checks, creates and verifies `artifacts/dsh-auth-remote-X.Y.Z.tgz`; `pnpm smoke:packed` installs that exact archive into an isolated DSH home and tests startup. The tag workflow publishes the verified archive to npm with `npm publish ./artifacts/dsh-auth-remote-X.Y.Z.tgz --access public`. No local npm publication is needed.
22
22
 
23
23
  ## Tag and inspect the release
24
24
 
@@ -27,18 +27,18 @@ Use the version that is already on `master`:
27
27
  ```sh
28
28
  git switch master
29
29
  git pull --ff-only origin master
30
- git tag -a v0.1.0 -m "Release v0.1.0"
31
- git push origin v0.1.0
30
+ git tag -a v0.1.2 -m "Release v0.1.2"
31
+ git push origin v0.1.2
32
32
  ```
33
33
 
34
- Replace `0.1.0` in these commands with the intended version. The tag must point to a commit reachable from `master`. A mismatched tag, missing changelog entry, failed test, or mismatched existing npm archive stops the release.
34
+ Replace `0.1.2` in these commands with the intended version. The tag must point to a commit reachable from `master`. A mismatched tag, missing changelog entry, failed test, or mismatched existing npm archive stops the release.
35
35
 
36
36
  After the workflow completes, confirm the run, GitHub Release, and npm version:
37
37
 
38
38
  ```sh
39
39
  gh run list --workflow release.yml --limit 5
40
- gh release view v0.1.0
41
- npm view dsh-auth-remote@0.1.0 version dist.integrity
40
+ gh release view v0.1.2
41
+ npm view dsh-auth-remote@0.1.2 version dist.integrity
42
42
  ```
43
43
 
44
44
  The GitHub Release includes the `.tgz` and `SHA256SUMS`. Download them into the same directory and run `sha256sum -c SHA256SUMS` there to check the release asset. A failed workflow should be inspected in **Actions → Release** before retrying; npm versions are immutable, so the workflow only skips an existing version when its archive bytes match.