@aneuhold/core-ts-lib 1.0.8 → 1.0.10
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/helperFunctions/dateFunctions.d.ts +9 -9
- package/lib/helperFunctions/dateFunctions.js +15 -15
- package/lib/helperFunctions/sleep.d.ts +6 -6
- package/lib/helperFunctions/sleep.js +12 -12
- package/lib/helperFunctions/stringFunctions.d.ts +8 -8
- package/lib/helperFunctions/stringFunctions.js +13 -13
- package/lib/index.d.ts +12 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +54 -52
- package/lib/services/CLIService.d.ts +68 -68
- package/lib/services/CLIService.js +194 -194
- package/lib/services/StringService.d.ts +13 -13
- package/lib/services/StringService.js +18 -18
- package/lib/services/applications/ChromeService.d.ts +19 -19
- package/lib/services/applications/ChromeService.js +60 -60
- package/lib/services/applications/DockerService.d.ts +20 -20
- package/lib/services/applications/DockerService.js +88 -88
- package/lib/services/applications/FileSystemService.d.ts +18 -17
- package/lib/services/applications/FileSystemService.d.ts.map +1 -1
- package/lib/services/applications/FileSystemService.js +97 -87
- package/lib/services/applications/ITermService.d.ts +8 -0
- package/lib/services/applications/ITermService.d.ts.map +1 -0
- package/lib/services/applications/ITermService.js +45 -0
- package/lib/services/applications/OsaScriptService.d.ts +4 -0
- package/lib/services/applications/OsaScriptService.d.ts.map +1 -0
- package/lib/services/applications/OsaScriptService.js +31 -0
- package/lib/utils/CurrentEnv.d.ts +62 -61
- package/lib/utils/CurrentEnv.d.ts.map +1 -1
- package/lib/utils/CurrentEnv.js +137 -133
- package/lib/utils/Logger.d.ts +67 -67
- package/lib/utils/Logger.js +112 -112
- package/lib/utils/OsaScriptBuilder.d.ts +45 -0
- package/lib/utils/OsaScriptBuilder.d.ts.map +1 -0
- package/lib/utils/OsaScriptBuilder.js +53 -0
- package/package.json +1 -1
- package/lib/helperFunctions/applications/applications.d.ts +0 -21
- package/lib/helperFunctions/applications/applications.d.ts.map +0 -1
- package/lib/helperFunctions/applications/applications.js +0 -26
- package/lib/helperFunctions/applications/chromeApplication.d.ts +0 -8
- package/lib/helperFunctions/applications/chromeApplication.d.ts.map +0 -1
- package/lib/helperFunctions/applications/chromeApplication.js +0 -63
- package/lib/helperFunctions/applications/fileSystemApplication.d.ts +0 -8
- package/lib/helperFunctions/applications/fileSystemApplication.d.ts.map +0 -1
- package/lib/helperFunctions/applications/fileSystemApplication.js +0 -51
- package/lib/helperFunctions/cmd.d.ts +0 -54
- package/lib/helperFunctions/cmd.d.ts.map +0 -1
- package/lib/helperFunctions/cmd.js +0 -177
- package/lib/helperFunctions/fileFunctions.d.ts +0 -10
- package/lib/helperFunctions/fileFunctions.d.ts.map +0 -1
- package/lib/helperFunctions/fileFunctions.js +0 -43
- package/lib/helperFunctions/input.d.ts +0 -8
- package/lib/helperFunctions/input.d.ts.map +0 -1
- package/lib/helperFunctions/input.js +0 -48
- package/lib/utils/Log.d.ts +0 -69
- package/lib/utils/Log.d.ts.map +0 -1
- package/lib/utils/Log.js +0 -112
package/lib/utils/Log.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
declare class Log {
|
|
2
|
-
static verboseLoggingEnabled: boolean;
|
|
3
|
-
/**
|
|
4
|
-
* Private variable that sets if any logging on this instance of the Log
|
|
5
|
-
* should only log if the `verboseLoggingEnabled` is set to true.
|
|
6
|
-
*/
|
|
7
|
-
private logOnlyIfVerbose;
|
|
8
|
-
constructor(logOnlyIfVerbose?: boolean);
|
|
9
|
-
/**
|
|
10
|
-
* Sets the logging of the next chained function to only be activated
|
|
11
|
-
* if verbose logging is turned on.
|
|
12
|
-
*/
|
|
13
|
-
static get verbose(): Log;
|
|
14
|
-
/**
|
|
15
|
-
* Logs info to the console. Prepends `ℹ️` to each message.
|
|
16
|
-
*/
|
|
17
|
-
info(msg: string, skipNewline?: boolean): void;
|
|
18
|
-
/**
|
|
19
|
-
* Static version of {@link Log.prototype.info}.
|
|
20
|
-
*
|
|
21
|
-
* @see Log.prototype.info
|
|
22
|
-
*/
|
|
23
|
-
static info(msg: string, skipNewline?: boolean): void;
|
|
24
|
-
/**
|
|
25
|
-
* Logs a success message to the console. Prepends `✅` to each message.
|
|
26
|
-
*
|
|
27
|
-
* @param msg
|
|
28
|
-
*/
|
|
29
|
-
success(msg: string): void;
|
|
30
|
-
/**
|
|
31
|
-
* Static version of {@link Log.prototype.success}.
|
|
32
|
-
*
|
|
33
|
-
* @see Log.prototype.success
|
|
34
|
-
*/
|
|
35
|
-
static success(msg: string): void;
|
|
36
|
-
/**
|
|
37
|
-
* Logs a failure message to the console. Prepends `🔴` to each message.
|
|
38
|
-
*
|
|
39
|
-
* See {@link error} for logging errors.
|
|
40
|
-
*
|
|
41
|
-
* This doesn't use a `console.error` entry. Just a `console.log` entry.
|
|
42
|
-
* @param msg
|
|
43
|
-
*/
|
|
44
|
-
failure(msg: string): void;
|
|
45
|
-
/**
|
|
46
|
-
* Static version of {@link Log.prototype.failure}.
|
|
47
|
-
*
|
|
48
|
-
* @see Log.prototype.failure
|
|
49
|
-
*/
|
|
50
|
-
static failure(msg: string): void;
|
|
51
|
-
/**
|
|
52
|
-
* Logs an error message to the console. Only use this for errors that will
|
|
53
|
-
* likely stop execution. Prepends `💀` to each message and uses `console.error`.
|
|
54
|
-
*
|
|
55
|
-
* See {@link failure} for logging simple failures.
|
|
56
|
-
*
|
|
57
|
-
* @param msg
|
|
58
|
-
*/
|
|
59
|
-
error(msg: string): void;
|
|
60
|
-
/**
|
|
61
|
-
* Static version of {@link Log.prototype.error}.
|
|
62
|
-
*
|
|
63
|
-
* @see Log.prototype.error
|
|
64
|
-
*/
|
|
65
|
-
static error(msg: string): void;
|
|
66
|
-
private shouldLog;
|
|
67
|
-
}
|
|
68
|
-
export default Log;
|
|
69
|
-
//# sourceMappingURL=Log.d.ts.map
|
package/lib/utils/Log.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Log.d.ts","sourceRoot":"","sources":["../../src/utils/Log.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACP,OAAc,qBAAqB,UAAS;IAE5C;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAS;gBAErB,gBAAgB,CAAC,EAAE,OAAO;IAMtC;;;OAGG;IACH,MAAM,KAAK,OAAO,IAAI,GAAG,CAExB;IAED;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI;IAW9C;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI;IAIrD;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM1B;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;;;;OAOG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM1B;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMxB;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI/B,OAAO,CAAC,SAAS;CASlB;AAED,eAAe,GAAG,CAAC"}
|
package/lib/utils/Log.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class Log {
|
|
4
|
-
static verboseLoggingEnabled = false;
|
|
5
|
-
/**
|
|
6
|
-
* Private variable that sets if any logging on this instance of the Log
|
|
7
|
-
* should only log if the `verboseLoggingEnabled` is set to true.
|
|
8
|
-
*/
|
|
9
|
-
logOnlyIfVerbose = false;
|
|
10
|
-
constructor(logOnlyIfVerbose) {
|
|
11
|
-
if (logOnlyIfVerbose) {
|
|
12
|
-
this.logOnlyIfVerbose = logOnlyIfVerbose;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Sets the logging of the next chained function to only be activated
|
|
17
|
-
* if verbose logging is turned on.
|
|
18
|
-
*/
|
|
19
|
-
static get verbose() {
|
|
20
|
-
return new Log(true);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Logs info to the console. Prepends `ℹ️` to each message.
|
|
24
|
-
*/
|
|
25
|
-
info(msg, skipNewline) {
|
|
26
|
-
if (this.shouldLog()) {
|
|
27
|
-
const printMessage = `ℹ️ ${msg}`;
|
|
28
|
-
if (skipNewline) {
|
|
29
|
-
process.stdout.write(printMessage);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
console.log(printMessage);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Static version of {@link Log.prototype.info}.
|
|
38
|
-
*
|
|
39
|
-
* @see Log.prototype.info
|
|
40
|
-
*/
|
|
41
|
-
static info(msg, skipNewline) {
|
|
42
|
-
new Log().info(msg, skipNewline);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Logs a success message to the console. Prepends `✅` to each message.
|
|
46
|
-
*
|
|
47
|
-
* @param msg
|
|
48
|
-
*/
|
|
49
|
-
success(msg) {
|
|
50
|
-
if (this.shouldLog()) {
|
|
51
|
-
console.log(`✅ ${msg}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Static version of {@link Log.prototype.success}.
|
|
56
|
-
*
|
|
57
|
-
* @see Log.prototype.success
|
|
58
|
-
*/
|
|
59
|
-
static success(msg) {
|
|
60
|
-
new Log().success(msg);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Logs a failure message to the console. Prepends `🔴` to each message.
|
|
64
|
-
*
|
|
65
|
-
* See {@link error} for logging errors.
|
|
66
|
-
*
|
|
67
|
-
* This doesn't use a `console.error` entry. Just a `console.log` entry.
|
|
68
|
-
* @param msg
|
|
69
|
-
*/
|
|
70
|
-
failure(msg) {
|
|
71
|
-
if (this.shouldLog()) {
|
|
72
|
-
console.log(`🔴 ${msg}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Static version of {@link Log.prototype.failure}.
|
|
77
|
-
*
|
|
78
|
-
* @see Log.prototype.failure
|
|
79
|
-
*/
|
|
80
|
-
static failure(msg) {
|
|
81
|
-
new Log().failure(msg);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Logs an error message to the console. Only use this for errors that will
|
|
85
|
-
* likely stop execution. Prepends `💀` to each message and uses `console.error`.
|
|
86
|
-
*
|
|
87
|
-
* See {@link failure} for logging simple failures.
|
|
88
|
-
*
|
|
89
|
-
* @param msg
|
|
90
|
-
*/
|
|
91
|
-
error(msg) {
|
|
92
|
-
if (this.shouldLog()) {
|
|
93
|
-
console.error(`💀 ${msg}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Static version of {@link Log.prototype.error}.
|
|
98
|
-
*
|
|
99
|
-
* @see Log.prototype.error
|
|
100
|
-
*/
|
|
101
|
-
static error(msg) {
|
|
102
|
-
new Log().error(msg);
|
|
103
|
-
}
|
|
104
|
-
shouldLog() {
|
|
105
|
-
if (!this.logOnlyIfVerbose ||
|
|
106
|
-
(this.logOnlyIfVerbose && Log.verboseLoggingEnabled)) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.default = Log;
|