@ecmaos/coreutils 0.4.0 → 0.4.2

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.
Files changed (171) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +6 -0
  3. package/dist/commands/awk.d.ts +4 -0
  4. package/dist/commands/awk.d.ts.map +1 -0
  5. package/dist/commands/awk.js +324 -0
  6. package/dist/commands/awk.js.map +1 -0
  7. package/dist/commands/chgrp.d.ts +4 -0
  8. package/dist/commands/chgrp.d.ts.map +1 -0
  9. package/dist/commands/chgrp.js +187 -0
  10. package/dist/commands/chgrp.js.map +1 -0
  11. package/dist/commands/chmod.d.ts.map +1 -1
  12. package/dist/commands/chmod.js +139 -2
  13. package/dist/commands/chmod.js.map +1 -1
  14. package/dist/commands/chown.d.ts +4 -0
  15. package/dist/commands/chown.d.ts.map +1 -0
  16. package/dist/commands/chown.js +257 -0
  17. package/dist/commands/chown.js.map +1 -0
  18. package/dist/commands/cksum.d.ts +4 -0
  19. package/dist/commands/cksum.d.ts.map +1 -0
  20. package/dist/commands/cksum.js +124 -0
  21. package/dist/commands/cksum.js.map +1 -0
  22. package/dist/commands/cmp.d.ts +4 -0
  23. package/dist/commands/cmp.d.ts.map +1 -0
  24. package/dist/commands/cmp.js +120 -0
  25. package/dist/commands/cmp.js.map +1 -0
  26. package/dist/commands/column.d.ts +4 -0
  27. package/dist/commands/column.d.ts.map +1 -0
  28. package/dist/commands/column.js +274 -0
  29. package/dist/commands/column.js.map +1 -0
  30. package/dist/commands/cp.d.ts.map +1 -1
  31. package/dist/commands/cp.js +81 -4
  32. package/dist/commands/cp.js.map +1 -1
  33. package/dist/commands/curl.d.ts +4 -0
  34. package/dist/commands/curl.d.ts.map +1 -0
  35. package/dist/commands/curl.js +238 -0
  36. package/dist/commands/curl.js.map +1 -0
  37. package/dist/commands/du.d.ts +4 -0
  38. package/dist/commands/du.d.ts.map +1 -0
  39. package/dist/commands/du.js +168 -0
  40. package/dist/commands/du.js.map +1 -0
  41. package/dist/commands/echo.d.ts.map +1 -1
  42. package/dist/commands/echo.js +125 -2
  43. package/dist/commands/echo.js.map +1 -1
  44. package/dist/commands/expand.d.ts +4 -0
  45. package/dist/commands/expand.d.ts.map +1 -0
  46. package/dist/commands/expand.js +197 -0
  47. package/dist/commands/expand.js.map +1 -0
  48. package/dist/commands/factor.d.ts +4 -0
  49. package/dist/commands/factor.d.ts.map +1 -0
  50. package/dist/commands/factor.js +141 -0
  51. package/dist/commands/factor.js.map +1 -0
  52. package/dist/commands/fmt.d.ts +4 -0
  53. package/dist/commands/fmt.d.ts.map +1 -0
  54. package/dist/commands/fmt.js +278 -0
  55. package/dist/commands/fmt.js.map +1 -0
  56. package/dist/commands/fold.d.ts +4 -0
  57. package/dist/commands/fold.d.ts.map +1 -0
  58. package/dist/commands/fold.js +253 -0
  59. package/dist/commands/fold.js.map +1 -0
  60. package/dist/commands/groups.d.ts +4 -0
  61. package/dist/commands/groups.d.ts.map +1 -0
  62. package/dist/commands/groups.js +61 -0
  63. package/dist/commands/groups.js.map +1 -0
  64. package/dist/commands/hostname.d.ts +4 -0
  65. package/dist/commands/hostname.d.ts.map +1 -0
  66. package/dist/commands/hostname.js +80 -0
  67. package/dist/commands/hostname.js.map +1 -0
  68. package/dist/commands/mount.d.ts.map +1 -1
  69. package/dist/commands/mount.js +192 -97
  70. package/dist/commands/mount.js.map +1 -1
  71. package/dist/commands/od.d.ts +4 -0
  72. package/dist/commands/od.d.ts.map +1 -0
  73. package/dist/commands/od.js +342 -0
  74. package/dist/commands/od.js.map +1 -0
  75. package/dist/commands/pr.d.ts +4 -0
  76. package/dist/commands/pr.d.ts.map +1 -0
  77. package/dist/commands/pr.js +298 -0
  78. package/dist/commands/pr.js.map +1 -0
  79. package/dist/commands/printf.d.ts +4 -0
  80. package/dist/commands/printf.d.ts.map +1 -0
  81. package/dist/commands/printf.js +271 -0
  82. package/dist/commands/printf.js.map +1 -0
  83. package/dist/commands/readlink.d.ts +4 -0
  84. package/dist/commands/readlink.d.ts.map +1 -0
  85. package/dist/commands/readlink.js +104 -0
  86. package/dist/commands/readlink.js.map +1 -0
  87. package/dist/commands/realpath.d.ts +4 -0
  88. package/dist/commands/realpath.d.ts.map +1 -0
  89. package/dist/commands/realpath.js +111 -0
  90. package/dist/commands/realpath.js.map +1 -0
  91. package/dist/commands/rev.d.ts +4 -0
  92. package/dist/commands/rev.d.ts.map +1 -0
  93. package/dist/commands/rev.js +134 -0
  94. package/dist/commands/rev.js.map +1 -0
  95. package/dist/commands/shuf.d.ts +4 -0
  96. package/dist/commands/shuf.d.ts.map +1 -0
  97. package/dist/commands/shuf.js +221 -0
  98. package/dist/commands/shuf.js.map +1 -0
  99. package/dist/commands/sleep.d.ts +4 -0
  100. package/dist/commands/sleep.d.ts.map +1 -0
  101. package/dist/commands/sleep.js +102 -0
  102. package/dist/commands/sleep.js.map +1 -0
  103. package/dist/commands/strings.d.ts +4 -0
  104. package/dist/commands/strings.d.ts.map +1 -0
  105. package/dist/commands/strings.js +170 -0
  106. package/dist/commands/strings.js.map +1 -0
  107. package/dist/commands/tac.d.ts +4 -0
  108. package/dist/commands/tac.d.ts.map +1 -0
  109. package/dist/commands/tac.js +130 -0
  110. package/dist/commands/tac.js.map +1 -0
  111. package/dist/commands/time.d.ts +4 -0
  112. package/dist/commands/time.d.ts.map +1 -0
  113. package/dist/commands/time.js +126 -0
  114. package/dist/commands/time.js.map +1 -0
  115. package/dist/commands/umount.d.ts.map +1 -1
  116. package/dist/commands/umount.js +2 -3
  117. package/dist/commands/umount.js.map +1 -1
  118. package/dist/commands/uname.d.ts +4 -0
  119. package/dist/commands/uname.d.ts.map +1 -0
  120. package/dist/commands/uname.js +149 -0
  121. package/dist/commands/uname.js.map +1 -0
  122. package/dist/commands/unexpand.d.ts +4 -0
  123. package/dist/commands/unexpand.d.ts.map +1 -0
  124. package/dist/commands/unexpand.js +286 -0
  125. package/dist/commands/unexpand.js.map +1 -0
  126. package/dist/commands/uptime.d.ts +4 -0
  127. package/dist/commands/uptime.d.ts.map +1 -0
  128. package/dist/commands/uptime.js +62 -0
  129. package/dist/commands/uptime.js.map +1 -0
  130. package/dist/commands/yes.d.ts +4 -0
  131. package/dist/commands/yes.d.ts.map +1 -0
  132. package/dist/commands/yes.js +58 -0
  133. package/dist/commands/yes.js.map +1 -0
  134. package/dist/index.d.ts +21 -0
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +73 -0
  137. package/dist/index.js.map +1 -1
  138. package/package.json +3 -2
  139. package/src/commands/awk.ts +340 -0
  140. package/src/commands/chmod.ts +141 -2
  141. package/src/commands/chown.ts +321 -0
  142. package/src/commands/cksum.ts +133 -0
  143. package/src/commands/cmp.ts +126 -0
  144. package/src/commands/column.ts +273 -0
  145. package/src/commands/cp.ts +93 -4
  146. package/src/commands/curl.ts +231 -0
  147. package/src/commands/echo.ts +122 -2
  148. package/src/commands/expand.ts +207 -0
  149. package/src/commands/factor.ts +151 -0
  150. package/src/commands/fmt.ts +293 -0
  151. package/src/commands/fold.ts +257 -0
  152. package/src/commands/groups.ts +72 -0
  153. package/src/commands/hostname.ts +81 -0
  154. package/src/commands/mount.ts +208 -99
  155. package/src/commands/od.ts +327 -0
  156. package/src/commands/pr.ts +291 -0
  157. package/src/commands/printf.ts +271 -0
  158. package/src/commands/readlink.ts +102 -0
  159. package/src/commands/realpath.ts +126 -0
  160. package/src/commands/rev.ts +143 -0
  161. package/src/commands/shuf.ts +218 -0
  162. package/src/commands/sleep.ts +109 -0
  163. package/src/commands/strings.ts +176 -0
  164. package/src/commands/tac.ts +138 -0
  165. package/src/commands/time.ts +144 -0
  166. package/src/commands/umount.ts +2 -3
  167. package/src/commands/uname.ts +130 -0
  168. package/src/commands/unexpand.ts +305 -0
  169. package/src/commands/uptime.ts +73 -0
  170. package/src/index.ts +73 -0
  171. package/tsconfig.json +4 -0
