@overkill-dev/run 0.0.28 → 0.0.30

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 (124) hide show
  1. package/assertion-protocol/assertion-node-shape.d.ts +4 -3
  2. package/assertion-protocol/assertion-node-shape.d.ts.map +1 -1
  3. package/assertion-protocol/assertion-node.d.ts +2 -2
  4. package/assertion-protocol/assertion-node.d.ts.map +1 -1
  5. package/assertion-protocol/assertion-reference.d.ts +2 -2
  6. package/assertion-protocol/assertion-reference.d.ts.map +1 -1
  7. package/assertion-protocol/assertions/collection.d.ts +2 -2
  8. package/assertion-protocol/assertions/collection.d.ts.map +1 -1
  9. package/assertion-protocol/assertions/fail.d.ts +2 -2
  10. package/assertion-protocol/assertions/fail.d.ts.map +1 -1
  11. package/assertion-protocol/assertions/numeric.d.ts +2 -2
  12. package/assertion-protocol/assertions/numeric.d.ts.map +1 -1
  13. package/assertion-protocol/assertions/string.d.ts +2 -2
  14. package/assertion-protocol/assertions/string.d.ts.map +1 -1
  15. package/assertion-protocol/assertions/type-shape.d.ts +3 -3
  16. package/assertion-protocol/assertions/type-shape.d.ts.map +1 -1
  17. package/assertion-protocol/evaluation.d.ts.map +1 -1
  18. package/assertion-protocol/evaluation.js +8 -3
  19. package/assertion-protocol/evaluation.js.map +1 -1
  20. package/assertion-protocol/source-location-forwarding.js +26 -0
  21. package/assertion-protocol/source-location-forwarding.js.map +1 -0
  22. package/assertion-protocol/source-location.js +1 -0
  23. package/assertion-protocol/source-location.js.map +1 -1
  24. package/assertion-protocol/thrown-matcher.d.ts +2 -2
  25. package/assertion-protocol/thrown-matcher.d.ts.map +1 -1
  26. package/assertion-protocol/thrown-matcher.js +23 -23
  27. package/assertion-protocol/thrown-matcher.js.map +1 -1
  28. package/engine/assertion-facade.d.ts.map +1 -1
  29. package/engine/assertion-facade.js +5 -4
  30. package/engine/assertion-facade.js.map +1 -1
  31. package/engine/custom-assertion-recording.d.ts +3 -3
  32. package/engine/custom-assertion-recording.d.ts.map +1 -1
  33. package/engine/custom-assertion-recording.js +19 -19
  34. package/engine/custom-assertion-recording.js.map +1 -1
  35. package/engine/engine.d.ts +0 -5
  36. package/engine/engine.d.ts.map +1 -1
  37. package/engine/engine.js +1 -11
  38. package/engine/engine.js.map +1 -1
  39. package/engine/execution-result.js +8 -3
  40. package/engine/execution-result.js.map +1 -1
  41. package/engine/execution.d.ts.map +1 -1
  42. package/engine/execution.js +9 -2
  43. package/engine/execution.js.map +1 -1
  44. package/engine/identity.d.ts +2 -2
  45. package/engine/identity.d.ts.map +1 -1
  46. package/engine/identity.js +6 -6
  47. package/engine/identity.js.map +1 -1
  48. package/engine/reporter.d.ts +10 -3
  49. package/engine/reporter.d.ts.map +1 -1
  50. package/engine/reporter.js.map +1 -1
  51. package/engine/require-assertion-facade.d.ts.map +1 -1
  52. package/engine/require-assertion-facade.js +25 -24
  53. package/engine/require-assertion-facade.js.map +1 -1
  54. package/engine/run-result.d.ts +2 -2
  55. package/engine/run-result.d.ts.map +1 -1
  56. package/engine/test-node.d.ts +19 -18
  57. package/engine/test-node.d.ts.map +1 -1
  58. package/engine/test-node.js +37 -23
  59. package/engine/test-node.js.map +1 -1
  60. package/engine/test-plan.d.ts +8 -5
  61. package/engine/test-plan.d.ts.map +1 -1
  62. package/engine/test-plan.js +43 -21
  63. package/engine/test-plan.js.map +1 -1
  64. package/package.json +6 -4
  65. package/packages/engine/assertion-protocol.entry-point.d.ts +1 -1
  66. package/packages/engine/assertion-protocol.entry-point.d.ts.map +1 -1
  67. package/packages/engine/assertion-protocol.entry-point.js.map +1 -1
  68. package/packages/run/filters.entry-point.d.ts +1 -1
  69. package/packages/run/filters.entry-point.d.ts.map +1 -1
  70. package/packages/run/filters.entry-point.js +1 -1
  71. package/packages/run/filters.entry-point.js.map +1 -1
  72. package/packages/run/run.entry-point.d.ts +3 -0
  73. package/packages/run/run.entry-point.d.ts.map +1 -1
  74. package/packages/run/run.entry-point.js +1 -0
  75. package/packages/run/run.entry-point.js.map +1 -1
  76. package/readme.md +14 -2
  77. package/run/collected-run-plan.js +13 -9
  78. package/run/collected-run-plan.js.map +1 -1
  79. package/run/default-direct-reporter.js +14 -0
  80. package/run/default-direct-reporter.js.map +1 -0
  81. package/run/default-run-engine.js +2 -12
  82. package/run/default-run-engine.js.map +1 -1
  83. package/run/direct-runtime-policy.js +24 -0
  84. package/run/direct-runtime-policy.js.map +1 -0
  85. package/run/run-engine-selection.js +1 -2
  86. package/run/run-engine-selection.js.map +1 -1
  87. package/run/run-filter-grammar.js +2 -2
  88. package/run/run-filter-grammar.js.map +1 -1
  89. package/run/run-if-main-facts.js +82 -0
  90. package/run/run-if-main-facts.js.map +1 -0
  91. package/run/run-if-main-options.d.ts +21 -0
  92. package/run/run-if-main-options.d.ts.map +1 -0
  93. package/run/run-if-main-options.js +44 -0
  94. package/run/run-if-main-options.js.map +1 -0
  95. package/run/run-if-main-profile.js +117 -0
  96. package/run/run-if-main-profile.js.map +1 -0
  97. package/run/run-if-main.d.ts +5 -0
  98. package/run/run-if-main.d.ts.map +1 -0
  99. package/run/run-if-main.js +76 -0
  100. package/run/run-if-main.js.map +1 -0
  101. package/run/run-list-renderer.js +42 -17
  102. package/run/run-list-renderer.js.map +1 -1
  103. package/run/run-selection-filters.d.ts +1 -1
  104. package/run/run-selection-filters.d.ts.map +1 -1
  105. package/run/run-selection-filters.js +13 -13
  106. package/run/run-selection-filters.js.map +1 -1
  107. package/run/run-selection.js +26 -2
  108. package/run/run-selection.js.map +1 -1
  109. package/run/run-test-plan.js +1 -1
  110. package/run/run-test-plan.js.map +1 -1
  111. package/run/run-types.d.ts +5 -6
  112. package/run/run-types.d.ts.map +1 -1
  113. package/run/run-types.js.map +1 -1
  114. package/run/run.js +3 -1
  115. package/run/run.js.map +1 -1
  116. package/run/supervised-child-process.js +13 -12
  117. package/run/supervised-child-process.js.map +1 -1
  118. package/run/supervised-run-runtime.js +1 -1
  119. package/run/supervised-run-runtime.js.map +1 -1
  120. package/sbom.cdx.json +14 -14
  121. package/engine/run-if-main.d.ts +0 -29
  122. package/engine/run-if-main.d.ts.map +0 -1
  123. package/engine/run-if-main.js +0 -46
  124. package/engine/run-if-main.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-if-main.d.ts","sourceRoot":"","sources":["../../../../source/engine/run-if-main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CACpB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,QAAQ,CAAC;IACxD,QAAQ,CAAC,cAAc,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD,CAAC;AAkDF,wBAAgB,eAAe,CAAC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAe9E"}
@@ -1,46 +0,0 @@
1
- import { createPlainOutputRenderer } from "./reporter-output.js";
2
- const failureExitCodes = new Set([undefined, null, 0, '0']);
3
- function shouldSetFailureExitCode(exitCode) {
4
- return failureExitCodes.has(exitCode);
5
- }
6
- function hasFailure(result) {
7
- return result.summary.failed > 0 || result.runnerErrors.length > 0;
8
- }
9
- function rootMetadata(options) {
10
- return options?.root?.metadata ?? {};
11
- }
12
- function rootName(meta, options) {
13
- return options?.root?.name ?? meta.url;
14
- }
15
- function createRootOptions(meta, testNode, options) {
16
- return {
17
- children: [testNode],
18
- metadata: rootMetadata(options),
19
- name: rootName(meta, options)
20
- };
21
- }
22
- function createExecuteOptions(options, dependencies) {
23
- const startedAt = new Date(dependencies.wallClock.currentTimestampInMilliseconds);
24
- return {
25
- execution: { mode: 'serial-in-process' },
26
- outputRenderer: options?.outputRenderer ?? createPlainOutputRenderer(),
27
- reporters: options?.reporters ?? [],
28
- runFacts: {
29
- ...options?.runFacts,
30
- nodeVersion: dependencies.nodeVersion
31
- },
32
- startedAt: startedAt.toISOString()
33
- };
34
- }
35
- export function createRunIfMain(dependencies) {
36
- return async function runIfMain(meta, testNode, options) {
37
- if (!meta.main) {
38
- return;
39
- }
40
- const result = await dependencies.execute(dependencies.createTestPlan(dependencies.createRoot(createRootOptions(meta, testNode, options))), createExecuteOptions(options, dependencies));
41
- if (hasFailure(result) && shouldSetFailureExitCode(dependencies.readExitCode())) {
42
- dependencies.writeExitCode(1);
43
- }
44
- };
45
- }
46
- //# sourceMappingURL=run-if-main.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-if-main.js","sourceRoot":"","sources":["../../../../source/engine/run-if-main.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAuB,MAAM,sBAAsB,CAAC;AAkCtF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAqC,CAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAE,CAAC,CAAC;AAElG,SAAS,wBAAwB,CAAC,QAA4C;IAC1E,OAAO,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,UAAU,CAAC,MAAiB;IACjC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,YAAY,CAAC,OAAqC;IACvD,OAAO,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,QAAQ,CAAC,IAA0B,EAAE,OAAqC;IAC/E,OAAO,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED,SAAS,iBAAiB,CACtB,IAA0B,EAC1B,QAAkB,EAClB,OAAqC;IAErC,OAAO;QACH,QAAQ,EAAE,CAAE,QAAQ,CAAE;QACtB,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC;QAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;KAChC,CAAC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