web2desk


Logs | Files | LICENSE | GitLab


1
commit eca4928ea8695866df307dc9fb35ca2217f4b5f2
2
Author: Connor Etherington <[email protected]>
3
Date:   Fri Mar 17 21:20:08 2023 +0200
4
5
    Auto-Commit Update 17.03.2023 - 21:20:08
6
---
7
 Makefile                                           |  42 +
8
 PKGBUILD                                           |   2 +-
9
 web2desk/usr/bin/web2desk                          | 190 +++++
10
 {usr => web2desk/usr}/share/doc/web2desk/.gitkeep  |   0
11
 .../usr}/share/licenses/web2desk/LICENSE           |   2 +-
12
 .../share/web2desk/node_modules/.yarn-integrity    |  18 +
13
 .../usr/share/web2desk/node_modules/kleur/index.js | 104 +++
14
 .../share/web2desk/node_modules/kleur/kleur.d.ts   |  45 ++
15
 .../usr/share/web2desk/node_modules/kleur/license  |  21 +
16
 .../share/web2desk/node_modules/kleur/package.json |  35 +
17
 .../share/web2desk/node_modules/kleur/readme.md    | 172 ++++
18
 .../prompts/dist/dateparts/datepart.js             |  39 +
19
 .../node_modules/prompts/dist/dateparts/day.js     |  35 +
20
 .../node_modules/prompts/dist/dateparts/hours.js   |  30 +
21
 .../node_modules/prompts/dist/dateparts/index.js   |  13 +
22
 .../prompts/dist/dateparts/meridiem.js             |  25 +
23
 .../prompts/dist/dateparts/milliseconds.js         |  28 +
24
 .../node_modules/prompts/dist/dateparts/minutes.js |  29 +
25
 .../node_modules/prompts/dist/dateparts/month.js   |  31 +
26
 .../node_modules/prompts/dist/dateparts/seconds.js |  29 +
27
 .../node_modules/prompts/dist/dateparts/year.js    |  29 +
28
 .../prompts/dist/elements/autocomplete.js          | 285 +++++++
29
 .../dist/elements/autocompleteMultiselect.js       | 201 +++++
30
 .../node_modules/prompts/dist/elements/confirm.js  |  93 +++
31
 .../node_modules/prompts/dist/elements/date.js     | 250 ++++++
32
 .../node_modules/prompts/dist/elements/index.js    |  13 +
33
 .../prompts/dist/elements/multiselect.js           | 289 +++++++
34
 .../node_modules/prompts/dist/elements/number.js   | 250 ++++++
35
 .../node_modules/prompts/dist/elements/prompt.js   |  82 ++
36
 .../node_modules/prompts/dist/elements/select.js   | 190 +++++
37
 .../node_modules/prompts/dist/elements/text.js     | 245 ++++++
38
 .../node_modules/prompts/dist/elements/toggle.js   | 124 +++
39
 .../web2desk/node_modules/prompts/dist/index.js    | 154 ++++
40
 .../web2desk/node_modules/prompts/dist/prompts.js  | 222 ++++++
41
 .../node_modules/prompts/dist/util/action.js       |  38 +
42
 .../node_modules/prompts/dist/util/clear.js        |  42 +
43
 .../prompts/dist/util/entriesToDisplay.js          |  21 +
44
 .../node_modules/prompts/dist/util/figures.js      |  32 +
45
 .../node_modules/prompts/dist/util/index.js        |  12 +
46
 .../node_modules/prompts/dist/util/lines.js        |  14 +
47
 .../node_modules/prompts/dist/util/strip.js        |   7 +
48
 .../node_modules/prompts/dist/util/style.js        |  51 ++
49
 .../node_modules/prompts/dist/util/wrap.js         |  16 +
50
 .../share/web2desk/node_modules/prompts/index.js   |  14 +
51
 .../node_modules/prompts/lib/dateparts/datepart.js |  35 +
52
 .../node_modules/prompts/lib/dateparts/day.js      |  42 +
53
 .../node_modules/prompts/lib/dateparts/hours.js    |  30 +
54
 .../node_modules/prompts/lib/dateparts/index.js    |  13 +
55
 .../node_modules/prompts/lib/dateparts/meridiem.js |  24 +
56
 .../prompts/lib/dateparts/milliseconds.js          |  28 +
57
 .../node_modules/prompts/lib/dateparts/minutes.js  |  28 +
58
 .../node_modules/prompts/lib/dateparts/month.js    |  33 +
59
 .../node_modules/prompts/lib/dateparts/seconds.js  |  28 +
60
 .../node_modules/prompts/lib/dateparts/year.js     |  28 +
61
 .../prompts/lib/elements/autocomplete.js           | 264 ++++++
62
 .../lib/elements/autocompleteMultiselect.js        | 194 +++++
63
 .../node_modules/prompts/lib/elements/confirm.js   |  89 +++
64
 .../node_modules/prompts/lib/elements/date.js      | 209 +++++
65
 .../node_modules/prompts/lib/elements/index.js     |  13 +
