You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by "Luke-Roy-IBM (via GitHub)" <gi...@apache.org> on 2023/03/08 19:17:03 UTC
[GitHub] [openwhisk-runtime-nodejs] Luke-Roy-IBM opened a new pull request, #233: Add functionality to install modules during init
Luke-Roy-IBM opened a new pull request, #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233
Install modules specified in package.json during initialisation as a alternative to packageing them. Detect if the node_modules directory is missing and installes the node modules.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] Luke-Roy-IBM commented on a diff in pull request #233: Add functionality to install modules during init
Posted by "Luke-Roy-IBM (via GitHub)" <gi...@apache.org>.
Luke-Roy-IBM commented on code in PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#discussion_r1132241000
##########
core/nodejsActionBase/runner.js:
##########
@@ -46,6 +46,17 @@ function initializeActionHandler(message) {
return Promise.reject('Zipped actions must contain either package.json or index.js at the root.');
}
+ // install npm modules during init if source code zip doesn´t containt them
Review Comment:
From my tests so far the current functionality is not impacted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] style95 commented on a diff in pull request #233: Add functionality to install modules during init
Posted by "style95 (via GitHub)" <gi...@apache.org>.
style95 commented on code in PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#discussion_r1132230912
##########
core/nodejsActionBase/runner.js:
##########
@@ -46,6 +46,17 @@ function initializeActionHandler(message) {
return Promise.reject('Zipped actions must contain either package.json or index.js at the root.');
}
+ // install npm modules during init if source code zip doesn´t containt them
Review Comment:
This is nice!
I want to let this in but unsure if there would be no side effect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] style95 commented on a diff in pull request #233: Add functionality to install modules during init
Posted by "style95 (via GitHub)" <gi...@apache.org>.
style95 commented on code in PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#discussion_r1132230912
##########
core/nodejsActionBase/runner.js:
##########
@@ -46,6 +46,17 @@ function initializeActionHandler(message) {
return Promise.reject('Zipped actions must contain either package.json or index.js at the root.');
}
+ // install npm modules during init if source code zip doesn´t containt them
Review Comment:
This is nice!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] Luke-Roy-IBM commented on pull request #233: Add functionality to install modules during init
Posted by "Luke-Roy-IBM (via GitHub)" <gi...@apache.org>.
Luke-Roy-IBM commented on PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#issuecomment-1463742009
Simple example that shows how the new functionality works
`index.js`
```javascript
function main(args) {
const oneLinerJoke = require('./one-liner-joke');
let getRandomJoke = oneLinerJoke.getRandomJoke();
return {
body: getRandomJoke.body
}
}
module.exports.main = main;
```
`package.json`
```json
{
"name": "my-action",
"main": "index.js",
"dependencies" : {
"one-liner-joke" : "1.2.2"
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] style95 commented on a diff in pull request #233: Add functionality to install modules during init
Posted by "style95 (via GitHub)" <gi...@apache.org>.
style95 commented on code in PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#discussion_r1132245392
##########
core/nodejsActionBase/runner.js:
##########
@@ -46,6 +46,17 @@ function initializeActionHandler(message) {
return Promise.reject('Zipped actions must contain either package.json or index.js at the root.');
}
+ // install npm modules during init if source code zip doesn´t containt them
Review Comment:
No edge case comes up in my mind too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk-runtime-nodejs] Luke-Roy-IBM merged pull request #233: Add functionality to install modules during init
Posted by "Luke-Roy-IBM (via GitHub)" <gi...@apache.org>.
Luke-Roy-IBM merged PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org