testomatio-reporter-cli 2.8.5-beta.1-remote → 2.8.6-beta-fix-xml-batch

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 (67) hide show
  1. package/README.md +3 -3
  2. package/bin/cli.js +6 -26
  3. package/package.json +39 -4
  4. package/src/adapter/codecept.js +626 -0
  5. package/src/adapter/cucumber/current.js +230 -0
  6. package/src/adapter/cucumber/legacy.js +158 -0
  7. package/src/adapter/cucumber.js +4 -0
  8. package/src/adapter/cypress-plugin/index.js +110 -0
  9. package/src/adapter/jasmine.js +60 -0
  10. package/src/adapter/jest.js +108 -0
  11. package/src/adapter/mocha.cjs +2 -0
  12. package/src/adapter/mocha.js +211 -0
  13. package/src/adapter/nightwatch.js +88 -0
  14. package/src/adapter/playwright.js +351 -0
  15. package/src/adapter/utils/playwright.js +121 -0
  16. package/src/adapter/utils/step-formatter.js +232 -0
  17. package/src/adapter/vitest.js +455 -0
  18. package/src/adapter/webdriver.js +201 -0
  19. package/src/bin/cli.js +507 -0
  20. package/src/bin/reportXml.js +79 -0
  21. package/src/bin/startTest.js +54 -0
  22. package/src/bin/uploadArtifacts.js +92 -0
  23. package/src/client.js +524 -0
  24. package/src/config.js +30 -0
  25. package/src/constants.js +81 -0
  26. package/src/data-storage.js +204 -0
  27. package/src/helpers.js +1 -0
  28. package/src/junit-adapter/adapter.js +23 -0
  29. package/src/junit-adapter/csharp.js +70 -0
  30. package/src/junit-adapter/index.js +28 -0
  31. package/src/junit-adapter/java.js +58 -0
  32. package/src/junit-adapter/javascript.js +31 -0
  33. package/src/junit-adapter/nunit-parser.js +474 -0
  34. package/src/junit-adapter/python.js +42 -0
  35. package/src/junit-adapter/ruby.js +10 -0
  36. package/src/output.js +57 -0
  37. package/src/pipe/bitbucket.js +285 -0
  38. package/src/pipe/coverage.js +500 -0
  39. package/src/pipe/csv.js +161 -0
  40. package/src/pipe/debug.js +142 -0
  41. package/src/pipe/github.js +256 -0
  42. package/src/pipe/gitlab.js +258 -0
  43. package/src/pipe/html.js +1153 -0
  44. package/src/pipe/index.js +73 -0
  45. package/src/pipe/markdown.js +753 -0
  46. package/src/pipe/testomatio.js +716 -0
  47. package/src/replay.js +274 -0
  48. package/src/reporter-functions.js +155 -0
  49. package/src/reporter.js +42 -0
  50. package/src/services/artifacts.js +59 -0
  51. package/src/services/index.js +15 -0
  52. package/src/services/key-values.js +59 -0
  53. package/src/services/links.js +69 -0
  54. package/src/services/logger.js +320 -0
  55. package/src/template/emptyData.svg +23 -0
  56. package/src/template/testomatio-old.hbs +1421 -0
  57. package/src/template/testomatio.hbs +3726 -0
  58. package/src/uploader.js +382 -0
  59. package/src/utils/constants.js +12 -0
  60. package/src/utils/debug.js +20 -0
  61. package/src/utils/log-formatter.js +118 -0
  62. package/src/utils/log.js +88 -0
  63. package/src/utils/pipe_utils.js +193 -0
  64. package/src/utils/utils.js +732 -0
  65. package/src/xmlReader.js +833 -0
  66. package/types/types.d.ts +432 -0
  67. package/types/vitest.types.d.ts +93 -0
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # testomatio-reporter-cli
2
2
 
3
- Yarn Berry compatible CLI wrapper around `@testomatio/reporter`.
3
+ Yarn Berry compatible standalone CLI for `@testomatio/reporter`.
4
4
 
5
5
  ## Why
6
6
 
7
- Yarn 4 rejects bin names containing `/`. This wrapper exposes valid command names:
7
+ Yarn 4 rejects bin names containing `/`. This package publishes the reporter CLI with valid command names and does not depend on `@testomatio/reporter`, so Yarn does not link the package that contains the invalid bin name.
8
8
 
9
9
  - `testomatio-reporter`
10
10
  - `reporter`
@@ -25,4 +25,4 @@ npx reporter run "npx playwright test"
25
25
  npx testomatio-reporter-cli run "npx playwright test"
26
26
  ```
27
27
 
28
- All arguments are forwarded to `@testomatio/reporter` CLI.
28
+ All arguments are forwarded to the bundled reporter CLI.
package/bin/cli.js CHANGED
@@ -1,39 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { spawn } from 'node:child_process';
4
- import { createRequire } from 'node:module';
5
4
  import { existsSync } from 'node:fs';
6
- import { readFileSync } from 'node:fs';
7
5
  import path from 'node:path';
8
6
  import { fileURLToPath } from 'node:url';
9
7
 
10
- const require = createRequire(import.meta.url);
11
8
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
9
 
13
- let targetCli;
14
- try {
15
- const reporterPackageJsonPath = require.resolve('@testomatio/reporter/package.json');
16
- const reporterPackageJson = JSON.parse(readFileSync(reporterPackageJsonPath, 'utf8'));
17
- const bin = reporterPackageJson.bin || {};
18
- const cliRelativePath =
19
- bin['testomatio/reporter'] ||
20
- bin['testomatio-reporter'] ||
21
- Object.values(bin).find(value => typeof value === 'string' && value.includes('cli.js'));
10
+ const standaloneCliPath = path.resolve(__dirname, '../src/bin/cli.js');
11
+ const repositoryCliPath = path.resolve(__dirname, '../../../src/bin/cli.js');
12
+ const targetCli = existsSync(standaloneCliPath) ? standaloneCliPath : repositoryCliPath;
22
13
 
23
- if (!cliRelativePath) {
24
- throw new Error('Cannot detect CLI entry from @testomatio/reporter package.json bin field');
25
- }
26
-
27
- targetCli = path.resolve(path.dirname(reporterPackageJsonPath), cliRelativePath);
28
- } catch (error) {
29
- const localCliPath = path.resolve(__dirname, '../../../src/bin/cli.js');
30
- if (existsSync(localCliPath)) {
31
- targetCli = localCliPath;
32
- } else {
33
- console.error('[testomatio-reporter] Cannot resolve @testomatio/reporter CLI entrypoint.');
34
- console.error(error?.message || error);
35
- process.exit(1);
36
- }
14
+ if (!existsSync(targetCli)) {
15
+ console.error('[testomatio-reporter] Cannot resolve standalone CLI entrypoint.');
16
+ process.exit(1);
37
17
  }
38
18
 
39
19
  const child = spawn(process.execPath, [targetCli, ...process.argv.slice(2)], {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testomatio-reporter-cli",
3
- "version": "2.8.5-beta.1-remote",
4
- "description": "Yarn Berry compatible CLI wrapper for @testomatio/reporter",
3
+ "version": "2.8.6-beta-fix-xml-batch",
4
+ "description": "Yarn Berry compatible standalone CLI for @testomatio/reporter",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "testomatio-reporter-cli": "./bin/cli.js",
@@ -13,13 +13,48 @@
13
13
  "url": "https://github.com/testomatio/reporter"
14
14
  },
15
15
  "files": [
16
- "bin"
16
+ "bin",
17
+ "src",
18
+ "types"
17
19
  ],
20
+ "scripts": {
21
+ "prepare:standalone": "node ./scripts/prepare-standalone.js",
22
+ "prepack": "node ./scripts/prepare-standalone.js"
23
+ },
18
24
  "engines": {
19
25
  "node": ">=18"
20
26
  },
21
27
  "dependencies": {
22
- "@testomatio/reporter": "2.8.5-beta.1-remote"
28
+ "@aws-sdk/client-s3": "^3.279.0",
29
+ "@aws-sdk/lib-storage": "^3.279.0",
30
+ "@cucumber/cucumber": "^10.9.0",
31
+ "@octokit/rest": "^21.1.1",
32
+ "callsite-record": "^4.1.4",
33
+ "commander": "^12",
34
+ "cross-spawn": "^7.0.3",
35
+ "csv-writer": "^1.6.0",
36
+ "debug": "4.3.4",
37
+ "dotenv": "^16.0.1",
38
+ "fast-xml-parser": "^5.3.4",
39
+ "file-url": "3.0.0",
40
+ "filesize": "^10.1.6",
41
+ "gaxios": ">=6.0 || >=7.0.0-rc.4 || <8",
42
+ "glob": "^10.3",
43
+ "handlebars": "^4.7.8",
44
+ "has-flag": "^5.0.1",
45
+ "humanize-duration": "^3.27.3",
46
+ "is-valid-path": "^0.1.1",
47
+ "js-yaml": "^4.1.1",
48
+ "json-cycle": "^1.3.0",
49
+ "lodash.memoize": "^4.1.2",
50
+ "lodash.merge": "^4.6.2",
51
+ "marked": "^14.1.4",
52
+ "minimatch": "^10.2.4",
53
+ "picocolors": "^1.0.1",
54
+ "pretty-ms": "^7.0.1",
55
+ "promise-retry": "^2.0.1",
56
+ "strip-ansi": "7.1.0",
57
+ "uuid": "^9.0.0"
23
58
  },
24
59
  "license": "MIT"
25
60
  }