66
 .../prompts/lib/elements/multiselect.js            | 271 +++++++
67
 .../node_modules/prompts/lib/elements/number.js    | 213 +++++
68
 .../node_modules/prompts/lib/elements/prompt.js    |  68 ++
69
 .../node_modules/prompts/lib/elements/select.js    | 175 ++++
70
 .../node_modules/prompts/lib/elements/text.js      | 208 +++++
71
 .../node_modules/prompts/lib/elements/toggle.js    | 118 +++
72
 .../web2desk/node_modules/prompts/lib/index.js     |  98 +++
73
 .../web2desk/node_modules/prompts/lib/prompts.js   | 206 +++++
74
 .../node_modules/prompts/lib/util/action.js        |  39 +
75
 .../node_modules/prompts/lib/util/clear.js         |  22 +
76
 .../prompts/lib/util/entriesToDisplay.js           |  21 +
77
 .../node_modules/prompts/lib/util/figures.js       |  33 +
78
 .../node_modules/prompts/lib/util/index.js         |  12 +
79
 .../node_modules/prompts/lib/util/lines.js         |  15 +
80
 .../node_modules/prompts/lib/util/strip.js         |  11 +
81
 .../node_modules/prompts/lib/util/style.js         |  40 +
82
 .../web2desk/node_modules/prompts/lib/util/wrap.js |  27 +
83
 .../share/web2desk/node_modules/prompts/license    |  21 +
84
 .../web2desk/node_modules/prompts/package.json     |  53 ++
85
 .../share/web2desk/node_modules/prompts/readme.md  | 882 +++++++++++++++++++++
86
 .../share/web2desk/node_modules/sisteransi/license |  21 +
87
 .../web2desk/node_modules/sisteransi/package.json  |  34 +
88
 .../web2desk/node_modules/sisteransi/readme.md     | 113 +++
89
 .../web2desk/node_modules/sisteransi/src/index.js  |  58 ++
90
 .../node_modules/sisteransi/src/sisteransi.d.ts    |  35 +
91
 84 files changed, 7414 insertions(+), 2 deletions(-)
92
93
diff --git a/Makefile b/Makefile
94
new file mode 100644
95
index 0000000..dce10f8
96
--- /dev/null
97
+++ b/Makefile
98
@@ -0,0 +1,42 @@
99
+
100
+PKG = web2desk
101
+
102
+INFO = $(shell uname -a)
103
+OST = $(shell lsb_release -d | sed 's|Description:\s*||')
104
+OS = $(shell lsb_release -d | sed 's|Description:\s*||'|cut -d\  -f1)
105
+
106
+FILES = $(shell for file in $(find ${PKG} -type f); do rm -rfv ${file}; done)
107
+DIRS = $(shell for loc in usr share licenses; do rmdir ${PKGDIR}/$loc/web2desk || continue ; done)
108
+
109
+ifeq ($(OS),Ubuntu)
110
+	PACKAGE_MANAGER = apt
111
+endif
112
+
113
+ifeq ($(OS),Debian)
114
+	PACKAGE_MANAGER = apt
115
+endif
116
+
117
+ifeq ($(OS),Arch)
118
+	PACKAGE_MANAGER = pacman
119
+endif
120
+
121
+ifeq ($(PACKAGE_MANAGER),)
122
+$(error >   Unsupported OS: ${OST})
123
+endif
124
+
125
+all: info web2desk
126
+
127
+
128
+web2desk:
129
+	@echo -e "\n\e[1;33m[+]\e[0m Installing ${PKG}...\n"
130
+	@cp -rvf ${PKG} ${PKGDIR}/ || true
131
+	@[ ! -d ${PKGDIR}/usr/share/web2desk ] && echo -e "\n\e[1;31m[-]\e[0m Please ensure you have sufficient premission to install ${PKG}." || true
132
+
133
+
134
+install: all
135
+
136
+info:
137
+	@echo -e "\n\e[1;33m[*]\e[0m ${INFO}"
138
+
139
+.PHONY: all web2desk install clean uninstall info
140
+
141
diff --git a/PKGBUILD b/PKGBUILD
142
index b4f4850..fa25072 100644
143
--- a/PKGBUILD
144
+++ b/PKGBUILD
145
@@ -13,5 +13,5 @@ sha256sums=('SKIP')
146
 
147
 package() {
148
   cd "$srcdir/$pkgname"
149
-  make DESTDIR="$pkgdir" clean install
150
+  make DESTDIR="$pkgdir" install
151
 }
