Skip to content

Commit 641a329

Browse files
authored
fix-155 (#176)
1 parent 30fc59c commit 641a329

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,25 @@ npm install && npm run build && npm run test
3737

3838
#### Install
3939

40-
For the latest stable version:
4140

41+
##### Version >= 4.0.0
42+
Note: Version 4.0.0 has not been released yet.
43+
```sh
44+
npm i @serverlessworkflow/sdk-typescript
45+
```
46+
47+
48+
##### Version < 4.0.0
4249
```sh
4350
npm i @severlessworkflow/sdk-typescript
4451
```
4552

53+
54+
4655
#### Create Workflow using builder API
4756

4857
```typescript
49-
import { workflowBuilder, injectstateBuilder, Specification } from '@severlessworkflow/sdk-typescript';
58+
import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript';
5059

5160
const workflow: Specification.Workflow = workflowBuilder()
5261
.id("helloworld")
@@ -69,7 +78,7 @@ const workflow: Specification.Workflow = workflowBuilder()
6978
#### Create Workflow from JSON/YAML source
7079

7180
```typescript
72-
import { Specification, Workflow } from '@severlessworkflow/sdk-typescript';
81+
import { Specification, Workflow } from '@serverlessworkflow/sdk-typescript';
7382

7483
const source = `id: helloworld
7584
version: '1.0'
@@ -93,7 +102,7 @@ Where `source` can be in both JSON or YAML format.
93102
Having the following workflow instance:
94103

95104
```typescript
96-
import { workflowBuilder, injectstateBuilder, Specification } from '@severlessworkflow/sdk-typescript';
105+
import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript';
97106

98107
const workflow: Specification.Workflow = workflowBuilder()
99108
.id("helloworld")
@@ -147,7 +156,7 @@ The sdk provides a way to validate if a workflow object is compliant with the se
147156
- `validate(): boolean`
148157

149158
```typescript
150-
import {WorkflowValidator, Specification} from '@severlessworkflow/sdk-typescript';
159+
import {WorkflowValidator, Specification} from '@serverlessworkflow/sdk-typescript';
151160
import {Workflow} from "./workflow";
152161

153162
const workflow = {
@@ -179,7 +188,7 @@ You can also validate parts of a workflow using `validators`:
179188

180189
```typescript
181190
import { ValidateFunction } from 'ajv';
182-
import { validators, Specification } from '@severlessworkflow/sdk-typescript';
191+
import { validators, Specification } from '@serverlessworkflow/sdk-typescript';
183192

184193
const injectionState: Specification.Injectstate = workflow.states[0];
185194
const injectionStateValidator: ValidateFunction<Specification.Injectstate> = validators.get('Injectstate');

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@severlessworkflow/sdk-typescript",
2+
"name": "@serverlessworkflow/sdk-typescript",
33
"version": "4.0.0",
44
"schemaVersion": "0.8",
55
"description": "Typescript SDK for Serverless Workflow Specification",

0 commit comments

Comments
 (0)