standard-log-color 3.2.3 → 5.0.0

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 (302) hide show
  1. package/LICENSE +1 -1
  2. package/{lib → cjs}/ansi/adjustCodes.d.ts +0 -0
  3. package/cjs/ansi/adjustCodes.d.ts.map +1 -0
  4. package/cjs/ansi/adjustCodes.js +24 -0
  5. package/cjs/ansi/adjustCodes.js.map +1 -0
  6. package/cjs/ansi/adjustCodes.spec.d.ts +2 -0
  7. package/cjs/ansi/adjustCodes.spec.d.ts.map +1 -0
  8. package/cjs/ansi/adjustCodes.spec.js +13 -0
  9. package/cjs/ansi/adjustCodes.spec.js.map +1 -0
  10. package/{lib → cjs}/ansi/ansiFormatter.d.ts +0 -0
  11. package/cjs/ansi/ansiFormatter.d.ts.map +1 -0
  12. package/cjs/ansi/ansiFormatter.js +47 -0
  13. package/cjs/ansi/ansiFormatter.js.map +1 -0
  14. package/{lib → cjs}/ansi/constants.d.ts +0 -0
  15. package/cjs/ansi/constants.d.ts.map +1 -0
  16. package/{lib → cjs}/ansi/constants.js +0 -0
  17. package/cjs/ansi/constants.js.map +1 -0
  18. package/{lib → cjs}/ansi/createColorCodes.d.ts +0 -0
  19. package/cjs/ansi/createColorCodes.d.ts.map +1 -0
  20. package/cjs/ansi/createColorCodes.js +49 -0
  21. package/cjs/ansi/createColorCodes.js.map +1 -0
  22. package/cjs/ansi/createColorCodes.spec.d.ts +2 -0
  23. package/cjs/ansi/createColorCodes.spec.d.ts.map +1 -0
  24. package/cjs/ansi/createColorCodes.spec.js +34 -0
  25. package/cjs/ansi/createColorCodes.spec.js.map +1 -0
  26. package/cjs/ansi/index.d.ts +4 -0
  27. package/cjs/ansi/index.d.ts.map +1 -0
  28. package/cjs/ansi/index.js +20 -0
  29. package/cjs/ansi/index.js.map +1 -0
  30. package/{lib → cjs}/ansi/isColor.d.ts +1 -1
  31. package/cjs/ansi/isColor.d.ts.map +1 -0
  32. package/cjs/ansi/isColor.js +13 -0
  33. package/cjs/ansi/isColor.js.map +1 -0
  34. package/cjs/ansi/isColor.spec.d.ts +2 -0
  35. package/cjs/ansi/isColor.spec.d.ts.map +1 -0
  36. package/cjs/ansi/isColor.spec.js +17 -0
  37. package/cjs/ansi/isColor.spec.js.map +1 -0
  38. package/{lib → cjs}/ansi/wrapAnsi.d.ts +0 -0
  39. package/cjs/ansi/wrapAnsi.d.ts.map +1 -0
  40. package/{lib → cjs}/ansi/wrapAnsi.js +2 -2
  41. package/cjs/ansi/wrapAnsi.js.map +1 -0
  42. package/cjs/ansi/wrapAnsi.spec.d.ts +2 -0
  43. package/cjs/ansi/wrapAnsi.spec.d.ts.map +1 -0
  44. package/cjs/ansi/wrapAnsi.spec.js +9 -0
  45. package/cjs/ansi/wrapAnsi.spec.js.map +1 -0
  46. package/{lib → cjs}/createColorLogReporter.browser.d.ts +0 -0
  47. package/cjs/createColorLogReporter.browser.d.ts.map +1 -0
  48. package/{lib → cjs}/createColorLogReporter.browser.js +5 -5
  49. package/cjs/createColorLogReporter.browser.js.map +1 -0
  50. package/{lib → cjs}/createColorLogReporter.d.ts +0 -0
  51. package/cjs/createColorLogReporter.d.ts.map +1 -0
  52. package/{lib → cjs}/createColorLogReporter.js +5 -5
  53. package/cjs/createColorLogReporter.js.map +1 -0
  54. package/cjs/createColorLogReporter.spec.d.ts +2 -0
  55. package/cjs/createColorLogReporter.spec.d.ts.map +1 -0
  56. package/cjs/createColorLogReporter.spec.js +178 -0
  57. package/cjs/createColorLogReporter.spec.js.map +1 -0
  58. package/{lib → cjs}/css/colors.d.ts +0 -0
  59. package/cjs/css/colors.d.ts.map +1 -0
  60. package/{lib → cjs}/css/colors.js +0 -0
  61. package/cjs/css/colors.js.map +1 -0
  62. package/{lib → cjs}/css/cssFormatter.d.ts +0 -0
  63. package/cjs/css/cssFormatter.d.ts.map +1 -0
  64. package/{lib → cjs}/css/cssFormatter.js +22 -14
  65. package/cjs/css/cssFormatter.js.map +1 -0
  66. package/cjs/css/cssFormatter.spec.d.ts +2 -0
  67. package/cjs/css/cssFormatter.spec.d.ts.map +1 -0
  68. package/cjs/css/cssFormatter.spec.js +33 -0
  69. package/cjs/css/cssFormatter.spec.js.map +1 -0
  70. package/cjs/css/index.d.ts +2 -0
  71. package/cjs/css/index.d.ts.map +1 -0
  72. package/cjs/css/index.js +18 -0
  73. package/cjs/css/index.js.map +1 -0
  74. package/cjs/index.d.ts +4 -0
  75. package/cjs/index.d.ts.map +1 -0
  76. package/cjs/index.js +20 -0
  77. package/cjs/index.js.map +1 -0
  78. package/cjs/package.json +3 -0
  79. package/cjs/utils/index.d.ts +2 -0
  80. package/cjs/utils/index.d.ts.map +1 -0
  81. package/cjs/utils/index.js +18 -0
  82. package/cjs/utils/index.js.map +1 -0
  83. package/{lib → cjs}/utils/supportColor.browser.d.ts +0 -0
  84. package/cjs/utils/supportColor.browser.d.ts.map +1 -0
  85. package/{lib → cjs}/utils/supportColor.browser.js +3 -0
  86. package/cjs/utils/supportColor.browser.js.map +1 -0
  87. package/{lib → cjs}/utils/supportColor.d.ts +0 -0
  88. package/cjs/utils/supportColor.d.ts.map +1 -0
  89. package/{lib → cjs}/utils/supportColor.js +0 -0
  90. package/cjs/utils/supportColor.js.map +1 -0
  91. package/dist/standard-log-color.es5.js +2 -0
  92. package/dist/standard-log-color.es5.js.gz +0 -0
  93. package/dist/standard-log-color.es5.js.map +1 -0
  94. package/dist/standard-log-color.es5.js.map.gz +0 -0
  95. package/dist/standard-log-color.esm.js +2 -0
  96. package/dist/standard-log-color.esm.js.gz +0 -0
  97. package/dist/standard-log-color.esm.js.map +1 -0
  98. package/dist/standard-log-color.esm.js.map.gz +0 -0
  99. package/{libm → esm}/ansi/adjustCodes.d.ts +0 -0
  100. package/esm/ansi/adjustCodes.d.ts.map +1 -0
  101. package/{libm → esm}/ansi/adjustCodes.js +1 -1
  102. package/esm/ansi/adjustCodes.js.map +1 -0
  103. package/esm/ansi/adjustCodes.spec.d.ts +2 -0
  104. package/esm/ansi/adjustCodes.spec.d.ts.map +1 -0
  105. package/esm/ansi/adjustCodes.spec.js +11 -0
  106. package/esm/ansi/adjustCodes.spec.js.map +1 -0
  107. package/{libm → esm}/ansi/ansiFormatter.d.ts +0 -0
  108. package/esm/ansi/ansiFormatter.d.ts.map +1 -0
  109. package/{libm → esm}/ansi/ansiFormatter.js +4 -4
  110. package/esm/ansi/ansiFormatter.js.map +1 -0
  111. package/{libm → esm}/ansi/constants.d.ts +0 -0
  112. package/esm/ansi/constants.d.ts.map +1 -0
  113. package/{libm → esm}/ansi/constants.js +0 -0
  114. package/esm/ansi/constants.js.map +1 -0
  115. package/{libm → esm}/ansi/createColorCodes.d.ts +0 -0
  116. package/esm/ansi/createColorCodes.d.ts.map +1 -0
  117. package/{libm → esm}/ansi/createColorCodes.js +2 -2
  118. package/esm/ansi/createColorCodes.js.map +1 -0
  119. package/esm/ansi/createColorCodes.spec.d.ts +2 -0
  120. package/esm/ansi/createColorCodes.spec.d.ts.map +1 -0
  121. package/esm/ansi/createColorCodes.spec.js +32 -0
  122. package/esm/ansi/createColorCodes.spec.js.map +1 -0
  123. package/esm/ansi/index.d.ts +4 -0
  124. package/esm/ansi/index.d.ts.map +1 -0
  125. package/esm/ansi/index.js +4 -0
  126. package/esm/ansi/index.js.map +1 -0
  127. package/{libm → esm}/ansi/isColor.d.ts +1 -1
  128. package/esm/ansi/isColor.d.ts.map +1 -0
  129. package/{libm → esm}/ansi/isColor.js +1 -1
  130. package/esm/ansi/isColor.js.map +1 -0
  131. package/esm/ansi/isColor.spec.d.ts +2 -0
  132. package/esm/ansi/isColor.spec.d.ts.map +1 -0
  133. package/esm/ansi/isColor.spec.js +15 -0
  134. package/esm/ansi/isColor.spec.js.map +1 -0
  135. package/{libm → esm}/ansi/wrapAnsi.d.ts +0 -0
  136. package/esm/ansi/wrapAnsi.d.ts.map +1 -0
  137. package/{libm → esm}/ansi/wrapAnsi.js +0 -0
  138. package/esm/ansi/wrapAnsi.js.map +1 -0
  139. package/esm/ansi/wrapAnsi.spec.d.ts +2 -0
  140. package/esm/ansi/wrapAnsi.spec.d.ts.map +1 -0
  141. package/esm/ansi/wrapAnsi.spec.js +7 -0
  142. package/esm/ansi/wrapAnsi.spec.js.map +1 -0
  143. package/{libm → esm}/createColorLogReporter.browser.d.ts +0 -0
  144. package/esm/createColorLogReporter.browser.d.ts.map +1 -0
  145. package/{libm → esm}/createColorLogReporter.browser.js +2 -2
  146. package/esm/createColorLogReporter.browser.js.map +1 -0
  147. package/{libm → esm}/createColorLogReporter.d.ts +0 -0
  148. package/esm/createColorLogReporter.d.ts.map +1 -0
  149. package/{libm → esm}/createColorLogReporter.js +2 -2
  150. package/esm/createColorLogReporter.js.map +1 -0
  151. package/esm/createColorLogReporter.spec.d.ts +2 -0
  152. package/esm/createColorLogReporter.spec.d.ts.map +1 -0
  153. package/esm/createColorLogReporter.spec.js +152 -0
  154. package/esm/createColorLogReporter.spec.js.map +1 -0
  155. package/{libm → esm}/css/colors.d.ts +0 -0
  156. package/esm/css/colors.d.ts.map +1 -0
  157. package/{libm → esm}/css/colors.js +0 -0
  158. package/esm/css/colors.js.map +1 -0
  159. package/{libm → esm}/css/cssFormatter.d.ts +0 -0
  160. package/esm/css/cssFormatter.d.ts.map +1 -0
  161. package/{libm → esm}/css/cssFormatter.js +1 -1
  162. package/esm/css/cssFormatter.js.map +1 -0
  163. package/esm/css/cssFormatter.spec.d.ts +2 -0
  164. package/esm/css/cssFormatter.spec.d.ts.map +1 -0
  165. package/esm/css/cssFormatter.spec.js +28 -0
  166. package/esm/css/cssFormatter.spec.js.map +1 -0
  167. package/esm/css/index.d.ts +2 -0
  168. package/esm/css/index.d.ts.map +1 -0
  169. package/esm/css/index.js +2 -0
  170. package/esm/css/index.js.map +1 -0
  171. package/esm/index.d.ts +4 -0
  172. package/esm/index.d.ts.map +1 -0
  173. package/esm/index.js +4 -0
  174. package/esm/index.js.map +1 -0
  175. package/esm/utils/index.d.ts +2 -0
  176. package/esm/utils/index.d.ts.map +1 -0
  177. package/esm/utils/index.js +2 -0
  178. package/esm/utils/index.js.map +1 -0
  179. package/{libm → esm}/utils/supportColor.browser.d.ts +0 -0
  180. package/esm/utils/supportColor.browser.d.ts.map +1 -0
  181. package/{libm → esm}/utils/supportColor.browser.js +3 -0
  182. package/esm/utils/supportColor.browser.js.map +1 -0
  183. package/{libm → esm}/utils/supportColor.d.ts +0 -0
  184. package/esm/utils/supportColor.d.ts.map +1 -0
  185. package/{libm → esm}/utils/supportColor.js +0 -0
  186. package/esm/utils/supportColor.js.map +1 -0
  187. package/package.json +81 -35
  188. package/{src → ts}/ansi/adjustCodes.ts +1 -1
  189. package/{src → ts}/ansi/ansiFormatter.ts +5 -5
  190. package/{src → ts}/ansi/constants.ts +0 -0
  191. package/{src → ts}/ansi/createColorCodes.ts +2 -3
  192. package/ts/ansi/index.ts +3 -0
  193. package/{src → ts}/ansi/isColor.ts +1 -1
  194. package/{src → ts}/ansi/wrapAnsi.ts +0 -0
  195. package/{src → ts}/createColorLogReporter.browser.ts +2 -2
  196. package/{src → ts}/createColorLogReporter.ts +2 -2
  197. package/{src → ts}/css/colors.ts +0 -0
  198. package/{src → ts}/css/cssFormatter.ts +1 -1
  199. package/ts/css/index.ts +1 -0
  200. package/ts/index.ts +3 -0
  201. package/ts/utils/index.ts +1 -0
  202. package/{src → ts}/utils/supportColor.browser.ts +6 -3
  203. package/{src → ts}/utils/supportColor.ts +0 -0
  204. package/CHANGELOG.md +0 -631
  205. package/dist/standard-log-color.js +0 -2
  206. package/dist/standard-log-color.js.gz +0 -0
  207. package/dist/standard-log-color.js.map +0 -1
  208. package/dist/standard-log-color.js.map.gz +0 -0
  209. package/lib/ansi/adjustCodes.d.ts.map +0 -1
  210. package/lib/ansi/adjustCodes.js +0 -16
  211. package/lib/ansi/adjustCodes.js.map +0 -1
  212. package/lib/ansi/ansiFormatter.d.ts.map +0 -1
  213. package/lib/ansi/ansiFormatter.js +0 -39
  214. package/lib/ansi/ansiFormatter.js.map +0 -1
  215. package/lib/ansi/constants.d.ts.map +0 -1
  216. package/lib/ansi/constants.js.map +0 -1
  217. package/lib/ansi/createColorCodes.d.ts.map +0 -1
  218. package/lib/ansi/createColorCodes.js +0 -41
  219. package/lib/ansi/createColorCodes.js.map +0 -1
  220. package/lib/ansi/index.d.ts +0 -4
  221. package/lib/ansi/index.d.ts.map +0 -1
  222. package/lib/ansi/index.js +0 -7
  223. package/lib/ansi/index.js.map +0 -1
  224. package/lib/ansi/isColor.d.ts.map +0 -1
  225. package/lib/ansi/isColor.js +0 -13
  226. package/lib/ansi/isColor.js.map +0 -1
  227. package/lib/ansi/wrapAnsi.d.ts.map +0 -1
  228. package/lib/ansi/wrapAnsi.js.map +0 -1
  229. package/lib/createColorLogReporter.browser.d.ts.map +0 -1
  230. package/lib/createColorLogReporter.browser.js.map +0 -1
  231. package/lib/createColorLogReporter.d.ts.map +0 -1
  232. package/lib/createColorLogReporter.js.map +0 -1
  233. package/lib/css/colors.d.ts.map +0 -1
  234. package/lib/css/colors.js.map +0 -1
  235. package/lib/css/cssFormatter.d.ts.map +0 -1
  236. package/lib/css/cssFormatter.js.map +0 -1
  237. package/lib/css/index.d.ts +0 -2
  238. package/lib/css/index.d.ts.map +0 -1
  239. package/lib/css/index.js +0 -5
  240. package/lib/css/index.js.map +0 -1
  241. package/lib/index.d.ts +0 -4
  242. package/lib/index.d.ts.map +0 -1
  243. package/lib/index.js +0 -7
  244. package/lib/index.js.map +0 -1
  245. package/lib/utils/index.d.ts +0 -2
  246. package/lib/utils/index.d.ts.map +0 -1
  247. package/lib/utils/index.js +0 -5
  248. package/lib/utils/index.js.map +0 -1
  249. package/lib/utils/supportColor.browser.d.ts.map +0 -1
  250. package/lib/utils/supportColor.browser.js.map +0 -1
  251. package/lib/utils/supportColor.d.ts.map +0 -1
  252. package/lib/utils/supportColor.js.map +0 -1
  253. package/libm/ansi/adjustCodes.d.ts.map +0 -1
  254. package/libm/ansi/adjustCodes.js.map +0 -1
  255. package/libm/ansi/ansiFormatter.d.ts.map +0 -1
  256. package/libm/ansi/ansiFormatter.js.map +0 -1
  257. package/libm/ansi/constants.d.ts.map +0 -1
  258. package/libm/ansi/constants.js.map +0 -1
  259. package/libm/ansi/createColorCodes.d.ts.map +0 -1
  260. package/libm/ansi/createColorCodes.js.map +0 -1
  261. package/libm/ansi/index.d.ts +0 -4
  262. package/libm/ansi/index.d.ts.map +0 -1
  263. package/libm/ansi/index.js +0 -4
  264. package/libm/ansi/index.js.map +0 -1
  265. package/libm/ansi/isColor.d.ts.map +0 -1
  266. package/libm/ansi/isColor.js.map +0 -1
  267. package/libm/ansi/wrapAnsi.d.ts.map +0 -1
  268. package/libm/ansi/wrapAnsi.js.map +0 -1
  269. package/libm/createColorLogReporter.browser.d.ts.map +0 -1
  270. package/libm/createColorLogReporter.browser.js.map +0 -1
  271. package/libm/createColorLogReporter.d.ts.map +0 -1
  272. package/libm/createColorLogReporter.js.map +0 -1
  273. package/libm/css/colors.d.ts.map +0 -1
  274. package/libm/css/colors.js.map +0 -1
  275. package/libm/css/cssFormatter.d.ts.map +0 -1
  276. package/libm/css/cssFormatter.js.map +0 -1
  277. package/libm/css/index.d.ts +0 -2
  278. package/libm/css/index.d.ts.map +0 -1
  279. package/libm/css/index.js +0 -2
  280. package/libm/css/index.js.map +0 -1
  281. package/libm/index.d.ts +0 -4
  282. package/libm/index.d.ts.map +0 -1
  283. package/libm/index.js +0 -4
  284. package/libm/index.js.map +0 -1
  285. package/libm/utils/index.d.ts +0 -2
  286. package/libm/utils/index.d.ts.map +0 -1
  287. package/libm/utils/index.js +0 -2
  288. package/libm/utils/index.js.map +0 -1
  289. package/libm/utils/supportColor.browser.d.ts.map +0 -1
  290. package/libm/utils/supportColor.browser.js.map +0 -1
  291. package/libm/utils/supportColor.d.ts.map +0 -1
  292. package/libm/utils/supportColor.js.map +0 -1
  293. package/src/ansi/adjustCodes.spec.ts +0 -12
  294. package/src/ansi/createColorCodes.spec.ts +0 -35
  295. package/src/ansi/index.ts +0 -3
  296. package/src/ansi/isColor.spec.ts +0 -18
  297. package/src/ansi/wrapAnsi.spec.ts +0 -7
  298. package/src/createColorLogReporter.spec.ts +0 -193
  299. package/src/css/cssFormatter.spec.ts +0 -30
  300. package/src/css/index.ts +0 -1
  301. package/src/index.ts +0 -3
  302. package/src/utils/index.ts +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-log-color.es5.js","mappings":"uEACA,IAAIA,EAAiBC,MAAQA,KAAKD,eAAkB,SAAUE,EAAIC,EAAMC,GACpE,GAAIA,GAA6B,IAArBC,UAAUC,OAAc,IAAK,IAA4BC,EAAxBC,EAAI,EAAGC,EAAIN,EAAKG,OAAYE,EAAIC,EAAGD,KACxED,GAAQC,KAAKL,IACRI,IAAIA,EAAKG,MAAMC,UAAUC,MAAMC,KAAKV,EAAM,EAAGK,IAClDD,EAAGC,GAAKL,EAAKK,IAGrB,OAAON,EAAGY,OAAOP,GAAMG,MAAMC,UAAUC,MAAMC,KAAKV,KAEtDY,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQE,kBAAe,EA4BvBF,EAAQE,aA3BR,SAAsBhB,EAAMD,EAAIkB,EAAQC,QACtB,IAAVA,IAAoBA,EAAQ,CACZ,IAAhBlB,EAAKG,OAAeH,EAAK,GAAmB,IAAdD,EAAGI,OAAeJ,EAAG,GAAK,EAC1C,IAAdA,EAAGI,OAAeJ,EAAG,GAAqB,IAAhBC,EAAKG,OAAeH,EAAK,GAAK,IAE5D,IAAImB,EAAQtB,EAAc,GAAIG,GAAM,GAChCoB,EAAO,CACPrB,EAAG,GAAKC,EAAK,GACbD,EAAG,GAAKC,EAAK,GACbD,EAAG,GAAKC,EAAK,GACbkB,EAAM,GAAKA,EAAM,IAEA,IAAjBC,EAAMhB,QACNgB,EAAME,KAAKH,EAAM,IAGrB,IAFA,IAAII,EAAM,EAAIC,KAAKC,IAAIP,EAAS,EAAG,GAC/BQ,EAAO,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AASgJ,EAAQA,EAAOhJ,QAASyJ,GAGpET,EAAOhJ,QCpBfyJ,EAAoBzC,EAAI,SAAShH,GACX,oBAAX6J,QAA0BA,OAAOC,aAC1ChK,OAAOC,eAAeC,EAAS6J,OAAOC,YAAa,CAAE7J,MAAO,WAE7DH,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,KCFvD,IAAI8J,EAAsBN,EAAoB,K","sources":["webpack://StandardLogColor/../../node_modules/color-map/cjs/createColors.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/createColorsFromMap.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/index.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/interfaces.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/rgbHex.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/rgbaString.js","webpack://StandardLogColor/./ts/ansi/adjustCodes.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/createColorCodes.ts","webpack://StandardLogColor/./ts/ansi/index.ts","webpack://StandardLogColor/./ts/ansi/isColor.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/./ts/css/index.ts","webpack://StandardLogColor/./ts/index.ts","webpack://StandardLogColor/./ts/utils/index.ts","webpack://StandardLogColor/./ts/utils/supportColor.browser.ts","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/../../node_modules/unpartial/cjs/index.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/webpack/startup"],"sourcesContent":["\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColors = void 0;\nfunction createColors(from, to, shades, alpha) {\n if (alpha === void 0) { alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n ]; }\n var start = __spreadArray([], from, true);\n var diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n var inc = 1 / Math.max(shades - 1, 1);\n var rgba = [];\n for (var i = 0; i < shades; i++) {\n var color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\nexports.createColors = createColors;\n//# sourceMappingURL=createColors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColorsFromMap = void 0;\nvar createColors_1 = require(\"./createColors\");\n/**\n * Create colors with specified color map.\n */\nfunction createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(\"Requires at least \".concat(colormap.length, \" shades.\"));\n }\n var result = [];\n var steps = [];\n for (var i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (var i = 0; i < colormap.length - 1; i++) {\n var n = steps[i + 1] - steps[i];\n var from = colormap[i].rgb;\n var to = colormap[i + 1].rgb;\n result.push.apply(result, (0, createColors_1.createColors)(from, to, n, alpha));\n }\n return result;\n}\nexports.createColorsFromMap = createColorsFromMap;\n//# sourceMappingURL=createColorsFromMap.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./createColors\"), exports);\n__exportStar(require(\"./createColorsFromMap\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./rgbHex\"), exports);\n__exportStar(require(\"./rgbaString\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbHex = void 0;\n/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nfunction rgbHex(rgb) {\n var hex = '#';\n for (var i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nexports.rgbHex = rgbHex;\nfunction d2h(d) {\n var s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbaString = void 0;\nfunction rgbaString(rgba) {\n return 'rgba(' + rgba.join(',') + ')';\n}\nexports.rgbaString = rgbaString;\n//# sourceMappingURL=rgbaString.js.map","import { ANSI_RED, ANSI_BACKGROUND, ANSI_YELLOW, ANSI_BLACK, ANSI_FOREGROUND } from './constants.js'\n\nexport function adjustCodes(codes: number[], consoleMethod: string) {\n if (\n (consoleMethod === 'error' && codes[0] === ANSI_RED + ANSI_BACKGROUND) ||\n (consoleMethod === 'warn' && codes[0] === ANSI_YELLOW + ANSI_BACKGROUND)\n ) {\n const altCodes = [...codes]\n altCodes[1] = ANSI_BLACK + ANSI_FOREGROUND\n return altCodes\n }\n return codes\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { adjustCodes } from './adjustCodes.js'\nimport { ANSI_FOREGROUND, ANSI_RED, ANSI_YELLOW } from './constants.js'\nimport { createColorCodes } from './createColorCodes.js'\nimport { wrapAnsi, wrapAnsiId } from './wrapAnsi.js'\n\ntype Context = {\n colorMap: number[][],\n idMap: Record<string, number[]>,\n counter: number\n}\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const colorMap = getColorMap()\n const context: Context = {\n colorMap,\n idMap: {},\n counter: 0\n }\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const codes = adjustCodes(getCodes(context, entry.id), consoleMethod)\n const id = wrapAnsiId(entry.id, codes)\n const rest = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) rest.push(timestamp)\n const textCodes = consoleMethod === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n consoleMethod === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ?\n [id, ...rest.map(x => wrapAnsi(x, textCodes))] :\n [id, ...rest]\n }\n}\n\nfunction getCodes(context: Context, id: string) {\n return context.idMap[id] = context.idMap[id] || context.colorMap[context.counter++ % context.colorMap.length]\n}\n\nfunction getColorMap() {\n return createColorCodes()\n}\n","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","import { ANSI_BACKGROUND, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { isColor } from './isColor.js'\n\nexport function createColorCodes() {\n const baseColors = [ANSI_RED, ANSI_GREEN, ANSI_YELLOW, ANSI_BLUE, ANSI_MAGENTA, ANSI_CYAN]\n const backgroundColors = baseColors.map(c => c + ANSI_BACKGROUND)\n\n let baseCodes: number[][] = backgroundColors.map(x => [x])\n\n baseColors.forEach(base => baseCodes.push(...backgroundColors.map(x => [x, base + ANSI_FOREGROUND])))\n\n baseCodes = filterForegroundBackgroundAreSame(baseCodes)\n baseCodes = filterHandPickedColors(baseCodes)\n\n const brighten = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_BRIGHT])\n const underscored = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_UNDERSCORE])\n return [...baseCodes, ...brighten, ...underscored]\n}\n\nfunction filterForegroundBackgroundAreSame(baseCodes: number[][]) {\n return baseCodes.filter(x => x.length === 1 || x[0] !== x[1] + 10)\n}\n\nfunction filterHandPickedColors(baseCodes: number[][]) {\n return baseCodes.filter(x =>\n !isColor(x, ANSI_WHITE, ANSI_YELLOW) &&\n !isColor(x, ANSI_MAGENTA, ANSI_RED) &&\n !isColor(x, ANSI_RED, ANSI_MAGENTA) &&\n !isColor(x, ANSI_CYAN, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_CYAN) &&\n !isColor(x, ANSI_CYAN, ANSI_GREEN) &&\n !isColor(x, ANSI_GREEN, ANSI_CYAN) &&\n !isColor(x, ANSI_RED, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_RED) &&\n !isColor(x, ANSI_BLUE, ANSI_MAGENTA) &&\n !isColor(x, ANSI_MAGENTA, ANSI_BLUE) &&\n !isColor(x, ANSI_GREEN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_GREEN) &&\n !isColor(x, ANSI_CYAN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_CYAN)\n )\n}\n","export * from './ansiFormatter.js'\nexport * from './constants.js'\nexport * from './wrapAnsi.js'\n","import { AnsiColor, AnsiStyle, ANSI_BACKGROUND, ANSI_FOREGROUND, ANSI_WHITE } from './constants.js'\n\nexport function isColor(color: number[], foreground: AnsiColor, background: AnsiColor, style?: AnsiStyle) {\n if (color.length === 1) {\n return foreground === ANSI_WHITE && color[0] === background + ANSI_BACKGROUND\n }\n const colorMatched = color[1] === foreground + ANSI_FOREGROUND && color[0] === background + ANSI_BACKGROUND\n\n return style ? color[2] === style && colorMatched : colorMatched\n}\n","export function wrapAnsiId(id: string, codes: number[]) {\n return wrapAnsi(padIdIfHasBackground(id, codes), codes)\n}\nexport function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n\nfunction padIdIfHasBackground(id: string, codes: number[]) {\n return codes.some(x => x > 40) ? ` ${id} ` : id\n}\n","import { ConsoleLogReporterOptions, createConsoleLogReporter, plainLogFormatter } from 'standard-log'\nimport { required } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport { supportColor } from './utils/index.js'\n\nexport function createColorLogReporter(options?: ConsoleLogReporterOptions) {\n return createConsoleLogReporter(required({ formatter: getFormatter() }, options))\n}\n\n// istanbul ignore next\nfunction getFormatter() {\n if (!supportColor()) return plainLogFormatter\n\n return createCssFormatter()\n}\n","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createTimestampFormatter, LogEntry, TimestampFormat } from 'standard-log'\nimport { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { required } from 'unpartial'\nimport { rainbow } from './colors.js'\n\nexport type CssFormatterOptions = {\n /**\n * How many colors available.\n * Recommend at least 10.\n * Default to 20.\n */\n maxColor: number,\n timestamp: TimestampFormat\n}\n\nexport function createCssFormatter(options?: Partial<CssFormatterOptions>) {\n const { maxColor, timestamp } = required({ maxColor: 20, timestamp: 'none' }, options)\n const loggerMap: Record<string, RGB> = {}\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `padding: 2px; margin: 2px; line-height: 1.8em;background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","export * from './cssFormatter.js'\n","export * from './ansi/index.js'\nexport * from './createColorLogReporter.js'\nexport * from './css/index.js'\n","export * from './supportColor.js'\n","export function supportColor(): boolean {\n return doesBrowserSupportColor()\n}\n\n// istanbul ignore next\nfunction doesBrowserSupportColor() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n","module.exports = StandardLog;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./required.js\"), exports);\n__exportStar(require(\"./unpartial.js\"), exports);\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(724);\n"],"names":["__spreadArray","this","to","from","pack","arguments","length","ar","i","l","Array","prototype","slice","call","concat","Object","defineProperty","exports","value","createColors","shades","alpha","start","diff","push","inc","Math","max","rgba","color","round","createColorsFromMap","createColors_1","colormap","Error","result","steps","index","n","rgb","apply","__createBinding","create","o","m","k","k2","undefined","enumerable","get","__exportStar","p","hasOwnProperty","rgbHex","s","hex","toString","rgbaString","join","codes","consoleMethod","ANSI_RED","ANSI_BACKGROUND","ANSI_YELLOW","altCodes","ANSI_BLACK","ANSI_FOREGROUND","options","timestamp","context","colorMap","createColorCodes","idMap","counter","timestampFormatter","createTimestampFormatter","entry","toConsoleMethod","level","adjustCodes","id","getCodes","wrapAnsiId","rest","args","textCodes","map","x","wrapAnsi","ANSI_GREEN","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","baseColors","backgroundColors","c","baseCodes","forEach","base","brighten","filter","isColor","filterHandPickedColors","filterForegroundBackgroundAreSame","underscored","foreground","background","style","colorMatched","text","some","padIdIfHasBackground","createConsoleLogReporter","required","formatter","supportColor","createCssFormatter","plainLogFormatter","rainbow","maxColor","loggerMap","count","idStr","indexOf","firstArgIsColorTemplate","border","r","g","b","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","parseInt","RegExp","$1","module","StandardLog","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","Symbol","toStringTag","__webpack_exports__"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ var StandardLogColor;!function(){"use strict";var e={458:function(e,n){var t=this&&this.__spreadArray||function(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.createColors=void 0,n.createColors=function(e,n,r,o){void 0===o&&(o=[4===e.length?e[3]:4===n.length?n[3]:1,4===n.length?n[3]:4===e.length?e[3]:1]);var i=t([],e,!0),u=[n[0]-e[0],n[1]-e[1],n[2]-e[2],o[1]-o[0]];3===i.length&&i.push(o[0]);for(var a=1/Math.max(r-1,1),c=[],f=0;f<r;f++){var d=[Math.round(i[0]+f*u[0]*a),Math.round(i[1]+f*u[1]*a),Math.round(i[2]+f*u[2]*a),i[3]+f*u[3]*a];c.push(d)}return c}},663:function(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.createColorsFromMap=void 0;var r=t(458);n.createColorsFromMap=function(e,n,t){if(n<e.length)throw new Error("Requires at least ".concat(e.length," shades."));for(var o=[],i=[],u=0;u<e.length;u++)i.push(Math.round(e[u].index*n));for(u=0;u<e.length-1;u++){var a=i[u+1]-i[u],c=e[u].rgb,f=e[u+1].rgb;o.push.apply(o,(0,r.createColors)(c,f,a,t))}return o}},485:function(e,n,t){var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){void 0===r&&(r=t),Object.defineProperty(e,r,{enumerable:!0,get:function(){return n[t]}})}:function(e,n,t,r){void 0===r&&(r=t),e[r]=n[t]}),o=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||r(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),o(t(458),n),o(t(663),n),o(t(165),n),o(t(800),n),o(t(85),n)},165:function(e,n){Object.defineProperty(n,"__esModule",{value:!0})},800:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.rgbHex=void 0,n.rgbHex=function(e){for(var n,t="#",r=0;r<3;r++)t+=(void 0,(n=(+e[r]).toString(16)).length<2?"0"+n:n);return t}},85:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.rgbaString=void 0,n.rgbaString=function(e){return"rgba("+e.join(",")+")"}}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return e[r].call(i.exports,i,i.exports,t),i.exports}t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){t.r(r),t.d(r,{ANSI_BACKGROUND:function(){return g},ANSI_BLACK:function(){return n},ANSI_BLUE:function(){return a},ANSI_BRIGHT:function(){return s},ANSI_CYAN:function(){return f},ANSI_FOREGROUND:function(){return p},ANSI_GREEN:function(){return i},ANSI_MAGENTA:function(){return c},ANSI_RED:function(){return o},ANSI_UNDERSCORE:function(){return l},ANSI_WHITE:function(){return d},ANSI_YELLOW:function(){return u},createAnsiFormatter:function(){return w},createColorLogReporter:function(){return j},createCssFormatter:function(){return A},wrapAnsi:function(){return b},wrapAnsiId:function(){return h}});var e=StandardLog;const n=0,o=1,i=2,u=3,a=4,c=5,f=6,d=7,s=1,l=4,p=30,g=40;function m(e,n,t,r){if(1===e.length)return n===d&&e[0]===t+g;const o=e[1]===n+p&&e[0]===t+g;return r?e[2]===r&&o:o}function v(){const e=[o,i,u,a,c,f],n=e.map((e=>e+g));let t=n.map((e=>[e]));e.forEach((e=>t.push(...n.map((n=>[n,e+p]))))),t=function(e){return e.filter((e=>1===e.length||e[0]!==e[1]+10))}(t),t=function(e){return e.filter((e=>!(m(e,d,u)||m(e,c,o)||m(e,o,c)||m(e,f,a)||m(e,a,f)||m(e,f,i)||m(e,i,f)||m(e,o,a)||m(e,a,o)||m(e,a,c)||m(e,c,a)||m(e,i,u)||m(e,u,i)||m(e,f,u)||m(e,u,f))))}(t);const r=t.filter((e=>1!==e.length)).map((e=>[...e,s])),v=t.filter((e=>1!==e.length)).map((e=>[...e,l]));return[...t,...r,...v]}function h(e,n){return b(function(e,n){return n.some((e=>e>40))?` ${e} `:e}(e,n),n)}function b(e,n){return`[${n.join(";")}m${e}`}function w(t={timestamp:"none"}){const r={colorMap:v(),idMap:{},counter:0},i=(0,e.createTimestampFormatter)(t.timestamp);return function(t){const a=(0,e.toConsoleMethod)(t.level),c=function(e,t){if("error"===t&&e[0]===o+g||"warn"===t&&e[0]===u+g){const t=[...e];return t[1]=n+p,t}return e}(function(e,n){return e.idMap[n]=e.idMap[n]||e.colorMap[e.counter++%e.colorMap.length]}(r,t.id),a),f=h(t.id,c),d=[...t.args],s=i(t.timestamp);void 0!==s&&d.push(s);const l="error"===a?[o+p]:"warn"===a?[u+p]:void 0;return l?[f,...d.map((e=>b(e,l)))]:[f,...d]}}function y(e,n,t){return o=(e,n)=>({...e,...n}),void 0===(r=[e,n,t])[0]||null===r[0]?r[0]:r.filter((e=>!!e)).reduce(o,{});var r,o}var _=t(485);const x=[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}];function A(n){const{maxColor:t,timestamp:r}=y({maxColor:20,timestamp:"none"},n),o={},i=(0,_.createColorsFromMap)(x,t);let u=0;const a=(0,e.createTimestampFormatter)(r);return function(e){let n,r=`%c ${e.id} `;!function(e){return"string"==typeof e[0]&&-1!==e[0].indexOf("%c")}(e.args)?n=[...e.args]:(r+=e.args[0],n=[...e.args.slice(1)]);const c=(f=e.id,o[f]=o[f]||i[u++&t]);var f;const d=(0,_.rgbHex)(c),s=(0,_.rgbHex)(c.map((e=>Math.max(0,e-32)))),l=function(e){let n=function(e){const n=255-e[0],t=255-e[1],r=255-e[2];return(0,_.rgbHex)([n,t,r])}(e);const t=N(e),r=N("#ffffff"===n?[255,255,255]:[0,0,0]);return(t>r?(t+.05)/(r+.05):(r+.05)/(t+.05))<4.5&&(n=e[0]*M+e[1]*S+e[2]*C<220?"#ffffff":"#000000"),n}(c),p=[r,`padding: 2px; margin: 2px; line-height: 1.8em;background: ${d};border: 1px solid ${s};color: ${l};`,...n],g=a(e.timestamp);return void 0!==g&&p.push(g),p}}const M=.2126,S=.7152,C=.0722,O=1/12.92;function N(e){const n=e[0]/255,t=e[1]/255,r=e[2]/255,o=n<=.03928?n*O:Math.pow((n+.055)/1.055,2.4),i=t<=.03928?t*O:Math.pow((t+.055)/1.055,2.4),u=r<=.03928?r*O:Math.pow((r+.055)/1.055,2.4);return o*M+i*S+u*C}function j(n){return(0,e.createConsoleLogReporter)(y({formatter:"undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))?A():e.plainLogFormatter},n))}}(),StandardLogColor=r}();
