This repository has been archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
115 additions
and
52 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/faas-cli-command-core/test/fixtures/userLifecycle/test.txt
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 +1 @@ | ||
1589535981255 | ||
1592281077048 |
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
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
47 changes: 46 additions & 1 deletion
47
packages/faas-cli-plugin-package/test/fixtures/aggregation/src/index.ts
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,13 +1,58 @@ | ||
import { FaaSContext, func, inject, provide } from '@midwayjs/faas'; | ||
|
||
@provide() | ||
@func('index.handler') | ||
export class HelloService { | ||
|
||
@inject() | ||
ctx: FaaSContext; // context | ||
|
||
@func('index.handler') | ||
async handler(event, obj = {}) { | ||
return 'hello world'; | ||
} | ||
|
||
@func('apiall.handler') | ||
async apiall(event, obj = {}) { | ||
return 'apiall:' + this.ctx.path; | ||
} | ||
|
||
@func('api1.handler') | ||
async api1(event, obj = {}) { | ||
return 'api1:' + this.ctx.path;; | ||
} | ||
|
||
@func('api2.handler') | ||
async api2(event, obj = {}) { | ||
return 'api2:' + this.ctx.path;; | ||
} | ||
|
||
@func('api3.handler') | ||
async api3(event, obj = {}) { | ||
return 'api3:' + this.ctx.path;; | ||
} | ||
|
||
@func('render.handler') | ||
async render(event, obj = {}) { | ||
return 'render:' + this.ctx.path;; | ||
} | ||
|
||
@func('render1.handler') | ||
async render1(event, obj = {}) { | ||
return 'render1:' + this.ctx.path;; | ||
} | ||
|
||
@func('render2.handler') | ||
async render2(event, obj = {}) { | ||
return 'render2:' + this.ctx.path;; | ||
} | ||
|
||
@func('normal1.handler') | ||
async normal1(event, obj = {}) { | ||
return 'normal1:' + this.ctx.path;; | ||
} | ||
|
||
@func('normal2.handler') | ||
async normal2(event, obj = {}) { | ||
return 'normal2:' + this.ctx.path;; | ||
} | ||
} |
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
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