@lynxwall/cucumber-tsflow 5.1.3 → 6.0.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.
Files changed (99) hide show
  1. package/README.md +546 -544
  2. package/bin/cucumber-tsflow +1 -1
  3. package/lib/behave.d.ts +1 -1
  4. package/lib/behave.js +27 -27
  5. package/lib/cli/argv-parser.d.ts +24 -24
  6. package/lib/cli/argv-parser.js +103 -103
  7. package/lib/cli/index.d.ts +22 -22
  8. package/lib/cli/index.js +101 -96
  9. package/lib/cli/load-configuration.d.ts +20 -20
  10. package/lib/cli/load-configuration.js +92 -92
  11. package/lib/cli/run.d.ts +1 -1
  12. package/lib/cli/run.js +49 -44
  13. package/lib/cucumber/binding-decorator.d.ts +10 -10
  14. package/lib/cucumber/binding-decorator.js +180 -180
  15. package/lib/cucumber/binding-registry.d.ts +82 -82
  16. package/lib/cucumber/binding-registry.js +216 -218
  17. package/lib/cucumber/hook-decorators.d.ts +46 -46
  18. package/lib/cucumber/hook-decorators.js +102 -102
  19. package/lib/cucumber/managed-scenario-context.d.ts +21 -21
  20. package/lib/cucumber/managed-scenario-context.js +96 -95
  21. package/lib/cucumber/message-collector.d.ts +81 -80
  22. package/lib/cucumber/message-collector.js +251 -241
  23. package/lib/cucumber/parallel/coordinator.d.ts +79 -78
  24. package/lib/cucumber/parallel/coordinator.js +247 -228
  25. package/lib/cucumber/parallel/run-worker.d.ts +1 -1
  26. package/lib/cucumber/parallel/run-worker.js +31 -31
  27. package/lib/cucumber/parallel/worker.d.ts +30 -31
  28. package/lib/cucumber/parallel/worker.js +104 -104
  29. package/lib/cucumber/run-cucumber.d.ts +14 -14
  30. package/lib/cucumber/run-cucumber.js +117 -117
  31. package/lib/cucumber/runtime.d.ts +25 -25
  32. package/lib/cucumber/runtime.js +39 -39
  33. package/lib/cucumber/step-definition-decorators.d.ts +24 -24
  34. package/lib/cucumber/step-definition-decorators.js +91 -91
  35. package/lib/cucumber/utils.d.ts +16 -16
  36. package/lib/cucumber/utils.js +77 -77
  37. package/lib/esnode.js +19 -19
  38. package/lib/esvue.d.ts +1 -1
  39. package/lib/esvue.js +41 -41
  40. package/lib/formatters/behave-json-formatter.d.ts +49 -49
  41. package/lib/formatters/behave-json-formatter.js +75 -75
  42. package/lib/formatters/tsflow-snippet-syntax.d.ts +9 -9
  43. package/lib/formatters/tsflow-snippet-syntax.js +90 -93
  44. package/lib/gherkin/configuration.d.ts +30 -30
  45. package/lib/gherkin/configuration.js +26 -26
  46. package/lib/gherkin/gherkin-feature.d.ts +28 -28
  47. package/lib/gherkin/gherkin-feature.js +333 -335
  48. package/lib/gherkin/gherkin-manager.d.ts +29 -29
  49. package/lib/gherkin/gherkin-manager.js +114 -113
  50. package/lib/gherkin/models.d.ts +45 -45
  51. package/lib/gherkin/models.js +2 -2
  52. package/lib/index.d.ts +4 -4
  53. package/lib/index.js +22 -22
  54. package/lib/snippet.d.ts +1 -1
  55. package/lib/snippet.js +27 -27
  56. package/lib/transpilers/esbuild-transpiler.d.ts +4 -4
  57. package/lib/transpilers/esbuild-transpiler.js +19 -21
  58. package/lib/transpilers/esbuild.d.ts +12 -12
  59. package/lib/transpilers/esbuild.js +54 -54
  60. package/lib/transpilers/vue-sfc/compiler.d.ts +7 -7
  61. package/lib/transpilers/vue-sfc/compiler.js +21 -21
  62. package/lib/transpilers/vue-sfc/index.d.ts +23 -23
  63. package/lib/transpilers/vue-sfc/index.js +47 -45
  64. package/lib/transpilers/vue-sfc/main.d.ts +8 -8
  65. package/lib/transpilers/vue-sfc/main.js +248 -248
  66. package/lib/transpilers/vue-sfc/script.d.ts +5 -5
  67. package/lib/transpilers/vue-sfc/script.js +41 -41
  68. package/lib/transpilers/vue-sfc/template.d.ts +8 -8
  69. package/lib/transpilers/vue-sfc/template.js +101 -101
  70. package/lib/transpilers/vue-sfc/types.d.ts +55 -55
  71. package/lib/transpilers/vue-sfc/types.js +2 -2
  72. package/lib/transpilers/vue-sfc/utils/descriptorCache.d.ts +13 -13
  73. package/lib/transpilers/vue-sfc/utils/descriptorCache.js +67 -67
  74. package/lib/transpilers/vue-sfc/utils/error.d.ts +3 -3
  75. package/lib/transpilers/vue-sfc/utils/error.js +22 -22
  76. package/lib/transpilers/vue-sfc/utils/query.d.ts +13 -13
  77. package/lib/transpilers/vue-sfc/utils/query.js +35 -35
  78. package/lib/tsnode.js +17 -17
  79. package/lib/tsvue.d.ts +1 -1
  80. package/lib/tsvue.js +39 -39
  81. package/lib/types/scenario-context.d.ts +16 -16
  82. package/lib/types/scenario-context.js +17 -17
  83. package/lib/types/scenario-info.d.ts +16 -16
  84. package/lib/types/scenario-info.js +23 -21
  85. package/lib/types/step-binding-flags.d.ts +53 -53
  86. package/lib/types/step-binding-flags.js +58 -58
  87. package/lib/types/step-binding.d.ts +50 -50
  88. package/lib/types/step-binding.js +17 -17
  89. package/lib/types/types.d.ts +21 -21
  90. package/lib/types/types.js +2 -2
  91. package/lib/utils/helpers.d.ts +6 -6
  92. package/lib/utils/helpers.js +17 -17
  93. package/lib/utils/logger.d.ts +3 -3
  94. package/lib/utils/logger.js +29 -29
  95. package/lib/utils/our-callsite.d.ts +27 -27
  96. package/lib/utils/our-callsite.js +73 -71
  97. package/lib/version.d.ts +1 -1
  98. package/lib/version.js +5 -5
  99. package/package.json +58 -58