2
+ //# sourceMappingURL=standard-log-color.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-log-color.esm.js","mappings":"uEACA,IAAIA,EAAiBC,MAAQA,KAAKD,eAAkB,SAAUE,EAAIC,EAAMC,GACpE,GAAIA,GAA6B,IAArBC,UAAUC,OAAc,IAAK,IAA4BC,EAAxBC,EAAI,EAAGC,EAAIN,EAAKG,OAAYE,EAAIC,EAAGD,KACxED,GAAQC,KAAKL,IACRI,IAAIA,EAAKG,MAAMC,UAAUC,MAAMC,KAAKV,EAAM,EAAGK,IAClDD,EAAGC,GAAKL,EAAKK,IAGrB,OAAON,EAAGY,OAAOP,GAAMG,MAAMC,UAAUC,MAAMC,KAAKV,KAEtDY,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQE,kBAAe,EA4BvBF,EAAQE,aA3BR,SAAsBhB,EAAMD,EAAIkB,EAAQC,QACtB,IAAVA,IAAoBA,EAAQ,CACZ,IAAhBlB,EAAKG,OAAeH,EAAK,GAAmB,IAAdD,EAAGI,OAAeJ,EAAG,GAAK,EAC1C,IAAdA,EAAGI,OAAeJ,EAAG,GAAqB,IAAhBC,EAAKG,OAAeH,EAAK,GAAK,IAE5D,IAAImB,EAAQtB,EAAc,GAAIG,GAAM,GAChCoB,EAAO,CACPrB,EAAG,GAAKC,EAAK,GACbD,EAAG,GAAKC,EAAK,GACbD,EAAG,GAAKC,EAAK,GACbkB,EAAM,GAAKA,EAAM,IAEA,IAAjBC,EAAMhB,QACNgB,EAAME,KAAKH,EAAM,IAGrB,IAFA,IAAII,EAAM,EAAIC,KAAKC,IAAIP,EAAS,EAAG,GAC/BQ,EAAO,GACFpB,EAAI,EAAGA,EAAIY,EAAQZ,IAAK,CAC7B,IAAIqB,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BA,UAAUC,WAAaD,UAAUC,UAAUC,cAAcC,MAAM,mBAAqBQ,SAASC,OAAOC,GAAI,KAAO,IAE9H,oBAAdb,WAA6BA,UAAUC,WAAaD,UAAUC,UAAUC,cAAcC,MAAM,uBDjB/F/B,IAFqB,EAAA0C,mBAL4CrE,K","sources":["webpack://StandardLogColor/../../node_modules/color-map/cjs/createColors.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/createColorsFromMap.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/index.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/interfaces.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/rgbHex.js","webpack://StandardLogColor/../../node_modules/color-map/cjs/rgbaString.js","webpack://StandardLogColor/webpack/bootstrap","webpack://StandardLogColor/webpack/runtime/define property getters","webpack://StandardLogColor/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLogColor/webpack/runtime/make namespace object","webpack://StandardLogColor/external var \"StandardLog\"","webpack://StandardLogColor/./ts/ansi/constants.ts","webpack://StandardLogColor/./ts/ansi/isColor.ts","webpack://StandardLogColor/./ts/ansi/createColorCodes.ts","webpack://StandardLogColor/./ts/ansi/wrapAnsi.ts","webpack://StandardLogColor/./ts/ansi/ansiFormatter.ts","webpack://StandardLogColor/./ts/ansi/adjustCodes.ts","webpack://StandardLogColor/../../node_modules/unpartial/esm/required.js","webpack://StandardLogColor/./ts/css/colors.ts","webpack://StandardLogColor/./ts/css/cssFormatter.ts","webpack://StandardLogColor/./ts/createColorLogReporter.browser.ts","webpack://StandardLogColor/./ts/utils/supportColor.browser.ts"],"sourcesContent":["\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColors = void 0;\nfunction createColors(from, to, shades, alpha) {\n if (alpha === void 0) { alpha = [\n from.length === 4 ? from[3] : to.length === 4 ? to[3] : 1,\n to.length === 4 ? to[3] : from.length === 4 ? from[3] : 1\n ]; }\n var start = __spreadArray([], from, true);\n var diff = [\n to[0] - from[0],\n to[1] - from[1],\n to[2] - from[2],\n alpha[1] - alpha[0]\n ];\n if (start.length === 3)\n start.push(alpha[0]);\n var inc = 1 / Math.max(shades - 1, 1);\n var rgba = [];\n for (var i = 0; i < shades; i++) {\n var color = [\n Math.round(start[0] + i * diff[0] * inc),\n Math.round(start[1] + i * diff[1] * inc),\n Math.round(start[2] + i * diff[2] * inc),\n start[3] + i * diff[3] * inc\n ];\n rgba.push(color);\n }\n return rgba;\n}\nexports.createColors = createColors;\n//# sourceMappingURL=createColors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createColorsFromMap = void 0;\nvar createColors_1 = require(\"./createColors\");\n/**\n * Create colors with specified color map.\n */\nfunction createColorsFromMap(colormap, shades, alpha) {\n if (shades < colormap.length) {\n throw new Error(\"Requires at least \".concat(colormap.length, \" shades.\"));\n }\n var result = [];\n var steps = [];\n for (var i = 0; i < colormap.length; i++) {\n steps.push(Math.round(colormap[i].index * shades));\n }\n for (var i = 0; i < colormap.length - 1; i++) {\n var n = steps[i + 1] - steps[i];\n var from = colormap[i].rgb;\n var to = colormap[i + 1].rgb;\n result.push.apply(result, (0, createColors_1.createColors)(from, to, n, alpha));\n }\n return result;\n}\nexports.createColorsFromMap = createColorsFromMap;\n//# sourceMappingURL=createColorsFromMap.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./createColors\"), exports);\n__exportStar(require(\"./createColorsFromMap\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./rgbHex\"), exports);\n__exportStar(require(\"./rgbaString\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbHex = void 0;\n/**\n * Convert `RGB` to `#rgb`\n * JavaScript note: no check for array length, use it properly.\n */\nfunction rgbHex(rgb) {\n var hex = '#';\n for (var i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}\nexports.rgbHex = rgbHex;\nfunction d2h(d) {\n var s = (+d).toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n//# sourceMappingURL=rgbHex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rgbaString = void 0;\nfunction rgbaString(rgba) {\n return 'rgba(' + rgba.join(',') + ')';\n}\nexports.rgbaString = rgbaString;\n//# sourceMappingURL=rgbaString.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = StandardLog;","export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n","import { AnsiColor, AnsiStyle, ANSI_BACKGROUND, ANSI_FOREGROUND, ANSI_WHITE } from './constants.js'\n\nexport function isColor(color: number[], foreground: AnsiColor, background: AnsiColor, style?: AnsiStyle) {\n if (color.length === 1) {\n return foreground === ANSI_WHITE && color[0] === background + ANSI_BACKGROUND\n }\n const colorMatched = color[1] === foreground + ANSI_FOREGROUND && color[0] === background + ANSI_BACKGROUND\n\n return style ? color[2] === style && colorMatched : colorMatched\n}\n","import { ANSI_BACKGROUND, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { isColor } from './isColor.js'\n\nexport function createColorCodes() {\n const baseColors = [ANSI_RED, ANSI_GREEN, ANSI_YELLOW, ANSI_BLUE, ANSI_MAGENTA, ANSI_CYAN]\n const backgroundColors = baseColors.map(c => c + ANSI_BACKGROUND)\n\n let baseCodes: number[][] = backgroundColors.map(x => [x])\n\n baseColors.forEach(base => baseCodes.push(...backgroundColors.map(x => [x, base + ANSI_FOREGROUND])))\n\n baseCodes = filterForegroundBackgroundAreSame(baseCodes)\n baseCodes = filterHandPickedColors(baseCodes)\n\n const brighten = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_BRIGHT])\n const underscored = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_UNDERSCORE])\n return [...baseCodes, ...brighten, ...underscored]\n}\n\nfunction filterForegroundBackgroundAreSame(baseCodes: number[][]) {\n return baseCodes.filter(x => x.length === 1 || x[0] !== x[1] + 10)\n}\n\nfunction filterHandPickedColors(baseCodes: number[][]) {\n return baseCodes.filter(x =>\n !isColor(x, ANSI_WHITE, ANSI_YELLOW) &&\n !isColor(x, ANSI_MAGENTA, ANSI_RED) &&\n !isColor(x, ANSI_RED, ANSI_MAGENTA) &&\n !isColor(x, ANSI_CYAN, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_CYAN) &&\n !isColor(x, ANSI_CYAN, ANSI_GREEN) &&\n !isColor(x, ANSI_GREEN, ANSI_CYAN) &&\n !isColor(x, ANSI_RED, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_RED) &&\n !isColor(x, ANSI_BLUE, ANSI_MAGENTA) &&\n !isColor(x, ANSI_MAGENTA, ANSI_BLUE) &&\n !isColor(x, ANSI_GREEN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_GREEN) &&\n !isColor(x, ANSI_CYAN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_CYAN)\n )\n}\n","export function wrapAnsiId(id: string, codes: number[]) {\n return wrapAnsi(padIdIfHasBackground(id, codes), codes)\n}\nexport function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n\nfunction padIdIfHasBackground(id: string, codes: number[]) {\n return codes.some(x => x > 40) ? ` ${id} ` : id\n}\n","import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { adjustCodes } from './adjustCodes.js'\nimport { ANSI_FOREGROUND, ANSI_RED, ANSI_YELLOW } from './constants.js'\nimport { createColorCodes } from './createColorCodes.js'\nimport { wrapAnsi, wrapAnsiId } from './wrapAnsi.js'\n\ntype Context = {\n colorMap: number[][],\n idMap: Record<string, number[]>,\n counter: number\n}\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const colorMap = getColorMap()\n const context: Context = {\n colorMap,\n idMap: {},\n counter: 0\n }\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const codes = adjustCodes(getCodes(context, entry.id), consoleMethod)\n const id = wrapAnsiId(entry.id, codes)\n const rest = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) rest.push(timestamp)\n const textCodes = consoleMethod === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n consoleMethod === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ?\n [id, ...rest.map(x => wrapAnsi(x, textCodes))] :\n [id, ...rest]\n }\n}\n\nfunction getCodes(context: Context, id: string) {\n return context.idMap[id] = context.idMap[id] || context.colorMap[context.counter++ % context.colorMap.length]\n}\n\nfunction getColorMap() {\n return createColorCodes()\n}\n","import { ANSI_RED, ANSI_BACKGROUND, ANSI_YELLOW, ANSI_BLACK, ANSI_FOREGROUND } from './constants.js'\n\nexport function adjustCodes(codes: number[], consoleMethod: string) {\n if (\n (consoleMethod === 'error' && codes[0] === ANSI_RED + ANSI_BACKGROUND) ||\n (consoleMethod === 'warn' && codes[0] === ANSI_YELLOW + ANSI_BACKGROUND)\n ) {\n const altCodes = [...codes]\n altCodes[1] = ANSI_BLACK + ANSI_FOREGROUND\n return altCodes\n }\n return codes\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nexport function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => ({ ...p, ...e }));\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\n//# sourceMappingURL=required.js.map","import { ColorMap } from 'color-map'\n\nexport const rainbow: ColorMap = [\n { index: 0, rgb: [150, 0, 90] },\n { index: 0.125, rgb: [0, 0, 200] },\n { index: 0.25, rgb: [0, 25, 255] },\n { index: 0.375, rgb: [0, 152, 255] },\n { index: 0.5, rgb: [44, 255, 150] },\n { index: 0.625, rgb: [151, 255, 0] },\n { index: 0.75, rgb: [255, 234, 0] },\n { index: 0.875, rgb: [255, 111, 0] },\n { index: 1, rgb: [255, 0, 0] }\n]\n","import { createTimestampFormatter, LogEntry, TimestampFormat } from 'standard-log'\nimport { createColorsFromMap, RGB, RGBA, rgbHex } from 'color-map'\nimport { required } from 'unpartial'\nimport { rainbow } from './colors.js'\n\nexport type CssFormatterOptions = {\n /**\n * How many colors available.\n * Recommend at least 10.\n * Default to 20.\n */\n maxColor: number,\n timestamp: TimestampFormat\n}\n\nexport function createCssFormatter(options?: Partial<CssFormatterOptions>) {\n const { maxColor, timestamp } = required({ maxColor: 20, timestamp: 'none' }, options)\n const loggerMap: Record<string, RGB> = {}\n const colorMap: RGBA[] = createColorsFromMap(rainbow, maxColor)\n let count = 0\n\n const timestampFormatter = createTimestampFormatter(timestamp)\n\n return function cssFormatter(entry: LogEntry) {\n let idStr = `%c ${entry.id} `\n let args: any[]\n if (firstArgIsColorTemplate(entry.args)) {\n idStr += entry.args[0]\n args = [...entry.args.slice(1)]\n }\n else {\n args = [...entry.args]\n }\n const rgb = getRgb(entry.id)\n const background = rgbHex(rgb)\n const border = rgbHex(rgb.map(x => Math.max(0, x - 32)) as RGB)\n const color = getForegroundColor(rgb)\n const result = [\n idStr,\n `padding: 2px; margin: 2px; line-height: 1.8em;background: ${background};border: 1px solid ${border};color: ${color};`,\n ...args\n ]\n const t = timestampFormatter(entry.timestamp)\n if (t !== undefined) result.push(t)\n return result\n }\n\n function firstArgIsColorTemplate(args: any[]) {\n return typeof args[0] === 'string' && args[0].indexOf('%c') !== -1\n }\n\n function getRgb(id: string) {\n return loggerMap[id] = loggerMap[id] || colorMap[count++ & maxColor]\n }\n}\n\nconst gammaMap = {\n rc: 0.2126,\n gc: 0.7152,\n bc: 0.0722,\n lowc: 1 / 12.92\n}\n\nfunction getForegroundColor(background: RGB) {\n // Setting the contrasting color as default\n let color = getComplementary(background)\n const bgLuminance = getRelativeLuminance(background)\n const fgLuminance = (color === '#ffffff') ?\n getRelativeLuminance([255, 255, 255]) :\n getRelativeLuminance([0, 0, 0])\n const relativeL = bgLuminance > fgLuminance ? (bgLuminance + 0.05) / (fgLuminance + 0.05) : (fgLuminance + 0.05) / (bgLuminance + 0.05)\n\n // Can set the contrast ratio based on text size later.\n if (relativeL < 4.5) {\n const avgLuminance = background[0] * gammaMap['rc'] + background[1] * gammaMap['gc'] + background[2] * gammaMap['bc']\n\n // If the relative contrast is lower than standard, we switch color to black/white\n color = (avgLuminance < 220) ? '#ffffff' : '#000000'\n }\n return color\n}\n\nfunction getRelativeLuminance(rgb: RGB) {\n // https://www.w3.org/TR/WCAG/#relativeluminancedef\n const rsrgb = rgb[0] / 255\n const gsrgb = rgb[1] / 255\n const bsrgb = rgb[2] / 255\n\n const r = rsrgb <= 0.03928 ? rsrgb * gammaMap['lowc'] : Math.pow((rsrgb + 0.055) / 1.055, 2.4)\n const g = gsrgb <= 0.03928 ? gsrgb * gammaMap['lowc'] : Math.pow((gsrgb + 0.055) / 1.055, 2.4)\n const b = bsrgb <= 0.03928 ? bsrgb * gammaMap['lowc'] : Math.pow((bsrgb + 0.055) / 1.055, 2.4)\n\n return r * gammaMap['rc'] + g * gammaMap['gc'] + b * gammaMap['bc']\n}\n\nfunction getComplementary(rgb: RGB) {\n const r = 255 - rgb[0]\n const g = 255 - rgb[1]\n const b = 255 - rgb[2]\n return rgbHex([r, g, b])\n}\n","import { ConsoleLogReporterOptions, createConsoleLogReporter, plainLogFormatter } from 'standard-log'\nimport { required } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport { supportColor } from './utils/index.js'\n\nexport function createColorLogReporter(options?: ConsoleLogReporterOptions) {\n return createConsoleLogReporter(required({ formatter: getFormatter() }, options))\n}\n\n// istanbul ignore next\nfunction getFormatter() {\n if (!supportColor()) return plainLogFormatter\n\n return createCssFormatter()\n}\n","export function supportColor(): boolean {\n return doesBrowserSupportColor()\n}\n\n// istanbul ignore next\nfunction doesBrowserSupportColor() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n // @ts-ignore\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n // @ts-ignore\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // Is firebug? http://stackoverflow.com/a/398120/376773\n // @ts-ignore\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/))\n}\n"],"names":["__spreadArray","this","to","from","pack","arguments","length","ar","i","l","Array","prototype","slice","call","concat","Object","defineProperty","exports","value","createColors","shades","alpha","start","diff","push","inc","Math","max","rgba","color","round","createColorsFromMap","createColors_1","colormap","Error","result","steps","index","n","rgb","apply","__createBinding","create","o","m","k","k2","undefined","enumerable","get","__exportStar","p","hasOwnProperty","rgbHex","s","hex","toString","rgbaString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","__webpack_modules__","d","definition","key","obj","prop","r","Symbol","toStringTag","StandardLog","ANSI_BLACK","ANSI_RED","ANSI_GREEN","ANSI_YELLOW","ANSI_BLUE","ANSI_MAGENTA","ANSI_CYAN","ANSI_WHITE","ANSI_BRIGHT","ANSI_UNDERSCORE","ANSI_FOREGROUND","ANSI_BACKGROUND","isColor","foreground","background","style","colorMatched","createColorCodes","baseColors","backgroundColors","map","c","baseCodes","x","forEach","base","filter","filterForegroundBackgroundAreSame","filterHandPickedColors","brighten","underscored","wrapAnsiId","id","codes","wrapAnsi","some","padIdIfHasBackground","text","createAnsiFormatter","options","timestamp","context","colorMap","idMap","counter","timestampFormatter","createTimestampFormatter","entry","consoleMethod","toConsoleMethod","level","altCodes","adjustCodes","getCodes","rest","args","textCodes","required","source1","source2","source3","reducer","e","entries","reduce","rainbow","createCssFormatter","maxColor","loggerMap","count","idStr","indexOf","firstArgIsColorTemplate","border","g","b","getComplementary","bgLuminance","getRelativeLuminance","fgLuminance","gammaMap","getForegroundColor","t","rsrgb","gsrgb","bsrgb","pow","createColorLogReporter","createConsoleLogReporter","formatter","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","WebkitAppearance","console","firebug","exception","table","parseInt","RegExp","$1","plainLogFormatter"],"sourceRoot":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adjustCodes.d.ts","sourceRoot":"","sources":["../../ts/ansi/adjustCodes.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,YAUjE"}
@@ -1,4 +1,4 @@
1
- import { ANSI_RED, ANSI_BACKGROUND, ANSI_YELLOW, ANSI_BLACK, ANSI_FOREGROUND } from './constants';
1
+ import { ANSI_RED, ANSI_BACKGROUND, ANSI_YELLOW, ANSI_BLACK, ANSI_FOREGROUND } from './constants.js';
2
2
  export function adjustCodes(codes, consoleMethod) {
3
3
  if ((consoleMethod === 'error' && codes[0] === ANSI_RED + ANSI_BACKGROUND) ||
4
4
  (consoleMethod === 'warn' && codes[0] === ANSI_YELLOW + ANSI_BACKGROUND)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adjustCodes.js","sourceRoot":"","sources":["../../ts/ansi/adjustCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEpG,MAAM,UAAU,WAAW,CAAC,KAAe,EAAE,aAAqB;IAChE,IACE,CAAC,aAAa,KAAK,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,eAAe,CAAC;QACtE,CAAC,aAAa,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,WAAW,GAAG,eAAe,CAAC,EACxE;QACA,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;QAC3B,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,eAAe,CAAA;QAC1C,OAAO,QAAQ,CAAA;KAChB;IACD,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { ANSI_RED, ANSI_BACKGROUND, ANSI_YELLOW, ANSI_BLACK, ANSI_FOREGROUND } from './constants.js'\n\nexport function adjustCodes(codes: number[], consoleMethod: string) {\n if (\n (consoleMethod === 'error' && codes[0] === ANSI_RED + ANSI_BACKGROUND) ||\n (consoleMethod === 'warn' && codes[0] === ANSI_YELLOW + ANSI_BACKGROUND)\n ) {\n const altCodes = [...codes]\n altCodes[1] = ANSI_BLACK + ANSI_FOREGROUND\n return altCodes\n }\n return codes\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=adjustCodes.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adjustCodes.spec.d.ts","sourceRoot":"","sources":["../../ts/ansi/adjustCodes.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { adjustCodes } from './adjustCodes.js';
2
+ import { ANSI_BACKGROUND, ANSI_BLACK, ANSI_FOREGROUND, ANSI_RED, ANSI_WHITE, ANSI_YELLOW } from './constants.js';
3
+ test('error on red changes foreground to black', () => {
4
+ expect(adjustCodes([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], 'error')).toEqual([ANSI_RED + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND]);
5
+ expect(adjustCodes([ANSI_RED + ANSI_BACKGROUND], 'error')).toEqual([ANSI_RED + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND]);
6
+ });
7
+ test('warn on yellow changes foreground to black', () => {
8
+ expect(adjustCodes([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], 'warn')).toEqual([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND]);
9
+ expect(adjustCodes([ANSI_YELLOW + ANSI_BACKGROUND], 'warn')).toEqual([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND]);
10
+ });
11
+ //# sourceMappingURL=adjustCodes.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adjustCodes.spec.js","sourceRoot":"","sources":["../../ts/ansi/adjustCodes.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEhH,IAAI,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACpD,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC,CAAA;IAC5J,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC,CAAA;AAChI,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACtD,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC,CAAA;IACjK,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,GAAG,eAAe,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC,CAAA;AACrI,CAAC,CAAC,CAAA","sourcesContent":["import { adjustCodes } from './adjustCodes.js'\nimport { ANSI_BACKGROUND, ANSI_BLACK, ANSI_FOREGROUND, ANSI_RED, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\n\ntest('error on red changes foreground to black', () => {\n expect(adjustCodes([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], 'error')).toEqual([ANSI_RED + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND])\n expect(adjustCodes([ANSI_RED + ANSI_BACKGROUND], 'error')).toEqual([ANSI_RED + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND])\n})\n\ntest('warn on yellow changes foreground to black', () => {\n expect(adjustCodes([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], 'warn')).toEqual([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND])\n expect(adjustCodes([ANSI_YELLOW + ANSI_BACKGROUND], 'warn')).toEqual([ANSI_YELLOW + ANSI_BACKGROUND, ANSI_BLACK + ANSI_FOREGROUND])\n})\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansiFormatter.d.ts","sourceRoot":"","sources":["../../ts/ansi/ansiFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,eAAe,EAAmB,MAAM,cAAc,CAAA;AAYnG,oBAAY,oBAAoB,GAAG;IACjC,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAA4C,WASlD,QAAQ,WAc9C"}
@@ -1,8 +1,8 @@
1
1
  import { createTimestampFormatter, toConsoleMethod } from 'standard-log';
2
- import { adjustCodes } from './adjustCodes';
3
- import { ANSI_FOREGROUND, ANSI_RED, ANSI_YELLOW } from './constants';
4
- import { createColorCodes } from './createColorCodes';
5
- import { wrapAnsi, wrapAnsiId } from './wrapAnsi';
2
+ import { adjustCodes } from './adjustCodes.js';
3
+ import { ANSI_FOREGROUND, ANSI_RED, ANSI_YELLOW } from './constants.js';
4
+ import { createColorCodes } from './createColorCodes.js';
5
+ import { wrapAnsi, wrapAnsiId } from './wrapAnsi.js';
6
6
  export function createAnsiFormatter(options = { timestamp: 'none' }) {
7
7
  const colorMap = getColorMap();
8
8
  const context = {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansiFormatter.js","sourceRoot":"","sources":["../../ts/ansi/ansiFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAA6B,eAAe,EAAE,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAYpD,MAAM,UAAU,mBAAmB,CAAC,UAAgC,EAAE,SAAS,EAAE,MAAM,EAAE;IACvF,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,OAAO,GAAY;QACvB,QAAQ;QACR,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,CAAC;KACX,CAAA;IACD,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAEt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AAO,gBAAgB,EAAE,CAAA;AAC3B,CAAC","sourcesContent":["import { createTimestampFormatter, LogEntry, TimestampFormat, toConsoleMethod } from 'standard-log'\nimport { adjustCodes } from './adjustCodes.js'\nimport { ANSI_FOREGROUND, ANSI_RED, ANSI_YELLOW } from './constants.js'\nimport { createColorCodes } from './createColorCodes.js'\nimport { wrapAnsi, wrapAnsiId } from './wrapAnsi.js'\n\ntype Context = {\n colorMap: number[][],\n idMap: Record<string, number[]>,\n counter: number\n}\n\nexport type AnsiFormatterOptions = {\n timestamp: TimestampFormat\n}\n\nexport function createAnsiFormatter(options: AnsiFormatterOptions = { timestamp: 'none' }) {\n const colorMap = getColorMap()\n const context: Context = {\n colorMap,\n idMap: {},\n counter: 0\n }\n const timestampFormatter = createTimestampFormatter(options.timestamp)\n\n return function ansiFormatter(entry: LogEntry) {\n const consoleMethod = toConsoleMethod(entry.level)\n const codes = adjustCodes(getCodes(context, entry.id), consoleMethod)\n const id = wrapAnsiId(entry.id, codes)\n const rest = [...entry.args]\n const timestamp = timestampFormatter(entry.timestamp)\n if (timestamp !== undefined) rest.push(timestamp)\n const textCodes = consoleMethod === 'error' ? [ANSI_RED + ANSI_FOREGROUND] :\n consoleMethod === 'warn' ? [ANSI_YELLOW + ANSI_FOREGROUND] : undefined\n\n return textCodes ?\n [id, ...rest.map(x => wrapAnsi(x, textCodes))] :\n [id, ...rest]\n }\n}\n\nfunction getCodes(context: Context, id: string) {\n return context.idMap[id] = context.idMap[id] || context.colorMap[context.counter++ % context.colorMap.length]\n}\n\nfunction getColorMap() {\n return createColorCodes()\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../ts/ansi/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACrD,eAAO,MAAM,UAAU,IAAI,CAAA;AAC3B,eAAO,MAAM,QAAQ,IAAI,CAAA;AACzB,eAAO,MAAM,UAAU,IAAI,CAAA;AAC3B,eAAO,MAAM,WAAW,IAAI,CAAA;AAC5B,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,YAAY,IAAI,CAAA;AAC7B,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B,oBAAY,SAAS,GAAG,CAAC,GAAG,CAAC,CAAA;AAC7B,eAAO,MAAM,WAAW,IAAI,CAAA;AAC5B,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,eAAO,MAAM,eAAe,KAAK,CAAA"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../ts/ansi/constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAA;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAA;AACzB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAA;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAA;AAC5B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAA;AAC1B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAA;AAC7B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAA;AAC1B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAA;AAG3B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAA;AAC5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA;AAEhC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA","sourcesContent":["export type AnsiColor = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\nexport const ANSI_BLACK = 0\nexport const ANSI_RED = 1\nexport const ANSI_GREEN = 2\nexport const ANSI_YELLOW = 3\nexport const ANSI_BLUE = 4\nexport const ANSI_MAGENTA = 5\nexport const ANSI_CYAN = 6\nexport const ANSI_WHITE = 7\n\nexport type AnsiStyle = 1 | 4\nexport const ANSI_BRIGHT = 1\nexport const ANSI_UNDERSCORE = 4\n\nexport const ANSI_FOREGROUND = 30\nexport const ANSI_BACKGROUND = 40\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorCodes.d.ts","sourceRoot":"","sources":["../../ts/ansi/createColorCodes.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,eAc/B"}
@@ -1,5 +1,5 @@
1
- import { ANSI_BACKGROUND, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants';
2
- import { isColor } from './isColor';
1
+ import { ANSI_BACKGROUND, ANSI_BLUE, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js';
2
+ import { isColor } from './isColor.js';
3
3
  export function createColorCodes() {
4
4
  const baseColors = [ANSI_RED, ANSI_GREEN, ANSI_YELLOW, ANSI_BLUE, ANSI_MAGENTA, ANSI_CYAN];
5
5
  const backgroundColors = baseColors.map(c => c + ANSI_BACKGROUND);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorCodes.js","sourceRoot":"","sources":["../../ts/ansi/createColorCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAClL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E, ANSI_BRIGHT, ANSI_CYAN, ANSI_FOREGROUND, ANSI_GREEN, ANSI_MAGENTA, ANSI_RED, ANSI_UNDERSCORE, ANSI_WHITE, ANSI_YELLOW } from './constants.js'\nimport { isColor } from './isColor.js'\n\nexport function createColorCodes() {\n const baseColors = [ANSI_RED, ANSI_GREEN, ANSI_YELLOW, ANSI_BLUE, ANSI_MAGENTA, ANSI_CYAN]\n const backgroundColors = baseColors.map(c => c + ANSI_BACKGROUND)\n\n let baseCodes: number[][] = backgroundColors.map(x => [x])\n\n baseColors.forEach(base => baseCodes.push(...backgroundColors.map(x => [x, base + ANSI_FOREGROUND])))\n\n baseCodes = filterForegroundBackgroundAreSame(baseCodes)\n baseCodes = filterHandPickedColors(baseCodes)\n\n const brighten = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_BRIGHT])\n const underscored = baseCodes.filter(c => c.length !== 1).map(x => [...x, ANSI_UNDERSCORE])\n return [...baseCodes, ...brighten, ...underscored]\n}\n\nfunction filterForegroundBackgroundAreSame(baseCodes: number[][]) {\n return baseCodes.filter(x => x.length === 1 || x[0] !== x[1] + 10)\n}\n\nfunction filterHandPickedColors(baseCodes: number[][]) {\n return baseCodes.filter(x =>\n !isColor(x, ANSI_WHITE, ANSI_YELLOW) &&\n !isColor(x, ANSI_MAGENTA, ANSI_RED) &&\n !isColor(x, ANSI_RED, ANSI_MAGENTA) &&\n !isColor(x, ANSI_CYAN, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_CYAN) &&\n !isColor(x, ANSI_CYAN, ANSI_GREEN) &&\n !isColor(x, ANSI_GREEN, ANSI_CYAN) &&\n !isColor(x, ANSI_RED, ANSI_BLUE) &&\n !isColor(x, ANSI_BLUE, ANSI_RED) &&\n !isColor(x, ANSI_BLUE, ANSI_MAGENTA) &&\n !isColor(x, ANSI_MAGENTA, ANSI_BLUE) &&\n !isColor(x, ANSI_GREEN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_GREEN) &&\n !isColor(x, ANSI_CYAN, ANSI_YELLOW) &&\n !isColor(x, ANSI_YELLOW, ANSI_CYAN)\n )\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=createColorCodes.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorCodes.spec.d.ts","sourceRoot":"","sources":["../../ts/ansi/createColorCodes.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import { createColorCodes } from './createColorCodes.js';
2
+ import { wrapAnsi } from './wrapAnsi.js';
3
+ test('inspect actual color in console', () => {
4
+ const actual = createColorCodes();
5
+ actual.forEach(color => console.info(wrapAnsi(`${describeColor(color)} ${color.join()}`, color)));
6
+ });
7
+ function describeColor(color) {
8
+ const [background, foreground, style] = color;
9
+ const names = [toStyleName(style), toColorName(foreground % 10), toColorName(background % 10)].filter(n => !!n);
10
+ return names.join(' ');
11
+ }
12
+ function toColorName(color) {
13
+ switch (color) {
14
+ case 0: return 'white';
15
+ case 1: return 'red';
16
+ case 2: return 'green';
17
+ case 3: return 'yellow';
18
+ case 4: return 'blue';
19
+ case 5: return 'pink';
20
+ case 6: return 'sky';
21
+ default: return undefined;
22
+ }
23
+ }
24
+ function toStyleName(style) {
25
+ switch (style) {
26
+ case 1: return 'bright';
27
+ case 4: return 'underscore';
28
+ case 7: return 'reversed';
29
+ default: return undefined;
30
+ }
31
+ }
32
+ //# sourceMappingURL=createColorCodes.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorCodes.spec.js","sourceRoot":"","sources":["../../ts/ansi/createColorCodes.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC3C,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAA;IACjC,MAAM,CAA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,UAAU,CAAA;QACzB,OAAO,CAAC,CAAC,OAAO,SAAS,CAAA;KAC1B;AACH,CAAC","sourcesContent":["import { createColorCodes } from './createColorCodes.js'\nimport { wrapAnsi } from './wrapAnsi.js'\n\ntest('inspect actual color in console', () => {\n const actual = createColorCodes()\n actual.forEach(color => console.info(wrapAnsi(`${describeColor(color)} ${color.join()}`, color)))\n})\n\nfunction describeColor(color: number[]) {\n const [background, foreground, style] = color\n const names = [toStyleName(style), toColorName(foreground % 10), toColorName(background % 10)].filter(n => !!n)\n return names.join(' ')\n}\n\nfunction toColorName(color: number | undefined) {\n switch (color) {\n case 0: return 'white'\n case 1: return 'red'\n case 2: return 'green'\n case 3: return 'yellow'\n case 4: return 'blue'\n case 5: return 'pink'\n case 6: return 'sky'\n default: return undefined\n }\n}\n\nfunction toStyleName(style: number | undefined) {\n switch (style) {\n case 1: return 'bright'\n case 4: return 'underscore'\n case 7: return 'reversed'\n default: return undefined\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export * from './ansiFormatter.js';
2
+ export * from './constants.js';
3
+ export * from './wrapAnsi.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/ansi/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './ansiFormatter.js';
2
+ export * from './constants.js';
3
+ export * from './wrapAnsi.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/ansi/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA","sourcesContent":["export * from './ansiFormatter.js'\nexport * from './constants.js'\nexport * from './wrapAnsi.js'\n"]}
@@ -1,3 +1,3 @@
1
- import { AnsiColor, AnsiStyle } from './constants';
1
+ import { AnsiColor, AnsiStyle } from './constants.js';
2
2
  export declare function isColor(color: number[], foreground: AnsiColor, background: AnsiColor, style?: AnsiStyle): boolean;
3
3
  //# sourceMappingURL=isColor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isColor.d.ts","sourceRoot":"","sources":["../../ts/ansi/isColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAgD,MAAM,gBAAgB,CAAA;AAEnG,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,WAOvG"}
@@ -1,4 +1,4 @@
1
- import { ANSI_BACKGROUND, ANSI_FOREGROUND, ANSI_WHITE } from './constants';
1
+ import { ANSI_BACKGROUND, ANSI_FOREGROUND, ANSI_WHITE } from './constants.js';
2
2
  export function isColor(color, foreground, background, style) {
3
3
  if (color.length === 1) {
4
4
  return foreground === ANSI_WHITE && color[0] === background + ANSI_BACKGROUND;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isColor.js","sourceRoot":"","sources":["../../ts/ansi/isColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEnG,MAAM,UAAU,OAAO,CAAC,KAAe,EAAE,UAAqB,EAAE,UAAqB,EAAE,KAAiB;IACtG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,UAAU,KAAK,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,eAAe,CAAA;KAC9E;IACD,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,eAAe,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,eAAe,CAAA;IAE3G,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAA;AAClE,CAAC","sourcesContent":["import { AnsiColor, AnsiStyle, ANSI_BACKGROUND, ANSI_FOREGROUND, ANSI_WHITE } from './constants.js'\n\nexport function isColor(color: number[], foreground: AnsiColor, background: AnsiColor, style?: AnsiStyle) {\n if (color.length === 1) {\n return foreground === ANSI_WHITE && color[0] === background + ANSI_BACKGROUND\n }\n const colorMatched = color[1] === foreground + ANSI_FOREGROUND && color[0] === background + ANSI_BACKGROUND\n\n return style ? color[2] === style && colorMatched : colorMatched\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=isColor.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isColor.spec.d.ts","sourceRoot":"","sources":["../../ts/ansi/isColor.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { ANSI_BACKGROUND, ANSI_BRIGHT, ANSI_FOREGROUND, ANSI_RED, ANSI_WHITE } from './constants.js';
2
+ import { isColor } from './isColor.js';
3
+ test('support duo code', () => {
4
+ expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], ANSI_WHITE, ANSI_RED)).toBe(true);
5
+ });
6
+ test('support single code', () => {
7
+ expect(isColor([ANSI_RED + ANSI_BACKGROUND], ANSI_WHITE, ANSI_RED)).toBe(true);
8
+ });
9
+ test('support triple code', () => {
10
+ expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND, ANSI_BRIGHT], ANSI_WHITE, ANSI_RED)).toBe(true);
11
+ });
12
+ test('specific style', () => {
13
+ expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND, ANSI_BRIGHT], ANSI_WHITE, ANSI_RED, ANSI_BRIGHT)).toBe(true);
14
+ });
15
+ //# sourceMappingUR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, ANSI_FOREGROUND, ANSI_RED, ANSI_WHITE } from './constants.js'\nimport { isColor } from './isColor.js'\n\ntest('support duo code', () => {\n expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND], ANSI_WHITE, ANSI_RED)).toBe(true)\n})\n\ntest('support single code', () => {\n expect(isColor([ANSI_RED + ANSI_BACKGROUND], ANSI_WHITE, ANSI_RED)).toBe(true)\n})\n\ntest('support triple code', () => {\n expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND, ANSI_BRIGHT], ANSI_WHITE, ANSI_RED)).toBe(true)\n})\n\ntest('specific style', () => {\n expect(isColor([ANSI_RED + ANSI_BACKGROUND, ANSI_WHITE + ANSI_FOREGROUND, ANSI_BRIGHT], ANSI_WHITE, ANSI_RED, ANSI_BRIGHT)).toBe(true)\n})\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapAnsi.d.ts","sourceRoot":"","sources":["../../ts/ansi/wrapAnsi.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAErD;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAErD"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapAnsi.js","sourceRoot":"","sources":["../../ts/ansi/wrapAnsi.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,EAAU,EAAE,KAAe;IACpD,OAAO,QAAQ,CAAC,oBAAoB,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;AACzD,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAe;IACpD,OAAO,UAAU,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,WAAW,CAAA;AACrD,CAAC;AAED,SAAS,oBAAoB,CAAC,EAAU,EAAE,KAAe;IACvD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;AACjD,CAAC","sourcesContent":["export function wrapAnsiId(id: string, codes: number[]) {\n return wrapAnsi(padIdIfHasBackground(id, codes), codes)\n}\nexport function wrapAnsi(text: string, codes: number[]) {\n return `\\u001B[${codes.join(';')}m${text}\\u001B[0m`\n}\n\nfunction padIdIfHasBackground(id: string, codes: number[]) {\n return codes.some(x => x > 40) ? ` ${id} ` : id\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wrapAnsi.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapAnsi.spec.d.ts","sourceRoot":"","sources":["../../ts/ansi/wrapAnsi.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { wrapAnsi } from './wrapAnsi.js';
2
+ import { ANSI_RED, ANSI_FOREGROUND } from './constants.js';
3
+ test('no background will not pad', () => {
4
+ const actual = wrapAnsi('abc', [ANSI_RED + ANSI_FOREGROUND]);
5
+ expect(actual).toBe(`\u001B[${ANSI_RED + ANSI_FOREGROUND}m${'abc'}\u001B[0m`);
6
+ });
7
+ //# sourceMappingURL=wrapAnsi.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapAnsi.spec.js","sourceRoot":"","sources":["../../ts/ansi/wrapAnsi.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAE1D,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAA;IAC5D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ,GAAG,eAAe,IAAI,KAAK,WAAW,CAAC,CAAA;AAC/E,CAAC,CAAC,CAAA","sourcesContent":["import { wrapAnsi } from './wrapAnsi.js'\nimport { ANSI_RED, ANSI_FOREGROUND } from './constants.js'\n\ntest('no background will not pad', () => {\n const actual = wrapAnsi('abc', [ANSI_RED + ANSI_FOREGROUND])\n expect(actual).toBe(`\\u001B[${ANSI_RED + ANSI_FOREGROUND}m${'abc'}\\u001B[0m`)\n})\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorLogReporter.browser.d.ts","sourceRoot":"","sources":["../ts/createColorLogReporter.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAA+C,MAAM,cAAc,CAAA;AAKrG,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,yBAAyB,6CAEzE"}
@@ -1,7 +1,7 @@
1
1
  import { createConsoleLogReporter, plainLogFormatter } from 'standard-log';
2
2
  import { required } from 'unpartial';
3
- import { createCssFormatter } from './css';
4
- import { supportColor } from './utils';
3
+ import { createCssFormatter } from './css/index.js';
4
+ import { supportColor } from './utils/index.js';
5
5
  export function createColorLogReporter(options) {
6
6
  return createConsoleLogReporter(required({ formatter: getFormatter() }, options));
7
7
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorLogReporter.browser.js","sourceRoot":"","sources":["../ts/createColorLogReporter.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,UAAU,sBAAsB,CAAC,OAAmC;IACxE,OAAO,wBAAwB,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;AACnF,CAAC;AAED,uBAAuB;AACvB,SAAS,YAAY;IACnB,IAAI,CAAC,YAAY,EAAE;QAAE,OAAO,iBAAiB,CAAA;IAE7C,OAAO,kBAAkB,EAAE,CAAA;AAC7B,CAAC","sourcesContent":["import { ConsoleLogReporterOptions, createConsoleLogReporter, plainLogFormatter } from 'standard-log'\nimport { required } from 'unpartial'\nimport { createCssFormatter } from './css/index.js'\nimport { supportColor } from './utils/index.js'\n\nexport function createColorLogReporter(options?: ConsoleLogReporterOptions) {\n return createConsoleLogReporter(required({ formatter: getFormatter() }, options))\n}\n\n// istanbul ignore next\nfunction getFormatter() {\n if (!supportColor()) return plainLogFormatter\n\n return createCssFormatter()\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorLogReporter.d.ts","sourceRoot":"","sources":["../ts/createColorLogReporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAA+C,MAAM,cAAc,CAAA;AAKrG,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,yBAAyB,6CAEzE"}
@@ -1,7 +1,7 @@
1
1
  import { createConsoleLogReporter, plainLogFormatter } from 'standard-log';
2
2
  import { required } from 'unpartial';
3
- import { createAnsiFormatter } from './ansi';
4
- import { supportColor } from './utils';
3
+ import { createAnsiFormatter } from './ansi/index.js';
4
+ import { supportColor } from './utils/index.js';
5
5
  export function createColorLogReporter(options) {
6
6
  return createConsoleLogReporter(required({ formatter: getFormatter() }, options));
7
7
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorLogReporter.js","sourceRoot":"","sources":["../ts/createColorLogReporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,UAAU,sBAAsB,CAAC,OAAmC;IACxE,OAAO,wBAAwB,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;AACnF,CAAC;AAED,SAAS,YAAY;IACnB,uBAAuB;IACvB,IAAI,CAAC,YAAY,EAAE;QAAE,OAAO,iBAAiB,CAAA;IAE7C,OAAO,mBAAmB,EAAE,CAAA;AAC9B,CAAC","sourcesContent":["import { ConsoleLogReporterOptions, createConsoleLogReporter, plainLogFormatter } from 'standard-log'\nimport { required } from 'unpartial'\nimport { createAnsiFormatter } from './ansi/index.js'\nimport { supportColor } from './utils/index.js'\n\nexport function createColorLogReporter(options?: ConsoleLogReporterOptions) {\n return createConsoleLogReporter(required({ formatter: getFormatter() }, options))\n}\n\nfunction getFormatter() {\n // istanbul ignore next\n if (!supportColor()) return plainLogFormatter\n\n return createAnsiFormatter()\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=createColorLogReporter.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createColorLogReporter.spec.d.ts","sourceRoot":"","sources":["../ts/createColorLogReporter.spec.ts"],"names":[],"mappings":""}