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.
* fix: load spec * fix: process.cwd Co-authored-by: Harry Chen <czy88840616@gmail.com>
- Loading branch information
1 parent
f188125
commit 66df38c
Showing
9 changed files
with
75 additions
and
7 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
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
13 changes: 13 additions & 0 deletions
13
packages/faas-cli-plugin-package/test/fixtures/plugins/faas_tmp_out.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {BasePlugin} from '@midwayjs/fcli-command-core'; | ||
import { resolve } from 'path'; | ||
import { copy } from 'fs-extra'; | ||
export class FaaSTmpOutPlugin extends BasePlugin { | ||
hooks = { | ||
'after:package:cleanup': async () => { | ||
const tmpDir = this.getStore('defaultTmpFaaSOut', 'PackagePlugin'); | ||
console.log('tmpDIr', tmpDir); | ||
await copy(resolve(__dirname, 'test.ts'), resolve(tmpDir, 'src/test.ts')); | ||
await copy(resolve(__dirname, 'test.js'), resolve(tmpDir, 'test.js')); | ||
} | ||
} | ||
} |
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 @@ | ||
console.log('test.js'); |
10 changes: 10 additions & 0 deletions
10
packages/faas-cli-plugin-package/test/fixtures/plugins/test.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Func, Provide } from '@midwayjs/decorator'; | ||
|
||
@Provide() | ||
export class Test { | ||
|
||
@Func('test.hand') | ||
async handler() { | ||
return 'hello world'; | ||
} | ||
} |
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