152
diff --git a/web2desk/usr/bin/web2desk b/web2desk/usr/bin/web2desk
153
new file mode 100755
154
index 0000000..731db9b
155
--- /dev/null
156
+++ b/web2desk/usr/bin/web2desk
157
@@ -0,0 +1,190 @@
158
+#!/usr/bin/env node
159
+
160
+const prompts = require('/usr/share/web2desk/node_modules/prompts');
161
+const fs = require('fs');
162
+const path = require('path');
163
+
164
+const sh = (cmd) => { return new Promise((resolve, reject) => {
165
+  require('child_process').exec(cmd, (err, stdout, stderr) => {
166
+  if (err) { reject(err); }
167
+  else { resolve(stdout); }
168
+  });
169
+})};
170
+
171
+let exists = false;
172
+
173
+(async () => {
174
+  const Prompts = [
175
+    {
176
+      type: 'text',
177
+      name: 'name',
178
+      message: 'Name'
179
+    },
180
+    {
181
+      type: 'text',
182
+      name: 'url',
183
+      message: 'URL'
184
+    }
185
+  ];
186
+
187
+  const response = await prompts(Prompts);
188
+
189
+  if (!response.name || !response.url) {
190
+    process.exit(0);
191
+  }
192
+
193
+  const config = {
194
+    name: response.name,
195
+    url: response.url
196
+  };
197
+
198
+  const data = JSON.stringify(config, null, 2);
199
+
200
+  const homeDir = await sh('echo -n $HOME');
201
+  const baseDir = path.join(homeDir, '.local/share/WebApps/baseDir');
202
+  const webAppsDir = path.join(homeDir, '.local/share/WebApps');
203
+  const appDir = path.join(webAppsDir, response.name);
204
+  const binDir = path.join(webAppsDir, 'bin');
205
+  const appBin = path.join(binDir, response.name);
206
+  const configFile = path.join(appDir, 'config.json');
207
+  const pJson = path.join(appDir, 'package.json');
208
+
209
+  const packageJson = {
210
+    name: response.name,
211
+    productName: response.name,
212
+    version: "0.1.0",
213
+    main: "main.js",
214
+    scripts: {
215
+      start: "../node_modules/electron/dist/electron ."
216
+    },
217
+    author: "Connor Etherington <[email protected]>",
218
+    license: "MIT/X Consortium",
219
+    keywords: []
220
+  };
221
+
222
+  const MAIN = `
223
+const { app, BrowserWindow, Menu, session } = require('electron');
224
+const path = require('path');
225
+const fs = require('fs');
226
+const cookiesFile = path.join(__dirname, 'cookies.json');
227
+
228
+let { name, url } = require('./config.json');
229
+
230
+name = name.slice(0, 1).toUpperCase() + name.slice(1);
231
+
232
+const mkMainWin = () => {
233
+  const mWin = new BrowserWindow({
234
+    title: name,
235
+    width: 800,
236
+    height: 600
237
+  })
238
+  session.defaultSession.on('will-download', (event, item, webContents) => {
239
+    event.preventDefault()
240
+    require('got')(item.getURL()).then((response) => {
241
+      require('fs').writeFileSync(cookiesFile, response.body);
242
+    })
243
+  })
244
+  mWin.loadURL(url);
245
+  return mWin;
246
+}
247
+
248
+
249
+if (fs.existsSync(cookiesFile)) {
250
+  const cookies = JSON.parse(fs.readFileSync(cookiesFile, 'utf8'));
251
+  session.defaultSession.cookies.set(cookies, (error) => {
252
+    if (error) {
253
+      console.error(error);
254
+    }
255
+  });
256
+} else {
257
+  console.log('No cookies file found');
258
+}
259
+
260
+const menu = [
261
+  {
262
+    label: name,
263
+    submenu: [
264
+      {
265
+        label: 'Reload',
266
+        accelerator: 'CmdOrCtrl+R',
267
+        click:  () => {
268
+          BrowserWindow.getFocusedWindow().reload()
269
+          }
270
+        },
271
+      {
272
+        label: 'Clear Cache',
273
+        accelerator: 'CmdOrCtrl+Shift+R',
274
+        click:  () => {
275
+          BrowserWindow.getFocusedWindow().webContents.session.clearCache(() => {})
276
+          }
277
+        },
278
+      {
279
+        label: 'Clear Cookies',
280
+        accelerator: 'CmdOrCtrl+Shift+C',
281
+        click:  () => {
282
+          BrowserWindow.getFocusedWindow().webContents.session.clearStorageData(() => {})
283
+          }
284
+        },
285
+    ]
286
+  }
287
+]
288
+
289
+app.on('ready', () => {
290
+  mkMainWin().
291
+  Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
292
+})
293
+
294
+app.on('window-all-closed', () => {
295
+  if (process.platform !== 'darwin') {
296
+    app.quit()
297
+  }
298
+})
299
+
300
+app.on('activate', () => {
301
+  if (BrowserWindow.getAllWindows().length === 0) {
302
+    mkMainWin()
303
+  }
304
+})
305
+
306
+app.on('before-quit', () => {
307
+  session.defaultSession.cookies.get({}, (error, cookies) => {
308
+    if (error) {
309
+      console.error(error);
310
+    } else {
311
+      fs.writeFileSync(cookiesFile, JSON.stringify(cookies));
312
+    }
313
+  });
314
+});
315
+`;
316
+
317
+  if (!fs.existsSync(baseDir)) {
318
+    fs.mkdirSync(baseDir);
319
+  }
320
+
321
+  if (!fs.existsSync(binDir)) {
322
+    fs.mkdirSync(binDir);
323
+  }
324
+
325
+  if (!fs.existsSync(webAppsDir)) {
326
+    fs.mkdirSync(webAppsDir);
327
+  }
328
+
329
+  if (fs.existsSync(appDir)) {
330
+    exists = true;
331
+  }
332
+
333
+  if (!exists) {
334
+    await fs.mkdirSync(appDir);
335
+    await fs.writeFileSync(configFile, data);
336
+    await fs.writeFileSync(appBin, `#!/usr/bin/env bash\n\npwdir=$PWD ; cd ${appDir} ; yarn start >/dev/null 2>&1 & disown ; cd $pwdir`);
337
+    await fs.chmodSync(appBin, '755');
338
+    await fs.writeFileSync(pJson, JSON.stringify(packageJson, null, 2));
339
+    await fs.writeFileSync(path.join(appDir, 'main.js'), MAIN);
340
+    await sh(`install -Dm644 ${appBin} /usr/local/bin/$(basename ${appBin})`);
341
+    console.log('Desktop App Created!');
342
+  } else {
343
+    console.log('App already exists');
344
+  }
345
+
346
+})();
347
+
348
diff --git a/usr/share/doc/web2desk/.gitkeep b/web2desk/usr/share/doc/web2desk/.gitkeep
349
similarity index 100%
350
rename from usr/share/doc/web2desk/.gitkeep
351
rename to web2desk/usr/share/doc/web2desk/.gitkeep
352
diff --git a/usr/share/licenses/web2desk/LICENSE b/web2desk/usr/share/licenses/web2desk/LICENSE
353
similarity index 95%
354
rename from usr/share/licenses/web2desk/LICENSE
355
rename to web2desk/usr/share/licenses/web2desk/LICENSE
356
index 276f429..feb05d9 100644
357
--- a/usr/share/licenses/web2desk/LICENSE
358
+++ b/web2desk/usr/share/licenses/web2desk/LICENSE
359
@@ -1,7 +1,7 @@
360
 MIT/X Consortium License
