@visulima/vis 1.0.0-alpha.11 → 1.0.0-alpha.13

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/LICENSE.md +559 -186
  3. package/README.md +18 -0
  4. package/dist/bin.js +1 -9
  5. package/dist/config/index.d.ts +477 -556
  6. package/dist/config/index.js +1 -2
  7. package/dist/generate/index.js +1 -3
  8. package/dist/packem_chunks/applyDefaults.js +2 -336
  9. package/dist/packem_chunks/bin.js +234 -9552
  10. package/dist/packem_chunks/doctor-probe.js +2 -112
  11. package/dist/packem_chunks/fix.js +11 -234
  12. package/dist/packem_chunks/handler.js +1 -99
  13. package/dist/packem_chunks/handler10.js +2 -53
  14. package/dist/packem_chunks/handler11.js +1 -32
  15. package/dist/packem_chunks/handler12.js +5 -100
  16. package/dist/packem_chunks/handler13.js +1 -25
  17. package/dist/packem_chunks/handler14.js +18 -916
  18. package/dist/packem_chunks/handler15.js +15 -201
  19. package/dist/packem_chunks/handler16.js +1 -124
  20. package/dist/packem_chunks/handler17.js +1 -13
  21. package/dist/packem_chunks/handler18.js +1 -106
  22. package/dist/packem_chunks/handler19.js +1 -19
  23. package/dist/packem_chunks/handler2.js +2 -75
  24. package/dist/packem_chunks/handler20.js +5 -29
  25. package/dist/packem_chunks/handler21.js +1 -222
  26. package/dist/packem_chunks/handler22.js +1 -237
  27. package/dist/packem_chunks/handler23.js +5 -101
  28. package/dist/packem_chunks/handler24.js +1 -110
  29. package/dist/packem_chunks/handler25.js +3 -402
  30. package/dist/packem_chunks/handler26.js +1 -13
  31. package/dist/packem_chunks/handler27.js +1 -63
  32. package/dist/packem_chunks/handler28.js +7 -34
  33. package/dist/packem_chunks/handler29.js +21 -456
  34. package/dist/packem_chunks/handler3.js +4 -95
  35. package/dist/packem_chunks/handler30.js +3 -170
  36. package/dist/packem_chunks/handler31.js +1 -530
  37. package/dist/packem_chunks/handler32.js +2 -214
  38. package/dist/packem_chunks/handler33.js +25 -119
  39. package/dist/packem_chunks/handler34.js +2 -630
  40. package/dist/packem_chunks/handler35.js +3 -283
  41. package/dist/packem_chunks/handler36.js +22 -542
  42. package/dist/packem_chunks/handler37.js +410 -744
  43. package/dist/packem_chunks/handler38.js +22 -989
  44. package/dist/packem_chunks/handler39.js +22 -574
  45. package/dist/packem_chunks/handler4.js +2 -90
  46. package/dist/packem_chunks/handler40.js +22 -1685
  47. package/dist/packem_chunks/handler41.js +6 -1088
  48. package/dist/packem_chunks/handler42.js +5 -797
  49. package/dist/packem_chunks/handler43.js +10 -2658
  50. package/dist/packem_chunks/handler44.js +51 -3784
  51. package/dist/packem_chunks/handler45.js +25 -2574
  52. package/dist/packem_chunks/handler46.js +3 -3769
  53. package/dist/packem_chunks/handler47.js +21 -1485
  54. package/dist/packem_chunks/handler48.js +42 -0
  55. package/dist/packem_chunks/handler5.js +8 -174
  56. package/dist/packem_chunks/handler6.js +1 -95
  57. package/dist/packem_chunks/handler7.js +1 -115
  58. package/dist/packem_chunks/handler8.js +1 -12
  59. package/dist/packem_chunks/handler9.js +1 -29
  60. package/dist/packem_chunks/heal-accept.js +10 -522
  61. package/dist/packem_chunks/heal.js +14 -673
  62. package/dist/packem_chunks/index.js +7 -873
  63. package/dist/packem_chunks/loader.js +1 -23
  64. package/dist/packem_chunks/tar.js +3 -0
  65. package/dist/packem_shared/ai-analysis-hm8d2W7z.js +67 -0
  66. package/dist/packem_shared/ai-cache-DoiF80AR.js +1 -0
  67. package/dist/packem_shared/ai-fix-nn4zOE95.js +43 -0
  68. package/dist/packem_shared/cache-directory-CwHlJhgx.js +1 -0
  69. package/dist/packem_shared/dependency-scan-COr5n63B.js +2 -0
  70. package/dist/packem_shared/docker-D6OGr5_S.js +2 -0
  71. package/dist/packem_shared/failure-log-iUVLf6ts.js +2 -0
  72. package/dist/packem_shared/flakiness-D9wf0t56.js +1 -0
  73. package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
  74. package/dist/packem_shared/index-DH-5hsrC.js +1 -0
  75. package/dist/packem_shared/otel-DxDUPJJH.js +6 -0
  76. package/dist/packem_shared/otelPlugin-CQq6poq8.js +1 -0
  77. package/dist/packem_shared/registry-CkubDdiY.js +2 -0
  78. package/dist/packem_shared/run-summary-utils-BfBvjzhY.js +1 -0
  79. package/dist/packem_shared/runtime-check-BXZ43CBW.js +1 -0
  80. package/dist/packem_shared/selectors-BylODRiM.js +3 -0
  81. package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
  82. package/dist/packem_shared/toolchain-BgBOUHII.js +5 -0
  83. package/dist/packem_shared/typosquats-CcZl99B1.js +1 -0
  84. package/dist/packem_shared/use-measured-height-DjYgUOKk.js +1 -0
  85. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  86. package/dist/packem_shared/verify-Baj5mFJ7.js +1 -0
  87. package/dist/packem_shared/vis-update-app-D1jl0UZZ.js +1 -0
  88. package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
  89. package/index.js +556 -727
  90. package/package.json +19 -29
  91. package/schemas/project.schema.json +739 -297
  92. package/schemas/vis-config.schema.json +3365 -384
  93. package/templates/buildkite-ci/template.yml +20 -20
  94. package/dist/packem_shared/VisUpdateApp-D-Yz_wvg.js +0 -1316
  95. package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +0 -5
  96. package/dist/packem_shared/ai-analysis-CHeB1joD.js +0 -367
  97. package/dist/packem_shared/ai-cache-Be_jexe4.js +0 -142
  98. package/dist/packem_shared/ai-fix-B9iQVcD2.js +0 -379
  99. package/dist/packem_shared/cache-directory-2qvs4goY.js +0 -98
  100. package/dist/packem_shared/catalog-BJTtyi-O.js +0 -1371
  101. package/dist/packem_shared/dependency-scan-A0KSklpG.js +0 -188
  102. package/dist/packem_shared/docker-2iZzc280.js +0 -181
  103. package/dist/packem_shared/failure-log-Cz3Z4SKL.js +0 -100
  104. package/dist/packem_shared/flakiness-goTxXuCX.js +0 -180
  105. package/dist/packem_shared/otel-DCvqCTz_.js +0 -158
  106. package/dist/packem_shared/otelPlugin-DFaLDvJf.js +0 -3
  107. package/dist/packem_shared/registry-CbqXI0rc.js +0 -272
  108. package/dist/packem_shared/run-summary-utils-PVMl4aIh.js +0 -130
  109. package/dist/packem_shared/runtime-check-Cobi3p6l.js +0 -127
  110. package/dist/packem_shared/selectors-SM69TfqC.js +0 -194
  111. package/dist/packem_shared/symbols-Ta7g2nU-.js +0 -14
  112. package/dist/packem_shared/toolchain-BdZd9eBi.js +0 -975
  113. package/dist/packem_shared/typosquats-C-bCh3PX.js +0 -1210
  114. package/dist/packem_shared/use-measured-height-CNP0vT4M.js +0 -20
  115. package/dist/packem_shared/utils-CthVdBPS.js +0 -40
  116. package/dist/packem_shared/xxh3-Ck8mXNg1.js +0 -239
