Comparing version 0.1.0-alpha.9 to 0.1.0-alpha.10
{ | ||
"name": "metacom", | ||
"version": "0.1.0-alpha.9", | ||
"version": "0.1.0-alpha.10", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -41,10 +41,10 @@ "description": "Communication protocol for Metarhia stack with rpc, events, binary streams, memory and db access", | ||
"engines": { | ||
"node": ">=12.9.0" | ||
"node": "^12.9 || 14 || 15" | ||
}, | ||
"dependencies": { | ||
"@metarhia/common": "^2.2.0", | ||
"ws": "^7.3.1" | ||
"ws": "^7.4.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.12.1", | ||
"eslint": "^7.14.0", | ||
"eslint-config-metarhia": "^7.0.1", | ||
@@ -55,4 +55,4 @@ "eslint-config-prettier": "^6.15.0", | ||
"metatests": "^0.7.2", | ||
"prettier": "^2.1.2" | ||
"prettier": "^2.2.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# Metacom Communication Protocol for Metarhia stack | ||
# Metacom Communication Protocol for Metarhia | ||
@@ -8,1 +8,25 @@ [![CI Status](https://github.com/metarhia/metacom/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/metacom/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster) | ||
[![NPM Downloads](https://img.shields.io/npm/dt/metacom.svg)](https://www.npmjs.com/package/metacom) | ||
Metacom protocol specification: | ||
https://github.com/metarhia/Contracts/blob/master/doc/Metacom.md | ||
```js | ||
// Load at frontend | ||
import { Metacom } from './metacom.js'; | ||
// Load at backend | ||
const { Metacom } = require('metacom'); | ||
// Open connection (both platforms) and make calls | ||
const metacom = new Metacom('https://domainname.com:8000'); | ||
(async () => { | ||
try { | ||
await metacom.load('auth'); // Load `auth` interface | ||
await api.auth.status(); // Check session status | ||
} catch (err) { | ||
await api.auth.signIn({ login: 'marcus', password: 'marcus' }); | ||
} | ||
await metacom.load('example'); // Load `example` interface | ||
const result = api.example.methodName({ arg1, arg2 }); | ||
})(); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21923
11
32
Updatedws@^7.4.0