implemented frontend including separate message system; started to implement backend
This commit is contained in:
21
yjs-poll/node_modules/isomorphic.js/LICENSE
generated
vendored
Normal file
21
yjs-poll/node_modules/isomorphic.js/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Kevin Jahns <kevin.jahns@protonmail.com>.
|
||||
|
||||
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.
|
||||
3
yjs-poll/node_modules/isomorphic.js/README.md
generated
vendored
Normal file
3
yjs-poll/node_modules/isomorphic.js/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Isomorphic.js
|
||||
|
||||
This module provides platform-specific features as a common API. This module is mainly about providing crypto features to node, browser, and non-supported platforms using a polyfill.
|
||||
28
yjs-poll/node_modules/isomorphic.js/browser.js
generated
vendored
Normal file
28
yjs-poll/node_modules/isomorphic.js/browser.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/* eslint-env browser */
|
||||
const perf = typeof performance === 'undefined' ? null : performance
|
||||
|
||||
const isoCrypto = typeof crypto === 'undefined' ? null : crypto
|
||||
|
||||
/**
|
||||
* @type {function(number):ArrayBuffer}
|
||||
*/
|
||||
const cryptoRandomBuffer = isoCrypto !== null
|
||||
? len => {
|
||||
// browser
|
||||
const buf = new ArrayBuffer(len)
|
||||
const arr = new Uint8Array(buf)
|
||||
isoCrypto.getRandomValues(arr)
|
||||
return buf
|
||||
}
|
||||
: len => {
|
||||
// polyfill
|
||||
const buf = new ArrayBuffer(len)
|
||||
const arr = new Uint8Array(buf)
|
||||
for (let i = 0; i < len; i++) {
|
||||
arr[i] = Math.ceil((Math.random() * 0xFFFFFFFF) >>> 0)
|
||||
}
|
||||
return buf
|
||||
}
|
||||
|
||||
exports.performance = perf
|
||||
exports.cryptoRandomBuffer = cryptoRandomBuffer
|
||||
25
yjs-poll/node_modules/isomorphic.js/browser.mjs
generated
vendored
Normal file
25
yjs-poll/node_modules/isomorphic.js/browser.mjs
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/* eslint-env browser */
|
||||
export const performance = typeof window === 'undefined' ? null : (typeof window.performance !== 'undefined' && window.performance) || null
|
||||
|
||||
const isoCrypto = typeof crypto === 'undefined' ? null : crypto
|
||||
|
||||
/**
|
||||
* @type {function(number):ArrayBuffer}
|
||||
*/
|
||||
export const cryptoRandomBuffer = isoCrypto !== null
|
||||
? len => {
|
||||
// browser
|
||||
const buf = new ArrayBuffer(len)
|
||||
const arr = new Uint8Array(buf)
|
||||
isoCrypto.getRandomValues(arr)
|
||||
return buf
|
||||
}
|
||||
: len => {
|
||||
// polyfill
|
||||
const buf = new ArrayBuffer(len)
|
||||
const arr = new Uint8Array(buf)
|
||||
for (let i = 0; i < len; i++) {
|
||||
arr[i] = Math.ceil((Math.random() * 0xFFFFFFFF) >>> 0)
|
||||
}
|
||||
return buf
|
||||
}
|
||||
18
yjs-poll/node_modules/isomorphic.js/iso.js
generated
vendored
Normal file
18
yjs-poll/node_modules/isomorphic.js/iso.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
const isNode = typeof process !== 'undefined' && process.release && /node|io\.js/.test(process.release.name)
|
||||
|
||||
const isoBrowser = require('./browser.js')
|
||||
|
||||
const perf = isNode ? require('perf_hooks').performance : isoBrowser.performance
|
||||
const nodeCrypto = isNode ? require('crypto') : null
|
||||
|
||||
/**
|
||||
* @type {function(number):ArrayBuffer}
|
||||
*/
|
||||
const cryptoRandomBuffer = nodeCrypto
|
||||
// node
|
||||
? len => nodeCrypto.randomBytes(len).buffer
|
||||
: isoBrowser.cryptoRandomBuffer
|
||||
|
||||
exports.performance = perf
|
||||
exports.cryptoRandomBuffer = cryptoRandomBuffer
|
||||
5
yjs-poll/node_modules/isomorphic.js/node.mjs
generated
vendored
Normal file
5
yjs-poll/node_modules/isomorphic.js/node.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import perfHooks from 'perf_hooks'
|
||||
import crypto from 'crypto'
|
||||
|
||||
export const performance = perfHooks.performance
|
||||
export const cryptoRandomBuffer = len => crypto.randomBytes(len).buffer
|
||||
66
yjs-poll/node_modules/isomorphic.js/package.json
generated
vendored
Normal file
66
yjs-poll/node_modules/isomorphic.js/package.json
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "isomorphic.js",
|
||||
"version": "0.2.5",
|
||||
"description": "Isomorphic JavaScript helper functions (performance, crpyto, ..)",
|
||||
"sideEffects": false,
|
||||
"main": "./iso.js",
|
||||
"browser": "./browser.mjs",
|
||||
"unpkg": "./browser.mjs",
|
||||
"module": "./browser.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": {
|
||||
"import": "./node.mjs",
|
||||
"require": "./iso.js"
|
||||
},
|
||||
"browser": {
|
||||
"import": "./browser.mjs",
|
||||
"require": "./browser.js"
|
||||
},
|
||||
"default": {
|
||||
"import": "./browser.mjs",
|
||||
"require": "./iso.js"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {},
|
||||
"funding": {
|
||||
"type": "GitHub Sponsors ❤",
|
||||
"url": "https://github.com/sponsors/dmonad"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^13.13.9",
|
||||
"standard": "^14.3.4",
|
||||
"typescript": "^3.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint",
|
||||
"lint": "standard && tsc",
|
||||
"preversion": "npm run test"
|
||||
},
|
||||
"files": [
|
||||
"browser.js",
|
||||
"browser.mjs",
|
||||
"iso.js",
|
||||
"node.js",
|
||||
"node.mjs"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dmonad/isomorphic.js.git"
|
||||
},
|
||||
"author": "Kevin Jahns <kevin.jahns@protonmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dmonad/isomorphic.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/dmonad/isomorphic.js#readme",
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"/dist",
|
||||
"/node_modules",
|
||||
"/docs"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user