package/src/index.ts CHANGED
@@ -10,14 +10,18 @@ export { writeStdout, writelnStdout, writeStderr, writelnStderr } from './shared
10
10
  import { createCommand as createCat } from './commands/cat.js'
11
11
  import { createCommand as createCd } from './commands/cd.js'
12
12
  import { createCommand as createChmod } from './commands/chmod.js'
13
+ import { createCommand as createChown } from './commands/chown.js'
13
14
  import { createCommand as createCp } from './commands/cp.js'
14
15
  import { createCommand as createCron } from './commands/cron.js'
15
16
  import { createCommand as createEcho } from './commands/echo.js'
16
17
  import { createCommand as createEnv } from './commands/env.js'
18
+ import { createCommand as createExpand } from './commands/expand.js'
17
19
  import { createCommand as createFetch } from './commands/fetch.js'
18
20
  import { createCommand as createGrep } from './commands/grep.js'
21
+ import { createCommand as createGroups } from './commands/groups.js'
19
22
  import { createCommand as createHash } from './commands/hash.js'
20
23
  import { createCommand as createHead } from './commands/head.js'
24
+ import { createCommand as createHostname } from './commands/hostname.js'
21
25
  import { createCommand as createLn } from './commands/ln.js'
22
26
  import { createCommand as createLs } from './commands/ls.js'
23
27
  import { createCommand as createMkdir } from './commands/mkdir.js'
@@ -27,8 +31,13 @@ import { createCommand as createMv } from './commands/mv.js'
27
31
  import { createCommand as createNc } from './commands/nc.js'
28
32
  import { createCommand as createOpen } from './commands/open.js'
29
33
  import { createCommand as createPlay } from './commands/play.js'
34
+ import { createCommand as createPr } from './commands/pr.js'
35
+ import { createCommand as createPrintf } from './commands/printf.js'
30
36
  import { createCommand as createPwd } from './commands/pwd.js'
31
37
  import { createCommand as createSockets } from './commands/sockets.js'
38
+ import { createCommand as createReadlink } from './commands/readlink.js'
39
+ import { createCommand as createRealpath } from './commands/realpath.js'
40
+ import { createCommand as createRev } from './commands/rev.js'
32
41
  import { createCommand as createRm } from './commands/rm.js'
33
42
  import { createCommand as createRmdir } from './commands/rmdir.js'
34
43
  import { createCommand as createStat } from './commands/stat.js'
@@ -38,30 +47,47 @@ import { createCommand as createLess } from './commands/less.js'
38
47
  import { createCommand as createMan } from './commands/man.js'
39
48
  import { createCommand as createPasskey } from './commands/passkey.js'
40
49
  import { createCommand as createSed } from './commands/sed.js'
50
+ import { createCommand as createShuf } from './commands/shuf.js'
41
51
  import { createCommand as createTee } from './commands/tee.js'
52
+ import { createCommand as createTac } from './commands/tac.js'
42
53
  import { createCommand as createTail } from './commands/tail.js'
43
54
  import { createCommand as createTar } from './commands/tar.js'
55
+ import { createCommand as createAwk } from './commands/awk.js'
44
56
  import { createCommand as createBasename } from './commands/basename.js'
45
57
  import { createCommand as createCal } from './commands/cal.js'
58
+ import { createCommand as createCksum } from './commands/cksum.js'
59
+ import { createCommand as createCmp } from './commands/cmp.js'
60
+ import { createCommand as createColumn } from './commands/column.js'
46
61
  import { createCommand as createComm } from './commands/comm.js'
62
+ import { createCommand as createCurl } from './commands/curl.js'
47
63
  import { createCommand as createCut } from './commands/cut.js'
48
64
  import { createCommand as createDate } from './commands/date.js'
49
65
  import { createCommand as createDiff } from './commands/diff.js'
50
66
  import { createCommand as createDirname } from './commands/dirname.js'
67
+ import { createCommand as createFactor } from './commands/factor.js'
51
68
  import { createCommand as createFalse } from './commands/false.js'
52
69
  import { createCommand as createFind } from './commands/find.js'
70
+ import { createCommand as createFold } from './commands/fold.js'
53
71
  import { createCommand as createFormat } from './commands/format.js'
72
+ import { createCommand as createFmt } from './commands/fmt.js'
54
73
  import { createCommand as createId } from './commands/id.js'
55
74
  import { createCommand as createJoin } from './commands/join.js'
56
75
  import { createCommand as createNl } from './commands/nl.js'
76
+ import { createCommand as createOd } from './commands/od.js'
57
77
  import { createCommand as createPaste } from './commands/paste.js'
58
78
  import { createCommand as createSeq } from './commands/seq.js'
79
+ import { createCommand as createSleep } from './commands/sleep.js'
59
80
  import { createCommand as createSort } from './commands/sort.js'
60
81
  import { createCommand as createSplit } from './commands/split.js'
82
+ import { createCommand as createStrings } from './commands/strings.js'
61
83
  import { createCommand as createTest } from './commands/test.js'
84
+ import { createCommand as createTime } from './commands/time.js'
62
85
  import { createCommand as createTr } from './commands/tr.js'
63
86
  import { createCommand as createTrue } from './commands/true.js'
87
+ import { createCommand as createUname } from './commands/uname.js'
64
88
  import { createCommand as createUmount } from './commands/umount.js'
89
+ import { createCommand as createUnexpand } from './commands/unexpand.js'
90
+ import { createCommand as createUptime } from './commands/uptime.js'
65
91
  import { createCommand as createUniq } from './commands/uniq.js'
66
92
  import { createCommand as createUser } from './commands/user.js'
67
93
  import { createCommand as createWc } from './commands/wc.js'
@@ -81,8 +107,10 @@ export { createCommand as createCp } from './commands/cp.js'
81
107
  export { createCommand as createCron } from './commands/cron.js'
82
108
  export { createCommand as createEcho } from './commands/echo.js'
83
109
  export { createCommand as createEnv } from './commands/env.js'
110
+ export { createCommand as createExpand } from './commands/expand.js'
84
111
  export { createCommand as createFetch } from './commands/fetch.js'
85
112
  export { createCommand as createGrep } from './commands/grep.js'
113
+ export { createCommand as createGroups } from './commands/groups.js'
86
114
  export { createCommand as createHash } from './commands/hash.js'
87
115
  export { createCommand as createLn } from './commands/ln.js'
88
116
  export { createCommand as createLs } from './commands/ls.js'
@@ -92,29 +120,48 @@ export { createCommand as createMount } from './commands/mount.js'
92
120
  export { createCommand as createMv } from './commands/mv.js'
93
121
  export { createCommand as createOpen } from './commands/open.js'
94
122
  export { createCommand as createPlay } from './commands/play.js'
123
+ export { createCommand as createPr } from './commands/pr.js'
124
+ export { createCommand as createPrintf } from './commands/printf.js'
95
125
  export { createCommand as createPwd } from './commands/pwd.js'
126
+ export { createCommand as createReadlink } from './commands/readlink.js'
127
+ export { createCommand as createRealpath } from './commands/realpath.js'
128
+ export { createCommand as createRev } from './commands/rev.js'
96
129
  export { createCommand as createRm } from './commands/rm.js'
97
130
  export { createCommand as createRmdir } from './commands/rmdir.js'
98
131
  export { createCommand as createStat } from './commands/stat.js'
132
+ export { createCommand as createStrings } from './commands/strings.js'
99
133
  export { createCommand as createTouch } from './commands/touch.js'
100
134
  export { createCommand as createHex } from './commands/hex.js'
101
135
  export { createCommand as createLess } from './commands/less.js'
102
136
  export { createCommand as createMan } from './commands/man.js'
103
137
  export { createCommand as createSed } from './commands/sed.js'
138
+ export { createCommand as createShuf } from './commands/shuf.js'
104
139
  export { createCommand as createTee } from './commands/tee.js'
140
+ export { createCommand as createTac } from './commands/tac.js'
105
141
  export { createCommand as createTail } from './commands/tail.js'
106
142
  export { createCommand as createTar } from './commands/tar.js'
143
+ export { createCommand as createAwk } from './commands/awk.js'
107
144
  export { createCommand as createBasename } from './commands/basename.js'
145
+ export { createCommand as createCksum } from './commands/cksum.js'
146
+ export { createCommand as createCmp } from './commands/cmp.js'
147
+ export { createCommand as createColumn } from './commands/column.js'
148
+ export { createCommand as createCurl } from './commands/curl.js'
108
149
  export { createCommand as createCut } from './commands/cut.js'
109
150
  export { createCommand as createDate } from './commands/date.js'
110
151
  export { createCommand as createDiff } from './commands/diff.js'
111
152
  export { createCommand as createDirname } from './commands/dirname.js'
153
+ export { createCommand as createFactor } from './commands/factor.js'
112
154
  export { createCommand as createFind } from './commands/find.js'
155
+ export { createCommand as createFold } from './commands/fold.js'
113
156
  export { createCommand as createFormat } from './commands/format.js'
157
+ export { createCommand as createFmt } from './commands/fmt.js'
158
+ export { createCommand as createSleep } from './commands/sleep.js'
114
159
  export { createCommand as createSort } from './commands/sort.js'
115
160
  export { createCommand as createTest } from './commands/test.js'
116
161
  export { createCommand as createTr } from './commands/tr.js'
162
+ export { createCommand as createUname } from './commands/uname.js'
117
163
  export { createCommand as createUmount } from './commands/umount.js'
164
+ export { createCommand as createUptime } from './commands/uptime.js'
118
165
  export { createCommand as createUniq } from './commands/uniq.js'
119
166
  export { createCommand as createUser } from './commands/user.js'
120
167
  export { createCommand as createWc } from './commands/wc.js'
