Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
retro committed Jan 25, 2024
1 parent 4076d55 commit b340e54
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 34 deletions.
17 changes: 8 additions & 9 deletions src/Service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import * as StateImpl from './state/StateImpl.js';
import { Effect, Match, Option, Queue, pipe } from 'effect';
import { Get } from 'type-fest';

import { State } from './State.js';
import { BaseTask } from './elements/BaseTask.js';
import { CompositeTask } from './elements/CompositeTask.js';
import { Task } from './elements/Task.js';
import { Workflow, WorkflowMetadata } from './elements/Workflow.js';
import {
ConditionDoesNotExist,
ConditionDoesNotExistInStore,
Expand All @@ -16,7 +22,7 @@ import {
WorkItemDoesNotExist,
WorkflowDoesNotExist,
} from './errors.js';
import { Effect, Match, Option, Queue, pipe } from 'effect';
import * as StateImpl from './state/StateImpl.js';
import {
ExecutionContext,
ExecutionContextQueueItem,
Expand All @@ -36,13 +42,6 @@ import {
WorkflowId,
WorkflowInstance,
} from './types.js';
import { Workflow, WorkflowMetadata } from './elements/Workflow.js';

import { BaseTask } from './elements/BaseTask.js';
import { CompositeTask } from './elements/CompositeTask.js';
import { Get } from 'type-fest';
import { State } from './State.js';
import { Task } from './elements/Task.js';
import { nanoidIdGenerator } from './util.js';

function pathAsArray(path: string | string[] | readonly string[]) {
Expand Down
8 changes: 4 additions & 4 deletions src/elements/BaseTask.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { Effect, pipe } from 'effect';

import { State } from '../State.js';
import {
ConditionDoesNotExist,
ConditionDoesNotExistInStore,
Expand All @@ -11,8 +14,6 @@ import {
WorkItemDoesNotExist,
WorkflowDoesNotExist,
} from '../errors.js';
import { ConditionToTaskFlow, TaskToConditionFlow } from './Flow.js';
import { Effect, pipe } from 'effect';
import {
ExecutionContext,
JoinType,
Expand All @@ -21,9 +22,8 @@ import {
TaskState,
WorkflowId,
} from '../types.js';

import { Condition } from './Condition.js';
import { State } from '../State.js';
import { ConditionToTaskFlow, TaskToConditionFlow } from './Flow.js';
import { Workflow } from './Workflow.js';

// TODO: handle case where task is completed and prev condition(s)
Expand Down
26 changes: 13 additions & 13 deletions src/elements/CompositeTask.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import {
CompositeTaskActivities,
ExecutionContext,
JoinType,
ShouldCompositeTaskCompleteFn,
ShouldCompositeTaskFailFn,
SplitType,
WorkflowId,
isValidTaskInstanceTransition,
} from '../types.js';
import { Effect, pipe } from 'effect';

import { State } from '../State.js';
import {
ConditionDoesNotExist,
ConditionDoesNotExistInStore,
Expand All @@ -21,10 +14,17 @@ import {
WorkItemDoesNotExist,
WorkflowDoesNotExist,
} from '../errors.js';
import { Effect, pipe } from 'effect';

import {
CompositeTaskActivities,
ExecutionContext,
JoinType,
ShouldCompositeTaskCompleteFn,
ShouldCompositeTaskFailFn,
SplitType,
WorkflowId,
isValidTaskInstanceTransition,
} from '../types.js';
import { BaseTask } from './BaseTask.js';
import { State } from '../State.js';
import { Workflow } from './Workflow.js';

export class CompositeTask extends BaseTask {
Expand Down
8 changes: 4 additions & 4 deletions src/elements/Condition.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ConditionName, ConditionNode, WorkflowId } from '../types.js';
import { ConditionToTaskFlow, TaskToConditionFlow } from './Flow.js';

import { BaseTask } from './BaseTask.js';
import { Effect } from 'effect';

import { State } from '../State.js';
import { ConditionName, ConditionNode, WorkflowId } from '../types.js';
import { BaseTask } from './BaseTask.js';
import { ConditionToTaskFlow, TaskToConditionFlow } from './Flow.js';
import { Workflow } from './Workflow.js';

export class Condition {
Expand Down
8 changes: 4 additions & 4 deletions src/elements/Workflow.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { Effect } from 'effect';

import { State } from '../State.js';
import { E2WFOJNet } from '../e2wfojnet.js';
import {
ConditionDoesNotExist,
ConditionDoesNotExistInStore,
Expand All @@ -23,14 +27,10 @@ import {
WorkflowInstanceParent,
finalWorkflowInstanceStates,
} from '../types.js';

import { BaseTask } from './BaseTask.js';
import { CompositeTask } from './CompositeTask.js';
import { Condition } from './Condition.js';
import { E2WFOJNet } from '../e2wfojnet.js';
import { Effect } from 'effect';
import { Marking } from './Marking.js';
import { State } from '../State.js';

export type WorkflowMetadata<T> = T extends Workflow<
any,
Expand Down

0 comments on commit b340e54

Please sign in to comment.