@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.
- package/README.md +546 -544
- package/bin/cucumber-tsflow +1 -1
- package/lib/behave.d.ts +1 -1
- package/lib/behave.js +27 -27
- package/lib/cli/argv-parser.d.ts +24 -24
- package/lib/cli/argv-parser.js +103 -103
- package/lib/cli/index.d.ts +22 -22
- package/lib/cli/index.js +101 -96
- package/lib/cli/load-configuration.d.ts +20 -20
- package/lib/cli/load-configuration.js +92 -92
- package/lib/cli/run.d.ts +1 -1
- package/lib/cli/run.js +49 -44
- package/lib/cucumber/binding-decorator.d.ts +10 -10
- package/lib/cucumber/binding-decorator.js +180 -180
- package/lib/cucumber/binding-registry.d.ts +82 -82
- package/lib/cucumber/binding-registry.js +216 -218
- package/lib/cucumber/hook-decorators.d.ts +46 -46
- package/lib/cucumber/hook-decorators.js +102 -102
- package/lib/cucumber/managed-scenario-context.d.ts +21 -21
- package/lib/cucumber/managed-scenario-context.js +96 -95
- package/lib/cucumber/message-collector.d.ts +81 -80
- package/lib/cucumber/message-collector.js +251 -241
- package/lib/cucumber/parallel/coordinator.d.ts +79 -78
- package/lib/cucumber/parallel/coordinator.js +247 -228
- package/lib/cucumber/parallel/run-worker.d.ts +1 -1
- package/lib/cucumber/parallel/run-worker.js +31 -31
- package/lib/cucumber/parallel/worker.d.ts +30 -31
- package/lib/cucumber/parallel/worker.js +104 -104
- package/lib/cucumber/run-cucumber.d.ts +14 -14
- package/lib/cucumber/run-cucumber.js +117 -117
- package/lib/cucumber/runtime.d.ts +25 -25
- package/lib/cucumber/runtime.js +39 -39
- package/lib/cucumber/step-definition-decorators.d.ts +24 -24
- package/lib/cucumber/step-definition-decorators.js +91 -91
- package/lib/cucumber/utils.d.ts +16 -16
- package/lib/cucumber/utils.js +77 -77
- package/lib/esnode.js +19 -19
- package/lib/esvue.d.ts +1 -1
- package/lib/esvue.js +41 -41
- package/lib/formatters/behave-json-formatter.d.ts +49 -49
- package/lib/formatters/behave-json-formatter.js +75 -75
- package/lib/formatters/tsflow-snippet-syntax.d.ts +9 -9
- package/lib/formatters/tsflow-snippet-syntax.js +90 -93
- package/lib/gherkin/configuration.d.ts +30 -30
- package/lib/gherkin/configuration.js +26 -26
- package/lib/gherkin/gherkin-feature.d.ts +28 -28
- package/lib/gherkin/gherkin-feature.js +333 -335
- package/lib/gherkin/gherkin-manager.d.ts +29 -29
- package/lib/gherkin/gherkin-manager.js +114 -113
- package/lib/gherkin/models.d.ts +45 -45
- package/lib/gherkin/models.js +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +22 -22
- package/lib/snippet.d.ts +1 -1
- package/lib/snippet.js +27 -27
- package/lib/transpilers/esbuild-transpiler.d.ts +4 -4
- package/lib/transpilers/esbuild-transpiler.js +19 -21
- package/lib/transpilers/esbuild.d.ts +12 -12
- package/lib/transpilers/esbuild.js +54 -54
- package/lib/transpilers/vue-sfc/compiler.d.ts +7 -7
- package/lib/transpilers/vue-sfc/compiler.js +21 -21
- package/lib/transpilers/vue-sfc/index.d.ts +23 -23
- package/lib/transpilers/vue-sfc/index.js +47 -45
- package/lib/transpilers/vue-sfc/main.d.ts +8 -8
- package/lib/transpilers/vue-sfc/main.js +248 -248
- package/lib/transpilers/vue-sfc/script.d.ts +5 -5
- package/lib/transpilers/vue-sfc/script.js +41 -41
- package/lib/transpilers/vue-sfc/template.d.ts +8 -8
- package/lib/transpilers/vue-sfc/template.js +101 -101
- package/lib/transpilers/vue-sfc/types.d.ts +55 -55
- package/lib/transpilers/vue-sfc/types.js +2 -2
- package/lib/transpilers/vue-sfc/utils/descriptorCache.d.ts +13 -13
- package/lib/transpilers/vue-sfc/utils/descriptorCache.js +67 -67
- package/lib/transpilers/vue-sfc/utils/error.d.ts +3 -3
- package/lib/transpilers/vue-sfc/utils/error.js +22 -22
- package/lib/transpilers/vue-sfc/utils/query.d.ts +13 -13
- package/lib/transpilers/vue-sfc/utils/query.js +35 -35
- package/lib/tsnode.js +17 -17
- package/lib/tsvue.d.ts +1 -1
- package/lib/tsvue.js +39 -39
- package/lib/types/scenario-context.d.ts +16 -16
- package/lib/types/scenario-context.js +17 -17
- package/lib/types/scenario-info.d.ts +16 -16
- package/lib/types/scenario-info.js +23 -21
- package/lib/types/step-binding-flags.d.ts +53 -53
- package/lib/types/step-binding-flags.js +58 -58
- package/lib/types/step-binding.d.ts +50 -50
- package/lib/types/step-binding.js +17 -17
- package/lib/types/types.d.ts +21 -21
- package/lib/types/types.js +2 -2
- package/lib/utils/helpers.d.ts +6 -6
- package/lib/utils/helpers.js +17 -17
- package/lib/utils/logger.d.ts +3 -3
- package/lib/utils/logger.js +29 -29
- package/lib/utils/our-callsite.d.ts +27 -27
- package/lib/utils/our-callsite.js +73 -71
- package/lib/version.d.ts +1 -1
- package/lib/version.js +5 -5
- package/package.json +58 -58
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* to
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
private readonly
|
|
50
|
-
private readonly
|
|
51
|
-
private readonly
|
|
52
|
-
private
|
|
53
|
-
private
|
|
54
|
-
private readonly
|
|
55
|
-
private readonly
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
private
|
|
60
|
-
private readonly
|
|
61
|
-
private readonly
|
|
62
|
-
private readonly
|
|
63
|
-
private readonly
|
|
64
|
-
private readonly
|
|
65
|
-
private
|
|
66
|
-
private
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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 {};
|