testcafe 1.13.0 → 1.14.2

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 (336) hide show
  1. package/CHANGELOG.md +88 -10
  2. package/LICENSE +21 -21
  3. package/README.md +52 -48
  4. package/bin/testcafe-with-v8-flag-filter.js +0 -0
  5. package/lib/api/exportable-lib/index.js +50 -50
  6. package/lib/api/request-hooks/assert-type.js +7 -7
  7. package/lib/api/request-hooks/hook-method-names.js +11 -0
  8. package/lib/api/request-hooks/hook.js +33 -39
  9. package/lib/api/request-hooks/interfaces.js +3 -3
  10. package/lib/api/request-hooks/request-logger.js +113 -111
  11. package/lib/api/request-hooks/request-mock/create-request-mock.js +12 -0
  12. package/lib/api/request-hooks/request-mock/index.js +46 -0
  13. package/lib/api/request-hooks/request-mock.js +47 -48
  14. package/lib/api/structure/base-unit.js +11 -11
  15. package/lib/api/structure/fixture.js +75 -75
  16. package/lib/api/structure/interfaces.js +2 -2
  17. package/lib/api/structure/test-file.js +31 -31
  18. package/lib/api/structure/test-timeout.js +9 -9
  19. package/lib/api/structure/test.js +85 -85
  20. package/lib/api/structure/testing-unit.js +89 -89
  21. package/lib/api/structure/unit-type.js +9 -9
  22. package/lib/api/test-controller/assertion.js +88 -88
  23. package/lib/api/test-controller/execution-context.js +82 -82
  24. package/lib/api/test-controller/index.js +359 -319
  25. package/lib/api/test-controller/proxy.js +28 -28
  26. package/lib/api/test-page-url.js +60 -60
  27. package/lib/api/test-run-tracker.js +68 -68
  28. package/lib/api/wrap-test-function.js +49 -49
  29. package/lib/assertions/executor.js +74 -74
  30. package/lib/assertions/get-fn.js +46 -46
  31. package/lib/assertions/type.js +20 -20
  32. package/lib/assets/content-types.js +9 -9
  33. package/lib/assets/injectables.js +18 -18
  34. package/lib/browser/connection/command.js +10 -10
  35. package/lib/browser/connection/error-hints.js +9 -9
  36. package/lib/browser/connection/gateway.js +159 -159
  37. package/lib/browser/connection/get-hints.js +33 -33
  38. package/lib/browser/connection/heartbeat-status.js +8 -8
  39. package/lib/browser/connection/index.js +328 -328
  40. package/lib/browser/connection/remotes-queue.js +46 -46
  41. package/lib/browser/connection/service-routes.js +12 -12
  42. package/lib/browser/connection/status.js +12 -12
  43. package/lib/browser/interfaces.js +2 -2
  44. package/lib/browser/provider/built-in/dedicated/base.js +80 -80
  45. package/lib/browser/provider/built-in/dedicated/chrome/browser-client.js +204 -204
  46. package/lib/browser/provider/built-in/dedicated/chrome/build-chrome-args.js +17 -17
  47. package/lib/browser/provider/built-in/dedicated/chrome/config.js +110 -110
  48. package/lib/browser/provider/built-in/dedicated/chrome/create-temp-profile.js +45 -45
  49. package/lib/browser/provider/built-in/dedicated/chrome/elapsed-upperbounds.js +15 -15
  50. package/lib/browser/provider/built-in/dedicated/chrome/index.js +102 -102
  51. package/lib/browser/provider/built-in/dedicated/chrome/interfaces.js +2 -2
  52. package/lib/browser/provider/built-in/dedicated/chrome/local-chrome.js +24 -24
  53. package/lib/browser/provider/built-in/dedicated/chrome/runtime-info.js +29 -29
  54. package/lib/browser/provider/built-in/dedicated/edge/index.js +10 -10
  55. package/lib/browser/provider/built-in/dedicated/edge/runtime-info.js +29 -29
  56. package/lib/browser/provider/built-in/dedicated/firefox/config.js +33 -33
  57. package/lib/browser/provider/built-in/dedicated/firefox/create-temp-profile.js +78 -78
  58. package/lib/browser/provider/built-in/dedicated/firefox/index.js +73 -73
  59. package/lib/browser/provider/built-in/dedicated/firefox/local-firefox.js +36 -36
  60. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/commands.js +13 -13
  61. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/index.js +200 -200
  62. package/lib/browser/provider/built-in/dedicated/firefox/runtime-info.js +17 -17
  63. package/lib/browser/provider/built-in/index.js +21 -21
  64. package/lib/browser/provider/built-in/locally-installed.js +30 -30
  65. package/lib/browser/provider/built-in/path.js +47 -47
  66. package/lib/browser/provider/built-in/remote.js +58 -58
  67. package/lib/browser/provider/index.js +303 -303
  68. package/lib/browser/provider/parse-provider-name.js +16 -16
  69. package/lib/browser/provider/plugin-host.js +121 -121
  70. package/lib/browser/provider/pool.js +115 -115
  71. package/lib/browser/provider/utils/argument-parsing.js +74 -74
  72. package/lib/browser/provider/utils/browser-starter.js +34 -34
  73. package/lib/browser/provider/utils/client-functions.js +24 -24
  74. package/lib/browser/provider/utils/get-maximized-headless-window-size.js +9 -9
  75. package/lib/cli/argument-parser.js +284 -279
  76. package/lib/cli/authentication-helper.js +35 -35
  77. package/lib/cli/cli.js +134 -134
  78. package/lib/cli/correct-browsers-and-sources.js +40 -40
  79. package/lib/cli/index.js +19 -19
  80. package/lib/cli/log.js +43 -43
  81. package/lib/cli/remotes-wizard.js +36 -36
  82. package/lib/cli/termination-handler.js +38 -38
  83. package/lib/client/automation/index.js +144 -46
  84. package/lib/client/automation/index.min.js +1 -1
  85. package/lib/client/browser/idle-page/index.html.mustache +35 -35
  86. package/lib/client/browser/idle-page/logo.svg +86 -86
  87. package/lib/client/browser/service-worker.js +4 -6
  88. package/lib/client/core/index.js +19 -13
  89. package/lib/client/core/index.min.js +1 -1
  90. package/lib/client/driver/index.js +1807 -451
  91. package/lib/client/driver/index.min.js +1 -1
  92. package/lib/client/driver/internal-properties.js +9 -9
  93. package/lib/client/test-run/iframe.js.mustache +17 -17
  94. package/lib/client/test-run/index.js.mustache +51 -51
  95. package/lib/client/ui/index.js +14 -12
  96. package/lib/client/ui/index.min.js +1 -1
  97. package/lib/client/ui/sprite.svg +42 -42
  98. package/lib/client-functions/builder-symbol.js +4 -4
  99. package/lib/client-functions/client-function-builder.js +156 -135
  100. package/lib/client-functions/replicator.js +61 -61
  101. package/lib/client-functions/return-single-prop-mode.js +8 -8
  102. package/lib/client-functions/selector-api-execution-mode.js +22 -0
  103. package/lib/client-functions/selectors/add-api.js +646 -588
  104. package/lib/client-functions/selectors/create-snapshot-methods.js +13 -13
  105. package/lib/client-functions/selectors/prepare-api-args.js +20 -20
  106. package/lib/client-functions/selectors/selector-attribute-filter.js +22 -22
  107. package/lib/client-functions/selectors/selector-builder.js +154 -150
  108. package/lib/client-functions/selectors/selector-text-filter.js +43 -43
  109. package/lib/client-functions/selectors/snapshot-properties.js +48 -48
  110. package/lib/client-functions/types.js +18 -18
  111. package/lib/compiler/babel/format-babel-produced-code.js +10 -10
  112. package/lib/compiler/babel/get-base-babel-options.js +11 -11
  113. package/lib/compiler/babel/load-libs.js +64 -62
  114. package/lib/compiler/babel/preset-stage-2.js +19 -19
  115. package/lib/compiler/compile-client-function.js +73 -73
  116. package/lib/compiler/compilers.js +33 -33
  117. package/lib/compiler/index.js +92 -92
  118. package/lib/compiler/interfaces.js +2 -2
  119. package/lib/compiler/test-file/api-based.js +146 -146
  120. package/lib/compiler/test-file/base.js +36 -36
  121. package/lib/compiler/test-file/exportble-lib-path.js +5 -5
  122. package/lib/compiler/test-file/formats/coffeescript/compiler.js +38 -38
  123. package/lib/compiler/test-file/formats/coffeescript/get-test-list.js +29 -29
  124. package/lib/compiler/test-file/formats/es-next/compiler.js +43 -43
  125. package/lib/compiler/test-file/formats/es-next/get-test-list.js +166 -166
  126. package/lib/compiler/test-file/formats/es-next/is-flow-code.js +7 -7
  127. package/lib/compiler/test-file/formats/raw.js +85 -85
  128. package/lib/compiler/test-file/formats/typescript/compiler.js +135 -135
  129. package/lib/compiler/test-file/formats/typescript/get-test-list.js +185 -185
  130. package/lib/compiler/test-file/test-file-parser-base.js +214 -214
  131. package/lib/configuration/configuration-base.js +165 -165
  132. package/lib/configuration/constants.js +9 -9
  133. package/lib/configuration/customizable-compilers.js +7 -7
  134. package/lib/configuration/default-values.js +51 -51
  135. package/lib/configuration/interfaces.js +3 -3
  136. package/lib/configuration/option-names.js +53 -53
  137. package/lib/configuration/option-source.js +9 -9
  138. package/lib/configuration/option.js +14 -14
  139. package/lib/configuration/quarantine-option-names.js +10 -0
  140. package/lib/configuration/run-option-names.js +26 -26
  141. package/lib/configuration/screenshot-option-names.js +10 -10
  142. package/lib/configuration/testcafe-configuration.js +164 -165
  143. package/lib/configuration/types.js +2 -2
  144. package/lib/configuration/typescript-configuration.js +62 -62
  145. package/lib/custom-client-scripts/assert-type.js +7 -7
  146. package/lib/custom-client-scripts/client-script-init.js +3 -3
  147. package/lib/custom-client-scripts/client-script.js +107 -108
  148. package/lib/custom-client-scripts/get-code.js +11 -11
  149. package/lib/custom-client-scripts/get-url.js +6 -6
  150. package/lib/custom-client-scripts/load.js +15 -15
  151. package/lib/custom-client-scripts/problematic-scripts.js +2 -2
  152. package/lib/custom-client-scripts/routing.js +36 -36
  153. package/lib/custom-client-scripts/utils.js +60 -60
  154. package/lib/embedding-utils.js +83 -83
  155. package/lib/errors/create-stack-filter.js +18 -18
  156. package/lib/errors/error-list.js +26 -26
  157. package/lib/errors/get-callsite.js +31 -31
  158. package/lib/errors/internal-modules-prefix.js +8 -8
  159. package/lib/errors/is-internal-stack-frame.js +46 -46
  160. package/lib/errors/process-test-fn-error.js +37 -37
  161. package/lib/errors/runtime/index.js +123 -123
  162. package/lib/errors/runtime/templates.js +116 -114
  163. package/lib/errors/runtime/type-assertions.js +112 -112
  164. package/lib/errors/stack-cleaning-hook.js +64 -64
  165. package/lib/errors/test-run/formattable-adapter.js +59 -59
  166. package/lib/errors/test-run/index.js +302 -302
  167. package/lib/errors/test-run/render-error-template.js +31 -31
  168. package/lib/errors/test-run/templates.js +93 -95
  169. package/lib/errors/test-run/utils.js +90 -85
  170. package/lib/errors/types.js +157 -155
  171. package/lib/index.js +81 -81
  172. package/lib/live/bootstrapper.js +44 -44
  173. package/lib/live/controller.js +107 -107
  174. package/lib/live/file-watcher/index.js +67 -67
  175. package/lib/live/file-watcher/modules-graph.js +58 -58
  176. package/lib/live/keyboard-observer.js +76 -76
  177. package/lib/live/logger/index.js +64 -64
  178. package/lib/live/test-run-controller.js +96 -96
  179. package/lib/live/test-run-state.js +6 -6
  180. package/lib/live/test-run.js +56 -56
  181. package/lib/live/test-runner.js +168 -168
  182. package/lib/load-assets.js +29 -29
  183. package/lib/notifications/add-rendered-warning.js +16 -16
  184. package/lib/notifications/debug-logger.js +78 -78
  185. package/lib/notifications/deprecated.js +24 -24
  186. package/lib/notifications/information-message.js +12 -12
  187. package/lib/notifications/warning-log.js +32 -31
  188. package/lib/notifications/warning-message.js +48 -48
  189. package/lib/reporter/command/command-formatter.js +120 -109
  190. package/lib/reporter/command/format-command.js +8 -8
  191. package/lib/reporter/command/interfaces.js +2 -2
  192. package/lib/reporter/index.js +319 -314
  193. package/lib/reporter/interfaces.js +2 -2
  194. package/lib/reporter/plugin-host.js +136 -137
  195. package/lib/reporter/plugin-methods.js +12 -12
  196. package/lib/role/index.js +74 -74
  197. package/lib/role/marker-symbol.js +7 -7
  198. package/lib/role/phase.js +9 -9
  199. package/lib/runner/bootstrapper.js +272 -272
  200. package/lib/runner/browser-job-result.js +9 -9
  201. package/lib/runner/browser-job.js +153 -123
  202. package/lib/runner/browser-set.js +114 -114
  203. package/lib/runner/fixture-hook-controller.js +85 -85
  204. package/lib/runner/index.js +450 -442
  205. package/lib/runner/interfaces.js +3 -3
  206. package/lib/runner/reporter-stream-controller.js +28 -28
  207. package/lib/runner/task/index.js +152 -133
  208. package/lib/runner/task/phase.js +9 -9
  209. package/lib/runner/test-run-controller.js +166 -185
  210. package/lib/runner/tested-app.js +73 -72
  211. package/lib/screenshots/capturer.js +141 -141
  212. package/lib/screenshots/constants.js +11 -11
  213. package/lib/screenshots/crop.js +111 -111
  214. package/lib/screenshots/default-extension.js +4 -4
  215. package/lib/screenshots/index.js +67 -67
  216. package/lib/screenshots/utils.js +39 -39
  217. package/lib/services/compiler/host.js +190 -106
  218. package/lib/services/compiler/io.js +9 -9
  219. package/lib/services/compiler/protocol.js +17 -16
  220. package/lib/services/compiler/service.js +225 -106
  221. package/lib/services/compiler/test-run-proxy.js +111 -73
  222. package/lib/services/interfaces.js +3 -0
  223. package/lib/services/process-title.js +8 -8
  224. package/lib/services/serialization/prepare-options.js +17 -17
  225. package/lib/services/serialization/replicator/create-replicator.js +27 -0
  226. package/lib/services/serialization/replicator/custom-error-transform.js +28 -0
  227. package/lib/services/serialization/test-structure.js +93 -77
  228. package/lib/services/utils/ipc/interfaces.js +30 -30
  229. package/lib/services/utils/ipc/io.js +108 -108
  230. package/lib/services/utils/ipc/message.js +76 -73
  231. package/lib/services/utils/ipc/packet.js +55 -55
  232. package/lib/services/utils/ipc/proxy.js +110 -118
  233. package/lib/services/utils/ipc/transport.js +64 -64
  234. package/lib/shared/errors/index.js +382 -382
  235. package/lib/shared/node-modules-folder-name.js +4 -4
  236. package/lib/test-run/bookmark.js +90 -90
  237. package/lib/test-run/browser-console-messages.js +73 -73
  238. package/lib/test-run/browser-manipulation-queue.js +92 -92
  239. package/lib/test-run/client-messages.js +9 -9
  240. package/lib/test-run/commands/actions.js +486 -425
  241. package/lib/test-run/commands/assertion.js +45 -45
  242. package/lib/test-run/commands/base.js +14 -14
  243. package/lib/test-run/commands/browser-manipulation.js +95 -95
  244. package/lib/test-run/commands/from-object.js +82 -82
  245. package/lib/test-run/commands/observation.js +61 -61
  246. package/lib/test-run/commands/options.js +231 -215
  247. package/lib/test-run/commands/service.js +54 -48
  248. package/lib/test-run/commands/type.js +65 -60
  249. package/lib/test-run/commands/utils.js +87 -87
  250. package/lib/test-run/commands/validations/argument.js +90 -90
  251. package/lib/test-run/commands/validations/factories.js +47 -47
  252. package/lib/test-run/commands/validations/initializers.js +44 -44
  253. package/lib/test-run/debug-log.js +32 -32
  254. package/lib/test-run/execute-js-expression.js +74 -74
  255. package/lib/test-run/index.js +823 -752
  256. package/lib/test-run/marker-symbol.js +7 -7
  257. package/lib/test-run/observed-callsites-storage.js +17 -17
  258. package/lib/test-run/phase.js +16 -16
  259. package/lib/test-run/session-controller.js +104 -104
  260. package/lib/testcafe.js +119 -114
  261. package/lib/utils/assignable.js +39 -39
  262. package/lib/utils/async-event-emitter.js +28 -28
  263. package/lib/utils/async-queue.js +14 -14
  264. package/lib/utils/browser-connection-timeouts.js +19 -19
  265. package/lib/utils/callsite.js +17 -17
  266. package/lib/utils/check-file-path.js +31 -31
  267. package/lib/utils/check-url.js +51 -51
  268. package/lib/utils/convert-to-best-fit-type.js +16 -16
  269. package/lib/utils/correct-file-path.js +21 -21
  270. package/lib/utils/define-lazy-property.js +13 -13
  271. package/lib/utils/delay.js +6 -6
  272. package/lib/utils/delegated-api.js +44 -44
  273. package/lib/utils/detect-display.js +6 -6
  274. package/lib/utils/detect-ffmpeg.js +44 -44
  275. package/lib/utils/diff/colors.js +29 -29
  276. package/lib/utils/diff/index.js +53 -53
  277. package/lib/utils/diff/util.js +24 -22
  278. package/lib/utils/diff.js +29 -29
  279. package/lib/utils/escape-user-agent.js +10 -10
  280. package/lib/utils/flag-list.js +17 -17
  281. package/lib/utils/get-any-key.js +8 -8
  282. package/lib/utils/get-browser.js +8 -8
  283. package/lib/utils/get-common-path.js +34 -34
  284. package/lib/utils/get-filter-fn.js +40 -40
  285. package/lib/utils/get-options/base.js +36 -36
  286. package/lib/utils/get-options/compiler.js +33 -33
  287. package/lib/utils/get-options/grep.js +15 -15
  288. package/lib/utils/get-options/index.js +21 -19
  289. package/lib/utils/get-options/meta.js +22 -22
  290. package/lib/utils/get-options/quarantine.js +92 -0
  291. package/lib/utils/get-options/screenshot.js +17 -17
  292. package/lib/utils/get-options/ssl.js +45 -45
  293. package/lib/utils/get-options/video.js +10 -10
  294. package/lib/utils/get-viewport-width.js +18 -18
  295. package/lib/utils/guard-time-execution.js +10 -10
  296. package/lib/utils/handle-errors.js +74 -74
  297. package/lib/utils/handle-tag-args.js +8 -8
  298. package/lib/utils/http.js +30 -30
  299. package/lib/utils/is-localhost.js +11 -11
  300. package/lib/utils/is-password-input.js +11 -0
  301. package/lib/utils/is-repl.js +12 -0
  302. package/lib/utils/is-window-in-iframe.js +6 -6
  303. package/lib/utils/limit-number.js +10 -10
  304. package/lib/utils/make-reg-exp.js +7 -7
  305. package/lib/utils/moment-loader.js +20 -20
  306. package/lib/utils/parse-file-list.js +71 -71
  307. package/lib/utils/parse-user-agent.js +55 -55
  308. package/lib/utils/path-pattern.js +114 -114
  309. package/lib/utils/prepare-reporters.js +30 -30
  310. package/lib/utils/prerender-callsite.js +18 -18
  311. package/lib/utils/process.js +119 -119
  312. package/lib/utils/promisified-functions.js +46 -46
  313. package/lib/utils/re-executable-promise.js +39 -39
  314. package/lib/utils/render-callsite-sync.js +29 -29
  315. package/lib/utils/render-template.js +10 -10
  316. package/lib/utils/reporter.js +30 -30
  317. package/lib/utils/resolve-path-relatively-cwd.js +7 -7
  318. package/lib/utils/string.js +105 -105
  319. package/lib/utils/temp-directory/cleanup-process/commands.js +7 -7
  320. package/lib/utils/temp-directory/cleanup-process/index.js +143 -143
  321. package/lib/utils/temp-directory/cleanup-process/worker.js +58 -58
  322. package/lib/utils/temp-directory/index.js +87 -87
  323. package/lib/utils/temp-directory/lockfile.js +56 -56
  324. package/lib/utils/thennable.js +7 -7
  325. package/lib/utils/timer.js +15 -15
  326. package/lib/utils/to-posix-path.js +8 -8
  327. package/lib/utils/types.js +2 -2
  328. package/lib/video-recorder/interfaces.js +2 -2
  329. package/lib/video-recorder/process.js +126 -126
  330. package/lib/video-recorder/recorder.js +136 -136
  331. package/lib/video-recorder/test-run-video-recorder.js +69 -69
  332. package/lib/video-recorder/videos.js +37 -37
  333. package/package.json +7 -7
  334. package/ts-defs/index.d.ts +109 -17
  335. package/ts-defs/selectors.d.ts +95 -7
  336. package/ts-defs/testcafe-scripts.d.ts +96 -8
