@gjsify/tty 0.0.2 → 0.0.3
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/lib/cjs/index.js +15 -34
- package/package.json +3 -3
package/lib/cjs/index.js
CHANGED
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var src_exports = {};
|
|
19
|
-
__export(src_exports, {
|
|
20
|
-
ReadStream: () => ReadStream,
|
|
21
|
-
WriteStream: () => WriteStream,
|
|
22
|
-
default: () => src_default,
|
|
23
|
-
isatty: () => isatty
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
var import_stream = require("stream");
|
|
27
|
-
var import_utils = require("@gjsify/utils");
|
|
28
|
-
class ReadStream extends import_stream.Readable {
|
|
1
|
+
import { Writable, Readable } from "stream";
|
|
2
|
+
import { warnNotImplemented } from "@gjsify/utils";
|
|
3
|
+
class ReadStream extends Readable {
|
|
29
4
|
isRaw = false;
|
|
30
5
|
get isTTY() {
|
|
31
6
|
return true;
|
|
@@ -37,7 +12,7 @@ class ReadStream extends import_stream.Readable {
|
|
|
37
12
|
}
|
|
38
13
|
}
|
|
39
14
|
}
|
|
40
|
-
class WriteStream extends
|
|
15
|
+
class WriteStream extends Writable {
|
|
41
16
|
isRaw = false;
|
|
42
17
|
columns = 80;
|
|
43
18
|
rows = 120;
|
|
@@ -51,29 +26,29 @@ class WriteStream extends import_stream.Writable {
|
|
|
51
26
|
return true;
|
|
52
27
|
}
|
|
53
28
|
clearLine(dir, callback) {
|
|
54
|
-
|
|
29
|
+
warnNotImplemented("WriteStream.clearLine");
|
|
55
30
|
if (callback)
|
|
56
31
|
callback();
|
|
57
32
|
return true;
|
|
58
33
|
}
|
|
59
34
|
clearScreenDown(callback) {
|
|
60
|
-
|
|
35
|
+
warnNotImplemented("WriteStream.clearScreenDown");
|
|
61
36
|
if (callback)
|
|
62
37
|
callback();
|
|
63
38
|
return true;
|
|
64
39
|
}
|
|
65
40
|
cursorTo(x, y, callback) {
|
|
66
|
-
|
|
41
|
+
warnNotImplemented("WriteStream.cursorTo");
|
|
67
42
|
if (callback)
|
|
68
43
|
callback();
|
|
69
44
|
return true;
|
|
70
45
|
}
|
|
71
46
|
getColorDepth(env) {
|
|
72
|
-
|
|
47
|
+
warnNotImplemented("WriteStream.getColorDepth");
|
|
73
48
|
return 8;
|
|
74
49
|
}
|
|
75
50
|
getWindowSize() {
|
|
76
|
-
|
|
51
|
+
warnNotImplemented("WriteStream.getWindowSize");
|
|
77
52
|
return [this.columns, this.rows];
|
|
78
53
|
}
|
|
79
54
|
hasColors(count = 16, env) {
|
|
@@ -121,3 +96,9 @@ var src_default = {
|
|
|
121
96
|
WriteStream,
|
|
122
97
|
ReadStream
|
|
123
98
|
};
|
|
99
|
+
export {
|
|
100
|
+
ReadStream,
|
|
101
|
+
WriteStream,
|
|
102
|
+
src_default as default,
|
|
103
|
+
isatty
|
|
104
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/tty",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Node.js tty module for Gjs",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"tty"
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@gjsify/cli": "^0.0.
|
|
38
|
+
"@gjsify/cli": "^0.0.3",
|
|
39
39
|
"@types/node": "^20.3.1"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@gjsify/utils": "^0.0.
|
|
42
|
+
"@gjsify/utils": "^0.0.3"
|
|
43
43
|
}
|
|
44
44
|
}
|