@testomatio/reporter 2.7.0 → 2.7.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.
@@ -6,9 +6,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const node_child_process_1 = require("node:child_process");
8
8
  const node_path_1 = require("node:path");
9
+ const node_url_1 = require("node:url");
9
10
  const utils_js_1 = require("../utils/utils.js");
10
11
  const picocolors_1 = __importDefault(require("picocolors"));
11
- // Define __dirname - this will be replaced by build script with actual __dirname for CommonJS
12
+ // @ts-ignore
12
13
  const cliPath = (0, node_path_1.join)(__dirname, 'cli.js');
13
14
  const version = (0, utils_js_1.getPackageVersion)();
14
15
  console.log(picocolors_1.default.cyan(picocolors_1.default.bold(` 🤩 Testomat.io Reporter v${version}`)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from 'node:child_process';
3
3
  import { join, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
4
5
  import { getPackageVersion } from '../utils/utils.js';
5
6
  import pc from 'picocolors';
6
7
 
7
- // Define __dirname - this will be replaced by build script with actual __dirname for CommonJS
8
- const __dirname = typeof globalThis.__dirname !== 'undefined' ? globalThis.__dirname : '.';
8
+ // @ts-ignore
9
+ const __dirname = typeof global.__dirname !== 'undefined' ? global.__dirname : dirname(fileURLToPath(import.meta.url));
9
10
  const cliPath = join(__dirname, 'cli.js');
10
11
 
11
12
  const version = getPackageVersion();