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.
feat: command-core support user lifecycle config (#167)
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 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
12 changes: 12 additions & 0 deletions
12
packages/faas-cli-command-core/test/fixtures/userLifecycle/index.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,12 @@ | ||
const { unlinkSync, existsSync, writeFileSync } = require('fs'); | ||
const { join } = require('path'); | ||
;(async () => { | ||
await new Promise(resolve => { | ||
setTimeout(resolve, 500); | ||
}); | ||
const file = join(__dirname, 'test.txt'); | ||
if (existsSync(file)) { | ||
unlinkSync(file); | ||
} | ||
writeFileSync(file, process.env.TEST_MIDWAY_CLI_CORE_TMPDATA || ''); | ||
})(); |
7 changes: 7 additions & 0 deletions
7
packages/faas-cli-command-core/test/fixtures/userLifecycle/package.json
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,7 @@ | ||
{ | ||
"midway-integration": { | ||
"lifecycle": { | ||
"before:invoke:one": "node ./index.js" | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
1589535981255 |