sxy-test-runner 1.4.5 → 2.0.1

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 (357) hide show
  1. package/dist/cli/index.d.ts +3 -0
  2. package/dist/cli/index.d.ts.map +1 -0
  3. package/dist/cli/index.js +24 -22
  4. package/dist/cli/index.js.map +1 -0
  5. package/dist/cli/init.d.ts +2 -0
  6. package/dist/cli/init.d.ts.map +1 -0
  7. package/dist/cli/init.js +41 -91
  8. package/dist/cli/init.js.map +1 -0
  9. package/dist/cli/lib/addBasePath.d.ts +3 -0
  10. package/dist/cli/lib/addBasePath.d.ts.map +1 -0
  11. package/dist/cli/lib/addBasePath.js +12 -14
  12. package/dist/cli/lib/addBasePath.js.map +1 -0
  13. package/dist/cli/lib/addBasePath.unitTest.d.ts +2 -0
  14. package/dist/cli/lib/addBasePath.unitTest.d.ts.map +1 -0
  15. package/dist/cli/lib/addBasePath.unitTest.js +51 -29
  16. package/dist/cli/lib/addBasePath.unitTest.js.map +1 -0
  17. package/dist/cli/lib/addExports.d.ts +3 -0
  18. package/dist/cli/lib/addExports.d.ts.map +1 -0
  19. package/dist/cli/lib/addExports.js +13 -11
  20. package/dist/cli/lib/addExports.js.map +1 -0
  21. package/dist/cli/lib/addExports.unitTest.d.ts +2 -0
  22. package/dist/cli/lib/addExports.unitTest.d.ts.map +1 -0
  23. package/dist/cli/lib/addExports.unitTest.js +15 -30
  24. package/dist/cli/lib/addExports.unitTest.js.map +1 -0
  25. package/dist/cli/lib/applyConfigDefaults.d.ts +3 -0
  26. package/dist/cli/lib/applyConfigDefaults.d.ts.map +1 -0
  27. package/dist/cli/lib/applyConfigDefaults.js +6 -42
  28. package/dist/cli/lib/applyConfigDefaults.js.map +1 -0
  29. package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts +2 -0
  30. package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts.map +1 -0
  31. package/dist/cli/lib/applyConfigDefaults.unitTest.js +19 -27
  32. package/dist/cli/lib/applyConfigDefaults.unitTest.js.map +1 -0
  33. package/dist/cli/lib/buildDependencyTree.d.ts +3 -0
  34. package/dist/cli/lib/buildDependencyTree.d.ts.map +1 -0
  35. package/dist/cli/lib/buildDependencyTree.js +23 -34
  36. package/dist/cli/lib/buildDependencyTree.js.map +1 -0
  37. package/dist/cli/lib/buildDependencyTree.unitTest.d.ts +2 -0
  38. package/dist/cli/lib/buildDependencyTree.unitTest.d.ts.map +1 -0
  39. package/dist/cli/lib/buildDependencyTree.unitTest.js +13 -11
  40. package/dist/cli/lib/buildDependencyTree.unitTest.js.map +1 -0
  41. package/dist/cli/lib/buildDependencyTrees.d.ts +3 -0
  42. package/dist/cli/lib/buildDependencyTrees.d.ts.map +1 -0
  43. package/dist/cli/lib/buildDependencyTrees.js +15 -34
  44. package/dist/cli/lib/buildDependencyTrees.js.map +1 -0
  45. package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts +2 -0
  46. package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts.map +1 -0
  47. package/dist/cli/lib/buildDependencyTrees.unitTest.js +18 -14
  48. package/dist/cli/lib/buildDependencyTrees.unitTest.js.map +1 -0
  49. package/dist/cli/lib/defaultConfig.d.ts +3 -0
  50. package/dist/cli/lib/defaultConfig.d.ts.map +1 -0
  51. package/dist/cli/lib/defaultConfig.js +23 -21
  52. package/dist/cli/lib/defaultConfig.js.map +1 -0
  53. package/dist/cli/lib/defaultConfig.unitTest.d.ts +2 -0
  54. package/dist/cli/lib/defaultConfig.unitTest.d.ts.map +1 -0
  55. package/dist/cli/lib/defaultConfig.unitTest.js +7 -0
  56. package/dist/cli/lib/defaultConfig.unitTest.js.map +1 -0
  57. package/dist/cli/lib/doUserSetup.d.ts +3 -0
  58. package/dist/cli/lib/doUserSetup.d.ts.map +1 -0
  59. package/dist/cli/lib/doUserSetup.js +20 -23
  60. package/dist/cli/lib/doUserSetup.js.map +1 -0
  61. package/dist/cli/lib/doUserSetup.unitTest.d.ts +7 -0
  62. package/dist/cli/lib/doUserSetup.unitTest.d.ts.map +1 -0
  63. package/dist/cli/lib/doUserSetup.unitTest.js +41 -36
  64. package/dist/cli/lib/doUserSetup.unitTest.js.map +1 -0
  65. package/dist/cli/lib/doUserTeardown.d.ts +3 -0
  66. package/dist/cli/lib/doUserTeardown.d.ts.map +1 -0
  67. package/dist/cli/lib/doUserTeardown.js +21 -23
  68. package/dist/cli/lib/doUserTeardown.js.map +1 -0
  69. package/dist/cli/lib/doUserTeardown.unitTest.d.ts +7 -0
  70. package/dist/cli/lib/doUserTeardown.unitTest.d.ts.map +1 -0
  71. package/dist/cli/lib/doUserTeardown.unitTest.js +41 -36
  72. package/dist/cli/lib/doUserTeardown.unitTest.js.map +1 -0
  73. package/dist/cli/lib/findTestFiles.d.ts +3 -0
  74. package/dist/cli/lib/findTestFiles.d.ts.map +1 -0
  75. package/dist/cli/lib/findTestFiles.js +16 -24
  76. package/dist/cli/lib/findTestFiles.js.map +1 -0
  77. package/dist/cli/lib/findTestFiles.unitTest.d.ts +2 -0
  78. package/dist/cli/lib/findTestFiles.unitTest.d.ts.map +1 -0
  79. package/dist/cli/lib/findTestFiles.unitTest.js +19 -19
  80. package/dist/cli/lib/findTestFiles.unitTest.js.map +1 -0
  81. package/dist/cli/lib/getAllowedFlags.d.ts +3 -0
  82. package/dist/cli/lib/getAllowedFlags.d.ts.map +1 -0
  83. package/dist/cli/lib/getAllowedFlags.js +10 -8
  84. package/dist/cli/lib/getAllowedFlags.js.map +1 -0
  85. package/dist/cli/lib/getAllowedFlags.unitTest.d.ts +2 -0
  86. package/dist/cli/lib/getAllowedFlags.unitTest.d.ts.map +1 -0
  87. package/dist/cli/lib/getAllowedFlags.unitTest.js +22 -21
  88. package/dist/cli/lib/getAllowedFlags.unitTest.js.map +1 -0
  89. package/dist/cli/lib/globArgCombine.d.ts +3 -0
  90. package/dist/cli/lib/globArgCombine.d.ts.map +1 -0
  91. package/dist/cli/lib/globArgCombine.js +8 -1
  92. package/dist/cli/lib/globArgCombine.js.map +1 -0
  93. package/dist/cli/lib/globArgCombine.unitTest.d.ts +2 -0
  94. package/dist/cli/lib/globArgCombine.unitTest.d.ts.map +1 -0
  95. package/dist/cli/lib/globArgCombine.unitTest.js +19 -18
  96. package/dist/cli/lib/globArgCombine.unitTest.js.map +1 -0
  97. package/dist/cli/lib/injectProperties.d.ts +3 -0
  98. package/dist/cli/lib/injectProperties.d.ts.map +1 -0
  99. package/dist/cli/lib/injectProperties.js +10 -10
  100. package/dist/cli/lib/injectProperties.js.map +1 -0
  101. package/dist/cli/lib/injectProperties.unitTest.d.ts +2 -0
  102. package/dist/cli/lib/injectProperties.unitTest.d.ts.map +1 -0
  103. package/dist/cli/lib/injectProperties.unitTest.js +19 -81
  104. package/dist/cli/lib/injectProperties.unitTest.js.map +1 -0
  105. package/dist/cli/lib/loadConfig.d.ts +3 -0
  106. package/dist/cli/lib/loadConfig.d.ts.map +1 -0
  107. package/dist/cli/lib/loadConfig.js +14 -18
  108. package/dist/cli/lib/loadConfig.js.map +1 -0
  109. package/dist/cli/lib/loadConfig.unitTest.d.ts +2 -0
  110. package/dist/cli/lib/loadConfig.unitTest.d.ts.map +1 -0
  111. package/dist/cli/lib/loadConfig.unitTest.js +15 -15
  112. package/dist/cli/lib/loadConfig.unitTest.js.map +1 -0
  113. package/dist/cli/lib/loadTestFile.d.ts +4 -0
  114. package/dist/cli/lib/loadTestFile.d.ts.map +1 -0
  115. package/dist/cli/lib/loadTestFile.js +48 -78
  116. package/dist/cli/lib/loadTestFile.js.map +1 -0
  117. package/dist/cli/lib/loadTestFile.unitTest.d.ts +2 -0
  118. package/dist/cli/lib/loadTestFile.unitTest.d.ts.map +1 -0
  119. package/dist/cli/lib/loadTestFile.unitTest.js +12 -49
  120. package/dist/cli/lib/loadTestFile.unitTest.js.map +1 -0
  121. package/dist/cli/lib/parseCommandLineArguments.d.ts +3 -0
  122. package/dist/cli/lib/parseCommandLineArguments.d.ts.map +1 -0
  123. package/dist/cli/lib/parseCommandLineArguments.js +48 -42
  124. package/dist/cli/lib/parseCommandLineArguments.js.map +1 -0
  125. package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts +2 -0
  126. package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts.map +1 -0
  127. package/dist/cli/lib/parseCommandLineArguments.unitTest.js +22 -24
  128. package/dist/cli/lib/parseCommandLineArguments.unitTest.js.map +1 -0
  129. package/dist/cli/lib/parseDescribe.d.ts +3 -0
  130. package/dist/cli/lib/parseDescribe.d.ts.map +1 -0
  131. package/dist/cli/lib/parseDescribe.js +67 -81
  132. package/dist/cli/lib/parseDescribe.js.map +1 -0
  133. package/dist/cli/lib/parseDescribe.unitTest.d.ts +2 -0
  134. package/dist/cli/lib/parseDescribe.unitTest.d.ts.map +1 -0
  135. package/dist/cli/lib/parseDescribe.unitTest.js +20 -18
  136. package/dist/cli/lib/parseDescribe.unitTest.js.map +1 -0
  137. package/dist/cli/lib/reservedExportKeys.d.ts +2 -0
  138. package/dist/cli/lib/reservedExportKeys.d.ts.map +1 -0
  139. package/dist/cli/lib/reservedExportKeys.js +12 -1
  140. package/dist/cli/lib/reservedExportKeys.js.map +1 -0
  141. package/dist/cli/lib/reservedExportKeys.unitTest.d.ts +2 -0
  142. package/dist/cli/lib/reservedExportKeys.unitTest.d.ts.map +1 -0
  143. package/dist/cli/lib/reservedExportKeys.unitTest.js +6 -8
  144. package/dist/cli/lib/reservedExportKeys.unitTest.js.map +1 -0
  145. package/dist/cli/lib/runDescribe.d.ts +3 -0
  146. package/dist/cli/lib/runDescribe.d.ts.map +1 -0
  147. package/dist/cli/lib/runDescribe.js +39 -39
  148. package/dist/cli/lib/runDescribe.js.map +1 -0
  149. package/dist/cli/lib/runDescribe.unitTest.d.ts +2 -0
  150. package/dist/cli/lib/runDescribe.unitTest.d.ts.map +1 -0
  151. package/dist/cli/lib/runDescribe.unitTest.js +22 -402
  152. package/dist/cli/lib/runDescribe.unitTest.js.map +1 -0
  153. package/dist/cli/lib/runDescribeRun.d.ts +3 -0
  154. package/dist/cli/lib/runDescribeRun.d.ts.map +1 -0
  155. package/dist/cli/lib/runDescribeRun.js +34 -49
  156. package/dist/cli/lib/runDescribeRun.js.map +1 -0
  157. package/dist/cli/lib/runDescribeRun.unitTest.d.ts +2 -0
  158. package/dist/cli/lib/runDescribeRun.unitTest.d.ts.map +1 -0
  159. package/dist/cli/lib/runDescribeRun.unitTest.js +44 -410
  160. package/dist/cli/lib/runDescribeRun.unitTest.js.map +1 -0
  161. package/dist/cli/lib/runIt.d.ts +3 -0
  162. package/dist/cli/lib/runIt.d.ts.map +1 -0
  163. package/dist/cli/lib/runIt.js +59 -69
  164. package/dist/cli/lib/runIt.js.map +1 -0
  165. package/dist/cli/lib/runIt.unitTest.d.ts +2 -0
  166. package/dist/cli/lib/runIt.unitTest.d.ts.map +1 -0
  167. package/dist/cli/lib/runIt.unitTest.js +73 -410
  168. package/dist/cli/lib/runIt.unitTest.js.map +1 -0
  169. package/dist/cli/lib/runTasks.d.ts +3 -0
  170. package/dist/cli/lib/runTasks.d.ts.map +1 -0
  171. package/dist/cli/lib/runTasks.js +28 -31
  172. package/dist/cli/lib/runTasks.js.map +1 -0
  173. package/dist/cli/lib/runTasks.unitTest.d.ts +5 -0
  174. package/dist/cli/lib/runTasks.unitTest.d.ts.map +1 -0
  175. package/dist/cli/lib/runTasks.unitTest.js +35 -31
  176. package/dist/cli/lib/runTasks.unitTest.js.map +1 -0
  177. package/dist/cli/lib/runTest.d.ts +3 -0
  178. package/dist/cli/lib/runTest.d.ts.map +1 -0
  179. package/dist/cli/lib/runTest.js +54 -66
  180. package/dist/cli/lib/runTest.js.map +1 -0
  181. package/dist/cli/lib/runTest.unitTest.d.ts +20 -0
  182. package/dist/cli/lib/runTest.unitTest.d.ts.map +1 -0
  183. package/dist/cli/lib/runTest.unitTest.js +274 -289
  184. package/dist/cli/lib/runTest.unitTest.js.map +1 -0
  185. package/dist/cli/lib/runTests.d.ts +3 -0
  186. package/dist/cli/lib/runTests.d.ts.map +1 -0
  187. package/dist/cli/lib/runTests.js +123 -141
  188. package/dist/cli/lib/runTests.js.map +1 -0
  189. package/dist/cli/lib/runTests.unitTest.d.ts +6 -0
  190. package/dist/cli/lib/runTests.unitTest.d.ts.map +1 -0
  191. package/dist/cli/lib/runTests.unitTest.js +48 -61
  192. package/dist/cli/lib/runTests.unitTest.js.map +1 -0
  193. package/dist/cli/lib/showTestLoadingError.d.ts +3 -0
  194. package/dist/cli/lib/showTestLoadingError.d.ts.map +1 -0
  195. package/dist/cli/lib/showTestLoadingError.js +22 -33
  196. package/dist/cli/lib/showTestLoadingError.js.map +1 -0
  197. package/dist/cli/lib/showTestLoadingError.unitTest.d.ts +2 -0
  198. package/dist/cli/lib/showTestLoadingError.unitTest.d.ts.map +1 -0
  199. package/dist/cli/lib/showTestLoadingError.unitTest.js +16 -24
  200. package/dist/cli/lib/showTestLoadingError.unitTest.js.map +1 -0
  201. package/dist/cli/lib/showTestResult.d.ts +3 -0
  202. package/dist/cli/lib/showTestResult.d.ts.map +1 -0
  203. package/dist/cli/lib/showTestResult.js +88 -88
  204. package/dist/cli/lib/showTestResult.js.map +1 -0
  205. package/dist/cli/lib/showTestResult.unitTest.d.ts +2 -0
  206. package/dist/cli/lib/showTestResult.unitTest.d.ts.map +1 -0
  207. package/dist/cli/lib/showTestResult.unitTest.js +176 -184
  208. package/dist/cli/lib/showTestResult.unitTest.js.map +1 -0
  209. package/dist/cli/lib/testHelpers/makeCustomOut.d.ts +7 -0
  210. package/dist/cli/lib/testHelpers/makeCustomOut.d.ts.map +1 -0
  211. package/dist/cli/lib/testHelpers/makeCustomOut.js +10 -0
  212. package/dist/cli/lib/testHelpers/makeCustomOut.js.map +1 -0
  213. package/dist/cli/lib/timeProfier.d.ts +3 -0
  214. package/dist/cli/lib/timeProfier.d.ts.map +1 -0
  215. package/dist/cli/lib/timeProfier.js +4 -6
  216. package/dist/cli/lib/timeProfier.js.map +1 -0
  217. package/dist/cli/lib/validateConfig.d.ts +3 -0
  218. package/dist/cli/lib/validateConfig.d.ts.map +1 -0
  219. package/dist/cli/lib/validateConfig.js +21 -24
  220. package/dist/cli/lib/validateConfig.js.map +1 -0
  221. package/dist/cli/lib/validateConfig.unitTest.d.ts +2 -0
  222. package/dist/cli/lib/validateConfig.unitTest.d.ts.map +1 -0
  223. package/dist/cli/lib/validateConfig.unitTest.js +17 -18
  224. package/dist/cli/lib/validateConfig.unitTest.js.map +1 -0
  225. package/dist/cli/lib/{watchFiles.js → watchFiles.d.ts} +2 -1
  226. package/dist/cli/lib/watchFiles.d.ts.map +1 -0
  227. package/dist/cli/lib/watchFiles.js.map +1 -0
  228. package/dist/cli/lib/watchFiles.unitTest.d.ts +2 -0
  229. package/dist/cli/lib/watchFiles.unitTest.d.ts.map +1 -0
  230. package/dist/cli/lib/watchFiles.unitTest.js.map +1 -0
  231. package/dist/cli/lib/watchFilesAndRunTests.d.ts +2 -0
  232. package/dist/cli/lib/watchFilesAndRunTests.d.ts.map +1 -0
  233. package/dist/cli/lib/watchFilesAndRunTests.js +2 -3
  234. package/dist/cli/lib/watchFilesAndRunTests.js.map +1 -0
  235. package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts +2 -0
  236. package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts.map +1 -0
  237. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js +86 -96
  238. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js.map +1 -0
  239. package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts +3 -0
  240. package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts.map +1 -0
  241. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +99 -127
  242. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -0
  243. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts +2 -0
  244. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts.map +1 -0
  245. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js +90 -99
  246. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js.map +1 -0
  247. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts +3 -0
  248. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts.map +1 -0
  249. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +108 -148
  250. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -0
  251. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts +2 -0
  252. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts.map +1 -0
  253. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js +87 -100
  254. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js.map +1 -0
  255. package/dist/cli/lib/watchFilesChokidar.d.ts +4 -0
  256. package/dist/cli/lib/watchFilesChokidar.d.ts.map +1 -0
  257. package/dist/cli/lib/watchFilesChokidar.js +30 -56
  258. package/dist/cli/lib/watchFilesChokidar.js.map +1 -0
  259. package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts +2 -0
  260. package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts.map +1 -0
  261. package/dist/cli/lib/watchFilesChokidar.unitTest.js +77 -81
  262. package/dist/cli/lib/watchFilesChokidar.unitTest.js.map +1 -0
  263. package/dist/cli/lib/watchFilesNodeWatch.d.ts +7 -0
  264. package/dist/cli/lib/watchFilesNodeWatch.d.ts.map +1 -0
  265. package/dist/cli/lib/watchFilesNodeWatch.js +31 -41
  266. package/dist/cli/lib/watchFilesNodeWatch.js.map +1 -0
  267. package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts +2 -0
  268. package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts.map +1 -0
  269. package/dist/cli/lib/watchFilesNodeWatch.unitTest.js +41 -46
  270. package/dist/cli/lib/watchFilesNodeWatch.unitTest.js.map +1 -0
  271. package/dist/cli/once.d.ts +2 -0
  272. package/dist/cli/once.d.ts.map +1 -0
  273. package/dist/cli/once.js +59 -42
  274. package/dist/cli/once.js.map +1 -0
  275. package/dist/cli/once.unitTest.d.ts +2 -0
  276. package/dist/cli/once.unitTest.d.ts.map +1 -0
  277. package/dist/cli/once.unitTest.js +74 -39
  278. package/dist/cli/once.unitTest.js.map +1 -0
  279. package/dist/cli/watch.d.ts +2 -0
  280. package/dist/cli/watch.d.ts.map +1 -0
  281. package/dist/cli/watch.js +64 -114
  282. package/dist/cli/watch.js.map +1 -0
  283. package/dist/cli/watch.unitTest.d.ts +6 -0
  284. package/dist/cli/watch.unitTest.d.ts.map +1 -0
  285. package/dist/cli/watch.unitTest.js +100 -111
  286. package/dist/cli/watch.unitTest.js.map +1 -0
  287. package/dist/config.d.ts +7 -0
  288. package/dist/config.d.ts.map +1 -0
  289. package/dist/config.js +13 -2
  290. package/dist/config.js.map +1 -0
  291. package/dist/describe.d.ts +3 -0
  292. package/dist/describe.d.ts.map +1 -0
  293. package/dist/describe.js +20 -34
  294. package/dist/describe.js.map +1 -0
  295. package/dist/describe.unitTest.d.ts +2 -0
  296. package/dist/describe.unitTest.d.ts.map +1 -0
  297. package/dist/describe.unitTest.js +19 -23
  298. package/dist/describe.unitTest.js.map +1 -0
  299. package/dist/index.d.ts +2 -0
  300. package/dist/index.d.ts.map +1 -0
  301. package/dist/index.js +2 -1
  302. package/dist/index.js.map +1 -0
  303. package/dist/indexNumberToLetters.d.ts +2 -0
  304. package/dist/indexNumberToLetters.d.ts.map +1 -0
  305. package/dist/indexNumberToLetters.js +12 -11
  306. package/dist/indexNumberToLetters.js.map +1 -0
  307. package/dist/output.d.ts +6 -0
  308. package/dist/output.d.ts.map +1 -0
  309. package/dist/output.js +16 -18
  310. package/dist/output.js.map +1 -0
  311. package/dist/packages/chalk.d.ts +14 -0
  312. package/dist/packages/chalk.d.ts.map +1 -0
  313. package/dist/packages/chalk.js +22 -0
  314. package/dist/packages/chalk.js.map +1 -0
  315. package/dist/packages/figures.d.ts +6 -0
  316. package/dist/packages/figures.d.ts.map +1 -0
  317. package/dist/packages/figures.js +24 -0
  318. package/dist/packages/figures.js.map +1 -0
  319. package/dist/packages/loadConfig.d.ts +3 -0
  320. package/dist/packages/loadConfig.d.ts.map +1 -0
  321. package/dist/packages/loadConfig.js +28 -0
  322. package/dist/packages/loadConfig.js.map +1 -0
  323. package/dist/packages/mergeStructuredConfig.d.ts +2 -0
  324. package/dist/packages/mergeStructuredConfig.d.ts.map +1 -0
  325. package/dist/packages/mergeStructuredConfig.js +26 -0
  326. package/dist/packages/mergeStructuredConfig.js.map +1 -0
  327. package/dist/packages/slash.d.ts +2 -0
  328. package/dist/packages/slash.d.ts.map +1 -0
  329. package/dist/packages/slash.js +9 -0
  330. package/dist/packages/slash.js.map +1 -0
  331. package/dist/packages/timeProfiler.d.ts +6 -0
  332. package/dist/packages/timeProfiler.d.ts.map +1 -0
  333. package/dist/packages/timeProfiler.js +32 -0
  334. package/dist/packages/timeProfiler.js.map +1 -0
  335. package/dist/types.d.ts +138 -0
  336. package/dist/types.d.ts.map +1 -0
  337. package/dist/types.js +6 -0
  338. package/dist/types.js.map +1 -0
  339. package/package.json +25 -22
  340. package/dist/cli/files.js +0 -20
  341. package/dist/cli/files.unitTest.js +0 -246
  342. package/dist/cli/init.unitTest.js +0 -0
  343. package/dist/cli/lib/defaultConfig.test.js +0 -9
  344. package/dist/cli/lib/loadTestFileStatic.js +0 -41
  345. package/dist/cli/lib/loadTestFileStatic.unitTest.js +0 -30
  346. package/dist/cli/lib/processWatchEvent.js +0 -1
  347. package/dist/cli/lib/processWatchEvent.unitTest.js +0 -15
  348. package/dist/cli/lib/runDescribe.old.js +0 -108
  349. package/dist/cli/lib/runDescribe.old.unitTest.js +0 -440
  350. package/dist/cli/lib/runTest-old.js +0 -160
  351. package/dist/cli/lib/runTest-old.unitTest.js +0 -184
  352. package/dist/cli/lib/watchFiles.unitTest.js +0 -50
  353. package/dist/describe-old.js +0 -271
  354. package/dist/describe-old.unitTest.js +0 -30
  355. package/dist/exported.eslintrc.js +0 -7
  356. package/dist/testsState.js +0 -5
  357. package/dist/timeProfiling.js +0 -9
