0.1.2 • Published 5 years ago

test-oda-rest-client v0.1.2

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

Custom Component Package

This project is in format of a Component Package. Component Packages are the recommended way to organize Bots Custom Components code and allow the custom component code to be more portable to different runtime environments.

Generated by @oracle/bots-node-sdk on Wed Oct 02 2019

Structure

.
├── .npmignore
├── components
│   └── ...
├── main.js
├── package.json
└── spec
    └── ...
Description
.npmignoreIgnore files when packaging as npm module
componentsDirectory (default) where Component implementations are added
main.jsEntrypoint for the Custom Component Package configuration
specPlaceholder for unit test implementations

The Component Package behaves like any other npm project. Directly install any dependencies or tools required to implement the customizations.

Development

With @oracle/bots-node-sdk as a devDependency in a Component Package gives the project some valuable command line functionality.

TIP: Use npm run bots-node-sdk for additional CLI help and usage information.

This component package is ready to run as a local development service. Once the service starts you may use a local tunnel, such as ngrok, and configure an External Service to connect the components to your Skill.

npm start
# or run with additional options
npm run bots-node-sdk -- service .
# or run with debugger
node --inspect $(npm bin)/bots-node-sdk service .

With custom component services running, test endpoints like so:

# get component metadata
curl -X GET localhost:3000/components

# invoke custom component
curl -H "Content-Type: application/json" -d @./spec/test.req.json localhost:3000/components/RestClient

Deployment

As this package is designed to be installed and run with a corresponding service wrapper, run npm pack and upload the resulting .tgz as a package for the Embedded Container service.

npm pack
# or validate and package with the @oracle/bots-node-sdk command line
npm run bots-node-sdk -- pack .

TIP: use npm run bots-node-sdk -- pack --help for additional packaging options.

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago