diff --git a/src/types/modules/act.d.ts b/src/types/modules/act.d.ts deleted file mode 100644 index 0d53d171f695..000000000000 --- a/src/types/modules/act.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type {GithubWorkflowStep, StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; - -declare module '@kie/act-js' { - type CustemStepIdentifier = { - id?: string; - name: string; - run?: string | GithubWorkflowStep; - mockWith?: string | GithubWorkflowStep; - with?: string; - envs?: string[]; - inputs?: string[]; - } & Omit; - - export type {GithubWorkflowStep, StepIdentifier, CustemStepIdentifier}; -} diff --git a/workflow_tests/mocks/createNewVersionMocks.ts b/workflow_tests/mocks/createNewVersionMocks.ts index dd094e6459e8..4703b13e3779 100644 --- a/workflow_tests/mocks/createNewVersionMocks.ts +++ b/workflow_tests/mocks/createNewVersionMocks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; // validateactor diff --git a/workflow_tests/mocks/deployBlockerMocks.ts b/workflow_tests/mocks/deployBlockerMocks.ts index b60d41383a1e..a5b26f876103 100644 --- a/workflow_tests/mocks/deployBlockerMocks.ts +++ b/workflow_tests/mocks/deployBlockerMocks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; // updateChecklist diff --git a/workflow_tests/mocks/deployMocks.ts b/workflow_tests/mocks/deployMocks.ts index 2fda1efe8e78..f7d0c7132f7a 100644 --- a/workflow_tests/mocks/deployMocks.ts +++ b/workflow_tests/mocks/deployMocks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; const DEPLOY_STAGING__CHECKOUT__STEP_MOCK = createMockStep('Checkout staging branch', 'Checking out staging branch', 'DEPLOY_STAGING', ['ref', 'token']); diff --git a/workflow_tests/mocks/finishReleaseCycleMocks.ts b/workflow_tests/mocks/finishReleaseCycleMocks.ts index 23d81a557705..2c5d84488e3f 100644 --- a/workflow_tests/mocks/finishReleaseCycleMocks.ts +++ b/workflow_tests/mocks/finishReleaseCycleMocks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; // validate diff --git a/workflow_tests/mocks/lintMocks.ts b/workflow_tests/mocks/lintMocks.ts index 27ce53afc1f4..a3eb2b61cbc5 100644 --- a/workflow_tests/mocks/lintMocks.ts +++ b/workflow_tests/mocks/lintMocks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; // lint diff --git a/workflow_tests/utils/JobMocker.ts b/workflow_tests/utils/JobMocker.ts index 83f44331aac9..14e721eb3612 100644 --- a/workflow_tests/utils/JobMocker.ts +++ b/workflow_tests/utils/JobMocker.ts @@ -1,8 +1,9 @@ -import type {CustemStepIdentifier, StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import type {PathOrFileDescriptor} from 'fs'; import fs from 'fs'; import path from 'path'; import yaml from 'yaml'; +import type CustemStepIdentifier from './types'; // eslint-disable-next-line @typescript-eslint/naming-convention type YamlMockJob = Omit & {'runs-on'?: string}; diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index f358e9308915..ac90e690b72e 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -1,11 +1,12 @@ /* eslint no-console: ["error", { allow: ["warn", "log"] }] */ -import type {CustemStepIdentifier, StepIdentifier} from '@kie/act-js'; +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import type {PathLike} from 'fs'; import fs from 'fs'; import path from 'path'; import {exit} from 'process'; import yaml from 'yaml'; import type {YamlMockJob, YamlWorkflow} from './JobMocker'; +import type CustemStepIdentifier from './types'; const workflowsDirectory = path.resolve(__dirname, '..', '..', '.github', 'workflows'); const workflowTestsDirectory = path.resolve(__dirname, '..'); diff --git a/workflow_tests/utils/types.ts b/workflow_tests/utils/types.ts new file mode 100644 index 000000000000..79b2e7756498 --- /dev/null +++ b/workflow_tests/utils/types.ts @@ -0,0 +1,13 @@ +import type {GithubWorkflowStep, StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; + +type CustemStepIdentifier = { + id?: string; + name: string; + run?: string | GithubWorkflowStep; + mockWith?: string | GithubWorkflowStep; + with?: string; + envs?: string[]; + inputs?: string[]; +} & Omit; + +export default CustemStepIdentifier;