Skip to content

Commit

Permalink
Merge pull request #485 from danielpeintner/v0.8.x-merge-in-master-20…
Browse files Browse the repository at this point in the history
…21-09-01

V0.8.x merge in master 2021 09 01
  • Loading branch information
danielpeintner authored Sep 1, 2021
2 parents 2ed6acf + d484ea1 commit 7defa74
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ Please also see the additional [notices](NOTICE.md) and [how to contribute](CONT
* [CoAP](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-coap/README.md) :heavy_check_mark:
* [CoAPS](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-coap/README.md) :heavy_check_mark:
* [MQTT](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-mqtt/README.md) :heavy_check_mark:
* [Firestore](https://github.com/eclipse/thingweb.node-wot/tree/master/packages/binding-wotfirestore/README.md) :heavy_check_mark:
* [Websocket](https://github.com/eclipse/thingweb.node-wot/tree/master/packages/binding-websockets) :heavy_plus_sign: (Server only)
* [OPC-UA](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-opcua/README.md) :heavy_plus_sign: (Client only)
* [NETCONF](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-netconf/README.md) :heavy_plus_sign: (Client only)
* [Modbus](https://github.com/eclipse/thingweb.node-wot/tree/master/packages/binding-modbus) :heavy_plus_sign: (Client only)
* [M-Bus](https://github.com/eclipse/thingweb.node-wot/tree/master/packages/binding-mbus) :heavy_plus_sign: (Client only)

Note: More protocols can be easily added by implementing `ProtocolClient`, `ProtocolClientFactory`, and `ProtocolServer` interface.

Expand Down Expand Up @@ -89,7 +91,7 @@ cs.addCodec(new MyCodec("application/myType"));
## Prerequisites
### To use with Node.js
All systems require:
* [NodeJS](https://nodejs.org/) version 10+ (e.g., 10.13.0 LTS)
* [NodeJS](https://nodejs.org/) version 14+

#### Linux
Meet the [node-gyp](https://github.com/nodejs/node-gyp#installation) requirements:
Expand Down
15 changes: 8 additions & 7 deletions packages/binding-wotfirestore-browser-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@

Bundle to run Firestore Binding as browser-side library.

## Supported bindings
## Supported bindings

HTTP / HTTPS / WebSockets

## Embedding Firestore Binding library in HTML
## Embedding Firestore Binding library in HTML

Include the following script tag in your html

```js
<script src="https://cdn.jsdelivr.net/npm/@hidetak/binding-wotfirestore-browser-bundle@latest/dist/binding-wotfirestore-bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@node-wot/binding-wotfirestore-browser-bundle@latest/dist/binding-wotfirestore-bundle.js"></script>
```

You can access all binding-wotfirestore functionality through the "BindingWoTFirestore" global object:

```js
var WoTFirestoreClientFactory = BindingWoTFirestore.WoTFirestoreClientFactory;
var WoTFirestoreCodec = BindingWoTFirestore.WoTFirestoreCodec;
var WoTFirestoreServer = BindingWoTFirestore.WoTFirestoreServer;
var WoTFirestoreClientFactory = BindingWoTFirestore.WoTFirestoreClientFactory
var WoTFirestoreCodec = BindingWoTFirestore.WoTFirestoreCodec
var WoTFirestoreServer = BindingWoTFirestore.WoTFirestoreServer
```

## Using binding-wotfirestore browser bundle library in web frameworks

Install browser-bundle in your project by running

* `npm install @hidetak/binding-wotfirestore-browser-bundle`
- `npm install @node-wot/binding-wotfirestore-browser-bundle`
2 changes: 1 addition & 1 deletion packages/binding-wotfirestore-browser-bundle/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const BindingWoTFirestore = require("@hidetak/binding-wotfirestore");
const BindingWoTFirestore = require("@node-wot/binding-wotfirestore");

if (typeof window !== "undefined") {
window.BindingWoTFirestore = BindingWoTFirestore;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/binding-wotfirestore-browser-bundle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hidetak/binding-wotfirestore-browser-bundle",
"version": "0.0.5",
"name": "@node-wot/binding-wotfirestore-browser-bundle",
"version": "0.8.0",
"description": "A binding-wotfirestore bundle that can run in a web browser",
"repository": "https://github.com/hidetak/thingweb.node-wot",
"author": "hidetak",
Expand All @@ -17,7 +17,7 @@
"tinyify": "^2.5.2"
},
"dependencies": {
"@hidetak/binding-wotfirestore": "0.0.5"
"@node-wot/binding-wotfirestore": "0.8.0"
},
"scripts": {
"build": "browserify -r vm:vm2 index.js --external coffee-script -o dist/binding-wotfirestore-bundle.js"
Expand Down
10 changes: 5 additions & 5 deletions packages/binding-wotfirestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To prepare for creating a nodejs app, execute `npm install`.
After executing `npm init`, install the following modules.

- `npm install @node-wot/core`
- `npm install @hidetak/binding-wotfirestore`
- `npm install @node-wot/binding-wotfirestore`

### Creating configuration file

Expand Down Expand Up @@ -92,10 +92,10 @@ The ThingDescription registered by `example-server.js`.
// example-client.js
const Servient = require('@node-wot/core').Servient
const WoTFirestoreClientFactory =
require('@hidetak/binding-wotfirestore').WoTFirestoreClientFactory
require('@node-wot/binding-wotfirestore').WoTFirestoreClientFactory
const Helpers = require('@node-wot/core').Helpers
const WoTFirestoreCodec =
require('@hidetak/binding-wotfirestore').WoTFirestoreCodec
require('@node-wot/binding-wotfirestore').WoTFirestoreCodec

const firestoreConfig = require('./firestore-config.json')

Expand Down Expand Up @@ -138,9 +138,9 @@ The server example produces a thing that allows for setting a property `count`.
// example-server.js
const Servient = require('@node-wot/core').Servient
const WoTFirestoreServer =
require('@hidetak/binding-wotfirestore').WoTFirestoreServer
require('@node-wot/binding-wotfirestore').WoTFirestoreServer
const WoTFirestoreCodec =
require('@hidetak/binding-wotfirestore').WoTFirestoreCodec
require('@node-wot/binding-wotfirestore').WoTFirestoreCodec

const firestoreConfig = require('./firestore-config.json')

Expand Down
4 changes: 2 additions & 2 deletions packages/binding-wotfirestore/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/binding-wotfirestore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hidetak/binding-wotfirestore",
"version": "0.0.5",
"name": "@node-wot/binding-wotfirestore",
"version": "0.8.0",
"description": "Firestore binding for node-wot",
"repository": "https://github.com/hidetak/thingweb.node-wot",
"main": "dist/wotfirestore.js",
Expand Down

0 comments on commit 7defa74

Please sign in to comment.