@@ -1,78 +1,79 @@
1
- /// <reference types="node" />
2
- import { ChildProcess } from 'child_process';
3
- import * as messages from '@cucumber/messages';
4
- import { EventEmitter } from 'events';
5
- import { EventDataCollector } from '@cucumber/cucumber/lib/formatter/helpers';
6
- import { IRuntime, IRuntimeOptions } from '@cucumber/cucumber/lib/runtime';
7
- import { ISupportCodeLibrary } from '@cucumber/cucumber/lib/support_code_library_builder/types';
8
- import { ICoordinatorReport } from '@cucumber/cucumber/lib/runtime/parallel/command_types';
9
- import { IdGenerator } from '@cucumber/messages';
10
- import { ILogger } from '@cucumber/cucumber/lib/logger';
11
- export interface INewCoordinatorOptions {
12
- cwd: string;
13
- logger: ILogger;
14
- eventBroadcaster: EventEmitter;
15
- eventDataCollector: EventDataCollector;
16
- options: IRuntimeOptions;
17
- newId: IdGenerator.NewId;
18
- pickleIds: string[];
19
- supportCodeLibrary: ISupportCodeLibrary;
20
- requireModules: string[];
21
- requirePaths: string[];
22
- importPaths: string[];
23
- numberOfWorkers: number;
24
- }
25
- declare const enum WorkerState {
26
- 'idle' = 0,
27
- 'closed' = 1,
28
- 'running' = 2,
29
- 'new' = 3
30
- }
31
- interface IWorker {
32
- state: WorkerState;
33
- process: ChildProcess;
34
- id: string;
35
- }
36
- interface IPicklePlacement {
37
- index: number;
38
- pickle: messages.Pickle;
39
- }
40
- /**
41
- * Coordinator class from cucumber.js
42
- * No modifications made to this class so it can be updated with newer
43
- * versions without breaking anything.
44
- * The only change required was to configure the runWorkerPath (above)
45
- * to use our run-worker implementation.
46
- */
47
- export default class Coordinator implements IRuntime {
48
- private readonly cwd;
49
- private readonly eventBroadcaster;
50
- private readonly eventDataCollector;
51
- private readonly stopwatch;
52
- private onFinish;
53
- private readonly options;
54
- private readonly newId;
55
- private readonly pickleIds;
56
- private assembledTestCases;
57
- private inProgressPickles;
58
- private workers;
59
- private readonly supportCodeLibrary;
60
- private readonly requireModules;
61
- private readonly requirePaths;
62
- private readonly importPaths;
63
- private readonly numberOfWorkers;
64
- private readonly logger;
65
- private success;
66
- private idleInterventions;
67
- constructor({ cwd, logger, eventBroadcaster, eventDataCollector, pickleIds, options, newId, supportCodeLibrary, requireModules, requirePaths, importPaths, numberOfWorkers }: INewCoordinatorOptions);
68
- parseWorkerMessage(worker: IWorker, message: ICoordinatorReport): void;
69
- awakenWorkers(triggeringWorker: IWorker): void;
70
- startWorker(id: string, total: number): void;
71
- onWorkerProcessClose(exitCode: number): void;
72
- parseTestCaseResult(testCaseFinished: messages.TestCaseFinished): void;
73
- start(): Promise<boolean>;
74
- nextPicklePlacement(): IPicklePlacement | null;
75
- placementAt(index: number): IPicklePlacement;
76
- giveWork(worker: IWorker, force?: boolean): void;
77
- }
78
- export {};
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { ChildProcess } from 'child_process';
4
+ import * as messages from '@cucumber/messages';
5
+ import { EventEmitter } from 'events';
6
+ import { EventDataCollector } from '@cucumber/cucumber/lib/formatter/helpers';
7
+ import { IRuntime, IRuntimeOptions } from '@cucumber/cucumber/lib/runtime';
8
+ import { ISupportCodeLibrary } from '@cucumber/cucumber/lib/support_code_library_builder/types';
9
+ import { ICoordinatorReport } from '@cucumber/cucumber/lib/runtime/parallel/command_types';
10
+ import { IdGenerator } from '@cucumber/messages';
11
+ import { ILogger } from '@cucumber/cucumber/lib/logger';
12
+ export interface INewCoordinatorOptions {
13
+ cwd: string;
14
+ logger: ILogger;
15
+ eventBroadcaster: EventEmitter;
16
+ eventDataCollector: EventDataCollector;
17
+ options: IRuntimeOptions;
18
+ newId: IdGenerator.NewId;
19
+ pickleIds: string[];
20
+ supportCodeLibrary: ISupportCodeLibrary;
21
+ requireModules: string[];
22
+ requirePaths: string[];
23
+ importPaths: string[];
24
+ numberOfWorkers: number;
25
+ }
26
+ declare const enum WorkerState {
27
+ 'idle' = 0,
28
+ 'closed' = 1,
29
+ 'running' = 2,
30
+ 'new' = 3
31
+ }
32
+ interface IWorker {
33
+ state: WorkerState;
34
+ process: ChildProcess;
35
+ id: string;
36
+ }
37
+ interface IPicklePlacement {
38
+ index: number;
39
+ pickle: messages.Pickle;
40
+ }
41
+ /**
42
+ * Coordinator class from cucumber.js
43
+ * No modifications made to this class so it can be updated with newer
44
+ * versions without breaking anything.
45
+ * The only change required was to configure the runWorkerPath (above)
46
+ * to use our run-worker implementation.
47
+ */
48
+ export default class Coordinator implements IRuntime {
49
+ private readonly cwd;
50
+ private readonly eventBroadcaster;
51
+ private readonly eventDataCollector;
52
+ private readonly stopwatch;
53
+ private onFinish;
54
+ private readonly options;
55
+ private readonly newId;
56
+ private readonly pickleIds;
57
+ private assembledTestCases;
58
+ private inProgressPickles;
59
+ private workers;
60
+ private readonly supportCodeLibrary;
61
+ private readonly requireModules;
62
+ private readonly requirePaths;
63
+ private readonly importPaths;
64
+ private readonly numberOfWorkers;
65
+ private readonly logger;
66
+ private success;
67
+ private idleInterventions;
68
+ constructor({ cwd, logger, eventBroadcaster, eventDataCollector, pickleIds, options, newId, supportCodeLibrary, requireModules, requirePaths, importPaths, numberOfWorkers }: INewCoordinatorOptions);
69
+ parseWorkerMessage(worker: IWorker, message: ICoordinatorReport): void;
70
+ awakenWorkers(triggeringWorker: IWorker): void;
71
+ startWorker(id: string, total: number): void;
72
+ onWorkerProcessClose(exitCode: number): void;
73
+ parseTestCaseResult(testCaseFinished: messages.TestCaseFinished): void;
74
+ start(): Promise<boolean>;
75
+ nextPicklePlacement(): IPicklePlacement | null;
76
+ placementAt(index: number): IPicklePlacement;
77
+ giveWork(worker: IWorker, force?: boolean): void;
78
+ }
79
+ export {};