-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error handling to plugins on core's level (#142)
* chore(version control): init commit for wip pr * feat(package.json): added rimraf and a clean command for the build directory * feat(package.json): now running pnpm clean before pnpm build * fix(rollup.config.ts): removed the dts plugin from esm and cjs configs otherwise there's no index.js in the output * refactor(statecharts.ts): removed previous implementation of statePlugins * fix(statecharts.ts): entry/exit actions injection now uses a set to avoid duplicates * feat(statecharts.ts): added the ability to pass actions from outside into createMachine now statePlugins are injected to a state's exit/entry as an array with unique values * chore(changesets): added a changeset for latest changes * ci(vite timestamp): removed vite.config.ts.timestamp file from remote * chore(version control): init commit for wip pr * refactor(package.json): added development packages and scripts (already in other open pr) * chore(*): checkpoint * feat(statecharts.ts): now subscribers are notified when a state plugin's action changes status * chore(version control): removed build from verson control * fix(*): removed workflow-browser-sdk from wrong branch
- Loading branch information
Showing
11 changed files
with
129 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ballerine/workflow-core': patch | ||
--- | ||
|
||
fixed entry/exit plugins outputting duplicate actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ballerine/workflow-core': patch | ||
--- | ||
|
||
removed previous implementation of statePlugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ballerine/workflow-core': patch | ||
--- | ||
|
||
workflow-core consumers may now listen to the status of state plugins (pending|idle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ballerine/workflow-core': patch | ||
--- | ||
|
||
added state plugins, actions which runs on exit or entry of a state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
/dist | ||
/tmp | ||
/out-tsc | ||
/build | ||
|
||
# dependencies | ||
/node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
// Type only exports - does not bundle otherwise. | ||
export { createWorkflow, Error, HttpError } from './lib'; | ||
export type { | ||
StatePlugin, | ||
WorkflowEvent, | ||
WorkflowRunnerArgs, | ||
WorkflowEventWithoutState, | ||
WorkflowOptions, | ||
WorkflowRunnerArgs, | ||
} from './lib'; | ||
|
||
export { | ||
createWorkflow, | ||
} from "./lib"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class HttpError extends Error { | ||
constructor(public status: number, message: string, cause?: unknown) { | ||
super(message, {cause}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
export { createWorkflow } from './create-workflow'; | ||
export { HttpError } from './errors'; | ||
export { | ||
Error, | ||
StatePlugin, | ||
WorkflowEvent, | ||
WorkflowEventWithoutState, | ||
WorkflowOptions, | ||
WorkflowRunnerArgs, | ||
WorkflowEventWithoutState, | ||
StatePlugin, | ||
} from "./types"; | ||
export {createWorkflow} from "./create-workflow"; | ||
} from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters