Updates
parent
bbb229b921
commit
c0d91db238
|
@ -1,27 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1251">
|
||||
<script type="text/javascript" src="https://adsterra.com/libs/header_index/jquery-2.2.4.min.js"></script>
|
||||
<script type="text/javascript" src="https://adsterra.com/libs/header_index/pixi.min.js"></script>
|
||||
<script type="text/javascript" src="https://adsterra.com/libs/header_index/animationFrame.js?ver=201703051115"></script>
|
||||
<script type="text/javascript" src="https://adsterra.com/libs/header_index/nodes.js?ver=201703051115"></script>
|
||||
</head>
|
||||
<style>body {
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
}</style>
|
||||
<body>
|
||||
<header>
|
||||
<script>
|
||||
Nodes.multipleInit([{
|
||||
"post_name": "ADSTERRA",
|
||||
"drawnImage": "TeaSpeak32b.png", //https://orig00.deviantart.net/45aa/f/2015/323/9/9/letter_a_by_hillygon-d9h8c6a.jpg | TeaSpeak32b.png
|
||||
"linkTitle": "ADSTERRA",
|
||||
"particleDensity": "5",
|
||||
"particleWidth": "0.4",
|
||||
"particleHeight": "0.4"
|
||||
}]);
|
||||
</script>
|
||||
</header>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
project(TeaWeb-Native)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "emcc")
|
||||
set(CMAKE_C_COMPILER "emcc")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "emcc")
|
||||
set(CMAKE_CXX_FLAGS "-s ASSERTIONS=2 -s ALLOW_MEMORY_GROWTH=1") #-s WASM=1 -O2
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\", \"Pointer_stringify\"]'") #
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
|
||||
add_definitions(-DLTM_DESC)
|
||||
include_directories(libraries/opus/include/)
|
||||
include_directories(libraries/tommath/)
|
||||
include_directories(libraries/tomcrypt/src/headers)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/generated/")
|
||||
add_executable(TeaWeb-Native.js src/CodecOpus.cpp src/TeamSpeakIdentity.cpp src/Identity.cpp src/INIReader.h)
|
||||
target_link_libraries(TeaWeb-Native.js ${CMAKE_CURRENT_SOURCE_DIR}/libraries/opus/.libs/libopus.a ${CMAKE_CURRENT_SOURCE_DIR}/libraries/tomcrypt/libtomcrypt.a ${CMAKE_CURRENT_SOURCE_DIR}/libraries/tommath/build/libtommathStatic.a)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
OPUS_FN="'_free','_malloc','_opus_strerror','_opus_get_version_string','_opus_encoder_get_size','_opus_encoder_init','_opus_encode','_opus_encode_float','_opus_encoder_ctl','_opus_decoder_get_size','_opus_decoder_init','_opus_decode','_opus_decode_float','_opus_decoder_ctl','_opus_packet_get_nb_samples'"
|
||||
cd libs/opus/
|
||||
|
||||
git checkout v1.1.2
|
||||
./autogen.sh
|
||||
emconfigure ./configure --disable-extra-programs --disable-doc --disable-rtcd
|
||||
emmake make
|
||||
cd ../../
|
||||
emcc -o generated/libopus.js -O3 --memory-init-file 0 --closure 1 -s NO_FILESYSTEM=1 -s MODULARIZE=1 -s EXPORTED_FUNCTIONS="[$OPUS_FN]" libs/opus/.libs/libopus.a
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
#include <opus.h>
|
||||
#include <emscripten.h>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
extern "C" {
|
||||
struct OpusHandle {
|
||||
OpusEncoder* encoder = nullptr;
|
||||
OpusDecoder* decoder = nullptr;
|
||||
|
||||
size_t channelCount = 1;
|
||||
int opusType = OPUS_APPLICATION_AUDIO;
|
||||
};
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
OpusHandle* codec_opus_createNativeHandle(size_t channelCount, int type) {
|
||||
printf("Inizalisize opus. (Channel count: %d Sample rate: %d Type: %d)!\n", channelCount, 48000, type);
|
||||
auto codec = new OpusHandle{};
|
||||
int error = 0;
|
||||
codec->decoder = opus_decoder_create(48000, channelCount, &error);
|
||||
codec->encoder = opus_encoder_create(48000, channelCount, type, &error);
|
||||
codec->opusType = type;
|
||||
return codec;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void codec_opus_deleteNativeHandle(OpusHandle* codec) {
|
||||
if(!codec) return;
|
||||
|
||||
if(codec->decoder) opus_decoder_destroy(codec->decoder);
|
||||
codec->decoder = nullptr;
|
||||
|
||||
if(codec->encoder) opus_encoder_destroy(codec->encoder);
|
||||
codec->encoder = nullptr;
|
||||
|
||||
delete codec;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
int codec_opus_encode(OpusHandle* handle, uint8_t* buffer, size_t length, size_t maxLength) {
|
||||
auto result = opus_encode_float(handle->encoder, (float*) buffer, length / handle->channelCount, buffer, maxLength);
|
||||
if(result < 0) return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
int codec_opus_decode(OpusHandle* handle, uint8_t* buffer, size_t length, size_t maxLength) {
|
||||
auto result = opus_decode_float(handle->decoder, buffer, length, (float*) buffer, maxLength / sizeof(float) / handle->channelCount, false);
|
||||
if(result < 0) return result; //Failed
|
||||
return result;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
int codec_opus_changeApplication(OpusHandle* handle, int type) {
|
||||
handle->opusType = type;
|
||||
if(type != OPUS_APPLICATION_VOIP && type != OPUS_APPLICATION_AUDIO && type != OPUS_APPLICATION_RESTRICTED_LOWDELAY)
|
||||
return 1;
|
||||
return opus_encoder_ctl(handle->encoder, OPUS_SET_APPLICATION(type));
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
int codec_opus_reset(OpusHandle* handle) {
|
||||
if(handle->encoder) opus_encoder_destroy(handle->encoder);
|
||||
if(handle->decoder) opus_decoder_destroy(handle->decoder);
|
||||
|
||||
int error = 0;
|
||||
handle->decoder = opus_decoder_create(48000, handle->channelCount, &error);
|
||||
handle->encoder = opus_encoder_create(48000, handle->channelCount, handle->opusType, &error);
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate));
|
||||
opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity));
|
||||
opus_encoder_ctl(enc, OPUS_SET_SIGNAL(signal_type));
|
||||
*/
|
||||
}
|
|
@ -1,458 +0,0 @@
|
|||
// Read an INI file into easy-to-access name/value pairs.
|
||||
|
||||
// inih and INIReader are released under the New BSD license (see LICENSE.txt).
|
||||
// Go to the project home page for more info:
|
||||
//
|
||||
// https://github.com/benhoyt/inih
|
||||
/* inih -- simple .INI file parser
|
||||
|
||||
inih is released under the New BSD license (see LICENSE.txt). Go to the project
|
||||
home page for more info:
|
||||
|
||||
https://github.com/benhoyt/inih
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INI_H__
|
||||
#define __INI_H__
|
||||
|
||||
/* Make this header file easier to include in C++ code */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Typedef for prototype of handler function. */
|
||||
typedef int (*ini_handler)(void* user, const char* section,
|
||||
const char* name, const char* value);
|
||||
|
||||
/* Typedef for prototype of fgets-style reader function. */
|
||||
typedef char* (*ini_reader)(char* str, int num, void* stream);
|
||||
|
||||
/* Parse given INI-style file. May have [section]s, name=value pairs
|
||||
(whitespace stripped), and comments starting with ';' (semicolon). Section
|
||||
is "" if name=value pair parsed before any section heading. name:value
|
||||
pairs are also supported as a concession to Python's configparser.
|
||||
|
||||
For each name=value pair parsed, call handler function with given user
|
||||
pointer as well as section, name, and value (data only valid for duration
|
||||
of handler call). Handler should return nonzero on success, zero on error.
|
||||
|
||||
Returns 0 on success, line number of first error on parse error (doesn't
|
||||
stop on first error), -1 on file open error, or -2 on memory allocation
|
||||
error (only when INI_USE_STACK is zero).
|
||||
*/
|
||||
int ini_parse(const char* filename, ini_handler handler, void* user);
|
||||
|
||||
/* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't
|
||||
close the file when it's finished -- the caller must do that. */
|
||||
int ini_parse_file(FILE* file, ini_handler handler, void* user);
|
||||
|
||||
inline int ini_parse_message(const std::string& message, ini_handler handler, void* user);
|
||||
|
||||
/* Same as ini_parse(), but takes an ini_reader function pointer instead of
|
||||
filename. Used for implementing custom or string-based I/O. */
|
||||
int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
|
||||
void* user);
|
||||
|
||||
/* Nonzero to allow multi-line value parsing, in the style of Python's
|
||||
configparser. If allowed, ini_parse() will call the handler with the same
|
||||
name for each subsequent line parsed. */
|
||||
#ifndef INI_ALLOW_MULTILINE
|
||||
#define INI_ALLOW_MULTILINE 1
|
||||
#endif
|
||||
|
||||
/* Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of
|
||||
the file. See http://code.google.com/p/inih/issues/detail?id=21 */
|
||||
#ifndef INI_ALLOW_BOM
|
||||
#define INI_ALLOW_BOM 1
|
||||
#endif
|
||||
|
||||
/* Nonzero to allow inline comments (with valid inline comment characters
|
||||
specified by INI_INLINE_COMMENT_PREFIXES). Set to 0 to turn off and match
|
||||
Python 3.2+ configparser behaviour. */
|
||||
#ifndef INI_ALLOW_INLINE_COMMENTS
|
||||
#define INI_ALLOW_INLINE_COMMENTS 1
|
||||
#endif
|
||||
#ifndef INI_INLINE_COMMENT_PREFIXES
|
||||
#define INI_INLINE_COMMENT_PREFIXES ";"
|
||||
#endif
|
||||
|
||||
/* Nonzero to use stack, zero to use heap (malloc/free). */
|
||||
#ifndef INI_USE_STACK
|
||||
#define INI_USE_STACK 1
|
||||
#endif
|
||||
|
||||
/* Stop parsing on first error (default is to keep parsing). */
|
||||
#ifndef INI_STOP_ON_FIRST_ERROR
|
||||
#define INI_STOP_ON_FIRST_ERROR 0
|
||||
#endif
|
||||
|
||||
/* Maximum line length for any line in INI file. */
|
||||
#ifndef INI_MAX_LINE
|
||||
#define INI_MAX_LINE 200
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* inih -- simple .INI file parser
|
||||
|
||||
inih is released under the New BSD license (see LICENSE.txt). Go to the project
|
||||
home page for more info:
|
||||
|
||||
https://github.com/benhoyt/inih
|
||||
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <sstream>
|
||||
|
||||
#if !INI_USE_STACK
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#define MAX_SECTION 50
|
||||
#define MAX_NAME 50
|
||||
|
||||
/* Strip whitespace chars off end of given string, in place. Return s. */
|
||||
inline static char* rstrip(char* s)
|
||||
{
|
||||
char* p = s + strlen(s);
|
||||
while (p > s && isspace((unsigned char)(*--p)))
|
||||
*p = '\0';
|
||||
return s;
|
||||
}
|
||||
|
||||
/* Return pointer to first non-whitespace char in given string. */
|
||||
inline static char* lskip(const char* s)
|
||||
{
|
||||
while (*s && isspace((unsigned char)(*s)))
|
||||
s++;
|
||||
return (char*)s;
|
||||
}
|
||||
|
||||
/* Return pointer to first char (of chars) or inline comment in given string,
|
||||
or pointer to null at end of string if neither found. Inline comment must
|
||||
be prefixed by a whitespace character to register as a comment. */
|
||||
inline static char* find_chars_or_comment(const char* s, const char* chars)
|
||||
{
|
||||
#if INI_ALLOW_INLINE_COMMENTS
|
||||
int was_space = 0;
|
||||
while (*s && (!chars || !strchr(chars, *s)) &&
|
||||
!(was_space && strchr(INI_INLINE_COMMENT_PREFIXES, *s))) {
|
||||
was_space = isspace((unsigned char)(*s));
|
||||
s++;
|
||||
}
|
||||
#else
|
||||
while (*s && (!chars || !strchr(chars, *s))) {
|
||||
s++;
|
||||
}
|
||||
#endif
|
||||
return (char*)s;
|
||||
}
|
||||
|
||||
/* Version of strncpy that ensures dest (size bytes) is null-terminated. */
|
||||
inline static char* strncpy0(char* dest, const char* src, size_t size)
|
||||
{
|
||||
strncpy(dest, src, size);
|
||||
dest[size - 1] = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
||||
/* See documentation in header file. */
|
||||
inline int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
|
||||
void* user)
|
||||
{
|
||||
/* Uses a fair bit of stack (use heap instead if you need to) */
|
||||
#if INI_USE_STACK
|
||||
char line[INI_MAX_LINE];
|
||||
#else
|
||||
char* line;
|
||||
#endif
|
||||
char section[MAX_SECTION] = "";
|
||||
char prev_name[MAX_NAME] = "";
|
||||
|
||||
char* start;
|
||||
char* end;
|
||||
char* name;
|
||||
char* value;
|
||||
int lineno = 0;
|
||||
int error = 0;
|
||||
|
||||
#if !INI_USE_STACK
|
||||
line = (char*)malloc(INI_MAX_LINE);
|
||||
if (!line) {
|
||||
return -2;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Scan through stream line by line */
|
||||
while (reader(line, INI_MAX_LINE, stream) != NULL) {
|
||||
lineno++;
|
||||
|
||||
start = line;
|
||||
#if INI_ALLOW_BOM
|
||||
if (lineno == 1 && (unsigned char)start[0] == 0xEF &&
|
||||
(unsigned char)start[1] == 0xBB &&
|
||||
(unsigned char)start[2] == 0xBF) {
|
||||
start += 3;
|
||||
}
|
||||
#endif
|
||||
start = lskip(rstrip(start));
|
||||
|
||||
if (*start == ';' || *start == '#') {
|
||||
/* Per Python configparser, allow both ; and # comments at the
|
||||
start of a line */
|
||||
}
|
||||
#if INI_ALLOW_MULTILINE
|
||||
else if (*prev_name && *start && start > line) {
|
||||
|
||||
#if INI_ALLOW_INLINE_COMMENTS
|
||||
end = find_chars_or_comment(start, NULL);
|
||||
if (*end)
|
||||
*end = '\0';
|
||||
rstrip(start);
|
||||
#endif
|
||||
|
||||
/* Non-blank line with leading whitespace, treat as continuation
|
||||
of previous name's value (as per Python configparser). */
|
||||
if (!handler(user, section, prev_name, start) && !error)
|
||||
error = lineno;
|
||||
}
|
||||
#endif
|
||||
else if (*start == '[') {
|
||||
/* A "[section]" line */
|
||||
end = find_chars_or_comment(start + 1, "]");
|
||||
if (*end == ']') {
|
||||
*end = '\0';
|
||||
strncpy0(section, start + 1, sizeof(section));
|
||||
*prev_name = '\0';
|
||||
}
|
||||
else if (!error) {
|
||||
/* No ']' found on section line */
|
||||
error = lineno;
|
||||
}
|
||||
}
|
||||
else if (*start) {
|
||||
/* Not a comment, must be a name[=:]value pair */
|
||||
end = find_chars_or_comment(start, "=:");
|
||||
if (*end == '=' || *end == ':') {
|
||||
*end = '\0';
|
||||
name = rstrip(start);
|
||||
value = lskip(end + 1);
|
||||
#if INI_ALLOW_INLINE_COMMENTS
|
||||
end = find_chars_or_comment(value, NULL);
|
||||
if (*end)
|
||||
*end = '\0';
|
||||
#endif
|
||||
rstrip(value);
|
||||
|
||||
/* Valid name[=:]value pair found, call handler */
|
||||
strncpy0(prev_name, name, sizeof(prev_name));
|
||||
if (!handler(user, section, name, value) && !error)
|
||||
error = lineno;
|
||||
}
|
||||
else if (!error) {
|
||||
/* No '=' or ':' found on name[=:]value line */
|
||||
error = lineno;
|
||||
}
|
||||
}
|
||||
|
||||
#if INI_STOP_ON_FIRST_ERROR
|
||||
if (error)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !INI_USE_STACK
|
||||
free(line);
|
||||
#endif
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* See documentation in header file. */
|
||||
inline int ini_parse_file(FILE* file, ini_handler handler, void* user)
|
||||
{
|
||||
return ini_parse_stream((ini_reader)fgets, file, handler, user);
|
||||
}
|
||||
|
||||
/* See documentation in header file. */
|
||||
inline int ini_parse_message(const std::string& message, ini_handler handler, void* user)
|
||||
{
|
||||
std::istringstream stream(message);
|
||||
return ini_parse_stream((ini_reader) [](char* str, int num, void* ptrStream) {
|
||||
auto stream = (std::istringstream*) ptrStream;
|
||||
stream->getline(str, num);
|
||||
return !!*stream ? str : nullptr;
|
||||
}, &stream, handler, user);
|
||||
}
|
||||
|
||||
/* See documentation in header file. */
|
||||
inline int ini_parse(const char* filename, ini_handler handler, void* user)
|
||||
{
|
||||
FILE* file;
|
||||
int error;
|
||||
|
||||
file = fopen(filename, "r");
|
||||
if (!file)
|
||||
return -1;
|
||||
error = ini_parse_file(file, handler, user);
|
||||
fclose(file);
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif /* __INI_H__ */
|
||||
|
||||
|
||||
#ifndef __INIREADER_H__
|
||||
#define __INIREADER_H__
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
// Read an INI file into easy-to-access name/value pairs. (Note that I've gone
|
||||
// for simplicity here rather than speed, but it should be pretty decent.)
|
||||
class INIReader
|
||||
{
|
||||
public:
|
||||
// Empty Constructor
|
||||
INIReader() {};
|
||||
|
||||
// Construct INIReader and parse given filename. See ini.h for more info
|
||||
// about the parsing.
|
||||
INIReader(std::string filename, bool raw = false);
|
||||
|
||||
// Return the result of ini_parse(), i.e., 0 on success, line number of
|
||||
// first error on parse error, or -1 on file open error.
|
||||
int ParseError() const;
|
||||
|
||||
// Return the list of sections found in ini file
|
||||
std::set<std::string> Sections();
|
||||
|
||||
// Get a string value from INI file, returning default_value if not found.
|
||||
std::string Get(std::string section, std::string name,
|
||||
std::string default_value);
|
||||
|
||||
// Get an integer (long) value from INI file, returning default_value if
|
||||
// not found or not a valid integer (decimal "1234", "-1234", or hex "0x4d2").
|
||||
long GetInteger(std::string section, std::string name, long default_value);
|
||||
|
||||
// Get a real (floating point double) value from INI file, returning
|
||||
// default_value if not found or not a valid floating point value
|
||||
// according to strtod().
|
||||
double GetReal(std::string section, std::string name, double default_value);
|
||||
|
||||
// Get a boolean value from INI file, returning default_value if not found or if
|
||||
// not a valid true/false value. Valid true values are "true", "yes", "on", "1",
|
||||
// and valid false values are "false", "no", "off", "0" (not case sensitive).
|
||||
bool GetBoolean(std::string section, std::string name, bool default_value);
|
||||
|
||||
private:
|
||||
int _error;
|
||||
std::map<std::string, std::string> _values;
|
||||
std::set<std::string> _sections;
|
||||
static std::string MakeKey(std::string section, std::string name);
|
||||
static int ValueHandler(void* user, const char* section, const char* name,
|
||||
const char* value);
|
||||
};
|
||||
|
||||
#endif // __INIREADER_H__
|
||||
|
||||
|
||||
#ifndef __INIREADER__
|
||||
#define __INIREADER__
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
|
||||
using std::string;
|
||||
|
||||
inline INIReader::INIReader(string data, bool raw)
|
||||
{
|
||||
if(raw)
|
||||
_error = ini_parse_message(data, ValueHandler, this);
|
||||
else
|
||||
_error = ini_parse(data.c_str(), ValueHandler, this);
|
||||
}
|
||||
|
||||
inline int INIReader::ParseError() const
|
||||
{
|
||||
return _error;
|
||||
}
|
||||
|
||||
inline std::set<string> INIReader::Sections()
|
||||
{
|
||||
return _sections;
|
||||
}
|
||||
|
||||
inline string INIReader::Get(string section, string name, string default_value)
|
||||
{
|
||||
string key = MakeKey(section, name);
|
||||
return _values.count(key) ? _values[key] : default_value;
|
||||
}
|
||||
|
||||
inline long INIReader::GetInteger(string section, string name, long default_value)
|
||||
{
|
||||
string valstr = Get(section, name, "");
|
||||
const char* value = valstr.c_str();
|
||||
char* end;
|
||||
// This parses "1234" (decimal) and also "0x4D2" (hex)
|
||||
long n = strtol(value, &end, 0);
|
||||
return end > value ? n : default_value;
|
||||
}
|
||||
|
||||
inline double INIReader::GetReal(string section, string name, double default_value)
|
||||
{
|
||||
string valstr = Get(section, name, "");
|
||||
const char* value = valstr.c_str();
|
||||
char* end;
|
||||
double n = strtod(value, &end);
|
||||
return end > value ? n : default_value;
|
||||
}
|
||||
|
||||
inline bool INIReader::GetBoolean(string section, string name, bool default_value)
|
||||
{
|
||||
string valstr = Get(section, name, "");
|
||||
// Convert to lower case to make string comparisons case-insensitive
|
||||
std::transform(valstr.begin(), valstr.end(), valstr.begin(), ::tolower);
|
||||
if (valstr == "true" || valstr == "yes" || valstr == "on" || valstr == "1")
|
||||
return true;
|
||||
else if (valstr == "false" || valstr == "no" || valstr == "off" || valstr == "0")
|
||||
return false;
|
||||
else
|
||||
return default_value;
|
||||
}
|
||||
|
||||
inline string INIReader::MakeKey(string section, string name)
|
||||
{
|
||||
string key = section + "=" + name;
|
||||
// Convert to lower case to make section/name lookups case-insensitive
|
||||
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
|
||||
return key;
|
||||
}
|
||||
|
||||
inline int INIReader::ValueHandler(void* user, const char* section, const char* name,
|
||||
const char* value)
|
||||
{
|
||||
INIReader* reader = (INIReader*)user;
|
||||
string key = MakeKey(section, name);
|
||||
if (reader->_values[key].size() > 0)
|
||||
reader->_values[key] += "\n";
|
||||
reader->_values[key] += value;
|
||||
reader->_sections.insert(section);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // __INIREADER__
|
|
@ -1,283 +0,0 @@
|
|||
#include "Identity.h"
|
||||
#include <iostream>
|
||||
#include "base64.h"
|
||||
|
||||
#define SHA_DIGEST_LENGTH 20
|
||||
#define ECC_TYPE_INDEX 5
|
||||
|
||||
static const char *TSKEY =
|
||||
"b9dfaa7bee6ac57ac7b65f1094a1c155"
|
||||
"e747327bc2fe5d51c512023fe54a2802"
|
||||
"01004e90ad1daaae1075d53b7d571c30"
|
||||
"e063b5a62a4a017bb394833aa0983e6e";
|
||||
|
||||
using namespace std;
|
||||
|
||||
inline int SHA1(const char* input, size_t length, char* result) {
|
||||
hash_state ctx = {};
|
||||
if (sha1_init(&ctx) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_process(&ctx, (uint8_t*) input, length) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_done(&ctx, (uint8_t*) result) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int decriptIdentity(char *data, uint32_t length) {
|
||||
int dataSize = std::min((uint32_t) 100, length);
|
||||
for (int i = 0; i < dataSize; i++) {
|
||||
data[i] ^= TSKEY[i];
|
||||
}
|
||||
|
||||
char hash[SHA_DIGEST_LENGTH];
|
||||
//if(SHA1(data + 20, strlen(data + 20), hash) < 0) return -1;
|
||||
|
||||
hash_state ctx = {};
|
||||
if (sha1_init(&ctx) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_process(&ctx, (uint8_t*)data + 20, strlen(data + 20)) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_done(&ctx, (uint8_t*)hash) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
data[i] ^= hash[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int encriptIdentity(char *data, uint32_t length) {
|
||||
char hash[SHA_DIGEST_LENGTH];
|
||||
//if(SHA1(data, length, hash) < 0) return -1;
|
||||
|
||||
hash_state ctx;
|
||||
if (sha1_init(&ctx) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_process(&ctx, (uint8_t*)data + 20, strlen(data + 20)) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
if (sha1_done(&ctx, (uint8_t*)hash) != CRYPT_OK)
|
||||
{ return -1; }
|
||||
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
data[i] ^= hash[i];
|
||||
}
|
||||
|
||||
int dataSize = std::min((uint32_t) 100, length);
|
||||
for (int i = 0; i < dataSize; i++) {
|
||||
data[i] ^= TSKEY[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
namespace ts {
|
||||
Identity* Identity::createNew() {
|
||||
auto result = new Identity();
|
||||
|
||||
prng_state rndState = {};
|
||||
memset(&rndState, 0, sizeof(prng_state));
|
||||
int err;
|
||||
|
||||
result->keyPair = new ecc_key;
|
||||
|
||||
//cout << " -> " << find_prng("sprng") << endl;
|
||||
if((err = ecc_make_key_ex(&rndState, find_prng("sprng"), result->keyPair, <c_ecc_sets[ECC_TYPE_INDEX])) != CRYPT_OK){
|
||||
printf("Cant create a new identity (Keygen)\n");
|
||||
printf("Message: %s\n", error_to_string(err));
|
||||
delete result;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Identity* Identity::parse(const std::string& data, std::string& error) {
|
||||
int vindex = data.find('V');
|
||||
if(vindex <= 0) {
|
||||
error = "Invalid structure";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto slevel = data.substr(0, vindex);
|
||||
if(slevel.find_first_not_of("0123456789") != std::string::npos) {
|
||||
error = "Invalid offset (" + slevel + ")";
|
||||
return nullptr;
|
||||
}
|
||||
mp_int keyOffset{};
|
||||
mp_init(&keyOffset);
|
||||
mp_read_radix(&keyOffset, slevel.data(), 10);
|
||||
|
||||
auto keyData = data.substr(vindex + 1);
|
||||
keyData = base64::decode(keyData);
|
||||
if(encriptIdentity(&keyData[0], keyData.length()) < 0) {
|
||||
error = "Could not decrypt key";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto identity = new Identity(base64::decode(keyData), keyOffset, keyOffset);
|
||||
if(!identity->keyPair) {
|
||||
error = "Could not load key";
|
||||
delete identity;
|
||||
return nullptr;
|
||||
}
|
||||
printf("X: %s | %s\n", slevel.c_str(), identity->lastValidKeyOffsetString().c_str());
|
||||
return identity;
|
||||
}
|
||||
|
||||
Identity::Identity(const std::string& asnStruct, mp_int keyOffset, mp_int lastCheckedOffset) {
|
||||
this->keyOffset = keyOffset;
|
||||
this->lastCheckedOffset = lastCheckedOffset;
|
||||
importKey(asnStruct);
|
||||
|
||||
mp_init_copy(&this->keyOffset, &keyOffset);
|
||||
mp_init_copy(&this->lastCheckedOffset, &lastCheckedOffset);
|
||||
}
|
||||
|
||||
Identity::Identity() {
|
||||
mp_init_multi(&this->keyOffset, &this->lastCheckedOffset, nullptr);
|
||||
this->keyPair = nullptr;
|
||||
}
|
||||
|
||||
Identity::~Identity() {
|
||||
delete this->keyPair;
|
||||
this->keyPair = nullptr;
|
||||
|
||||
mp_clear_multi(&this->keyOffset, &this->lastCheckedOffset, nullptr);
|
||||
}
|
||||
|
||||
void Identity::importKey(std::string asnStruct) {
|
||||
this->keyPair = new ecc_key;
|
||||
int err;
|
||||
if((err = ecc_import_ex((const unsigned char *) asnStruct.data(), asnStruct.length(), this->keyPair, <c_ecc_sets[ECC_TYPE_INDEX])) != CRYPT_OK){
|
||||
delete this->keyPair;
|
||||
this->keyPair = nullptr;
|
||||
|
||||
printf("Cant import identity from asn structure\n");
|
||||
printf("Message: %s\n", error_to_string(err));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Identity::exportIdentity() {
|
||||
std::string data = privateKey();
|
||||
decriptIdentity((char *) data.data(), data.length());
|
||||
return this->lastValidKeyOffsetString() + "V" + base64_encode(data);
|
||||
}
|
||||
|
||||
std::string Identity::uid() {
|
||||
char buffer[SHA_DIGEST_LENGTH];
|
||||
auto key = this->publicKey();
|
||||
SHA1(key.data(), key.length(), buffer);
|
||||
return base64::encode(buffer, SHA_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
inline string hex(string input, char beg, char end){
|
||||
assert(end - beg == 16);
|
||||
|
||||
int len = input.length() * 2;
|
||||
char output[len];
|
||||
int idx = 0;
|
||||
for(int index = 0; index < input.length(); index++){
|
||||
char elm = input[index];
|
||||
output[idx++] = static_cast<char>(beg + ((elm >> 4) & 0x0F));
|
||||
output[idx++] = static_cast<char>(beg + ((elm & 0x0F) >> 0));
|
||||
}
|
||||
|
||||
return string(output, len);
|
||||
}
|
||||
|
||||
std::string Identity::avatarId() {
|
||||
return hex(base64::decode(this->uid()), 'a', 'q');
|
||||
}
|
||||
|
||||
std::string Identity::publicKey() {
|
||||
assert(this->keyPair);
|
||||
|
||||
ulong32 bufferLength = 1028;
|
||||
char buffer[bufferLength];
|
||||
ecc_export((unsigned char *) buffer, &bufferLength, PK_PUBLIC, this->keyPair);
|
||||
|
||||
return base64_encode(std::string(buffer, bufferLength));
|
||||
}
|
||||
|
||||
std::string Identity::privateKey() {
|
||||
assert(this->keyPair);
|
||||
|
||||
ulong32 bufferLength = 1028;
|
||||
char buffer[bufferLength];
|
||||
ecc_export((unsigned char *) buffer, &bufferLength, PK_PRIVATE, this->keyPair);
|
||||
|
||||
return base64_encode(std::string(buffer, bufferLength));
|
||||
}
|
||||
|
||||
ecc_key& Identity::getPrivateKey() {
|
||||
return *keyPair;
|
||||
}
|
||||
|
||||
#define MaxUlongString 20
|
||||
|
||||
bool Identity::improveSecurityLevel(int target) {
|
||||
auto publicKey = this->publicKey();
|
||||
char hashBuffer[publicKey.length() + MaxUlongString];
|
||||
memcpy(hashBuffer, publicKey.data(), publicKey.length());
|
||||
|
||||
if(mp_cmp(&this->lastCheckedOffset, &this->keyOffset) < 0)
|
||||
mp_copy(&this->keyOffset, &this->lastCheckedOffset);
|
||||
int best = getSecurityLevel(hashBuffer, publicKey.length(), this->lastCheckedOffset);
|
||||
while(true){
|
||||
if(best >= target) return true;
|
||||
|
||||
int currentLevel = getSecurityLevel(hashBuffer, publicKey.length(), this->lastCheckedOffset);
|
||||
if(currentLevel >= best){
|
||||
this->keyOffset = this->lastCheckedOffset;
|
||||
best = currentLevel;
|
||||
}
|
||||
mp_add_d(&this->lastCheckedOffset, 1, &this->lastCheckedOffset);
|
||||
}
|
||||
}
|
||||
|
||||
int Identity::getSecurityLevel() {
|
||||
auto length = publicKey().length();
|
||||
char hashBuffer[length + MaxUlongString];
|
||||
|
||||
auto publicKey = this->publicKey();
|
||||
memcpy(hashBuffer, publicKey.data(), publicKey.length());
|
||||
|
||||
return getSecurityLevel(hashBuffer, publicKey.length(), this->keyOffset);
|
||||
}
|
||||
|
||||
int Identity::getSecurityLevel(char *hashBuffer, size_t keyLength, mp_int offset) {
|
||||
char numBuffer[MaxUlongString];
|
||||
mp_todecimal(&offset, numBuffer);
|
||||
/*
|
||||
int numLen = 0;
|
||||
do {
|
||||
numBuffer[numLen] = '0' + (offset % 10);
|
||||
offset /= 10;
|
||||
numLen++;
|
||||
} while(offset > 0);
|
||||
for(int i = 0; i < numLen; i++)
|
||||
hashBuffer[keyLength + i] = numBuffer[numLen - (i + 1)];
|
||||
*/
|
||||
auto numLen = strlen(numBuffer);
|
||||
memcpy(&hashBuffer[keyLength], numBuffer, numLen);
|
||||
|
||||
char shaBuffer[SHA_DIGEST_LENGTH];
|
||||
SHA1(hashBuffer, keyLength + numLen, shaBuffer);
|
||||
|
||||
//Leading zero bits
|
||||
int zeroBits = 0;
|
||||
int i;
|
||||
for(i = 0; i < SHA_DIGEST_LENGTH; i++)
|
||||
if(shaBuffer[i] == 0) zeroBits += 8;
|
||||
else break;
|
||||
if(i < SHA_DIGEST_LENGTH)
|
||||
for(int bit = 0; bit < 8; bit++)
|
||||
if((shaBuffer[i] & (1 << bit)) == 0) zeroBits++;
|
||||
else break;
|
||||
return zeroBits;
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <tomcrypt.h>
|
||||
#include <string>
|
||||
#include <tommath.h>
|
||||
|
||||
namespace ts {
|
||||
class Identity {
|
||||
inline std::string toString(const mp_int& num) {
|
||||
char buffer[1024];
|
||||
mp_todecimal(&num, buffer);
|
||||
return std::string(buffer);
|
||||
}
|
||||
public:
|
||||
static Identity* createNew();
|
||||
static Identity* parse(const std::string&, std::string&);
|
||||
|
||||
Identity(const std::string& asnStruct,mp_int keyOffset,mp_int lastCheckedOffset);
|
||||
~Identity();
|
||||
|
||||
bool valid(){ return keyPair != nullptr; }
|
||||
|
||||
std::string uid();
|
||||
std::string avatarId();
|
||||
|
||||
std::string publicKey();
|
||||
std::string privateKey();
|
||||
std::string exportIdentity();
|
||||
|
||||
ecc_key* getKeyPair(){
|
||||
return keyPair;
|
||||
}
|
||||
|
||||
ecc_key& getPrivateKey();
|
||||
|
||||
bool improveSecurityLevel(int target);
|
||||
int getSecurityLevel();
|
||||
|
||||
mp_int lastValidKeyOffset(){ return keyOffset; }
|
||||
mp_int lastTestedKeyOffset(){ return lastCheckedOffset; }
|
||||
|
||||
std::string lastValidKeyOffsetString(){
|
||||
return toString(this->lastValidKeyOffset());
|
||||
}
|
||||
|
||||
std::string lastTestedKeyOffsetString(){
|
||||
return toString(this->lastTestedKeyOffset());
|
||||
}
|
||||
private:
|
||||
Identity();
|
||||
|
||||
int getSecurityLevel(char* hasBuffer, size_t keyLength, mp_int offset);
|
||||
void importKey(std::string asn1);
|
||||
|
||||
ecc_key* keyPair = nullptr;
|
||||
mp_int keyOffset;
|
||||
mp_int lastCheckedOffset;
|
||||
};
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
#include <cstdio>
|
||||
#include <emscripten.h>
|
||||
#include <emscripten/bind.h>
|
||||
#include <tomcrypt.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include "Identity.h"
|
||||
#include "base64.h"
|
||||
#define INI_MAX_LINE 1024
|
||||
#include "INIReader.h"
|
||||
|
||||
using namespace emscripten;
|
||||
using namespace std;
|
||||
extern "C" {
|
||||
std::string errorMessage = "";
|
||||
|
||||
inline const char* cstr(const std::string& message) {
|
||||
auto buffer = (char*) malloc(message.length() + 1);
|
||||
cout << "Allocating at " << (void*) buffer << endl;
|
||||
buffer[message.length()] = '\0';
|
||||
memcpy(buffer, message.data(), message.length());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* last_error_message() {
|
||||
return cstr(errorMessage);
|
||||
};
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void destroy_string(const char* str) {
|
||||
cout << "Deallocating at " << (void*) str << endl;
|
||||
if(str) free((void *) str);
|
||||
};
|
||||
|
||||
inline void clear_error() { errorMessage = ""; }
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
int tomcrypt_initialize() {
|
||||
init_LTM();
|
||||
if(register_prng(&sprng_desc) == -1) {
|
||||
printf("could not setup prng\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (register_cipher(&rijndael_desc) == -1) {
|
||||
printf("could not setup rijndael\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
cout << "Initialized!" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void* parse_identity(const char* input) {
|
||||
cout << "Got messsage: " << input << endl;
|
||||
clear_error();
|
||||
return ts::Identity::parse(input, errorMessage);
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void* parse_identity_file(const char* input) {
|
||||
clear_error();
|
||||
INIReader reader(input, true);
|
||||
if(reader.ParseError() != 0) {
|
||||
errorMessage = "Could not parse file " + to_string(reader.ParseError());
|
||||
return nullptr;
|
||||
}
|
||||
auto identity = reader.Get("Identity", "identity", "");
|
||||
if(!identity.empty() && identity[0] == '"')
|
||||
identity = identity.substr(1);
|
||||
if(!identity.empty() && identity.back() == '"')
|
||||
identity = identity.substr(0, identity.length() - 1);
|
||||
if(identity.empty()) {
|
||||
errorMessage = "Mussing identity value at Identity::identity";
|
||||
return nullptr;
|
||||
}
|
||||
return ts::Identity::parse(identity, errorMessage);
|
||||
}
|
||||
|
||||
#define IDENTITIEFY(_ret) \
|
||||
auto identity = dynamic_cast<ts::Identity*>((ts::Identity*) ptrIdentity); \
|
||||
if(!identity) { \
|
||||
errorMessage = "Invalid identity pointer!"; \
|
||||
return _ret; \
|
||||
}
|
||||
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void delete_identity(void* ptrIdentity) {
|
||||
IDENTITIEFY(;);
|
||||
delete identity;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* identity_security_level(void* ptrIdentity) {
|
||||
IDENTITIEFY("");
|
||||
return cstr(std::to_string(identity->getSecurityLevel()));
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* identity_export(void* ptrIdentity) {
|
||||
IDENTITIEFY("");
|
||||
return cstr(identity->exportIdentity());
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* identity_key_public(void* ptrIdentity) {
|
||||
IDENTITIEFY("");
|
||||
return cstr(identity->publicKey());
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* identity_uid(void* ptrIdentity) {
|
||||
IDENTITIEFY("");
|
||||
return cstr(identity->uid());
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
const char* identity_sign(void* ptrIdentity, const char* message, int length) {
|
||||
IDENTITIEFY("");
|
||||
|
||||
ulong32 bufferLength = 128;
|
||||
char signBuffer[bufferLength];
|
||||
|
||||
prng_state rndState = {};
|
||||
memset(&rndState, 0, sizeof(prng_state));
|
||||
|
||||
auto state = ecc_sign_hash((const unsigned char*) message, length, reinterpret_cast<unsigned char *>(signBuffer), &bufferLength, &rndState, find_prng("sprng"), identity->getKeyPair());
|
||||
if(state != CRYPT_OK) {
|
||||
errorMessage = "Could not sign message (" + std::string(error_to_string(state)) + "|" + std::to_string(state) + ")";
|
||||
return "";
|
||||
}
|
||||
|
||||
return cstr(base64::encode(signBuffer, bufferLength));
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <tomcrypt.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace base64 {
|
||||
/**
|
||||
* Encodes a given string in Base64
|
||||
* @param input The input string to Base64-encode
|
||||
* @param inputSize The size of the input to decode
|
||||
* @return A Base64-encoded version of the encoded string
|
||||
*/
|
||||
inline std::string encode(const char* input, const unsigned long inputSize) {
|
||||
auto outlen = static_cast<unsigned long>(inputSize + (inputSize / 3.0) + 16);
|
||||
auto outbuf = new unsigned char[outlen]; //Reserve output memory
|
||||
if(base64_encode((unsigned char*) input, inputSize, outbuf, &outlen) != CRYPT_OK){
|
||||
std::cerr << "Invalid input '" << input << "'" << std::endl;
|
||||
return "";
|
||||
}
|
||||
std::string ret((char*) outbuf, outlen);
|
||||
delete[] outbuf;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes a given string in Base64
|
||||
* @param input The input string to Base64-encode
|
||||
* @return A Base64-encoded version of the encoded string
|
||||
*/
|
||||
inline std::string encode(const std::string& input) { return encode(input.c_str(), input.size()); }
|
||||
|
||||
|
||||
/**
|
||||
* Decodes a Base64-encoded string.
|
||||
* @param input The input string to decode
|
||||
* @return A string (binary) that represents the Base64-decoded data of the input
|
||||
*/
|
||||
inline std::string decode(const char* input, ulong32 size) {
|
||||
auto out = new unsigned char[size];
|
||||
if(base64_strict_decode((unsigned char*) input, size, out, &size) != CRYPT_OK){
|
||||
std::cerr << "Invalid base 64 string '" << input << "'" << std::endl;
|
||||
return "";
|
||||
}
|
||||
std::string ret((char*) out, size);
|
||||
delete[] out;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a Base64-encoded string.
|
||||
* @param input The input string to decode
|
||||
* @return A string (binary) that represents the Base64-decoded data of the input
|
||||
*/
|
||||
inline std::string decode(const std::string& input) { return decode(input.c_str(), input.size()); }
|
||||
}
|
||||
inline std::string base64_encode(const char* input, const unsigned long inputSize) { return base64::encode(input, inputSize); }
|
||||
inline std::string base64_encode(const std::string& input) { return base64::encode(input.c_str(), input.size()); }
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,16 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/emscripten`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for Emscripten (http://kripken.github.io/emscripten-site/index.html).
|
||||
|
||||
# Details
|
||||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/emscripten
|
||||
|
||||
Additional Details
|
||||
* Last updated: Sat, 28 Oct 2017 00:24:49 GMT
|
||||
* Dependencies: webassembly-js-api
|
||||
* Global values: FS, IDBFS, MEMFS, Module, NODEFS
|
||||
|
||||
# Credits
|
||||
These definitions were written by Kensuke Matsuzaki <https://github.com/zakki>, Periklis Tsirakidis <https://github.com/periklis>.
|
|
@ -1,206 +0,0 @@
|
|||
// Type definitions for Emscripten
|
||||
// Project: http://kripken.github.io/emscripten-site/index.html
|
||||
// Definitions by: Kensuke Matsuzaki <https://github.com/zakki>
|
||||
// Periklis Tsirakidis <https://github.com/periklis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="webassembly-js-api" />
|
||||
|
||||
declare namespace Emscripten {
|
||||
interface FileSystemType {
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace Module {
|
||||
type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER";
|
||||
|
||||
function print(str: string): void;
|
||||
function printErr(str: string): void;
|
||||
var arguments: string[];
|
||||
var environment: EnvironmentType;
|
||||
var preInit: { (): void }[];
|
||||
var preRun: { (): void }[];
|
||||
var postRun: { (): void }[];
|
||||
var preinitializedWebGLContext: WebGLRenderingContext;
|
||||
var noInitialRun: boolean;
|
||||
var noExitRuntime: boolean;
|
||||
var logReadFiles: boolean;
|
||||
var filePackagePrefixURL: string;
|
||||
var wasmBinary: ArrayBuffer;
|
||||
|
||||
function destroy(object: object): void;
|
||||
function getPreloadedPackage(remotePackageName: string, remotePackageSize: number): ArrayBuffer;
|
||||
function instantiateWasm(
|
||||
imports: WebAssembly.Imports,
|
||||
successCallback: (module: WebAssembly.Module) => void
|
||||
): WebAssembly.Exports;
|
||||
function locateFile(url: string): string;
|
||||
function onCustomMessage(event: MessageEvent): void;
|
||||
|
||||
var Runtime: any;
|
||||
|
||||
function ccall(ident: string, returnType: string | null, argTypes: string[], args: any[]): any;
|
||||
function cwrap(ident: string, returnType: string | null, argTypes: string[]): any;
|
||||
|
||||
function setValue(ptr: number, value: any, type: string, noSafe?: boolean): void;
|
||||
function getValue(ptr: number, type: string, noSafe?: boolean): number;
|
||||
|
||||
var ALLOC_NORMAL: number;
|
||||
var ALLOC_STACK: number;
|
||||
var ALLOC_STATIC: number;
|
||||
var ALLOC_DYNAMIC: number;
|
||||
var ALLOC_NONE: number;
|
||||
|
||||
function allocate(slab: any, types: string, allocator: number, ptr: number): number;
|
||||
function allocate(slab: any, types: string[], allocator: number, ptr: number): number;
|
||||
|
||||
function Pointer_stringify(ptr: number, length?: number): string;
|
||||
function UTF16ToString(ptr: number): string;
|
||||
function stringToUTF16(str: string, outPtr: number): void;
|
||||
function UTF32ToString(ptr: number): string;
|
||||
function stringToUTF32(str: string, outPtr: number): void;
|
||||
|
||||
// USE_TYPED_ARRAYS == 1
|
||||
var HEAP: Int32Array;
|
||||
var IHEAP: Int32Array;
|
||||
var FHEAP: Float64Array;
|
||||
|
||||
// USE_TYPED_ARRAYS == 2
|
||||
var HEAP8: Int8Array;
|
||||
var HEAP16: Int16Array;
|
||||
var HEAP32: Int32Array;
|
||||
var HEAPU8: Uint8Array;
|
||||
var HEAPU16: Uint16Array;
|
||||
var HEAPU32: Uint32Array;
|
||||
var HEAPF32: Float32Array;
|
||||
var HEAPF64: Float64Array;
|
||||
|
||||
var TOTAL_STACK: number;
|
||||
var TOTAL_MEMORY: number;
|
||||
var FAST_MEMORY: number;
|
||||
|
||||
function addOnPreRun(cb: () => any): void;
|
||||
function addOnInit(cb: () => any): void;
|
||||
function addOnPreMain(cb: () => any): void;
|
||||
function addOnExit(cb: () => any): void;
|
||||
function addOnPostRun(cb: () => any): void;
|
||||
|
||||
// Tools
|
||||
function intArrayFromString(stringy: string, dontAddNull?: boolean, length?: number): number[];
|
||||
function intArrayToString(array: number[]): string;
|
||||
function writeStringToMemory(str: string, buffer: number, dontAddNull: boolean): void;
|
||||
function writeArrayToMemory(array: number[], buffer: number): void;
|
||||
function writeAsciiToMemory(str: string, buffer: number, dontAddNull: boolean): void;
|
||||
|
||||
function addRunDependency(id: any): void;
|
||||
function removeRunDependency(id: any): void;
|
||||
|
||||
|
||||
var preloadedImages: any;
|
||||
var preloadedAudios: any;
|
||||
|
||||
function _malloc(size: number): number;
|
||||
function _free(ptr: number): void;
|
||||
}
|
||||
|
||||
declare namespace FS {
|
||||
interface Lookup {
|
||||
path: string;
|
||||
node: FSNode;
|
||||
}
|
||||
|
||||
interface FSStream {}
|
||||
interface FSNode {}
|
||||
interface ErrnoError {}
|
||||
|
||||
var ignorePermissions: boolean;
|
||||
var trackingDelegate: any;
|
||||
var tracking: any;
|
||||
var genericErrors: any;
|
||||
|
||||
//
|
||||
// paths
|
||||
//
|
||||
function lookupPath(path: string, opts: any): Lookup;
|
||||
function getPath(node: FSNode): string;
|
||||
|
||||
//
|
||||
// nodes
|
||||
//
|
||||
function isFile(mode: number): boolean;
|
||||
function isDir(mode: number): boolean;
|
||||
function isLink(mode: number): boolean;
|
||||
function isChrdev(mode: number): boolean;
|
||||
function isBlkdev(mode: number): boolean;
|
||||
function isFIFO(mode: number): boolean;
|
||||
function isSocket(mode: number): boolean;
|
||||
|
||||
//
|
||||
// devices
|
||||
//
|
||||
function major(dev: number): number;
|
||||
function minor(dev: number): number;
|
||||
function makedev(ma: number, mi: number): number;
|
||||
function registerDevice(dev: number, ops: any): void;
|
||||
|
||||
//
|
||||
// core
|
||||
//
|
||||
function syncfs(populate: boolean, callback: (e: any) => any): void;
|
||||
function syncfs( callback: (e: any) => any, populate?: boolean): void;
|
||||
function mount(type: Emscripten.FileSystemType, opts: any, mountpoint: string): any;
|
||||
function unmount(mountpoint: string): void;
|
||||
|
||||
function mkdir(path: string, mode?: number): any;
|
||||
function mkdev(path: string, mode?: number, dev?: number): any;
|
||||
function symlink(oldpath: string, newpath: string): any;
|
||||
function rename(old_path: string, new_path: string): void;
|
||||
function rmdir(path: string): void;
|
||||
function readdir(path: string): any;
|
||||
function unlink(path: string): void;
|
||||
function readlink(path: string): string;
|
||||
function stat(path: string, dontFollow?: boolean): any;
|
||||
function lstat(path: string): any;
|
||||
function chmod(path: string, mode: number, dontFollow?: boolean): void;
|
||||
function lchmod(path: string, mode: number): void;
|
||||
function fchmod(fd: number, mode: number): void;
|
||||
function chown(path: string, uid: number, gid: number, dontFollow?: boolean): void;
|
||||
function lchown(path: string, uid: number, gid: number): void;
|
||||
function fchown(fd: number, uid: number, gid: number): void;
|
||||
function truncate(path: string, len: number): void;
|
||||
function ftruncate(fd: number, len: number): void;
|
||||
function utime(path: string, atime: number, mtime: number): void;
|
||||
function open(path: string, flags: string, mode?: number, fd_start?: number, fd_end?: number): FSStream;
|
||||
function close(stream: FSStream): void;
|
||||
function llseek(stream: FSStream, offset: number, whence: number): any;
|
||||
function read(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number): number;
|
||||
function write(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number, canOwn?: boolean): number;
|
||||
function allocate(stream: FSStream, offset: number, length: number): void;
|
||||
function mmap(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position: number, prot: number, flags: number): any;
|
||||
function ioctl(stream: FSStream, cmd: any, arg: any): any;
|
||||
function readFile(path: string, opts?: {encoding: string; flags: string}): any;
|
||||
function writeFile(path: string, data: ArrayBufferView, opts?: {encoding: string; flags: string}): void;
|
||||
function writeFile(path: string, data: string, opts?: {encoding: string; flags: string}): void;
|
||||
|
||||
//
|
||||
// module-level FS code
|
||||
//
|
||||
function cwd(): string;
|
||||
function chdir(path: string): void;
|
||||
function init(input: () => number, output: (c: number) => any, error: (c: number) => any): void;
|
||||
|
||||
function createLazyFile(parent: string, name: string, url: string, canRead: boolean, canWrite: boolean): FSNode;
|
||||
function createLazyFile(parent: FSNode, name: string, url: string, canRead: boolean, canWrite: boolean): FSNode;
|
||||
|
||||
function createPreloadedFile(parent: string, name: string, url: string, canRead: boolean, canWrite: boolean, onload?: ()=> void, onerror?: ()=>void, dontCreateFile?:boolean, canOwn?: boolean): void;
|
||||
function createPreloadedFile(parent: FSNode, name: string, url: string, canRead: boolean, canWrite: boolean, onload?: ()=> void, onerror?: ()=>void, dontCreateFile?:boolean, canOwn?: boolean): void;
|
||||
}
|
||||
|
||||
declare var MEMFS: Emscripten.FileSystemType;
|
||||
declare var NODEFS: Emscripten.FileSystemType;
|
||||
declare var IDBFS: Emscripten.FileSystemType;
|
||||
|
||||
interface Math {
|
||||
imul(a: number, b: number): number;
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/emscripten",
|
||||
"/home/wolverindev/TeamSpeak/web/client"
|
||||
]
|
||||
],
|
||||
"_from": "@types/emscripten@latest",
|
||||
"_id": "@types/emscripten@0.0.31",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/@types/emscripten",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/emscripten-0.0.31.tgz_1509150333217_0.37733960757032037"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "ts-npm-types@microsoft.com",
|
||||
"name": "types"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "@types/emscripten",
|
||||
"raw": "@types/emscripten",
|
||||
"rawSpec": "",
|
||||
"scope": "@types",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.31.tgz",
|
||||
"_shasum": "160817d1324e8b7049604d39ac47d85eeeedd597",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "@types/emscripten",
|
||||
"_where": "/home/wolverindev/TeamSpeak/web/client",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Kensuke Matsuzaki",
|
||||
"url": "https://github.com/zakki"
|
||||
},
|
||||
{
|
||||
"name": "Periklis Tsirakidis",
|
||||
"url": "https://github.com/periklis"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/webassembly-js-api": "*"
|
||||
},
|
||||
"description": "TypeScript definitions for Emscripten",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-6OaHAsknBA6M2gKszMZXunqFofGXCCk4UCXHMdzd3qtBpndSHuM2JgxBE9M3APyl/DlENt4FEe0C7mJwbcC/ZA==",
|
||||
"shasum": "160817d1324e8b7049604d39ac47d85eeeedd597",
|
||||
"tarball": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.31.tgz"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "types",
|
||||
"email": "ts-npm-types@microsoft.com"
|
||||
}
|
||||
],
|
||||
"name": "@types/emscripten",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.2",
|
||||
"typesPublisherContentHash": "79ee7b80df8ce0b7c60c63e612a6446a1cc674f4ff29b0ad27a9297576baf86d",
|
||||
"version": "0.0.31"
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,16 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/jquery`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for jquery (https://jquery.com).
|
||||
|
||||
# Details
|
||||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery
|
||||
|
||||
Additional Details
|
||||
* Last updated: Mon, 22 Jan 2018 19:06:28 GMT
|
||||
* Dependencies: none
|
||||
* Global values: $, JQuery, jQuery
|
||||
|
||||
# Credits
|
||||
These definitions were written by Leonard Thieu <https://github.com/leonard-thieu>, Boris Yankov <https://github.com/borisyankov>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly>, Dick van den Brink <https://github.com/DickvdBrink>, Thomas Schulz <https://github.com/King2500>.
|
File diff suppressed because it is too large
Load Diff
|
@ -1,152 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/jquery",
|
||||
"/home/wolverindev/TeamSpeak/web/client"
|
||||
]
|
||||
],
|
||||
"_from": "@types/jquery@latest",
|
||||
"_id": "@types/jquery@3.3.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/@types/jquery",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/jquery-3.3.0.tgz_1516647992725_0.7731937367934734"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "ts-npm-types@microsoft.com",
|
||||
"name": "types"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "@types/jquery",
|
||||
"raw": "@types/jquery",
|
||||
"rawSpec": "",
|
||||
"scope": "@types",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.0.tgz",
|
||||
"_shasum": "6316ac20a1a13c5d521a2dc661befc7184f73f5b",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "@types/jquery",
|
||||
"_where": "/home/wolverindev/TeamSpeak/web/client",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Basarat Ali Syed",
|
||||
"url": "https://github.com/basarat"
|
||||
},
|
||||
{
|
||||
"name": "Leonard Thieu",
|
||||
"url": "https://github.com/leonard-thieu"
|
||||
},
|
||||
{
|
||||
"name": "Christian Hoffmeister",
|
||||
"url": "https://github.com/choffmeister"
|
||||
},
|
||||
{
|
||||
"name": "Steve Fenton",
|
||||
"url": "https://github.com/Steve-Fenton"
|
||||
},
|
||||
{
|
||||
"name": "Diullei Gomes",
|
||||
"url": "https://github.com/Diullei"
|
||||
},
|
||||
{
|
||||
"name": "Tass Iliopoulos",
|
||||
"url": "https://github.com/tasoili"
|
||||
},
|
||||
{
|
||||
"name": "Jason Swearingen",
|
||||
"url": "https://github.com/jasons-novaleaf"
|
||||
},
|
||||
{
|
||||
"name": "Sean Hill",
|
||||
"url": "https://github.com/seanski"
|
||||
},
|
||||
{
|
||||
"name": "Guus Goossens",
|
||||
"url": "https://github.com/Guuz"
|
||||
},
|
||||
{
|
||||
"name": "Kelly Summerlin",
|
||||
"url": "https://github.com/ksummerlin"
|
||||
},
|
||||
{
|
||||
"name": "Boris Yankov",
|
||||
"url": "https://github.com/borisyankov"
|
||||
},
|
||||
{
|
||||
"name": "Nicholas Wolverson",
|
||||
"url": "https://github.com/nwolverson"
|
||||
},
|
||||
{
|
||||
"name": "Derek Cicerone",
|
||||
"url": "https://github.com/derekcicerone"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Gaspar",
|
||||
"url": "https://github.com/AndrewGaspar"
|
||||
},
|
||||
{
|
||||
"name": "Seikichi Kondo",
|
||||
"url": "https://github.com/seikichi"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Jackman",
|
||||
"url": "https://github.com/benjaminjackman"
|
||||
},
|
||||
{
|
||||
"name": "Poul Sorensen",
|
||||
"url": "https://github.com/s093294"
|
||||
},
|
||||
{
|
||||
"name": "Josh Strobl",
|
||||
"url": "https://github.com/JoshStrobl"
|
||||
},
|
||||
{
|
||||
"name": "John Reilly",
|
||||
"url": "https://github.com/johnnyreilly"
|
||||
},
|
||||
{
|
||||
"name": "Dick van den Brink",
|
||||
"url": "https://github.com/DickvdBrink"
|
||||
},
|
||||
{
|
||||
"name": "Thomas Schulz",
|
||||
"url": "https://github.com/King2500"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "TypeScript definitions for jquery",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-szaKV2OQgwxYTGTY6qd9eeBfGGCaP7n2OGit4JdbOcfGgc9VWjfhMhnu5AVNhIAu8WWDIB36q9dfPVba1fGeIQ==",
|
||||
"shasum": "6316ac20a1a13c5d521a2dc661befc7184f73f5b",
|
||||
"tarball": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.0.tgz"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "types",
|
||||
"email": "ts-npm-types@microsoft.com"
|
||||
}
|
||||
],
|
||||
"name": "@types/jquery",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.3",
|
||||
"typesPublisherContentHash": "917193c842c64c9e9a2e007b8e0d22b8befa6c80e9c44d996645c225be1d9a21",
|
||||
"version": "3.3.0"
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,16 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/node`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for Node.js (http://nodejs.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||
|
||||
Additional Details
|
||||
* Last updated: Tue, 13 Feb 2018 20:54:40 GMT
|
||||
* Dependencies: none
|
||||
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
|
||||
|
||||
# Credits
|
||||
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,147 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/node",
|
||||
"/home/wolverindev/TeamSpeak/web/client"
|
||||
]
|
||||
],
|
||||
"_from": "@types/node@latest",
|
||||
"_hasShrinkwrap": false,
|
||||
"_id": "@types/node@9.4.6",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/@types/node",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/node_9.4.6_1518555507778_0.6719093018381548"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "ts-npm-types@microsoft.com",
|
||||
"name": "types"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "@types/node",
|
||||
"raw": "@types/node",
|
||||
"rawSpec": "",
|
||||
"scope": "@types",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.6.tgz",
|
||||
"_shasum": "d8176d864ee48753d053783e4e463aec86b8d82e",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "@types/node",
|
||||
"_where": "/home/wolverindev/TeamSpeak/web/client",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "wwwy3y3",
|
||||
"url": "https://github.com/wwwy3y3"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft TypeScript",
|
||||
"url": "http://typescriptlang.org"
|
||||
},
|
||||
{
|
||||
"name": "Parambir Singh",
|
||||
"url": "https://github.com/parambirs"
|
||||
},
|
||||
{
|
||||
"name": "Christian Vaagland Tellnes",
|
||||
"url": "https://github.com/tellnes"
|
||||
},
|
||||
{
|
||||
"name": "Wilco Bakker",
|
||||
"url": "https://github.com/WilcoBakker"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Voigt",
|
||||
"url": "https://github.com/octo-sniffle"
|
||||
},
|
||||
{
|
||||
"name": "Chigozirim C.",
|
||||
"url": "https://github.com/smac89"
|
||||
},
|
||||
{
|
||||
"name": "Flarna",
|
||||
"url": "https://github.com/Flarna"
|
||||
},
|
||||
{
|
||||
"name": "Mariusz Wiktorczyk",
|
||||
"url": "https://github.com/mwiktorczyk"
|
||||
},
|
||||
{
|
||||
"name": "DefinitelyTyped",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped"
|
||||
},
|
||||
{
|
||||
"name": "Deividas Bakanas",
|
||||
"url": "https://github.com/DeividasBakanas"
|
||||
},
|
||||
{
|
||||
"name": "Kelvin Jin",
|
||||
"url": "https://github.com/kjin"
|
||||
},
|
||||
{
|
||||
"name": "Alvis HT Tang",
|
||||
"url": "https://github.com/alvis"
|
||||
},
|
||||
{
|
||||
"name": "Oliver Joseph Ash",
|
||||
"url": "https://github.com/OliverJAsh"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"url": "https://github.com/eps1lon"
|
||||
},
|
||||
{
|
||||
"name": "Hannes Magnusson",
|
||||
"url": "https://github.com/Hannes-Magnusson-CK"
|
||||
},
|
||||
{
|
||||
"name": "Alberto Schiabel",
|
||||
"url": "https://github.com/jkomyno"
|
||||
},
|
||||
{
|
||||
"name": "Klaus Meinhardt",
|
||||
"url": "https://github.com/ajafff"
|
||||
},
|
||||
{
|
||||
"name": "Huw",
|
||||
"url": "https://github.com/hoo29"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "TypeScript definitions for Node.js",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"fileCount": 5,
|
||||
"integrity": "sha512-CTUtLb6WqCCgp6P59QintjHWqzf4VL1uPA27bipLAPxFqrtK1gEYllePzTICGqQ8rYsCbpnsNypXjjDzGAAjEQ==",
|
||||
"shasum": "d8176d864ee48753d053783e4e463aec86b8d82e",
|
||||
"tarball": "https://registry.npmjs.org/@types/node/-/node-9.4.6.tgz",
|
||||
"unpackedSize": 466335
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "types",
|
||||
"email": "ts-npm-types@microsoft.com"
|
||||
}
|
||||
],
|
||||
"name": "@types/node",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.0",
|
||||
"typesPublisherContentHash": "5cc4c278e6d9971113c335d856a33737f6e4892344bf18fd3cf5c39bb3917d4b",
|
||||
"version": "9.4.6"
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,16 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/webassembly-js-api`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for WebAssembly v1 (MVP) (https://github.com/winksaville/test-webassembly-js-ts).
|
||||
|
||||
# Details
|
||||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webassembly-js-api
|
||||
|
||||
Additional Details
|
||||
* Last updated: Fri, 05 May 2017 16:07:17 GMT
|
||||
* Dependencies: none
|
||||
* Global values: WebAssembly
|
||||
|
||||
# Credits
|
||||
These definitions were written by 01alchemist <https://twitter.com/01alchemist>, Wink Saville <wink@saville.com>, Periklis Tsirakidis <https://github.com/periklis>.
|
|
@ -1,113 +0,0 @@
|
|||
// Type definitions for WebAssembly v1 (MVP)
|
||||
// Project: https://github.com/winksaville/test-webassembly-js-ts
|
||||
// Definitions by: 01alchemist <https://twitter.com/01alchemist>
|
||||
// Wink Saville <wink@saville.com>
|
||||
// Periklis Tsirakidis <https://github.com/periklis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* The WebAssembly namespace, see [WebAssembly](https://github.com/webassembly)
|
||||
* and [WebAssembly JS API](http://webassembly.org/getting-started/js-api/)
|
||||
* for more information.
|
||||
*/
|
||||
declare namespace WebAssembly {
|
||||
type Imports = Array<{
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
|
||||
type Exports = Array<{
|
||||
module: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
|
||||
/**
|
||||
* WebAssembly.Module
|
||||
*/
|
||||
class Module {
|
||||
constructor(bufferSource: ArrayBuffer | Uint8Array);
|
||||
static customSections(module: Module, sectionName: string): ArrayBuffer[];
|
||||
static exports(module: Module): Imports;
|
||||
static imports(module: Module): Exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* WebAssembly.Instance
|
||||
*/
|
||||
class Instance {
|
||||
readonly exports: any;
|
||||
constructor(module: Module, importObject?: any);
|
||||
}
|
||||
|
||||
/**
|
||||
* WebAssembly.Memory
|
||||
* Note: A WebAssembly page has a constant size of 65,536 bytes, i.e., 64KiB.
|
||||
*/
|
||||
interface MemoryDescriptor {
|
||||
initial: number;
|
||||
maximum?: number;
|
||||
}
|
||||
|
||||
class Memory {
|
||||
readonly buffer: ArrayBuffer;
|
||||
constructor(memoryDescriptor: MemoryDescriptor);
|
||||
grow(numPages: number): number;
|
||||
}
|
||||
|
||||
/**
|
||||
* WebAssembly.Table
|
||||
*/
|
||||
interface TableDescriptor {
|
||||
element: "anyfunc";
|
||||
initial: number;
|
||||
maximum?: number;
|
||||
}
|
||||
|
||||
class Table {
|
||||
readonly length: number;
|
||||
constructor(tableDescriptor: TableDescriptor);
|
||||
get(index: number): (args: any[]) => any;
|
||||
grow(numElements: number): number;
|
||||
set(index: number, value: (args: any[]) => any): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Errors
|
||||
*/
|
||||
class CompileError extends Error {
|
||||
readonly fileName: string;
|
||||
readonly lineNumber: string;
|
||||
readonly columnNumber: string;
|
||||
constructor(message?: string, fileName?: string, lineNumber?: number);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
class LinkError extends Error {
|
||||
readonly fileName: string;
|
||||
readonly lineNumber: string;
|
||||
readonly columnNumber: string;
|
||||
constructor(message?: string, fileName?: string, lineNumber?: number);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
class RuntimeError extends Error {
|
||||
readonly fileName: string;
|
||||
readonly lineNumber: string;
|
||||
readonly columnNumber: string;
|
||||
constructor(message?: string, fileName?: string, lineNumber?: number);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
function compile(bufferSource: ArrayBuffer | Uint8Array): Promise<Module>;
|
||||
|
||||
interface ResultObject {
|
||||
module: Module;
|
||||
instance: Instance;
|
||||
}
|
||||
|
||||
function instantiate(bufferSource: ArrayBuffer | Uint8Array, importObject?: any): Promise<ResultObject>;
|
||||
function instantiate(module: Module, importObject?: any): Promise<Instance>;
|
||||
|
||||
function validate(bufferSource: ArrayBuffer | Uint8Array): boolean;
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/webassembly-js-api@*",
|
||||
"/home/wolverindev/TeamSpeak/web/client/node_modules/@types/emscripten"
|
||||
]
|
||||
],
|
||||
"_from": "@types/webassembly-js-api@*",
|
||||
"_id": "@types/webassembly-js-api@0.0.1",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/@types/webassembly-js-api",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/webassembly-js-api-0.0.1.tgz_1494000500928_0.2540658207144588"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "ts-npm-types@microsoft.com",
|
||||
"name": "types"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "@types/webassembly-js-api",
|
||||
"raw": "@types/webassembly-js-api@*",
|
||||
"rawSpec": "*",
|
||||
"scope": "@types",
|
||||
"spec": "*",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@types/emscripten"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/webassembly-js-api/-/webassembly-js-api-0.0.1.tgz",
|
||||
"_shasum": "62d50b201077d7d4cc109bb1cada22fdfd4523fb",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "@types/webassembly-js-api@*",
|
||||
"_where": "/home/wolverindev/TeamSpeak/web/client/node_modules/@types/emscripten",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "01alchemist",
|
||||
"url": "https://twitter.com/01alchemist"
|
||||
},
|
||||
{
|
||||
"name": "Wink Saville",
|
||||
"url": "wink@saville.com"
|
||||
},
|
||||
{
|
||||
"name": "Periklis Tsirakidis",
|
||||
"url": "https://github.com/periklis"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "TypeScript definitions for WebAssembly v1 (MVP)",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "62d50b201077d7d4cc109bb1cada22fdfd4523fb",
|
||||
"tarball": "https://registry.npmjs.org/@types/webassembly-js-api/-/webassembly-js-api-0.0.1.tgz"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "types",
|
||||
"email": "ts-npm-types@microsoft.com"
|
||||
}
|
||||
],
|
||||
"name": "@types/webassembly-js-api",
|
||||
"optionalDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.0",
|
||||
"typesPublisherContentHash": "ba67067f35f971aa862e373790aedb508ef406fb8ab07cc0f73f3be97882abc9",
|
||||
"version": "0.0.1"
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,197 +0,0 @@
|
|||
// Type definitions for WebRTC
|
||||
// Project: http://dev.w3.org/2011/webrtc/
|
||||
// Definitions by: Ken Smith <https://github.com/smithkl42/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Taken from http://dev.w3.org/2011/webrtc/editor/getusermedia.html
|
||||
// version: W3C Editor's Draft 29 June 2015
|
||||
|
||||
interface ConstrainBooleanParameters {
|
||||
exact?: boolean;
|
||||
ideal?: boolean;
|
||||
}
|
||||
|
||||
interface NumberRange {
|
||||
max?: number;
|
||||
min?: number;
|
||||
}
|
||||
|
||||
interface ConstrainNumberRange extends NumberRange {
|
||||
exact?: number;
|
||||
ideal?: number;
|
||||
}
|
||||
|
||||
interface ConstrainStringParameters {
|
||||
exact?: string | string[];
|
||||
ideal?: string | string[];
|
||||
}
|
||||
|
||||
interface MediaStreamConstraints {
|
||||
video?: boolean | MediaTrackConstraints;
|
||||
audio?: boolean | MediaTrackConstraints;
|
||||
}
|
||||
|
||||
declare namespace W3C {
|
||||
type LongRange = NumberRange;
|
||||
type DoubleRange = NumberRange;
|
||||
type ConstrainBoolean = boolean | ConstrainBooleanParameters;
|
||||
type ConstrainNumber = number | ConstrainNumberRange;
|
||||
type ConstrainLong = ConstrainNumber;
|
||||
type ConstrainDouble = ConstrainNumber;
|
||||
type ConstrainString = string | string[] | ConstrainStringParameters;
|
||||
}
|
||||
|
||||
interface MediaTrackConstraints extends MediaTrackConstraintSet {
|
||||
advanced?: MediaTrackConstraintSet[];
|
||||
}
|
||||
|
||||
interface MediaTrackConstraintSet {
|
||||
width?: W3C.ConstrainLong;
|
||||
height?: W3C.ConstrainLong;
|
||||
aspectRatio?: W3C.ConstrainDouble;
|
||||
frameRate?: W3C.ConstrainDouble;
|
||||
facingMode?: W3C.ConstrainString;
|
||||
volume?: W3C.ConstrainDouble;
|
||||
sampleRate?: W3C.ConstrainLong;
|
||||
sampleSize?: W3C.ConstrainLong;
|
||||
echoCancellation?: W3C.ConstrainBoolean;
|
||||
latency?: W3C.ConstrainDouble;
|
||||
deviceId?: W3C.ConstrainString;
|
||||
groupId?: W3C.ConstrainString;
|
||||
}
|
||||
|
||||
interface MediaTrackSupportedConstraints {
|
||||
width?: boolean;
|
||||
height?: boolean;
|
||||
aspectRatio?: boolean;
|
||||
frameRate?: boolean;
|
||||
facingMode?: boolean;
|
||||
volume?: boolean;
|
||||
sampleRate?: boolean;
|
||||
sampleSize?: boolean;
|
||||
echoCancellation?: boolean;
|
||||
latency?: boolean;
|
||||
deviceId?: boolean;
|
||||
groupId?: boolean;
|
||||
}
|
||||
|
||||
interface MediaStream extends EventTarget {
|
||||
//id: string;
|
||||
//active: boolean;
|
||||
|
||||
//onactive: EventListener;
|
||||
//oninactive: EventListener;
|
||||
//onaddtrack: (event: MediaStreamTrackEvent) => any;
|
||||
//onremovetrack: (event: MediaStreamTrackEvent) => any;
|
||||
|
||||
clone(): MediaStream;
|
||||
stop(): void;
|
||||
|
||||
getAudioTracks(): MediaStreamTrack[];
|
||||
getVideoTracks(): MediaStreamTrack[];
|
||||
getTracks(): MediaStreamTrack[];
|
||||
|
||||
getTrackById(trackId: string): MediaStreamTrack;
|
||||
|
||||
addTrack(track: MediaStreamTrack): void;
|
||||
removeTrack(track: MediaStreamTrack): void;
|
||||
}
|
||||
|
||||
interface MediaStreamTrackEvent extends Event {
|
||||
//track: MediaStreamTrack;
|
||||
}
|
||||
|
||||
interface MediaStreamTrack extends EventTarget {
|
||||
//id: string;
|
||||
//kind: string;
|
||||
//label: string;
|
||||
enabled: boolean;
|
||||
//muted: boolean;
|
||||
//remote: boolean;
|
||||
//readyState: MediaStreamTrackState;
|
||||
|
||||
//onmute: EventListener;
|
||||
//onunmute: EventListener;
|
||||
//onended: EventListener;
|
||||
//onoverconstrained: EventListener;
|
||||
|
||||
clone(): MediaStreamTrack;
|
||||
|
||||
stop(): void;
|
||||
|
||||
getCapabilities(): MediaTrackCapabilities;
|
||||
getConstraints(): MediaTrackConstraints;
|
||||
getSettings(): MediaTrackSettings;
|
||||
applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
||||
}
|
||||
|
||||
interface MediaTrackCapabilities {
|
||||
//width: number | W3C.LongRange;
|
||||
//height: number | W3C.LongRange;
|
||||
//aspectRatio: number | W3C.DoubleRange;
|
||||
//frameRate: number | W3C.DoubleRange;
|
||||
//facingMode: string;
|
||||
//volume: number | W3C.DoubleRange;
|
||||
//sampleRate: number | W3C.LongRange;
|
||||
//sampleSize: number | W3C.LongRange;
|
||||
//echoCancellation: boolean[];
|
||||
latency: number | W3C.DoubleRange;
|
||||
//deviceId: string;
|
||||
//groupId: string;
|
||||
}
|
||||
|
||||
interface MediaTrackSettings {
|
||||
//width: number;
|
||||
//height: number;
|
||||
//aspectRatio: number;
|
||||
//frameRate: number;
|
||||
//facingMode: string;
|
||||
//volume: number;
|
||||
//sampleRate: number;
|
||||
//sampleSize: number;
|
||||
//echoCancellation: boolean;
|
||||
latency: number;
|
||||
//deviceId: string;
|
||||
//groupId: string;
|
||||
}
|
||||
|
||||
interface MediaStreamError {
|
||||
//name: string;
|
||||
//message: string;
|
||||
//constraintName: string;
|
||||
}
|
||||
|
||||
interface NavigatorGetUserMedia {
|
||||
(constraints: MediaStreamConstraints,
|
||||
successCallback: (stream: MediaStream) => void,
|
||||
errorCallback: (error: MediaStreamError) => void): void;
|
||||
}
|
||||
|
||||
// to use with adapter.js, see: https://github.com/webrtc/adapter
|
||||
declare var getUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
interface Navigator {
|
||||
getUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
webkitGetUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
mozGetUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
msGetUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
mediaDevices: MediaDevices;
|
||||
}
|
||||
|
||||
interface MediaDevices {
|
||||
getSupportedConstraints(): MediaTrackSupportedConstraints;
|
||||
|
||||
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
||||
enumerateDevices(): Promise<MediaDeviceInfo[]>;
|
||||
}
|
||||
|
||||
interface MediaDeviceInfo {
|
||||
//label: string;
|
||||
//deviceId: string;
|
||||
//kind: string;
|
||||
//groupId: string;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/webrtc`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for webrtc (https://webrtc.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webrtc
|
||||
|
||||
Additional Details
|
||||
* Last updated: Fri, 16 Feb 2018 00:16:49 GMT
|
||||
* Dependencies: none
|
||||
* Global values: getUserMedia
|
||||
|
||||
# Credits
|
||||
These definitions were written by Toshiya Nakakura <https://github.com/nakakura>.
|
|
@ -1,373 +0,0 @@
|
|||
// Type definitions for WebRTC 2016-09-13
|
||||
// Project: https://www.w3.org/TR/webrtc/
|
||||
// Definitions by: Danilo Bargen <https://github.com/dbrgn/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
//
|
||||
// W3 Spec: https://www.w3.org/TR/webrtc/
|
||||
//
|
||||
// Note: Commented out definitions clash with definitions in lib.es6.d.ts. I
|
||||
// still kept them in here though, as sometimes they're more specific than the
|
||||
// ES6 library ones.
|
||||
|
||||
/// <reference path='MediaStream.d.ts' />
|
||||
|
||||
type EventHandler = (event: Event) => void;
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcofferansweroptions
|
||||
interface RTCOfferAnswerOptions {
|
||||
voiceActivityDetection?: boolean; // default = true
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcofferoptions
|
||||
interface RTCOfferOptions extends RTCOfferAnswerOptions {
|
||||
iceRestart?: boolean; // default = false
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcansweroptions
|
||||
interface RTCAnswerOptions extends RTCOfferAnswerOptions {
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnectionstate
|
||||
type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcicecredentialtype
|
||||
type RTCIceCredentialType = 'password' | 'token';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtciceserver
|
||||
interface RTCIceServer {
|
||||
//urls: string | string[];
|
||||
credentialType?: RTCIceCredentialType; // default = 'password'
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpmuxpolicy
|
||||
type RTCRtcpMuxPolicy = 'negotiate' | 'require';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtciceparameters
|
||||
interface RTCIceParameters {
|
||||
//usernameFragment: string;
|
||||
//password: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcicetransport
|
||||
interface RTCIceTransport {
|
||||
//readonly role: RTCIceRole;
|
||||
//readonly component: RTCIceComponent;
|
||||
//readonly state: RTCIceTransportState;
|
||||
readonly gatheringState: RTCIceGatheringState;
|
||||
getLocalCandidates(): RTCIceCandidate[];
|
||||
getRemoteCandidates(): RTCIceCandidate[];
|
||||
getSelectedCandidatePair(): RTCIceCandidatePair | null;
|
||||
getLocalParameters(): RTCIceParameters | null;
|
||||
getRemoteParameters(): RTCIceParameters | null;
|
||||
onstatechange: EventHandler;
|
||||
ongatheringstatechange: EventHandler;
|
||||
onselectedcandidatepairchange: EventHandler;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcdtlstransport
|
||||
interface RTCDtlsTransport {
|
||||
readonly transport: RTCIceTransport;
|
||||
//readonly state: RTCDtlsTransportState;
|
||||
getRemoteCertificates(): ArrayBuffer[];
|
||||
onstatechange: EventHandler;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodeccapability
|
||||
interface RTCRtpCodecCapability {
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpheaderextensioncapability
|
||||
interface RTCRtpHeaderExtensionCapability {
|
||||
uri: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities
|
||||
interface RTCRtpCapabilities {
|
||||
//codecs: RTCRtpCodecCapability[];
|
||||
//headerExtensions: RTCRtpHeaderExtensionCapability[];
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtprtxparameters
|
||||
interface RTCRtpRtxParameters {
|
||||
//ssrc: number;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpfecparameters
|
||||
interface RTCRtpFecParameters {
|
||||
//ssrc: number;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcdtxstatus
|
||||
type RTCDtxStatus = 'disabled' | 'enabled';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcprioritytype
|
||||
type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpencodingparameters
|
||||
interface RTCRtpEncodingParameters {
|
||||
//ssrc: number;
|
||||
//rtx: RTCRtpRtxParameters;
|
||||
//fec: RTCRtpFecParameters;
|
||||
dtx: RTCDtxStatus;
|
||||
//active: boolean;
|
||||
//priority: RTCPriorityType;
|
||||
//maxBitrate: number;
|
||||
rid: string;
|
||||
scaleResolutionDownBy?: number; // default = 1
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpheaderextensionparameters
|
||||
interface RTCRtpHeaderExtensionParameters {
|
||||
//uri: string;
|
||||
//id: number;
|
||||
encrypted: boolean;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpparameters
|
||||
interface RTCRtcpParameters {
|
||||
//cname: string;
|
||||
//reducedSize: boolean;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodecparameters
|
||||
interface RTCRtpCodecParameters {
|
||||
//payloadType: number;
|
||||
mimeType: string;
|
||||
//clockRate: number;
|
||||
channels?: number; // default = 1
|
||||
sdpFmtpLine: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpparameters
|
||||
interface RTCRtpParameters {
|
||||
transactionId: string;
|
||||
//encodings: RTCRtpEncodingParameters[];
|
||||
//headerExtensions: RTCRtpHeaderExtensionParameters[];
|
||||
//rtcp: RTCRtcpParameters;
|
||||
//codecs: RTCRtpCodecParameters[];
|
||||
degradationPreference?: RTCDegradationPreference; // default = 'balanced'
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#dom-rtcrtpcontributingsource
|
||||
interface RTCRtpContributingSource {
|
||||
//readonly timestamp: number;
|
||||
readonly source: number;
|
||||
//readonly audioLevel: number | null;
|
||||
readonly voiceActivityFlag: boolean | null;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities
|
||||
interface RTCRtcCapabilities {
|
||||
codecs: RTCRtpCodecCapability[];
|
||||
headerExtensions: RTCRtpHeaderExtensionCapability[];
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#dom-rtcrtpsender
|
||||
interface RTCRtpSender {
|
||||
//readonly track?: MediaStreamTrack;
|
||||
//readonly transport?: RTCDtlsTransport;
|
||||
//readonly rtcpTransport?: RTCDtlsTransport;
|
||||
setParameters(parameters?: RTCRtpParameters): Promise<void>;
|
||||
getParameters(): RTCRtpParameters;
|
||||
replaceTrack(withTrack: MediaStreamTrack): Promise<void>;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtpreceiver
|
||||
interface RTCRtpReceiver {
|
||||
//readonly track?: MediaStreamTrack;
|
||||
//readonly transport?: RTCDtlsTransport;
|
||||
//readonly rtcpTransport?: RTCDtlsTransport;
|
||||
getParameters(): RTCRtpParameters;
|
||||
getContributingSources(): RTCRtpContributingSource[];
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverdirection
|
||||
type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiver
|
||||
interface RTCRtpTransceiver {
|
||||
readonly mid: string | null;
|
||||
readonly sender: RTCRtpSender;
|
||||
readonly receiver: RTCRtpReceiver;
|
||||
readonly stopped: boolean;
|
||||
readonly direction: RTCRtpTransceiverDirection;
|
||||
setDirection(direction: RTCRtpTransceiverDirection): void;
|
||||
stop(): void;
|
||||
setCodecPreferences(codecs: RTCRtpCodecCapability[]): void;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverinit
|
||||
interface RTCRtpTransceiverInit {
|
||||
direction?: RTCRtpTransceiverDirection; // default = 'sendrecv'
|
||||
streams: MediaStream[];
|
||||
sendEncodings: RTCRtpEncodingParameters[];
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#dom-rtccertificate
|
||||
interface RTCCertificate {
|
||||
readonly expires: number;
|
||||
getAlgorithm(): string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcconfiguration
|
||||
interface RTCConfiguration {
|
||||
iceServers?: RTCIceServer[];
|
||||
iceTransportPolicy?: RTCIceTransportPolicy; // default = 'all'
|
||||
bundlePolicy?: RTCBundlePolicy; // default = 'balanced'
|
||||
rtcpMuxPolicy?: RTCRtcpMuxPolicy; // default = 'require'
|
||||
peerIdentity?: string; // default = null
|
||||
certificates?: RTCCertificate[];
|
||||
iceCandidatePoolSize?: number; // default = 0
|
||||
}
|
||||
|
||||
// Compatibility for older definitions on DefinitelyTyped.
|
||||
type RTCPeerConnectionConfig = RTCConfiguration;
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcsctptransport
|
||||
interface RTCSctpTransport {
|
||||
readonly transport: RTCDtlsTransport;
|
||||
readonly maxMessageSize: number;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelinit
|
||||
interface RTCDataChannelInit {
|
||||
ordered?: boolean; // default = true
|
||||
maxPacketLifeTime?: number;
|
||||
maxRetransmits?: number;
|
||||
protocol?: string; // default = ''
|
||||
negotiated?: boolean; // default = false
|
||||
id?: number;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate
|
||||
type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed';
|
||||
|
||||
// https://www.w3.org/TR/websockets/#dom-websocket-binarytype
|
||||
type RTCBinaryType = 'blob' | 'arraybuffer';
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannel
|
||||
interface RTCDataChannel extends EventTarget {
|
||||
readonly label: string;
|
||||
readonly ordered: boolean;
|
||||
readonly maxPacketLifeTime: number | null;
|
||||
readonly maxRetransmits: number | null;
|
||||
readonly protocol: string;
|
||||
readonly negotiated: boolean;
|
||||
readonly id: number;
|
||||
readonly readyState: RTCDataChannelState;
|
||||
readonly bufferedAmount: number;
|
||||
bufferedAmountLowThreshold: number;
|
||||
binaryType: RTCBinaryType;
|
||||
|
||||
close(): void;
|
||||
send(data: string | Blob | ArrayBuffer | ArrayBufferView): void;
|
||||
|
||||
onopen: EventHandler;
|
||||
onmessage: (event: MessageEvent) => void;
|
||||
onbufferedamountlow: EventHandler;
|
||||
onerror: (event: ErrorEvent) => void;
|
||||
onclose: EventHandler;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#h-rtctrackevent
|
||||
interface RTCTrackEvent extends Event {
|
||||
readonly receiver: RTCRtpReceiver;
|
||||
readonly track: MediaStreamTrack;
|
||||
readonly streams: MediaStream[];
|
||||
readonly transceiver: RTCRtpTransceiver;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceevent
|
||||
interface RTCPeerConnectionIceEvent extends Event {
|
||||
readonly url: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceerrorevent
|
||||
interface RTCPeerConnectionIceErrorEvent extends Event {
|
||||
readonly hostCandidate: string;
|
||||
readonly url: string;
|
||||
readonly errorCode: number;
|
||||
readonly errorText: string;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#h-rtcdatachannelevent
|
||||
interface RTCDataChannelEvent {
|
||||
readonly channel: RTCDataChannel;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnection
|
||||
interface RTCPeerConnection extends EventTarget {
|
||||
createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
|
||||
createAnswer(options?: RTCAnswerOptions): Promise<RTCSessionDescriptionInit>;
|
||||
|
||||
setLocalDescription(description: RTCSessionDescriptionInit): Promise<void>;
|
||||
readonly localDescription: RTCSessionDescription | null;
|
||||
readonly currentLocalDescription: RTCSessionDescription | null;
|
||||
readonly pendingLocalDescription: RTCSessionDescription | null;
|
||||
|
||||
setRemoteDescription(description: RTCSessionDescriptionInit): Promise<void>;
|
||||
readonly remoteDescription: RTCSessionDescription | null;
|
||||
readonly currentRemoteDescription: RTCSessionDescription | null;
|
||||
readonly pendingRemoteDescription: RTCSessionDescription | null;
|
||||
|
||||
addIceCandidate(candidate?: RTCIceCandidateInit | RTCIceCandidate): Promise<void>;
|
||||
|
||||
readonly signalingState: RTCSignalingState;
|
||||
readonly connectionState: RTCPeerConnectionState;
|
||||
|
||||
getConfiguration(): RTCConfiguration;
|
||||
setConfiguration(configuration: RTCConfiguration): void;
|
||||
close(): void;
|
||||
|
||||
onicecandidateerror: (event: RTCPeerConnectionIceErrorEvent) => void;
|
||||
onconnectionstatechange: EventHandler;
|
||||
|
||||
// Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions
|
||||
getSenders(): RTCRtpSender[];
|
||||
getReceivers(): RTCRtpReceiver[];
|
||||
getTransceivers(): RTCRtpTransceiver[];
|
||||
addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender;
|
||||
removeTrack(sender: RTCRtpSender): void;
|
||||
addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
||||
ontrack: (event: RTCTrackEvent) => void;
|
||||
|
||||
// Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-1
|
||||
readonly sctp: RTCSctpTransport | null;
|
||||
createDataChannel(label: string | null, dataChannelDict?: RTCDataChannelInit): RTCDataChannel;
|
||||
ondatachannel: (event: RTCDataChannelEvent) => void;
|
||||
|
||||
// Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-2
|
||||
getStats(selector?: MediaStreamTrack | null): Promise<RTCStatsReport>;
|
||||
|
||||
// Extension: https://www.w3.org/TR/webrtc/#legacy-interface-extensions
|
||||
// Deprecated!
|
||||
createOffer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback: RTCPeerConnectionErrorCallback,
|
||||
options?: RTCOfferOptions): Promise<void>;
|
||||
setLocalDescription(description: RTCSessionDescriptionInit,
|
||||
successCallback: () => void,
|
||||
failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
createAnswer(successCallback: RTCSessionDescriptionCallback,
|
||||
failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
setRemoteDescription(description: RTCSessionDescriptionInit,
|
||||
successCallback: () => void,
|
||||
failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addIceCandidate(candidate: RTCIceCandidateInit | RTCIceCandidate,
|
||||
successCallback: () => void,
|
||||
failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
getStats(selector: MediaStreamTrack | null,
|
||||
successCallback: RTCStatsCallback,
|
||||
failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
}
|
||||
interface RTCPeerConnectionStatic {
|
||||
new(configuration?: RTCConfiguration): RTCPeerConnection;
|
||||
readonly defaultIceServers: RTCIceServer[];
|
||||
|
||||
// Extension: https://www.w3.org/TR/webrtc/#sec.cert-mgmt
|
||||
generateCertificate(keygenAlgorithm: string): Promise<RTCCertificate>;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
RTCPeerConnection: RTCPeerConnectionStatic;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
// Type definitions for webrtc
|
||||
// Project: https://webrtc.org/
|
||||
// Definitions by: Toshiya Nakakura <https://github.com/nakakura>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference path="RTCPeerConnection.d.ts" />
|
||||
/// <reference path="MediaStream.d.ts" />
|
|
@ -1,75 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/webrtc",
|
||||
"/home/wolverindev/TeamSpeak/web/client"
|
||||
]
|
||||
],
|
||||
"_from": "@types/webrtc@latest",
|
||||
"_hasShrinkwrap": false,
|
||||
"_id": "@types/webrtc@0.0.23",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/@types/webrtc",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/webrtc_0.0.23_1518740286313_0.596060483966657"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "ts-npm-types@microsoft.com",
|
||||
"name": "types"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "@types/webrtc",
|
||||
"raw": "@types/webrtc",
|
||||
"rawSpec": "",
|
||||
"scope": "@types",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.23.tgz",
|
||||
"_shasum": "bd5aea5aab67b7ba9f0ce659340793d5cead7596",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "@types/webrtc",
|
||||
"_where": "/home/wolverindev/TeamSpeak/web/client",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Toshiya Nakakura",
|
||||
"url": "https://github.com/nakakura"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "TypeScript definitions for webrtc",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"fileCount": 6,
|
||||
"integrity": "sha512-mq3RpNvVoR2r5ts7gGJh+uHv2wgLUdu1r+rwsZoR5tmb9pCtj8uMC1BWpYQF/SZBtPaj9RfnbIvudk+ajdXP4w==",
|
||||
"shasum": "bd5aea5aab67b7ba9f0ce659340793d5cead7596",
|
||||
"tarball": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.23.tgz",
|
||||
"unpackedSize": 21091
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "types",
|
||||
"email": "ts-npm-types@microsoft.com"
|
||||
}
|
||||
],
|
||||
"name": "@types/webrtc",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.3",
|
||||
"typesPublisherContentHash": "c61715dcf7bd84063d2404a618f9cc45e956f9022532f3843d2a6c81a7670676",
|
||||
"version": "0.0.23"
|
||||
}
|
Loading…
Reference in New Issue