tdl-tdlib-wasm
Advanced tools
Comparing version
@@ -28,8 +28,12 @@ "use strict"; | ||
td_execute: module.cwrap('td_execute', 'string', ['number', 'string']), | ||
td_receive: module.cwrap('td_receive', 'string', ['number']), | ||
td_set_verbosity: module.cwrap('td_set_verbosity', null, ['number']) | ||
td_receive: module.cwrap('td_receive', 'string', ['number']) // td_set_verbosity: module.cwrap('td_set_verbosity', null, ['number']) | ||
}; | ||
} | ||
async create() { | ||
getName() { | ||
return 'wasm'; | ||
} | ||
create() { | ||
debug('create'); | ||
@@ -50,3 +54,4 @@ return ( | ||
if (!response) { | ||
await delay(100); | ||
await delay(100); // TODO | ||
return null; | ||
@@ -71,18 +76,4 @@ } | ||
setLogFilePath() { | ||
throw new Error('setLogFilePath doesn\'t supported'); | ||
} | ||
setLogMaxFileSize() { | ||
throw new Error('setLogMaxFileSize doesn\'t supported'); | ||
} | ||
setLogVerbosityLevel(verbosity) { | ||
debug('setLogVerbosityLevel', verbosity); | ||
this._tdlib.td_set_verbosity(verbosity); | ||
} | ||
setLogFatalErrorCallback() { | ||
throw new Error('setLogFatalErrorCallback doesn\'t supported'); | ||
throw new Error('setLogFatalErrorCallback is not supported'); | ||
} | ||
@@ -89,0 +80,0 @@ |
@@ -0,6 +1,8 @@ | ||
// AUTOGENERATED | ||
import { TDLibClient, ITDLibJSON } from 'tdl-shared' | ||
export class TDLib implements ITDLibJSON { | ||
constructor(path?: string) | ||
create(): Promise<TDLibClient> | ||
constructor(module: any) | ||
getName(): string | ||
create(): TDLibClient | ||
destroy(client: TDLibClient): void | ||
@@ -10,6 +12,3 @@ execute(client: null | TDLibClient, query: Object): Object | null | ||
send(client: TDLibClient, query: Object): void | ||
setLogFilePath(path: string): number | ||
setLogMaxFileSize(maxFileSize: number | string): void | ||
setLogVerbosityLevel(verbosity: number): void | ||
setLogFatalErrorCallback(fn: null | ((errorMessage: string) => void)): void | ||
} |
{ | ||
"name": "tdl-tdlib-wasm", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "WebAssembly bindings for TDLib.", | ||
@@ -11,7 +11,7 @@ "main": "index.js", | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"tdl-shared": "^0.9.0" | ||
"debug": "^4.3.1", | ||
"tdl-shared": "^0.10.0" | ||
}, | ||
"peerDependencies": { | ||
"tdl": ">= 6.0.0" | ||
"tdl": ">= 7.0.0" | ||
}, | ||
@@ -18,0 +18,0 @@ "files": [ |
[](https://www.npmjs.com/package/tdl-tdlib-wasm) | ||
Experimental wrapper. Tested with TDLib v1.3.0. | ||
An experimental wrapper. Tested with TDLib v1.3.0. | ||
@@ -35,5 +35,5 @@ ## Installation | ||
}) | ||
console.log(client) | ||
await client.connectAndLogin(() => ({ | ||
@@ -53,3 +53,3 @@ getPhoneNumber: retry => Promise.resolve(window.prompt(retry | ||
})) | ||
const result = await client.invoke({ | ||
@@ -56,0 +56,0 @@ _: 'getChats', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
-100%6589
-7.17%69
-11.54%+ Added
- Removed
- Removed
Updated
Updated