Commit Graph

12 Commits

Author SHA1 Message Date
Manoel Marques f2238be7ed
Correctly format Node.js code (#1602) 2023-03-08 12:17:20 +00:00
Lance Ball 06693859be
enhancement(templates): use latest faas-js-runtime + cloudevents (#1422)
* enhancement(templates): use latest faas-js-runtime + cloudevents

Better typing of handle functions and return values for typescript based functions.

/kind enhancement

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

* fixup: improvements

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

* fixup: missing FUNC_LOG_LEVEL

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-10 12:59:15 +00:00
Lance Ball 5adec03c7b
chore: update all references to kn-plugin-func (#1311)
* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

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

* fixup: fix instances_test.go

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

* fixup: still some stray kn-plugin-func

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 16:31:53 +00:00
Jefferson Ramos f72b23fe76
doc: fix doc reference on nodejs template (#1154) 2022-08-04 14:35:21 +00:00
Matej Vasek 041bb9fd66
Make JS/TS Function templates async by default (#1020)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-27 16:03:09 +02:00
Lance Ball 166313b541
improve template comments for Node.js and TypeScript (#902)
* improve template comments for Node.js and TypeScript

See: https://github.com/knative-sandbox/kn-plugin-func/issues/572

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

* fixup: add zz_ file

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-15 15:36:59 -07:00
Helio Frota efc3b208cb
fix: minor typos in docs (#862) 2022-02-23 07:25:39 -08:00
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
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
Helio Frota ea0a75a7cc
fix: minor typos in node template docs (#351) 2021-05-18 08:48:34 -04:00
Zbynek Roubalik 9488e01a26
chore: fix typo in node http template (#329)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-06 10:27:18 +02: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