-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pure-JS actions are not wrapped #334
Comments
@rofe you've been experiencing this. |
@tripodsan did the merge of #325 fix this? |
no. not yet. if you write a pure-js action, it will be turned into a pure openwhisk action. |
with this fixed, pure action can be written with a simple src/xml.js module.exports.main = async function main() {
return {
body: `<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Peach</to>
<from>Mario</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>`,
};
}; |
Not sure yet if this is a main function in test_xml.js:
payload dump:
Looks like at some point |
The |
Step 6 is |
@rofe try changing two things:
|
the pure-js action, should act like a pipeline function, so @rofe's example above should work, IMO. |
Thanks @tripodsan it works now. One just needs to be careful to add a |
Is your feature request related to a problem? Please describe.
as discussed in #328, pure-js actions (eg:
html.js
orhtml_dump.js
are currently not transformed/wrapped by parcel, and end up as-is in the openwhisk action. this means the developer needs to write (and understand) the openwhisk web action invocation semantics.Describe the solution you'd like
Ideally, such pure-js actions are automatically wrapped with parcel so that the developer can write them the same way as the
...pre.js
actions.Describe alternatives you've considered
the only alternative is to write a
pre.js
and have an empty.htl
The text was updated successfully, but these errors were encountered: