Open goldwareJapan opened 2 years ago
npm install -g @aws-amplify/cli
v12.22.1
6.3.1
Mac
function
add, update
created post-update-function.js and post-add-function.js
post-update-function.js
post-add-function.js
const fs = require('fs'); const parameters = JSON.parse(fs.readFileSync(0, { encoding: 'utf8' })); // Get the running Amplify CLI major version number const currentCLIMajorVersion = parameters.data.amplify.version.split('.')[0]; console.log( 'π ~ file: post-add-function.js ~ line 7 ~ parameters.data', parameters.data, );
Then added function. also updated function. (function name is aTest)
aTest
Hooks called. but data does not contain what options I chose on questions. I can't know what is the function name
output:
----- πͺ post-update-function execution start ----- π ~ file: post-update-function.js ~ line 7 ~ parameters.data { "data": { "amplify": { "environment": { "projectPath": "/*****/", "defaultEditor": "vscode", "envName": "staging" }, "command": "update", "subCommand": "function", "argv": [ "/Users/*****/.nvm/versions/node/v12.22.1/bin/node", "/Users/*****/.nvm/versions/node/v12.22.1/bin/amplify", "function", "update" ], "version": "6.3.1" } } } Amplify CLI major version: 6 Minimum required Amplify CLI major version: 5 Minimum CLI version requirement met. ----- πͺ post-update-function execution end -----
options i selected or inputted on cli questions to be includedI
No response
It would be very helpful to have access to the name of the function that was added in the pre/post-add-function hooks. This would allow you to take action on that specific function's content.
Before opening, please confirm:
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v12.22.1
Amplify CLI Version
6.3.1
What operating system are you using?
Mac
Amplify Categories
function
Amplify Commands
add, update
Describe the bug
created
post-update-function.js
andpost-add-function.js
Then added function. also updated function. (function name is
aTest
)Hooks called. but data does not contain what options I chose on questions. I can't know what is the function name
output:
Expected behavior
options i selected or inputted on cli questions to be includedI
Reproduction steps
created
post-update-function.js
andpost-add-function.js
Then added function. also updated function. (function name is
aTest
)Hooks called. but data does not contain what options I chose on questions. I can't know what is the function name
output:
GraphQL schema(s)
No response
Log output
Additional information
No response