361
 
362
 Creator /Maintainer :
363
-© 2020-2022 Connor Etherington <[email protected]>
364
+© 2023 Connor Etherington <[email protected]>
365
 ---------------------------------------------------------------------------
366
 Contributors:
367
 
368
diff --git a/web2desk/usr/share/web2desk/node_modules/.yarn-integrity b/web2desk/usr/share/web2desk/node_modules/.yarn-integrity
369
new file mode 100644
370
index 0000000..f4fff18
371
--- /dev/null
372
+++ b/web2desk/usr/share/web2desk/node_modules/.yarn-integrity
373
@@ -0,0 +1,18 @@
374
+{
375
+  "systemParams": "linux-x64-93",
376
+  "modulesFolders": [
377
+    "node_modules"
378
+  ],
379
+  "flags": [],
380
+  "linkedModules": [],
381
+  "topLevelPatterns": [
382
+    "prompts@^2.4.2"
383
+  ],
384
+  "lockfileEntries": {
385
+    "kleur@^3.0.3": "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e",
386
+    "prompts@^2.4.2": "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069",
387
+    "sisteransi@^1.0.5": "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
388
+  },
389
+  "files": [],
390
+  "artifacts": {}
391
+}
392
diff --git a/web2desk/usr/share/web2desk/node_modules/kleur/index.js b/web2desk/usr/share/web2desk/node_modules/kleur/index.js
393
new file mode 100644
394
index 0000000..0bc6ec9
395
--- /dev/null
396
+++ b/web2desk/usr/share/web2desk/node_modules/kleur/index.js
397
@@ -0,0 +1,104 @@
398
+'use strict';
399
+
400
+const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
401
+
402
+const $ = {
403
+	enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0',
404
+
405
+	// modifiers
406
+	reset: init(0, 0),
407
+	bold: init(1, 22),
408
+	dim: init(2, 22),
409
+	italic: init(3, 23),
410
+	underline: init(4, 24),
411
+	inverse: init(7, 27),
412
+	hidden: init(8, 28),
413
+	strikethrough: init(9, 29),
414
+
415
+	// colors
416
+	black: init(30, 39),
417
+	red: init(31, 39),
418
+	green: init(32, 39),
419
+	yellow: init(33, 39),
420
+	blue: init(34, 39),
421
+	magenta: init(35, 39),
422
+	cyan: init(36, 39),
423
+	white: init(37, 39),
424
+	gray: init(90, 39),
425
+	grey: init(90, 39),
426
+
427
+	// background colors
428
+	bgBlack: init(40, 49),
429
+	bgRed: init(41, 49),
430
+	bgGreen: init(42, 49),
431
+	bgYellow: init(43, 49),
432
+	bgBlue: init(44, 49),
433
+	bgMagenta: init(45, 49),
434
+	bgCyan: init(46, 49),
435
+	bgWhite: init(47, 49)
436
+};
437
+
438
+function run(arr, str) {
439
+	let i=0, tmp, beg='', end='';
440
+	for (; i < arr.length; i++) {
441
+		tmp = arr[i];
442
+		beg += tmp.open;
443
+		end += tmp.close;
444
+		if (str.includes(tmp.close)) {
445
+			str = str.replace(tmp.rgx, tmp.close + tmp.open);
446
+		}
447
+	}
448
+	return beg + str + end;
449
+}
450
+
451
+function chain(has, keys) {
452
+	let ctx = { has, keys };
453
+
454
+	ctx.reset = $.reset.bind(ctx);
455
+	ctx.bold = $.bold.bind(ctx);
456
+	ctx.dim = $.dim.bind(ctx);
457
+	ctx.italic = $.italic.bind(ctx);
458
+	ctx.underline = $.underline.bind(ctx);
459
+	ctx.inverse = $.inverse.bind(ctx);
460
+	ctx.hidden = $.hidden.bind(ctx);
461
+	ctx.strikethrough = $.strikethrough.bind(ctx);
462
+
463
+	ctx.black = $.black.bind(ctx);
464
+	ctx.red = $.red.bind(ctx);
465
+	ctx.green = $.green.bind(ctx);
466
+	ctx.yellow = $.yellow.bind(ctx);
467
+	ctx.blue = $.blue.bind(ctx);
468
+	ctx.magenta = $.magenta.bind(ctx);
469
+	ctx.cyan = $.cyan.bind(ctx);
470
+	ctx.white = $.white.bind(ctx);
471
+	ctx.gray = $.gray.bind(ctx);
472
+	ctx.grey = $.grey.bind(ctx);
473
+
474
+	ctx.bgBlack = $.bgBlack.bind(ctx);
475
+	ctx.bgRed = $.bgRed.bind(ctx);
476
+	ctx.bgGreen = $.bgGreen.bind(ctx);
477
+	ctx.bgYellow = $.bgYellow.bind(ctx);
478
+	ctx.bgBlue = $.bgBlue.bind(ctx);
479
+	ctx.bgMagenta = $.bgMagenta.bind(ctx);
480
+	ctx.bgCyan = $.bgCyan.bind(ctx);
481
+	ctx.bgWhite = $.bgWhite.bind(ctx);
482
+
483
+	return ctx;
484
+}
485
+
486
+function init(open, close) {
487
+	let blk = {
488
+		open: `\x1b[${open}m`,
489
+		close: `\x1b[${close}m`,
490
+		rgx: new RegExp(`\\x1b\\[${close}m`, 'g')
491
+	};
492
+	return function (txt) {
493
+		if (this !== void 0 && this.has !== void 0) {
494
+			this.has.includes(open) || (this.has.push(open),this.keys.push(blk));
495
+			return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';
496
+		}
497
+		return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';
498
+	};
499
+}
500
+
501
+module.exports = $;
502
diff --git a/web2desk/usr/share/web2desk/node_modules/kleur/kleur.d.ts b/web2desk/usr/share/web2desk/node_modules/kleur/kleur.d.ts
503
new file mode 100644
504
index 0000000..fdc26ca
505
--- /dev/null
506
+++ b/web2desk/usr/share/web2desk/node_modules/kleur/kleur.d.ts
507
@@ -0,0 +1,45 @@
508
+// Originally by: Rogier Schouten <https://github.com/rogierschouten>
509
+// Adapted by: Madhav Varshney <https://github.com/madhavarshney>
510
+declare namespace kleur {
511
+	interface Color {
512
+		(x: string | number): string;
513
+		(): Kleur;
514
+	}
515
+
516
+	interface Kleur {
517
+		// Colors
518
+		black: Color;
519
+		red: Color;
520
+		green: Color;
521
+		yellow: Color;
522
+		blue: Color;
523
+		magenta: Color;
524
+		cyan: Color;
525
+		white: Color;
526
+		gray: Color;
527
+		grey: Color;
528
+
529
+		// Backgrounds
530
+		bgBlack: Color;
531
+		bgRed: Color;
532
+		bgGreen: Color;
533
+		bgYellow: Color;
534
+		bgBlue: Color;
535
+		bgMagenta: Color;
536
+		bgCyan: Color;
537
+		bgWhite: Color;
538
+
539
+		// Modifiers
540
+		reset: Color;
541
+		bold: Color;
542
+		dim: Color;
543
+		italic: Color;
544
+		underline: Color;
545
+		inverse: Color;
546
+		hidden: Color;
547
+		strikethrough: Color;
548
+	}
549
+}
550
+
551
+declare let kleur: kleur.Kleur & { enabled: boolean };
552
+export = kleur;
553
diff --git a/web2desk/usr/share/web2desk/node_modules/kleur/license b/web2desk/usr/share/web2desk/node_modules/kleur/license
554
new file mode 100644
555
index 0000000..a3f96f8
556
--- /dev/null
557
+++ b/web2desk/usr/share/web2desk/node_modules/kleur/license
558
@@ -0,0 +1,21 @@
559
+The MIT License (MIT)
560
+
561
+Copyright (c) Luke Edwards <[email protected]> (lukeed.com)
562
+
563
+Permission is hereby granted, free of charge, to any person obtaining a copy
564
+of this software and associated documentation files (the "Software"), to deal
565
+in the Software without restriction, including without limitation the rights
566
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
567
+copies of the Software, and to permit persons to whom the Software is
568
+furnished to do so, subject to the following conditions:
569
+
570
+The above copyright notice and this permission notice shall be included in
571
+all copies or substantial portions of the Software.
572
+
573
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
574
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
575
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
576
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
577
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
578
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
579
+THE SOFTWARE.
580
diff --git a/web2desk/usr/share/web2desk/node_modules/kleur/package.json b/web2desk/usr/share/web2desk/node_modules/kleur/package.json
581
new file mode 100644
582
index 0000000..a81931e
583
--- /dev/null
584
+++ b/web2desk/usr/share/web2desk/node_modules/kleur/package.json
585
@@ -0,0 +1,35 @@
586
+{
587
+  "name": "kleur",
588
+  "version": "3.0.3",
589
+  "repository": "lukeed/kleur",
590
+  "description": "The fastest Node.js library for formatting terminal text with ANSI colors~!",
591
+  "license": "MIT",
592
+  "files": [
593
+    "*.js",
594
+    "*.d.ts"
595
+  ],
596
+  "author": {
597
+    "name": "Luke Edwards",
598
+    "email": "[email protected]",
599
+    "url": "lukeed.com"
600
+  },
601
+  "scripts": {
602
+    "test": "tape test/*.js | tap-spec"
603
+  },
604
+  "engines": {
605
+    "node": ">=6"
606
+  },
607
+  "keywords": [
608
+    "ansi",
609
+    "cli",
610
+    "color",
611
+    "colors",
612
+    "console",
613
+    "terminal"
614
+  ],
615
+  "types": "kleur.d.ts",
616
+  "devDependencies": {
617
+    "tap-spec": "^5.0.0",
618
+    "tape": "^4.9.1"
619
+  }
620
+}
621
diff --git a/web2desk/usr/share/web2desk/node_modules/kleur/readme.md b/web2desk/usr/share/web2desk/node_modules/kleur/readme.md
622
new file mode 100644
623
index 0000000..6926f1e
624
--- /dev/null
625
+++ b/web2desk/usr/share/web2desk/node_modules/kleur/readme.md
626
@@ -0,0 +1,172 @@
627
+<div align="center">
628
+  <img src="shots/logo.png" alt="kleur" height="120" />
629
+</div>
630
+
631
+<div align="center">
632
+  <a href="https://npmjs.org/package/kleur">
633
+    <img src="https://badgen.now.sh/npm/v/kleur" alt="version" />
634
+  </a>
635
+  <a href="https://travis-ci.org/lukeed/kleur">
636
+    <img src="https://badgen.now.sh/travis/lukeed/kleur" alt="travis" />
637
+  </a>
638
+  <a href="https://npmjs.org/package/kleur">
639
+    <img src="https://badgen.now.sh/npm/dm/kleur" alt="downloads" />
640
+  </a>
641
+  <a href="https://packagephobia.now.sh/result?p=kleur">
642
+    <img src="https://packagephobia.now.sh/badge?p=kleur" alt="install size" />
643
+  </a>
644
+</div>
645
+
646
+<div align="center">The fastest Node.js library for formatting terminal text with ANSI colors~!</div>
647
+
648
+## Features
649
+
650
+* No dependencies
651
+* Super [lightweight](#load-time) & [performant](#performance)
652
+* Supports [nested](#nested-methods) & [chained](#chained-methods) colors
653
+* No `String.prototype` modifications
654
+* Conditional [color support](#conditional-support)
655
+* Familiar [API](#api)
656
+
657
+---
658
+
659
+As of `v3.0` the Chalk-style syntax (magical getter) is no longer used.<br>If you need or require that syntax, consider using [`ansi-colors`](https://github.com/doowb/ansi-colors), which maintains `chalk` parity.
660
+
661
+---
662
+
663
+
664
+## Install
665
+
666
+```
667
+$ npm install --save kleur
668
+```
669
+
670
+
671
+## Usage
672
+
673
+```js
674
+const { red, white, blue, bold } = require('kleur');
675
+
676
+// basic usage
677
+red('red text');
678
+
679
+// chained methods
680
+blue().bold().underline('howdy partner');
681
+
682
+// nested methods
683
+bold(`${ white().bgRed('[ERROR]') } ${ red().italic('Something happened')}`);
684
+```
685
+
686
+### Chained Methods
687
+
688
+```js
689
+console.log(bold().red('this is a bold red message'));
690
+console.log(bold().italic('this is a bold italicized message'));
691
+console.log(bold().yellow().bgRed().italic('this is a bold yellow italicized message'));
692
+console.log(green().bold().underline('this is a bold green underlined message'));
693
+```
694
+
695
+<img src="shots/1.png" width="300" />
696
+
697
+### Nested Methods
698
+
699
+```js
700
+const { yellow, red, cyan } = require('kleur');
701
+
702
+console.log(yellow(`foo ${red().bold('red')} bar ${cyan('cyan')} baz`));
703
+console.log(yellow('foo ' + red().bold('red') + ' bar ' + cyan('cyan') + ' baz'));
704
+```
705
+
706
+<img src="shots/2.png" width="300" />
707
+
708
+
709
+### Conditional Support
710
+
711
+Toggle color support as needed; `kleur` includes simple auto-detection which may not cover all cases.
712
+
713
+```js
714
+const kleur = require('kleur');
715
+
716
+// manually disable
717
+kleur.enabled = false;
718
+
719
+// or use another library to detect support
720
+kleur.enabled = require('color-support').level;
721
+
722
+console.log(kleur.red('I will only be colored red if the terminal supports colors'));
723
+```
724
+
725
+
726
+## API
727
+
728
+Any `kleur` method returns a `String` when invoked with input; otherwise chaining is expected.
729
+
730
+> It's up to the developer to pass the output to destinations like `console.log`, `process.stdout.write`, etc.
731
+
732
+The methods below are grouped by type for legibility purposes only. They each can be [chained](#chained-methods) or [nested](#nested-methods) with one another.
733
+
734
+***Colors:***
735
+> black &mdash; red &mdash; green &mdash; yellow &mdash; blue &mdash; magenta &mdash; cyan &mdash; white &mdash; gray &mdash; grey
736
+
737
+***Backgrounds:***
738
+> bgBlack &mdash; bgRed &mdash; bgGreen &mdash; bgYellow &mdash; bgBlue &mdash; bgMagenta &mdash; bgCyan &mdash; bgWhite
739
+
740
+***Modifiers:***
741
+> reset &mdash; bold &mdash; dim &mdash; italic* &mdash; underline &mdash; inverse &mdash; hidden &mdash; strikethrough*
742
+
743
+<sup>* <em>Not widely supported</em></sup>
744
+
745
+
746
+## Benchmarks
747
+
748
+> Using Node v10.13.0
749
+
750
+### Load time
751
+
752
+```
753
+chalk       :: 14.543ms
754
+kleur       ::  0.474ms
755
+ansi-colors ::  1.923ms
756
+```
757
+
758
+### Performance
759
+
760
+```
761
+# All Colors
762
+  ansi-colors  x 199,381 ops/sec ±1.04% (96 runs sampled)
763
+  chalk        x  12,107 ops/sec ±2.07% (87 runs sampled)
764
+  kleur        x 715,334 ops/sec ±0.30% (93 runs sampled)
765
+
766
+# Stacked colors
767
+  ansi-colors  x 24,494 ops/sec ±1.03% (93 runs sampled)
768
+  chalk        x  2,650 ops/sec ±2.06% (85 runs sampled)
769
+  kleur        x 75,798 ops/sec ±0.19% (97 runs sampled)
770
+
771
+# Nested colors
772
+  ansi-colors  x  77,766 ops/sec ±0.32% (94 runs sampled)
773
+  chalk        x   5,596 ops/sec ±1.85% (86 runs sampled)
774
+  kleur        x 137,660 ops/sec ±0.31% (93 runs sampled)
775
+```
776
+
777
+
778
+## Credits
779
+
780
+This project originally forked [Brian Woodward](https://github.com/doowb)'s awesome [`ansi-colors`](https://github.com/doowb/ansi-colors) library.
781
+
782
+Beginning with `[email protected]`, the Chalk-style syntax (magical getter) has been replaced with function calls per key:
783
+
784
+```js
785
+// Old:
786
+c.red.bold.underline('old');
787
+
788
+// New:
789
+c.red().bold().underline('new');
790
+```
791
+> <sup><em>As I work more with Rust, the newer syntax feels so much better & more natural!</em></sup>
792
+
793
+If you prefer the old syntax, you may migrate to `ansi-colors`. Versions below `[email protected]` have been deprecated.
794
+
795
+
796
+## License
797
+
798
+MIT © [Luke Edwards](https://lukeed.com)
799
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/datepart.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/datepart.js
800
new file mode 100644
801
index 0000000..b954c5e
802
--- /dev/null
803
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/datepart.js
804
@@ -0,0 +1,39 @@
805
+'use strict';
806
+
807
+class DatePart {
808
+  constructor({
809
+    token,
810
+    date,
811
+    parts,
812
+    locales
813
+  }) {
814
+    this.token = token;
815
+    this.date = date || new Date();
816
+    this.parts = parts || [this];
817
+    this.locales = locales || {};
818
+  }
819
+
820
+  up() {}
821
+
822
+  down() {}
823
+
824
+  next() {
825
+    const currentIdx = this.parts.indexOf(this);
826
+    return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
827
+  }
828
+
829
+  setTo(val) {}
830
+
831
+  prev() {
832
+    let parts = [].concat(this.parts).reverse();
833
+    const currentIdx = parts.indexOf(this);
834
+    return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
835
+  }
836
+
837
+  toString() {
838
+    return String(this.date);
839
+  }
840
+
841
+}
842
+
843
+module.exports = DatePart;
844
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/day.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/day.js
845
new file mode 100644
846
index 0000000..a525e92
847
--- /dev/null
848
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/day.js
849
@@ -0,0 +1,35 @@
850
+'use strict';
851
+
852
+const DatePart = require('./datepart');
853
+
854
+const pos = n => {
855
+  n = n % 10;
856
+  return n === 1 ? 'st' : n === 2 ? 'nd' : n === 3 ? 'rd' : 'th';
857
+};
858
+
859
+class Day extends DatePart {
860
+  constructor(opts = {}) {
861
+    super(opts);
862
+  }
863
+
864
+  up() {
865
+    this.date.setDate(this.date.getDate() + 1);
866
+  }
867
+
868
+  down() {
869
+    this.date.setDate(this.date.getDate() - 1);
870
+  }
871
+
872
+  setTo(val) {
873
+    this.date.setDate(parseInt(val.substr(-2)));
874
+  }
875
+
876
+  toString() {
877
+    let date = this.date.getDate();
878
+    let day = this.date.getDay();
879
+    return this.token === 'DD' ? String(date).padStart(2, '0') : this.token === 'Do' ? date + pos(date) : this.token === 'd' ? day + 1 : this.token === 'ddd' ? this.locales.weekdaysShort[day] : this.token === 'dddd' ? this.locales.weekdays[day] : date;
880
+  }
881
+
882
+}
883
+
884
+module.exports = Day;
885
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/hours.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/hours.js
886
new file mode 100644
887
index 0000000..7743632
888
--- /dev/null
889
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/hours.js
890
@@ -0,0 +1,30 @@
891
+'use strict';
892
+
893
+const DatePart = require('./datepart');
894
+
895
+class Hours extends DatePart {
896
+  constructor(opts = {}) {
897
+    super(opts);
898
+  }
899
+
900
+  up() {
901
+    this.date.setHours(this.date.getHours() + 1);
902
+  }
903
+
904
+  down() {
905
+    this.date.setHours(this.date.getHours() - 1);
906
+  }
907
+
908
+  setTo(val) {
909
+    this.date.setHours(parseInt(val.substr(-2)));
910
+  }
911
+
912
+  toString() {
913
+    let hours = this.date.getHours();
914
+    if (/h/.test(this.token)) hours = hours % 12 || 12;
915
+    return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;
916
+  }
917
+
918
+}
919
+
920
+module.exports = Hours;
921
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/index.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/index.js
922
new file mode 100644
923
index 0000000..754516e
924
--- /dev/null
925
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/index.js
926
@@ -0,0 +1,13 @@
927
+'use strict';
928
+
929
+module.exports = {
930
+  DatePart: require('./datepart'),
931
+  Meridiem: require('./meridiem'),
932
+  Day: require('./day'),
933
+  Hours: require('./hours'),
934
+  Milliseconds: require('./milliseconds'),
935
+  Minutes: require('./minutes'),
936
+  Month: require('./month'),
937
+  Seconds: require('./seconds'),
938
+  Year: require('./year')
939
+};
940
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/meridiem.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/meridiem.js
941
new file mode 100644
942
index 0000000..5bc8dd7
943
--- /dev/null
944
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/meridiem.js
945
@@ -0,0 +1,25 @@
946
+'use strict';
947
+
948
+const DatePart = require('./datepart');
949
+
950
+class Meridiem extends DatePart {
951
+  constructor(opts = {}) {
952
+    super(opts);
953
+  }
954
+
955
+  up() {
956
+    this.date.setHours((this.date.getHours() + 12) % 24);
957
+  }
958
+
959
+  down() {
960
+    this.up();
961
+  }
962
+
963
+  toString() {
964
+    let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';
965
+    return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;
966
+  }
967
+
968
+}
969
+
970
+module.exports = Meridiem;
971
diff --git a/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/milliseconds.js b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/milliseconds.js
972
new file mode 100644
973
index 0000000..3440e3a
974
--- /dev/null
975
+++ b/web2desk/usr/share/web2desk/node_modules/prompts/dist/dateparts/milliseconds.js
976
@@ -0,0 +1,28 @@
977
+'use strict';
978
+
979
+const DatePart = require('./datepart');
980
+
981
+class Milliseconds extends DatePart {
982
+  constructor(opts = {}) {
983
+    super(opts);
984
+  }
985
+
986
+  up() {
987
+    this.date.setMilliseconds(this.date.getMilliseconds() + 1);
988
+  }
989
+
990
+  down() {
991
+    this.date.setMilliseconds(this.date.getMilliseconds() - 1);
992
+  }
993
+
994
+  setTo(val) {
995
+    this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));
996
+  }
997
+
998
+  toString() {
999
+    return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length);