Comparing version 2.4.4 to 2.5.0
@@ -21,2 +21,3 @@ #! /usr/bin/env node | ||
} | ||
const enforce = (0, get_arg_js_1.hasArg)('enforce') || (0, get_arg_js_1.hasArg)('x', '-'); | ||
const configFile = (0, get_arg_js_1.getArg)('config') || (0, get_arg_js_1.getArg)('c', '-'); | ||
@@ -38,10 +39,10 @@ const defaultConfigs = await (0, options_js_1.getConfigs)(configFile); | ||
const exclude = (_b = (0, get_arg_js_1.getArg)('exclude')) !== null && _b !== void 0 ? _b : defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.exclude; | ||
const killPort = (0, get_arg_js_1.getArg)('kill-port'); | ||
const killRange = (0, get_arg_js_1.getArg)('kill-range'); | ||
const killPID = (0, get_arg_js_1.getArg)('kill-pid'); | ||
const killPort = (0, get_arg_js_1.getArg)('killport'); | ||
const killRange = (0, get_arg_js_1.getArg)('killrange'); | ||
const killPID = (0, get_arg_js_1.getArg)('killpid'); | ||
const denoAllow = (_c = (0, get_arg_js_1.argToArray)('deno-allow')) !== null && _c !== void 0 ? _c : (_d = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _d === void 0 ? void 0 : _d.allow; | ||
const denoDeny = (_e = (0, get_arg_js_1.argToArray)('deno-deny')) !== null && _e !== void 0 ? _e : (_f = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _f === void 0 ? void 0 : _f.deny; | ||
const denoCJS = ((_g = (0, get_arg_js_1.getArg)('deno-cjs')) === null || _g === void 0 ? void 0 : _g.split(',').map((a) => a.trim()).filter((a) => a)) || | ||
(0, get_arg_js_1.hasArg)('deno-cjs') || | ||
const denoAllow = (_c = (0, get_arg_js_1.argToArray)('denoallow')) !== null && _c !== void 0 ? _c : (_d = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _d === void 0 ? void 0 : _d.allow; | ||
const denoDeny = (_e = (0, get_arg_js_1.argToArray)('denodeny')) !== null && _e !== void 0 ? _e : (_f = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _f === void 0 ? void 0 : _f.deny; | ||
const denoCJS = ((_g = (0, get_arg_js_1.getArg)('denocjs')) === null || _g === void 0 ? void 0 : _g.split(',').map((a) => a.trim()).filter((a) => a)) || | ||
(0, get_arg_js_1.hasArg)('denocjs') || | ||
((_h = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _h === void 0 ? void 0 : _h.cjs); | ||
@@ -52,5 +53,5 @@ | ||
const debug = (0, get_arg_js_1.hasArg)('debug') || (0, get_arg_js_1.hasArg)('d', '-') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.debug); | ||
const failFast = (0, get_arg_js_1.hasArg)('fail-fast') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.failFast); | ||
const failFast = (0, get_arg_js_1.hasArg)('failfast') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.failFast); | ||
const watchMode = (0, get_arg_js_1.hasArg)('watch') || (0, get_arg_js_1.hasArg)('w', '-'); | ||
const hasEnvFile = (0, get_arg_js_1.hasArg)('env-file'); | ||
const hasEnvFile = (0, get_arg_js_1.hasArg)('envfile'); | ||
const concurrency = (() => { | ||
@@ -66,3 +67,3 @@ if (!(parallel || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.parallel))) { | ||
} | ||
if ((0, get_arg_js_1.hasArg)('list-files')) { | ||
if ((0, get_arg_js_1.hasArg)('listfiles')) { | ||
const { listFiles } = require('../modules/helpers/list-files.js'); | ||
@@ -90,2 +91,6 @@ const files = []; | ||
} | ||
if (enforce) { | ||
const { checkFlags } = require('./enforce.js'); | ||
checkFlags(); | ||
} | ||
const tasks = []; | ||
@@ -114,3 +119,3 @@ | ||
if (hasEnvFile || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.envFile)) { | ||
const envFilePath = (_r = (0, get_arg_js_1.getArg)('env-file')) !== null && _r !== void 0 ? _r : defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.envFile; | ||
const envFilePath = (_r = (0, get_arg_js_1.getArg)('envfile')) !== null && _r !== void 0 ? _r : defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.envFile; | ||
tasks.push((0, env_js_1.envFile)(envFilePath)); | ||
@@ -117,0 +122,0 @@ } |
@@ -20,3 +20,3 @@ "use strict"; | ||
const executing = new Set(); | ||
const interval = Number((0, get_arg_js_1.getArg)('watch-interval')) || 1500; | ||
const interval = Number((0, get_arg_js_1.getArg)('watchinterval')) || 1500; | ||
const setIsRunning = (value) => { | ||
@@ -23,0 +23,0 @@ isRunning = value; |
@@ -10,2 +10,2 @@ "use strict"; | ||
}; | ||
exports.VERSION = '2.4.4'; | ||
exports.VERSION = '2.5.0'; |
@@ -9,3 +9,3 @@ "use strict"; | ||
client.on('connect', () => { | ||
client.destroy(); | ||
client.end(); | ||
resolve(true); | ||
@@ -12,0 +12,0 @@ }); |
@@ -5,5 +5,7 @@ "use strict"; | ||
const node_process_1 = require("process"); | ||
const to_dynamic_case_js_1 = require("./to-dynamic-case.js"); | ||
const [, , ...processArgs] = node_process_1.argv; | ||
const regexQuotes = /''|""/; | ||
const getArg = (arg, prefix = '--', baseArgs = processArgs) => { | ||
const processedArgs = processArgs.map(to_dynamic_case_js_1.toDynamicCase); | ||
const getArg = (arg, prefix = '--', baseArgs = processedArgs) => { | ||
const argPattern = `${prefix}${arg}=`; | ||
@@ -17,3 +19,3 @@ const argValue = baseArgs.find((a) => a.startsWith(argPattern)); | ||
exports.getArg = getArg; | ||
const hasArg = (arg, prefix = '--', baseArgs = processArgs) => { | ||
const hasArg = (arg, prefix = '--', baseArgs = processedArgs) => { | ||
const argPattern = `${prefix}${arg}`; | ||
@@ -23,3 +25,3 @@ return baseArgs.some((a) => a.startsWith(argPattern)); | ||
exports.hasArg = hasArg; | ||
const getPaths = (prefix = '--', baseArgs = processArgs) => { | ||
const getPaths = (prefix = '--', baseArgs = processedArgs) => { | ||
let hasPaths = false; | ||
@@ -39,3 +41,3 @@ const paths = []; | ||
exports.getPaths = getPaths; | ||
const argToArray = (arg, prefix = '--', baseArgs = processArgs) => { | ||
const argToArray = (arg, prefix = '--', baseArgs = processedArgs) => { | ||
const hasArgument = (0, exports.hasArg)(arg, prefix, baseArgs); | ||
@@ -42,0 +44,0 @@ if (!hasArgument) { |
@@ -58,3 +58,3 @@ "use strict"; | ||
write_js_1.Write.hr(); | ||
write_js_1.Write.log(` ${(0, format_js_1.format)('ℹ').fail()} ${(0, format_js_1.format)('fail-fast').bold()} is enabled`); | ||
write_js_1.Write.log(` ${(0, format_js_1.format)('ℹ').fail()} ${(0, format_js_1.format)('failFast').bold()} is enabled`); | ||
} | ||
@@ -92,3 +92,3 @@ break; | ||
node_process_1.default.exitCode = 1; | ||
throw new Error(` ${(0, format_js_1.format)('ℹ').fail()} ${(0, format_js_1.format)('fail-fast').bold()} is enabled`); | ||
throw new Error(` ${(0, format_js_1.format)('ℹ').fail()} ${(0, format_js_1.format)('failFast').bold()} is enabled`); | ||
} | ||
@@ -95,0 +95,0 @@ return false; |
{ | ||
"name": "poku", | ||
"version": "2.4.4", | ||
"version": "2.5.0", | ||
"description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.", | ||
@@ -40,4 +40,4 @@ "main": "./lib/modules/index.js", | ||
"test:bun:parallel": "bun src/bin/index.ts --bun -p test/unit test/integration test/e2e", | ||
"test:deno:sequential": "tsx src/bin/index.ts --deno --deno-allow=all test/unit test/integration test/e2e", | ||
"test:deno:parallel": "tsx src/bin/index.ts --deno --deno-allow=all -p test/unit test/integration test/e2e", | ||
"test:deno:sequential": "tsx src/bin/index.ts --deno --denoAllow=all test/unit test/integration test/e2e", | ||
"test:deno:parallel": "tsx src/bin/index.ts --deno --denoAllow=all -p test/unit test/integration test/e2e", | ||
"pretest:c8": "tsx tools/build/c8-file.ts", | ||
@@ -61,6 +61,6 @@ "test:c8": "c8 --experimental-monocart tsx test/c8.test.ts", | ||
"@biomejs/biome": "1.8.3", | ||
"@types/node": "^22.2.0", | ||
"@types/node": "^22.4.1", | ||
"c8": "^10.1.2", | ||
"jsonc.min": "^1.0.0", | ||
"monocart-coverage-reports": "^2.10.2", | ||
"monocart-coverage-reports": "^2.10.3", | ||
"packages-update": "^2.0.0", | ||
@@ -67,0 +67,0 @@ "prettier": "^3.3.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165386
115
3576