@teammy/server 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +3379 -1395
- package/dist/web/assets/Assistant-DLyxXHVH.js +1 -0
- package/dist/web/assets/Computers-BNJeNZB6.css +1 -0
- package/dist/web/assets/Computers-Bnq9vurA.js +7 -0
- package/dist/web/assets/Conversation-BFT_YU_m.js +1 -0
- package/dist/web/assets/{Conversation-Dc460fhC.css → Conversation-BVNmvuHR.css} +1 -1
- package/dist/web/assets/{Dashboard-wDiUg0LB.css → Dashboard-ChX6TZDn.css} +1 -1
- package/dist/web/assets/Dashboard-zwfEddfm.js +1 -0
- package/dist/web/assets/Dropdown-BVXg1qjS.js +55 -0
- package/dist/web/assets/Files-DvZhUMI0.js +1 -0
- package/dist/web/assets/{Help-G99-LK4-.js → Help-D2wGnf7L.js} +187 -61
- package/dist/web/assets/HtmlPreview-C3railXk.js +1 -0
- package/dist/web/assets/{Markdown-BgEXVy4-.js → Markdown-DwIYP3W0.js} +4 -4
- package/dist/web/assets/MessageComposer-Ddu83TIm.js +1 -0
- package/dist/web/assets/MessageComposer-e3g3t5jX.css +1 -0
- package/dist/web/assets/ResourceLibrary-CwHQw2pF.js +6 -0
- package/dist/web/assets/TerminalPane-BrSy-0jI.css +1 -0
- package/dist/web/assets/TerminalPane-D6QTLh_P.js +22 -0
- package/dist/web/assets/WorkspaceTree-DPnUT5Zj.js +1 -0
- package/dist/web/assets/file-links-BcFN8P1K.js +1 -0
- package/dist/web/assets/index-4y82i1SF.css +1 -0
- package/dist/web/assets/index-DbOamGWI.js +10 -0
- package/dist/web/downloads/teammy-inbox-skill.zip +0 -0
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +3 -2
- package/node_modules/@fastify/websocket/.gitattributes +2 -0
- package/node_modules/@fastify/websocket/.github/dependabot.yml +53 -0
- package/node_modules/@fastify/websocket/.github/workflows/ci.yml +33 -0
- package/node_modules/@fastify/websocket/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/@fastify/websocket/.github/workflows/release.yml +24 -0
- package/node_modules/@fastify/websocket/LICENSE +21 -0
- package/node_modules/@fastify/websocket/README.md +393 -0
- package/node_modules/@fastify/websocket/eslint.config.js +6 -0
- package/node_modules/@fastify/websocket/index.js +276 -0
- package/node_modules/@fastify/websocket/package.json +79 -0
- package/node_modules/@fastify/websocket/test/base.test.js +785 -0
- package/node_modules/@fastify/websocket/test/hooks.test.js +414 -0
- package/node_modules/@fastify/websocket/test/inject.test.js +174 -0
- package/node_modules/@fastify/websocket/test/router.test.js +890 -0
- package/node_modules/@fastify/websocket/tsconfig.json +3 -0
- package/node_modules/@fastify/websocket/types/index.d.ts +128 -0
- package/node_modules/@fastify/websocket/types/index.tst.ts +261 -0
- package/node_modules/duplexify/.travis.yml +9 -0
- package/node_modules/duplexify/LICENSE +21 -0
- package/node_modules/duplexify/README.md +97 -0
- package/node_modules/duplexify/example.js +21 -0
- package/node_modules/duplexify/index.js +238 -0
- package/node_modules/duplexify/package.json +39 -0
- package/node_modules/duplexify/test.js +339 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/stream-shift/.github/workflows/test.yml +23 -0
- package/node_modules/stream-shift/LICENSE +21 -0
- package/node_modules/stream-shift/README.md +25 -0
- package/node_modules/stream-shift/index.js +21 -0
- package/node_modules/stream-shift/package.json +25 -0
- package/node_modules/stream-shift/test.js +48 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/package.json +15 -2
- package/dist/web/assets/Assistant-CkKCs2G4.js +0 -1
- package/dist/web/assets/Computers-B9wEqpMc.js +0 -4
- package/dist/web/assets/Computers-DBnXVk7q.css +0 -1
- package/dist/web/assets/Conversation-DK5-Q1RB.js +0 -1
- package/dist/web/assets/Dashboard-B2HGjI4a.js +0 -1
- package/dist/web/assets/Files-Du-7z96D.js +0 -1
- package/dist/web/assets/HtmlPreview-Bi3u6-l3.js +0 -1
- package/dist/web/assets/MessageComposer-6eJAo_e7.js +0 -1
- package/dist/web/assets/MessageComposer-CJGxkvML.css +0 -1
- package/dist/web/assets/PillControl-BRPhbHQm.js +0 -1
- package/dist/web/assets/PillControl-CqVA7kIQ.css +0 -1
- package/dist/web/assets/ResourceLibrary-DJ9cxDoc.js +0 -6
- package/dist/web/assets/WorkspaceTree-DUFGMLRi.js +0 -1
- package/dist/web/assets/file-links-Dl1S0Tt0.js +0 -1
- package/dist/web/assets/index-C4EXuXVY.css +0 -1
- package/dist/web/assets/index-xjf37um4.js +0 -66
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var once = require('once');
|
|
2
|
+
|
|
3
|
+
var noop = function() {};
|
|
4
|
+
|
|
5
|
+
var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
|
|
6
|
+
|
|
7
|
+
var isRequest = function(stream) {
|
|
8
|
+
return stream.setHeader && typeof stream.abort === 'function';
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var isChildProcess = function(stream) {
|
|
12
|
+
return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var eos = function(stream, opts, callback) {
|
|
16
|
+
if (typeof opts === 'function') return eos(stream, null, opts);
|
|
17
|
+
if (!opts) opts = {};
|
|
18
|
+
|
|
19
|
+
callback = once(callback || noop);
|
|
20
|
+
|
|
21
|
+
var ws = stream._writableState;
|
|
22
|
+
var rs = stream._readableState;
|
|
23
|
+
var readable = opts.readable || (opts.readable !== false && stream.readable);
|
|
24
|
+
var writable = opts.writable || (opts.writable !== false && stream.writable);
|
|
25
|
+
var cancelled = false;
|
|
26
|
+
|
|
27
|
+
var onlegacyfinish = function() {
|
|
28
|
+
if (!stream.writable) onfinish();
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var onfinish = function() {
|
|
32
|
+
writable = false;
|
|
33
|
+
if (!readable) callback.call(stream);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var onend = function() {
|
|
37
|
+
readable = false;
|
|
38
|
+
if (!writable) callback.call(stream);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var onexit = function(exitCode) {
|
|
42
|
+
callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var onerror = function(err) {
|
|
46
|
+
callback.call(stream, err);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var onclose = function() {
|
|
50
|
+
qnt(onclosenexttick);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var onclosenexttick = function() {
|
|
54
|
+
if (cancelled) return;
|
|
55
|
+
if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
|
|
56
|
+
if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var onrequest = function() {
|
|
60
|
+
stream.req.on('finish', onfinish);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if (isRequest(stream)) {
|
|
64
|
+
stream.on('complete', onfinish);
|
|
65
|
+
stream.on('abort', onclose);
|
|
66
|
+
if (stream.req) onrequest();
|
|
67
|
+
else stream.on('request', onrequest);
|
|
68
|
+
} else if (writable && !ws) { // legacy streams
|
|
69
|
+
stream.on('end', onlegacyfinish);
|
|
70
|
+
stream.on('close', onlegacyfinish);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (isChildProcess(stream)) stream.on('exit', onexit);
|
|
74
|
+
|
|
75
|
+
stream.on('end', onend);
|
|
76
|
+
stream.on('finish', onfinish);
|
|
77
|
+
if (opts.error !== false) stream.on('error', onerror);
|
|
78
|
+
stream.on('close', onclose);
|
|
79
|
+
|
|
80
|
+
return function() {
|
|
81
|
+
cancelled = true;
|
|
82
|
+
stream.removeListener('complete', onfinish);
|
|
83
|
+
stream.removeListener('abort', onclose);
|
|
84
|
+
stream.removeListener('request', onrequest);
|
|
85
|
+
if (stream.req) stream.req.removeListener('finish', onfinish);
|
|
86
|
+
stream.removeListener('end', onlegacyfinish);
|
|
87
|
+
stream.removeListener('close', onlegacyfinish);
|
|
88
|
+
stream.removeListener('finish', onfinish);
|
|
89
|
+
stream.removeListener('exit', onexit);
|
|
90
|
+
stream.removeListener('end', onend);
|
|
91
|
+
stream.removeListener('error', onerror);
|
|
92
|
+
stream.removeListener('close', onclose);
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
module.exports = eos;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "end-of-stream",
|
|
3
|
+
"version": "1.4.5",
|
|
4
|
+
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/mafintosh/end-of-stream.git"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"once": "^1.4.0"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "node test.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"index.js"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"stream",
|
|
20
|
+
"streams",
|
|
21
|
+
"callback",
|
|
22
|
+
"finish",
|
|
23
|
+
"close",
|
|
24
|
+
"end",
|
|
25
|
+
"wait"
|
|
26
|
+
],
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/mafintosh/end-of-stream/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/mafintosh/end-of-stream",
|
|
31
|
+
"main": "index.js",
|
|
32
|
+
"author": "Mathias Buus <mathiasbuus@gmail.com>",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"tape": "^4.11.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# once
|
|
2
|
+
|
|
3
|
+
Only call a function once.
|
|
4
|
+
|
|
5
|
+
## usage
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
var once = require('once')
|
|
9
|
+
|
|
10
|
+
function load (file, cb) {
|
|
11
|
+
cb = once(cb)
|
|
12
|
+
loader.load('file')
|
|
13
|
+
loader.once('load', cb)
|
|
14
|
+
loader.once('error', cb)
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or add to the Function.prototype in a responsible way:
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
// only has to be done once
|
|
22
|
+
require('once').proto()
|
|
23
|
+
|
|
24
|
+
function load (file, cb) {
|
|
25
|
+
cb = cb.once()
|
|
26
|
+
loader.load('file')
|
|
27
|
+
loader.once('load', cb)
|
|
28
|
+
loader.once('error', cb)
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Ironically, the prototype feature makes this module twice as
|
|
33
|
+
complicated as necessary.
|
|
34
|
+
|
|
35
|
+
To check whether you function has been called, use `fn.called`. Once the
|
|
36
|
+
function is called for the first time the return value of the original
|
|
37
|
+
function is saved in `fn.value` and subsequent calls will continue to
|
|
38
|
+
return this value.
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
var once = require('once')
|
|
42
|
+
|
|
43
|
+
function load (cb) {
|
|
44
|
+
cb = once(cb)
|
|
45
|
+
var stream = createStream()
|
|
46
|
+
stream.once('data', cb)
|
|
47
|
+
stream.once('end', function () {
|
|
48
|
+
if (!cb.called) cb(new Error('not found'))
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## `once.strict(func)`
|
|
54
|
+
|
|
55
|
+
Throw an error if the function is called twice.
|
|
56
|
+
|
|
57
|
+
Some functions are expected to be called only once. Using `once` for them would
|
|
58
|
+
potentially hide logical errors.
|
|
59
|
+
|
|
60
|
+
In the example below, the `greet` function has to call the callback only once:
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
function greet (name, cb) {
|
|
64
|
+
// return is missing from the if statement
|
|
65
|
+
// when no name is passed, the callback is called twice
|
|
66
|
+
if (!name) cb('Hello anonymous')
|
|
67
|
+
cb('Hello ' + name)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function log (msg) {
|
|
71
|
+
console.log(msg)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// this will print 'Hello anonymous' but the logical error will be missed
|
|
75
|
+
greet(null, once(msg))
|
|
76
|
+
|
|
77
|
+
// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
|
|
78
|
+
greet(null, once.strict(msg))
|
|
79
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var wrappy = require('wrappy')
|
|
2
|
+
module.exports = wrappy(once)
|
|
3
|
+
module.exports.strict = wrappy(onceStrict)
|
|
4
|
+
|
|
5
|
+
once.proto = once(function () {
|
|
6
|
+
Object.defineProperty(Function.prototype, 'once', {
|
|
7
|
+
value: function () {
|
|
8
|
+
return once(this)
|
|
9
|
+
},
|
|
10
|
+
configurable: true
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(Function.prototype, 'onceStrict', {
|
|
14
|
+
value: function () {
|
|
15
|
+
return onceStrict(this)
|
|
16
|
+
},
|
|
17
|
+
configurable: true
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
function once (fn) {
|
|
22
|
+
var f = function () {
|
|
23
|
+
if (f.called) return f.value
|
|
24
|
+
f.called = true
|
|
25
|
+
return f.value = fn.apply(this, arguments)
|
|
26
|
+
}
|
|
27
|
+
f.called = false
|
|
28
|
+
return f
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function onceStrict (fn) {
|
|
32
|
+
var f = function () {
|
|
33
|
+
if (f.called)
|
|
34
|
+
throw new Error(f.onceError)
|
|
35
|
+
f.called = true
|
|
36
|
+
return f.value = fn.apply(this, arguments)
|
|
37
|
+
}
|
|
38
|
+
var name = fn.name || 'Function wrapped with `once`'
|
|
39
|
+
f.onceError = name + " shouldn't be called more than once"
|
|
40
|
+
f.called = false
|
|
41
|
+
return f
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "once",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Run a function exactly one time",
|
|
5
|
+
"main": "once.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"test": "test"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"wrappy": "1"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"tap": "^7.0.1"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "tap test/*.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"once.js"
|
|
20
|
+
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git://github.com/isaacs/once"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"once",
|
|
27
|
+
"function",
|
|
28
|
+
"one",
|
|
29
|
+
"single"
|
|
30
|
+
],
|
|
31
|
+
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
|
32
|
+
"license": "ISC"
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Developer's Certificate of Origin 1.1
|
|
2
|
+
|
|
3
|
+
By making a contribution to this project, I certify that:
|
|
4
|
+
|
|
5
|
+
* (a) The contribution was created in whole or in part by me and I
|
|
6
|
+
have the right to submit it under the open source license
|
|
7
|
+
indicated in the file; or
|
|
8
|
+
|
|
9
|
+
* (b) The contribution is based upon previous work that, to the best
|
|
10
|
+
of my knowledge, is covered under an appropriate open source
|
|
11
|
+
license and I have the right under that license to submit that
|
|
12
|
+
work with modifications, whether created in whole or in part
|
|
13
|
+
by me, under the same open source license (unless I am
|
|
14
|
+
permitted to submit under a different license), as indicated
|
|
15
|
+
in the file; or
|
|
16
|
+
|
|
17
|
+
* (c) The contribution was provided directly to me by some other
|
|
18
|
+
person who certified (a), (b) or (c) and I have not modified
|
|
19
|
+
it.
|
|
20
|
+
|
|
21
|
+
* (d) I understand and agree that this project and the contribution
|
|
22
|
+
are public and that a record of the contribution (including all
|
|
23
|
+
personal information I submit with it, including my sign-off) is
|
|
24
|
+
maintained indefinitely and may be redistributed consistent with
|
|
25
|
+
this project or the open source license(s) involved.
|
|
26
|
+
|
|
27
|
+
## Moderation Policy
|
|
28
|
+
|
|
29
|
+
The [Node.js Moderation Policy] applies to this WG.
|
|
30
|
+
|
|
31
|
+
## Code of Conduct
|
|
32
|
+
|
|
33
|
+
The [Node.js Code of Conduct][] applies to this WG.
|
|
34
|
+
|
|
35
|
+
[Node.js Code of Conduct]:
|
|
36
|
+
https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
|
|
37
|
+
[Node.js Moderation Policy]:
|
|
38
|
+
https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
### Streams Working Group
|
|
2
|
+
|
|
3
|
+
The Node.js Streams is jointly governed by a Working Group
|
|
4
|
+
(WG)
|
|
5
|
+
that is responsible for high-level guidance of the project.
|
|
6
|
+
|
|
7
|
+
The WG has final authority over this project including:
|
|
8
|
+
|
|
9
|
+
* Technical direction
|
|
10
|
+
* Project governance and process (including this policy)
|
|
11
|
+
* Contribution policy
|
|
12
|
+
* GitHub repository hosting
|
|
13
|
+
* Conduct guidelines
|
|
14
|
+
* Maintaining the list of additional Collaborators
|
|
15
|
+
|
|
16
|
+
For the current list of WG members, see the project
|
|
17
|
+
[README.md](./README.md#current-project-team-members).
|
|
18
|
+
|
|
19
|
+
### Collaborators
|
|
20
|
+
|
|
21
|
+
The readable-stream GitHub repository is
|
|
22
|
+
maintained by the WG and additional Collaborators who are added by the
|
|
23
|
+
WG on an ongoing basis.
|
|
24
|
+
|
|
25
|
+
Individuals making significant and valuable contributions are made
|
|
26
|
+
Collaborators and given commit-access to the project. These
|
|
27
|
+
individuals are identified by the WG and their addition as
|
|
28
|
+
Collaborators is discussed during the WG meeting.
|
|
29
|
+
|
|
30
|
+
_Note:_ If you make a significant contribution and are not considered
|
|
31
|
+
for commit-access log an issue or contact a WG member directly and it
|
|
32
|
+
will be brought up in the next WG meeting.
|
|
33
|
+
|
|
34
|
+
Modifications of the contents of the readable-stream repository are
|
|
35
|
+
made on
|
|
36
|
+
a collaborative basis. Anybody with a GitHub account may propose a
|
|
37
|
+
modification via pull request and it will be considered by the project
|
|
38
|
+
Collaborators. All pull requests must be reviewed and accepted by a
|
|
39
|
+
Collaborator with sufficient expertise who is able to take full
|
|
40
|
+
responsibility for the change. In the case of pull requests proposed
|
|
41
|
+
by an existing Collaborator, an additional Collaborator is required
|
|
42
|
+
for sign-off. Consensus should be sought if additional Collaborators
|
|
43
|
+
participate and there is disagreement around a particular
|
|
44
|
+
modification. See _Consensus Seeking Process_ below for further detail
|
|
45
|
+
on the consensus model used for governance.
|
|
46
|
+
|
|
47
|
+
Collaborators may opt to elevate significant or controversial
|
|
48
|
+
modifications, or modifications that have not found consensus to the
|
|
49
|
+
WG for discussion by assigning the ***WG-agenda*** tag to a pull
|
|
50
|
+
request or issue. The WG should serve as the final arbiter where
|
|
51
|
+
required.
|
|
52
|
+
|
|
53
|
+
For the current list of Collaborators, see the project
|
|
54
|
+
[README.md](./README.md#members).
|
|
55
|
+
|
|
56
|
+
### WG Membership
|
|
57
|
+
|
|
58
|
+
WG seats are not time-limited. There is no fixed size of the WG.
|
|
59
|
+
However, the expected target is between 6 and 12, to ensure adequate
|
|
60
|
+
coverage of important areas of expertise, balanced with the ability to
|
|
61
|
+
make decisions efficiently.
|
|
62
|
+
|
|
63
|
+
There is no specific set of requirements or qualifications for WG
|
|
64
|
+
membership beyond these rules.
|
|
65
|
+
|
|
66
|
+
The WG may add additional members to the WG by unanimous consensus.
|
|
67
|
+
|
|
68
|
+
A WG member may be removed from the WG by voluntary resignation, or by
|
|
69
|
+
unanimous consensus of all other WG members.
|
|
70
|
+
|
|
71
|
+
Changes to WG membership should be posted in the agenda, and may be
|
|
72
|
+
suggested as any other agenda item (see "WG Meetings" below).
|
|
73
|
+
|
|
74
|
+
If an addition or removal is proposed during a meeting, and the full
|
|
75
|
+
WG is not in attendance to participate, then the addition or removal
|
|
76
|
+
is added to the agenda for the subsequent meeting. This is to ensure
|
|
77
|
+
that all members are given the opportunity to participate in all
|
|
78
|
+
membership decisions. If a WG member is unable to attend a meeting
|
|
79
|
+
where a planned membership decision is being made, then their consent
|
|
80
|
+
is assumed.
|
|
81
|
+
|
|
82
|
+
No more than 1/3 of the WG members may be affiliated with the same
|
|
83
|
+
employer. If removal or resignation of a WG member, or a change of
|
|
84
|
+
employment by a WG member, creates a situation where more than 1/3 of
|
|
85
|
+
the WG membership shares an employer, then the situation must be
|
|
86
|
+
immediately remedied by the resignation or removal of one or more WG
|
|
87
|
+
members affiliated with the over-represented employer(s).
|
|
88
|
+
|
|
89
|
+
### WG Meetings
|
|
90
|
+
|
|
91
|
+
The WG meets occasionally on a Google Hangout On Air. A designated moderator
|
|
92
|
+
approved by the WG runs the meeting. Each meeting should be
|
|
93
|
+
published to YouTube.
|
|
94
|
+
|
|
95
|
+
Items are added to the WG agenda that are considered contentious or
|
|
96
|
+
are modifications of governance, contribution policy, WG membership,
|
|
97
|
+
or release process.
|
|
98
|
+
|
|
99
|
+
The intention of the agenda is not to approve or review all patches;
|
|
100
|
+
that should happen continuously on GitHub and be handled by the larger
|
|
101
|
+
group of Collaborators.
|
|
102
|
+
|
|
103
|
+
Any community member or contributor can ask that something be added to
|
|
104
|
+
the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
|
|
105
|
+
WG member or the moderator can add the item to the agenda by adding
|
|
106
|
+
the ***WG-agenda*** tag to the issue.
|
|
107
|
+
|
|
108
|
+
Prior to each WG meeting the moderator will share the Agenda with
|
|
109
|
+
members of the WG. WG members can add any items they like to the
|
|
110
|
+
agenda at the beginning of each meeting. The moderator and the WG
|
|
111
|
+
cannot veto or remove items.
|
|
112
|
+
|
|
113
|
+
The WG may invite persons or representatives from certain projects to
|
|
114
|
+
participate in a non-voting capacity.
|
|
115
|
+
|
|
116
|
+
The moderator is responsible for summarizing the discussion of each
|
|
117
|
+
agenda item and sends it as a pull request after the meeting.
|
|
118
|
+
|
|
119
|
+
### Consensus Seeking Process
|
|
120
|
+
|
|
121
|
+
The WG follows a
|
|
122
|
+
[Consensus
|
|
123
|
+
Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
|
|
124
|
+
decision-making model.
|
|
125
|
+
|
|
126
|
+
When an agenda item has appeared to reach a consensus the moderator
|
|
127
|
+
will ask "Does anyone object?" as a final call for dissent from the
|
|
128
|
+
consensus.
|
|
129
|
+
|
|
130
|
+
If an agenda item cannot reach a consensus a WG member can call for
|
|
131
|
+
either a closing vote or a vote to table the issue to the next
|
|
132
|
+
meeting. The call for a vote must be seconded by a majority of the WG
|
|
133
|
+
or else the discussion will continue. Simple majority wins.
|
|
134
|
+
|
|
135
|
+
Note that changes to WG membership require a majority consensus. See
|
|
136
|
+
"WG Membership" above.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Node.js is licensed for use as follows:
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Copyright Node.js contributors. All rights reserved.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to
|
|
8
|
+
deal in the Software without restriction, including without limitation the
|
|
9
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
10
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
22
|
+
IN THE SOFTWARE.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
This license applies to parts of Node.js originating from the
|
|
26
|
+
https://github.com/joyent/node repository:
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
30
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31
|
+
of this software and associated documentation files (the "Software"), to
|
|
32
|
+
deal in the Software without restriction, including without limitation the
|
|
33
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
34
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
35
|
+
furnished to do so, subject to the following conditions:
|
|
36
|
+
|
|
37
|
+
The above copyright notice and this permission notice shall be included in
|
|
38
|
+
all copies or substantial portions of the Software.
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
41
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
42
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
43
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
44
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
45
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
46
|
+
IN THE SOFTWARE.
|
|
47
|
+
"""
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# readable-stream
|
|
2
|
+
|
|
3
|
+
***Node.js core streams for userland*** [](https://travis-ci.com/nodejs/readable-stream)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[](https://nodei.co/npm/readable-stream/)
|
|
7
|
+
[](https://nodei.co/npm/readable-stream/)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[](https://saucelabs.com/u/readabe-stream)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install --save readable-stream
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This package is a mirror of the streams implementations in Node.js.
|
|
17
|
+
|
|
18
|
+
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.18.1/docs/api/stream.html).
|
|
19
|
+
|
|
20
|
+
If you want to guarantee a stable streams base, regardless of what version of
|
|
21
|
+
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
|
|
22
|
+
|
|
23
|
+
As of version 2.0.0 **readable-stream** uses semantic versioning.
|
|
24
|
+
|
|
25
|
+
## Version 3.x.x
|
|
26
|
+
|
|
27
|
+
v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
|
|
28
|
+
|
|
29
|
+
1. Error codes: https://github.com/nodejs/node/pull/13310,
|
|
30
|
+
https://github.com/nodejs/node/pull/13291,
|
|
31
|
+
https://github.com/nodejs/node/pull/16589,
|
|
32
|
+
https://github.com/nodejs/node/pull/15042,
|
|
33
|
+
https://github.com/nodejs/node/pull/15665,
|
|
34
|
+
https://github.com/nodejs/readable-stream/pull/344
|
|
35
|
+
2. 'readable' have precedence over flowing
|
|
36
|
+
https://github.com/nodejs/node/pull/18994
|
|
37
|
+
3. make virtual methods errors consistent
|
|
38
|
+
https://github.com/nodejs/node/pull/18813
|
|
39
|
+
4. updated streams error handling
|
|
40
|
+
https://github.com/nodejs/node/pull/18438
|
|
41
|
+
5. writable.end should return this.
|
|
42
|
+
https://github.com/nodejs/node/pull/18780
|
|
43
|
+
6. readable continues to read when push('')
|
|
44
|
+
https://github.com/nodejs/node/pull/18211
|
|
45
|
+
7. add custom inspect to BufferList
|
|
46
|
+
https://github.com/nodejs/node/pull/17907
|
|
47
|
+
8. always defer 'readable' with nextTick
|
|
48
|
+
https://github.com/nodejs/node/pull/17979
|
|
49
|
+
|
|
50
|
+
## Version 2.x.x
|
|
51
|
+
v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
|
|
52
|
+
|
|
53
|
+
### Big Thanks
|
|
54
|
+
|
|
55
|
+
Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
|
|
56
|
+
|
|
57
|
+
# Usage
|
|
58
|
+
|
|
59
|
+
You can swap your `require('stream')` with `require('readable-stream')`
|
|
60
|
+
without any changes, if you are just using one of the main classes and
|
|
61
|
+
functions.
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
const {
|
|
65
|
+
Readable,
|
|
66
|
+
Writable,
|
|
67
|
+
Transform,
|
|
68
|
+
Duplex,
|
|
69
|
+
pipeline,
|
|
70
|
+
finished
|
|
71
|
+
} = require('readable-stream')
|
|
72
|
+
````
|
|
73
|
+
|
|
74
|
+
Note that `require('stream')` will return `Stream`, while
|
|
75
|
+
`require('readable-stream')` will return `Readable`. We discourage using
|
|
76
|
+
whatever is exported directly, but rather use one of the properties as
|
|
77
|
+
shown in the example above.
|
|
78
|
+
|
|
79
|
+
# Streams Working Group
|
|
80
|
+
|
|
81
|
+
`readable-stream` is maintained by the Streams Working Group, which
|
|
82
|
+
oversees the development and maintenance of the Streams API within
|
|
83
|
+
Node.js. The responsibilities of the Streams Working Group include:
|
|
84
|
+
|
|
85
|
+
* Addressing stream issues on the Node.js issue tracker.
|
|
86
|
+
* Authoring and editing stream documentation within the Node.js project.
|
|
87
|
+
* Reviewing changes to stream subclasses within the Node.js project.
|
|
88
|
+
* Redirecting changes to streams from the Node.js project to this
|
|
89
|
+
project.
|
|
90
|
+
* Assisting in the implementation of stream providers within Node.js.
|
|
91
|
+
* Recommending versions of `readable-stream` to be included in Node.js.
|
|
92
|
+
* Messaging about the future of streams to give the community advance
|
|
93
|
+
notice of changes.
|
|
94
|
+
|
|
95
|
+
<a name="members"></a>
|
|
96
|
+
## Team Members
|
|
97
|
+
|
|
98
|
+
* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
|
|
99
|
+
- Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
|
|
100
|
+
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
|
|
101
|
+
* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com>
|
|
102
|
+
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
|
|
103
|
+
* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com>
|
|
104
|
+
* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com>
|
|
105
|
+
|
|
106
|
+
[sauce]: https://saucelabs.com
|