Added v2compatibility suffix to node-client

pull/821/merge
Carlos Santos 2024-06-21 11:30:34 +02:00
parent 6698ae2314
commit 30c705e8fc
8 changed files with 48 additions and 40 deletions

View File

@ -5,12 +5,12 @@
[![][OpenViduLogo]](https://openvidu.io) [![][OpenViduLogo]](https://openvidu.io)
openvidu-node-client openvidu-node-client-v2compatibility
=== ===
- **Description**: Library for your NODE server. It is a fully compatible and simple alternative to the REST API exposed by OpenVidu Server. - **Description**: Library for your NODE server. It is a fully compatible and simple alternative to the REST API exposed by OpenVidu Server.
- **Docs**: [openvidu-node-client API](https://docs.openvidu.io/en/stable/reference-docs/openvidu-node-client/) - **Docs**: [openvidu-node-client-v2compatibility API](https://docs.openvidu.io/en/stable/reference-docs/openvidu-node-client-v2compatibility/)
- **Release**: [OpenVidu Artifacts](https://docs.openvidu.io/en/stable/releases/) - **Release**: [OpenVidu Artifacts](https://docs.openvidu.io/en/stable/releases/)

View File

@ -2,7 +2,7 @@
"include": ["../src"], "include": ["../src"],
"exclude": ["../config", "../docs", "../lib", "../node_modules"], "exclude": ["../config", "../docs", "../lib", "../node_modules"],
"typedocOptions": { "typedocOptions": {
"name": "OpenVidu Node Client", "name": "OpenVidu Node Client V2 Compatibility",
"entryPoints": ["../src/index.ts"], "entryPoints": ["../src/index.ts"],
"out": "../docs", "out": "../docs",
"theme": "default", "theme": "default",

View File

@ -7,7 +7,7 @@ module.exports = {
], ],
mode: "file", mode: "file",
module: "commonjs", module: "commonjs",
name: "OpenVidu Node Client", name: "OpenVidu Node Client V2 Compatibility",
target: "es5", target: "es5",
externalPattern: "node_modules", externalPattern: "node_modules",
excludeExternals: true, excludeExternals: true,

View File

@ -15,5 +15,5 @@ grep -rl '/en/stable/' src | xargs sed -i -e 's|/en/stable/|/en/'${BASEHREF_VERS
grep -rl '/en/'${BASEHREF_VERSION}'/' src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g' grep -rl '/en/'${BASEHREF_VERSION}'/' src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g'
# Clean previous docs from openvidu.io-docs repo and copy new ones # Clean previous docs from openvidu.io-docs repo and copy new ones
rm -rf ../../openvidu.io-docs/docs/api/openvidu-node-client/* rm -rf ../../openvidu.io-docs/docs/api/openvidu-node-client-v2compatibility/*
cp -R ./docs/. ../../openvidu.io-docs/docs/api/openvidu-node-client cp -R ./docs/. ../../openvidu.io-docs/docs/api/openvidu-node-client-v2compatibility

View File

@ -1,12 +1,12 @@
{ {
"name": "openvidu-node-client", "name": "openvidu-node-client-v2compatibility",
"version": "2.30.0", "version": "3.0.0-beta1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "openvidu-node-client", "name": "openvidu-node-client-v2compatibility",
"version": "2.30.0", "version": "3.0.0-beta1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"axios": "1.7.1", "axios": "1.7.1",
@ -21,12 +21,12 @@
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
"version": "7.24.2", "version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
"integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/highlight": "^7.24.2", "@babel/highlight": "^7.24.7",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"
}, },
"engines": { "engines": {
@ -34,21 +34,21 @@
} }
}, },
"node_modules/@babel/helper-validator-identifier": { "node_modules/@babel/helper-validator-identifier": {
"version": "7.24.5", "version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz",
"integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/highlight": { "node_modules/@babel/highlight": {
"version": "7.24.5", "version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz",
"integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.24.5", "@babel/helper-validator-identifier": "^7.24.7",
"chalk": "^2.4.2", "chalk": "^2.4.2",
"js-tokens": "^4.0.0", "js-tokens": "^4.0.0",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"
@ -128,9 +128,9 @@
} }
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.11.3", "version": "8.12.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"dev": true, "dev": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
@ -140,10 +140,13 @@
} }
}, },
"node_modules/acorn-walk": { "node_modules/acorn-walk": {
"version": "8.3.2", "version": "8.3.3",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
"integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
"dev": true, "dev": true,
"dependencies": {
"acorn": "^8.11.0"
},
"engines": { "engines": {
"node": ">=0.4.0" "node": ">=0.4.0"
} }
@ -411,6 +414,7 @@
"version": "7.2.3", "version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
@ -471,6 +475,7 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"once": "^1.3.0", "once": "^1.3.0",
@ -484,12 +489,15 @@
"dev": true "dev": true
}, },
"node_modules/is-core-module": { "node_modules/is-core-module": {
"version": "2.13.1", "version": "2.14.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz",
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"hasown": "^2.0.0" "hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"

View File

@ -4,7 +4,7 @@
"axios": "1.7.1", "axios": "1.7.1",
"buffer": "6.0.3" "buffer": "6.0.3"
}, },
"description": "OpenVidu Node Client", "description": "OpenVidu Node Client V2 Compatibility",
"devDependencies": { "devDependencies": {
"@types/node": "20.12.12", "@types/node": "20.12.12",
"ts-node": "10.9.2", "ts-node": "10.9.2",
@ -14,7 +14,7 @@
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "lib/index.js", "main": "lib/index.js",
"name": "openvidu-node-client", "name": "openvidu-node-client-v2compatibility",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/OpenVidu/openvidu" "url": "git://github.com/OpenVidu/openvidu"
@ -24,5 +24,5 @@
"docs": "./generate-docs.sh" "docs": "./generate-docs.sh"
}, },
"typings": "lib/index.d.ts", "typings": "lib/index.d.ts",
"version": "2.30.0" "version": "3.0.0-beta1"
} }

View File

@ -216,7 +216,7 @@ export class OpenVidu {
logger.warn( logger.warn(
"No active session found for sessionId '" + "No active session found for sessionId '" +
r.sessionId + r.sessionId +
"'. This instance of OpenVidu Node Client didn't create this session" "'. This instance of OpenVidu Node Client V2 Compatibility didn't create this session"
); );
} }
resolve(r); resolve(r);
@ -263,7 +263,7 @@ export class OpenVidu {
logger.warn( logger.warn(
"No active session found for sessionId '" + "No active session found for sessionId '" +
r.sessionId + r.sessionId +
"'. This instance of OpenVidu Node Client didn't create this session" "'. This instance of OpenVidu Node Client V2 Compatibility didn't create this session"
); );
} }
resolve(r); resolve(r);
@ -450,7 +450,7 @@ export class OpenVidu {
logger.warn( logger.warn(
"No active session found for sessionId '" + "No active session found for sessionId '" +
sessionId + sessionId +
"'. This instance of OpenVidu Node Client didn't create this session" "'. This instance of OpenVidu Node Client V2 Compatibility didn't create this session"
); );
} }
resolve(); resolve();
@ -500,7 +500,7 @@ export class OpenVidu {
logger.warn( logger.warn(
"No active session found for sessionId '" + "No active session found for sessionId '" +
sessionId + sessionId +
"'. This instance of OpenVidu Node Client didn't create this session" "'. This instance of OpenVidu Node Client V2 Compatibility didn't create this session"
); );
} }
resolve(); resolve();
@ -521,7 +521,7 @@ export class OpenVidu {
* After calling this method you can access the updated array of active sessions in {@link activeSessions} * After calling this method you can access the updated array of active sessions in {@link activeSessions}
* *
* @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not. * @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not.
* This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client * This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client V2 Compatibility
*/ */
public fetch(): Promise<boolean> { public fetch(): Promise<boolean> {
return new Promise<boolean>((resolve, reject) => { return new Promise<boolean>((resolve, reject) => {

View File

@ -329,7 +329,7 @@ export class Session {
}); });
} else { } else {
logger.warn( logger.warn(
"The closed connection wasn't fetched in OpenVidu Node Client. No changes in the collection of active connections of the Session" "The closed connection wasn't fetched in OpenVidu Node Client V2 Compatibility. No changes in the collection of active connections of the Session"
); );
} }
this.updateActiveConnectionsArray(); this.updateActiveConnectionsArray();