@@ -135,14 +182,18 @@ export function createAllCommands(kernel: Kernel, shell: Shell, terminal: Termin
135
182
  cat: createCat(kernel, shell, terminal),
136
183
  cd: createCd(kernel, shell, terminal),
137
184
  chmod: createChmod(kernel, shell, terminal),
185
+ chown: createChown(kernel, shell, terminal),
138
186
  cp: createCp(kernel, shell, terminal),
139
187
  cron: createCron(kernel, shell, terminal),
140
188
  echo: createEcho(kernel, shell, terminal),
141
189
  env: createEnv(kernel, shell, terminal),
190
+ expand: createExpand(kernel, shell, terminal),
142
191
  fetch: createFetch(kernel, shell, terminal),
143
192
  grep: createGrep(kernel, shell, terminal),
193
+ groups: createGroups(kernel, shell, terminal),
144
194
  hash: createHash(kernel, shell, terminal),
145
195
  head: createHead(kernel, shell, terminal),
196
+ hostname: createHostname(kernel, shell, terminal),
146
197
  ln: createLn(kernel, shell, terminal),
147
198
  ls: createLs(kernel, shell, terminal),
148
199
  mkdir: createMkdir(kernel, shell, terminal),
@@ -152,41 +203,63 @@ export function createAllCommands(kernel: Kernel, shell: Shell, terminal: Termin
152
203
  nc: createNc(kernel, shell, terminal),
153
204
  open: createOpen(kernel, shell, terminal),
154
205
  play: createPlay(kernel, shell, terminal),
206
+ pr: createPr(kernel, shell, terminal),
207
+ printf: createPrintf(kernel, shell, terminal),
155
208
  pwd: createPwd(kernel, shell, terminal),
156
209
  sockets: createSockets(kernel, shell, terminal),
210
+ readlink: createReadlink(kernel, shell, terminal),
211
+ realpath: createRealpath(kernel, shell, terminal),
157
212
  rm: createRm(kernel, shell, terminal),
213
+ rev: createRev(kernel, shell, terminal),
158
214
  rmdir: createRmdir(kernel, shell, terminal),
159
215
  stat: createStat(kernel, shell, terminal),
216
+ strings: createStrings(kernel, shell, terminal),
160
217
  touch: createTouch(kernel, shell, terminal),
161
218
  hex: createHex(kernel, shell, terminal),
162
219
  less: createLess(kernel, shell, terminal),
163
220
  man: createMan(kernel, shell, terminal),
164
221
  passkey: createPasskey(kernel, shell, terminal),
165
222
  sed: createSed(kernel, shell, terminal),
223
+ shuf: createShuf(kernel, shell, terminal),
224
+ tac: createTac(kernel, shell, terminal),
166
225
  tail: createTail(kernel, shell, terminal),
167
226
  tee: createTee(kernel, shell, terminal),
227
+ awk: createAwk(kernel, shell, terminal),
168
228
  basename: createBasename(kernel, shell, terminal),
169
229
  cal: createCal(kernel, shell, terminal),
230
+ cksum: createCksum(kernel, shell, terminal),
231
+ cmp: createCmp(kernel, shell, terminal),
232
+ column: createColumn(kernel, shell, terminal),
170
233
  comm: createComm(kernel, shell, terminal),
234
+ curl: createCurl(kernel, shell, terminal),
171
235
  cut: createCut(kernel, shell, terminal),
172
236
  date: createDate(kernel, shell, terminal),
173
237
  diff: createDiff(kernel, shell, terminal),
174
238
  dirname: createDirname(kernel, shell, terminal),
239
+ factor: createFactor(kernel, shell, terminal),
175
240
  false: createFalse(kernel, shell, terminal),
176
241
  find: createFind(kernel, shell, terminal),
242
+ fold: createFold(kernel, shell, terminal),
177
243
  format: createFormat(kernel, shell, terminal),
244
+ fmt: createFmt(kernel, shell, terminal),
178
245
  id: createId(kernel, shell, terminal),
179
246
  join: createJoin(kernel, shell, terminal),
180
247
  nl: createNl(kernel, shell, terminal),
248
+ od: createOd(kernel, shell, terminal),
181
249
  paste: createPaste(kernel, shell, terminal),
182
250
  seq: createSeq(kernel, shell, terminal),
251
+ sleep: createSleep(kernel, shell, terminal),
183
252
  sort: createSort(kernel, shell, terminal),
184
253
  split: createSplit(kernel, shell, terminal),
185
254
  tar: createTar(kernel, shell, terminal),
186
255
  test: createTest(kernel, shell, terminal),
256
+ time: createTime(kernel, shell, terminal),
187
257
  tr: createTr(kernel, shell, terminal),
188
258
  true: createTrue(kernel, shell, terminal),
259
+ uname: createUname(kernel, shell, terminal),
189
260
  umount: createUmount(kernel, shell, terminal),
261
+ unexpand: createUnexpand(kernel, shell, terminal),
262
+ uptime: createUptime(kernel, shell, terminal),
190
263
  uniq: createUniq(kernel, shell, terminal),
191
264
  user: createUser(kernel, shell, terminal),
192
265
  wc: createWc(kernel, shell, terminal),
package/tsconfig.json CHANGED
@@ -12,6 +12,10 @@
12
12
  "lib": ["ESNext", "DOM", "DOM.Iterable"],
13
13
  "skipLibCheck": true,
14
14
 
15
+ "types": [
16
+ "./node_modules/user-agent-data-types"
17
+ ],
18
+
15
19
  /* Bundler mode */
16
20
  "moduleResolution": "bundler",
17
21
  "isolatedModules": true,