@@ -1,3397 +1,57 @@
1
- import { createRequire as __cjs_createRequire } from "node:module";
2
-
3
- const __cjs_require = __cjs_createRequire(import.meta.url);
4
-
5
- const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
6
-
7
- const __cjs_getBuiltinModule = (module) => {
8
- // Check if we're in Node.js and version supports getBuiltinModule
9
- if (typeof __cjs_getProcess !== "undefined" && __cjs_getProcess.versions && __cjs_getProcess.versions.node) {
10
- const [major, minor] = __cjs_getProcess.versions.node.split(".").map(Number);
11
- // Node.js 20.16.0+ and 22.3.0+
12
- if (major > 22 || (major === 22 && minor >= 3) || (major === 20 && minor >= 16)) {
13
- return __cjs_getProcess.getBuiltinModule(module);
14
- }
15
- }
16
- // Fallback to createRequire
17
- return __cjs_require(module);
18
- };
19
-
20
- const {
21
- spawnSync
22
- } = __cjs_getBuiltinModule("node:child_process");
23
- import { bold, cyan, dim } from '@visulima/colorize';
24
- import { isAccessibleSync, ensureDirSync, writeFileSync, readJsonSync } from '@visulima/fs';
25
- import { resolve, basename, join, relative, sep, isAbsolute } from '@visulima/path';
26
- import { p as pail, l as runDlx, c as detectPm, x as runInstall } from './bin.js';
27
- const {
28
- createInterface
29
- } = __cjs_getBuiltinModule("node:readline");
30
- const {
31
- readdirSync,
32
- chmodSync
33
- } = __cjs_getBuiltinModule("node:fs");
34
- import { g as getDefaultExportFromCjs } from '../packem_shared/_commonjsHelpers-BqLXS_qQ.js';
35
- import { downloadTemplate } from 'giget';
36
-
37
- const BUILTIN_MAP = {
38
- "vis:app": "builtin:app",
39
- "vis:application": "builtin:app",
40
- "vis:generator": "builtin:generator",
41
- "vis:lib": "builtin:library",
42
- "vis:library": "builtin:library",
43
- "vis:monorepo": "builtin:monorepo"
44
- };
45
- const GIGET_PREFIXES = [
46
- // Full HTTPS URLs for known hosts (must come before generic https://)
47
- "https://github.com/",
48
- "https://gitlab.com/",
49
- "https://bitbucket.org/",
50
- "https://raw.githubusercontent.com/",
51
- "https://git.sr.ht/",
52
- // SSH URLs
53
- "git@github.com:",
54
- "git@gitlab.com:",
55
- "git@bitbucket.org:",
56
- "git@git.sr.ht:",
57
- // Provider prefixes (giget-compatible)
58
- "github:",
59
- "gh:",
60
- "gitlab:",
61
- "bitbucket:",
62
- "sourcehut:",
63
- "git:",
64
- // Catch-all: direct tarball / registry URLs (giget http/https provider)
65
- "http://",
66
- "https://"
67
- ];
68
- const isGitUrl = (input) => {
69
- for (const prefix of GIGET_PREFIXES) {
70
- if (input.startsWith(prefix)) {
71
- return true;
72
- }
73
- }
74
- if (!input.startsWith("@") && /^[^/#@][^/#]*\/[^/#]+/.test(input)) {
75
- return true;
76
- }
77
- return false;
78
- };
79
- const DIRECT_PACKAGES = /* @__PURE__ */ new Set(["sv"]);
80
- const expandCreateShorthand = (name) => {
81
- if (DIRECT_PACKAGES.has(name)) {
82
- return name;
83
- }
84
- if (name.startsWith("create-") || name.startsWith("@") && name.includes("/create-")) {
85
- return name;
86
- }
87
- if (name.startsWith("@")) {
88
- const slashIndex = name.indexOf("/");
89
- if (slashIndex !== -1) {
90
- const scope = name.slice(0, slashIndex);
91
- const pkg = name.slice(slashIndex + 1);
92
- return `${scope}/create-${pkg}`;
93
- }
94
- return name;
95
- }
96
- return `create-${name}`;
97
- };
98
- const discoverTemplate = (input, extraArgs = []) => {
99
- if (!input) {
100
- throw new Error("No template specified.");
101
- }
102
- const lower = input.toLowerCase();
103
- const builtinType = BUILTIN_MAP[lower];
104
- if (builtinType) {
105
- return { args: extraArgs, source: lower, type: builtinType };
106
- }
107
- if (isGitUrl(input)) {
108
- return { args: extraArgs, source: input, type: "remote:git" };
109
- }
110
- return { args: extraArgs, source: expandCreateShorthand(input), type: "remote:npm" };
111
- };
112
- const inferParentDir = (type) => {
113
- switch (type) {
114
- case "builtin:app": {
115
- return "apps";
116
- }
117
- case "builtin:generator":
118
- case "builtin:library": {
119
- return "packages";
120
- }
121
- default: {
122
- return ".";
123
- }
124
- }
125
- };
126
-
127
- const words = [
128
- "ability",
129
- "able",
130
- "about",
131
- "above",
132
- "abroad",
133
- "absence",
134
- "absolute",
135
- "absolutely",
136
- "absorb",
137
- "academic",
138
- "accept",
139
- "access",
140
- "accompany",
141
- "accomplish",
142
- "according",
143
- "account",
144
- "accurate",
145
- "achieve",
146
- "achievement",
147
- "acid",
148
- "acknowledge",
149
- "acquire",
150
- "across",
151
- "act",
152
- "action",
153
- "active",
154
- "activist",
155
- "activity",
156
- "actor",
157
- "actress",
158
- "actual",
159
- "actually",
160
- "adapt",
161
- "add",
162
- "addition",
163
- "additional",
164
- "address",
165
- "adequate",
166
- "adjust",
167
- "adjustment",
168
- "administration",
169
- "administrator",
170
- "admire",
171
- "admission",
172
- "admit",
173
- "adolescent",
174
- "adopt",
175
- "adult",
176
- "advance",
177
- "advanced",
178
- "advantage",
179
- "adventure",
180
- "advertising",
181
- "advice",
182
- "advise",
183
- "adviser",
184
- "advocate",
185
- "affair",
186
- "affect",
187
- "afford",
188
- "after",
189
- "afternoon",
190
- "again",
191
- "against",
192
- "age",
193
- "agency",
194
- "agenda",
195
- "agent",
196
- "ago",
197
- "agree",
198
- "agreement",
199
- "agricultural",
200
- "ahead",
201
- "aid",
202
- "aide",
203
- "aim",
204
- "air",
205
- "aircraft",
206
- "airline",
207
- "airport",
208
- "album",
209
- "alive",
210
- "all",
211
- "alliance",
212
- "allow",
213
- "ally",
214
- "almost",
215
- "alone",
216
- "along",
217
- "already",
218
- "also",
219
- "alter",
220
- "alternative",
221
- "although",
222
- "always",
223
- "amazing",
224
- "among",
225
- "amount",
226
- "analysis",
227
- "analyst",
228
- "analyze",
229
- "ancient",
230
- "and",
231
- "angle",
232
- "animal",
233
- "anniversary",
234
- "announce",
235
- "annual",
236
- "another",
237
- "answer",
238
- "anticipate",
239
- "any",
240
- "anybody",
241
- "anymore",
242
- "anyone",
243
- "anything",
244
- "anyway",
245
- "anywhere",
246
- "apart",
247
- "apartment",
248
- "apparent",
249
- "apparently",
250
- "appeal",
251
- "appear",
252
- "appearance",
253
- "apple",
254
- "application",
255
- "apply",
256
- "appoint",
257
- "appointment",
258
- "appreciate",
259
- "approach",
260
- "appropriate",
261
- "approval",
262
- "approve",
263
- "approximately",
264
- "architect",
265
- "area",
266
- "argue",
267
- "argument",
268
- "arise",
269
- "arm",
270
- "armed",
271
- "around",
272
- "arrange",
273
- "arrangement",
274
- "arrival",
275
- "arrive",
276
- "art",
277
- "article",
278
- "artist",
279
- "artistic",
280
- "aside",
281
- "ask",
282
- "asleep",
283
- "aspect",
284
- "assert",
285
- "assess",
286
- "assessment",
287
- "asset",
288
- "assign",
289
- "assignment",
290
- "assist",
291
- "assistance",
292
- "assistant",
293
- "associate",
294
- "association",
295
- "assume",
296
- "assumption",
297
- "assure",
298
- "athlete",
299
- "athletic",
300
- "atmosphere",
301
- "attach",
302
- "attempt",
303
- "attend",
304
- "attention",
305
- "attitude",
306
- "attorney",
307
- "attract",
308
- "attractive",
309
- "attribute",
310
- "audience",
311
- "author",
312
- "authority",
313
- "auto",
314
- "available",
315
- "average",
316
- "avoid",
317
- "award",
318
- "aware",
319
- "awareness",
320
- "away",
321
- "awesome",
322
- "baby",
323
- "back",
324
- "background",
325
- "bag",
326
- "bake",
327
- "balance",
328
- "ball",
329
- "ban",
330
- "band",
331
- "bank",
332
- "bar",
333
- "barely",
334
- "barrel",
335
- "base",
336
- "baseball",
337
- "basic",
338
- "basically",
339
- "basis",
340
- "basket",
341
- "basketball",
342
- "bathroom",
343
- "battery",
344
- "beach",
345
- "bean",
346
- "bear",
347
- "beat",
348
- "beautiful",
349
- "beauty",
350
- "because",
351
- "become",
352
- "bed",
353
- "bedroom",
354
- "beer",
355
- "before",
356
- "begin",
357
- "beginning",
358
- "behavior",
359
- "behind",
360
- "being",
361
- "belief",
362
- "believe",
363
- "bell",
364
- "belong",
365
- "below",
366
- "belt",
367
- "bench",
368
- "bend",
369
- "beneath",
370
- "benefit",
371
- "beside",
372
- "besides",
373
- "best",
374
- "bet",
375
- "better",
376
- "between",
377
- "beyond",
378
- "big",
379
- "bike",
380
- "bill",
381
- "billion",
382
- "bind",
383
- "biological",
384
- "bird",
385
- "birth",
386
- "birthday",
387
- "bit",
388
- "bite",
389
- "black",
390
- "blade",
391
- "blanket",
392
- "blind",
393
- "block",
394
- "blow",
395
- "blue",
396
- "board",
397
- "boat",
398
- "body",
399
- "bond",
400
- "bone",
401
- "book",
402
- "boom",
403
- "boot",
404
- "border",
405
- "born",
406
- "borrow",
407
- "boss",
408
- "both",
409
- "bother",
410
- "bottle",
411
- "bottom",
412
- "boundary",
413
- "bowl",
414
- "box",
415
- "boy",
416
- "boyfriend",
417
- "brain",
418
- "branch",
419
- "brand",
420
- "bread",
421
- "break",
422
- "breakfast",
423
- "breast",
424
- "breath",
425
- "breathe",
426
- "brick",
427
- "bridge",
428
- "brief",
429
- "briefly",
430
- "bright",
431
- "brilliant",
432
- "bring",
433
- "broad",
434
- "brother",
435
- "brown",
436
- "brush",
437
- "buck",
438
- "budget",
439
- "build",
440
- "building",
441
- "bullet",
442
- "bunch",
443
- "bury",
444
- "bus",
445
- "business",
446
- "busy",
447
- "but",
448
- "butter",
449
- "button",
450
- "buy",
451
- "buyer",
452
- "cabin",
453
- "cabinet",
454
- "cable",
455
- "cake",
456
- "calculate",
457
- "call",
458
- "camera",
459
- "camp",
460
- "campaign",
461
- "campus",
462
- "can",
463
- "candidate",
464
- "cap",
465
- "capability",
466
- "capable",
467
- "capacity",
468
- "capital",
469
- "captain",
470
- "capture",
471
- "car",
472
- "carbon",
473
- "card",
474
- "care",
475
- "career",
476
- "careful",
477
- "carefully",
478
- "carrier",
479
- "carry",
480
- "case",
481
- "cash",
482
- "cast",
483
- "cat",
484
- "catch",
485
- "category",
486
- "cause",
487
- "ceiling",
488
- "celebrate",
489
- "celebration",
490
- "celebrity",
491
- "cell",
492
- "center",
493
- "central",
494
- "century",
495
- "ceremony",
496
- "certain",
497
- "certainly",
498
- "chain",
499
- "chair",
500
- "chairman",
501
- "challenge",
502
- "chamber",
503
- "champion",
504
- "championship",
505
- "chance",
506
- "change",
507
- "changing",
508
- "channel",
509
- "chapter",
510
- "character",
511
- "characteristic",
512
- "characterize",
513
- "charge",
514
- "charity",
515
- "chart",
516
- "chase",
517
- "cheap",
518
- "check",
519
- "cheek",
520
- "cheese",
521
- "chef",
522
- "chemical",
523
- "chest",
524
- "chicken",
525
- "chief",
526
- "child",
527
- "childhood",
528
- "chip",
529
- "chocolate",
530
- "choice",
531
- "cholesterol",
532
- "choose",
533
- "church",
534
- "cigarette",
535
- "circle",
536
- "circumstance",
537
- "cite",
538
- "citizen",
539
- "city",
540
- "civil",
541
- "civilian",
542
- "claim",
543
- "class",
544
- "classic",
545
- "classroom",
546
- "clean",
547
- "clear",
548
- "clearly",
549
- "client",
550
- "climate",
551
- "climb",
552
- "clinic",
553
- "clinical",
554
- "clock",
555
- "close",
556
- "closely",
557
- "closer",
558
- "clothes",
559
- "clothing",
560
- "cloud",
561
- "club",
562
- "clue",
563
- "cluster",
564
- "coach",
565
- "coal",
566
- "coalition",
567
- "coast",
568
- "coat",
569
- "code",
570
- "coffee",
571
- "cognitive",
572
- "cold",
573
- "colleague",
574
- "collect",
575
- "collection",
576
- "collective",
577
- "college",
578
- "colonial",
579
- "color",
580
- "column",
581
- "combination",
582
- "combine",
583
- "come",
584
- "comedy",
585
- "comfort",
586
- "comfortable",
587
- "command",
588
- "commander",
589
- "comment",
590
- "commercial",
591
- "commission",
592
- "commit",
593
- "commitment",
594
- "committee",
595
- "common",
596
- "communicate",
597
- "communication",
598
- "community",
599
- "company",
600
- "compare",
601
- "comparison",
602
- "compete",
603
- "competition",
604
- "competitive",
605
- "competitor",
606
- "complete",
607
- "completely",
608
- "complex",
609
- "complicated",
610
- "component",
611
- "compose",
612
- "composition",
613
- "comprehensive",
614
- "computer",
615
- "concentrate",
616
- "concentration",
617
- "concept",
618
- "concern",
619
- "concerned",
620
- "concert",
621
- "conclude",
622
- "conclusion",
623
- "concrete",
624
- "condition",
625
- "conduct",
626
- "conference",
627
- "confidence",
628
- "confident",
629
- "confirm",
630
- "confront",
631
- "confusion",
632
- "congressional",
633
- "connect",
634
- "connection",
635
- "consciousness",
636
- "consensus",
637
- "consequence",
638
- "conservative",
639
- "consider",
640
- "considerable",
641
- "consideration",
642
- "consist",
643
- "consistent",
644
- "constant",
645
- "constantly",
646
- "constitute",
647
- "constitutional",
648
- "construct",
649
- "construction",
650
- "consultant",
651
- "consume",
652
- "consumer",
653
- "consumption",
654
- "contact",
655
- "contain",
656
- "container",
657
- "contemporary",
658
- "content",
659
- "contest",
660
- "context",
661
- "continue",
662
- "continued",
663
- "contract",
664
- "contrast",
665
- "contribute",
666
- "contribution",
667
- "control",
668
- "convention",
669
- "conventional",
670
- "conversation",
671
- "convert",
672
- "conviction",
673
- "convince",
674
- "cook",
675
- "cookie",
676
- "cooking",
677
- "cool",
678
- "cooperation",
679
- "cop",
680
- "cope",
681
- "copy",
682
- "core",
683
- "corn",
684
- "corner",
685
- "corporate",
686
- "corporation",
687
- "correct",
688
- "correspondent",
689
- "cost",
690
- "cotton",
691
- "couch",
692
- "could",
693
- "council",
694
- "counselor",
695
- "count",
696
- "counter",
697
- "country",
698
- "county",
699
- "couple",
700
- "courage",
701
- "course",
702
- "court",
703
- "cousin",
704
- "cover",
705
- "coverage",
706
- "cow",
707
- "crack",
708
- "craft",
709
- "cream",
710
- "create",
711
- "creation",
712
- "creative",
713
- "creature",
714
- "credit",
715
- "crew",
716
- "criteria",
717
- "crop",
718
- "cross",
719
- "crowd",
720
- "crucial",
721
- "cultural",
722
- "culture",
723
- "cup",
724
- "curious",
725
- "current",
726
- "currently",
727
- "curriculum",
728
- "custom",
729
- "customer",
730
- "cut",
731
- "cycle",
732
- "dad",
733
- "daily",
734
- "dance",
735
- "dare",
736
- "dark",
737
- "darkness",
738
- "data",
739
- "date",
740
- "daughter",
741
- "day",
742
- "deal",
743
- "dealer",
744
- "dear",
745
- "debate",
746
- "decade",
747
- "decide",
748
- "decision",
749
- "deck",
750
- "declare",
751
- "decrease",
752
- "deep",
753
- "deeply",
754
- "deer",
755
- "defend",
756
- "defendant",
757
- "defense",
758
- "defensive",
759
- "define",
760
- "definitely",
761
- "definition",
762
- "degree",
763
- "delay",
764
- "deliver",
765
- "delivery",
766
- "demand",
767
- "democracy",
768
- "democratic",
769
- "demonstrate",
770
- "demonstration",
771
- "deny",
772
- "department",
773
- "depend",
774
- "dependent",
775
- "depending",
776
- "depict",
777
- "depth",
778
- "deputy",
779
- "derive",
780
- "describe",
781
- "description",
782
- "desert",
783
- "deserve",
784
- "design",
785
- "designer",
786
- "desire",
787
- "desk",
788
- "desperate",
789
- "despite",
790
- "detail",
791
- "detailed",
792
- "detect",
793
- "determine",
794
- "develop",
795
- "developing",
796
- "development",
797
- "device",
798
- "devote",
799
- "dialogue",
800
- "diet",
801
- "differ",
802
- "difference",
803
- "different",
804
- "differently",
805
- "difficult",
806
- "difficulty",
807
- "dig",
808
- "digital",
809
- "dimension",
810
- "dining",
811
- "dinner",
812
- "direct",
813
- "direction",
814
- "directly",
815
- "director",
816
- "disability",
817
- "disagree",
818
- "disappear",
819
- "discipline",
820
- "discourse",
821
- "discover",
822
- "discovery",
823
- "discuss",
824
- "discussion",
825
- "dish",
826
- "dismiss",
827
- "display",
828
- "distance",
829
- "distant",
830
- "distinct",
831
- "distinction",
832
- "distinguish",
833
- "distribute",
834
- "distribution",
835
- "district",
836
- "diverse",
837
- "diversity",
838
- "divide",
839
- "division",
840
- "doctor",
841
- "document",
842
- "dog",
843
- "domestic",
844
- "dominant",
845
- "dominate",
846
- "door",
847
- "double",
848
- "down",
849
- "downtown",
850
- "dozen",
851
- "draft",
852
- "drag",
853
- "drama",
854
- "dramatic",
855
- "dramatically",
856
- "draw",
857
- "drawing",
858
- "dream",
859
- "dress",
860
- "drink",
861
- "drive",
862
- "driver",
863
- "drop",
864
- "dry",
865
- "due",
866
- "during",
867
- "dust",
868
- "duty",
869
- "each",
870
- "eager",
871
- "ear",
872
- "early",
873
- "earn",
874
- "earnings",
875
- "earth",
876
- "ease",
877
- "easily",
878
- "east",
879
- "eastern",
880
- "easy",
881
- "eat",
882
- "economic",
883
- "economics",
884
- "economist",
885
- "economy",
886
- "edge",
887
- "edition",
888
- "editor",
889
- "educate",
890
- "education",
891
- "educational",
892
- "educator",
893
- "effect",
894
- "effective",
895
- "effectively",
896
- "efficiency",
897
- "efficient",
898
- "effort",
899
- "egg",
900
- "eight",
901
- "either",
902
- "elderly",
903
- "elect",
904
- "election",
905
- "electric",
906
- "electricity",
907
- "electronic",
908
- "element",
909
- "elementary",
910
- "eliminate",
911
- "elite",
912
- "else",
913
- "elsewhere",
914
- "embrace",
915
- "emerge",
916
- "emission",
917
- "emotion",
918
- "emotional",
919
- "emphasis",
920
- "emphasize",
921
- "employ",
922
- "employee",
923
- "employer",
924
- "employment",
925
- "empty",
926
- "enable",
927
- "encounter",
928
- "encourage",
929
- "end",
930
- "energy",
931
- "enforcement",
932
- "engage",
933
- "engine",
934
- "engineer",
935
- "engineering",
936
- "enhance",
937
- "enjoy",
938
- "enormous",
939
- "enough",
940
- "ensure",
941
- "enter",
942
- "enterprise",
943
- "entertainment",
944
- "entire",
945
- "entirely",
946
- "entrance",
947
- "entry",
948
- "environment",
949
- "environmental",
950
- "episode",
951
- "equal",
952
- "equally",
953
- "equipment",
954
- "era",
955
- "escape",
956
- "especially",
957
- "essay",
958
- "essential",
959
- "essentially",
960
- "establish",
961
- "establishment",
962
- "estate",
963
- "estimate",
964
- "etc",
965
- "ethics",
966
- "ethnic",
967
- "evaluate",
968
- "evaluation",
969
- "even",
970
- "evening",
971
- "event",
972
- "eventually",
973
- "ever",
974
- "every",
975
- "everybody",
976
- "everyday",
977
- "everyone",
978
- "everything",
979
- "everywhere",
980
- "evidence",
981
- "evolution",
982
- "evolve",
983
- "exact",
984
- "exactly",
985
- "examination",
986
- "examine",
987
- "example",
988
- "exceed",
989
- "excellent",
990
- "except",
991
- "exception",
992
- "exchange",
993
- "exciting",
994
- "executive",
995
- "exercise",
996
- "exhibit",
997
- "exhibition",
998
- "exist",
999
- "existence",
1000
- "existing",
1001
- "expand",
1002
- "expansion",
1003
- "expect",
1004
- "expectation",
1005
- "expense",
1006
- "expensive",
1007
- "experience",
1008
- "experiment",
1009
- "expert",
1010
- "explain",
1011
- "explanation",
1012
- "explore",
1013
- "expose",
1014
- "express",
1015
- "expression",
1016
- "extend",
1017
- "extension",
1018
- "extensive",
1019
- "extent",
1020
- "external",
1021
- "extra",
1022
- "extraordinary",
1023
- "extreme",
1024
- "extremely",
1025
- "eye",
1026
- "fabric",
1027
- "face",
1028
- "facility",
1029
- "fact",
1030
- "factor",
1031
- "factory",
1032
- "faculty",
1033
- "fade",
1034
- "fair",
1035
- "fairly",
1036
- "faith",
1037
- "fall",
1038
- "false",
1039
- "familiar",
1040
- "family",
1041
- "famous",
1042
- "fan",
1043
- "fantasy",
1044
- "far",
1045
- "farm",
1046
- "farmer",
1047
- "fashion",
1048
- "fast",
1049
- "fate",
1050
- "father",
1051
- "favor",
1052
- "favorite",
1053
- "feature",
1054
- "federal",
1055
- "fee",
1056
- "feed",
1057
- "feel",
1058
- "feeling",
1059
- "fellow",
1060
- "female",
1061
- "fence",
1062
- "few",
1063
- "fewer",
1064
- "fiber",
1065
- "fiction",
1066
- "field",
1067
- "fifteen",
1068
- "fifth",
1069
- "fifty",
1070
- "figure",
1071
- "file",
1072
- "fill",
1073
- "film",
1074
- "final",
1075
- "finally",
1076
- "finance",
1077
- "financial",
1078
- "find",
1079
- "finding",
1080
- "fine",
1081
- "finger",
1082
- "finish",
1083
- "firm",
1084
- "first",
1085
- "fish",
1086
- "fishing",
1087
- "fit",
1088
- "fitness",
1089
- "five",
1090
- "fix",
1091
- "flag",
1092
- "flame",
1093
- "flat",
1094
- "flavor",
1095
- "flesh",
1096
- "flight",
1097
- "float",
1098
- "floor",
1099
- "flow",
1100
- "flower",
1101
- "fly",
1102
- "focus",
1103
- "folk",
1104
- "follow",
1105
- "following",
1106
- "food",
1107
- "foot",
1108
- "football",
1109
- "for",
1110
- "force",
1111
- "foreign",
1112
- "forest",
1113
- "forever",
1114
- "forget",
1115
- "form",
1116
- "formal",
1117
- "formation",
1118
- "former",
1119
- "formula",
1120
- "forth",
1121
- "fortune",
1122
- "forward",
1123
- "found",
1124
- "foundation",
1125
- "founder",
1126
- "four",
1127
- "fourth",
1128
- "frame",
1129
- "framework",
1130
- "free",
1131
- "freedom",
1132
- "freeze",
1133
- "frequency",
1134
- "frequent",
1135
- "frequently",
1136
- "fresh",
1137
- "friend",
1138
- "friendly",
1139
- "friendship",
1140
- "from",
1141
- "front",
1142
- "fruit",
1143
- "fuel",
1144
- "full",
1145
- "fully",
1146
- "fun",
1147
- "function",
1148
- "fund",
1149
- "fundamental",
1150
- "funding",
1151
- "funeral",
1152
- "funny",
1153
- "furniture",
1154
- "furthermore",
1155
- "future",
1156
- "gain",
1157
- "galaxy",
1158
- "gallery",
1159
- "game",
1160
- "gap",
1161
- "garage",
1162
- "garden",
1163
- "garlic",
1164
- "gas",
1165
- "gate",
1166
- "gather",
1167
- "gaze",
1168
- "gear",
1169
- "gender",
1170
- "gene",
1171
- "general",
1172
- "generally",
1173
- "generate",
1174
- "generation",
1175
- "genetic",
1176
- "gentleman",
1177
- "gently",
1178
- "gesture",
1179
- "get",
1180
- "ghost",
1181
- "giant",
1182
- "gift",
1183
- "gifted",
1184
- "girl",
1185
- "girlfriend",
1186
- "give",
1187
- "given",
1188
- "glad",
1189
- "glance",
1190
- "glass",
1191
- "global",
1192
- "glove",
1193
- "goal",
1194
- "gold",
1195
- "golden",
1196
- "golf",
1197
- "good",
1198
- "government",
1199
- "governor",
1200
- "grab",
1201
- "grade",
1202
- "gradually",
1203
- "graduate",
1204
- "grain",
1205
- "grand",
1206
- "grandfather",
1207
- "grandmother",
1208
- "grant",
1209
- "grass",
1210
- "grave",
1211
- "gray",
1212
- "great",
1213
- "greatest",
1214
- "green",
1215
- "grocery",
1216
- "ground",
1217
- "group",
1218
- "grow",
1219
- "growing",
1220
- "growth",
1221
- "guarantee",
1222
- "guard",
1223
- "guess",
1224
- "guest",
1225
- "guide",
1226
- "guideline",
1227
- "guy",
1228
- "habit",
1229
- "habitat",
1230
- "hair",
1231
- "half",
1232
- "hall",
1233
- "hand",
1234
- "handful",
1235
- "handle",
1236
- "hang",
1237
- "happen",
1238
- "happy",
1239
- "hard",
1240
- "hardly",
1241
- "hat",
1242
- "have",
1243
- "head",
1244
- "headline",
1245
- "headquarters",
1246
- "health",
1247
- "healthy",
1248
- "hear",
1249
- "hearing",
1250
- "heart",
1251
- "heat",
1252
- "heaven",
1253
- "heavily",
1254
- "heavy",
1255
- "heel",
1256
- "height",
1257
- "helicopter",
1258
- "hello",
1259
- "help",
1260
- "helpful",
1261
- "here",
1262
- "heritage",
1263
- "hero",
1264
- "herself",
1265
- "hey",
1266
- "hide",
1267
- "high",
1268
- "highlight",
1269
- "highly",
1270
- "highway",
1271
- "hill",
1272
- "himself",
1273
- "hip",
1274
- "hire",
1275
- "historian",
1276
- "historic",
1277
- "historical",
1278
- "history",
1279
- "hit",
1280
- "hold",
1281
- "hole",
1282
- "holiday",
1283
- "holy",
1284
- "home",
1285
- "honest",
1286
- "honey",
1287
- "honor",
1288
- "hope",
1289
- "horizon",
1290
- "horse",
1291
- "hospital",
1292
- "host",
1293
- "hot",
1294
- "hotel",
1295
- "hour",
1296
- "house",
1297
- "household",
1298
- "housing",
1299
- "how",
1300
- "however",
1301
- "huge",
1302
- "human",
1303
- "humor",
1304
- "hundred",
1305
- "hungry",
1306
- "hunter",
1307
- "hunting",
1308
- "husband",
1309
- "hypothesis",
1310
- "ice",
1311
- "idea",
1312
- "ideal",
1313
- "identification",
1314
- "identify",
1315
- "identity",
1316
- "ignore",
1317
- "illustrate",
1318
- "image",
1319
- "imagination",
1320
- "imagine",
1321
- "immediate",
1322
- "immediately",
1323
- "immigrant",
1324
- "immigration",
1325
- "impact",
1326
- "implement",
1327
- "implication",
1328
- "imply",
1329
- "importance",
1330
- "important",
1331
- "impose",
1332
- "impossible",
1333
- "impress",
1334
- "impression",
1335
- "impressive",
1336
- "improve",
1337
- "improvement",
1338
- "incentive",
1339
- "incident",
1340
- "include",
1341
- "including",
1342
- "income",
1343
- "incorporate",
1344
- "increase",
1345
- "increased",
1346
- "increasing",
1347
- "increasingly",
1348
- "incredible",
1349
- "indeed",
1350
- "independence",
1351
- "independent",
1352
- "index",
1353
- "indicate",
1354
- "indication",
1355
- "individual",
1356
- "industrial",
1357
- "industry",
1358
- "infant",
1359
- "inflation",
1360
- "influence",
1361
- "inform",
1362
- "information",
1363
- "ingredient",
1364
- "initial",
1365
- "initially",
1366
- "initiative",
1367
- "inner",
1368
- "innocent",
1369
- "inquiry",
1370
- "inside",
1371
- "insight",
1372
- "insist",
1373
- "inspire",
1374
- "install",
1375
- "instance",
1376
- "instead",
1377
- "institution",
1378
- "institutional",
1379
- "instruction",
1380
- "instructor",
1381
- "instrument",
1382
- "insurance",
1383
- "intellectual",
1384
- "intelligence",
1385
- "intend",
1386
- "intense",
1387
- "intensity",
1388
- "intention",
1389
- "interaction",
1390
- "interest",
1391
- "interested",
1392
- "interesting",
1393
- "internal",
1394
- "international",
1395
- "interpret",
1396
- "interpretation",
1397
- "intervention",
1398
- "interview",
1399
- "into",
1400
- "introduce",
1401
- "introduction",
1402
- "invest",
1403
- "investigate",
1404
- "investigation",
1405
- "investigator",
1406
- "investment",
1407
- "investor",
1408
- "invite",
1409
- "involve",
1410
- "involved",
1411
- "involvement",
1412
- "iron",
1413
- "island",
1414
- "issue",
1415
- "item",
1416
- "its",
1417
- "itself",
1418
- "jacket",
1419
- "jet",
1420
- "job",
1421
- "join",
1422
- "joint",
1423
- "joke",
1424
- "journal",
1425
- "journalist",
1426
- "journey",
1427
- "joy",
1428
- "judge",
1429
- "judgment",
1430
- "juice",
1431
- "jump",
1432
- "junior",
1433
- "jury",
1434
- "just",
1435
- "justice",
1436
- "justify",
1437
- "keep",
1438
- "key",
1439
- "kick",
1440
- "kid",
1441
- "kind",
1442
- "king",
1443
- "kiss",
1444
- "kitchen",
1445
- "knee",
1446
- "knife",
1447
- "knock",
1448
- "know",
1449
- "knowledge",
1450
- "lab",
1451
- "label",
1452
- "labor",
1453
- "laboratory",
1454
- "lady",
1455
- "lake",
1456
- "land",
1457
- "landscape",
1458
- "language",
1459
- "lap",
1460
- "large",
1461
- "largely",
1462
- "last",
1463
- "late",
1464
- "later",
1465
- "latter",
1466
- "laugh",
1467
- "launch",
1468
- "law",
1469
- "lawn",
1470
- "lawsuit",
1471
- "lawyer",
1472
- "lay",
1473
- "layer",
1474
- "lead",
1475
- "leader",
1476
- "leadership",
1477
- "leading",
1478
- "leaf",
1479
- "league",
1480
- "lean",
1481
- "learn",
1482
- "learning",
1483
- "least",
1484
- "leather",
1485
- "leave",
1486
- "left",
1487
- "leg",
1488
- "legacy",
1489
- "legal",
1490
- "legend",
1491
- "legislation",
1492
- "legitimate",
1493
- "lemon",
1494
- "length",
1495
- "less",
1496
- "lesson",
1497
- "let",
1498
- "letter",
1499
- "level",
1500
- "liberal",
1501
- "library",
1502
- "license",
1503
- "lie",
1504
- "life",
1505
- "lifestyle",
1506
- "lifetime",
1507
- "lift",
1508
- "light",
1509
- "like",
1510
- "likely",
1511
- "limit",
1512
- "limitation",
1513
- "limited",
1514
- "line",
1515
- "link",
1516
- "lip",
1517
- "list",
1518
- "listen",
1519
- "literally",
1520
- "literary",
1521
- "literature",
1522
- "little",
1523
- "live",
1524
- "living",
1525
- "load",
1526
- "loan",
1527
- "local",
1528
- "locate",
1529
- "location",
1530
- "lock",
1531
- "long",
1532
- "look",
1533
- "loose",
1534
- "lose",
1535
- "lost",
1536
- "lot",
1537
- "lots",
1538
- "loud",
1539
- "love",
1540
- "lovely",
1541
- "lover",
1542
- "low",
1543
- "lower",
1544
- "luck",
1545
- "lucky",
1546
- "lunch",
1547
- "lung",
1548
- "machine",
1549
- "magazine",
1550
- "mail",
1551
- "main",
1552
- "mainly",
1553
- "maintain",
1554
- "maintenance",
1555
- "major",
1556
- "majority",
1557
- "make",
1558
- "maker",
1559
- "makeup",
1560
- "male",
1561
- "mall",
1562
- "man",
1563
- "manage",
1564
- "management",
1565
- "manager",
1566
- "manner",
1567
- "manufacturer",
1568
- "manufacturing",
1569
- "many",
1570
- "map",
1571
- "margin",
1572
- "mark",
1573
- "market",
1574
- "marketing",
1575
- "marriage",
1576
- "married",
1577
- "marry",
1578
- "mask",
1579
- "mass",
1580
- "massive",
1581
- "master",
1582
- "match",
1583
- "material",
1584
- "math",
1585
- "matter",
1586
- "may",
1587
- "maybe",
1588
- "mayor",
1589
- "meal",
1590
- "mean",
1591
- "meaning",
1592
- "meanwhile",
1593
- "measure",
1594
- "measurement",
1595
- "meat",
1596
- "mechanism",
1597
- "media",
1598
- "medical",
1599
- "medication",
1600
- "medicine",
1601
- "medium",
1602
- "meet",
1603
- "meeting",
1604
- "member",
1605
- "membership",
1606
- "memory",
1607
- "mental",
1608
- "mention",
1609
- "menu",
1610
- "mere",
1611
- "merely",
1612
- "message",
1613
- "metal",
1614
- "meter",
1615
- "method",
1616
- "middle",
1617
- "might",
1618
- "military",
1619
- "milk",
1620
- "million",
1621
- "mind",
1622
- "mine",
1623
- "minister",
1624
- "minor",
1625
- "minority",
1626
- "minute",
1627
- "miracle",
1628
- "mirror",
1629
- "miss",
1630
- "missile",
1631
- "mission",
1632
- "mix",
1633
- "mixture",
1634
- "mode",
1635
- "model",
1636
- "moderate",
1637
- "modern",
1638
- "modest",
1639
- "mom",
1640
- "moment",
1641
- "money",
1642
- "monitor",
1643
- "month",
1644
- "mood",
1645
- "moon",
1646
- "moral",
1647
- "more",
1648
- "moreover",
1649
- "morning",
1650
- "mortgage",
1651
- "most",
1652
- "mostly",
1653
- "mother",
1654
- "motion",
1655
- "motivation",
1656
- "motor",
1657
- "mount",
1658
- "mountain",
1659
- "mouse",
1660
- "mouth",
1661
- "move",
1662
- "movement",
1663
- "movie",
1664
- "much",
1665
- "multiple",
1666
- "muscle",
1667
- "museum",
1668
- "music",
1669
- "musical",
1670
- "musician",
1671
- "must",
1672
- "mutual",
1673
- "myself",
1674
- "mystery",
1675
- "myth",
1676
- "naked",
1677
- "name",
1678
- "narrative",
1679
- "narrow",
1680
- "nation",
1681
- "national",
1682
- "native",
1683
- "natural",
1684
- "naturally",
1685
- "nature",
1686
- "near",
1687
- "nearby",
1688
- "nearly",
1689
- "necessarily",
1690
- "necessary",
1691
- "neck",
1692
- "need",
1693
- "negative",
1694
- "negotiate",
1695
- "negotiation",
1696
- "neighbor",
1697
- "neighborhood",
1698
- "neither",
1699
- "nerve",
1700
- "net",
1701
- "network",
1702
- "never",
1703
- "nevertheless",
1704
- "new",
1705
- "newly",
1706
- "news",
1707
- "newspaper",
1708
- "next",
1709
- "nice",
1710
- "night",
1711
- "nine",
1712
- "nobody",
1713
- "nod",
1714
- "nomination",
1715
- "none",
1716
- "nonetheless",
1717
- "nor",
1718
- "normal",
1719
- "normally",
1720
- "north",
1721
- "northern",
1722
- "nose",
1723
- "not",
1724
- "note",
1725
- "nothing",
1726
- "notice",
1727
- "notion",
1728
- "novel",
1729
- "now",
1730
- "nowhere",
1731
- "nuclear",
1732
- "number",
1733
- "numerous",
1734
- "nurse",
1735
- "nut",
1736
- "object",
1737
- "objective",
1738
- "obligation",
1739
- "observation",
1740
- "observe",
1741
- "observer",
1742
- "obtain",
1743
- "obvious",
1744
- "obviously",
1745
- "occasion",
1746
- "occasionally",
1747
- "occupation",
1748
- "occupy",
1749
- "occur",
1750
- "ocean",
1751
- "odd",
1752
- "odds",
1753
- "off",
1754
- "offer",
1755
- "office",
1756
- "officer",
1757
- "official",
1758
- "often",
1759
- "oil",
1760
- "okay",
1761
- "old",
1762
- "once",
1763
- "one",
1764
- "ongoing",
1765
- "onion",
1766
- "online",
1767
- "only",
1768
- "onto",
1769
- "open",
1770
- "opening",
1771
- "operate",
1772
- "operating",
1773
- "operation",
1774
- "operator",
1775
- "opinion",
1776
- "opponent",
1777
- "opportunity",
1778
- "oppose",
1779
- "opposite",
1780
- "opposition",
1781
- "option",
1782
- "orange",
1783
- "order",
1784
- "ordinary",
1785
- "organic",
1786
- "organization",
1787
- "organize",
1788
- "orientation",
1789
- "origin",
1790
- "original",
1791
- "originally",
1792
- "other",
1793
- "others",
1794
- "otherwise",
1795
- "ought",
1796
- "our",
1797
- "ourselves",
1798
- "out",
1799
- "outcome",
1800
- "outside",
1801
- "oven",
1802
- "over",
1803
- "overall",
1804
- "overcome",
1805
- "overlook",
1806
- "owe",
1807
- "own",
1808
- "owner",
1809
- "pace",
1810
- "pack",
1811
- "package",
1812
- "page",
1813
- "paint",
1814
- "painter",
1815
- "painting",
1816
- "pair",
1817
- "pale",
1818
- "palm",
1819
- "pan",
1820
- "panel",
1821
- "pant",
1822
- "paper",
1823
- "parent",
1824
- "park",
1825
- "parking",
1826
- "part",
1827
- "participant",
1828
- "participate",
1829
- "participation",
1830
- "particular",
1831
- "particularly",
1832
- "partly",
1833
- "partner",
1834
- "partnership",
1835
- "party",
1836
- "pass",
1837
- "passage",
1838
- "passenger",
1839
- "passion",
1840
- "past",
1841
- "patch",
1842
- "path",
1843
- "patient",
1844
- "pattern",
1845
- "pause",
1846
- "pay",
1847
- "payment",
1848
- "peace",
1849
- "peak",
1850
- "peer",
1851
- "people",
1852
- "pepper",
1853
- "per",
1854
- "perceive",
1855
- "percentage",
1856
- "perception",
1857
- "perfect",
1858
- "perfectly",
1859
- "perform",
1860
- "performance",
1861
- "perhaps",
1862
- "period",
1863
- "permanent",
1864
- "permission",
1865
- "permit",
1866
- "person",
1867
- "personal",
1868
- "personality",
1869
- "personally",
1870
- "personnel",
1871
- "perspective",
1872
- "persuade",
1873
- "pet",
1874
- "phase",
1875
- "phenomenon",
1876
- "philosophy",
1877
- "phone",
1878
- "photo",
1879
- "photograph",
1880
- "photographer",
1881
- "phrase",
1882
- "physical",
1883
- "physically",
1884
- "physician",
1885
- "piano",
1886
- "pick",
1887
- "picture",
1888
- "pie",
1889
- "piece",
1890
- "pile",
1891
- "pilot",
1892
- "pine",
1893
- "pink",
1894
- "pipe",
1895
- "pitch",
1896
- "place",
1897
- "plan",
1898
- "plane",
1899
- "planet",
1900
- "planning",
1901
- "plant",
1902
- "plastic",
1903
- "plate",
1904
- "platform",
1905
- "play",
1906
- "player",
1907
- "please",
1908
- "pleasure",
1909
- "plenty",
1910
- "plot",
1911
- "plus",
1912
- "pocket",
1913
- "poem",
1914
- "poet",
1915
- "poetry",
1916
- "point",
1917
- "pole",
1918
- "police",
1919
- "policy",
1920
- "political",
1921
- "politically",
1922
- "politician",
1923
- "politics",
1924
- "poll",
1925
- "pool",
1926
- "pop",
1927
- "popular",
1928
- "population",
1929
- "porch",
1930
- "port",
1931
- "portion",
1932
- "portrait",
1933
- "portray",
1934
- "pose",
1935
- "position",
1936
- "positive",
1937
- "possess",
1938
- "possibility",
1939
- "possible",
1940
- "possibly",
1941
- "post",
1942
- "pot",
1943
- "potato",
1944
- "potential",
1945
- "potentially",
1946
- "pound",
1947
- "pour",
1948
- "powder",
1949
- "power",
1950
- "powerful",
1951
- "practical",
1952
- "practice",
1953
- "pray",
1954
- "prayer",
1955
- "precisely",
1956
- "predict",
1957
- "prefer",
1958
- "preference",
1959
- "pregnancy",
1960
- "pregnant",
1961
- "preparation",
1962
- "prepare",
1963
- "prescription",
1964
- "presence",
1965
- "present",
1966
- "presentation",
1967
- "preserve",
1968
- "president",
1969
- "presidential",
1970
- "press",
1971
- "pretend",
1972
- "pretty",
1973
- "prevent",
1974
- "previous",
1975
- "previously",
1976
- "price",
1977
- "pride",
1978
- "priest",
1979
- "primarily",
1980
- "primary",
1981
- "prime",
1982
- "principal",
1983
- "principle",
1984
- "print",
1985
- "prior",
1986
- "priority",
1987
- "privacy",
1988
- "private",
1989
- "probably",
1990
- "procedure",
1991
- "proceed",
1992
- "process",
1993
- "produce",
1994
- "producer",
1995
- "product",
1996
- "production",
1997
- "profession",
1998
- "professional",
1999
- "professor",
2000
- "profile",
2001
- "profit",
2002
- "program",
2003
- "progress",
2004
- "project",
2005
- "prominent",
2006
- "promise",
2007
- "promote",
2008
- "prompt",
2009
- "proof",
2010
- "proper",
2011
- "properly",
2012
- "property",
2013
- "proportion",
2014
- "proposal",
2015
- "propose",
2016
- "proposed",
2017
- "prosecutor",
2018
- "prospect",
2019
- "protect",
2020
- "protection",
2021
- "protein",
2022
- "protest",
2023
- "proud",
2024
- "prove",
2025
- "provide",
2026
- "provider",
2027
- "province",
2028
- "provision",
2029
- "psychological",
2030
- "psychologist",
2031
- "psychology",
2032
- "public",
2033
- "publication",
2034
- "publicly",
2035
- "publish",
2036
- "publisher",
2037
- "pull",
2038
- "purchase",
2039
- "pure",
2040
- "purpose",
2041
- "pursue",
2042
- "push",
2043
- "put",
2044
- "qualify",
2045
- "quality",
2046
- "quarter",
2047
- "quarterback",
2048
- "question",
2049
- "quick",
2050
- "quickly",
2051
- "quiet",
2052
- "quietly",
2053
- "quit",
2054
- "quite",
2055
- "quote",
2056
- "race",
2057
- "racial",
2058
- "radical",
2059
- "radio",
2060
- "rail",
2061
- "rain",
2062
- "raise",
2063
- "range",
2064
- "rank",
2065
- "rapid",
2066
- "rapidly",
2067
- "rare",
2068
- "rarely",
2069
- "rate",
2070
- "rather",
2071
- "rating",
2072
- "ratio",
2073
- "raw",
2074
- "reach",
2075
- "react",
2076
- "reaction",
2077
- "read",
2078
- "reader",
2079
- "reading",
2080
- "ready",
2081
- "real",
2082
- "reality",
2083
- "realize",
2084
- "really",
2085
- "reason",
2086
- "reasonable",
2087
- "recall",
2088
- "receive",
2089
- "recent",
2090
- "recently",
2091
- "recipe",
2092
- "recognition",
2093
- "recognize",
2094
- "recommend",
2095
- "recommendation",
2096
- "record",
2097
- "recording",
2098
- "recover",
2099
- "recovery",
2100
- "recruit",
2101
- "red",
2102
- "reduce",
2103
- "reduction",
2104
- "refer",
2105
- "reference",
2106
- "reflect",
2107
- "reflection",
2108
- "reform",
2109
- "refugee",
2110
- "refuse",
2111
- "regard",
2112
- "regarding",
2113
- "regardless",
2114
- "regime",
2115
- "region",
2116
- "regional",
2117
- "register",
2118
- "regular",
2119
- "regularly",
2120
- "regulate",
2121
- "regulation",
2122
- "reinforce",
2123
- "relate",
2124
- "relation",
2125
- "relationship",
2126
- "relative",
2127
- "relatively",
2128
- "relax",
2129
- "release",
2130
- "relevant",
2131
- "relief",
2132
- "religion",
2133
- "religious",
2134
- "rely",
2135
- "remain",
2136
- "remaining",
2137
- "remarkable",
2138
- "remember",
2139
- "remind",
2140
- "remote",
2141
- "remove",
2142
- "repeat",
2143
- "repeatedly",
2144
- "replace",
2145
- "reply",
2146
- "report",
2147
- "reporter",
2148
- "represent",
2149
- "representation",
2150
- "representative",
2151
- "reputation",
2152
- "request",
2153
- "require",
2154
- "requirement",
2155
- "research",
2156
- "researcher",
2157
- "resemble",
2158
- "reservation",
2159
- "resident",
2160
- "resist",
2161
- "resolution",
2162
- "resolve",
2163
- "resort",
2164
- "resource",
2165
- "respect",
2166
- "respond",
2167
- "respondent",
2168
- "response",
2169
- "responsibility",
2170
- "responsible",
2171
- "rest",
2172
- "restaurant",
2173
- "restore",
2174
- "restriction",
2175
- "result",
2176
- "retain",
2177
- "retire",
2178
- "retirement",
2179
- "return",
2180
- "reveal",
2181
- "revenue",
2182
- "review",
2183
- "revolution",
2184
- "rhythm",
2185
- "rice",
2186
- "rich",
2187
- "rid",
2188
- "ride",
2189
- "rifle",
2190
- "right",
2191
- "ring",
2192
- "rise",
2193
- "river",
2194
- "road",
2195
- "rock",
2196
- "role",
2197
- "roll",
2198
- "romantic",
2199
- "roof",
2200
- "room",
2201
- "root",
2202
- "rope",
2203
- "rose",
2204
- "roughly",
2205
- "round",
2206
- "route",
2207
- "routine",
2208
- "row",
2209
- "rub",
2210
- "rule",
2211
- "run",
2212
- "running",
2213
- "rural",
2214
- "rush",
2215
- "sacred",
2216
- "safe",
2217
- "safety",
2218
- "sake",
2219
- "salad",
2220
- "salary",
2221
- "sale",
2222
- "sales",
2223
- "salt",
2224
- "same",
2225
- "sample",
2226
- "sanction",
2227
- "sand",
2228
- "satellite",
2229
- "satisfaction",
2230
- "satisfy",
2231
- "sauce",
2232
- "save",
2233
- "saving",
2234
- "say",
2235
- "scale",
2236
- "scenario",
2237
- "scene",
2238
- "schedule",
2239
- "scheme",
2240
- "scholar",
2241
- "scholarship",
2242
- "school",
2243
- "science",
2244
- "scientific",
2245
- "scientist",
2246
- "scope",
2247
- "score",
2248
- "screen",
2249
- "script",
2250
- "sea",
2251
- "search",
2252
- "season",
2253
- "seat",
2254
- "second",
2255
- "secret",
2256
- "secretary",
2257
- "section",
2258
- "sector",
2259
- "secure",
2260
- "security",
2261
- "see",
2262
- "seed",
2263
- "seek",
2264
- "seem",
2265
- "segment",
2266
- "seize",
2267
- "select",
2268
- "selection",
2269
- "self",
2270
- "sell",
2271
- "senator",
2272
- "send",
2273
- "senior",
2274
- "sense",
2275
- "sensitive",
2276
- "sentence",
2277
- "separate",
2278
- "sequence",
2279
- "series",
2280
- "serious",
2281
- "seriously",
2282
- "serve",
2283
- "service",
2284
- "session",
2285
- "set",
2286
- "setting",
2287
- "settle",
2288
- "settlement",
2289
- "seven",
2290
- "several",
2291
- "shade",
2292
- "shadow",
2293
- "shake",
2294
- "shall",
2295
- "shape",
2296
- "share",
2297
- "sharp",
2298
- "sheet",
2299
- "shelf",
2300
- "shell",
2301
- "shelter",
2302
- "shift",
2303
- "shine",
2304
- "ship",
2305
- "shirt",
2306
- "shoe",
2307
- "shop",
2308
- "shopping",
2309
- "shore",
2310
- "short",
2311
- "shortly",
2312
- "shot",
2313
- "should",
2314
- "shoulder",
2315
- "shout",
2316
- "show",
2317
- "shower",
2318
- "shrug",
2319
- "shut",
2320
- "side",
2321
- "sigh",
2322
- "sight",
2323
- "sign",
2324
- "signal",
2325
- "significance",
2326
- "significant",
2327
- "significantly",
2328
- "silence",
2329
- "silent",
2330
- "silver",
2331
- "similar",
2332
- "similarly",
2333
- "simple",
2334
- "simply",
2335
- "since",
2336
- "sing",
2337
- "singer",
2338
- "single",
2339
- "sink",
2340
- "sir",
2341
- "sister",
2342
- "sit",
2343
- "site",
2344
- "situation",
2345
- "six",
2346
- "size",
2347
- "ski",
2348
- "skill",
2349
- "skin",
2350
- "sky",
2351
- "sleep",
2352
- "slice",
2353
- "slide",
2354
- "slight",
2355
- "slightly",
2356
- "slip",
2357
- "slow",
2358
- "slowly",
2359
- "small",
2360
- "smart",
2361
- "smell",
2362
- "smile",
2363
- "smooth",
2364
- "snap",
2365
- "snow",
2366
- "soccer",
2367
- "social",
2368
- "society",
2369
- "soft",
2370
- "software",
2371
- "soil",
2372
- "solar",
2373
- "solid",
2374
- "solution",
2375
- "solve",
2376
- "some",
2377
- "somebody",
2378
- "somehow",
2379
- "someone",
2380
- "something",
2381
- "sometimes",
2382
- "somewhat",
2383
- "somewhere",
2384
- "son",
2385
- "song",
2386
- "soon",
2387
- "sophisticated",
2388
- "sorry",
2389
- "sort",
2390
- "soul",
2391
- "sound",
2392
- "soup",
2393
- "source",
2394
- "south",
2395
- "southern",
2396
- "space",
2397
- "speak",
2398
- "speaker",
2399
- "special",
2400
- "specialist",
2401
- "species",
2402
- "specific",
2403
- "specifically",
2404
- "speech",
2405
- "speed",
2406
- "spend",
2407
- "spending",
2408
- "spin",
2409
- "spirit",
2410
- "spiritual",
2411
- "split",
2412
- "spokesman",
2413
- "sport",
2414
- "spot",
2415
- "spread",
2416
- "spring",
2417
- "square",
2418
- "squeeze",
2419
- "stability",
2420
- "stable",
2421
- "staff",
2422
- "stage",
2423
- "stair",
2424
- "stake",
2425
- "stand",
2426
- "standard",
2427
- "standing",
2428
- "star",
2429
- "stare",
2430
- "start",
2431
- "state",
2432
- "statement",
2433
- "station",
2434
- "statistics",
2435
- "status",
2436
- "stay",
2437
- "steady",
2438
- "steal",
2439
- "steel",
2440
- "step",
2441
- "stick",
2442
- "still",
2443
- "stir",
2444
- "stock",
2445
- "stomach",
2446
- "stone",
2447
- "stop",
2448
- "storage",
2449
- "store",
2450
- "storm",
2451
- "story",
2452
- "straight",
2453
- "strange",
2454
- "stranger",
2455
- "strategic",
2456
- "strategy",
2457
- "stream",
2458
- "street",
2459
- "strength",
2460
- "strengthen",
2461
- "stretch",
2462
- "string",
2463
- "strip",
2464
- "strong",
2465
- "strongly",
2466
- "structure",
2467
- "student",
2468
- "studio",
2469
- "study",
2470
- "stuff",
2471
- "style",
2472
- "subject",
2473
- "submit",
2474
- "subsequent",
2475
- "substance",
2476
- "substantial",
2477
- "succeed",
2478
- "success",
2479
- "successful",
2480
- "successfully",
2481
- "such",
2482
- "sudden",
2483
- "suddenly",
2484
- "sue",
2485
- "sufficient",
2486
- "sugar",
2487
- "suggest",
2488
- "suggestion",
2489
- "suit",
2490
- "summer",
2491
- "summit",
2492
- "sun",
2493
- "super",
2494
- "supply",
2495
- "support",
2496
- "supporter",
2497
- "suppose",
2498
- "supposed",
2499
- "sure",
2500
- "surely",
2501
- "surface",
2502
- "surgery",
2503
- "surprise",
2504
- "surprised",
2505
- "surprising",
2506
- "surprisingly",
2507
- "surround",
2508
- "survey",
2509
- "survival",
2510
- "survive",
2511
- "survivor",
2512
- "sustain",
2513
- "swear",
2514
- "sweep",
2515
- "sweet",
2516
- "swim",
2517
- "swing",
2518
- "switch",
2519
- "symbol",
2520
- "system",
2521
- "table",
2522
- "tablespoon",
2523
- "tactic",
2524
- "tail",
2525
- "take",
2526
- "tale",
2527
- "talent",
2528
- "talk",
2529
- "tall",
2530
- "tank",
2531
- "tap",
2532
- "tape",
2533
- "target",
2534
- "task",
2535
- "taste",
2536
- "tax",
2537
- "taxpayer",
2538
- "tea",
2539
- "teach",
2540
- "teacher",
2541
- "teaching",
2542
- "team",
2543
- "tear",
2544
- "teaspoon",
2545
- "technical",
2546
- "technique",
2547
- "technology",
2548
- "teen",
2549
- "teenager",
2550
- "telephone",
2551
- "telescope",
2552
- "television",
2553
- "tell",
2554
- "temperature",
2555
- "temporary",
2556
- "ten",
2557
- "tend",
2558
- "tendency",
2559
- "tennis",
2560
- "tent",
2561
- "term",
2562
- "terms",
2563
- "territory",
2564
- "test",
2565
- "testify",
2566
- "testimony",
2567
- "testing",
2568
- "text",
2569
- "than",
2570
- "thank",
2571
- "thanks",
2572
- "that",
2573
- "the",
2574
- "theater",
2575
- "their",
2576
- "them",
2577
- "theme",
2578
- "themselves",
2579
- "then",
2580
- "theory",
2581
- "therapy",
2582
- "there",
2583
- "therefore",
2584
- "thick",
2585
- "thin",
2586
- "thing",
2587
- "think",
2588
- "thinking",
2589
- "third",
2590
- "thirty",
2591
- "though",
2592
- "thought",
2593
- "thousand",
2594
- "three",
2595
- "throat",
2596
- "through",
2597
- "throughout",
2598
- "throw",
2599
- "ticket",
2600
- "tie",
2601
- "tight",
2602
- "time",
2603
- "tiny",
2604
- "tip",
2605
- "tire",
2606
- "tired",
2607
- "tissue",
2608
- "title",
2609
- "today",
2610
- "toe",
2611
- "together",
2612
- "tomato",
2613
- "tomorrow",
2614
- "tone",
2615
- "tongue",
2616
- "tonight",
2617
- "too",
2618
- "tool",
2619
- "tooth",
2620
- "top",
2621
- "topic",
2622
- "toss",
2623
- "total",
2624
- "totally",
2625
- "touch",
2626
- "tough",
2627
- "tour",
2628
- "tourist",
2629
- "tournament",
2630
- "tower",
2631
- "town",
2632
- "toy",
2633
- "trace",
2634
- "track",
2635
- "trade",
2636
- "tradition",
2637
- "traditional",
2638
- "traffic",
2639
- "trail",
2640
- "train",
2641
- "training",
2642
- "transfer",
2643
- "transform",
2644
- "transformation",
2645
- "transition",
2646
- "translate",
2647
- "transportation",
2648
- "travel",
2649
- "treat",
2650
- "treatment",
2651
- "treaty",
2652
- "tree",
2653
- "tremendous",
2654
- "trend",
2655
- "trial",
2656
- "tribe",
2657
- "trip",
2658
- "troop",
2659
- "truck",
2660
- "true",
2661
- "truly",
2662
- "trust",
2663
- "truth",
2664
- "try",
2665
- "tube",
2666
- "tunnel",
2667
- "turn",
2668
- "twelve",
2669
- "twenty",
2670
- "twice",
2671
- "twin",
2672
- "two",
2673
- "type",
2674
- "typical",
2675
- "typically",
2676
- "ultimate",
2677
- "ultimately",
2678
- "unable",
2679
- "uncle",
2680
- "under",
2681
- "undergo",
2682
- "understand",
2683
- "understanding",
2684
- "unfortunately",
2685
- "uniform",
2686
- "union",
2687
- "unique",
2688
- "unit",
2689
- "universal",
2690
- "universe",
2691
- "university",
2692
- "unknown",
2693
- "unless",
2694
- "unlike",
2695
- "unlikely",
2696
- "until",
2697
- "unusual",
2698
- "upon",
2699
- "upper",
2700
- "urban",
2701
- "urge",
2702
- "use",
2703
- "used",
2704
- "useful",
2705
- "user",
2706
- "usual",
2707
- "usually",
2708
- "utility",
2709
- "vacation",
2710
- "valley",
2711
- "valuable",
2712
- "value",
2713
- "variable",
2714
- "variation",
2715
- "variety",
2716
- "various",
2717
- "vary",
2718
- "vast",
2719
- "vegetable",
2720
- "vehicle",
2721
- "venture",
2722
- "version",
2723
- "versus",
2724
- "very",
2725
- "vessel",
2726
- "veteran",
2727
- "via",
2728
- "victory",
2729
- "video",
2730
- "view",
2731
- "viewer",
2732
- "village",
2733
- "virtually",
2734
- "virtue",
2735
- "visible",
2736
- "vision",
2737
- "visit",
2738
- "visitor",
2739
- "visual",
2740
- "vital",
2741
- "voice",
2742
- "volume",
2743
- "volunteer",
2744
- "vote",
2745
- "voter",
2746
- "wage",
2747
- "wait",
2748
- "wake",
2749
- "walk",
2750
- "wall",
2751
- "wander",
2752
- "want",
2753
- "warm",
2754
- "warn",
2755
- "warning",
2756
- "wash",
2757
- "watch",
2758
- "water",
2759
- "wave",
2760
- "way",
2761
- "wealth",
2762
- "wealthy",
2763
- "wear",
2764
- "weather",
2765
- "wedding",
2766
- "week",
2767
- "weekend",
2768
- "weekly",
2769
- "weigh",
2770
- "weight",
2771
- "welcome",
2772
- "welfare",
2773
- "well",
2774
- "west",
2775
- "western",
2776
- "wet",
2777
- "what",
2778
- "whatever",
2779
- "wheel",
2780
- "when",
2781
- "whenever",
2782
- "where",
2783
- "whereas",
2784
- "whether",
2785
- "which",
2786
- "while",
2787
- "whisper",
2788
- "white",
2789
- "who",
2790
- "whole",
2791
- "whom",
2792
- "whose",
2793
- "why",
2794
- "wide",
2795
- "widely",
2796
- "widespread",
2797
- "wife",
2798
- "wild",
2799
- "will",
2800
- "willing",
2801
- "win",
2802
- "wind",
2803
- "window",
2804
- "wine",
2805
- "wing",
2806
- "winner",
2807
- "winter",
2808
- "wipe",
2809
- "wire",
2810
- "wisdom",
2811
- "wise",
2812
- "wish",
2813
- "with",
2814
- "withdraw",
2815
- "within",
2816
- "without",
2817
- "witness",
2818
- "woman",
2819
- "wonder",
2820
- "wonderful",
2821
- "wood",
2822
- "wooden",
2823
- "word",
2824
- "work",
2825
- "worker",
2826
- "working",
2827
- "works",
2828
- "workshop",
2829
- "world",
2830
- "worried",
2831
- "worth",
2832
- "would",
2833
- "wrap",
2834
- "write",
2835
- "writer",
2836
- "writing",
2837
- "yard",
2838
- "yeah",
2839
- "year",
2840
- "yell",
2841
- "yellow",
2842
- "yes",
2843
- "yesterday",
2844
- "yield",
2845
- "young",
2846
- "your",
2847
- "yours",
2848
- "yourself",
2849
- "youth",
2850
- "zone"
2851
- ];
2852
- const random = (min, max) => Math.floor(min + Math.random() * (max - min + 1));
2853
- function getRandomWord() {
2854
- return words[random(0, words.length - 1)];
2855
- }
2856
-
2857
- const randomName = () => `${getRandomWord()}-${getRandomWord()}`;
2858
-
2859
- var builtinModules;
2860
- var hasRequiredBuiltinModules;
2861
-
2862
- function requireBuiltinModules () {
2863
- if (hasRequiredBuiltinModules) return builtinModules;
2864
- hasRequiredBuiltinModules = 1;
2865
- builtinModules = [
2866
- "_http_agent",
2867
- "_http_client",
2868
- "_http_common",
2869
- "_http_incoming",
2870
- "_http_outgoing",
2871
- "_http_server",
2872
- "_stream_duplex",
2873
- "_stream_passthrough",
2874
- "_stream_readable",
2875
- "_stream_transform",
2876
- "_stream_wrap",
2877
- "_stream_writable",
2878
- "_tls_common",
2879
- "_tls_wrap",
2880
- "assert",
2881
- "assert/strict",
2882
- "async_hooks",
2883
- "buffer",
2884
- "child_process",
2885
- "cluster",
2886
- "console",
2887
- "constants",
2888
- "crypto",
2889
- "dgram",
2890
- "diagnostics_channel",
2891
- "dns",
2892
- "dns/promises",
2893
- "domain",
2894
- "events",
2895
- "fs",
2896
- "fs/promises",
2897
- "http",
2898
- "http2",
2899
- "https",
2900
- "inspector",
2901
- "inspector/promises",
2902
- "module",
2903
- "net",
2904
- "os",
2905
- "path",
2906
- "path/posix",
2907
- "path/win32",
2908
- "perf_hooks",
2909
- "process",
2910
- "punycode",
2911
- "querystring",
2912
- "readline",
2913
- "readline/promises",
2914
- "repl",
2915
- "stream",
2916
- "stream/consumers",
2917
- "stream/promises",
2918
- "stream/web",
2919
- "string_decoder",
2920
- "sys",
2921
- "timers",
2922
- "timers/promises",
2923
- "tls",
2924
- "trace_events",
2925
- "tty",
2926
- "url",
2927
- "util",
2928
- "util/types",
2929
- "v8",
2930
- "vm",
2931
- "wasi",
2932
- "worker_threads",
2933
- "zlib",
2934
- "node:sea",
2935
- "node:sqlite",
2936
- "node:test",
2937
- "node:test/reporters"
2938
- ];
2939
- return builtinModules;
2940
- }
2941
-
2942
- var lib;
2943
- var hasRequiredLib;
2944
-
2945
- function requireLib () {
2946
- if (hasRequiredLib) return lib;
2947
- hasRequiredLib = 1;
2948
- const builtins = requireBuiltinModules();
2949
- var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
2950
- var exclusionList = [
2951
- "node_modules",
2952
- "favicon.ico"
2953
- ];
2954
- function validate(name) {
2955
- var warnings = [];
2956
- var errors = [];
2957
- if (name === null) {
2958
- errors.push("name cannot be null");
2959
- return done(warnings, errors);
2960
- }
2961
- if (name === void 0) {
2962
- errors.push("name cannot be undefined");
2963
- return done(warnings, errors);
2964
- }
2965
- if (typeof name !== "string") {
2966
- errors.push("name must be a string");
2967
- return done(warnings, errors);
2968
- }
2969
- if (!name.length) {
2970
- errors.push("name length must be greater than zero");
2971
- }
2972
- if (name.startsWith(".")) {
2973
- errors.push("name cannot start with a period");
2974
- }
2975
- if (name.startsWith("-")) {
2976
- errors.push("name cannot start with a hyphen");
2977
- }
2978
- if (name.match(/^_/)) {
2979
- errors.push("name cannot start with an underscore");
2980
- }
2981
- if (name.trim() !== name) {
2982
- errors.push("name cannot contain leading or trailing spaces");
2983
- }
2984
- exclusionList.forEach(function(excludedName) {
2985
- if (name.toLowerCase() === excludedName) {
2986
- errors.push(excludedName + " is not a valid package name");
2987
- }
2988
- });
2989
- if (builtins.includes(name.toLowerCase())) {
2990
- warnings.push(name + " is a core module name");
2991
- }
2992
- if (name.length > 214) {
2993
- warnings.push("name can no longer contain more than 214 characters");
2994
- }
2995
- if (name.toLowerCase() !== name) {
2996
- warnings.push("name can no longer contain capital letters");
2997
- }
2998
- if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
2999
- warnings.push(`name can no longer contain special characters ("~'!()*")`);
3000
- }
3001
- if (encodeURIComponent(name) !== name) {
3002
- var nameMatch = name.match(scopedPackagePattern);
3003
- if (nameMatch) {
3004
- var user = nameMatch[1];
3005
- var pkg = nameMatch[2];
3006
- if (pkg.startsWith(".")) {
3007
- errors.push("name cannot start with a period");
3008
- }
3009
- if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
3010
- return done(warnings, errors);
3011
- }
3012
- }
3013
- errors.push("name can only contain URL-friendly characters");
3014
- }
3015
- return done(warnings, errors);
3016
- }
3017
- var done = function(warnings, errors) {
3018
- var result = {
3019
- validForNewPackages: errors.length === 0 && warnings.length === 0,
3020
- validForOldPackages: errors.length === 0,
3021
- warnings,
3022
- errors
3023
- };
3024
- if (!result.warnings.length) {
3025
- delete result.warnings;
3026
- }
3027
- if (!result.errors.length) {
3028
- delete result.errors;
3029
- }
3030
- return result;
3031
- };
3032
- lib = validate;
3033
- return lib;
3034
- }
3035
-
3036
- var libExports = requireLib();
3037
- const validate = /*@__PURE__*/getDefaultExportFromCjs(libExports);
3038
-
3039
- const isValidPackageName = (name) => {
3040
- if (!name) {
3041
- return false;
3042
- }
3043
- const result = validate(name);
3044
- return result.validForNewPackages;
3045
- };
3046
- const toValidPackageName = (raw) => raw.toLowerCase().trim().replaceAll(/\s+/g, "-").replaceAll(/[^a-z\d\-~]/g, "-").replace(/^[._-]+/, "").replaceAll(/-{2,}/g, "-").replace(/-$/, "");
3047
- const IGNORED_FILES = /* @__PURE__ */ new Set([".DS_Store", ".git", ".gitkeep", "Thumbs.db"]);
3048
- const isEmptyDir = (dir) => {
3049
- if (!isAccessibleSync(dir)) {
3050
- return true;
3051
- }
3052
- const entries = readdirSync(dir);
3053
- return entries.every((entry) => IGNORED_FILES.has(entry));
3054
- };
3055
- const resolveTargetDir = (projectName, cwd) => {
3056
- const targetDir = resolve(cwd, projectName);
3057
- const packageName = toValidPackageName(basename(targetDir));
3058
- return { packageName, targetDir };
3059
- };
3060
- const canSafelyOverwrite = (dir) => isEmptyDir(dir);
3061
-
3062
- const ask = (rl, question) => new Promise((resolve2) => {
3063
- rl.question(question, (answer) => {
3064
- resolve2(answer.trim());
3065
- });
3066
- });
3067
- const confirm = async (rl, question, defaultYes = true) => {
3068
- const hint = defaultYes ? "[Y/n]" : "[y/N]";
3069
- const answer = await ask(rl, ` ${question} ${dim(hint)} `);
3070
- if (answer === "") {
3071
- return defaultYes;
3072
- }
3073
- return answer.toLowerCase() === "y" || answer.toLowerCase() === "yes";
3074
- };
3075
- const select = async (rl, question, choices) => {
3076
- process.stderr.write(` ${question}
3077
- `);
3078
- for (const [index, choice] of choices.entries()) {
3079
- const number_ = bold(cyan(` ${String(index + 1)}.`));
3080
- const hint = choice.hint ? dim(` — ${choice.hint}`) : "";
3081
- process.stderr.write(`${number_} ${choice.label}${hint}
3082
- `);
3083
- }
3084
- while (true) {
3085
- const answer = await ask(rl, `
3086
- ${dim(`Enter choice (1-${String(choices.length)}):`)} `);
3087
- const number_ = Number.parseInt(answer, 10);
3088
- if (number_ >= 1 && number_ <= choices.length) {
3089
- return choices[number_ - 1].value;
3090
- }
3091
- const match = choices.find((c) => c.value === answer || c.label.toLowerCase() === answer.toLowerCase());
3092
- if (match) {
3093
- return match.value;
3094
- }
3095
- process.stderr.write(` ${dim("Invalid choice. Try again.")}
3096
- `);
3097
- }
3098
- };
3099
- const runInteractivePrompts = async (options) => {
3100
- const rl = createInterface({ input: process.stdin, output: process.stdout });
3101
- try {
3102
- process.stderr.write(`
3103
- ${bold(cyan("vis create"))} ${dim("— project scaffolding")}
3104
-
3105
- `);
3106
- const templateChoices = options.inMonorepo ? [
3107
- { hint: "Scaffold via create-vite", label: "Vis Application", value: "vis:app" },
3108
- { hint: "Reusable package scaffold", label: "Vis Library", value: "vis:library" },
3109
- { hint: "Code generator scaffold", label: "Vis Generator", value: "vis:generator" },
3110
- { hint: "Enter an npm create-* package or GitHub URL", label: "Custom template", value: "__custom__" }
3111
- ] : [
3112
- { hint: "Full workspace setup", label: "Vis Monorepo", value: "vis:monorepo" },
3113
- { hint: "Scaffold via create-vite", label: "Vis Application", value: "vis:app" },
3114
- { hint: "Reusable package scaffold", label: "Vis Library", value: "vis:library" },
3115
- { hint: "Code generator scaffold", label: "Vis Generator", value: "vis:generator" },
3116
- { hint: "Enter an npm create-* package or GitHub URL", label: "Custom template", value: "__custom__" }
3117
- ];
3118
- let template = await select(rl, "Select a template:", templateChoices);
3119
- if (template === "__custom__") {
3120
- template = await ask(rl, `
3121
- ${dim("Template (npm package or GitHub URL):")} `);
3122
- if (!template) {
3123
- throw new Error("No template specified.");
3124
- }
3125
- }
3126
- const suggestion = randomName();
3127
- const nameAnswer = await ask(rl, `
3128
- ${dim(`Project name (${suggestion}):`)} `);
3129
- const projectName = nameAnswer || suggestion;
3130
- if (!isValidPackageName(toValidPackageName(projectName))) {
3131
- throw new Error(`Invalid project name: "${projectName}". Must be a valid npm package name.`);
3132
- }
3133
- const defaultDir = toValidPackageName(projectName);
3134
- const dirAnswer = await ask(rl, ` ${dim(`Target directory (${defaultDir}):`)} `);
3135
- const targetDir = dirAnswer || defaultDir;
3136
- let overwrite = false;
3137
- const fullPath = resolve(options.cwd, targetDir);
3138
- if (!isEmptyDir(fullPath)) {
3139
- overwrite = await confirm(rl, `Directory "${targetDir}" is not empty. Overwrite?`, false);
3140
- if (!overwrite) {
3141
- throw new Error("Aborted — directory not empty.");
3142
- }
3143
- }
3144
- let pm;
3145
- if (!options.inMonorepo) {
3146
- if (options.defaultPm) {
3147
- pm = options.defaultPm;
3148
- process.stderr.write(` ${dim(`Package manager: ${pm} (from config)`)}
3149
- `);
3150
- } else {
3151
- const pmChoice = await select(rl, "Package manager:", [
3152
- { label: "pnpm", value: "pnpm" },
3153
- { label: "npm", value: "npm" },
3154
- { label: "yarn", value: "yarn" },
3155
- { label: "bun", value: "bun" }
3156
- ]);
3157
- pm = pmChoice;
3158
- }
3159
- }
3160
- let gitInit = false;
3161
- if (!options.inMonorepo) {
3162
- gitInit = await confirm(rl, "Initialize a git repository?", options.defaultGitInit ?? false);
3163
- }
3164
- const editorDefault = options.defaultEditor === "vscode";
3165
- const editor = await confirm(rl, "Generate VS Code configuration?", editorDefault) ? "vscode" : void 0;
3166
- process.stderr.write("\n");
3167
- return { editor, gitInit, overwrite, pm, projectName, targetDir, template };
3168
- } finally {
3169
- rl.close();
3170
- }
3171
- };
3172
-
3173
- const executeApp = (config, context) => {
3174
- pail.info("Scaffolding application via create-vite...");
3175
- const relativeTarget = relative(context.cwd, context.targetDir) || ".";
3176
- const args = [relativeTarget, ...config.args];
3177
- if (!args.includes("--no-immediate")) {
3178
- args.push("--no-immediate");
3179
- }
3180
- return runDlx(
3181
- context.pm,
3182
- {
3183
- additionalPackages: [],
3184
- args,
3185
- package: "create-vite",
3186
- shellMode: false,
3187
- silent: false
3188
- },
3189
- context.cwd,
3190
- context.logger
3191
- );
3192
- };
3193
- const libraryPackageJson = (name) => `${JSON.stringify(
3194
- {
3195
- devDependencies: {
3196
- typescript: "^5.0.0",
3197
- vitest: "^3.0.0"
3198
- },
3199
- exports: {
3200
- ".": {
3201
- default: "./dist/index.js",
3202
- types: "./dist/index.d.ts"
3203
- }
3204
- },
3205
- files: ["dist"],
3206
- main: "./dist/index.js",
3207
- name,
3208
- scripts: {
3209
- build: "tsc",
3210
- dev: "tsc --watch",
3211
- test: "vitest run",
3212
- "test:watch": "vitest"
3213
- },
3214
- type: "module",
3215
- types: "./dist/index.d.ts",
3216
- version: "0.0.1"
3217
- },
3218
- null,
3219
- 4
3220
- )}
3221
- `;
3222
- const libraryTsconfig = () => `${JSON.stringify(
3223
- {
3224
- compilerOptions: {
3225
- declaration: true,
3226
- declarationMap: true,
3227
- esModuleInterop: true,
3228
- module: "Node16",
3229
- moduleResolution: "Node16",
3230
- outDir: "./dist",
3231
- rootDir: "./src",
3232
- skipLibCheck: true,
3233
- sourceMap: true,
3234
- strict: true,
3235
- target: "ES2022"
3236
- },
3237
- include: ["src/**/*"]
3238
- },
3239
- null,
3240
- 4
3241
- )}
3242
- `;
3243
- const librarySrcIndex = (name) => `/**
3244
- * ${name} — library entry point.
1
+ var ge=Object.defineProperty;var g=(e,t)=>ge(e,"name",{value:t,configurable:!0});import{createRequire as he}from"node:module";import{dim as d,bold as k,cyan as x}from"@visulima/colorize";import{isAccessibleSync as P,ensureDirSync as b,writeFileSync as m,readJsonSync as ie}from"@visulima/fs";import{resolve as _,basename as ve,relative as W,join as c,sep as be,isAbsolute as we}from"@visulima/path";import{am as ke,p as a,e as ce,h as xe,A as $e}from"./bin.js";import{f as Se}from"../packem_shared/giget-CcEy_Elm.js";const fe=he(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,V=g(e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return fe(e)},"__cjs_getBuiltinModule"),{spawnSync:ye}=V("node:child_process"),{createInterface:_e}=V("node:readline"),{readdirSync:je,chmodSync:Ce}=V("node:fs");var Pe=Object.defineProperty,L=g((e,t)=>Pe(e,"name",{value:t,configurable:!0}),"e");const Ne={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},Oe=["https://github.com/","https://gitlab.com/","https://bitbucket.org/","https://raw.githubusercontent.com/","https://git.sr.ht/","git@github.com:","git@gitlab.com:","git@bitbucket.org:","git@git.sr.ht:","github:","gh:","gitlab:","bitbucket:","sourcehut:","git:","http://","https://"],qe=L(e=>{for(const t of Oe)if(e.startsWith(t))return!0;return!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},"isGitUrl"),De=new Set(["sv"]),Ee=L(e=>{if(De.has(e)||e.startsWith("create-")||e.startsWith("@")&&e.includes("/create-"))return e;if(e.startsWith("@")){const t=e.indexOf("/");if(t!==-1){const r=e.slice(0,t),i=e.slice(t+1);return`${r}/create-${i}`}return e}return`create-${e}`},"expandCreateShorthand"),Te=L((e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=Ne[r];return i?{args:t,source:r,type:i}:qe(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:Ee(e),type:"remote:npm"}},"discoverTemplate"),Ie=L(e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},"inferParentDir");var Re=Object.defineProperty,le=g((e,t)=>Re(e,"name",{value:t,configurable:!0}),"i$1");const ae=["ability","able","about","above","abroad","absence","absolute","absolutely","absorb","academic","accept","access","accompany","accomplish","according","account","accurate","achieve","achievement","acid","acknowledge","acquire","across","act","action","active","activist","activity","actor","actress","actual","actually","adapt","add","addition","additional","address","adequate","adjust","adjustment","administration","administrator","admire","admission","admit","adolescent","adopt","adult","advance","advanced","advantage","adventure","advertising","advice","advise","adviser","advocate","affair","affect","afford","after","afternoon","again","against","age","agency","agenda","agent","ago","agree","agreement","agricultural","ahead","aid","aide","aim","air","aircraft","airline","airport","album","alive","all","alliance","allow","ally","almost","alone","along","already","also","alter","alternative","although","always","amazing","among","amount","analysis","analyst","analyze","ancient","and","angle","animal","anniversary","announce","annual","another","answer","anticipate","any","anybody","anymore","anyone","anything","anyway","anywhere","apart","apartment","apparent","apparently","appeal","appear","appearance","apple","application","apply","appoint","appointment","appreciate","approach","appropriate","approval","approve","approximately","architect","area","argue","argument","arise","arm","armed","around","arrange","arrangement","arrival","arrive","art","article","artist","artistic","aside","ask","asleep","aspect","assert","assess","assessment","asset","assign","assignment","assist","assistance","assistant","associate","association","assume","assumption","assure","athlete","athletic","atmosphere","attach","attempt","attend","attention","attitude","attorney","attract","attractive","attribute","audience","author","authority","auto","available","average","avoid","award","aware","awareness","away","awesome","baby","back","background","bag","bake","balance","ball","ban","band","bank","bar","barely","barrel","base","baseball","basic","basically","basis","basket","basketball","bathroom","battery","beach","bean","bear","beat","beautiful","beauty","because","become","bed","bedroom","beer","before","begin","beginning","behavior","behind","being","belief","believe","bell","belong","below","belt","bench","bend","beneath","benefit","beside","besides","best","bet","better","between","beyond","big","bike","bill","billion","bind","biological","bird","birth","birthday","bit","bite","black","blade","blanket","blind","block","blow","blue","board","boat","body","bond","bone","book","boom","boot","border","born","borrow","boss","both","bother","bottle","bottom","boundary","bowl","box","boy","boyfriend","brain","branch","brand","bread","break","breakfast","breast","breath","breathe","brick","bridge","brief","briefly","bright","brilliant","bring","broad","brother","brown","brush","buck","budget","build","building","bullet","bunch","bury","bus","business","busy","but","butter","button","buy","buyer","cabin","cabinet","cable","cake","calculate","call","camera","camp","campaign","campus","can","candidate","cap","capability","capable","capacity","capital","captain","capture","car","carbon","card","care","career","careful","carefully","carrier","carry","case","cash","cast","cat","catch","category","cause","ceiling","celebrate","celebration","celebrity","cell","center","central","century","ceremony","certain","certainly","chain","chair","chairman","challenge","chamber","champion","championship","chance","change","changing","channel","chapter","character","characteristic","characterize","charge","charity","chart","chase","cheap","check","cheek","cheese","chef","chemical","chest","chicken","chief","child","childhood","chip","chocolate","choice","cholesterol","choose","church","cigarette","circle","circumstance","cite","citizen","city","civil","civilian","claim","class","classic","classroom","clean","clear","clearly","client","climate","climb","clinic","clinical","clock","close","closely","closer","clothes","clothing","cloud","club","clue","cluster","coach","coal","coalition","coast","coat","code","coffee","cognitive","cold","colleague","collect","collection","collective","college","colonial","color","column","combination","combine","come","comedy","comfort","comfortable","command","commander","comment","commercial","commission","commit","commitment","committee","common","communicate","communication","community","company","compare","comparison","compete","competition","competitive","competitor","complete","completely","complex","complicated","component","compose","composition","comprehensive","computer","concentrate","concentration","concept","concern","concerned","concert","conclude","conclusion","concrete","condition","conduct","conference","confidence","confident","confirm","confront","confusion","congressional","connect","connection","consciousness","consensus","consequence","conservative","consider","considerable","consideration","consist","consistent","constant","constantly","constitute","constitutional","construct","construction","consultant","consume","consumer","consumption","contact","contain","container","contemporary","content","contest","context","continue","continued","contract","contrast","contribute","contribution","control","convention","conventional","conversation","convert","conviction","convince","cook","cookie","cooking","cool","cooperation","cop","cope","copy","core","corn","corner","corporate","corporation","correct","correspondent","cost","cotton","couch","could","council","counselor","count","counter","country","county","couple","courage","course","court","cousin","cover","coverage","cow","crack","craft","cream","create","creation","creative","creature","credit","crew","criteria","crop","cross","crowd","crucial","cultural","culture","cup","curious","current","currently","curriculum","custom","customer","cut","cycle","dad","daily","dance","dare","dark","darkness","data","date","daughter","day","deal","dealer","dear","debate","decade","decide","decision","deck","declare","decrease","deep","deeply","deer","defend","defendant","defense","defensive","define","definitely","definition","degree","delay","deliver","delivery","demand","democracy","democratic","demonstrate","demonstration","deny","department","depend","dependent","depending","depict","depth","deputy","derive","describe","description","desert","deserve","design","designer","desire","desk","desperate","despite","detail","detailed","detect","determine","develop","developing","development","device","devote","dialogue","diet","differ","difference","different","differently","difficult","difficulty","dig","digital","dimension","dining","dinner","direct","direction","directly","director","disability","disagree","disappear","discipline","discourse","discover","discovery","discuss","discussion","dish","dismiss","display","distance","distant","distinct","distinction","distinguish","distribute","distribution","district","diverse","diversity","divide","division","doctor","document","dog","domestic","dominant","dominate","door","double","down","downtown","dozen","draft","drag","drama","dramatic","dramatically","draw","drawing","dream","dress","drink","drive","driver","drop","dry","due","during","dust","duty","each","eager","ear","early","earn","earnings","earth","ease","easily","east","eastern","easy","eat","economic","economics","economist","economy","edge","edition","editor","educate","education","educational","educator","effect","effective","effectively","efficiency","efficient","effort","egg","eight","either","elderly","elect","election","electric","electricity","electronic","element","elementary","eliminate","elite","else","elsewhere","embrace","emerge","emission","emotion","emotional","emphasis","emphasize","employ","employee","employer","employment","empty","enable","encounter","encourage","end","energy","enforcement","engage","engine","engineer","engineering","enhance","enjoy","enormous","enough","ensure","enter","enterprise","entertainment","entire","entirely","entrance","entry","environment","environmental","episode","equal","equally","equipment","era","escape","especially","essay","essential","essentially","establish","establishment","estate","estimate","etc","ethics","ethnic","evaluate","evaluation","even","evening","event","eventually","ever","every","everybody","everyday","everyone","everything","everywhere","evidence","evolution","evolve","exact","exactly","examination","examine","example","exceed","excellent","except","exception","exchange","exciting","executive","exercise","exhibit","exhibition","exist","existence","existing","expand","expansion","expect","expectation","expense","expensive","experience","experiment","expert","explain","explanation","explore","expose","express","expression","extend","extension","extensive","extent","external","extra","extraordinary","extreme","extremely","eye","fabric","face","facility","fact","factor","factory","faculty","fade","fair","fairly","faith","fall","false","familiar","family","famous","fan","fantasy","far","farm","farmer","fashion","fast","fate","father","favor","favorite","feature","federal","fee","feed","feel","feeling","fellow","female","fence","few","fewer","fiber","fiction","field","fifteen","fifth","fifty","figure","file","fill","film","final","finally","finance","financial","find","finding","fine","finger","finish","firm","first","fish","fishing","fit","fitness","five","fix","flag","flame","flat","flavor","flesh","flight","float","floor","flow","flower","fly","focus","folk","follow","following","food","foot","football","for","force","foreign","forest","forever","forget","form","formal","formation","former","formula","forth","fortune","forward","found","foundation","founder","four","fourth","frame","framework","free","freedom","freeze","frequency","frequent","frequently","fresh","friend","friendly","friendship","from","front","fruit","fuel","full","fully","fun","function","fund","fundamental","funding","funeral","funny","furniture","furthermore","future","gain","galaxy","gallery","game","gap","garage","garden","garlic","gas","gate","gather","gaze","gear","gender","gene","general","generally","generate","generation","genetic","gentleman","gently","gesture","get","ghost","giant","gift","gifted","girl","girlfriend","give","given","glad","glance","glass","global","glove","goal","gold","golden","golf","good","government","governor","grab","grade","gradually","graduate","grain","grand","grandfather","grandmother","grant","grass","grave","gray","great","greatest","green","grocery","ground","group","grow","growing","growth","guarantee","guard","guess","guest","guide","guideline","guy","habit","habitat","hair","half","hall","hand","handful","handle","hang","happen","happy","hard","hardly","hat","have","head","headline","headquarters","health","healthy","hear","hearing","heart","heat","heaven","heavily","heavy","heel","height","helicopter","hello","help","helpful","here","heritage","hero","herself","hey","hide","high","highlight","highly","highway","hill","himself","hip","hire","historian","historic","historical","history","hit","hold","hole","holiday","holy","home","honest","honey","honor","hope","horizon","horse","hospital","host","hot","hotel","hour","house","household","housing","how","however","huge","human","humor","hundred","hungry","hunter","hunting","husband","hypothesis","ice","idea","ideal","identification","identify","identity","ignore","illustrate","image","imagination","imagine","immediate","immediately","immigrant","immigration","impact","implement","implication","imply","importance","important","impose","impossible","impress","impression","impressive","improve","improvement","incentive","incident","include","including","income","incorporate","increase","increased","increasing","increasingly","incredible","indeed","independence","independent","index","indicate","indication","individual","industrial","industry","infant","inflation","influence","inform","information","ingredient","initial","initially","initiative","inner","innocent","inquiry","inside","insight","insist","inspire","install","instance","instead","institution","institutional","instruction","instructor","instrument","insurance","intellectual","intelligence","intend","intense","intensity","intention","interaction","interest","interested","interesting","internal","international","interpret","interpretation","intervention","interview","into","introduce","introduction","invest","investigate","investigation","investigator","investment","investor","invite","involve","involved","involvement","iron","island","issue","item","its","itself","jacket","jet","job","join","joint","joke","journal","journalist","journey","joy","judge","judgment","juice","jump","junior","jury","just","justice","justify","keep","key","kick","kid","kind","king","kiss","kitchen","knee","knife","knock","know","knowledge","lab","label","labor","laboratory","lady","lake","land","landscape","language","lap","large","largely","last","late","later","latter","laugh","launch","law","lawn","lawsuit","lawyer","lay","layer","lead","leader","leadership","leading","leaf","league","lean","learn","learning","least","leather","leave","left","leg","legacy","legal","legend","legislation","legitimate","lemon","length","less","lesson","let","letter","level","liberal","library","license","lie","life","lifestyle","lifetime","lift","light","like","likely","limit","limitation","limited","line","link","lip","list","listen","literally","literary","literature","little","live","living","load","loan","local","locate","location","lock","long","look","loose","lose","lost","lot","lots","loud","love","lovely","lover","low","lower","luck","lucky","lunch","lung","machine","magazine","mail","main","mainly","maintain","maintenance","major","majority","make","maker","makeup","male","mall","man","manage","management","manager","manner","manufacturer","manufacturing","many","map","margin","mark","market","marketing","marriage","married","marry","mask","mass","massive","master","match","material","math","matter","may","maybe","mayor","meal","mean","meaning","meanwhile","measure","measurement","meat","mechanism","media","medical","medication","medicine","medium","meet","meeting","member","membership","memory","mental","mention","menu","mere","merely","message","metal","meter","method","middle","might","military","milk","million","mind","mine","minister","minor","minority","minute","miracle","mirror","miss","missile","mission","mix","mixture","mode","model","moderate","modern","modest","mom","moment","money","monitor","month","mood","moon","moral","more","moreover","morning","mortgage","most","mostly","mother","motion","motivation","motor","mount","mountain","mouse","mouth","move","movement","movie","much","multiple","muscle","museum","music","musical","musician","must","mutual","myself","mystery","myth","naked","name","narrative","narrow","nation","national","native","natural","naturally","nature","near","nearby","nearly","necessarily","necessary","neck","need","negative","negotiate","negotiation","neighbor","neighborhood","neither","nerve","net","network","never","nevertheless","new","newly","news","newspaper","next","nice","night","nine","nobody","nod","nomination","none","nonetheless","nor","normal","normally","north","northern","nose","not","note","nothing","notice","notion","novel","now","nowhere","nuclear","number","numerous","nurse","nut","object","objective","obligation","observation","observe","observer","obtain","obvious","obviously","occasion","occasionally","occupation","occupy","occur","ocean","odd","odds","off","offer","office","officer","official","often","oil","okay","old","once","one","ongoing","onion","online","only","onto","open","opening","operate","operating","operation","operator","opinion","opponent","opportunity","oppose","opposite","opposition","option","orange","order","ordinary","organic","organization","organize","orientation","origin","original","originally","other","others","otherwise","ought","our","ourselves","out","outcome","outside","oven","over","overall","overcome","overlook","owe","own","owner","pace","pack","package","page","paint","painter","painting","pair","pale","palm","pan","panel","pant","paper","parent","park","parking","part","participant","participate","participation","particular","particularly","partly","partner","partnership","party","pass","passage","passenger","passion","past","patch","path","patient","pattern","pause","pay","payment","peace","peak","peer","people","pepper","per","perceive","percentage","perception","perfect","perfectly","perform","performance","perhaps","period","permanent","permission","permit","person","personal","personality","personally","personnel","perspective","persuade","pet","phase","phenomenon","philosophy","phone","photo","photograph","photographer","phrase","physical","physically","physician","piano","pick","picture","pie","piece","pile","pilot","pine","pink","pipe","pitch","place","plan","plane","planet","planning","plant","plastic","plate","platform","play","player","please","pleasure","plenty","plot","plus","pocket","poem","poet","poetry","point","pole","police","policy","political","politically","politician","politics","poll","pool","pop","popular","population","porch","port","portion","portrait","portray","pose","position","positive","possess","possibility","possible","possibly","post","pot","potato","potential","potentially","pound","pour","powder","power","powerful","practical","practice","pray","prayer","precisely","predict","prefer","preference","pregnancy","pregnant","preparation","prepare","prescription","presence","present","presentation","preserve","president","presidential","press","pretend","pretty","prevent","previous","previously","price","pride","priest","primarily","primary","prime","principal","principle","print","prior","priority","privacy","private","probably","procedure","proceed","process","produce","producer","product","production","profession","professional","professor","profile","profit","program","progress","project","prominent","promise","promote","prompt","proof","proper","properly","property","proportion","proposal","propose","proposed","prosecutor","prospect","protect","protection","protein","protest","proud","prove","provide","provider","province","provision","psychological","psychologist","psychology","public","publication","publicly","publish","publisher","pull","purchase","pure","purpose","pursue","push","put","qualify","quality","quarter","quarterback","question","quick","quickly","quiet","quietly","quit","quite","quote","race","racial","radical","radio","rail","rain","raise","range","rank","rapid","rapidly","rare","rarely","rate","rather","rating","ratio","raw","reach","react","reaction","read","reader","reading","ready","real","reality","realize","really","reason","reasonable","recall","receive","recent","recently","recipe","recognition","recognize","recommend","recommendation","record","recording","recover","recovery","recruit","red","reduce","reduction","refer","reference","reflect","reflection","reform","refugee","refuse","regard","regarding","regardless","regime","region","regional","register","regular","regularly","regulate","regulation","reinforce","relate","relation","relationship","relative","relatively","relax","release","relevant","relief","religion","religious","rely","remain","remaining","remarkable","remember","remind","remote","remove","repeat","repeatedly","replace","reply","report","reporter","represent","representation","representative","reputation","request","require","requirement","research","researcher","resemble","reservation","resident","resist","resolution","resolve","resort","resource","respect","respond","respondent","response","responsibility","responsible","rest","restaurant","restore","restriction","result","retain","retire","retirement","return","reveal","revenue","review","revolution","rhythm","rice","rich","rid","ride","rifle","right","ring","rise","river","road","rock","role","roll","romantic","roof","room","root","rope","rose","roughly","round","route","routine","row","rub","rule","run","running","rural","rush","sacred","safe","safety","sake","salad","salary","sale","sales","salt","same","sample","sanction","sand","satellite","satisfaction","satisfy","sauce","save","saving","say","scale","scenario","scene","schedule","scheme","scholar","scholarship","school","science","scientific","scientist","scope","score","screen","script","sea","search","season","seat","second","secret","secretary","section","sector","secure","security","see","seed","seek","seem","segment","seize","select","selection","self","sell","senator","send","senior","sense","sensitive","sentence","separate","sequence","series","serious","seriously","serve","service","session","set","setting","settle","settlement","seven","several","shade","shadow","shake","shall","shape","share","sharp","sheet","shelf","shell","shelter","shift","shine","ship","shirt","shoe","shop","shopping","shore","short","shortly","shot","should","shoulder","shout","show","shower","shrug","shut","side","sigh","sight","sign","signal","significance","significant","significantly","silence","silent","silver","similar","similarly","simple","simply","since","sing","singer","single","sink","sir","sister","sit","site","situation","six","size","ski","skill","skin","sky","sleep","slice","slide","slight","slightly","slip","slow","slowly","small","smart","smell","smile","smooth","snap","snow","soccer","social","society","soft","software","soil","solar","solid","solution","solve","some","somebody","somehow","someone","something","sometimes","somewhat","somewhere","son","song","soon","sophisticated","sorry","sort","soul","sound","soup","source","south","southern","space","speak","speaker","special","specialist","species","specific","specifically","speech","speed","spend","spending","spin","spirit","spiritual","split","spokesman","sport","spot","spread","spring","square","squeeze","stability","stable","staff","stage","stair","stake","stand","standard","standing","star","stare","start","state","statement","station","statistics","status","stay","steady","steal","steel","step","stick","still","stir","stock","stomach","stone","stop","storage","store","storm","story","straight","strange","stranger","strategic","strategy","stream","street","strength","strengthen","stretch","string","strip","strong","strongly","structure","student","studio","study","stuff","style","subject","submit","subsequent","substance","substantial","succeed","success","successful","successfully","such","sudden","suddenly","sue","sufficient","sugar","suggest","suggestion","suit","summer","summit","sun","super","supply","support","supporter","suppose","supposed","sure","surely","surface","surgery","surprise","surprised","surprising","surprisingly","surround","survey","survival","survive","survivor","sustain","swear","sweep","sweet","swim","swing","switch","symbol","system","table","tablespoon","tactic","tail","take","tale","talent","talk","tall","tank","tap","tape","target","task","taste","tax","taxpayer","tea","teach","teacher","teaching","team","tear","teaspoon","technical","technique","technology","teen","teenager","telephone","telescope","television","tell","temperature","temporary","ten","tend","tendency","tennis","tent","term","terms","territory","test","testify","testimony","testing","text","than","thank","thanks","that","the","theater","their","them","theme","themselves","then","theory","therapy","there","therefore","thick","thin","thing","think","thinking","third","thirty","though","thought","thousand","three","throat","through","throughout","throw","ticket","tie","tight","time","tiny","tip","tire","tired","tissue","title","today","toe","together","tomato","tomorrow","tone","tongue","tonight","too","tool","tooth","top","topic","toss","total","totally","touch","tough","tour","tourist","tournament","tower","town","toy","trace","track","trade","tradition","traditional","traffic","trail","train","training","transfer","transform","transformation","transition","translate","transportation","travel","treat","treatment","treaty","tree","tremendous","trend","trial","tribe","trip","troop","truck","true","truly","trust","truth","try","tube","tunnel","turn","twelve","twenty","twice","twin","two","type","typical","typically","ultimate","ultimately","unable","uncle","under","undergo","understand","understanding","unfortunately","uniform","union","unique","unit","universal","universe","university","unknown","unless","unlike","unlikely","until","unusual","upon","upper","urban","urge","use","used","useful","user","usual","usually","utility","vacation","valley","valuable","value","variable","variation","variety","various","vary","vast","vegetable","vehicle","venture","version","versus","very","vessel","veteran","via","victory","video","view","viewer","village","virtually","virtue","visible","vision","visit","visitor","visual","vital","voice","volume","volunteer","vote","voter","wage","wait","wake","walk","wall","wander","want","warm","warn","warning","wash","watch","water","wave","way","wealth","wealthy","wear","weather","wedding","week","weekend","weekly","weigh","weight","welcome","welfare","well","west","western","wet","what","whatever","wheel","when","whenever","where","whereas","whether","which","while","whisper","white","who","whole","whom","whose","why","wide","widely","widespread","wife","wild","will","willing","win","wind","window","wine","wing","winner","winter","wipe","wire","wisdom","wise","wish","with","withdraw","within","without","witness","woman","wonder","wonderful","wood","wooden","word","work","worker","working","works","workshop","world","worried","worth","would","wrap","write","writer","writing","yard","yeah","year","yell","yellow","yes","yesterday","yield","young","your","yours","yourself","youth","zone"],Me=le((e,t)=>Math.floor(e+Math.random()*(t-e+1)),"random");function J(){return ae[Me(0,ae.length-1)]}g(J,"getRandomWord");le(J,"getRandomWord");var ze=Object.defineProperty,Le=g((e,t)=>ze(e,"name",{value:t,configurable:!0}),"o$1");const Ae=Le(()=>`${J()}-${J()}`,"randomName");var U,ne;function Ge(){return ne||(ne=1,U=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]),U}g(Ge,"requireBuiltinModules");var B,oe;function Ue(){if(oe)return B;oe=1;var e=Object.defineProperty,t=g((o,l)=>e(o,"name",{value:l,configurable:!0}),"i");const r=Ge();var i=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),n=["node_modules","favicon.ico"];function u(o){var l=[],s=[];if(o===null)return s.push("name cannot be null"),p(l,s);if(o===void 0)return s.push("name cannot be undefined"),p(l,s);if(typeof o!="string")return s.push("name must be a string"),p(l,s);if(o.length||s.push("name length must be greater than zero"),o.startsWith(".")&&s.push("name cannot start with a period"),o.startsWith("-")&&s.push("name cannot start with a hyphen"),o.match(/^_/)&&s.push("name cannot start with an underscore"),o.trim()!==o&&s.push("name cannot contain leading or trailing spaces"),n.forEach(function(h){o.toLowerCase()===h&&s.push(h+" is not a valid package name")}),r.includes(o.toLowerCase())&&l.push(o+" is a core module name"),o.length>214&&l.push("name can no longer contain more than 214 characters"),o.toLowerCase()!==o&&l.push("name can no longer contain capital letters"),/[~'!()*]/.test(o.split("/").slice(-1)[0])&&l.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(o)!==o){var w=o.match(i);if(w){var $=w[1],y=w[2];if(y.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent($)===$&&encodeURIComponent(y)===y)return p(l,s)}s.push("name can only contain URL-friendly characters")}return p(l,s)}g(u,"validate"),t(u,"validate");var p=t(function(o,l){var s={validForNewPackages:l.length===0&&o.length===0,validForOldPackages:l.length===0,warnings:o,errors:l};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s},"done");return B=u,B}g(Ue,"requireLib");var Be=Ue();const Fe=ke(Be);var Je=Object.defineProperty,I=g((e,t)=>Je(e,"name",{value:t,configurable:!0}),"r$2");const pe=I(e=>e?Fe(e).validForNewPackages:!1,"isValidPackageName"),T=I(e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),"toValidPackageName"),Ve=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),ue=I(e=>P(e)?je(e).every(t=>Ve.has(t)):!0,"isEmptyDir"),We=I((e,t)=>{const r=_(t,e);return{packageName:T(ve(r)),targetDir:r}},"resolveTargetDir"),He=I(e=>ue(e),"canSafelyOverwrite");var Ye=Object.defineProperty,A=g((e,t)=>Ye(e,"name",{value:t,configurable:!0}),"l$4");const E=A((e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),"ask"),F=A(async(e,t,r=!0)=>{const i=await E(e,` ${t} ${d(r?"[Y/n]":"[y/N]")} `);return i===""?r:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),se=A(async(e,t,r)=>{process.stderr.write(` ${t}
2
+ `);for(const[i,n]of r.entries()){const u=k(x(` ${String(i+1)}.`)),p=n.hint?d(` — ${n.hint}`):"";process.stderr.write(`${u} ${n.label}${p}
3
+ `)}for(;;){const i=await E(e,`
4
+ ${d(`Enter choice (1-${String(r.length)}):`)} `),n=Number.parseInt(i,10);if(n>=1&&n<=r.length)return r[n-1].value;const u=r.find(p=>p.value===i||p.label.toLowerCase()===i.toLowerCase());if(u)return u.value;process.stderr.write(` ${d("Invalid choice. Try again.")}
5
+ `)}},"select"),Ke=A(async e=>{const t=_e({input:process.stdin,output:process.stdout});try{process.stderr.write(`
6
+ ${k(x("vis create"))} ${d("— project scaffolding")}
7
+
8
+ `);const r=e.inMonorepo?[{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}]:[{hint:"Full workspace setup",label:"Vis Monorepo",value:"vis:monorepo"},{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}];let i=await se(t,"Select a template:",r);if(i==="__custom__"&&(i=await E(t,`
9
+ ${d("Template (npm package or GitHub URL):")} `),!i))throw new Error("No template specified.");const n=Ae(),u=await E(t,`
10
+ ${d(`Project name (${n}):`)} `)||n;if(!pe(T(u)))throw new Error(`Invalid project name: "${u}". Must be a valid npm package name.`);const p=T(u),o=await E(t,` ${d(`Target directory (${p}):`)} `)||p;let l=!1;const s=_(e.cwd,o);if(!ue(s)&&(l=await F(t,`Directory "${o}" is not empty. Overwrite?`,!1),!l))throw new Error("Aborted — directory not empty.");let w;e.inMonorepo||(e.defaultPm?(w=e.defaultPm,process.stderr.write(` ${d(`Package manager: ${w} (from config)`)}
11
+ `)):w=await se(t,"Package manager:",[{label:"pnpm",value:"pnpm"},{label:"npm",value:"npm"},{label:"yarn",value:"yarn"},{label:"bun",value:"bun"}]));let $=!1;e.inMonorepo||($=await F(t,"Initialize a git repository?",e.defaultGitInit??!1));const y=e.defaultEditor==="vscode",h=await F(t,"Generate VS Code configuration?",y)?"vscode":void 0;return process.stderr.write(`
12
+ `),{editor:h,gitInit:$,overwrite:l,pm:w,projectName:u,targetDir:o,template:i}}finally{t.close()}},"runInteractivePrompts");var Qe=Object.defineProperty,S=g((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"i");const Xe=S((e,t)=>{a.info("Scaffolding application via create-vite...");const r=[W(t.cwd,t.targetDir)||".",...e.args];return r.includes("--no-immediate")||r.push("--no-immediate"),ce(t.pm,{additionalPackages:[],args:r,package:"create-vite",shellMode:!1,silent:!1},t.cwd,t.logger)},"executeApp"),Ze=S(e=>`${JSON.stringify({devDependencies:{typescript:"^5.0.0",vitest:"^3.0.0"},exports:{".":{default:"./dist/index.js",types:"./dist/index.d.ts"}},files:["dist"],main:"./dist/index.js",name:e,scripts:{build:"tsc",dev:"tsc --watch",test:"vitest run","test:watch":"vitest"},type:"module",types:"./dist/index.d.ts",version:"0.0.1"},null,4)}
13
+ `,"libraryPackageJson"),et=S(()=>`${JSON.stringify({compilerOptions:{declaration:!0,declarationMap:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,sourceMap:!0,strict:!0,target:"ES2022"},include:["src/**/*"]},null,4)}
14
+ `,"libraryTsconfig"),tt=S(e=>`/**
15
+ * ${e} — library entry point.
3245
16
  */
3246
17
 
3247
- export const greet = (name: string): string => \`Hello from ${name}, \${name}!\`;
3248
- `;
3249
- const libraryTestIndex = (name) => `import { describe, expect, it } from "vitest";
18
+ export const greet = (name: string): string => \`Hello from ${e}, \${name}!\`;
19
+ `,"librarySrcIndex"),rt=S(e=>`import { describe, expect, it } from "vitest";
3250
20
 
3251
21
  import { greet } from "../src/index";
3252
22
 
3253
- describe("${name}", () => {
23
+ describe("${e}", () => {
3254
24
  it("should greet", () => {
3255
- expect(greet("world")).toBe("Hello from ${name}, world!");
25
+ expect(greet("world")).toBe("Hello from ${e}, world!");
3256
26
  });
3257
27
  });
3258
- `;
3259
- const executeLibrary = (_config, context) => {
3260
- const { projectName, targetDir } = context;
3261
- pail.info("Scaffolding library package...");
3262
- ensureDirSync(targetDir);
3263
- ensureDirSync(join(targetDir, "src"));
3264
- ensureDirSync(join(targetDir, "__tests__"));
3265
- writeFileSync(join(targetDir, "package.json"), libraryPackageJson(projectName));
3266
- pail.success("Created package.json");
3267
- writeFileSync(join(targetDir, "tsconfig.json"), libraryTsconfig());
3268
- pail.success("Created tsconfig.json");
3269
- writeFileSync(join(targetDir, "src", "index.ts"), librarySrcIndex(projectName));
3270
- pail.success("Created src/index.ts");
3271
- writeFileSync(join(targetDir, "__tests__", "index.test.ts"), libraryTestIndex(projectName));
3272
- pail.success("Created __tests__/index.test.ts");
3273
- writeFileSync(join(targetDir, ".gitignore"), "node_modules/\ndist/\n.env\n.DS_Store\n");
3274
- pail.success("Created .gitignore");
3275
- return 0;
3276
- };
3277
- const executeBuiltin = (config, context) => {
3278
- switch (config.type) {
3279
- case "builtin:app": {
3280
- return executeApp(config, context);
3281
- }
3282
- case "builtin:library": {
3283
- return executeLibrary(config, context);
3284
- }
3285
- default: {
3286
- throw new Error(`Unknown built-in template type: ${config.type}`);
3287
- }
3288
- }
3289
- };
3290
-
3291
- const packageJson = (name, description) => `${JSON.stringify(
3292
- {
3293
- bin: {
3294
- [name]: "./bin/index.js"
3295
- },
3296
- description,
3297
- devDependencies: {
3298
- typescript: "^5.0.0"
3299
- },
3300
- name,
3301
- private: true,
3302
- scripts: {
3303
- build: "tsc",
3304
- dev: "tsc --watch"
3305
- },
3306
- type: "module",
3307
- version: "0.0.1"
3308
- },
3309
- null,
3310
- 4
3311
- )}
3312
- `;
3313
- const binIndex = (name) => `#!/usr/bin/env node
28
+ `,"libraryTestIndex"),it=S((e,t)=>{const{projectName:r,targetDir:i}=t;return a.info("Scaffolding library package..."),b(i),b(c(i,"src")),b(c(i,"__tests__")),m(c(i,"package.json"),Ze(r)),a.success("Created package.json"),m(c(i,"tsconfig.json"),et()),a.success("Created tsconfig.json"),m(c(i,"src","index.ts"),tt(r)),a.success("Created src/index.ts"),m(c(i,"__tests__","index.test.ts"),rt(r)),a.success("Created __tests__/index.test.ts"),m(c(i,".gitignore"),`node_modules/
29
+ dist/
30
+ .env
31
+ .DS_Store
32
+ `),a.success("Created .gitignore"),0},"executeLibrary"),at=S((e,t)=>{switch(e.type){case"builtin:app":return Xe(e,t);case"builtin:library":return it(e,t);default:throw new Error(`Unknown built-in template type: ${e.type}`)}},"executeBuiltin");var nt=Object.defineProperty,R=g((e,t)=>nt(e,"name",{value:t,configurable:!0}),"n$1");const ot=R((e,t)=>`${JSON.stringify({bin:{[e]:"./bin/index.js"},description:t,devDependencies:{typescript:"^5.0.0"},name:e,private:!0,scripts:{build:"tsc",dev:"tsc --watch"},type:"module",version:"0.0.1"},null,4)}
33
+ `,"packageJson"),st=R(e=>`#!/usr/bin/env node
3314
34
 
3315
35
  /**
3316
- * ${name} — code generator
36
+ * ${e} — code generator
3317
37
  *
3318
- * Usage: npx ${name} [options]
38
+ * Usage: npx ${e} [options]
3319
39
  */
3320
40
 
3321
- console.log("Hello from ${name}!");
3322
- `;
3323
- const tsconfigJson = () => `${JSON.stringify(
3324
- {
3325
- compilerOptions: {
3326
- declaration: true,
3327
- esModuleInterop: true,
3328
- module: "Node16",
3329
- moduleResolution: "Node16",
3330
- outDir: "./dist",
3331
- rootDir: "./src",
3332
- skipLibCheck: true,
3333
- strict: true,
3334
- target: "ES2022"
3335
- },
3336
- include: ["src/**/*", "bin/**/*"]
3337
- },
3338
- null,
3339
- 4
3340
- )}
3341
- `;
3342
- const srcIndex = () => `/**
41
+ console.log("Hello from ${e}!");
42
+ `,"binIndex"),ct=R(()=>`${JSON.stringify({compilerOptions:{declaration:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,strict:!0,target:"ES2022"},include:["src/**/*","bin/**/*"]},null,4)}
43
+ `,"tsconfigJson"),lt=R(()=>`/**
3343
44
  * Generator core logic — export functions used by the CLI entry point.
3344
45
  */
3345
46
 
3346
47
  export const generate = (): void => {
3347
48
  // TODO: Implement your generator logic here
3348
49
  };
3349
- `;
3350
- const executeGeneratorTemplate = (context, description = "") => {
3351
- const { projectName, targetDir } = context;
3352
- pail.info("Scaffolding code generator...");
3353
- ensureDirSync(targetDir);
3354
- ensureDirSync(join(targetDir, "bin"));
3355
- ensureDirSync(join(targetDir, "src"));
3356
- writeFileSync(join(targetDir, "package.json"), packageJson(projectName, description || `Code generator: ${projectName}`));
3357
- pail.success("Created package.json");
3358
- const binPath = join(targetDir, "bin", "index.js");
3359
- writeFileSync(binPath, binIndex(projectName));
3360
- chmodSync(binPath, 493);
3361
- pail.success("Created bin/index.js (executable)");
3362
- writeFileSync(join(targetDir, "tsconfig.json"), tsconfigJson());
3363
- pail.success("Created tsconfig.json");
3364
- writeFileSync(join(targetDir, "src", "index.ts"), srcIndex());
3365
- pail.success("Created src/index.ts");
3366
- return 0;
3367
- };
3368
-
3369
- const rootPackageJson = (name) => `${JSON.stringify(
3370
- {
3371
- devDependencies: {
3372
- "@visulima/vis": "latest"
3373
- },
3374
- name,
3375
- packageManager: "pnpm@latest",
3376
- private: true,
3377
- scripts: {
3378
- build: "vis run build",
3379
- dev: "vis run dev",
3380
- lint: "vis run lint",
3381
- test: "vis run test"
3382
- },
3383
- type: "module",
3384
- version: "0.0.0"
3385
- },
3386
- null,
3387
- 4
3388
- )}
3389
- `;
3390
- const pnpmWorkspaceYaml = () => `packages:
50
+ `,"srcIndex"),pt=R((e,t="")=>{const{projectName:r,targetDir:i}=e;a.info("Scaffolding code generator..."),b(i),b(c(i,"bin")),b(c(i,"src")),m(c(i,"package.json"),ot(r,t||`Code generator: ${r}`)),a.success("Created package.json");const n=c(i,"bin","index.js");return m(n,st(r)),Ce(n,493),a.success("Created bin/index.js (executable)"),m(c(i,"tsconfig.json"),ct()),a.success("Created tsconfig.json"),m(c(i,"src","index.ts"),lt()),a.success("Created src/index.ts"),0},"executeGeneratorTemplate");var ut=Object.defineProperty,N=g((e,t)=>ut(e,"name",{value:t,configurable:!0}),"n");const dt=N(e=>`${JSON.stringify({devDependencies:{"@visulima/vis":"latest"},name:e,packageManager:"pnpm@latest",private:!0,scripts:{build:"vis run build",dev:"vis run dev",lint:"vis run lint",test:"vis run test"},type:"module",version:"0.0.0"},null,4)}
51
+ `,"rootPackageJson"),mt=N(()=>`packages:
3391
52
  - "apps/*"
3392
53
  - "packages/*"
3393
- `;
3394
- const gitignore = () => `# Dependencies
54
+ `,"pnpmWorkspaceYaml"),gt=N(()=>`# Dependencies
3395
55
  node_modules/
3396
56
 
3397
57
  # Build output
@@ -3421,8 +81,7 @@ pnpm-debug.log*
3421
81
  # Cache
3422
82
  .turbo/
3423
83
  .cache/
3424
- `;
3425
- const editorconfig = () => `root = true
84
+ `,"gitignore"),ht=N(()=>`root = true
3426
85
 
3427
86
  [*]
3428
87
  indent_style = space
@@ -3437,8 +96,7 @@ indent_size = 2
3437
96
 
3438
97
  [*.md]
3439
98
  trim_trailing_whitespace = false
3440
- `;
3441
- const readmeMd = (name) => `# ${name}
99
+ `,"editorconfig"),ft=N(e=>`# ${e}
3442
100
 
3443
101
  A monorepo powered by [vis](https://visulima.com/packages/vis).
3444
102
 
@@ -3466,421 +124,30 @@ pnpm test
3466
124
  ├── pnpm-workspace.yaml
3467
125
  └── package.json
3468
126
  \`\`\`
3469
- `;
3470
- const executeMonorepoTemplate = (context) => {
3471
- const { projectName, targetDir } = context;
3472
- pail.info("Scaffolding monorepo workspace...");
3473
- ensureDirSync(targetDir);
3474
- ensureDirSync(join(targetDir, "apps"));
3475
- ensureDirSync(join(targetDir, "packages"));
3476
- writeFileSync(join(targetDir, "package.json"), rootPackageJson(projectName));
3477
- pail.success("Created package.json");
3478
- writeFileSync(join(targetDir, "pnpm-workspace.yaml"), pnpmWorkspaceYaml());
3479
- pail.success("Created pnpm-workspace.yaml");
3480
- writeFileSync(join(targetDir, ".gitignore"), gitignore());
3481
- pail.success("Created .gitignore");
3482
- writeFileSync(join(targetDir, ".editorconfig"), editorconfig());
3483
- pail.success("Created .editorconfig");
3484
- writeFileSync(join(targetDir, "README.md"), readmeMd(projectName));
3485
- pail.success("Created README.md");
3486
- writeFileSync(join(targetDir, "apps", ".gitkeep"), "");
3487
- writeFileSync(join(targetDir, "packages", ".gitkeep"), "");
3488
- return 0;
3489
- };
3490
-
3491
- const AUTO_FIXES = {
3492
- "create-nuxt": {
3493
- monoArgs: ["--no-gitInit"]
3494
- },
3495
- "create-vite": {
3496
- args: ["--no-immediate"]
3497
- },
3498
- sv: {
3499
- args: ["--no-install"],
3500
- prependCommand: "create"
3501
- }
3502
- };
3503
- const applyAutoFixes = (source, args, inMonorepo) => {
3504
- const fix = AUTO_FIXES[source];
3505
- if (!fix) {
3506
- return args;
3507
- }
3508
- const result = [...args];
3509
- if (fix.prependCommand && !result.includes(fix.prependCommand)) {
3510
- result.unshift(fix.prependCommand);
3511
- }
3512
- if (fix.args) {
3513
- for (const argument of fix.args) {
3514
- if (!result.includes(argument)) {
3515
- result.push(argument);
3516
- }
3517
- }
3518
- }
3519
- if (inMonorepo && fix.monoArgs) {
3520
- for (const argument of fix.monoArgs) {
3521
- if (!result.includes(argument)) {
3522
- result.push(argument);
3523
- }
3524
- }
3525
- }
3526
- return result;
3527
- };
3528
- const executeRemoteNpm = (config, context) => {
3529
- const relativeTarget = relative(context.cwd, context.targetDir) || ".";
3530
- const initialArgs = [...config.args];
3531
- if (!initialArgs.includes(relativeTarget)) {
3532
- initialArgs.unshift(relativeTarget);
3533
- }
3534
- const args = applyAutoFixes(config.source, initialArgs, context.inMonorepo);
3535
- pail.info(`Running ${config.source} via ${context.pm.name} dlx...`);
3536
- const code = runDlx(
3537
- context.pm,
3538
- {
3539
- additionalPackages: [],
3540
- args,
3541
- package: config.source,
3542
- shellMode: false,
3543
- silent: false
3544
- },
3545
- context.cwd,
3546
- context.logger
3547
- );
3548
- return code;
3549
- };
3550
- const executeRemoteGit = async (config, context) => {
3551
- const { createConfig } = context;
3552
- pail.info(`Downloading template from ${config.source}...`);
3553
- try {
3554
- const result = await downloadTemplate(config.source, {
3555
- auth: createConfig?.auth || process.env.GIGET_AUTH || process.env.GITHUB_TOKEN || process.env.GH_TOKEN || void 0,
3556
- dir: context.targetDir,
3557
- // force: true is safe here — the caller (index.ts) already validated
3558
- // the target directory is empty via canSafelyOverwrite() before reaching
3559
- // this point. We skip giget's own directory check to avoid a redundant prompt.
3560
- force: true,
3561
- preferOffline: createConfig?.preferOffline,
3562
- provider: createConfig?.defaultProvider,
3563
- registry: createConfig?.registry
3564
- });
3565
- pail.info(`Downloaded to ${result.dir}`);
3566
- return 0;
3567
- } catch (error) {
3568
- const message = error instanceof Error ? error.message : String(error);
3569
- pail.warn(`Failed to download template: ${message}`);
3570
- return 1;
3571
- }
3572
- };
3573
-
3574
- const executeTemplate = async (config, context) => {
3575
- switch (config.type) {
3576
- case "builtin:app":
3577
- case "builtin:library": {
3578
- return executeBuiltin(config, context);
3579
- }
3580
- case "builtin:generator": {
3581
- return executeGeneratorTemplate(context);
3582
- }
3583
- case "builtin:monorepo": {
3584
- return executeMonorepoTemplate(context);
3585
- }
3586
- case "remote:git": {
3587
- return executeRemoteGit(config, context);
3588
- }
3589
- case "remote:npm": {
3590
- return executeRemoteNpm(config, context);
3591
- }
3592
- default: {
3593
- throw new Error(`Unknown template type: ${config.type}`);
3594
- }
3595
- }
3596
- };
3597
-
3598
- const generateVscodeConfig = (projectDir) => {
3599
- const vscodeDir = join(projectDir, ".vscode");
3600
- ensureDirSync(vscodeDir);
3601
- const settingsPath = join(vscodeDir, "settings.json");
3602
- const defaultSettings = {
3603
- "editor.defaultFormatter": "oxc.oxc-vscode",
3604
- "editor.formatOnSave": true
3605
- };
3606
- if (isAccessibleSync(settingsPath)) {
3607
- try {
3608
- const existing = readJsonSync(settingsPath);
3609
- writeFileSync(settingsPath, `${JSON.stringify({ ...defaultSettings, ...existing }, null, 4)}
3610
- `);
3611
- pail.success("Merged .vscode/settings.json");
3612
- } catch {
3613
- pail.warn("Could not merge .vscode/settings.json, skipping");
3614
- }
3615
- } else {
3616
- writeFileSync(settingsPath, `${JSON.stringify(defaultSettings, null, 4)}
3617
- `);
3618
- pail.success("Created .vscode/settings.json");
3619
- }
3620
- const extensionsPath = join(vscodeDir, "extensions.json");
3621
- const defaultExtensions = { recommendations: ["oxc.oxc-vscode"] };
3622
- if (isAccessibleSync(extensionsPath)) {
3623
- try {
3624
- const existing = readJsonSync(extensionsPath);
3625
- writeFileSync(
3626
- extensionsPath,
3627
- `${JSON.stringify(
3628
- {
3629
- ...existing,
3630
- recommendations: [.../* @__PURE__ */ new Set([...existing.recommendations || [], ...defaultExtensions.recommendations])]
3631
- },
3632
- null,
3633
- 4
3634
- )}
3635
- `
3636
- );
3637
- pail.success("Merged .vscode/extensions.json");
3638
- } catch {
3639
- pail.warn("Could not merge .vscode/extensions.json, skipping");
3640
- }
3641
- } else {
3642
- writeFileSync(extensionsPath, `${JSON.stringify(defaultExtensions, null, 4)}
3643
- `);
3644
- pail.success("Created .vscode/extensions.json");
3645
- }
3646
- };
3647
- const generateAiInstructions = (projectDir, pmName) => {
3648
- const aiDir = join(projectDir, ".ai");
3649
- ensureDirSync(aiDir);
3650
- const instructionsPath = join(aiDir, "instructions");
3651
- if (isAccessibleSync(instructionsPath)) {
3652
- return;
3653
- }
3654
- const content = `# Project Instructions
127
+ `,"readmeMd"),yt=N(e=>{const{projectName:t,targetDir:r}=e;return a.info("Scaffolding monorepo workspace..."),b(r),b(c(r,"apps")),b(c(r,"packages")),m(c(r,"package.json"),dt(t)),a.success("Created package.json"),m(c(r,"pnpm-workspace.yaml"),mt()),a.success("Created pnpm-workspace.yaml"),m(c(r,".gitignore"),gt()),a.success("Created .gitignore"),m(c(r,".editorconfig"),ht()),a.success("Created .editorconfig"),m(c(r,"README.md"),ft(t)),a.success("Created README.md"),m(c(r,"apps",".gitkeep"),""),m(c(r,"packages",".gitkeep"),""),0},"executeMonorepoTemplate");var vt=Object.defineProperty,H=g((e,t)=>vt(e,"name",{value:t,configurable:!0}),"s");const bt={"create-nuxt":{monoArgs:["--no-gitInit"]},"create-vite":{args:["--no-immediate"]},sv:{args:["--no-install"],prependCommand:"create"}},wt=H((e,t,r)=>{const i=bt[e];if(!i)return t;const n=[...t];if(i.prependCommand&&!n.includes(i.prependCommand)&&n.unshift(i.prependCommand),i.args)for(const u of i.args)n.includes(u)||n.push(u);if(r&&i.monoArgs)for(const u of i.monoArgs)n.includes(u)||n.push(u);return n},"applyAutoFixes"),kt=H((e,t)=>{const r=W(t.cwd,t.targetDir)||".",i=[...e.args];i.includes(r)||i.unshift(r);const n=wt(e.source,i,t.inMonorepo);return a.info(`Running ${e.source} via ${t.pm.name} dlx...`),ce(t.pm,{additionalPackages:[],args:n,package:e.source,shellMode:!1,silent:!1},t.cwd,t.logger)},"executeRemoteNpm"),xt=H(async(e,t)=>{const{createConfig:r}=t;a.info(`Downloading template from ${e.source}...`);try{const i=await Se(e.source,{auth:r?.auth||process.env.GIGET_AUTH||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,dir:t.targetDir,force:!0,preferOffline:r?.preferOffline,provider:r?.defaultProvider,registry:r?.registry});return a.info(`Downloaded to ${i.dir}`),0}catch(i){const n=i instanceof Error?i.message:String(i);return a.warn(`Failed to download template: ${n}`),1}},"executeRemoteGit");var $t=Object.defineProperty,_t=g((e,t)=>$t(e,"name",{value:t,configurable:!0}),"r");const jt=_t(async(e,t)=>{switch(e.type){case"builtin:app":case"builtin:library":return at(e,t);case"builtin:generator":return pt(t);case"builtin:monorepo":return yt(t);case"remote:git":return xt(e,t);case"remote:npm":return kt(e,t);default:throw new Error(`Unknown template type: ${e.type}`)}},"executeTemplate");var Ct=Object.defineProperty,j=g((e,t)=>Ct(e,"name",{value:t,configurable:!0}),"g");const St=j(e=>{const t=c(e,".vscode");b(t);const r=c(t,"settings.json"),i={"editor.defaultFormatter":"oxc.oxc-vscode","editor.formatOnSave":!0};if(P(r))try{const p=ie(r);m(r,`${JSON.stringify({...i,...p},null,4)}
128
+ `),a.success("Merged .vscode/settings.json")}catch{a.warn("Could not merge .vscode/settings.json, skipping")}else m(r,`${JSON.stringify(i,null,4)}
129
+ `),a.success("Created .vscode/settings.json");const n=c(t,"extensions.json"),u={recommendations:["oxc.oxc-vscode"]};if(P(n))try{const p=ie(n);m(n,`${JSON.stringify({...p,recommendations:[...new Set([...p.recommendations||[],...u.recommendations])]},null,4)}
130
+ `),a.success("Merged .vscode/extensions.json")}catch{a.warn("Could not merge .vscode/extensions.json, skipping")}else m(n,`${JSON.stringify(u,null,4)}
131
+ `),a.success("Created .vscode/extensions.json")},"generateVscodeConfig"),Pt=j((e,t)=>{const r=c(e,".ai");b(r);const i=c(r,"instructions");if(P(i))return;const n=`# Project Instructions
3655
132
 
3656
133
  This project was scaffolded with vis create.
3657
134
 
3658
135
  ## Development
3659
136
 
3660
- - Package manager: ${pmName}
3661
- - Build: \`${pmName} run build\`
3662
- - Test: \`${pmName} run test\`
3663
- - Lint: \`${pmName} run lint\`
137
+ - Package manager: ${t}
138
+ - Build: \`${t} run build\`
139
+ - Test: \`${t} run test\`
140
+ - Lint: \`${t} run lint\`
3664
141
 
3665
142
  ## Conventions
3666
143
 
3667
144
  - Use TypeScript strict mode
3668
145
  - ESM modules (\`"type": "module"\`)
3669
146
  - Follow Angular-style conventional commits
3670
- `;
3671
- writeFileSync(instructionsPath, content);
3672
- pail.success("Created .ai/instructions");
3673
- };
3674
- const initGitRepo = (projectDir) => {
3675
- const result = spawnSync("git", ["init"], {
3676
- cwd: projectDir,
3677
- stdio: "pipe"
3678
- });
3679
- if (result.status === 0) {
3680
- pail.success("Initialized git repository");
3681
- } else {
3682
- pail.warn("Failed to initialize git repository");
3683
- }
3684
- };
3685
- const installDependencies = (projectDir, pm, logger, preferOffline = false) => {
3686
- pail.info("Installing dependencies...");
3687
- const code = runInstall(
3688
- pm,
3689
- {
3690
- dev: false,
3691
- filter: [],
3692
- force: false,
3693
- frozenLockfile: false,
3694
- ignoreScripts: false,
3695
- lockfileOnly: false,
3696
- noOptional: false,
3697
- offline: preferOffline,
3698
- prod: false,
3699
- recursive: false,
3700
- silent: false,
3701
- workspaceRoot: false
3702
- },
3703
- projectDir,
3704
- logger
3705
- );
3706
- if (code === 0) {
3707
- pail.success("Dependencies installed");
3708
- return true;
3709
- }
3710
- pail.warn("Dependency installation failed (you can run install manually)");
3711
- return false;
3712
- };
3713
- const extractRepoName = (input) => {
3714
- const withoutFragment = input.split("#")[0];
3715
- const withoutQuery = withoutFragment.split("?")[0];
3716
- const cleaned = withoutQuery.replace(/\/+$/, "").replace(/\.git$/, "");
3717
- const segments = cleaned.split("/").filter(Boolean);
3718
- const last = segments.at(-1) ?? "";
3719
- const withoutPrefix = last.includes(":") ? last.split(":").pop() ?? last : last;
3720
- return toValidPackageName(withoutPrefix) || "my-project";
3721
- };
3722
- const listTemplates = (aliases) => {
3723
- pail.info("");
3724
- pail.info(" Built-in templates:");
3725
- pail.info(` ${bold(cyan("vis:monorepo"))} ${dim("Full pnpm workspace setup")}`);
3726
- pail.info(` ${bold(cyan("vis:app"))} ${dim("Application scaffold via create-vite")}`);
3727
- pail.info(` ${bold(cyan("vis:library"))} ${dim("Reusable TypeScript library package")}`);
3728
- pail.info(` ${bold(cyan("vis:generator"))} ${dim("Code generator scaffold with bin entry")}`);
3729
- if (aliases && Object.keys(aliases).length > 0) {
3730
- pail.info("");
3731
- pail.info(" Config aliases (vis.config.ts → create.templates):");
3732
- for (const [name, source] of Object.entries(aliases)) {
3733
- pail.info(` ${bold(cyan(name))}${" ".repeat(Math.max(1, 16 - name.length))}${dim(source)}`);
3734
- }
3735
- }
3736
- pail.info("");
3737
- pail.info(" Remote templates:");
3738
- pail.info(` ${dim("Any npm create-* package:")} vis create vite`);
3739
- pail.info(` ${dim("GitHub repository:")} vis create user/repo`);
3740
- pail.info(` ${dim("GitLab / Bitbucket:")} vis create gitlab:user/repo`);
3741
- pail.info(` ${dim("Full URL:")} vis create https://github.com/user/repo`);
3742
- pail.info("");
3743
- pail.info(` ${dim("Template args after --:")} vis create vite -- --template react-ts`);
3744
- pail.info("");
3745
- };
3746
- const printNextSteps = (targetDir, cwd, pmName, depsInstalled) => {
3747
- const relative2 = resolve(cwd) === resolve(targetDir) ? "" : targetDir;
3748
- process.stderr.write("\n");
3749
- pail.success("Project created successfully!");
3750
- process.stderr.write("\n");
3751
- pail.notice("Next steps:");
3752
- if (relative2) {
3753
- pail.info(` cd ${relative2}`);
3754
- }
3755
- if (!depsInstalled) {
3756
- pail.info(` ${pmName} install`);
3757
- }
3758
- pail.info(` ${pmName} run dev`);
3759
- process.stderr.write("\n");
3760
- };
3761
- const execute = async ({ argument, logger, options, rawUnknown, visConfig, workspaceRoot: wsRoot }) => {
3762
- const args = Array.isArray(argument) ? argument : argument ? [argument] : [];
3763
- const createConfig = visConfig?.create;
3764
- if (options.list) {
3765
- listTemplates(createConfig?.templates);
3766
- return;
3767
- }
3768
- const cwd = options.cwd || wsRoot || process.cwd();
3769
- const inMonorepo = Boolean(wsRoot);
3770
- const isTTY = Boolean(process.stdin.isTTY);
3771
- const detectedPm = detectPm(cwd);
3772
- let templateInput;
3773
- let projectName;
3774
- let targetDir;
3775
- let editor = createConfig?.defaultEditor;
3776
- let gitInit = createConfig?.gitInit ?? false;
3777
- let extraArgs = [];
3778
- let pm = detectedPm;
3779
- let userConfirmedOverwrite = false;
3780
- if (args.length === 0 && isTTY && !options.noInteractive) {
3781
- const answers = await runInteractivePrompts({
3782
- cwd,
3783
- defaultEditor: createConfig?.defaultEditor,
3784
- defaultGitInit: createConfig?.gitInit,
3785
- // Only seed defaultPm when config explicitly sets it —
3786
- // otherwise show the PM picker so the user can choose.
3787
- defaultPm: createConfig?.defaultPm,
3788
- inMonorepo
3789
- });
3790
- templateInput = answers.template;
3791
- projectName = answers.projectName;
3792
- targetDir = resolve(cwd, answers.targetDir);
3793
- editor = answers.editor ?? editor;
3794
- gitInit = answers.gitInit;
3795
- userConfirmedOverwrite = answers.overwrite;
3796
- if (answers.pm) {
3797
- pm = { name: answers.pm, version: detectedPm.version };
3798
- }
3799
- } else if (args.length === 0) {
3800
- throw new Error(
3801
- "No template specified. Usage: vis create <template> [name] [-- args...]\nUse --list to see available templates, or run interactively in a terminal."
3802
- );
3803
- } else {
3804
- let passthroughArgv = [...rawUnknown ?? []];
3805
- if (passthroughArgv.length === 0) {
3806
- const rawArgv = process.argv.slice(2);
3807
- const argvDashIndex = rawArgv.indexOf("--");
3808
- if (argvDashIndex !== -1) {
3809
- passthroughArgv = rawArgv.slice(argvDashIndex + 1);
3810
- }
3811
- }
3812
- const legacyDashIndex = args.indexOf("--");
3813
- const ownArgs = legacyDashIndex === -1 ? args : args.slice(0, legacyDashIndex);
3814
- const legacyExtras = legacyDashIndex === -1 ? [] : args.slice(legacyDashIndex + 1);
3815
- extraArgs = [...legacyExtras, ...passthroughArgv];
3816
- templateInput = ownArgs[0];
3817
- projectName = ownArgs[1];
3818
- if (!projectName) {
3819
- projectName = extractRepoName(templateInput);
3820
- }
3821
- editor = options.editor === "vscode" ? "vscode" : editor;
3822
- gitInit = Boolean(options.gitInit) || gitInit;
3823
- }
3824
- if (!templateInput) {
3825
- throw new Error("No template specified.");
3826
- }
3827
- const resolvedInput = createConfig?.templates?.[templateInput] ?? templateInput;
3828
- const config = discoverTemplate(resolvedInput, extraArgs);
3829
- if (!targetDir) {
3830
- const parentDir = inMonorepo ? inferParentDir(config.type) : ".";
3831
- const resolved = resolveTargetDir(projectName, resolve(cwd, parentDir));
3832
- targetDir = resolved.targetDir;
3833
- projectName = resolved.packageName;
3834
- }
3835
- const sanitizedName = toValidPackageName(projectName ?? "");
3836
- if (!isValidPackageName(sanitizedName)) {
3837
- throw new Error(`Invalid project name: "${projectName}". Use lowercase alphanumeric characters and hyphens.`);
3838
- }
3839
- projectName = sanitizedName;
3840
- const resolvedTarget = resolve(targetDir);
3841
- const rel = relative(resolve(cwd), resolvedTarget);
3842
- if (rel === ".." || rel.startsWith(`..${sep}`) || isAbsolute(rel)) {
3843
- throw new Error(`Target directory "${targetDir}" is outside the working directory. Use a name without "../" path segments.`);
3844
- }
3845
- if (!userConfirmedOverwrite && !canSafelyOverwrite(targetDir)) {
3846
- throw new Error(`Target directory "${targetDir}" is not empty.
3847
- Use a different name or clear the directory first.`);
3848
- }
3849
- if (resolvedInput !== templateInput) {
3850
- pail.info(`Alias: ${bold(cyan(templateInput))} → ${dim(resolvedInput)}`);
3851
- }
3852
- pail.info(`Template: ${bold(cyan(resolvedInput))}`);
3853
- pail.info(`Project: ${bold(projectName)}`);
3854
- pail.info(`Target: ${dim(targetDir)}`);
3855
- process.stderr.write("\n");
3856
- const code = await executeTemplate(config, {
3857
- createConfig,
3858
- cwd,
3859
- inMonorepo,
3860
- logger,
3861
- pm,
3862
- projectName,
3863
- targetDir
3864
- });
3865
- if (code !== 0) {
3866
- process.exitCode = code;
3867
- return;
3868
- }
3869
- if (editor === "vscode") {
3870
- generateVscodeConfig(targetDir);
3871
- }
3872
- if (isAccessibleSync(targetDir)) {
3873
- generateAiInstructions(targetDir, pm.name);
3874
- }
3875
- if (gitInit && !inMonorepo) {
3876
- initGitRepo(targetDir);
3877
- }
3878
- let depsInstalled = false;
3879
- const shouldInstall = createConfig?.install !== false;
3880
- if (shouldInstall && isAccessibleSync(join(targetDir, "package.json"))) {
3881
- depsInstalled = installDependencies(targetDir, pm, logger, createConfig?.preferOffline);
3882
- }
3883
- printNextSteps(targetDir, cwd, pm.name, depsInstalled);
3884
- };
3885
-
3886
- export { execute as default };
147
+ `;m(i,n),a.success("Created .ai/instructions")},"generateAiInstructions"),Nt=j(e=>{ye("git",["init"],{cwd:e,stdio:"pipe"}).status===0?a.success("Initialized git repository"):a.warn("Failed to initialize git repository")},"initGitRepo"),Ot=j((e,t,r,i=!1)=>(a.info("Installing dependencies..."),xe(t,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:!1,lockfileOnly:!1,noOptional:!1,offline:i,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},e,r)===0?(a.success("Dependencies installed"),!0):(a.warn("Dependency installation failed (you can run install manually)"),!1)),"installDependencies"),qt=j(e=>{const t=e.split("#")[0].split("?")[0].replace(/\/+$/,"").replace(/\.git$/,"").split("/").filter(Boolean).at(-1)??"",r=t.includes(":")?t.split(":").pop()??t:t;return T(r)||"my-project"},"extractRepoName"),Dt=j(e=>{if(a.info(""),a.info(" Built-in templates:"),a.info(` ${k(x("vis:monorepo"))} ${d("Full pnpm workspace setup")}`),a.info(` ${k(x("vis:app"))} ${d("Application scaffold via create-vite")}`),a.info(` ${k(x("vis:library"))} ${d("Reusable TypeScript library package")}`),a.info(` ${k(x("vis:generator"))} ${d("Code generator scaffold with bin entry")}`),e&&Object.keys(e).length>0){a.info(""),a.info(" Config aliases (vis.config.ts → create.templates):");for(const[t,r]of Object.entries(e))a.info(` ${k(x(t))}${" ".repeat(Math.max(1,16-t.length))}${d(r)}`)}a.info(""),a.info(" Remote templates:"),a.info(` ${d("Any npm create-* package:")} vis create vite`),a.info(` ${d("GitHub repository:")} vis create user/repo`),a.info(` ${d("GitLab / Bitbucket:")} vis create gitlab:user/repo`),a.info(` ${d("Full URL:")} vis create https://github.com/user/repo`),a.info(""),a.info(` ${d("Template args after --:")} vis create vite -- --template react-ts`),a.info("")},"listTemplates"),Et=j((e,t,r,i)=>{const n=_(t)===_(e)?"":e;process.stderr.write(`
148
+ `),a.success("Project created successfully!"),process.stderr.write(`
149
+ `),a.notice("Next steps:"),n&&a.info(` cd ${n}`),i||a.info(` ${r} install`),a.info(` ${r} run dev`),process.stderr.write(`
150
+ `)},"printNextSteps"),Gt=j(async({argument:e,logger:t,options:r,rawUnknown:i,visConfig:n,workspaceRoot:u})=>{const p=Array.isArray(e)?e:e?[e]:[],o=n?.create;if(r.list){Dt(o?.templates);return}const l=r.cwd||u||process.cwd(),s=!!u,w=!!process.stdin.isTTY,$=$e(l);let y,h,f,O=o?.defaultEditor,M=o?.gitInit??!1,Y=[],q=$,K=!1;if(p.length===0&&w&&!r.noInteractive){const v=await Ke({cwd:l,defaultEditor:o?.defaultEditor,defaultGitInit:o?.gitInit,defaultPm:o?.defaultPm,inMonorepo:s});y=v.template,h=v.projectName,f=_(l,v.targetDir),O=v.editor??O,M=v.gitInit,K=v.overwrite,v.pm&&(q={name:v.pm,version:$.version})}else{if(p.length===0)throw new Error(`No template specified. Usage: vis create <template> [name] [-- args...]
151
+ Use --list to see available templates, or run interactively in a terminal.`);{let v=[...i??[]];if(v.length===0){const te=process.argv.slice(2),re=te.indexOf("--");re!==-1&&(v=te.slice(re+1))}const C=p.indexOf("--"),me=C===-1?p:p.slice(0,C);Y=[...C===-1?[]:p.slice(C+1),...v],[y,h]=me,!h&&y&&(h=qt(y)),O=r.editor==="vscode"?"vscode":O,M=!!r.gitInit||M}}if(!y)throw new Error("No template specified.");const z=o?.templates?.[y]??y,Q=Te(z,Y);if(!f){const v=s?Ie(Q.type):".",C=We(h??"",_(l,v));f=C.targetDir,h=C.packageName}const X=T(h??"");if(!pe(X))throw new Error(`Invalid project name: "${h}". Use lowercase alphanumeric characters and hyphens.`);h=X;const de=_(f),G=W(_(l),de);if(G===".."||G.startsWith(`..${be}`)||we(G))throw new Error(`Target directory "${f}" is outside the working directory. Use a name without "../" path segments.`);if(!K&&!He(f))throw new Error(`Target directory "${f}" is not empty.
152
+ Use a different name or clear the directory first.`);z!==y&&a.info(`Alias: ${k(x(y))} → ${d(z)}`),a.info(`Template: ${k(x(z))}`),a.info(`Project: ${k(h)}`),a.info(`Target: ${d(f)}`),process.stderr.write(`
153
+ `);const Z=await jt(Q,{createConfig:o,cwd:l,inMonorepo:s,logger:t,pm:q,projectName:h,targetDir:f});if(Z!==0){process.exitCode=Z;return}O==="vscode"&&St(f),P(f)&&Pt(f,q.name),M&&!s&&Nt(f);let ee=!1;o?.install!==!1&&P(c(f,"package.json"))&&(ee=Ot(f,q,t,o?.preferOffline)),Et(f,l,q.name,ee)},"execute");export{Gt as default};