@cmflow/cli 3.4.0-beta.2 → 3.4.0-beta.4

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 (101) hide show
  1. package/dist/bin/cm.mjs +1581 -39146
  2. package/dist/bin/cmrelease.mjs +1414 -38776
  3. package/dist/common-DvEL7rzl.mjs +2 -0
  4. package/dist/common-DvEL7rzl.mjs.map +1 -0
  5. package/dist/{compile-packages-BB08_q2B.mjs → compile-packages-Cd19TaUb.mjs} +2 -2
  6. package/dist/{compile-packages-BB08_q2B.mjs.map → compile-packages-Cd19TaUb.mjs.map} +1 -1
  7. package/dist/{docker-clean-tags-EvFdWykP.mjs → docker-clean-tags-C8fsKmA7.mjs} +2 -2
  8. package/dist/{docker-clean-tags-EvFdWykP.mjs.map → docker-clean-tags-C8fsKmA7.mjs.map} +1 -1
  9. package/dist/docker-nm7ubWPx.mjs +34 -0
  10. package/dist/docker-nm7ubWPx.mjs.map +1 -0
  11. package/dist/{docker-publish-CG0aN9se.mjs → docker-publish-CwInm1oK.mjs} +2 -2
  12. package/dist/{docker-publish-CG0aN9se.mjs.map → docker-publish-CwInm1oK.mjs.map} +1 -1
  13. package/dist/{find-packages-611B-66T.mjs → find-packages-CCoDSkVV.mjs} +10 -10
  14. package/dist/{find-packages-611B-66T.mjs.map → find-packages-CCoDSkVV.mjs.map} +1 -1
  15. package/dist/get-config-D9xSS1Lq.mjs +9 -0
  16. package/dist/{get-config-8ivgd1KC.mjs.map → get-config-D9xSS1Lq.mjs.map} +1 -1
  17. package/dist/index-MmHuVKDa.d.mts +266 -0
  18. package/dist/index.d.mts +2088 -0
  19. package/dist/index.mjs +32 -0
  20. package/dist/index.mjs.map +1 -0
  21. package/dist/{npm-VM_GgazT.mjs → npm-BKRyPuCX.mjs} +2 -2
  22. package/dist/{npm-VM_GgazT.mjs.map → npm-BKRyPuCX.mjs.map} +1 -1
  23. package/dist/rolldown-runtime-Csi-cuKc.mjs +1 -0
  24. package/dist/semantic/core/analyze-commits.d.mts +6 -0
  25. package/dist/semantic/core/analyze-commits.mjs +2 -0
  26. package/dist/semantic/core/analyze-commits.mjs.map +1 -0
  27. package/dist/semantic/core/conditional.d.mts +15 -0
  28. package/dist/semantic/core/conditional.mjs +2 -0
  29. package/dist/semantic/core/conditional.mjs.map +1 -0
  30. package/dist/semantic/core/exit.d.mts +6 -0
  31. package/dist/semantic/core/exit.mjs +2 -0
  32. package/dist/semantic/core/exit.mjs.map +1 -0
  33. package/dist/semantic/core/prepare/artifacts.d.mts +6 -0
  34. package/dist/semantic/core/prepare/artifacts.mjs +2 -0
  35. package/dist/semantic/core/prepare/artifacts.mjs.map +1 -0
  36. package/dist/semantic/core/prepare/bump-version.d.mts +6 -0
  37. package/dist/semantic/core/prepare/bump-version.mjs +2 -0
  38. package/dist/semantic/core/prepare/bump-version.mjs.map +1 -0
  39. package/dist/semantic/core/prepare/commit.d.mts +6 -0
  40. package/dist/semantic/core/prepare/commit.mjs +2 -0
  41. package/dist/semantic/core/prepare/commit.mjs.map +1 -0
  42. package/dist/semantic/core/prepare/release-info.d.mts +8 -0
  43. package/dist/semantic/core/prepare/release-info.mjs +2 -0
  44. package/dist/semantic/core/prepare/release-info.mjs.map +1 -0
  45. package/dist/semantic/core/publish-packages.d.mts +10 -0
  46. package/dist/semantic/core/publish-packages.mjs +5 -0
  47. package/dist/semantic/core/publish-packages.mjs.map +1 -0
  48. package/dist/semantic/core/push-release.d.mts +7 -0
  49. package/dist/semantic/core/push-release.mjs +2 -0
  50. package/dist/semantic/core/push-release.mjs.map +1 -0
  51. package/dist/semantic/core/run.d.mts +13 -0
  52. package/dist/semantic/core/run.mjs +2 -0
  53. package/dist/semantic/core/run.mjs.map +1 -0
  54. package/dist/semantic/core/sync-repository.d.mts +6 -0
  55. package/dist/semantic/core/sync-repository.mjs +2 -0
  56. package/dist/semantic/core/sync-repository.mjs.map +1 -0
  57. package/dist/semantic/core/verify-conditions.d.mts +6 -0
  58. package/dist/semantic/core/verify-conditions.mjs +2 -0
  59. package/dist/semantic/core/verify-conditions.mjs.map +1 -0
  60. package/dist/semantic/core/verify-release.d.mts +6 -0
  61. package/dist/semantic/core/verify-release.mjs +2 -0
  62. package/dist/semantic/core/verify-release.mjs.map +1 -0
  63. package/dist/semantic/docker/publish.d.mts +6 -0
  64. package/dist/semantic/docker/publish.mjs +2 -0
  65. package/dist/semantic/docker/publish.mjs.map +1 -0
  66. package/dist/semantic/docker/success.d.mts +6 -0
  67. package/dist/semantic/docker/success.mjs +2 -0
  68. package/dist/semantic/docker/success.mjs.map +1 -0
  69. package/dist/semver-Bgw8dAW8.mjs +2 -0
  70. package/dist/{semver-DFjVbN1S.mjs.map → semver-Bgw8dAW8.mjs.map} +1 -1
  71. package/dist/source-CHDdP5eQ.mjs +7 -0
  72. package/dist/{source-CwLcYLzI.mjs.map → source-CHDdP5eQ.mjs.map} +1 -1
  73. package/dist/{write-package-cxki9d3K.mjs → write-package-z7IDmENp.mjs} +6 -6
  74. package/dist/{write-package-cxki9d3K.mjs.map → write-package-z7IDmENp.mjs.map} +1 -1
  75. package/dist/{write-packages-CxCAl_AG.mjs → write-packages--jWqJCd-.mjs} +2 -2
  76. package/dist/{write-packages-CxCAl_AG.mjs.map → write-packages--jWqJCd-.mjs.map} +1 -1
  77. package/package.json +17 -8
  78. package/dist/cli-truncate-Bi2MjGwF.mjs +0 -323
  79. package/dist/cli-truncate-DMcpM5Q7.mjs +0 -2
  80. package/dist/cli-truncate-DMcpM5Q7.mjs.map +0 -1
  81. package/dist/cli-truncate-DsW0mgI_.mjs +0 -323
  82. package/dist/common-BdfXquG0.mjs +0 -61
  83. package/dist/common-BdfXquG0.mjs.map +0 -1
  84. package/dist/docker-Cc30aRzl.mjs +0 -34
  85. package/dist/docker-Cc30aRzl.mjs.map +0 -1
  86. package/dist/get-config-8ivgd1KC.mjs +0 -9
  87. package/dist/get-east-asian-width-Tfn8qoqd.mjs +0 -2
  88. package/dist/get-east-asian-width-Tfn8qoqd.mjs.map +0 -1
  89. package/dist/get-east-asian-width-wiVWCFXf.mjs +0 -682
  90. package/dist/log-update-CLbF3iV6.mjs +0 -6
  91. package/dist/log-update-CLbF3iV6.mjs.map +0 -1
  92. package/dist/log-update-CTXRtajW.mjs +0 -668
  93. package/dist/log-update-Dy1vPMGY.mjs +0 -668
  94. package/dist/rolldown-runtime-B4iAMlE-.mjs +0 -35
  95. package/dist/semver-DFjVbN1S.mjs +0 -2
  96. package/dist/source-CwLcYLzI.mjs +0 -7
  97. package/dist/wrap-ansi-9ugahFCy.mjs +0 -9
  98. package/dist/wrap-ansi-9ugahFCy.mjs.map +0 -1
  99. package/dist/wrap-ansi-BRr0GA6g.mjs +0 -330
  100. package/dist/wrap-ansi-Cupoo4Yg.mjs +0 -330
  101. package/dist/wrap-ansi-dwgEjNWf.mjs +0 -2
