Skip to content

Commit d76b969

Browse files
committed
change readme
add some check
1 parent 1b17eef commit d76b969

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You must have this plugin installed and correctly specified statemachine definit
5252
Example of statemachine definition you can see [here](https://github.com/horike37/serverless-step-functions#setup).
5353

5454
# Usage
55-
After all steps are done, need to add to section **custom** in serverless.yml the key **stepFunctionsOffline** with properties *stateName*: path to lambda function.
55+
After all steps are done, need to add to section **custom** in serverless.yml the key **stepFunctionsOffline** with properties *stateName*: name of lambda function.
5656

5757
For example:
5858

@@ -66,10 +66,10 @@ plugins:
6666

6767
custom:
6868
stepFunctionsOffline:
69-
StepOne: firstLambda
69+
stepOne: firstLambda (v2.0)
7070
# ...
7171
# ...
72-
stepTwo: secondLambda
72+
stepTwo: secondLambda (v2.0)
7373

7474
functions:
7575
firstLambda:
@@ -132,9 +132,6 @@ By default `process.env.STEP_IS_OFFLINE = true`.
132132
- [ ] Add unit tests - to make plugin stable (next step) - [ ] Support fields *Retry*, *Catch*
133133
- [ ] Support other languages except node.js
134134

135-
136-
If you have any questions, feel free to contact me: vkkis1993@gmail.com
137-
138135
# License
139136

140137
MIT

build.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ module.exports = {
8888
process.env = Object.assign({}, this.environmentVariables);
8989
let f = this.variables[currentStateName];
9090
f = this.functions[f];
91+
if (!f) {
92+
this.cliLog(`Function "${currentStateName}" does not presented in serverless.yml`);
93+
process.exit(1);
94+
}
9195
const {handler, filePath} = this._findFunctionPathAndHandler(f.handler);
9296
// if function has additional variables - attach it to function
9397
if (f.environment) {

0 commit comments

Comments
 (0)