Skip to content

Commit c39cb60

Browse files
committed
update hook name
1 parent cae3f1e commit c39cb60

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ class ServerlessStepFunctions {
8383
this.hooks = {
8484
'invoke:stepf:invoke': () => BbPromise.bind(this)
8585
.then(this.invoke),
86-
'deploy:initialize': () => BbPromise.bind(this)
86+
'package:initialize': () => BbPromise.bind(this)
8787
.then(this.yamlParse),
88-
'deploy:compileFunctions': () => BbPromise.bind(this)
88+
'package:compileFunctions': () => BbPromise.bind(this)
8989
.then(this.compileIamRole)
9090
.then(this.compileStateMachines)
9191
.then(this.compileActivities),
92-
'deploy:compileEvents': () => {
92+
'package:compileEvents': () => {
9393
this.pluginhttpValidated = this.httpValidate();
9494

9595
if (this.pluginhttpValidated.events.length === 0) {

lib/index.test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,24 @@ describe('#index', () => {
5757
});
5858
});
5959

60-
it('should run deploy:initialize promise chain in order', () => {
60+
it('should run package:initialize promise chain in order', () => {
6161
const yamlParseStub = sinon
6262
.stub(serverlessStepFunctions, 'yamlParse').returns(BbPromise.resolve());
63-
return serverlessStepFunctions.hooks['deploy:initialize']()
63+
return serverlessStepFunctions.hooks['package:initialize']()
6464
.then(() => {
6565
expect(yamlParseStub.calledOnce).to.be.equal(true);
6666
serverlessStepFunctions.yamlParse.restore();
6767
});
6868
});
6969

70-
it('should run deploy:compileFunctions promise chain in order', () => {
70+
it('should run package:compileFunctions promise chain in order', () => {
7171
const compileIamRoleStub = sinon
7272
.stub(serverlessStepFunctions, 'compileIamRole').returns(BbPromise.resolve());
7373
const compileStateMachinesStub = sinon
7474
.stub(serverlessStepFunctions, 'compileStateMachines').returns(BbPromise.resolve());
7575
const compileActivitiesStub = sinon
7676
.stub(serverlessStepFunctions, 'compileActivities').returns(BbPromise.resolve());
77-
return serverlessStepFunctions.hooks['deploy:compileFunctions']()
77+
return serverlessStepFunctions.hooks['package:compileFunctions']()
7878
.then(() => {
7979
expect(compileIamRoleStub.calledOnce).to.be.equal(true);
8080
expect(compileStateMachinesStub.calledAfter(compileIamRoleStub)).to.be.equal(true);
@@ -85,7 +85,7 @@ describe('#index', () => {
8585
});
8686
});
8787

88-
it('should run deploy:compileEvents promise chain in order when http event is empty',
88+
it('should run package:compileEvents promise chain in order when http event is empty',
8989
() => {
9090
const httpValidateStub = sinon
9191
.stub(serverlessStepFunctions, 'httpValidate').returns({ events: [] });
@@ -99,7 +99,7 @@ describe('#index', () => {
9999
.stub(serverlessStepFunctions, 'compileHttpIamRole').returns(BbPromise.resolve());
100100
const compileDeploymentStub = sinon
101101
.stub(serverlessStepFunctions, 'compileDeployment').returns(BbPromise.resolve());
102-
return serverlessStepFunctions.hooks['deploy:compileEvents']()
102+
return serverlessStepFunctions.hooks['package:compileEvents']()
103103
.then(() => {
104104
expect(httpValidateStub.calledOnce).to.be.equal(true);
105105
expect(compileRestApiStub.notCalled).to.be.equal(true);
@@ -116,7 +116,7 @@ describe('#index', () => {
116116
});
117117
});
118118

119-
it('should run deploy:compileEvents promise chain in order',
119+
it('should run package:compileEvents promise chain in order',
120120
() => {
121121
const httpValidateStub = sinon
122122
.stub(serverlessStepFunctions, 'httpValidate').returns({ events: [1, 2, 3] });
@@ -130,7 +130,7 @@ describe('#index', () => {
130130
.stub(serverlessStepFunctions, 'compileHttpIamRole').returns(BbPromise.resolve());
131131
const compileDeploymentStub = sinon
132132
.stub(serverlessStepFunctions, 'compileDeployment').returns(BbPromise.resolve());
133-
return serverlessStepFunctions.hooks['deploy:compileEvents']()
133+
return serverlessStepFunctions.hooks['package:compileEvents']()
134134
.then(() => {
135135
expect(httpValidateStub.calledOnce).to.be.equal(true);
136136
expect(compileRestApiStub.calledOnce).to.be.equal(true);

0 commit comments

Comments
 (0)