@@ -1,41 +1,46 @@
1
1
  import { applyConfigDefaults } from './applyConfigDefaults.js';
2
2
  import { doUserTeardown } from './doUserTeardown.js';
3
-
4
- // applyConfigDefaults( userConfig: {} )
5
-
6
- await mochaDescribe('the doUserTeardown() function', async function () {
7
- await mochaIt('executes a user teardown function', async function () {
8
- let teardownFunctionHasRun = false;
9
- const config = await applyConfigDefaults({
10
- teardown: async function () {
11
- teardownFunctionHasRun = true;
12
- }
3
+ mochaDescribe('the doUserTeardown() function', function () {
4
+ mochaIt('executes a user teardown function', async function () {
5
+ let teardownFunctionHasRun = false;
6
+ const config = applyConfigDefaults({
7
+ teardown: function () {
8
+ teardownFunctionHasRun = true;
9
+ }
10
+ });
11
+ await doUserTeardown(config);
12
+ teardownFunctionHasRun.should.equal(true);
13
13
  });
14
- await doUserTeardown(config);
15
- await teardownFunctionHasRun.should.equal(true);
16
- }), await mochaIt('runs a user specified file', async function () {
17
- global.teardownFileHasRun = false;
18
- const config = await applyConfigDefaults({
19
- teardown: 'unitTesting/teardownFiles/teardown.js'
14
+ mochaIt('runs a user specified file', async function () {
15
+ global.teardownFileHasRun = false;
16
+ const config = applyConfigDefaults({
17
+ teardown: 'unitTesting/teardownFiles/teardown.js'
18
+ });
19
+ await doUserTeardown(config);
20
+ global.teardownFileHasRun.should.equal(true);
20
21
  });
21
- await doUserTeardown(config);
22
- await global.teardownFileHasRun.should.equal(true);
23
- }), await mochaIt('runs an array of functions and or files', async function () {
24
- let teardownFunction1HasRun = false;
25
- let teardownFunction2HasRun = false;
26
- global.teardownFile1HasRun = false;
27
- global.teardownFile2HasRun = false;
28
- const config = await applyConfigDefaults({
29
- teardown: [async function teardown1() {
30
- teardownFunction1HasRun = true;
31
- }, async function teardown2() {
32
- teardownFunction2HasRun = true;
33
- }, 'unitTesting/teardownFiles/teardown-1.js', 'unitTesting/teardownFiles/teardown-2.js']
22
+ mochaIt('runs an array of functions and or files', async function () {
23
+ let teardownFunction1HasRun = false;
24
+ let teardownFunction2HasRun = false;
25
+ global.teardownFile1HasRun = false;
26
+ global.teardownFile2HasRun = false;
27
+ const config = applyConfigDefaults({
28
+ teardown: [
29
+ function teardown1() {
30
+ teardownFunction1HasRun = true;
31
+ },
32
+ function teardown2() {
33
+ teardownFunction2HasRun = true;
34
+ },
35
+ 'unitTesting/teardownFiles/teardown-1.js',
36
+ 'unitTesting/teardownFiles/teardown-2.js'
37
+ ]
38
+ });
39
+ await doUserTeardown(config);
40
+ teardownFunction1HasRun.should.equal(true);
41
+ teardownFunction2HasRun.should.equal(true);
42
+ global.teardownFile1HasRun.should.equal(true);
43
+ global.teardownFile2HasRun.should.equal(true);
34
44
  });
35
- await doUserTeardown(config);
36
- await teardownFunction1HasRun.should.equal(true);
37
- await teardownFunction2HasRun.should.equal(true);
38
- await global.teardownFile1HasRun.should.equal(true);
39
- await global.teardownFile2HasRun.should.equal(true);
40
- });
41
- });
45
+ });
46
+ //# sourceMappingURL=doUserTeardown.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doUserTeardown.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/doUserTeardown.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAWpD,aAAa,CAAC,+BAA+B,EAAE;IAC3C,OAAO,CAAC,mCAAmC,EAAE,KAAK;QAC9C,IAAI,sBAAsB,GAAG,KAAK,CAAA;QAElC,MAAM,MAAM,GAAG,mBAAmB,CAAC;YAC/B,QAAQ,EAAE;gBACN,sBAAsB,GAAG,IAAI,CAAA;YACjC,CAAC;SACJ,CAAC,CAAA;QAEF,MAAM,cAAc,CAAC,MAAM,CAAC,CAAA;QAE5B,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC7C,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,4BAA4B,EAAE,KAAK;QACvC,MAAM,CAAC,kBAAkB,GAAG,KAAK,CAAA;QAEjC,MAAM,MAAM,GAAG,mBAAmB,CAAC;YAC/B,QAAQ,EAAE,uCAAuC;SACpD,CAAC,CAAA;QAEF,MAAM,cAAc,CAAC,MAAM,CAAC,CAAA;QAE5B,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,yCAAyC,EAAE,KAAK;QACpD,IAAI,uBAAuB,GAAG,KAAK,CAAA;QACnC,IAAI,uBAAuB,GAAG,KAAK,CAAA;QACnC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAA;QAClC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAA;QAElC,MAAM,MAAM,GAAG,mBAAmB,CAAC;YAC/B,QAAQ,EAAE;gBACN,SAAS,SAAS;oBACd,uBAAuB,GAAG,IAAI,CAAA;gBAClC,CAAC;gBACD,SAAS,SAAS;oBACd,uBAAuB,GAAG,IAAI,CAAA;gBAClC,CAAC;gBACD,yCAAyC;gBACzC,yCAAyC;aAC5C;SACJ,CAAC,CAAA;QAEF,MAAM,cAAc,CAAC,MAAM,CAAC,CAAA;QAE5B,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC1C,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC1C,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC7C,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Config } from '../../types.js';
2
+ export declare function findTestFiles(config: Config): Promise<string[]>;
3
+ //# sourceMappingURL=findTestFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findTestFiles.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/findTestFiles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAI5C,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAerE"}
@@ -1,26 +1,18 @@
1
- import { loadConfig as sxyLoadConfig, createTimeProfiler } from 'sxy-dev-tools';
2
- import { packageName, cliName, configFileName, configLocations, showTimeProfiling } from '../../config.js';
3
- import chalk from 'chalk-extensions';
4
- import { globby } from 'globby';
5
- import { out, log, debug } from '../../output.js';
6
- const {
7
- timeProfileAsync
8
- } = await createTimeProfiler(showTimeProfiling);
1
+ import { glob } from 'fs/promises';
2
+ import slash from '../../packages/slash.js';
9
3
  import { addBasePath } from './addBasePath.js';
10
4
  export async function findTestFiles(config) {
11
- return await timeProfileAsync('find test files', async () => {
12
- const testsGlobs = await addBasePath(config.testsBase, config.tests);
13
- const testsIgnoreGlobs = await addBasePath(config.testsBase, config.testsIgnore);
14
- await debug('testsGlobs', testsGlobs);
15
- await debug('testsIgnoreGlobs', testsIgnoreGlobs);
16
- const globOptions = {
17
- //cwd: projectDir,
18
- ignore: testsIgnoreGlobs
19
- };
20
-
21
- //const testFiles = globby(testsGlobs, testsIgnoreGlobs)
22
- const testFiles = await globby(testsGlobs, globOptions);
23
- await debug('testFiles', testFiles);
24
- return testFiles;
25
- });
26
- }
5
+ const testsGlobs = addBasePath(config.testsBase, config.tests);
6
+ const testsIgnoreGlobs = addBasePath(config.testsBase, config.testsIgnore);
7
+ // Node's built-in glob replaces the globby/tinyglobby dependency (no import cost).
8
+ // It yields OS-native separators, so slash() restores the forward-slash paths the
9
+ // rest of the runner relies on (watch-mode minimatch filters, dependency-tree keys).
10
+ const files = [];
11
+ for await (const file of glob(testsGlobs, {
12
+ exclude: Array.isArray(testsIgnoreGlobs) ? testsIgnoreGlobs : [testsIgnoreGlobs]
13
+ })) {
14
+ files.push(slash(file));
15
+ }
16
+ return files;
17
+ }
18
+ //# sourceMappingURL=findTestFiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findTestFiles.js","sourceRoot":"","sources":["../../../src/cli/lib/findTestFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,MAAM,yBAAyB,CAAA;AAG3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc;IAC9C,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;IAC9D,MAAM,gBAAgB,GAAG,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IAE1E,mFAAmF;IACnF,kFAAkF;IAClF,qFAAqF;IACrF,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;QACtC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;KACnF,CAAC,EAAE,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IAC3B,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=findTestFiles.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findTestFiles.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/findTestFiles.unitTest.ts"],"names":[],"mappings":""}
@@ -1,24 +1,24 @@
1
1
  import { applyConfigDefaults } from './applyConfigDefaults.js';
2
2
  import { findTestFiles } from './findTestFiles.js';
3
-
4
3
  // findTestFiles(config)
5
-
6
- await mochaDescribe('findTestFiles() function', async function () {
7
- await mochaIt('finds the tests files', async function () {
8
- // get the default configs
9
- const config = await applyConfigDefaults({
10
- tests: 'unitTesting/**/*.test.js'
4
+ mochaDescribe('findTestFiles() function', function () {
5
+ mochaIt('finds the tests files', async function () {
6
+ // get the default configs
7
+ const config = applyConfigDefaults({ tests: 'unitTesting/**/*.test.js' });
8
+ const testFiles = await findTestFiles(config);
9
+ testFiles.should.include.members([
10
+ 'unitTesting/sampleTests/1.test.js',
11
+ 'unitTesting/sampleTests/2.test.js'
12
+ ]);
11
13
  });
12
- const testFiles = await findTestFiles(config);
13
- await testFiles.should.include.members(['unitTesting/sampleTests/1.test.js', 'unitTesting/sampleTests/2.test.js']);
14
- });
15
- await mochaIt('respects tests base config entry', async function () {
16
- // get the default configs
17
- const config = await applyConfigDefaults({
18
- testsBase: 'src',
19
- tests: 'unitTesting/**/*.test.js'
14
+ mochaIt('respects tests base config entry', async function () {
15
+ // get the default configs
16
+ const config = applyConfigDefaults({
17
+ testsBase: 'src',
18
+ tests: 'unitTesting/**/*.test.js'
19
+ });
20
+ const testFiles = await findTestFiles(config);
21
+ testFiles.length.should.equal(0);
20
22
  });
21
- const testFiles = await findTestFiles(config);
22
- await testFiles.length.should.equal(0);
23
- });
24
- });
23
+ });
24
+ //# sourceMappingURL=findTestFiles.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findTestFiles.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/findTestFiles.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,wBAAwB;AAExB,aAAa,CAAC,0BAA0B,EAAE;IACtC,OAAO,CAAC,uBAAuB,EAAE,KAAK;QAClC,0BAA0B;QAC1B,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAA;QAEzE,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAA;QAE7C,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;YAC7B,mCAAmC;YACnC,mCAAmC;SACtC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,kCAAkC,EAAE,KAAK;QAC7C,0BAA0B;QAC1B,MAAM,MAAM,GAAG,mBAAmB,CAAC;YAC/B,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,0BAA0B;SACpC,CAAC,CAAA;QAEF,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAA;QAE7C,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { AllowedArguments, AllowedFlags } from '../../types.js';
2
+ export declare function getAllowedFlags(allowedArguments: AllowedArguments): AllowedFlags;
3
+ //# sourceMappingURL=getAllowedFlags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAllowedFlags.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/getAllowedFlags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEpE,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,YAAY,CAShF"}
@@ -1,9 +1,11 @@
1
- export async function getAllowedFlags(allowedArguments) {
2
- const allowedFlags = {};
3
- for (const option in allowedArguments) {
4
- if ('flag' in allowedArguments[option]) {
5
- allowedFlags[allowedArguments[option].flag] = option;
1
+ export function getAllowedFlags(allowedArguments) {
2
+ const allowedFlags = {};
3
+ for (const option in allowedArguments) {
4
+ const argument = allowedArguments[option];
5
+ if (argument && 'flag' in argument) {
6
+ allowedFlags[argument.flag] = option;
7
+ }
6
8
  }
7
- }
8
- return allowedFlags;
9
- }
9
+ return allowedFlags;
10
+ }
11
+ //# sourceMappingURL=getAllowedFlags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAllowedFlags.js","sourceRoot":"","sources":["../../../src/cli/lib/getAllowedFlags.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,gBAAkC;IAC9D,MAAM,YAAY,GAAiB,EAAE,CAAA;IACrC,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;QACzC,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;YACjC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;QACxC,CAAC;IACL,CAAC;IACD,OAAO,YAAY,CAAA;AACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=getAllowedFlags.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAllowedFlags.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/getAllowedFlags.unitTest.ts"],"names":[],"mappings":""}
@@ -1,22 +1,23 @@
1
1
  import { getAllowedFlags } from './getAllowedFlags.js';
2
-
3
- // findTestFiles(config)
4
-
5
- await mochaDescribe('getAllowedFlags() function', async function () {
6
- await mochaIt('extracts the flags from an allowedArguments object', async function () {
7
- const allowedArguments = {
8
- 'config': {
9
- flag: 'c',
10
- hasValue: true
11
- },
12
- 'watch': {
13
- flag: 'w',
14
- hasValue: false
15
- }
16
- };
17
- const allowedFlags = await getAllowedFlags(allowedArguments);
18
- await allowedFlags.should.have.keys(['c', 'w']);
19
- await allowedFlags.c.should.equal('config');
20
- await allowedFlags.w.should.equal('watch');
21
- });
22
- });
2
+ mochaDescribe('getAllowedFlags() function', function () {
3
+ mochaIt('extracts the flags from an allowedArguments object', function () {
4
+ const allowedArguments = {
5
+ config: {
6
+ flag: 'c',
7
+ hasValue: true
8
+ },
9
+ watch: {
10
+ flag: 'w',
11
+ hasValue: false
12
+ }
13
+ };
14
+ const allowedFlags = getAllowedFlags(allowedArguments);
15
+ allowedFlags.should.have.keys([
16
+ 'c',
17
+ 'w'
18
+ ]);
19
+ allowedFlags.c?.should.equal('config');
20
+ allowedFlags.w?.should.equal('watch');
21
+ });
22
+ });
23
+ //# sourceMappingURL=getAllowedFlags.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAllowedFlags.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/getAllowedFlags.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,aAAa,CAAC,4BAA4B,EAAE;IACxC,OAAO,CAAC,oDAAoD,EAAE;QAC1D,MAAM,gBAAgB,GAAqB;YACvC,MAAM,EAAE;gBACJ,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,IAAI;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,KAAK;aAClB;SACJ,CAAA;QAED,MAAM,YAAY,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAA;QAEtD,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1B,GAAG;YACH,GAAG;SACN,CAAC,CAAA;QAEF,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QACtC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GlobPattern } from '../../types.js';
2
+ export declare function globArgCombine(patterns: GlobPattern): string;
3
+ //# sourceMappingURL=globArgCombine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globArgCombine.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/globArgCombine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAK5D"}
@@ -1 +1,8 @@
1
- export const globArgCombine = patterns => Array.isArray(patterns) ? patterns.length > 1 ? '{' + patterns.join(',') + '}' : patterns[0] : patterns;
1
+ export function globArgCombine(patterns) {
2
+ if (!Array.isArray(patterns))
3
+ return patterns;
4
+ return (patterns.length > 1)
5
+ ? '{' + patterns.join(',') + '}'
6
+ : (patterns[0] ?? '');
7
+ }
8
+ //# sourceMappingURL=globArgCombine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globArgCombine.js","sourceRoot":"","sources":["../../../src/cli/lib/globArgCombine.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,cAAc,CAAC,QAAqB;IAChD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAA;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG;QAChC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAC7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=globArgCombine.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globArgCombine.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/globArgCombine.unitTest.ts"],"names":[],"mappings":""}
@@ -1,18 +1,19 @@
1
- import { globArgCombine } from "./globArgCombine.js";
2
- await mochaDescribe('globArgCombine() function', async function () {
3
- await mochaIt('leaves strings alone', async function () {
4
- const testString = '*.test.js';
5
- const result = await globArgCombine(testString);
6
- await result.should.equal(testString);
7
- });
8
- await mochaIt('extracts the item from a single item array', async function () {
9
- const testStringsArray = ['*.test.js'];
10
- const result = await globArgCombine(testStringsArray);
11
- await result.should.equal(testStringsArray[0]);
12
- });
13
- await mochaIt('combined an array into a multi option glob e.g. {a,b}', async function () {
14
- const testStringsArray = ['*.test.js', '*.spec.js'];
15
- const result = await globArgCombine(testStringsArray);
16
- await result.should.equal(`{${testStringsArray[0]},${testStringsArray[1]}}`);
17
- });
18
- });
1
+ import { globArgCombine } from './globArgCombine.js';
2
+ mochaDescribe('globArgCombine() function', function () {
3
+ mochaIt('leaves strings alone', function () {
4
+ const testString = '*.test.js';
5
+ const result = globArgCombine(testString);
6
+ result.should.equal(testString);
7
+ });
8
+ mochaIt('extracts the item from a single item array', function () {
9
+ const testStringsArray = ['*.test.js'];
10
+ const result = globArgCombine(testStringsArray);
11
+ result.should.equal(testStringsArray[0]);
12
+ });
13
+ mochaIt('combined an array into a multi option glob e.g. {a,b}', function () {
14
+ const testStringsArray = ['*.test.js', '*.spec.js'];
15
+ const result = globArgCombine(testStringsArray);
16
+ result.should.equal(`{${testStringsArray[0]},${testStringsArray[1]}}`);
17
+ });
18
+ });
19
+ //# sourceMappingURL=globArgCombine.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globArgCombine.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/globArgCombine.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,aAAa,CAAC,2BAA2B,EAAE;IACvC,OAAO,CAAC,sBAAsB,EAAE;QAC5B,MAAM,UAAU,GAAG,WAAW,CAAA;QAE9B,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;QAEzC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,4CAA4C,EAAE;QAClD,MAAM,gBAAgB,GAAG,CAAC,WAAW,CAAC,CAAA;QAEtC,MAAM,MAAM,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAE/C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,uDAAuD,EAAE;QAC7D,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;QAEnD,MAAM,MAAM,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAE/C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IAC1E,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { OutFn, TaskExports } from '../../types.js';
2
+ export declare function injectProperties(basePackage: unknown, injectProperties: TaskExports, from: string, customOut?: OutFn): void;
3
+ //# sourceMappingURL=injectProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectProperties.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/injectProperties.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAExD,wBAAgB,gBAAgB,CAC5B,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GACrF,IAAI,CAQN"}
@@ -1,11 +1,11 @@
1
- import { out as mainOut, log, debug } from '../../output.js';
2
- const reservedKeys = ['describe', 'test', 'it', 'before', 'after', 'beforeEach', 'afterEach', 'beforeAll', 'afterAll'];
3
- export async function injectProperties(basePackage, injectProperties, from, customOut = undefined) {
4
- const out = customOut ? async (...texts) => await customOut(...texts) : async (...texts) => await mainOut(...texts);
5
- for (const key in injectProperties) {
6
- if (await reservedKeys.includes(key)) {
7
- await out(`Error: key '${key}' is reserved. Please do not use this key. From '${from}'.`);
8
- //process.exit(1)
1
+ import { out as mainOut } from '../../output.js';
2
+ import { reservedExportKeys } from './reservedExportKeys.js';
3
+ export function injectProperties(basePackage, injectProperties, from, customOut) {
4
+ const out = customOut ?? mainOut;
5
+ for (const key in injectProperties) {
6
+ if (reservedExportKeys.includes(key)) {
7
+ out(`Error: key '${key}' is reserved. Please do not use this key. From '${from}'.`);
8
+ }
9
9
  }
10
- }
11
- }
10
+ }
11
+ //# sourceMappingURL=injectProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectProperties.js","sourceRoot":"","sources":["../../../src/cli/lib/injectProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D,MAAM,UAAU,gBAAgB,CAC5B,WAAoB,EAAE,gBAA6B,EAAE,IAAY,EAAE,SAAiB;IAEpF,MAAM,GAAG,GAAG,SAAS,IAAI,OAAO,CAAA;IAEhC,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACjC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,GAAG,CAAC,eAAe,GAAG,oDAAoD,IAAI,IAAI,CAAC,CAAA;QACvF,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=injectProperties.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectProperties.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/injectProperties.unitTest.ts"],"names":[],"mappings":""}
@@ -1,81 +1,19 @@
1
- import { injectProperties } from "./injectProperties.js";
2
- import chalk from 'chalk-extensions';
3
- await mochaDescribe('injectProperties() function', async function () {
4
- await mochaIt('complains if a reserved property is given', async function () {
5
- let outBuffer = '';
6
- const customOut = (...texts) => {
7
- //console.log(chalk.red`outBuffer1`, outBuffer)
8
- console.log(...texts);
9
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
10
- //console.log(chalk.red`outBuffer2`, outBuffer)
11
- };
12
- const errorString = 'is reserved';
13
- const basePacket = {};
14
- let properties;
15
- outBuffer = '';
16
- properties = {
17
- describe: true
18
- };
19
- await injectProperties(basePacket, properties, '', customOut);
20
- await outBuffer.should.include(errorString);
21
- outBuffer = '';
22
- properties = {
23
- it: true
24
- };
25
- await injectProperties(basePacket, properties, '', customOut);
26
- await outBuffer.should.include(errorString);
27
- outBuffer = '';
28
- properties = {
29
- test: true
30
- };
31
- await injectProperties(basePacket, properties, '', customOut);
32
- await outBuffer.should.include(errorString);
33
- outBuffer = '';
34
- properties = {
35
- before: true
36
- };
37
- await injectProperties(basePacket, properties, '', customOut);
38
- await outBuffer.should.include(errorString);
39
- outBuffer = '';
40
- properties = {
41
- after: true
42
- };
43
- await injectProperties(basePacket, properties, '', customOut);
44
- await outBuffer.should.include(errorString);
45
- outBuffer = '';
46
- properties = {
47
- beforeEach: true
48
- };
49
- await injectProperties(basePacket, properties, '', customOut);
50
- await outBuffer.should.include(errorString);
51
- outBuffer = '';
52
- properties = {
53
- afterEach: true
54
- };
55
- await injectProperties(basePacket, properties, '', customOut);
56
- await outBuffer.should.include(errorString);
57
- });
58
-
59
- // mochaIt('complains if a passed property conflics with a base property', function() {
60
-
61
- // let outBuffer = ''
62
- // const customOut = sync((...texts) => {
63
- // console.log(...texts)
64
- // outBuffer += texts.join(' ') + '\n' // join and save to the buffer
65
- // })
66
-
67
- // const errorString = 'is reserved'
68
-
69
- // const basePacket = {}
70
-
71
- // let properties
72
-
73
- // outBuffer = ''
74
- // properties = {
75
- // describe: true
76
- // }
77
- // injectProperties(basePacket, properties, '', customOut)
78
- // outBuffer.should.include(errorString)
79
-
80
- // })
81
- });
1
+ import { injectProperties } from './injectProperties.js';
2
+ mochaDescribe('injectProperties() function', function () {
3
+ mochaIt('complains if a reserved property is given', function () {
4
+ let outBuffer = '';
5
+ const customOut = (...texts) => {
6
+ console.log(...texts); // eslint-disable-line no-console
7
+ outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
8
+ };
9
+ const errorString = 'is reserved';
10
+ const basePacket = {};
11
+ const reservedKeys = ['describe', 'it', 'test', 'before', 'after', 'beforeEach', 'afterEach'];
12
+ for (const key of reservedKeys) {
13
+ outBuffer = '';
14
+ injectProperties(basePacket, { [key]: true }, '', customOut);
15
+ outBuffer.should.include(errorString);
16
+ }
17
+ });
18
+ });
19
+ //# sourceMappingURL=injectProperties.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectProperties.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/injectProperties.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,aAAa,CAAC,6BAA6B,EAAE;IACzC,OAAO,CAAC,2CAA2C,EAAE;QACjD,IAAI,SAAS,GAAG,EAAE,CAAA;QAClB,MAAM,SAAS,GAAG,CAAC,GAAG,KAAgB,EAAQ,EAAE;YAC5C,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA,CAAC,iCAAiC;YACvD,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA,CAAC,8BAA8B;QACtE,CAAC,CAAA;QAED,MAAM,WAAW,GAAG,aAAa,CAAA;QACjC,MAAM,UAAU,GAAG,EAAE,CAAA;QACrB,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAA;QAE7F,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;YAC7B,SAAS,GAAG,EAAE,CAAA;YACd,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;YAC5D,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QACzC,CAAC;IACL,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { UserConfig } from '../../types.js';
2
+ export declare function loadConfig(customLocation?: string): Promise<UserConfig>;
3
+ //# sourceMappingURL=loadConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfig.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/loadConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,wBAAsB,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAa7E"}
@@ -1,21 +1,17 @@
1
- import { loadConfig as sxyLoadConfig, loadConfigExact as sxyLoadConfigExact, createTimeProfiler } from 'sxy-dev-tools';
2
- import { packageName, cliName, configFileName, configLocations, showTimeProfiling } from '../../config.js';
3
- import chalk from 'chalk-extensions';
4
- import { out, log, debug } from '../../output.js';
5
- const {
6
- timeProfileAsync
7
- } = await createTimeProfiler(showTimeProfiling);
8
- export async function loadConfig(customLocation = undefined) {
9
- return await timeProfileAsync('load config', async () => {
10
- const configOrNull = customLocation !== undefined ? await sxyLoadConfigExact(customLocation) : await sxyLoadConfig(configFileName, configLocations);
11
- await debug('configOrNull', typeof configOrNull, configOrNull);
1
+ import { loadConfig as sxyLoadConfig, loadConfigExact as sxyLoadConfigExact } from '../../packages/loadConfig.js';
2
+ import { packageName, cliName, configFileName, configLocations } from '../../config.js';
3
+ import chalk from '../../packages/chalk.js';
4
+ import { out } from '../../output.js';
5
+ export async function loadConfig(customLocation) {
6
+ const configOrNull = (customLocation !== undefined)
7
+ ? await sxyLoadConfigExact(customLocation)
8
+ : await sxyLoadConfig(configFileName, configLocations);
12
9
  if (!configOrNull) {
13
- await out(await chalk.orange(`[${packageName}] No config found.` + `\nPlease create a ${configFileName}.js/cjs/mjs file in your project root or /config folder.` + `\nOr run \`npx ${cliName} init\` to create one.`));
14
- await process.exit(0);
10
+ out(chalk.orange(`[${packageName}] No config found.`
11
+ + `\nPlease create a ${configFileName}.js/cjs/mjs file in your project root or /config folder.`
12
+ + `\nOr run \`npx ${cliName} init\` to create one.`));
13
+ process.exit(0);
15
14
  }
16
-
17
- //log('user config', configOrNull)
18
-
19
15
  return configOrNull;
20
- });
21
- }
16
+ }
17
+ //# sourceMappingURL=loadConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfig.js","sourceRoot":"","sources":["../../../src/cli/lib/loadConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACvF,OAAO,KAAK,MAAM,yBAAyB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAGrC,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,cAAuB;IACpD,MAAM,YAAY,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC;QAC/C,CAAC,CAAC,MAAM,kBAAkB,CAAa,cAAc,CAAC;QACtD,CAAC,CAAC,MAAM,aAAa,CAAa,cAAc,EAAE,eAAe,CAAC,CAAA;IAEtE,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,WAAW,oBAAoB;cAC9C,qBAAqB,cAAc,0DAA0D;cAC7F,kBAAkB,OAAO,wBAAwB,CAAC,CAAC,CAAA;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC;IAED,OAAO,YAAY,CAAA;AACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=loadConfig.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfig.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/loadConfig.unitTest.ts"],"names":[],"mappings":""}