@unana_dev/doxen 0.2.1 → 0.2.3

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/client/style.css CHANGED
@@ -1,9 +1,9 @@
1
1
  :root {
2
2
  font-family:
3
- -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
4
- color: #26292d;
3
+ "Noto Sans KR Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
4
+ color: #242628;
5
5
  background: white;
6
- line-height: 1.7;
6
+ line-height: 1.5;
7
7
  --line: #e1e6eb;
8
8
  --muted: #818891;
9
9
  --blue: #009dff;
@@ -56,12 +56,12 @@ summary:focus-visible {
56
56
  outline-offset: 3px;
57
57
  }
58
58
  header {
59
- max-width: 1360px;
59
+ max-width: 1424px;
60
60
  margin: auto;
61
- height: 64px;
61
+ height: 68px;
62
62
  display: grid;
63
- grid-template-columns: 290px minmax(0, 768px) 224px;
64
- gap: 40px;
63
+ grid-template-columns: 288px minmax(0, 768px) 224px;
64
+ gap: 48px;
65
65
  align-items: center;
66
66
  padding: 0 24px;
67
67
  }
@@ -71,7 +71,7 @@ header {
71
71
  gap: 12px;
72
72
  color: #24272b;
73
73
  font-size: 19px;
74
- font-weight: 650;
74
+ font-weight: 600;
75
75
  }
76
76
  .brand-icon {
77
77
  display: grid;
@@ -86,20 +86,22 @@ header {
86
86
  line-height: 1;
87
87
  }
88
88
  .search-trigger {
89
- width: min(100%, 440px);
89
+ width: min(100%, 422px);
90
90
  display: flex;
91
91
  justify-content: space-between;
92
92
  align-items: center;
93
93
  border: 1px solid #d1dbe5;
94
- border-radius: 13px;
94
+ border-radius: 12px;
95
95
  padding: 8px 12px;
96
96
  box-shadow: 0 1px 3px #182b4010;
97
97
  color: #939ca6;
98
98
  text-align: left;
99
- font-size: 13px;
99
+ font-size: 14px;
100
100
  }
101
101
  kbd {
102
- font: 10px inherit;
102
+ font-family: inherit;
103
+ font-size: 11px;
104
+ line-height: 18px;
103
105
  border: 1px solid var(--line);
104
106
  border-radius: 4px;
105
107
  padding: 1px 4px;
@@ -109,13 +111,13 @@ kbd {
109
111
  display: flex;
110
112
  gap: 32px;
111
113
  height: 44px;
112
- padding: 0 max(24px, calc((100% - 1312px) / 2));
114
+ padding: 0 max(24px, calc((100% - 1376px) / 2));
113
115
  border-bottom: 1px solid #ebedf0;
114
116
  overflow: auto;
115
117
  }
116
118
  #tabs a {
117
119
  padding: 10px 0 9px;
118
- font-size: 13px;
120
+ font-size: 14px;
119
121
  color: #858b93;
120
122
  white-space: nowrap;
121
123
  border-bottom: 2px solid transparent;
@@ -126,9 +128,9 @@ kbd {
126
128
  }
127
129
  .layout {
128
130
  display: grid;
129
- grid-template-columns: 290px minmax(0, 768px) 224px;
130
- gap: 40px;
131
- max-width: 1360px;
131
+ grid-template-columns: 288px minmax(0, 768px) 224px;
132
+ gap: 48px;
133
+ max-width: 1424px;
132
134
  padding: 0 24px;
133
135
  margin: auto;
134
136
  }
@@ -140,9 +142,9 @@ kbd {
140
142
  padding: 34px 14px 30px 0;
141
143
  }
142
144
  .eyebrow {
143
- font-size: 12px;
145
+ font-size: 14px;
144
146
  color: #8a9098;
145
- margin-bottom: 18px;
147
+ margin-bottom: 12px;
146
148
  letter-spacing: 0;
147
149
  }
148
150
  .powered {
@@ -153,7 +155,7 @@ kbd {
153
155
  #documents a {
154
156
  display: block;
155
157
  padding: 6px 12px 6px 20px;
156
- font-size: 13px;
158
+ font-size: 14px;
157
159
  color: #7d8289;
158
160
  border-left: 1px solid var(--line);
159
161
  overflow-wrap: anywhere;
@@ -165,25 +167,34 @@ kbd {
165
167
  .folder-group summary {
166
168
  list-style: none;
167
169
  cursor: pointer;
168
- font-size: 13px;
170
+ font-size: 14px;
169
171
  color: #797f87;
170
- padding: 7px 14px 7px 20px;
172
+ padding: 7px 14px 7px 0;
171
173
  position: relative;
172
174
  }
173
175
  .folder-group summary::after {
174
176
  content: "›";
175
177
  position: absolute;
176
178
  right: 4px;
179
+ top: 50%;
180
+ transform: translateY(-50%);
177
181
  color: #b0b7bf;
178
182
  }
179
183
  .folder-group[open] > summary::after {
180
- transform: rotate(90deg);
184
+ transform: translateY(-50%) rotate(90deg);
181
185
  }
182
186
  .folder-group summary::-webkit-details-marker {
183
187
  display: none;
184
188
  }
189
+ #documents summary a {
190
+ padding: 0;
191
+ border: 0;
192
+ }
193
+ .folder-children > .folder-group > summary {
194
+ padding-left: 20px;
195
+ }
185
196
  .folder-children {
186
- margin-left: 20px;
197
+ margin-left: 8px;
187
198
  border-left: 1px solid var(--line);
188
199
  }
189
200
  .folder-children > a {
@@ -192,113 +203,152 @@ kbd {
192
203
  main {
193
204
  position: relative;
194
205
  min-width: 0;
195
- padding: 30px 0 64px;
206
+ padding: 26px 0 64px;
196
207
  }
197
208
  #breadcrumb {
198
- color: #46a5df;
199
- font-size: 11px;
200
- padding-right: 135px;
209
+ font-size: 13px;
210
+ line-height: 20px;
201
211
  margin-bottom: 12px;
202
212
  overflow-wrap: anywhere;
203
213
  }
204
- .document-find {
205
- position: absolute;
206
- right: 0;
207
- top: 28px;
208
- z-index: 1;
209
- font-size: 11px;
210
- color: #8a929c;
211
- }
212
- .document-find > summary {
213
- cursor: pointer;
214
+ #breadcrumb ol {
215
+ display: flex;
216
+ flex-wrap: wrap;
217
+ align-items: center;
218
+ gap: 6px 12px;
214
219
  list-style: none;
215
- border: 1px solid var(--line);
216
- padding: 3px 9px;
217
- border-radius: 6px;
218
- background: white;
220
+ margin: 0;
221
+ padding: 0;
219
222
  }
220
- .document-tools {
221
- position: absolute;
222
- right: 0;
223
- top: 34px;
224
- width: 330px;
223
+ #breadcrumb li {
225
224
  display: flex;
226
- gap: 5px;
227
225
  align-items: center;
228
- background: white;
229
- border: 1px solid var(--line);
230
- padding: 10px;
231
- border-radius: 9px;
232
- box-shadow: 0 5px 20px #122c4115;
233
- }
234
- .document-tools label {
235
- position: absolute;
236
- clip-path: inset(50%);
237
- width: 1px;
238
- height: 1px;
239
- overflow: hidden;
240
- }
241
- .document-tools input {
242
- width: 130px;
243
- flex: 1;
244
- font-size: 12px;
245
- padding: 5px 8px;
226
+ gap: 12px;
227
+ min-width: 0;
246
228
  }
247
- .document-tools span {
248
- white-space: nowrap;
229
+ #breadcrumb li + li::before {
230
+ content: "";
231
+ width: 5px;
232
+ height: 5px;
233
+ flex-shrink: 0;
234
+ border-top: 1px solid #8c959f;
235
+ border-right: 1px solid #8c959f;
236
+ transform: rotate(45deg);
249
237
  }
250
- .document-tools button {
251
- padding: 2px 7px;
238
+ #breadcrumb a {
239
+ min-width: 0;
240
+ color: #1890ff;
252
241
  }
253
242
  article {
254
- font-size: 14px;
255
- line-height: 1.85;
243
+ font-size: 16px;
244
+ line-height: 1.6;
245
+ font-weight: 400;
246
+ letter-spacing: -0.2px;
256
247
  overflow-wrap: anywhere;
257
248
  }
258
249
  article h1 {
259
250
  font-size: 32px;
260
- letter-spacing: -1.1px;
251
+ letter-spacing: -0.8px;
261
252
  line-height: 1.4;
262
- margin: 10px 0 25px;
253
+ margin: 12px 0 24px;
263
254
  color: #1e2023;
264
- font-weight: 700;
255
+ font-weight: 650;
256
+ }
257
+ article strong {
258
+ font-weight: 600;
259
+ }
260
+ .folder-cards {
261
+ display: grid;
262
+ grid-template-columns: repeat(2, minmax(0, 1fr));
263
+ gap: 16px;
264
+ }
265
+ .folder-cards a {
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: space-between;
269
+ gap: 16px;
270
+ min-height: 54px;
271
+ padding: 12px 20px;
272
+ border: 1px solid var(--line);
273
+ border-radius: 5px;
274
+ color: inherit;
275
+ }
276
+ .folder-cards a::after {
277
+ content: "";
278
+ width: 7px;
279
+ height: 7px;
280
+ flex: 0 0 7px;
281
+ border-top: 1px solid #737d88;
282
+ border-right: 1px solid #737d88;
283
+ transform: rotate(45deg);
284
+ }
285
+ .folder-cards a:hover {
286
+ background: #f7f9fa;
287
+ border-color: #c6d1dc;
288
+ text-decoration: none;
289
+ }
290
+ .toc[hidden],
291
+ #pagination[hidden] {
292
+ display: none;
265
293
  }
266
294
  article h2 {
267
- font-size: 26px;
268
- letter-spacing: -0.7px;
269
- margin: 46px 0 18px;
295
+ font-size: 28px;
296
+ letter-spacing: -0.6px;
297
+ margin: 44px 0 20px;
270
298
  line-height: 1.5;
271
- font-weight: 650;
299
+ font-weight: 500;
272
300
  }
273
301
  article h3 {
274
- font-size: 19px;
275
- margin: 28px 0 14px;
302
+ font-size: 20px;
303
+ line-height: 1.5;
304
+ font-weight: 600;
305
+ margin: 28px 0 20px;
276
306
  }
277
307
  article :is(h1, h2, h3, h4, h5, h6) {
278
308
  scroll-margin-top: 24px;
279
309
  }
310
+ article .document-version {
311
+ margin: 0 0 20px;
312
+ padding: 10px 16px;
313
+ border: 1px solid var(--line);
314
+ border-radius: 12px;
315
+ background: #f7f9fa;
316
+ color: #b45309;
317
+ font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
318
+ font-size: 14px;
319
+ font-weight: 400;
320
+ line-height: 20px;
321
+ letter-spacing: 0;
322
+ }
323
+ article hr:has(+ .document-version) {
324
+ display: none;
325
+ }
280
326
  article p {
281
- color: #646c76;
327
+ color: #4b5055;
282
328
  margin: 16px 0;
283
329
  }
284
330
  article blockquote {
285
- margin: 24px 0 20px;
286
- padding: 1px 22px;
331
+ margin: 20px 0;
332
+ padding: 12px 24px;
287
333
  border-left: 2px solid #d6dfe6;
288
334
  color: #727b85;
289
335
  }
290
336
  article blockquote p {
337
+ margin: 0;
291
338
  color: #727b85;
292
339
  }
293
340
  article hr {
294
341
  border: 0;
295
342
  border-top: 1px solid var(--line);
296
- margin: 24px 0 42px;
343
+ margin: 20px 0 28px;
297
344
  }
298
345
  article ul,
299
346
  article ol {
300
347
  padding-left: 24px;
301
- color: #626b75;
348
+ color: #4b5055;
349
+ }
350
+ article li + li {
351
+ margin-top: 8px;
302
352
  }
303
353
  article pre {
304
354
  overflow: auto;
@@ -325,7 +375,7 @@ article table {
325
375
  width: 100%;
326
376
  border-collapse: separate;
327
377
  border-spacing: 0;
328
- font-size: 13px;
378
+ font-size: 14px;
329
379
  line-height: 1.6;
330
380
  margin: 12px 0 22px;
331
381
  table-layout: fixed;
@@ -333,26 +383,26 @@ article table {
333
383
  article th,
334
384
  article td {
335
385
  text-align: left;
336
- padding: 9px 12px;
337
- vertical-align: top;
386
+ padding: 8px 12px;
387
+ vertical-align: middle;
338
388
  overflow-wrap: anywhere;
339
389
  }
340
390
  article th {
341
391
  background: #f5f7f9;
342
392
  border-block: 1px solid var(--line);
343
- font-weight: 500;
393
+ font-weight: 600;
394
+ }
395
+ article td {
396
+ border-bottom: 1px solid var(--line);
397
+ color: #242628;
344
398
  }
345
399
  article th:first-child {
346
400
  border-left: 1px solid var(--line);
347
- border-radius: 9px 0 0 9px;
401
+ border-radius: 8px 0 0 8px;
348
402
  }
349
403
  article th:last-child {
350
404
  border-right: 1px solid var(--line);
351
- border-radius: 0 9px 9px 0;
352
- }
353
- article td {
354
- border-bottom: 1px solid var(--line);
355
- color: #4b5158;
405
+ border-radius: 0 8px 8px 0;
356
406
  }
357
407
  article td + td {
358
408
  border-left: 1px solid var(--line);
@@ -360,6 +410,21 @@ article td + td {
360
410
  article tr:last-child td {
361
411
  border-bottom: 0;
362
412
  }
413
+ .diagram {
414
+ margin: 24px 0;
415
+ overflow-x: auto;
416
+ text-align: center;
417
+ }
418
+ .diagram svg {
419
+ display: block;
420
+ max-width: 100%;
421
+ height: auto;
422
+ margin: auto;
423
+ }
424
+ .diagram-error {
425
+ font-size: 14px;
426
+ color: #b45309;
427
+ }
363
428
  article img {
364
429
  max-width: 100%;
365
430
  height: auto;
@@ -378,11 +443,18 @@ article img {
378
443
  position: relative;
379
444
  font-size: 11px;
380
445
  }
446
+ .search-label {
447
+ display: flex;
448
+ align-items: center;
449
+ gap: 8px;
450
+ }
451
+ .search-label::before,
381
452
  .section-tools::before {
382
- content: "⌕";
383
- font-size: 20px;
384
- line-height: 1;
385
- color: #7e8a96;
453
+ content: "";
454
+ width: 16px;
455
+ height: 16px;
456
+ flex: 0 0 16px;
457
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23727b85' stroke-width='1.3'%3E%3Ccircle cx='6.8' cy='6.8' r='5.2'/%3E%3Cpath d='m10.7 10.7 3.8 3.8'/%3E%3C/svg%3E") center / contain no-repeat;
386
458
  }
387
459
  .section-tools:focus-within {
388
460
  border-color: #acd3f0;
@@ -405,18 +477,7 @@ article img {
405
477
  box-shadow: none;
406
478
  padding: 2px 3px;
407
479
  border-radius: 3px;
408
- font-size: 12px;
409
- }
410
- .section-tools button {
411
- padding: 0 6px;
412
- border: 0;
413
- }
414
- .section-tools button:disabled {
415
- display: none;
416
- }
417
- .match-count {
418
- white-space: nowrap;
419
- color: #8794a1;
480
+ font-size: 14px;
420
481
  }
421
482
  .section-content > :first-child {
422
483
  margin-top: 12px;
@@ -429,12 +490,12 @@ article img {
429
490
  overflow: auto;
430
491
  }
431
492
  .toc .eyebrow {
432
- font-size: 11px;
493
+ font-size: 12px;
433
494
  }
434
495
  #toc a {
435
496
  display: block;
436
- color: #858c96;
437
- font-size: 12px;
497
+ color: #7d8289;
498
+ font-size: 14px;
438
499
  margin: 15px 0;
439
500
  line-height: 1.8;
440
501
  }
@@ -467,7 +528,7 @@ article img {
467
528
  }
468
529
  #pagination strong {
469
530
  display: block;
470
- font-size: 13px;
531
+ font-size: 14px;
471
532
  font-weight: 500;
472
533
  }
473
534
  mark {
@@ -475,10 +536,6 @@ mark {
475
536
  color: inherit;
476
537
  border-radius: 2px;
477
538
  }
478
- mark.active-hit {
479
- background: #ffe17c;
480
- outline: 1px solid #d5ad39;
481
- }
482
539
  .skip-link {
483
540
  position: absolute;
484
541
  left: -999px;
@@ -598,14 +655,14 @@ dialog::backdrop {
598
655
  main {
599
656
  padding-top: 25px;
600
657
  }
601
- .document-find {
602
- top: 22px;
603
- }
604
658
  article h1 {
605
659
  font-size: 27px;
606
660
  }
661
+ .folder-cards {
662
+ grid-template-columns: minmax(0, 1fr);
663
+ }
607
664
  article h2 {
608
- font-size: 23px;
665
+ font-size: 21px;
609
666
  }
610
667
  article table {
611
668
  font-size: 12px;
@@ -614,12 +671,6 @@ dialog::backdrop {
614
671
  article th {
615
672
  padding: 8px;
616
673
  }
617
- #breadcrumb {
618
- font-size: 10px;
619
- }
620
- .document-tools {
621
- width: min(330px, calc(100vw - 40px));
622
- }
623
674
  .section-tools {
624
675
  padding: 6px 9px;
625
676
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unana_dev/doxen",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Config-first Markdown documentation sites with Korean and section search",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,6 +32,7 @@
32
32
  "test:package": "node e2e/package-smoke.js"
33
33
  },
34
34
  "dependencies": {
35
+ "@fontsource-variable/noto-sans-kr": "^5.3.1",
35
36
  "@inquirer/prompts": "7.10.1",
36
37
  "chokidar": "^4.0.3",
37
38
  "esbuild": "^0.28.2",
@@ -40,6 +41,7 @@
40
41
  "jose": "^6.2.12",
41
42
  "markdown-it": "^14.1.0",
42
43
  "markdown-it-container": "^4.0.0",
44
+ "mermaid": "^12.1.0",
43
45
  "sanitize-html": "^2.17.0",
44
46
  "wrangler": "4.149.0"
45
47
  },
package/src/build.js CHANGED
@@ -12,9 +12,34 @@ import path from "node:path";
12
12
  import { fileURLToPath } from "node:url";
13
13
  import { collectSite } from "./content.js";
14
14
  import { inside } from "./config.js";
15
+ import { build as bundle } from "esbuild";
15
16
 
16
17
  const client = fileURLToPath(new URL("../client/", import.meta.url));
17
18
  const marker = ".doxen-output";
19
+ let presentationAssets;
20
+
21
+ function getPresentationAssets() {
22
+ return presentationAssets ||= bundle({
23
+ entryPoints: {
24
+ diagrams: path.join(client, "diagrams.js"),
25
+ fonts: path.join(client, "fonts.css"),
26
+ },
27
+ bundle: true,
28
+ splitting: true,
29
+ format: "esm",
30
+ platform: "browser",
31
+ target: "es2022",
32
+ minify: true,
33
+ outdir: path.join(client, "generated"),
34
+ assetNames: "fonts/[name]-[hash]",
35
+ chunkNames: "chunks/[name]-[hash]",
36
+ loader: { ".woff2": "file" },
37
+ write: false,
38
+ }).catch((error) => {
39
+ presentationAssets = undefined;
40
+ throw error;
41
+ });
42
+ }
18
43
 
19
44
  export async function siteFiles(config, dev = false) {
20
45
  const { data, assets } = await collectSite(config);
@@ -25,12 +50,20 @@ export async function siteFiles(config, dev = false) {
25
50
  files.set(
26
51
  "/favicon.svg",
27
52
  Buffer.from(
28
- `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="${config.icon.background}"/><text x="16" y="17" dominant-baseline="central" text-anchor="middle" font-family="Arial, sans-serif" font-size="22" font-weight="700" fill="${config.icon.color}">${initial.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`)}</text></svg>`,
53
+ `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="${config.icon.background}"/><text x="16" y="16" dominant-baseline="middle" text-anchor="middle" font-family="Arial, sans-serif" font-size="22" font-weight="700" fill="${config.icon.color}">${initial.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`)}</text></svg>`,
29
54
  ),
30
55
  );
31
56
  for (const name of ["index.html", "app.js", "style.css", "search.js"])
32
57
  files.set(`/${name}`, await readFile(path.join(client, name)));
58
+ for (const output of (await getPresentationAssets()).outputFiles) {
59
+ const name = path.relative(path.join(client, "generated"), output.path).split(path.sep).join("/");
60
+ files.set(`/${name}`, Buffer.from(output.contents));
61
+ }
33
62
  let html = files.get("/index.html").toString();
63
+ html = html.replace(
64
+ '<span class="brand-icon">D</span',
65
+ `<span class="brand-icon">${initial.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`)}</span`,
66
+ );
34
67
  html = html.replace(
35
68
  "</head>",
36
69
  `<style>:root{--icon-background:${config.icon.background};--icon-color:${config.icon.color};--icon-border:${config.icon.border}}</style></head>`,
package/src/content.js CHANGED
@@ -82,7 +82,7 @@ export async function collectSite(config) {
82
82
  const label =
83
83
  tokens[index].info.trim().slice(6).trim() || "이 섹션 검색";
84
84
  const id = `section-search-${searchIndex++}`;
85
- return `<section class="search-section"><div class="section-tools"><label for="${id}">${escape(label)}</label><input id="${id}" type="search" data-section-search placeholder="섹션 안에서 찾기"/><span class="match-count" aria-live="polite"></span><button type="button" data-find-prev aria-label="이전 일치">↑</button><button type="button" data-find-next aria-label="다음 일치">↓</button></div><div class="section-content">`;
85
+ return `<section class="search-section"><div class="section-tools"><label for="${id}">${escape(label)}</label><input id="${id}" type="search" data-section-search placeholder="표 안에서 검색"/></div><div class="section-content">`;
86
86
  },
87
87
  });
88
88
  const tokens = md.parse(doc.source, {});
@@ -52,8 +52,6 @@ export async function provision(config, state, api, log = console.log) {
52
52
  if (!provider && state.providerId) throw new Error("선택한 로그인 방법이 삭제되었습니다. Cloudflare One에서 확인하세요.");
53
53
  if (!provider) {
54
54
  provider = providers.find((item) => item.type === "onetimepin");
55
- if (!provider && providers.length)
56
- throw new Error("기존 회사 로그인 설정이 발견되었습니다. npx doxen deploy를 다시 실행해 사용할 로그인 방법을 선택하세요.");
57
55
  if (!provider) provider = await api.send(`${base}/access/identity_providers`, "POST", { name: "Doxen 이메일 인증", type: "onetimepin", config: {} });
58
56
  state.providerId = provider.id;
59
57
  await persist();
@@ -188,9 +186,21 @@ export async function prepareDeployment(config, {
188
186
  // Read before mutation so an existing company login is preserved.
189
187
  const organization = await api.get(`/accounts/${account}/access/organizations`, { missing: true });
190
188
  const providers = organization ? await api.list(`/accounts/${account}/access/identity_providers`) : [];
191
- if (!state.providerId && providers.length) state.providerId = await ask.select({
192
- message: "열람자가 사용할 로그인 방법", choices: providers.map((item) => ({ name: item.name, value: item.id })),
193
- });
189
+ if (!state.providerId && providers.length) {
190
+ const otp = providers.find((item) => item.type === "onetimepin");
191
+ state.providerId = await ask.select({
192
+ message: "열람자가 사용할 로그인 방법",
193
+ choices: [
194
+ { name: "이메일 일회용 코드 (허용 이메일로 인증)", value: otp?.id || "" },
195
+ ...providers.filter((item) => item.type !== "onetimepin").map((item) => ({
196
+ name: item.type === "cloudflare"
197
+ ? `${item.name || "Cloudflare"} (Cloudflare 계정 필요 · 계정 멤버 제한 가능)`
198
+ : item.name || item.type,
199
+ value: item.id,
200
+ })),
201
+ ],
202
+ });
203
+ }
194
204
  log(`계정: ${account}\n사이트: ${state.project}\n열람자: ${state.emails.join(", ")}\n로그인: ${state.providerId ? "선택한 기존 로그인" : "이메일 일회용 코드 (계정에 로그인 방법 추가)"}\n문서 폴더: ${config.tabs.map((tab) => tab.dir).join(", ")}`);
195
205
  if (!await ask.confirm({ message: "이 설정으로 접근 제한을 준비하고 문서를 배포할까요?", default: true }))
196
206
  throw new Error("배포를 취소했습니다. 문서는 업로드하지 않았습니다.");
package/src/dev.js CHANGED
@@ -18,6 +18,7 @@ const types = {
18
18
  ".ico": "image/x-icon",
19
19
  ".svg": "image/svg+xml",
20
20
  ".pdf": "application/pdf",
21
+ ".woff2": "font/woff2",
21
22
  };
22
23
 
23
24
  export async function dev(cwd, configPath, port = 4173) {