@@ -1,31 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.processReporterName = exports.isReporterPluginFactory = exports.getPluginFactory = exports.requireReporterPluginFactory = void 0;
4
- const runtime_1 = require("../errors/runtime");
5
- const types_1 = require("../errors/types");
6
- function requireReporterPluginFactory(reporterName) {
7
- try {
8
- return require('testcafe-reporter-' + reporterName);
9
- }
10
- catch (err) {
11
- throw new runtime_1.GeneralError(types_1.RUNTIME_ERRORS.cannotFindReporterForAlias, reporterName);
12
- }
13
- }
14
- exports.requireReporterPluginFactory = requireReporterPluginFactory;
15
- function getPluginFactory(reporterFactorySource) {
16
- if (!isReporterPluginFactory(reporterFactorySource))
17
- return requireReporterPluginFactory(reporterFactorySource);
18
- return reporterFactorySource;
19
- }
20
- exports.getPluginFactory = getPluginFactory;
21
- function isReporterPluginFactory(value) {
22
- return typeof value === 'function';
23
- }
24
- exports.isReporterPluginFactory = isReporterPluginFactory;
25
- function processReporterName(value) {
26
- if (isReporterPluginFactory(value))
27
- return value.name || 'function () {}';
28
- return value;
29
- }
30
- exports.processReporterName = processReporterName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.processReporterName = exports.isReporterPluginFactory = exports.getPluginFactory = exports.requireReporterPluginFactory = void 0;
4
+ const runtime_1 = require("../errors/runtime");
5
+ const types_1 = require("../errors/types");
6
+ function requireReporterPluginFactory(reporterName) {
7
+ try {
8
+ return require('testcafe-reporter-' + reporterName);
9
+ }
10
+ catch (err) {
11
+ throw new runtime_1.GeneralError(types_1.RUNTIME_ERRORS.cannotFindReporterForAlias, reporterName);
12
+ }
13
+ }
14
+ exports.requireReporterPluginFactory = requireReporterPluginFactory;
15
+ function getPluginFactory(reporterFactorySource) {
16
+ if (!isReporterPluginFactory(reporterFactorySource))
17
+ return requireReporterPluginFactory(reporterFactorySource);
18
+ return reporterFactorySource;
19
+ }
20
+ exports.getPluginFactory = getPluginFactory;
21
+ function isReporterPluginFactory(value) {
22
+ return typeof value === 'function';
23
+ }
24
+ exports.isReporterPluginFactory = isReporterPluginFactory;
25
+ function processReporterName(value) {
26
+ if (isReporterPluginFactory(value))
27
+ return value.name || 'function () {}';
28
+ return value;
29
+ }
30
+ exports.processReporterName = processReporterName;
31
31
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi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mV4cG9ydCBmdW5jdGlvbiBwcm9jZXNzUmVwb3J0ZXJOYW1lICh2YWx1ZTogc3RyaW5nIHwgUmVwb3J0ZXJQbHVnaW5GYWN0b3J5KTogc3RyaW5nIHtcbiAgICBpZiAoaXNSZXBvcnRlclBsdWdpbkZhY3RvcnkodmFsdWUpKVxuICAgICAgICByZXR1cm4gdmFsdWUubmFtZSB8fCAnZnVuY3Rpb24gKCkge30nO1xuXG4gICAgcmV0dXJuIHZhbHVlO1xufVxuIl19
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const path_1 = require("path");
4
- function default_1(path) {
5
- return path_1.resolve(process.cwd(), path);
6
- }
7
- exports.default = default_1;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path_1 = require("path");
4
+ function default_1(path) {
5
+ return path_1.resolve(process.cwd(), path);
6
+ }
7
+ exports.default = default_1;
8
8
  module.exports = exports.default;
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS1wYXRoLXJlbGF0aXZlbHktY3dkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL3Jlc29sdmUtcGF0aC1yZWxhdGl2ZWx5LWN3ZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLCtCQUErQjtBQUUvQixtQkFBeUIsSUFBSTtJQUN6QixPQUFPLGNBQU8sQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDeEMsQ0FBQztBQUZELDRCQUVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVzb2x2ZSB9IGZyb20gJ3BhdGgnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAocGF0aCkge1xuICAgIHJldHVybiByZXNvbHZlKHByb2Nlc3MuY3dkKCksIHBhdGgpO1xufVxuIl19
@@ -1,106 +1,106 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createList = exports.getToBeInPastTense = exports.getConcatenatedValuesString = exports.getPluralSuffix = exports.splitQuotedText = exports.wordWrap = exports.removeTTYColors = void 0;
7
- const indent_string_1 = __importDefault(require("indent-string"));
8
- const DEFAULT_CONCATENATED_VALUES = {
9
- SEPARATOR: ', ',
10
- QUOTE_CHAR: '"'
11
- };
12
- function rtrim(str) {
13
- return str.replace(/\s+$/, '');
14
- }
15
- function removeTTYColors(str) {
16
- return str.replace(/\033\[[0-9;]*m/g, '');
17
- }
18
- exports.removeTTYColors = removeTTYColors;
19
- function wordWrap(str, indent, width) {
20
- let curStr = '';
21
- let wrappedMsg = '';
22
- if (removeTTYColors(str).length <= width - indent)
23
- return indent_string_1.default(str, ' ', indent);
24
- str = str.replace(/(\r\n)/gm, '\n')
25
- .split(/(\S+[ \t]+)|(\S+(?:\n))|(\n)/m)
26
- //NOTE: cut empty elements
27
- .filter(elm => !!elm);
28
- str.forEach(word => {
29
- const newStr = curStr + word;
30
- if (removeTTYColors(newStr).length > width - indent) {
31
- wrappedMsg += `${rtrim(curStr)}\n`;
32
- curStr = word;
33
- }
34
- else {
35
- if (curStr[curStr.length - 1] === '\n') {
36
- wrappedMsg += `${rtrim(curStr)}\n`;
37
- curStr = '';
38
- }
39
- curStr += word;
40
- }
41
- });
42
- return indent_string_1.default(wrappedMsg + curStr, ' ', indent);
43
- }
44
- exports.wordWrap = wordWrap;
45
- function splitQuotedText(str, splitChar, quotes = '"\'') {
46
- let currentPart = '';
47
- const parts = [];
48
- let quoteChar = null;
49
- for (let i = 0; i < str.length; i++) {
50
- const currentChar = str[i];
51
- if (currentChar === splitChar) {
52
- if (quoteChar)
53
- currentPart += currentChar;
54
- else {
55
- parts.push(currentPart);
56
- currentPart = '';
57
- }
58
- }
59
- else if (quotes.indexOf(currentChar) > -1) {
60
- if (quoteChar === currentChar)
61
- quoteChar = null;
62
- else if (!quoteChar)
63
- quoteChar = currentChar;
64
- else
65
- currentPart += currentChar;
66
- }
67
- else
68
- currentPart += currentChar;
69
- }
70
- if (currentPart)
71
- parts.push(currentPart);
72
- return parts;
73
- }
74
- exports.splitQuotedText = splitQuotedText;
75
- function getPluralSuffix(array) {
76
- return array.length > 1 ? 's' : '';
77
- }
78
- exports.getPluralSuffix = getPluralSuffix;
79
- function getDisplayedItemText(item, quote) {
80
- return `${quote}${item}${quote}`;
81
- }
82
- function getConcatenatedValuesString(array, separator = DEFAULT_CONCATENATED_VALUES.SEPARATOR, quoteChar = DEFAULT_CONCATENATED_VALUES.QUOTE_CHAR) {
83
- const clonedArray = [...array];
84
- if (separator === '\n')
85
- return clonedArray.map(item => getDisplayedItemText(item, quoteChar)).join(separator);
86
- else if (clonedArray.length === 1)
87
- return getDisplayedItemText(clonedArray[0], quoteChar);
88
- else if (clonedArray.length === 2) {
89
- const item1 = array[0];
90
- const item2 = array[1];
91
- return `${getDisplayedItemText(item1, quoteChar)} and ${getDisplayedItemText(item2, quoteChar)}`;
92
- }
93
- const lastItem = clonedArray.pop();
94
- const otherItemString = clonedArray.map(item => getDisplayedItemText(item, quoteChar)).join(separator);
95
- return `${otherItemString}, and ${getDisplayedItemText(lastItem, quoteChar)}`;
96
- }
97
- exports.getConcatenatedValuesString = getConcatenatedValuesString;
98
- function getToBeInPastTense(array) {
99
- return array.length > 1 ? 'were' : 'was';
100
- }
101
- exports.getToBeInPastTense = getToBeInPastTense;
102
- function createList(array, PREFIX = '- ', SEPARATOR = '\n') {
103
- return array.map(option => PREFIX + option).join(SEPARATOR);
104
- }
105
- exports.createList = createList;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createList = exports.getToBeInPastTense = exports.getConcatenatedValuesString = exports.getPluralSuffix = exports.splitQuotedText = exports.wordWrap = exports.removeTTYColors = void 0;
7
+ const indent_string_1 = __importDefault(require("indent-string"));
8
+ const DEFAULT_CONCATENATED_VALUES = {
9
+ SEPARATOR: ', ',
10
+ QUOTE_CHAR: '"'
11
+ };
12
+ function rtrim(str) {
13
+ return str.replace(/\s+$/, '');
14
+ }
15
+ function removeTTYColors(str) {
16
+ return str.replace(/\033\[[0-9;]*m/g, '');
17
+ }
18
+ exports.removeTTYColors = removeTTYColors;
19
+ function wordWrap(str, indent, width) {
20
+ let curStr = '';
21
+ let wrappedMsg = '';
22
+ if (removeTTYColors(str).length <= width - indent)
23
+ return indent_string_1.default(str, ' ', indent);
24
+ str = str.replace(/(\r\n)/gm, '\n')
25
+ .split(/(\S+[ \t]+)|(\S+(?:\n))|(\n)/m)
26
+ //NOTE: cut empty elements
27
+ .filter(elm => !!elm);
28
+ str.forEach(word => {
29
+ const newStr = curStr + word;
30
+ if (removeTTYColors(newStr).length > width - indent) {
31
+ wrappedMsg += `${rtrim(curStr)}\n`;
32
+ curStr = word;
33
+ }
34
+ else {
35
+ if (curStr[curStr.length - 1] === '\n') {
36
+ wrappedMsg += `${rtrim(curStr)}\n`;
37
+ curStr = '';
38
+ }
39
+ curStr += word;
40
+ }
41
+ });
42
+ return indent_string_1.default(wrappedMsg + curStr, ' ', indent);
43
+ }
44
+ exports.wordWrap = wordWrap;
45
+ function splitQuotedText(str, splitChar, quotes = '"\'') {
46
+ let currentPart = '';
47
+ const parts = [];
48
+ let quoteChar = null;
49
+ for (let i = 0; i < str.length; i++) {
50
+ const currentChar = str[i];
51
+ if (currentChar === splitChar) {
52
+ if (quoteChar)
53
+ currentPart += currentChar;
54
+ else {
55
+ parts.push(currentPart);
56
+ currentPart = '';
57
+ }
58
+ }
59
+ else if (quotes.indexOf(currentChar) > -1) {
60
+ if (quoteChar === currentChar)
61
+ quoteChar = null;
62
+ else if (!quoteChar)
63
+ quoteChar = currentChar;
64
+ else
65
+ currentPart += currentChar;
66
+ }
67
+ else
68
+ currentPart += currentChar;
69
+ }
70
+ if (currentPart)
71
+ parts.push(currentPart);
72
+ return parts;
73
+ }
74
+ exports.splitQuotedText = splitQuotedText;
75
+ function getPluralSuffix(array) {
76
+ return array.length > 1 ? 's' : '';
77
+ }
78
+ exports.getPluralSuffix = getPluralSuffix;
79
+ function getDisplayedItemText(item, quote) {
80
+ return `${quote}${item}${quote}`;
81
+ }
82
+ function getConcatenatedValuesString(array, separator = DEFAULT_CONCATENATED_VALUES.SEPARATOR, quoteChar = DEFAULT_CONCATENATED_VALUES.QUOTE_CHAR) {
83
+ const clonedArray = [...array];
84
+ if (separator === '\n')
85
+ return clonedArray.map(item => getDisplayedItemText(item, quoteChar)).join(separator);
86
+ else if (clonedArray.length === 1)
87
+ return getDisplayedItemText(clonedArray[0], quoteChar);
88
+ else if (clonedArray.length === 2) {
89
+ const item1 = array[0];
90
+ const item2 = array[1];
91
+ return `${getDisplayedItemText(item1, quoteChar)} and ${getDisplayedItemText(item2, quoteChar)}`;
92
+ }
93
+ const lastItem = clonedArray.pop();
94
+ const otherItemString = clonedArray.map(item => getDisplayedItemText(item, quoteChar)).join(separator);
95
+ return `${otherItemString}, and ${getDisplayedItemText(lastItem, quoteChar)}`;
96
+ }
97
+ exports.getConcatenatedValuesString = getConcatenatedValuesString;
98
+ function getToBeInPastTense(array) {
99
+ return array.length > 1 ? 'were' : 'was';
100
+ }
101
+ exports.getToBeInPastTense = getToBeInPastTense;
102
+ function createList(array, PREFIX = '- ', SEPARATOR = '\n') {
103
+ return array.map(option => PREFIX + option).join(SEPARATOR);
104
+ }
105
+ exports.createList = createList;
106
106
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL3N0cmluZy5qcy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blxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3RyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IGN1cnJlbnRDaGFyID0gc3RyW2ldO1xuXG4gICAgICAgIGlmIChjdXJyZW50Q2hhciA9PT0gc3BsaXRDaGFyKSB7XG4gICAgICAgICAgICBpZiAocXVvdGVDaGFyKVxuICAgICAgICAgICAgICAgIGN1cnJlbnRQYXJ0ICs9IGN1cnJlbnRDaGFyO1xuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFydHMucHVzaChjdXJyZW50UGFydCk7XG4gICAgICAgICAgICAgICAgY3VycmVudFBhcnQgPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChxdW90ZXMuaW5kZXhPZihjdXJyZW50Q2hhcikgPiAtMSkge1xuICAgICAgICAgICAgaWYgKHF1b3RlQ2hhciA9PT0gY3VycmVudENoYXIpXG4gICAgICAgICAgICAgICAgcXVvdGVDaGFyID0gbnVsbDtcbiAgICAgICAgICAgIGVsc2UgaWYgKCFxdW90ZUNoYXIpXG4gICAgICAgICAgICAgICAgcXVvdGVDaGFyID0gY3VycmVudENoYXI7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgY3VycmVudFBhcnQgKz0gY3VycmVudENoYXI7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgY3VycmVudFBhcnQgKz0gY3VycmVudENoYXI7XG4gICAgfVxuXG4gICAgaWYgKGN1cnJlbnRQYXJ0KVxuICAgICAgICBwYXJ0cy5wdXNoKGN1cnJlbnRQYXJ0KTtcblxuICAgIHJldHVybiBwYXJ0cztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldFBsdXJhbFN1ZmZpeCAoYXJyYXkpIHtcbiAgICByZXR1cm4gYXJyYXkubGVuZ3RoID4gMSA/ICdzJyA6ICcnO1xufVxuXG5mdW5jdGlvbiBnZXREa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uZWRBcnJheS5tYXAoaXRlbSA9PiBnZXREaXNwbGF5ZWRJdGVtVGV4dChpdGVtLCBxdW90ZUNoYXIpKS5qb2luKHNlcGFyYXRvcik7XG5cbiAgICByZXR1cm4gYCR7b3RoZXJJdGVtU3RyaW5nfSwgYW5kICR7Z2V0RGlzcGxheWVkSXRlbVRleHQobGFzdEl0ZW0sIHF1b3RlQ2hhcil9YDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldFRvQmVJblBhc3RUZW5zZSAoYXJyYXkpIHtcbiAgICByZXR1cm4gYXJyYXkubGVuZ3RoID4gMSA/ICd3ZXJlJyA6ICd3YXMnO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlTGlzdCAoYXJyYXksIFBSRUZJWCA9ICctICcsIFNFUEFSQVRPUiA9ICdcXG4nKSB7XG4gICAgcmV0dXJuIGFycmF5Lm1hcChvcHRpb24gPT4gUFJFRklYICsgb3B0aW9uKS5qb2luKFNFUEFSQVRPUik7XG59XG4iXX0=
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- init: 'init',
5
- add: 'add',
6
- remove: 'remove'
7
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ init: 'init',
5
+ add: 'add',
6
+ remove: 'remove'
7
+ };
8
8
  module.exports = exports.default;
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdXRpbHMvdGVtcC1kaXJlY3RvcnkvY2xlYW51cC1wcm9jZXNzL2NvbW1hbmRzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsa0JBQWU7SUFDWCxJQUFJLEVBQUksTUFBTTtJQUNkLEdBQUcsRUFBSyxLQUFLO0lBQ2IsTUFBTSxFQUFFLFFBQVE7Q0FDbkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IHtcbiAgICBpbml0OiAgICdpbml0JyxcbiAgICBhZGQ6ICAgICdhZGQnLFxuICAgIHJlbW92ZTogJ3JlbW92ZSdcbn07XG4iXX0=