Commit Graph

6 Commits

Author SHA1 Message Date
Lance Ball fb7504a900
src: improve usability of Node.js and TypeScript templates (#608)
* src: improve usability of Node.js and TypeScript templates

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/596
Related: https://github.com/knative-sandbox/kn-plugin-func/issues/572

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: whitespace again

Signed-off-by: Lance Ball <lball@redhat.com>
2021-10-27 04:39:01 -07:00
Lance Ball d3eafe2a84
feat: add typescript templates (#355)
* feat: add typescript templates

Bumps the faas-js-runtime dependency to 0.7.1 and Node.js buildpack dependency to v0.8.1

fix file globbing on windows

adjust eslint/prettier for windows

improve READMEs

add usage guide

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-26 11:23:42 -04:00
Jim Crossley caf0659900
src(templates)!: modify the nodejs event template to accept a cloudevent (#356)
* Simplify the nodejs events template

Pretty-printing the contents of the event and its envelope for each
request. This is handy when invoked as a Knative event sink as some
sources, e.g. Kafka, ignore the response body.

Co-authored-by: Lance Ball <lball@redhat.com>

* Expect the event parameter to be the entire CloudEvent

This will require a change to the faas-js-runtime, but at least the
template won't need to change when that's released

* Update nodejs guide to reflect 2nd arg's type is CloudEvent

* Templates now using faas-js-runtime 0.7.1

Co-authored-by: Lance Ball <lball@redhat.com>
2021-05-25 13:49:48 -04:00
Lance Ball 5da927808e
chore: update Node.js faas-js-runtime dependency to 0.6.0 (#302)
* chore: update Node.js faas-js-runtime dependency to 0.6.0
* fixup: remove erroneous console.error statement

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-14 13:27:35 -04:00
Lance Ball 6d301257f5
chore(templates): bump faas-js-runtime to 0.3.0 and update the name (#150)
* chore(templates): bump faas-js-runtime to 0.3.0 and update the name

The module name lost its @redhat prefix, and bumped a version. This
pulls in that latest dependency.

Running pkger for the first time on a new system also resulted in a
minor version bump for that dependency.


Signed-off-by: Lance Ball <lball@redhat.com>
2020-10-07 17:48:30 -04:00
Lance Ball 5d6e2d3c8c
init: add Node.js HTTP template
Note that this template currently points to boson-project/faas-js-runtime
for it's framework dependency as it depends on currently unreleased features.
Once 0.3.0 of that project is released, this template should be updated.
This dependency is only needed for local testing and development.
2020-07-09 15:14:32 -04:00