poku 4.3.2-canary.d5ae3f1f โ†’ 4.3.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.
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
  Enjoying **Poku**? Give him a star to show your support ๐ŸŒŸ
7
7
 
8
- [![NPM Version](https://img.shields.io/npm/v/poku.svg?label=&color=70a1ff&logo=npm&logoColor=white)](https://www.npmjs.com/package/poku)
9
- [![NPM Downloads](https://img.shields.io/npm/dm/poku.svg?label=&logo=npm&logoColor=white&color=45aaf2)](https://www.npmjs.com/package/poku)
8
+ [![NPM Version](https://img.shields.io/npm/v/poku?label=&color=70a1ff&logo=npm&logoColor=white)](https://www.npmjs.com/package/poku)
9
+ [![NPM Downloads](https://img.shields.io/npm/dm/poku?label=&logo=npm&logoColor=white&color=45aaf2)](https://www.npmjs.com/package/poku)
10
10
  [![Coverage](https://img.shields.io/codecov/c/github/wellwelwel/poku?label=&logo=codecov&logoColor=white&color=98cc00)](https://github.com/wellwelwel/poku/tree/main/.nycrc)<br />
11
11
  [![GitHub Workflow Status (Linux)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-linux.yml?event=push&label=&branch=main&logo=ubuntu&logoColor=8897a9&color=dfe4ea)](https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-linux.yml?query=branch%3Amain)
12
12
  [![GitHub Workflow Status (OSX)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-osx.yml?event=push&label=&branch=main&logo=apple&logoColor=8897a9&color=dfe4ea)](https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-osx.yml?query=branch%3Amain)
@@ -24,17 +24,17 @@ Enjoying **Poku**? Give him a star to show your support ๐ŸŒŸ
24
24
 
25
25
  ๐Ÿ’ก **Poku** is a cross-platform test runner that brings the [**JavaScript** essence back to testing](https://poku.io/docs/philosophy#javascript-essence-for-tests-).
26
26
 
27
- </span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> High **isolation** level per file<br />
28
- </span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> **Performant** and **lightweight**<br />
29
- <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Auto detect **ESM**, **CJS**, and **TypeScript** files<br />
30
- <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run the **same test suite** for [**Node.js**][node-version-url], [**Bun**][bun-version-url], and [**Deno**][deno-version-url]<br />
31
- <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easily handle **servers**, **processes**, **ports**, and even **containers** โœจ
27
+ ![check][] High **isolation** level per file<br />
28
+ ![check][] **Performant** and **lightweight**<br />
29
+ ![check][] Auto detect **ESM**, **CJS**, and **TypeScript** files<br />
30
+ ![check][] Run the **same test suite** for [**Node.js**](https://github.com/nodejs/node), [**Bun**](https://github.com/oven-sh/bun), and [**Deno**](https://github.com/denoland/deno)<br />
31
+ ![check][] Easily handle **servers**, **processes**, **ports**, and even **containers** โœจ
32
32
 
33
33
  ---
34
34
 
35
35
  ## Quickstart
36
36
 
37
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Install
37
+ ### ![check][] Install
38
38
 
39
39
  <table>
40
40
  <tr>
@@ -75,7 +75,7 @@ deno add npm:poku
75
75
 
76
76
  ---
77
77
 
78
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Test
78
+ ### ![check][] Test
79
79
 
80
80
  <table>
81
81
  <tr>
@@ -98,7 +98,7 @@ assert(true, 'Poku will describe it ๐Ÿท');
98
98
 
99
99
  ---
100
100
 
101
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run
101
+ ### ![check][] Run
102
102
 
103
103
  <table>
104
104
  <tr>
@@ -135,94 +135,82 @@ deno run npm:poku
135
135
 
136
136
  ## Features
137
137
 
138
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Essentials
138
+ ### ![check][] Essentials
139
139
 
140
140
  <table>
141
141
  <tr>
142
142
  <td width="280"><a href="https://poku.io/docs/category/-poku">poku</a></td>
143
- <td width="770">๐Ÿงช Test runner.</td>
143
+ <td width="770">๐Ÿงช Test runner</td>
144
144
  </tr>
145
145
  <tr>
146
- <td><a href="https://poku.io/docs/documentation/assert">assert</a></td>
147
- <td>๐Ÿ” Test assertion <i>(<strong>Node.js</strong> familiar <strong>API</strong>)</i>.</td>
148
- </tr>
149
- <tr>
150
- <td><a href="https://poku.io/docs/documentation/assert">strict</a></td>
151
- <td>๐Ÿ”ฌ Strict test assertion <i>(<strong>Node.js</strong> familiar <strong>API</strong>)</i>.</td>
146
+ <td><a href="https://poku.io/docs/documentation/assert">assert โ€ข strict</a></td>
147
+ <td>๐Ÿ”ฌ Test assertion <i>(<strong>Node.js</strong> familiar <strong>API</strong>)</i></td>
152
148
  </tr>
153
149
  </table>
154
150
 
155
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Helpers
151
+ ### ![check][] Helpers
156
152
 
157
153
  <table>
158
154
  <tr>
159
155
  <td width="250"><a href="https://poku.io/docs/documentation/helpers/test">test</a> โ€ข <a href="https://poku.io/docs/documentation/helpers/describe">describe</a> โ€ข <a href="https://poku.io/docs/documentation/helpers/it">it</a></td>
160
- <td width="800">๐Ÿคน๐Ÿปโ€โ™€๏ธ Organize, group, and isolate tests.</td>
156
+ <td width="800">๐Ÿคน๐Ÿปโ€โ™€๏ธ Organize, group, and isolate tests</td>
161
157
  </tr>
162
158
  <tr>
163
159
  <td><a href="https://poku.io/docs/documentation/helpers/env">envFile</a></td>
164
- <td>โš™๏ธ Process an environment file <i>(out-of-box)</i>.</td>
165
- </tr>
166
- <tr>
167
- <td><a href="https://poku.io/docs/category/-before-and-after-each">beforeEach</a> โ€ข <a href="https://poku.io/docs/category/-before-and-after-each">afterEach</a></td>
168
- <td>๐Ÿƒ Hooks for test setup and teardown.</td>
160
+ <td>โš™๏ธ Process an environment file <i>(out-of-box)</i></td>
169
161
  </tr>
170
162
  <tr>
171
- <td><a href="https://poku.io/docs/documentation/helpers/startScript">startScript</a></td>
172
- <td>๐ŸŒ Run package.json scripts in background.</td>
163
+ <td><a href="https://poku.io/docs/category/-before-and-after-each">beforeEach โ€ข afterEach</a></td>
164
+ <td>๐Ÿƒ Hooks for test setup and teardown</td>
173
165
  </tr>
174
166
  <tr>
175
- <td><a href="https://poku.io/docs/documentation/helpers/startService">startService</a></td>
176
- <td>๐ŸŒ Run files in background.</td>
167
+ <td><a href="https://poku.io/docs/documentation/helpers/startScript">startScript</a> โ€ข <a href="https://poku.io/docs/documentation/helpers/startService">startService</a></td>
168
+ <td>๐ŸŒ Run package.json scripts and files in background</td>
177
169
  </tr>
178
170
  <tr>
179
171
  <td><a href="https://poku.io/docs/documentation/helpers/containers">docker</a></td>
180
- <td>๐Ÿณ Build, start, compose, stop, remove, and test containers.</td>
172
+ <td>๐Ÿณ Build, start, compose, stop, remove, and test containers</td>
181
173
  </tr>
182
174
  <tr>
183
175
  <td><a href="https://poku.io/docs/documentation/helpers/processes/kill">kill</a></td>
184
- <td>๐Ÿ”Œ Terminate ports, port ranges, and PIDs.</td>
176
+ <td>๐Ÿ”Œ Terminate ports, port ranges, and PIDs</td>
185
177
  </tr>
186
178
  <tr>
187
179
  <td><a href="https://poku.io/docs/documentation/helpers/processes/wait-for-port">waitForPort</a></td>
188
- <td>๐Ÿ˜ด Wait for specified ports to become active.</td>
180
+ <td>๐Ÿ˜ด Wait for specified ports to become active</td>
189
181
  </tr>
190
182
  <tr>
191
183
  <td><a href="https://poku.io/docs/documentation/helpers/processes/wait-for-expected-result">waitForExpectedResult</a></td>
192
- <td>๐Ÿฅฑ Retry until an expected result or times out.</td>
184
+ <td>๐Ÿฅฑ Retry until an expected result or times out</td>
193
185
  </tr>
194
186
  <tr>
195
187
  <td><a href="https://poku.io/docs/documentation/helpers/skip">skip</a></td>
196
- <td>โญ๏ธ Skip tests when necessary.</td>
188
+ <td>โญ๏ธ Skip tests when necessary</td>
197
189
  </tr>
198
190
  <tr>
199
191
  <td><a href="https://poku.io/docs/documentation/helpers/only">only</a></td>
200
- <td>๐ŸŒŒ Debug tests by enabling selective runs.</td>
201
- </tr>
202
- <tr>
203
- <td><a href="https://poku.io/docs/documentation/helpers/processes/get-pids">getPIDs</a></td>
204
- <td>๐Ÿ•ต๐Ÿป Debug processes IDs using ports and port ranges.</td>
192
+ <td>๐ŸŒŒ Debug tests by enabling selective runs</td>
205
193
  </tr>
206
194
  </table>
207
195
 
208
- ### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Common Options
196
+ ### ![check][] Common Options
209
197
 
210
198
  <table>
211
199
  <tr>
212
200
  <td><a href="https://poku.io/docs/documentation/helpers/coverage">coverage</a></td>
213
- <td>โ˜”๏ธ Enable coverage collection using a coverage plugin.</td>
201
+ <td>โ˜”๏ธ Enable coverage collection using a coverage plugin</td>
214
202
  </tr>
215
203
  <tr>
216
204
  <td><a href="https://poku.io/docs/documentation/poku/config-files">config</a></td>
217
- <td>โš™๏ธ Customize your <b>Poku</b> options in a config file.</td>
205
+ <td>โš™๏ธ Customize your <b>Poku</b> options in a config file</td>
218
206
  </tr>
219
207
  <tr>
220
208
  <td width="280"><a href="https://poku.io/docs/documentation/poku/options/watch">watch</a></td>
221
- <td width="770">๐Ÿฟ Watch for changes and re-run related test files.</td>
209
+ <td width="770">๐Ÿฟ Watch for changes and re-run related test files</td>
222
210
  </tr>
223
211
  <tr>
224
212
  <td><a href="https://poku.io/docs/documentation/poku/options/debug">debug</a></td>
225
- <td>๐Ÿ•ต๐Ÿป Shows all logs.</td>
213
+ <td>๐Ÿ•ต๐Ÿป Shows all logs</td>
226
214
  </tr>
227
215
  </table>
228
216
 
@@ -232,21 +220,15 @@ deno run npm:poku
232
220
 
233
221
  ## Documentation and Examples
234
222
 
235
- To see the detailed documentation, please visit the [**Documentation**](https://poku.io/docs/category/documentation) and [**Examples**](https://poku.io/docs/category/examples) sections in the [**Poku**'s website](https://poku.io).
236
-
237
- ---
238
-
239
- ### Tutorials
240
-
241
- **Poku** offers _mini-lessons_ for different users needs in the [**Quick Tutorials**](https://poku.io/docs/category/quick-tutorials) section.
223
+ To see the detailed documentation, please visit the [**Documentation**](https://poku.io/docs/category/documentation) and [**Examples**](https://poku.io/docs/category/examples) sections in the [**Poku**'s website](https://poku.io). **Poku** also offers _mini-lessons_ for different users needs in the [**Quick Tutorials**](https://poku.io/docs/category/quick-tutorials) section.
242
224
 
243
225
  ---
244
226
 
245
227
  ### Common Issues (FAQ)
246
228
 
247
- - [Avoiding conflicts in environments with multiple platforms installed](https://poku.io/docs/tutorials/cross-platform#recommendations).
248
- - [Properly running asynchronous tests on the same file](https://poku.io/docs/examples/promises).
249
- - [Using **Poku** without installing it on **Deno**](https://github.com/wellwelwel/poku/discussions/565).
229
+ - [Avoiding conflicts in environments with multiple platforms installed](https://poku.io/docs/tutorials/cross-platform#recommendations)
230
+ - [Properly running asynchronous tests on the same file](https://poku.io/docs/examples/promises)
231
+ - [Using **Poku** without installing it on **Deno**](https://github.com/wellwelwel/poku/discussions/565)
250
232
  - Migrating:
251
233
  - [**3.x.x** โ†’ **4.x.x**](https://github.com/wellwelwel/poku/issues/1006)
252
234
  - [**2.x.x** โ†’ **3.x.x**](https://github.com/wellwelwel/poku/issues/801)
@@ -271,11 +253,11 @@ To see the detailed documentation, please visit the [**Documentation**](https://
271
253
 
272
254
  [![Install Size](https://packagephobia.com/badge?p=poku)](https://pkg-size.dev/poku)
273
255
 
274
- - [~**150x** lighter than **Jest**](https://pkg-size.dev/jest@30.4.2)
275
- - [~**125x** lighter than **Vitest**](https://pkg-size.dev/vitest@4.1.6)
276
- - [~**85x** lighter than **AVA**](https://pkg-size.dev/ava@8.0.0)
277
- - [~**48x** lighter than **Mocha**](https://pkg-size.dev/mocha@11.7.5)
278
- - [~**2.9x** lighter than **uvu**](https://pkg-size.dev/uvu@0.5.6)
256
+ - [~**145x** lighter than **Jest**](https://pkg-size.dev/jest@30.4.2)
257
+ - [~**124x** lighter than **Vitest**](https://pkg-size.dev/vitest@4.1.6)
258
+ - [~**83x** lighter than **AVA**](https://pkg-size.dev/ava@8.0.0)
259
+ - [~**47x** lighter than **Mocha**](https://pkg-size.dev/mocha@11.7.5)
260
+ - [~**2.8x** lighter than **uvu**](https://pkg-size.dev/uvu@0.5.6)
279
261
 
280
262
  > **Poku** size ensures _cost-saving_ **CI** for services that charge for storage and usage.
281
263
 
@@ -283,8 +265,6 @@ To see the detailed documentation, please visit the [**Documentation**](https://
283
265
 
284
266
  ## Security Policy
285
267
 
286
- [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_codeql.yml?event=push&label=&branch=main&logo=github&logoColor=white&color=f368e0)](https://github.com/wellwelwel/poku/actions/workflows/ci_codeql.yml?query=branch%3Amain)
287
-
288
268
  Please check the [**SECURITY.md**](https://github.com/wellwelwel/poku/blob/main/SECURITY.md).
289
269
 
290
270
  ---
@@ -301,7 +281,7 @@ See the [**Contributing Guide**](https://github.com/wellwelwel/poku/blob/main/CO
301
281
 
302
282
  My thanks to everyone who has dedicated their time and effort to improving **Poku**.
303
283
 
304
- [![Contributors](https://opencollective.com/poku/contributors.svg?width=890&button=false)](https://opencollective.com/poku/contributors.svg?button=false)
284
+ [![Contributors](https://opencollective.com/poku/contributors.svg?width=890&button=false)]()
305
285
 
306
286
  ### Sponsors
307
287
 
@@ -316,8 +296,6 @@ Really thanks to everyone who has supported and keeps supporting my work.
316
296
  ## License
317
297
 
318
298
  **Poku** is under the [**MIT License**](https://github.com/wellwelwel/poku/blob/main/LICENSE).<br />
319
- Copyright ยฉ 2024-present [**Weslley Araรบjo**](https://github.com/wellwelwel) and **Poku** [**contributors**](https://github.com/wellwelwel/poku/graphs/contributors).
299
+ Copyright ยฉ 2024-present [**Weslley Araรบjo**](https://github.com/wellwelwel) and [**contributors**](https://github.com/wellwelwel/poku/graphs/contributors).
320
300
 
321
- [node-version-url]: https://github.com/nodejs/node
322
- [bun-version-url]: https://github.com/oven-sh/bun
323
- [deno-version-url]: https://github.com/denoland/deno
301
+ [check]: https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg
@@ -1,22 +1,25 @@
1
- import {stat}from'node:fs/promises';import {exit,argv}from'node:process';import {hr,log$1 as log,format,GLOBAL,getArg,reporter,hasArg}from'../modules/_shared.js';import'node:path';import'node:os';import'node:child_process';import'node:assert';import'node:assert/strict';import'node:net';import'node:url';const errors = [];
2
- const pathExists = async (arg, path) => {
1
+ import { stat } from "node:fs/promises";
2
+ import { exit, argv } from "node:process";
3
+ import { hr, log$1 as log, format, GLOBAL, getArg, reporter, hasArg } from "../modules/_shared.js";
4
+ import "node:path";
5
+ import "node:os";
6
+ import "node:child_process";
7
+ import "node:assert";
8
+ import "node:assert/strict";
9
+ import "node:net";
10
+ const errors = [], pathExists = async (arg, path) => {
3
11
  try {
4
12
  await stat(path);
5
13
  } catch {
6
14
  errors.push(`--${arg}: ./${path} doesn't exists.`);
7
15
  }
8
- };
9
- const checkUselessValue = (arg) => {
16
+ }, checkUselessValue = (arg) => {
10
17
  const prefix = arg.length === 1 ? "-" : "--";
11
- if (typeof getArg(arg, prefix) !== "undefined")
12
- errors.push(`${prefix}${arg}: this flag shouldn't receive a value.`);
13
- };
14
- const checkRequiredValue = (arg) => {
18
+ typeof getArg(arg, prefix) < "u" && errors.push(`${prefix}${arg}: this flag shouldn't receive a value.`);
19
+ }, checkRequiredValue = (arg) => {
15
20
  const prefix = arg.length === 1 ? "-" : "--";
16
- if (hasArg(arg, prefix) && typeof getArg(arg, prefix) === "undefined")
17
- errors.push(`${prefix}${arg}: this flag require a value.`);
18
- };
19
- const checkFlags = () => {
21
+ hasArg(arg, prefix) && typeof getArg(arg, prefix) > "u" && errors.push(`${prefix}${arg}: this flag require a value.`);
22
+ }, checkFlags = () => {
20
23
  const allowedFlags = /* @__PURE__ */ new Set([
21
24
  "--concurrency",
22
25
  "--config",
@@ -50,15 +53,12 @@ const checkFlags = () => {
50
53
  "-t",
51
54
  "-w",
52
55
  "-x"
53
- ]);
54
- const args = argv.slice(2);
56
+ ]), args = argv.slice(2);
55
57
  for (const arg of args) {
56
58
  const flag = arg.split("=")[0];
57
- if (!allowedFlags.has(flag) && flag.startsWith("-"))
58
- errors.push(`${flag}: unrecognized flag.`);
59
+ !allowedFlags.has(flag) && flag.startsWith("-") && errors.push(`${flag}: unrecognized flag.`);
59
60
  }
60
- };
61
- const checkValues = async () => {
61
+ }, checkValues = async () => {
62
62
  for (const flag of [
63
63
  "debug",
64
64
  "enforce",
@@ -89,24 +89,16 @@ const checkValues = async () => {
89
89
  "t"
90
90
  ])
91
91
  checkRequiredValue(flag);
92
- if (GLOBAL.configFile) await pathExists("config", GLOBAL.configFile);
93
- if (GLOBAL.envFile) await pathExists("envFile", GLOBAL.envFile);
94
- if (getArg("concurrency") && typeof GLOBAL.configs.concurrency === "undefined")
95
- errors.push("--concurrency: expects for a valid integer.");
96
- if (getArg("timeout") && typeof GLOBAL.configs.timeout === "undefined")
97
- errors.push("--timeout: expects for a valid integer.");
92
+ GLOBAL.configFile && await pathExists("config", GLOBAL.configFile), GLOBAL.envFile && await pathExists("envFile", GLOBAL.envFile), getArg("concurrency") && typeof GLOBAL.configs.concurrency > "u" && errors.push("--concurrency: expects for a valid integer."), getArg("timeout") && typeof GLOBAL.configs.timeout > "u" && errors.push("--timeout: expects for a valid integer.");
98
93
  const isolationValue = getArg("isolation");
99
- if (isolationValue && isolationValue !== "none" && isolationValue !== "process")
100
- errors.push(
101
- `--isolation: "${isolationValue}" is not valid. Available: none, process.`
102
- );
94
+ isolationValue && isolationValue !== "none" && isolationValue !== "process" && errors.push(
95
+ `--isolation: "${isolationValue}" is not valid. Available: none, process.`
96
+ );
103
97
  const reporterValue = getArg("reporter") ?? getArg("r", "-");
104
- if (reporterValue && !(reporterValue in reporter))
105
- errors.push(
106
- `--reporter: "${reporterValue}" is not a valid reporter. Available: ${Object.keys(reporter).join(", ")}.`
107
- );
108
- };
109
- const checkConfigFile = () => {
98
+ reporterValue && !(reporterValue in reporter) && errors.push(
99
+ `--reporter: "${reporterValue}" is not a valid reporter. Available: ${Object.keys(reporter).join(", ")}.`
100
+ );
101
+ }, checkConfigFile = () => {
110
102
  const allowedProps = /* @__PURE__ */ new Set([
111
103
  "$schema",
112
104
  "include",
@@ -129,21 +121,13 @@ const checkConfigFile = () => {
129
121
  "testNamePattern",
130
122
  "testSkipPattern"
131
123
  ]);
132
- for (const prop in GLOBAL.configsFromFile) {
133
- if (!allowedProps.has(prop))
134
- errors.push(`${prop}: unrecognized property in the config file.`);
135
- }
124
+ for (const prop in GLOBAL.configsFromFile)
125
+ allowedProps.has(prop) || errors.push(`${prop}: unrecognized property in the config file.`);
126
+ }, enforce = async () => {
127
+ checkFlags(), checkConfigFile(), await checkValues(), errors.length > 0 && (hr(), log(`${format("Ensure Enabled").bold()}
128
+ `), log(errors.map((flag) => format(flag).fail()).join(`
129
+ `)), hr(), exit(1));
130
+ };
131
+ export {
132
+ enforce
136
133
  };
137
- const enforce = async () => {
138
- checkFlags();
139
- checkConfigFile();
140
- await checkValues();
141
- if (errors.length > 0) {
142
- hr();
143
- log(`${format("Ensure Enabled").bold()}
144
- `);
145
- log(errors.map((flag) => format(flag).fail()).join("\n"));
146
- hr();
147
- exit(1);
148
- }
149
- };export{enforce};
package/lib/bin/help.js CHANGED
@@ -1,11 +1,13 @@
1
- import {hr,log$1 as log,format}from'../modules/_shared.js';import'node:path';import'node:process';import'node:os';import'node:child_process';import'node:assert';import'node:assert/strict';import'node:fs/promises';import'node:net';import'node:url';const b = (text) => `${format(text).bold()}`;
2
- const i = (text) => `${format(text).italic()}`;
3
- const u = (text) => `${format(text).underline()}`;
4
- const d = (text) => `${format(text).dim()}`;
5
- const options = i("[--options]");
6
- const paths = i("[paths]");
7
- const bullet = d("\u25CF");
8
- const summary = [
1
+ import { hr, log$1 as log, format } from "../modules/_shared.js";
2
+ import "node:path";
3
+ import "node:process";
4
+ import "node:os";
5
+ import "node:child_process";
6
+ import "node:assert";
7
+ import "node:assert/strict";
8
+ import "node:fs/promises";
9
+ import "node:net";
10
+ const b = (text) => `${format(text).bold()}`, i = (text) => `${format(text).italic()}`, u = (text) => `${format(text).underline()}`, d = (text) => `${format(text).dim()}`, options = i("[--options]"), paths = i("[paths]"), bullet = d("\u25CF"), summary = [
9
11
  ["--concurrency", "Limit the number of tests running concurrently."],
10
12
  ["--config, -c", "Specify a configuration file."],
11
13
  ["--coverage", "Enable coverage collection using a coverage plugin."],
@@ -37,10 +39,7 @@ const summary = [
37
39
  ["--version, -v", "Show Poku's installed version."],
38
40
  ["--watch, -w", "Watch for test events."],
39
41
  ["--watchInterval", "Set an interval for watch events."]
40
- ];
41
- const sortedSummary = summary.sort(([a], [b2]) => a.localeCompare(b2));
42
- const largeEndPad = Math.max(...summary.map(([start]) => start.length));
43
- const header = `
42
+ ], sortedSummary = summary.sort(([a], [b2]) => a.localeCompare(b2)), largeEndPad = Math.max(...summary.map(([start]) => start.length)), header = `
44
43
  \u{1F437} ${format(" Poku \u2014 CLI Usage ").bg("brightMagenta")}
45
44
 
46
45
  \u203A ${u(b("Usage:"))}
@@ -53,15 +52,15 @@ const header = `
53
52
  ${bullet} All CLI options use camel case pattern (e.g.: ${b("--failFast")}).
54
53
  ${bullet} Use ${b("=")} to set an option value (e.g.: ${b("--concurrency=4")}).
55
54
  ${bullet} If you're seeing this, ${u("feel special")} \u2728
56
- `;
57
- const main = `
55
+ `, main = `
58
56
  \u{1F43D} ${format(" Poku \u2014 Options ").bg("brightMagenta")}
59
57
 
60
58
  \u203A ${u(b("Summary:"))}
61
59
 
62
60
  ${sortedSummary.map(
63
61
  ([command, description]) => `${command.padEnd(largeEndPad)} ${d(description)}`
64
- ).join("\n")}
62
+ ).join(`
63
+ `)}
65
64
 
66
65
  \u203A ${u(b("Notes:"))}
67
66
 
@@ -70,19 +69,14 @@ ${sortedSummary.map(
70
69
 
71
70
  ${bullet} Avoid conflicts for environments with multiple platforms:
72
71
  ${u("https://poku.io/docs/tutorials/cross-platform")}
73
- `;
74
- const footer = `
72
+ `, footer = `
75
73
  ${b("Documentation:")} ${u("https://poku.io/docs")}
76
74
 
77
75
  ${bullet} ${b("Poku")} is made with ${b("love")} and ${b("care")} in every detail.
78
76
  ${bullet} Give him a ${b("star")} to show your support \u{1F31F}
79
- `;
80
- const help = () => {
81
- hr();
82
- log(header.trim());
83
- hr();
84
- log(main.trim());
85
- hr();
86
- log(footer.trim());
87
- hr();
88
- };export{help};
77
+ `, help = () => {
78
+ hr(), log(header.trim()), hr(), log(main.trim()), hr(), log(footer.trim()), hr();
79
+ };
80
+ export {
81
+ help
82
+ };