@prozilla-os/terminal 1.1.21 → 2.0.0
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.d.ts +1602 -64
- package/dist/main.js +744 -7
- package/dist/main.js.map +1 -1
- package/package.json +9 -8
- package/dist/chunks/cat-DGK7wWrK.js +0 -16
- package/dist/chunks/cat-DGK7wWrK.js.map +0 -1
- package/dist/chunks/cd-DvjkW_6o.js +0 -15
- package/dist/chunks/cd-DvjkW_6o.js.map +0 -1
- package/dist/chunks/clear-BF9eb1Dq.js +0 -14
- package/dist/chunks/clear-BF9eb1Dq.js.map +0 -1
- package/dist/chunks/cmatrix-VYovsHQW.js +0 -59
- package/dist/chunks/cmatrix-VYovsHQW.js.map +0 -1
- package/dist/chunks/compgen-3TwdgHm_.js +0 -13
- package/dist/chunks/compgen-3TwdgHm_.js.map +0 -1
- package/dist/chunks/cowsay-IfArfPSJ.js +0 -49
- package/dist/chunks/cowsay-IfArfPSJ.js.map +0 -1
- package/dist/chunks/dir-B_Ipo5xb.js +0 -11
- package/dist/chunks/dir-B_Ipo5xb.js.map +0 -1
- package/dist/chunks/echo-DX-Ar2Ut.js +0 -11
- package/dist/chunks/echo-DX-Ar2Ut.js.map +0 -1
- package/dist/chunks/eval-C7InkmFY.js +0 -14
- package/dist/chunks/eval-C7InkmFY.js.map +0 -1
- package/dist/chunks/exit-D7PPqtiE.js +0 -11
- package/dist/chunks/exit-D7PPqtiE.js.map +0 -1
- package/dist/chunks/fortune-zyxpnYNP.js +0 -59
- package/dist/chunks/fortune-zyxpnYNP.js.map +0 -1
- package/dist/chunks/help-BEgNbwLL.js +0 -17
- package/dist/chunks/help-BEgNbwLL.js.map +0 -1
- package/dist/chunks/history-l0sNRNKZ.js +0 -2
- package/dist/chunks/history-l0sNRNKZ.js.map +0 -1
- package/dist/chunks/hostname-DU1lQde2.js +0 -11
- package/dist/chunks/hostname-DU1lQde2.js.map +0 -1
- package/dist/chunks/lolcat-5-mBWD9l.js +0 -35
- package/dist/chunks/lolcat-5-mBWD9l.js.map +0 -1
- package/dist/chunks/ls-DnkSPHVM.js +0 -18
- package/dist/chunks/ls-DnkSPHVM.js.map +0 -1
- package/dist/chunks/main-CXiltWT-.js +0 -957
- package/dist/chunks/main-CXiltWT-.js.map +0 -1
- package/dist/chunks/make-DqVQDThH.js +0 -9
- package/dist/chunks/make-DqVQDThH.js.map +0 -1
- package/dist/chunks/man-D_hBUTDt.js +0 -47
- package/dist/chunks/man-D_hBUTDt.js.map +0 -1
- package/dist/chunks/mkdir-BCvMrPTX.js +0 -11
- package/dist/chunks/mkdir-BCvMrPTX.js.map +0 -1
- package/dist/chunks/neofetch-BFHOITJj.js +0 -40
- package/dist/chunks/neofetch-BFHOITJj.js.map +0 -1
- package/dist/chunks/pwd-C21tQanw.js +0 -11
- package/dist/chunks/pwd-C21tQanw.js.map +0 -1
- package/dist/chunks/reboot-C2t7a3Av.js +0 -11
- package/dist/chunks/reboot-C2t7a3Av.js.map +0 -1
- package/dist/chunks/reload-C9o_dGZw.js +0 -10
- package/dist/chunks/reload-C9o_dGZw.js.map +0 -1
- package/dist/chunks/rev-CBibYebM.js +0 -11
- package/dist/chunks/rev-CBibYebM.js.map +0 -1
- package/dist/chunks/rm-ChTrwld4.js +0 -12
- package/dist/chunks/rm-ChTrwld4.js.map +0 -1
- package/dist/chunks/rmdir-CUM4xt2w.js +0 -11
- package/dist/chunks/rmdir-CUM4xt2w.js.map +0 -1
- package/dist/chunks/sl-DrATMkz6.js +0 -166
- package/dist/chunks/sl-DrATMkz6.js.map +0 -1
- package/dist/chunks/touch-CqBIAjMe.js +0 -19
- package/dist/chunks/touch-CqBIAjMe.js.map +0 -1
- package/dist/chunks/uptime-xM-0FRzA.js +0 -11
- package/dist/chunks/uptime-xM-0FRzA.js.map +0 -1
- package/dist/chunks/whatis-vXemLo9m.js +0 -13
- package/dist/chunks/whatis-vXemLo9m.js.map +0 -1
- package/dist/chunks/whoami-CnUR69yX.js +0 -11
- package/dist/chunks/whoami-CnUR69yX.js.map +0 -1
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { C as w, f as p, S as g } from "./main-CXiltWT-.js";
|
|
2
|
-
const I = 1.25, i = [
|
|
3
|
-
[
|
|
4
|
-
" (@@) ( ) (@) ( ) @@ () @ o @ o",
|
|
5
|
-
" ( )",
|
|
6
|
-
" (@@@@)",
|
|
7
|
-
" ( )",
|
|
8
|
-
"",
|
|
9
|
-
" (@@@)"
|
|
10
|
-
],
|
|
11
|
-
[
|
|
12
|
-
" ( ) (@@) ( ) (@) () @@ o @ o @",
|
|
13
|
-
" (@@@)",
|
|
14
|
-
" ( )",
|
|
15
|
-
" (@@@@)",
|
|
16
|
-
"",
|
|
17
|
-
" ( )"
|
|
18
|
-
]
|
|
19
|
-
], u = [
|
|
20
|
-
" ==== ________ ___________",
|
|
21
|
-
" _D _| |_______/ \\__I_I_____===__|_________|",
|
|
22
|
-
" |(_)--- | H\\________/ | | =|___ ___| ",
|
|
23
|
-
" / | | H | | | | ||_| |_|| ",
|
|
24
|
-
" | | | H |__--------------------| [___] | ",
|
|
25
|
-
" | ________|___H__/__|_____/[][]~\\_______| | ",
|
|
26
|
-
" |/ | |-----------I_____I [][] [] D |=======|__"
|
|
27
|
-
], m = [
|
|
28
|
-
[
|
|
29
|
-
"__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__",
|
|
30
|
-
" |/-=|___|= || || || |_____/~\\___/ ",
|
|
31
|
-
" \\_/ \\O=====O=====O=====O_/ \\_/ "
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
"__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__",
|
|
35
|
-
" |/-=|___|=O=====O=====O=====O |_____/~\\___/ ",
|
|
36
|
-
" \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ "
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
"__/ =| o |=-O=====O=====O=====O \\ ____Y___________|__",
|
|
40
|
-
" |/-=|___|= || || || |_____/~\\___/ ",
|
|
41
|
-
" \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ "
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
"__/ =| o |=-~O=====O=====O=====O\\ ____Y___________|__",
|
|
45
|
-
" |/-=|___|= || || || |_____/~\\___/ ",
|
|
46
|
-
" \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ "
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__",
|
|
50
|
-
" |/-=|___|= O=====O=====O=====O|_____/~\\___/ ",
|
|
51
|
-
" \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ "
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
"__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__",
|
|
55
|
-
" |/-=|___|= || || || |_____/~\\___/ ",
|
|
56
|
-
" \\_/ \\_O=====O=====O=====O/ \\_/ "
|
|
57
|
-
]
|
|
58
|
-
].reverse(), f = [
|
|
59
|
-
" ",
|
|
60
|
-
" _________________ ",
|
|
61
|
-
" _| \\_____A ",
|
|
62
|
-
" =| | ",
|
|
63
|
-
" -| | ",
|
|
64
|
-
"__|________________________|_",
|
|
65
|
-
"|__________________________|_",
|
|
66
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
67
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
68
|
-
], h = [
|
|
69
|
-
[
|
|
70
|
-
" _______================_______ ",
|
|
71
|
-
" | | ___ ___ ___ ___ | | ",
|
|
72
|
-
" | | | | | | | | | | | | ",
|
|
73
|
-
" | | |_| |_| |_| |_| | | ",
|
|
74
|
-
" | | | | ",
|
|
75
|
-
"__|__|____________________|__|__",
|
|
76
|
-
"_|____________________________|_",
|
|
77
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
78
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
79
|
-
],
|
|
80
|
-
[
|
|
81
|
-
" ",
|
|
82
|
-
" ________========__HH____ ",
|
|
83
|
-
" / HH \\ ",
|
|
84
|
-
"/ HH \\ ",
|
|
85
|
-
"\\ HH / ",
|
|
86
|
-
"_\\__________________HH____/__",
|
|
87
|
-
"|__________________________|_",
|
|
88
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
89
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
" ",
|
|
93
|
-
" ",
|
|
94
|
-
" ",
|
|
95
|
-
" ",
|
|
96
|
-
" ",
|
|
97
|
-
"_____________________________",
|
|
98
|
-
"|__________________________|_",
|
|
99
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
100
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
101
|
-
],
|
|
102
|
-
[
|
|
103
|
-
" ",
|
|
104
|
-
" _|__|___________|__|___ ",
|
|
105
|
-
" (_|__|___________|__|___) ",
|
|
106
|
-
" _(|__|___________|__|__)_ ",
|
|
107
|
-
" (__|__|___________|__|____)",
|
|
108
|
-
"_(___|__|___________|__|__)__",
|
|
109
|
-
"|__________________________|_",
|
|
110
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
111
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
" ",
|
|
115
|
-
" ___________________________ ",
|
|
116
|
-
" \\ | | / ",
|
|
117
|
-
" \\ | | / ",
|
|
118
|
-
" |\\ | | /| ",
|
|
119
|
-
"__|_\\___|___________|___/_|__",
|
|
120
|
-
"|__________________________|_",
|
|
121
|
-
" |_D__D__D_| |_D__D__D_| ",
|
|
122
|
-
" \\_/ \\_/ \\_/ \\_/ "
|
|
123
|
-
]
|
|
124
|
-
];
|
|
125
|
-
function E(s, r = 1) {
|
|
126
|
-
const o = i[0].length, e = u.length + m[0].length, _ = f.length, n = o + e - _, c = i[Math.round(s / 4) % i.length], a = u, H = m[s % m.length], O = 50 - s;
|
|
127
|
-
return `
|
|
128
|
-
${c.concat(a, H).map((t, l) => {
|
|
129
|
-
if (l >= n && r > 0)
|
|
130
|
-
for (let D = 0; D < r; D++)
|
|
131
|
-
D === 0 ? t += f[l - n] : t += h[(D - 1) % h.length][l - n];
|
|
132
|
-
return O === 0 ? t : O > 0 ? " ".repeat(O) + t : (t = t.slice(-O), t);
|
|
133
|
-
}).join(`
|
|
134
|
-
`)}
|
|
135
|
-
`;
|
|
136
|
-
}
|
|
137
|
-
const v = new w().setManual({
|
|
138
|
-
purpose: "Show animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive.",
|
|
139
|
-
usage: `sl
|
|
140
|
-
sl -w number`,
|
|
141
|
-
options: {
|
|
142
|
-
"-w number": "Set the amount of wagons (defaults to 1)"
|
|
143
|
-
}
|
|
144
|
-
}).addOption({
|
|
145
|
-
short: "w",
|
|
146
|
-
long: "wagons",
|
|
147
|
-
isInput: !0
|
|
148
|
-
}).setExecute(function(s, r) {
|
|
149
|
-
const { inputs: o } = r;
|
|
150
|
-
let e = 1;
|
|
151
|
-
if (o != null && o.w && (e = parseInt(o.w), !e || e < 0))
|
|
152
|
-
return p(this.name, "Please specify a valid amount of wagons");
|
|
153
|
-
const _ = new g();
|
|
154
|
-
let n = 0;
|
|
155
|
-
const c = setInterval(() => {
|
|
156
|
-
const a = E(n, e);
|
|
157
|
-
_.send(a), n++, a.trim().length === 0 && _.stop();
|
|
158
|
-
}, 100 / I);
|
|
159
|
-
return _.on(g.EVENT_NAMES.stop, () => {
|
|
160
|
-
clearInterval(c);
|
|
161
|
-
}), _.start(), _;
|
|
162
|
-
});
|
|
163
|
-
export {
|
|
164
|
-
v as sl
|
|
165
|
-
};
|
|
166
|
-
//# sourceMappingURL=sl-DrATMkz6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sl-DrATMkz6.js","sources":["../../src/core/commands/sl.ts"],"sourcesContent":["import { formatError } from \"../_utils/terminal.utils\";\nimport { Command, ExecuteParams } from \"../command\";\nimport { Stream } from \"../stream\";\n\nconst ANIMATION_SPEED = 1.25;\n\nconst LOCOMOTIVE_SMOKE = [\n\t[\n\t\t\" (@@) ( ) (@) ( ) @@ () @ o @ o\",\n\t\t\" ( )\",\n\t\t\" (@@@@)\",\n\t\t\" ( )\",\n\t\t\"\",\n\t\t\" (@@@)\",\n\t],\n\t[\n\t\t\" ( ) (@@) ( ) (@) () @@ o @ o @\",\n\t\t\" (@@@)\",\n\t\t\" ( )\",\n\t\t\" (@@@@)\",\n\t\t\"\",\n\t\t\" ( )\",\n\t],\n];\n\nconst LOCOMOTIVE_TOP = [\n\t\" ==== ________ ___________\",\n\t\" _D _| |_______/ \\\\__I_I_____===__|_________|\",\n\t\" |(_)--- | H\\\\________/ | | =|___ ___| \",\n\t\" / | | H | | | | ||_| |_|| \",\n\t\" | | | H |__--------------------| [___] | \",\n\t\" | ________|___H__/__|_____/[][]~\\\\_______| | \",\n\t\" |/ | |-----------I_____I [][] [] D |=======|__\",\n];\n\nconst LOCOMOTIVE_BOTTOM = [\n\t[\n\t\t\"__/ =| o |=-~~\\\\ /~~\\\\ /~~\\\\ /~~\\\\ ____Y___________|__\",\n\t\t\" |/-=|___|= || || || |_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\O=====O=====O=====O_/ \\\\_/ \",\n\t],\n\t[\n\t\t\"__/ =| o |=-~~\\\\ /~~\\\\ /~~\\\\ /~~\\\\ ____Y___________|__\",\n\t\t\" |/-=|___|=O=====O=====O=====O |_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\__/ \\\\__/ \\\\__/ \\\\__/ \\\\_/ \",\n\t],\n\t[\n\t\t\"__/ =| o |=-O=====O=====O=====O \\\\ ____Y___________|__\",\n\t\t\" |/-=|___|= || || || |_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\__/ \\\\__/ \\\\__/ \\\\__/ \\\\_/ \",\n\t],\n\t[\n\t\t\"__/ =| o |=-~O=====O=====O=====O\\\\ ____Y___________|__\",\n\t\t\" |/-=|___|= || || || |_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\__/ \\\\__/ \\\\__/ \\\\__/ \\\\_/ \",\n\t],\n\t[\n\t\t\"__/ =| o |=-~~\\\\ /~~\\\\ /~~\\\\ /~~\\\\ ____Y___________|__\",\n\t\t\" |/-=|___|= O=====O=====O=====O|_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\__/ \\\\__/ \\\\__/ \\\\__/ \\\\_/ \",\n\t],\n\t[\n\t\t\"__/ =| o |=-~~\\\\ /~~\\\\ /~~\\\\ /~~\\\\ ____Y___________|__\",\n\t\t\" |/-=|___|= || || || |_____/~\\\\___/ \",\n\t\t\" \\\\_/ \\\\_O=====O=====O=====O/ \\\\_/ \",\n\t],\n].reverse();\n\nconst COAL_WAGON = [\n\t\" \",\n\t\" _________________ \",\n\t\" _| \\\\_____A \",\n\t\" =| | \",\n\t\" -| | \",\n\t\"__|________________________|_\",\n\t\"|__________________________|_\",\n\t\" |_D__D__D_| |_D__D__D_| \",\n\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n];\n\nconst EXTRA_WAGONS = [\n\t[\n\t\t\" _______================_______ \",\n\t\t\" | | ___ ___ ___ ___ | | \",\n\t\t\" | | | | | | | | | | | | \",\n\t\t\" | | |_| |_| |_| |_| | | \",\n\t\t\" | | | | \",\n\t\t\"__|__|____________________|__|__\",\n\t\t\"_|____________________________|_\",\n\t\t\" |_D__D__D_| |_D__D__D_| \",\n\t\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n\t],\n\t[\n\t\t\" \",\n\t\t\" ________========__HH____ \",\n\t\t\" / HH \\\\ \",\n\t\t\"/ HH \\\\ \",\n\t\t\"\\\\ HH / \",\n\t\t\"_\\\\__________________HH____/__\",\n\t\t\"|__________________________|_\",\n\t\t\" |_D__D__D_| |_D__D__D_| \",\n\t\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n\t],\n\t[\n\t\t\" \",\n\t\t\" \",\n\t\t\" \",\n\t\t\" \",\n\t\t\" \",\n\t\t\"_____________________________\",\n\t\t\"|__________________________|_\",\n\t\t\" |_D__D__D_| |_D__D__D_| \",\n\t\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n\t],\n\t[\n\t\t\" \",\n\t\t\" _|__|___________|__|___ \",\n\t\t\" (_|__|___________|__|___) \",\n\t\t\" _(|__|___________|__|__)_ \",\n\t\t\" (__|__|___________|__|____)\",\n\t\t\"_(___|__|___________|__|__)__\",\n\t\t\"|__________________________|_\",\n\t\t\" |_D__D__D_| |_D__D__D_| \",\n\t\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n\t],\n\t[\n\t\t\" \",\n\t\t\" ___________________________ \",\n\t\t\" \\\\ | | / \",\n\t\t\" \\\\ | | / \",\n\t\t\" |\\\\ | | /| \",\n\t\t\"__|_\\\\___|___________|___/_|__\",\n\t\t\"|__________________________|_\",\n\t\t\" |_D__D__D_| |_D__D__D_| \",\n\t\t\" \\\\_/ \\\\_/ \\\\_/ \\\\_/ \",\n\t],\n];\n\nfunction generateLocomotive(frame: number, wagonCount = 1) {\n\tconst smokeHeight = LOCOMOTIVE_SMOKE[0].length;\n\tconst locomotiveHeight = LOCOMOTIVE_TOP.length + LOCOMOTIVE_BOTTOM[0].length;\n\tconst wagonHeight = COAL_WAGON.length;\n\n\tconst wagonStart = smokeHeight + locomotiveHeight - wagonHeight;\n\n\tconst smoke = LOCOMOTIVE_SMOKE[Math.round(frame / 4) % LOCOMOTIVE_SMOKE.length];\n\tconst top = LOCOMOTIVE_TOP;\n\tconst bottom = LOCOMOTIVE_BOTTOM[frame % LOCOMOTIVE_BOTTOM.length];\n\n\tconst distance = 50 - frame;\n\tconst locomotive = smoke.concat(top, bottom).map((line, index) => {\n\t\tif (index >= wagonStart && wagonCount > 0) {\n\t\t\tfor (let i = 0; i < wagonCount; i++) {\n\t\t\t\tif (i === 0) {\n\t\t\t\t\tline += COAL_WAGON[index - wagonStart];\n\t\t\t\t} else {\n\t\t\t\t\tline += EXTRA_WAGONS[(i - 1) % EXTRA_WAGONS.length][index - wagonStart];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (distance === 0) {\n\t\t\treturn line;\n\t\t} else if (distance > 0) {\n\t\t\treturn \" \".repeat(distance) + line;\n\t\t} else {\n\t\t\tline = line.slice(-distance);\n\t\t\treturn line;\n\t\t}\n\t}).join(\"\\n\");\n\n\treturn `\\n${locomotive}\\n`;\n}\n\nexport const sl = new Command()\n\t.setManual({\n\t\tpurpose: \"Show animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive.\",\n\t\tusage: \"sl\\n\"\n\t\t\t+ \"sl -w number\",\n\t\toptions: {\n\t\t\t\"-w number\": \"Set the amount of wagons (defaults to 1)\",\n\t\t},\n\t})\n\t.addOption({\n\t\tshort: \"w\",\n\t\tlong: \"wagons\",\n\t\tisInput: true,\n\t})\n\t.setExecute(function(this: Command, _args, params) {\n\t\tconst { inputs } = params as ExecuteParams;\n\t\tlet wagonCount = 1;\n\n\t\tif (inputs?.w) {\n\t\t\twagonCount = parseInt(inputs.w);\n\n\t\t\tif (!wagonCount || wagonCount < 0) {\n\t\t\t\treturn formatError(this.name, \"Please specify a valid amount of wagons\"); \n\t\t\t}\n\t\t}\n\n\t\tconst stream = new Stream();\n\n\t\tlet frame = 0;\n\t\tconst interval = setInterval(() => {\n\t\t\tconst text = generateLocomotive(frame, wagonCount);\n\t\t\tstream.send(text);\n\t\t\tframe++;\n\n\t\t\tif (text.trim().length === 0)\n\t\t\t\tstream.stop();\n\t\t}, 100 / ANIMATION_SPEED);\n\n\t\tstream.on(Stream.EVENT_NAMES.stop, () => {\n\t\t\tclearInterval(interval);\n\t\t});\n\n\t\tstream.start();\n\n\t\treturn stream;\n\t});"],"names":["ANIMATION_SPEED","LOCOMOTIVE_SMOKE","LOCOMOTIVE_TOP","LOCOMOTIVE_BOTTOM","COAL_WAGON","EXTRA_WAGONS","generateLocomotive","frame","wagonCount","smokeHeight","locomotiveHeight","wagonHeight","wagonStart","smoke","top","bottom","distance","line","index","i","sl","Command","_args","params","inputs","formatError","stream","Stream","interval","text"],"mappings":";AAIA,MAAMA,IAAkB,MAElBC,IAAmB;AAAA,EACxB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD,GAEMC,IAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAEMC,IAAoB;AAAA,EACzB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD,EAAE,QAAQ,GAEJC,IAAa;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAEMC,IAAe;AAAA,EACpB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AAEA,SAASC,EAAmBC,GAAeC,IAAa,GAAG;AACpD,QAAAC,IAAcR,EAAiB,CAAC,EAAE,QAClCS,IAAmBR,EAAe,SAASC,EAAkB,CAAC,EAAE,QAChEQ,IAAcP,EAAW,QAEzBQ,IAAaH,IAAcC,IAAmBC,GAE9CE,IAAQZ,EAAiB,KAAK,MAAMM,IAAQ,CAAC,IAAIN,EAAiB,MAAM,GACxEa,IAAMZ,GACNa,IAASZ,EAAkBI,IAAQJ,EAAkB,MAAM,GAE3Da,IAAW,KAAKT;AAsBf,SAAA;AAAA,EArBYM,EAAM,OAAOC,GAAKC,CAAM,EAAE,IAAI,CAACE,GAAMC,MAAU;AAC7D,QAAAA,KAASN,KAAcJ,IAAa;AACvC,eAASW,IAAI,GAAGA,IAAIX,GAAYW;AAC/B,QAAIA,MAAM,IACDF,KAAAb,EAAWc,IAAQN,CAAU,IAErCK,KAAQZ,GAAcc,IAAI,KAAKd,EAAa,MAAM,EAAEa,IAAQN,CAAU;AAKzE,WAAII,MAAa,IACTC,IACGD,IAAW,IACd,IAAI,OAAOA,CAAQ,IAAIC,KAEvBA,IAAAA,EAAK,MAAM,CAACD,CAAQ,GACpBC;AAAA,EACR,CACA,EAAE,KAAK;AAAA,CAAI,CAEU;AAAA;AACvB;AAEO,MAAMG,IAAK,IAAIC,EAAQ,EAC5B,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA,IACR,aAAa;AAAA,EACd;AACD,CAAC,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AACV,CAAC,EACA,WAAW,SAAwBC,GAAOC,GAAQ;AAC5C,QAAA,EAAE,QAAAC,EAAW,IAAAD;AACnB,MAAIf,IAAa;AAEjB,MAAIgB,KAAA,QAAAA,EAAQ,MACEhB,IAAA,SAASgB,EAAO,CAAC,GAE1B,CAAChB,KAAcA,IAAa;AACxB,WAAAiB,EAAY,KAAK,MAAM,yCAAyC;AAInE,QAAAC,IAAS,IAAIC;AAEnB,MAAIpB,IAAQ;AACN,QAAAqB,IAAW,YAAY,MAAM;AAC5B,UAAAC,IAAOvB,EAAmBC,GAAOC,CAAU;AACjD,IAAAkB,EAAO,KAAKG,CAAI,GAChBtB,KAEIsB,EAAK,OAAO,WAAW,KAC1BH,EAAO,KAAK;AAAA,EAAA,GACX,MAAM1B,CAAe;AAExB,SAAA0B,EAAO,GAAGC,EAAO,YAAY,MAAM,MAAM;AACxC,kBAAcC,CAAQ;AAAA,EAAA,CACtB,GAEDF,EAAO,MAAM,GAENA;AACR,CAAC;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { VirtualFile as s } from "@prozilla-os/core";
|
|
2
|
-
import { C as a, f as c } from "./main-CXiltWT-.js";
|
|
3
|
-
const f = new a().setRequireArgs(!0).setManual({
|
|
4
|
-
purpose: "Change file timestamps",
|
|
5
|
-
usage: "touch [options] files",
|
|
6
|
-
description: `Update the access and modification times of each FILE to the current time.
|
|
7
|
-
|
|
8
|
-
A file argument that does not exist is created empty.`
|
|
9
|
-
}).setExecute(function(e, r) {
|
|
10
|
-
const { currentDirectory: t } = r, i = e[0];
|
|
11
|
-
if (i === "girls\\" && e[1] === "boo**")
|
|
12
|
-
return c(this.name, "Cannot touch 'girls boo**': Permission denied");
|
|
13
|
-
const { name: n, extension: o } = s.splitId(i);
|
|
14
|
-
return t.findFile(n, o) ? { blank: !0 } : (t.createFile(n, o), { blank: !0 });
|
|
15
|
-
});
|
|
16
|
-
export {
|
|
17
|
-
f as touch
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=touch-CqBIAjMe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"touch-CqBIAjMe.js","sources":["../../src/core/commands/touch.ts"],"sourcesContent":["import { VirtualFile } from \"@prozilla-os/core\";\nimport { formatError } from \"../_utils/terminal.utils\";\nimport { Command, ExecuteParams } from \"../command\";\n\nexport const touch = new Command()\n\t.setRequireArgs(true)\n\t.setManual({\n\t\tpurpose: \"Change file timestamps\",\n\t\tusage: \"touch [options] files\",\n\t\tdescription: \"Update the access and modification times of each FILE to the current time.\\n\\n\"\n\t\t\t+ \"A file argument that does not exist is created empty.\",\n\t})\n\t.setExecute(function(this: Command, args, params) {\n\t\tconst { currentDirectory } = params as ExecuteParams;\n\t\tconst fileId = (args as string[])[0];\n\n\t\tif (fileId === \"girls\\\\\" && (args as string[])[1] === \"boo**\")\n\t\t\treturn formatError((this).name, \"Cannot touch 'girls boo**': Permission denied\");\n\t\n\t\tconst { name, extension } = VirtualFile.splitId(fileId);\n\t\n\t\tif (currentDirectory.findFile(name, extension))\n\t\t\treturn { blank: true };\n\t\n\t\tcurrentDirectory.createFile(name, extension as string | undefined);\n\t\treturn { blank: true };\n\t});"],"names":["touch","Command","args","params","currentDirectory","fileId","formatError","name","extension","VirtualFile"],"mappings":";;AAIO,MAAMA,IAAQ,IAAIC,IACvB,eAAe,EAAI,EACnB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AAAA;AAAA;AAEd,CAAC,EACA,WAAW,SAAwBC,GAAMC,GAAQ;AAC3C,QAAA,EAAE,kBAAAC,EAAqB,IAAAD,GACvBE,IAAUH,EAAkB,CAAC;AAEnC,MAAIG,MAAW,aAAcH,EAAkB,CAAC,MAAM;AAC9C,WAAAI,EAAa,KAAM,MAAM,+CAA+C;AAEhF,QAAM,EAAE,MAAAC,GAAM,WAAAC,EAAA,IAAcC,EAAY,QAAQJ,CAAM;AAElD,SAAAD,EAAiB,SAASG,GAAMC,CAAS,IACrC,EAAE,OAAO,QAEAJ,EAAA,WAAWG,GAAMC,CAA+B,GAC1D,EAAE,OAAO;AACjB,CAAC;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { C as s } from "./main-CXiltWT-.js";
|
|
2
|
-
const r = new s().setManual({
|
|
3
|
-
purpose: "Display the current uptime of the system"
|
|
4
|
-
}).setExecute(function(m, e) {
|
|
5
|
-
const { systemManager: t } = e;
|
|
6
|
-
return `Uptime: ${t.getUptime(2)}`;
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
r as uptime
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=uptime-xM-0FRzA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uptime-xM-0FRzA.js","sources":["../../src/core/commands/uptime.ts"],"sourcesContent":["import { Command, ExecuteParams } from \"../command\";\n\nexport const uptime = new Command()\n\t.setManual({\n\t\tpurpose: \"Display the current uptime of the system\",\n\t})\n\t.setExecute(function(_args, params) {\n\t\tconst { systemManager } = params as ExecuteParams;\n\t\treturn `Uptime: ${systemManager.getUptime(2)}`;\n\t});"],"names":["uptime","Command","_args","params","systemManager"],"mappings":";AAEO,MAAMA,IAAS,IAAIC,EAAQ,EAChC,UAAU;AAAA,EACV,SAAS;AACV,CAAC,EACA,WAAW,SAASC,GAAOC,GAAQ;AAC7B,QAAA,EAAE,eAAAC,EAAkB,IAAAD;AAC1B,SAAO,WAAWC,EAAc,UAAU,CAAC,CAAC;AAC7C,CAAC;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ANSI as m } from "@prozilla-os/shared";
|
|
2
|
-
import { C as t, a as s, f as r } from "./main-CXiltWT-.js";
|
|
3
|
-
const f = new t().setRequireArgs(!0).setManual({
|
|
4
|
-
purpose: "Show information about a command"
|
|
5
|
-
}).setExecute(function(e) {
|
|
6
|
-
var a;
|
|
7
|
-
const o = e[0].toLowerCase(), n = s.find(o);
|
|
8
|
-
return n ? (a = n.manual) != null && a.purpose ? `${o} - ${m.fg.green}${n.manual.purpose}` : r(this.name, `${o}: No information found`) : r(this.name, `${o}: Command not found`);
|
|
9
|
-
});
|
|
10
|
-
export {
|
|
11
|
-
f as whatis
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=whatis-vXemLo9m.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whatis-vXemLo9m.js","sources":["../../src/core/commands/whatis.ts"],"sourcesContent":["import { ANSI } from \"@prozilla-os/shared\";\nimport { formatError } from \"../_utils/terminal.utils\";\nimport { Command } from \"../command\";\nimport { CommandsManager } from \"../commands\";\n\nexport const whatis = new Command()\n\t.setRequireArgs(true)\n\t.setManual({\n\t\tpurpose: \"Show information about a command\",\n\t})\n\t.setExecute(function(this: Command, args) {\n\t\tconst commandName = (args as string[])[0].toLowerCase();\n\t\tconst command = CommandsManager.find(commandName);\n\n\t\tif (!command)\n\t\t\treturn formatError(this.name, `${commandName}: Command not found`);\n\n\t\tif (!command.manual?.purpose)\n\t\t\treturn formatError(this.name, `${commandName}: No information found`);\n\n\t\treturn `${commandName} - ${ANSI.fg.green}${command.manual.purpose}`;\n\t});"],"names":["whatis","Command","args","commandName","command","CommandsManager","_a","ANSI","formatError"],"mappings":";;AAKO,MAAMA,IAAS,IAAIC,IACxB,eAAe,EAAI,EACnB,UAAU;AAAA,EACV,SAAS;AACV,CAAC,EACA,WAAW,SAAwBC,GAAM;;AACzC,QAAMC,IAAeD,EAAkB,CAAC,EAAE,YAAY,GAChDE,IAAUC,EAAgB,KAAKF,CAAW;AAEhD,SAAKC,KAGAE,IAAAF,EAAQ,WAAR,QAAAE,EAAgB,UAGd,GAAGH,CAAW,MAAMI,EAAK,GAAG,KAAK,GAAGH,EAAQ,OAAO,OAAO,KAFzDI,EAAY,KAAK,MAAM,GAAGL,CAAW,wBAAwB,IAH7DK,EAAY,KAAK,MAAM,GAAGL,CAAW,qBAAqB;AAMnE,CAAC;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { C as a } from "./main-CXiltWT-.js";
|
|
2
|
-
const n = new a().setManual({
|
|
3
|
-
purpose: "Display the username"
|
|
4
|
-
}).setExecute((r, e) => {
|
|
5
|
-
const { username: s } = e;
|
|
6
|
-
return s;
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
n as whoami
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=whoami-CnUR69yX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whoami-CnUR69yX.js","sources":["../../src/core/commands/whoami.ts"],"sourcesContent":["import { Command, ExecuteParams } from \"../command\";\n\nexport const whoami = new Command()\n\t.setManual({\n\t\tpurpose: \"Display the username\",\n\t})\n\t.setExecute((_args, params) => {\n\t\tconst { username } = params as ExecuteParams;\n\t\treturn username;\n\t});"],"names":["whoami","Command","_args","params","username"],"mappings":";AAEO,MAAMA,IAAS,IAAIC,EAAQ,EAChC,UAAU;AAAA,EACV,SAAS;AACV,CAAC,EACA,WAAW,CAACC,GAAOC,MAAW;AACxB,QAAA,EAAE,UAAAC,EAAa,IAAAD;AACd,SAAAC;AACR,CAAC;"}
|