@@ -1,682 +0,0 @@
1
- //#region ../../node_modules/ansi-regex/index.js
2
- function ansiRegex({ onlyFirst = false } = {}) {
3
- return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
4
- }
5
- const ambiguousRanges = [
6
- 161,
7
- 161,
8
- 164,
9
- 164,
10
- 167,
11
- 168,
12
- 170,
13
- 170,
14
- 173,
15
- 174,
16
- 176,
17
- 180,
18
- 182,
19
- 186,
20
- 188,
21
- 191,
22
- 198,
23
- 198,
24
- 208,
25
- 208,
26
- 215,
27
- 216,
28
- 222,
29
- 225,
30
- 230,
31
- 230,
32
- 232,
33
- 234,
34
- 236,
35
- 237,
36
- 240,
37
- 240,
38
- 242,
39
- 243,
40
- 247,
41
- 250,
42
- 252,
43
- 252,
44
- 254,
45
- 254,
46
- 257,
47
- 257,
48
- 273,
49
- 273,
50
- 275,
51
- 275,
52
- 283,
53
- 283,
54
- 294,
55
- 295,
56
- 299,
57
- 299,
58
- 305,
59
- 307,
60
- 312,
61
- 312,
62
- 319,
63
- 322,
64
- 324,
65
- 324,
66
- 328,
67
- 331,
68
- 333,
69
- 333,
70
- 338,
71
- 339,
72
- 358,
73
- 359,
74
- 363,
75
- 363,
76
- 462,
77
- 462,
78
- 464,
79
- 464,
80
- 466,
81
- 466,
82
- 468,
83
- 468,
84
- 470,
85
- 470,
86
- 472,
87
- 472,
88
- 474,
89
- 474,
90
- 476,
91
- 476,
92
- 593,
93
- 593,
94
- 609,
95
- 609,
96
- 708,
97
- 708,
98
- 711,
99
- 711,
100
- 713,
101
- 715,
102
- 717,
103
- 717,
104
- 720,
105
- 720,
106
- 728,
107
- 731,
108
- 733,
109
- 733,
110
- 735,
111
- 735,
112
- 768,
113
- 879,
114
- 913,
115
- 929,
116
- 931,
117
- 937,
118
- 945,
119
- 961,
120
- 963,
121
- 969,
122
- 1025,
123
- 1025,
124
- 1040,
125
- 1103,
126
- 1105,
127
- 1105,
128
- 8208,
129
- 8208,
130
- 8211,
131
- 8214,
132
- 8216,
133
- 8217,
134
- 8220,
135
- 8221,
136
- 8224,
137
- 8226,
138
- 8228,
139
- 8231,
140
- 8240,
141
- 8240,
142
- 8242,
143
- 8243,
144
- 8245,
145
- 8245,
146
- 8251,
147
- 8251,
148
- 8254,
149
- 8254,
150
- 8308,
151
- 8308,
152
- 8319,
153
- 8319,
154
- 8321,
155
- 8324,
156
- 8364,
157
- 8364,
158
- 8451,
159
- 8451,
160
- 8453,
161
- 8453,
162
- 8457,
163
- 8457,
164
- 8467,
165
- 8467,
166
- 8470,
167
- 8470,
168
- 8481,
169
- 8482,
170
- 8486,
171
- 8486,
172
- 8491,
173
- 8491,
174
- 8531,
175
- 8532,
176
- 8539,
177
- 8542,
178
- 8544,
179
- 8555,
180
- 8560,
181
- 8569,
182
- 8585,
183
- 8585,
184
- 8592,
185
- 8601,
186
- 8632,
187
- 8633,
188
- 8658,
189
- 8658,
190
- 8660,
191
- 8660,
192
- 8679,
193
- 8679,
194
- 8704,
195
- 8704,
196
- 8706,
197
- 8707,
198
- 8711,
199
- 8712,
200
- 8715,
201
- 8715,
202
- 8719,
203
- 8719,
204
- 8721,
205
- 8721,
206
- 8725,
207
- 8725,
208
- 8730,
209
- 8730,
210
- 8733,
211
- 8736,
212
- 8739,
213
- 8739,
214
- 8741,
215
- 8741,
216
- 8743,
217
- 8748,
218
- 8750,
219
- 8750,
220
- 8756,
221
- 8759,
222
- 8764,
223
- 8765,
224
- 8776,
225
- 8776,
226
- 8780,
227
- 8780,
228
- 8786,
229
- 8786,
230
- 8800,
231
- 8801,
232
- 8804,
233
- 8807,
234
- 8810,
235
- 8811,
236
- 8814,
237
- 8815,
238
- 8834,
239
- 8835,
240
- 8838,
241
- 8839,
242
- 8853,
243
- 8853,
244
- 8857,
245
- 8857,
246
- 8869,
247
- 8869,
248
- 8895,
249
- 8895,
250
- 8978,
251
- 8978,
252
- 9312,
253
- 9449,
254
- 9451,
255
- 9547,
256
- 9552,
257
- 9587,
258
- 9600,
259
- 9615,
260
- 9618,
261
- 9621,
262
- 9632,
263
- 9633,
264
- 9635,
265
- 9641,
266
- 9650,
267
- 9651,
268
- 9654,
269
- 9655,
270
- 9660,
271
- 9661,
272
- 9664,
273
- 9665,
274
- 9670,
275
- 9672,
276
- 9675,
277
- 9675,
278
- 9678,
279
- 9681,
280
- 9698,
281
- 9701,
282
- 9711,
283
- 9711,
284
- 9733,
285
- 9734,
286
- 9737,
287
- 9737,
288
- 9742,
289
- 9743,
290
- 9756,
291
- 9756,
292
- 9758,
293
- 9758,
294
- 9792,
295
- 9792,
296
- 9794,
297
- 9794,
298
- 9824,
299
- 9825,
300
- 9827,
301
- 9829,
302
- 9831,
303
- 9834,
304
- 9836,
305
- 9837,
306
- 9839,
307
- 9839,
308
- 9886,
309
- 9887,
310
- 9919,
311
- 9919,
312
- 9926,
313
- 9933,
314
- 9935,
315
- 9939,
316
- 9941,
317
- 9953,
318
- 9955,
319
- 9955,
320
- 9960,
321
- 9961,
322
- 9963,
323
- 9969,
324
- 9972,
325
- 9972,
326
- 9974,
327
- 9977,
328
- 9979,
329
- 9980,
330
- 9982,
331
- 9983,
332
- 10045,
333
- 10045,
334
- 10102,
335
- 10111,
336
- 11094,
337
- 11097,
338
- 12872,
339
- 12879,
340
- 57344,
341
- 63743,
342
- 65024,
343
- 65039,
344
- 65533,
345
- 65533,
346
- 127232,
347
- 127242,
348
- 127248,
349
- 127277,
350
- 127280,
351
- 127337,
352
- 127344,
353
- 127373,
354
- 127375,
355
- 127376,
356
- 127387,
357
- 127404,
358
- 917760,
359
- 917999,
360
- 983040,
361
- 1048573,
362
- 1048576,
363
- 1114109
364
- ];
365
- const fullwidthRanges = [
366
- 12288,
367
- 12288,
368
- 65281,
369
- 65376,
370
- 65504,
371
- 65510
372
- ];
373
- const wideRanges = [
374
- 4352,
375
- 4447,
376
- 8986,
377
- 8987,
378
- 9001,
379
- 9002,
380
- 9193,
381
- 9196,
382
- 9200,
383
- 9200,
384
- 9203,
385
- 9203,
386
- 9725,
387
- 9726,
388
- 9748,
389
- 9749,
390
- 9776,
391
- 9783,
392
- 9800,
393
- 9811,
394
- 9855,
395
- 9855,
396
- 9866,
397
- 9871,
398
- 9875,
399
- 9875,
400
- 9889,
401
- 9889,
402
- 9898,
403
- 9899,
404
- 9917,
405
- 9918,
406
- 9924,
407
- 9925,
408
- 9934,
409
- 9934,
410
- 9940,
411
- 9940,
412
- 9962,
413
- 9962,
414
- 9970,
415
- 9971,
416
- 9973,
417
- 9973,
418
- 9978,
419
- 9978,
420
- 9981,
421
- 9981,
422
- 9989,
423
- 9989,
424
- 9994,
425
- 9995,
426
- 10024,
427
- 10024,
428
- 10060,
429
- 10060,
430
- 10062,
431
- 10062,
432
- 10067,
433
- 10069,
434
- 10071,
435
- 10071,
436
- 10133,
437
- 10135,
438
- 10160,
439
- 10160,
440
- 10175,
441
- 10175,
442
- 11035,
443
- 11036,
444
- 11088,
445
- 11088,
446
- 11093,
447
- 11093,
448
- 11904,
449
- 11929,
450
- 11931,
451
- 12019,
452
- 12032,
453
- 12245,
454
- 12272,
455
- 12287,
456
- 12289,
457
- 12350,
458
- 12353,
459
- 12438,
460
- 12441,
461
- 12543,
462
- 12549,
463
- 12591,
464
- 12593,
465
- 12686,
466
- 12688,
467
- 12773,
468
- 12783,
469
- 12830,
470
- 12832,
471
- 12871,
472
- 12880,
473
- 42124,
474
- 42128,
475
- 42182,
476
- 43360,
477
- 43388,
478
- 44032,
479
- 55203,
480
- 63744,
481
- 64255,
482
- 65040,
483
- 65049,
484
- 65072,
485
- 65106,
486
- 65108,
487
- 65126,
488
- 65128,
489
- 65131,
490
- 94176,
491
- 94180,
492
- 94192,
493
- 94198,
494
- 94208,
495
- 101589,
496
- 101631,
497
- 101662,
498
- 101760,
499
- 101874,
500
- 110576,
501
- 110579,
502
- 110581,
503
- 110587,
504
- 110589,
505
- 110590,
506
- 110592,
507
- 110882,
508
- 110898,
509
- 110898,
510
- 110928,
511
- 110930,
512
- 110933,
513
- 110933,
514
- 110948,
515
- 110951,
516
- 110960,
517
- 111355,
518
- 119552,
519
- 119638,
520
- 119648,
521
- 119670,
522
- 126980,
523
- 126980,
524
- 127183,
525
- 127183,
526
- 127374,
527
- 127374,
528
- 127377,
529
- 127386,
530
- 127488,
531
- 127490,
532
- 127504,
533
- 127547,
534
- 127552,
535
- 127560,
536
- 127568,
537
- 127569,
538
- 127584,
539
- 127589,
540
- 127744,
541
- 127776,
542
- 127789,
543
- 127797,
544
- 127799,
545
- 127868,
546
- 127870,
547
- 127891,
548
- 127904,
549
- 127946,
550
- 127951,
551
- 127955,
552
- 127968,
553
- 127984,
554
- 127988,
555
- 127988,
556
- 127992,
557
- 128062,
558
- 128064,
559
- 128064,
560
- 128066,
561
- 128252,
562
- 128255,
563
- 128317,
564
- 128331,
565
- 128334,
566
- 128336,
567
- 128359,
568
- 128378,
569
- 128378,
570
- 128405,
571
- 128406,
572
- 128420,
573
- 128420,
574
- 128507,
575
- 128591,
576
- 128640,
577
- 128709,
578
- 128716,
579
- 128716,
580
- 128720,
581
- 128722,
582
- 128725,
583
- 128728,
584
- 128732,
585
- 128735,
586
- 128747,
587
- 128748,
588
- 128756,
589
- 128764,
590
- 128992,
591
- 129003,
592
- 129008,
593
- 129008,
594
- 129292,
595
- 129338,
596
- 129340,
597
- 129349,
598
- 129351,
599
- 129535,
600
- 129648,
601
- 129660,
602
- 129664,
603
- 129674,
604
- 129678,
605
- 129734,
606
- 129736,
607
- 129736,
608
- 129741,
609
- 129756,
610
- 129759,
611
- 129770,
612
- 129775,
613
- 129784,
614
- 131072,
615
- 196605,
616
- 196608,
617
- 262141
618
- ];
619
- //#endregion
620
- //#region ../../node_modules/get-east-asian-width/utilities.js
621
- /**
622
- Binary search on a sorted flat array of [start, end] pairs.
623
-
624
- @param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].
625
- @param {number} codePoint - The value to search for.
626
- @returns {boolean} Whether the value falls within any of the ranges.
627
- */
628
- const isInRange = (ranges, codePoint) => {
629
- let low = 0;
630
- let high = Math.floor(ranges.length / 2) - 1;
631
- while (low <= high) {
632
- const mid = Math.floor((low + high) / 2);
633
- const i = mid * 2;
634
- if (codePoint < ranges[i]) high = mid - 1;
635
- else if (codePoint > ranges[i + 1]) low = mid + 1;
636
- else return true;
637
- }
638
- return false;
639
- };
640
- //#endregion
641
- //#region ../../node_modules/get-east-asian-width/lookup.js
642
- const commonCjkCodePoint = 19968;
643
- const [wideFastPathStart, wideFastPathEnd] = /* #__PURE__ */ findWideFastPathRange(wideRanges);
644
- function findWideFastPathRange(ranges) {
645
- let fastPathStart = ranges[0];
646
- let fastPathEnd = ranges[1];
647
- for (let index = 0; index < ranges.length; index += 2) {
648
- const start = ranges[index];
649
- const end = ranges[index + 1];
650
- if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) return [start, end];
651
- if (end - start > fastPathEnd - fastPathStart) {
652
- fastPathStart = start;
653
- fastPathEnd = end;
654
- }
655
- }
656
- return [fastPathStart, fastPathEnd];
657
- }
658
- const isAmbiguous = (codePoint) => {
659
- if (codePoint < 161 || codePoint > 1114109) return false;
660
- return isInRange(ambiguousRanges, codePoint);
661
- };
662
- const isFullWidth = (codePoint) => {
663
- if (codePoint < 12288 || codePoint > 65510) return false;
664
- return isInRange(fullwidthRanges, codePoint);
665
- };
666
- const isWide = (codePoint) => {
667
- if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) return true;
668
- if (codePoint < 4352 || codePoint > 262141) return false;
669
- return isInRange(wideRanges, codePoint);
670
- };
671
- //#endregion
672
- //#region ../../node_modules/get-east-asian-width/index.js
673
- function validate(codePoint) {
674
- if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
675
- }
676
- function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
677
- validate(codePoint);
678
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
679
- return 1;
680
- }
681
- //#endregion
682
- export { ansiRegex as i, isFullWidth as n, isWide as r, eastAsianWidth as t };
@@ -1,6 +0,0 @@
1
- import{i as e,n as t,r as n}from"./get-east-asian-width-Tfn8qoqd.mjs";import r from"./wrap-ansi-9ugahFCy.mjs";import i from"node:process";import a from"node:os";const o=globalThis.window?.document!==void 0;globalThis.process?.versions?.node,globalThis.process?.versions?.bun,globalThis.Deno?.version?.deno,globalThis.process?.versions?.electron,globalThis.navigator?.userAgent?.includes(`jsdom`),typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,typeof DedicatedWorkerGlobalScope<`u`&&globalThis instanceof DedicatedWorkerGlobalScope,typeof SharedWorkerGlobalScope<`u`&&globalThis instanceof SharedWorkerGlobalScope,typeof ServiceWorkerGlobalScope<`u`&&globalThis instanceof ServiceWorkerGlobalScope;const s=globalThis.navigator?.userAgentData?.platform;s===`macOS`||globalThis.navigator?.platform===`MacIntel`||globalThis.navigator?.userAgent?.includes(` Mac `)===!0||globalThis.process?.platform,s===`Windows`||globalThis.navigator?.platform===`Win32`||globalThis.process?.platform,s===`Linux`||globalThis.navigator?.platform?.startsWith(`Linux`)===!0||globalThis.navigator?.userAgent?.includes(` Linux `)===!0||globalThis.process?.platform,s===`iOS`||globalThis.navigator?.platform===`MacIntel`&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),s===`Android`||globalThis.navigator?.platform===`Android`||globalThis.navigator?.userAgent?.includes(` Android `)===!0||globalThis.process?.platform,!o&&i.env.TERM_PROGRAM;const c=!o&&i.platform===`win32`;!o&&(i.env.TERM?.startsWith(`screen`)||i.env.TERM?.startsWith(`tmux`)||i.env.TMUX),o||i.cwd;const l=(e=1)=>`\x1B[`+e+`A`,u=e=>{let t=``;for(let n=0;n<e;n++)t+=d+(n<e-1?l():``);return e&&(t+=`\x1B[G`),t},d=`\x1B[2K`;(()=>{if(o||!c)return!1;let e=a.release().split(`.`),t=Number(e[0]),n=Number(e[2]??0);return t<10||t===10&&n<10586})();const ee=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!f(i,a)&&r||Object.defineProperty(e,n,a)},f=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},p=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},m=(e,t)=>`/* Wrapped ${e}*/\n${t}`,h=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),te=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),g=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=m.bind(null,r,t.toString());Object.defineProperty(i,"name",te);let{writable:a,enumerable:o,configurable:s}=h;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function _(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))ee(e,t,r,n);return p(e,t),g(e,t,r),e}const v=new WeakMap,y=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let n,r=0,i=e.displayName||e.name||`<anonymous>`,a=function(...o){if(v.set(a,++r),r===1)n=e.apply(this,o),e=void 0;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return n};return _(a,e),v.set(a,r),a};y.callCount=e=>{if(!v.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return v.get(e)};const b=[];b.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&b.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&b.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const x=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,S=Symbol.for(`signal-exit emitter`),C=globalThis,w=Object.defineProperty.bind(Object);var T=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(C[S])return C[S];w(C,S,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},E=class{};const D=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var ne=class extends E{onExit(){return()=>{}}load(){}unload(){}},re=class extends E{#e=O.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new T;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of b)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!x(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of b)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,b.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return x(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&x(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}};const O=globalThis.process,{onExit:k,load:ie,unload:ae}=D(x(O)?new re(O):new ne),A=i.stderr.isTTY?i.stderr:i.stdout.isTTY?i.stdout:void 0,j=A?y(()=>{k(()=>{A.write(`\x1B[?25h`)},{alwaysLast:!0})}):()=>{};let M=!1;const N={};N.show=(e=i.stderr)=>{e.isTTY&&(M=!1,e.write(`\x1B[?25h`))},N.hide=(e=i.stderr)=>{e.isTTY&&(j(),M=!0,e.write(`\x1B[?25l`))},N.toggle=(e,t)=>{e!==void 0&&(M=e),M?N.show(t):N.hide(t)};const P=(e=0)=>t=>`\u001B[${t+e}m`,F=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,I=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,L={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(L.modifier);const R=Object.keys(L.color),z=Object.keys(L.bgColor);[...R,...z];function B(){let e=new Map;for(let[t,n]of Object.entries(L)){for(let[t,r]of Object.entries(n))L[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=L[t],e.set(r[0],r[1]);Object.defineProperty(L,t,{value:n,enumerable:!1})}return Object.defineProperty(L,"codes",{value:e,enumerable:!1}),L.color.close=`\x1B[39m`,L.bgColor.close=`\x1B[49m`,L.color.ansi=P(),L.color.ansi256=F(),L.color.ansi16m=I(),L.bgColor.ansi=P(10),L.bgColor.ansi256=F(10),L.bgColor.ansi16m=I(10),Object.defineProperties(L,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>L.rgbToAnsi256(...L.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>L.ansi256ToAnsi(L.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>L.ansi256ToAnsi(L.hexToAnsi256(e)),enumerable:!1}}),L}const V=B();function oe(e){return Number.isInteger(e)?t(e)||n(e):!1}const H=new Set([27,155]),U=`0`.codePointAt(0),W=`9`.codePointAt(0),G=new Set,K=new Map;for(let[e,t]of V.codes)G.add(V.color.ansi(t)),K.set(V.color.ansi(e),V.color.ansi(t));function q(e){if(G.has(e))return e;if(K.has(e))return K.get(e);e=e.slice(2),e.includes(`;`)&&(e=e[0]+`0`);let t=V.codes.get(Number.parseInt(e,10));return t?V.color.ansi(t):V.reset.open}function J(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(n>=U&&n<=W)return t}return-1}function Y(e,t){e=e.slice(t,t+19);let n=J(e);if(n!==-1){let t=e.indexOf(`m`,n);return t===-1&&(t=e.length),e.slice(0,t+1)}}function se(e,t=1/0){let n=[],r=0,i=0;for(;r<e.length;){let a=e.codePointAt(r);if(H.has(a)){let t=Y(e,r);if(t){n.push({type:`ansi`,code:t,endCode:q(t)}),r+=t.length;continue}}let o=oe(a),s=String.fromCodePoint(a);if(n.push({type:`character`,value:s,isFullWidth:o}),r+=s.length,i+=o?2:s.length,i>=t)break}return n}function X(e){let t=[];for(let n of e)n.code===V.reset.open?t=[]:G.has(n.code)?t=t.filter(e=>e.endCode!==n.code):(t=t.filter(e=>e.endCode!==n.endCode),t.push(n));return t}function Z(e){return X(e).map(({endCode:e})=>e).reverse().join(``)}function ce(e,t,n){let r=se(e,n),i=[],a=0,o=``,s=!1;for(let e of r){if(n!==void 0&&a>=n)break;e.type===`ansi`?(i.push(e),s&&(o+=e.code)):(!s&&a>=t&&(s=!0,i=X(i),o=i.map(({code:e})=>e).join(``)),s&&(o+=e.value),a+=e.isFullWidth?2:e.value.length)}return o+=Z(i),o}const le=e();function ue(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(le,``)}const Q=({columns:e=80})=>e,de=(e,t)=>{let n=e.rows??24,r=t.split(`
2
- `),i=Math.max(0,r.length-n);return i?ce(t,ue(r.slice(0,i).join(`
3
- `)).length+1):t};function $(e,{showCursor:t=!1}={}){let n=0,i=Q(e),a=``,o=()=>{a=``,i=Q(e),n=0},s=(...o)=>{t||N.hide();let s=de(e,o.join(` `)+`
4
- `),c=Q(e);(s!==a||i!==c)&&(a=s,i=c,s=r(s,c,{trim:!1,hard:!0,wordWrap:!1}),e.write(u(n)+s),n=s.split(`
5
- `).length)};return s.clear=()=>{e.write(u(n)),o()},s.done=()=>{o(),t||N.show()},s}$(i.stdout),$(i.stderr);export{$ as createLogUpdate};
6
- //# sourceMappingURL=log-update-CLbF3iV6.mjs.map