@grnsft/if 1.0.1 → 1.0.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.
- package/build/common/util/helpers.d.ts +3 -2
- package/build/common/util/helpers.js +6 -18
- package/build/if-check/index.js +1 -11
- package/build/if-check/util/npm.d.ts +1 -1
- package/build/if-check/util/npm.js +31 -74
- package/build/if-run/builtins/divide/index.js +2 -2
- package/build/if-run/builtins/sci/index.js +2 -2
- package/build/if-run/config/strings.js +3 -3
- package/build/if-run/lib/environment.js +10 -14
- package/build/if-run/util/os-checker.js +14 -10
- package/jest.config.js +6 -2
- package/package.json +10 -10
- package/.env +0 -5
- package/coverage/clover.xml +0 -2062
- package/coverage/coverage-final.json +0 -58
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/builtins/coefficient/index.html +0 -116
- package/coverage/lcov-report/builtins/coefficient/index.ts.html +0 -298
- package/coverage/lcov-report/builtins/csv-lookup/index.html +0 -116
- package/coverage/lcov-report/builtins/csv-lookup/index.ts.html +0 -826
- package/coverage/lcov-report/builtins/divide/index.html +0 -116
- package/coverage/lcov-report/builtins/divide/index.ts.html +0 -358
- package/coverage/lcov-report/builtins/exponent/index.html +0 -116
- package/coverage/lcov-report/builtins/exponent/index.ts.html +0 -361
- package/coverage/lcov-report/builtins/export-csv-raw.ts.html +0 -553
- package/coverage/lcov-report/builtins/export-csv.ts.html +0 -436
- package/coverage/lcov-report/builtins/export-log.ts.html +0 -148
- package/coverage/lcov-report/builtins/export-yaml.ts.html +0 -193
- package/coverage/lcov-report/builtins/group-by.ts.html +0 -370
- package/coverage/lcov-report/builtins/index.html +0 -206
- package/coverage/lcov-report/builtins/index.ts.html +0 -130
- package/coverage/lcov-report/builtins/interpolation/index.html +0 -116
- package/coverage/lcov-report/builtins/interpolation/index.ts.html +0 -676
- package/coverage/lcov-report/builtins/interpolation/types.ts.html +0 -100
- package/coverage/lcov-report/builtins/mock-observations/helpers/common-generator.ts.html +0 -184
- package/coverage/lcov-report/builtins/mock-observations/helpers/index.html +0 -131
- package/coverage/lcov-report/builtins/mock-observations/helpers/rand-int-generator.ts.html +0 -289
- package/coverage/lcov-report/builtins/mock-observations/index.html +0 -116
- package/coverage/lcov-report/builtins/mock-observations/index.ts.html +0 -619
- package/coverage/lcov-report/builtins/multiply/index.html +0 -116
- package/coverage/lcov-report/builtins/multiply/index.ts.html +0 -343
- package/coverage/lcov-report/builtins/regex/index.html +0 -116
- package/coverage/lcov-report/builtins/regex/index.ts.html +0 -373
- package/coverage/lcov-report/builtins/sci/config.ts.html +0 -205
- package/coverage/lcov-report/builtins/sci/index.html +0 -116
- package/coverage/lcov-report/builtins/sci/index.ts.html +0 -325
- package/coverage/lcov-report/builtins/sci-embodied/index.html +0 -116
- package/coverage/lcov-report/builtins/sci-embodied/index.ts.html +0 -478
- package/coverage/lcov-report/builtins/shell/index.html +0 -116
- package/coverage/lcov-report/builtins/shell/index.ts.html +0 -280
- package/coverage/lcov-report/builtins/subtract/index.html +0 -116
- package/coverage/lcov-report/builtins/subtract/index.ts.html +0 -379
- package/coverage/lcov-report/builtins/sum/index.html +0 -116
- package/coverage/lcov-report/builtins/sum/index.ts.html +0 -334
- package/coverage/lcov-report/builtins/time-sync.ts.html +0 -1462
- package/coverage/lcov-report/common/config/index.html +0 -131
- package/coverage/lcov-report/common/config/index.ts.html +0 -88
- package/coverage/lcov-report/common/config/strings.ts.html +0 -121
- package/coverage/lcov-report/common/lib/index.html +0 -116
- package/coverage/lcov-report/common/lib/load.ts.html +0 -139
- package/coverage/lcov-report/common/util/debug-logger.ts.html +0 -514
- package/coverage/lcov-report/common/util/fs.ts.html +0 -289
- package/coverage/lcov-report/common/util/helpers.ts.html +0 -355
- package/coverage/lcov-report/common/util/index.html +0 -191
- package/coverage/lcov-report/common/util/logger.ts.html +0 -151
- package/coverage/lcov-report/common/util/validations.ts.html +0 -628
- package/coverage/lcov-report/common/util/yaml.ts.html +0 -226
- package/coverage/lcov-report/config/config.ts.html +0 -463
- package/coverage/lcov-report/config/index.html +0 -161
- package/coverage/lcov-report/config/index.ts.html +0 -94
- package/coverage/lcov-report/config/params.ts.html +0 -697
- package/coverage/lcov-report/config/strings.ts.html +0 -490
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/if-check/config/config.ts.html +0 -184
- package/coverage/lcov-report/if-check/config/index.html +0 -146
- package/coverage/lcov-report/if-check/config/index.ts.html +0 -91
- package/coverage/lcov-report/if-check/config/strings.ts.html +0 -142
- package/coverage/lcov-report/if-check/util/args.ts.html +0 -310
- package/coverage/lcov-report/if-check/util/helpers.ts.html +0 -136
- package/coverage/lcov-report/if-check/util/index.html +0 -146
- package/coverage/lcov-report/if-check/util/npm.ts.html +0 -376
- package/coverage/lcov-report/if-csv/util/args.ts.html +0 -256
- package/coverage/lcov-report/if-csv/util/helpers.ts.html +0 -346
- package/coverage/lcov-report/if-csv/util/index.html +0 -131
- package/coverage/lcov-report/if-diff/config/config.ts.html +0 -184
- package/coverage/lcov-report/if-diff/config/index.html +0 -146
- package/coverage/lcov-report/if-diff/config/index.ts.html +0 -91
- package/coverage/lcov-report/if-diff/config/strings.ts.html +0 -100
- package/coverage/lcov-report/if-diff/lib/compare.ts.html +0 -286
- package/coverage/lcov-report/if-diff/lib/index.html +0 -131
- package/coverage/lcov-report/if-diff/lib/load.ts.html +0 -199
- package/coverage/lcov-report/if-diff/util/args.ts.html +0 -274
- package/coverage/lcov-report/if-diff/util/helpers.ts.html +0 -337
- package/coverage/lcov-report/if-diff/util/index.html +0 -131
- package/coverage/lcov-report/if-env/config/config.ts.html +0 -211
- package/coverage/lcov-report/if-env/config/index.html +0 -146
- package/coverage/lcov-report/if-env/config/index.ts.html +0 -91
- package/coverage/lcov-report/if-env/config/strings.ts.html +0 -109
- package/coverage/lcov-report/if-env/util/args.ts.html +0 -256
- package/coverage/lcov-report/if-env/util/index.html +0 -131
- package/coverage/lcov-report/if-env/util/npm.ts.html +0 -526
- package/coverage/lcov-report/if-merge/util/args.ts.html +0 -301
- package/coverage/lcov-report/if-merge/util/helpers.ts.html +0 -313
- package/coverage/lcov-report/if-merge/util/index.html +0 -131
- package/coverage/lcov-report/if-run/builtins/coefficient/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/coefficient/index.ts.html +0 -286
- package/coverage/lcov-report/if-run/builtins/copy-param/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/copy-param/index.ts.html +0 -301
- package/coverage/lcov-report/if-run/builtins/csv-import/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/csv-import/index.ts.html +0 -364
- package/coverage/lcov-report/if-run/builtins/csv-lookup/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/csv-lookup/index.ts.html +0 -478
- package/coverage/lcov-report/if-run/builtins/divide/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/divide/index.ts.html +0 -346
- package/coverage/lcov-report/if-run/builtins/exponent/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/exponent/index.ts.html +0 -319
- package/coverage/lcov-report/if-run/builtins/export-csv-raw.ts.html +0 -553
- package/coverage/lcov-report/if-run/builtins/export-csv.ts.html +0 -436
- package/coverage/lcov-report/if-run/builtins/export-log.ts.html +0 -148
- package/coverage/lcov-report/if-run/builtins/export-yaml.ts.html +0 -193
- package/coverage/lcov-report/if-run/builtins/group-by.ts.html +0 -370
- package/coverage/lcov-report/if-run/builtins/index.html +0 -146
- package/coverage/lcov-report/if-run/builtins/index.ts.html +0 -136
- package/coverage/lcov-report/if-run/builtins/interpolation/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/interpolation/index.ts.html +0 -643
- package/coverage/lcov-report/if-run/builtins/mock-observations/helpers/common-generator.ts.html +0 -184
- package/coverage/lcov-report/if-run/builtins/mock-observations/helpers/index.html +0 -131
- package/coverage/lcov-report/if-run/builtins/mock-observations/helpers/rand-int-generator.ts.html +0 -289
- package/coverage/lcov-report/if-run/builtins/mock-observations/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/mock-observations/index.ts.html +0 -607
- package/coverage/lcov-report/if-run/builtins/multiply/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/multiply/index.ts.html +0 -289
- package/coverage/lcov-report/if-run/builtins/regex/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/regex/index.ts.html +0 -298
- package/coverage/lcov-report/if-run/builtins/sci/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/sci/index.ts.html +0 -418
- package/coverage/lcov-report/if-run/builtins/sci-embodied/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/sci-embodied/index.ts.html +0 -664
- package/coverage/lcov-report/if-run/builtins/shell/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/shell/index.ts.html +0 -256
- package/coverage/lcov-report/if-run/builtins/subtract/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/subtract/index.ts.html +0 -298
- package/coverage/lcov-report/if-run/builtins/sum/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/sum/index.ts.html +0 -238
- package/coverage/lcov-report/if-run/builtins/time-converter/config.ts.html +0 -205
- package/coverage/lcov-report/if-run/builtins/time-converter/index.html +0 -131
- package/coverage/lcov-report/if-run/builtins/time-converter/index.ts.html +0 -328
- package/coverage/lcov-report/if-run/builtins/time-sync/index.html +0 -116
- package/coverage/lcov-report/if-run/builtins/time-sync/index.ts.html +0 -1804
- package/coverage/lcov-report/if-run/builtins/time-sync.ts.html +0 -1462
- package/coverage/lcov-report/if-run/builtins/util/csv-helpers.ts.html +0 -376
- package/coverage/lcov-report/if-run/builtins/util/index.html +0 -116
- package/coverage/lcov-report/if-run/config/config.ts.html +0 -271
- package/coverage/lcov-report/if-run/config/index.html +0 -161
- package/coverage/lcov-report/if-run/config/index.ts.html +0 -94
- package/coverage/lcov-report/if-run/config/params.ts.html +0 -679
- package/coverage/lcov-report/if-run/config/strings.ts.html +0 -460
- package/coverage/lcov-report/if-run/lib/aggregate.ts.html +0 -577
- package/coverage/lcov-report/if-run/lib/compute.ts.html +0 -733
- package/coverage/lcov-report/if-run/lib/environment.ts.html +0 -373
- package/coverage/lcov-report/if-run/lib/exhaust.ts.html +0 -193
- package/coverage/lcov-report/if-run/lib/explain.ts.html +0 -484
- package/coverage/lcov-report/if-run/lib/index.html +0 -206
- package/coverage/lcov-report/if-run/lib/initialize.ts.html +0 -490
- package/coverage/lcov-report/if-run/lib/parameterize.ts.html +0 -322
- package/coverage/lcov-report/if-run/lib/regroup.ts.html +0 -349
- package/coverage/lcov-report/if-run/lib/time-sync.ts.html +0 -1510
- package/coverage/lcov-report/if-run/types/aggregation.ts.html +0 -94
- package/coverage/lcov-report/if-run/types/index.html +0 -146
- package/coverage/lcov-report/if-run/types/interface.ts.html +0 -112
- package/coverage/lcov-report/if-run/types/parameters.ts.html +0 -106
- package/coverage/lcov-report/if-run/util/aggregation-helper.ts.html +0 -277
- package/coverage/lcov-report/if-run/util/args.ts.html +0 -325
- package/coverage/lcov-report/if-run/util/helpers.ts.html +0 -208
- package/coverage/lcov-report/if-run/util/index.html +0 -191
- package/coverage/lcov-report/if-run/util/json.ts.html +0 -115
- package/coverage/lcov-report/if-run/util/log-memoize.ts.html +0 -145
- package/coverage/lcov-report/if-run/util/os-checker.ts.html +0 -421
- package/coverage/lcov-report/if-run/util/plugin-storage.ts.html +0 -202
- package/coverage/lcov-report/index.html +0 -551
- package/coverage/lcov-report/lib/aggregate.ts.html +0 -358
- package/coverage/lcov-report/lib/compare.ts.html +0 -286
- package/coverage/lcov-report/lib/compute.ts.html +0 -436
- package/coverage/lcov-report/lib/environment.ts.html +0 -376
- package/coverage/lcov-report/lib/exhaust.ts.html +0 -289
- package/coverage/lcov-report/lib/index.html +0 -221
- package/coverage/lcov-report/lib/initialize.ts.html +0 -430
- package/coverage/lcov-report/lib/load.ts.html +0 -268
- package/coverage/lcov-report/lib/parameterize.ts.html +0 -316
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/types/aggregation.ts.html +0 -94
- package/coverage/lcov-report/types/index.html +0 -146
- package/coverage/lcov-report/types/interface.ts.html +0 -112
- package/coverage/lcov-report/types/parameters.ts.html +0 -106
- package/coverage/lcov-report/util/aggregation-helper.ts.html +0 -289
- package/coverage/lcov-report/util/args.ts.html +0 -649
- package/coverage/lcov-report/util/debug-logger.ts.html +0 -481
- package/coverage/lcov-report/util/errors.ts.html +0 -232
- package/coverage/lcov-report/util/fs.ts.html +0 -124
- package/coverage/lcov-report/util/helpers.ts.html +0 -895
- package/coverage/lcov-report/util/index.html +0 -296
- package/coverage/lcov-report/util/json.ts.html +0 -115
- package/coverage/lcov-report/util/log-memoize.ts.html +0 -145
- package/coverage/lcov-report/util/logger.ts.html +0 -151
- package/coverage/lcov-report/util/npm.ts.html +0 -499
- package/coverage/lcov-report/util/os-checker.ts.html +0 -421
- package/coverage/lcov-report/util/plugin-storage.ts.html +0 -202
- package/coverage/lcov-report/util/validations.ts.html +0 -544
- package/coverage/lcov-report/util/yaml.ts.html +0 -193
- package/coverage/lcov.info +0 -3548
|
@@ -16,9 +16,9 @@ const helpers_1 = require("../../common/util/helpers");
|
|
|
16
16
|
* Parses os and os-version from the response.
|
|
17
17
|
*/
|
|
18
18
|
const getLinuxInfo = async () => {
|
|
19
|
-
const { stdout } = await (0, helpers_1.
|
|
19
|
+
const { stdout } = await (0, helpers_1.execFilePromise)('lsb_release', ['-id']);
|
|
20
20
|
const parseLinuxVersion = (lsbReleaseResponse) => {
|
|
21
|
-
const regex =
|
|
21
|
+
const regex = /^Distributor ID:\t(.+)\nDescription:\t([^ ]+) +([^ ]+) +(.+)$/m;
|
|
22
22
|
const match = lsbReleaseResponse.match(regex);
|
|
23
23
|
return {
|
|
24
24
|
os: match ? match[1] : (0, os_1.platform)(),
|
|
@@ -28,23 +28,27 @@ const getLinuxInfo = async () => {
|
|
|
28
28
|
return parseLinuxVersion(stdout);
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* Executes in CMD `
|
|
31
|
+
* Executes in CMD `powershell -Command "Get-WmiObject Win32_OperatingSystem | Format-List -Property Caption, Version, BuildNumber"` command.
|
|
32
32
|
*
|
|
33
33
|
* ```
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* Caption : Microsoft Windows 11 Enterprise\r
|
|
35
|
+
* Version : 10.0.22631\r
|
|
36
|
+
* BuildNumber : 22631\r
|
|
36
37
|
* ```
|
|
37
38
|
*
|
|
38
39
|
* Parses os and os-version from the response.
|
|
39
40
|
*/
|
|
40
41
|
const getWindowsInfo = async () => {
|
|
41
|
-
const { stdout } = await (0, helpers_1.
|
|
42
|
+
const { stdout } = await (0, helpers_1.execFilePromise)('powershell', [
|
|
43
|
+
'-Command',
|
|
44
|
+
'Get-WmiObject Win32_OperatingSystem | Format-List -Property Caption, Version, BuildNumber',
|
|
45
|
+
]);
|
|
42
46
|
const parseWindowsInfo = (systemInfoResponse) => {
|
|
43
|
-
const regex =
|
|
47
|
+
const regex = /^Caption\s*:\s*(.*)\r?\nVersion\s*:\s*(.*)\r?\nBuildNumber\s*:\s*(.*)$/m;
|
|
44
48
|
const match = systemInfoResponse.match(regex);
|
|
45
49
|
return {
|
|
46
50
|
os: match ? match[1] : (0, os_1.platform)(),
|
|
47
|
-
'os-version': match ? `${match[2]} ${match[3]}` : (0, os_1.release)(),
|
|
51
|
+
'os-version': match ? `${match[2]} N/A Build ${match[3]}` : (0, os_1.release)(),
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
54
|
return parseWindowsInfo(stdout);
|
|
@@ -61,7 +65,7 @@ const getWindowsInfo = async () => {
|
|
|
61
65
|
* Parses os and os version from the response.
|
|
62
66
|
*/
|
|
63
67
|
const getMacVersion = async () => {
|
|
64
|
-
const { stdout } = await (0, helpers_1.
|
|
68
|
+
const { stdout } = await (0, helpers_1.execFilePromise)('sw_vers');
|
|
65
69
|
const parseMacInfo = (swVersResponse) => {
|
|
66
70
|
const productNameRegex = /ProductName:\s*(.+)/;
|
|
67
71
|
const productVersionRegex = /ProductVersion:\s*(.+)/;
|
|
@@ -94,4 +98,4 @@ const osInfo = async () => {
|
|
|
94
98
|
}
|
|
95
99
|
};
|
|
96
100
|
exports.osInfo = osInfo;
|
|
97
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
101
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3MtY2hlY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9pZi1ydW4vdXRpbC9vcy1jaGVja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJCQUFxQztBQUVyQyx1REFBMEQ7QUFFMUQ7Ozs7Ozs7Ozs7O0dBV0c7QUFDSCxNQUFNLFlBQVksR0FBRyxLQUFLLElBQUksRUFBRTtJQUM5QixNQUFNLEVBQUMsTUFBTSxFQUFDLEdBQUcsTUFBTSxJQUFBLHlCQUFlLEVBQUMsYUFBYSxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUUvRCxNQUFNLGlCQUFpQixHQUFHLENBQUMsa0JBQTBCLEVBQUUsRUFBRTtRQUN2RCxNQUFNLEtBQUssR0FDVCxnRUFBZ0UsQ0FBQztRQUNuRSxNQUFNLEtBQUssR0FBRyxrQkFBa0IsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFOUMsT0FBTztZQUNMLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBQSxhQUFRLEdBQUU7WUFDakMsWUFBWSxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLEl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@@ -2,6 +2,7 @@
|
|
|
2
2
|
module.exports = {
|
|
3
3
|
preset: 'ts-jest',
|
|
4
4
|
testEnvironment: 'node',
|
|
5
|
+
testMatch: ['<rootDir>/src/__tests__/**/*.[jt]s'],
|
|
5
6
|
transform: {
|
|
6
7
|
'^.+\\.ts?$': [
|
|
7
8
|
'ts-jest',
|
|
@@ -10,6 +11,9 @@ module.exports = {
|
|
|
10
11
|
},
|
|
11
12
|
],
|
|
12
13
|
},
|
|
13
|
-
modulePathIgnorePatterns: ['
|
|
14
|
-
coveragePathIgnorePatterns: [
|
|
14
|
+
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
|
15
|
+
coveragePathIgnorePatterns: [
|
|
16
|
+
'<rootDir>/src/.*/config/.*',
|
|
17
|
+
'<rootDir>/src/.*/types/.*',
|
|
18
|
+
],
|
|
15
19
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grnsft/if",
|
|
3
3
|
"description": "Impact Framework",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Green Software Foundation",
|
|
7
7
|
"email": "info@gsf.com"
|
|
@@ -18,16 +18,13 @@
|
|
|
18
18
|
"url": "https://github.com/Green-Software-Foundation/if/issues/new?assignees=&labels=feedback&projects=&template=feedback.md&title=Feedback+-+"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"@commitlint/config-conventional": "^18.6.0",
|
|
23
|
-
"@grnsft/if-core": "^0.0.29",
|
|
21
|
+
"@grnsft/if-core": "^0.0.30",
|
|
24
22
|
"axios": "^1.7.2",
|
|
25
23
|
"csv-parse": "^5.5.6",
|
|
26
24
|
"csv-stringify": "^6.4.6",
|
|
27
25
|
"js-yaml": "^4.1.0",
|
|
28
26
|
"luxon": "^3.4.4",
|
|
29
27
|
"ts-command-line-args": "^2.5.1",
|
|
30
|
-
"typescript": "^5.1.6",
|
|
31
28
|
"typescript-cubic-spline": "^1.0.1",
|
|
32
29
|
"winston": "^3.11.0",
|
|
33
30
|
"zod": "^3.22.4"
|
|
@@ -35,6 +32,8 @@
|
|
|
35
32
|
"devDependencies": {
|
|
36
33
|
"@babel/core": "^7.22.10",
|
|
37
34
|
"@babel/preset-typescript": "^7.22.5",
|
|
35
|
+
"@commitlint/cli": "^18.6.0",
|
|
36
|
+
"@commitlint/config-conventional": "^18.6.0",
|
|
38
37
|
"@jest/globals": "^29.6.1",
|
|
39
38
|
"@types/jest": "^29.5.7",
|
|
40
39
|
"@types/js-yaml": "^4.0.5",
|
|
@@ -49,7 +48,8 @@
|
|
|
49
48
|
"lint-staged": "^15.2.2",
|
|
50
49
|
"release-it": "^16.3.0",
|
|
51
50
|
"rimraf": "^5.0.5",
|
|
52
|
-
"ts-jest": "^29.1.1"
|
|
51
|
+
"ts-jest": "^29.1.1",
|
|
52
|
+
"typescript": "^5.1.6"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=18",
|
|
@@ -76,21 +76,21 @@
|
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "npm run clean && tsc --project tsconfig.build.json",
|
|
78
78
|
"clean": "rimraf build/",
|
|
79
|
-
"coverage": "jest --verbose --coverage
|
|
79
|
+
"coverage": "jest --verbose --coverage",
|
|
80
80
|
"fix": "gts fix",
|
|
81
81
|
"fix:package": "fixpack",
|
|
82
82
|
"if-check": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-check/index.ts",
|
|
83
83
|
"if-csv": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-csv/index.ts",
|
|
84
|
-
"if-diff": "npx ts-node src/if-diff/index.ts",
|
|
84
|
+
"if-diff": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-diff/index.ts",
|
|
85
85
|
"if-env": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-env/index.ts",
|
|
86
86
|
"if-merge": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-merge/index.ts",
|
|
87
|
-
"if-run": "npx ts-node src/if-run/index.ts",
|
|
87
|
+
"if-run": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/if-run/index.ts",
|
|
88
88
|
"lint": "gts lint",
|
|
89
89
|
"pre-commit": "lint-staged",
|
|
90
90
|
"prepare": "husky install",
|
|
91
91
|
"prepublishOnly": "npm run build",
|
|
92
92
|
"release": "release-it",
|
|
93
|
-
"test": "jest --verbose
|
|
93
|
+
"test": "jest --verbose"
|
|
94
94
|
},
|
|
95
95
|
"stability": "stable"
|
|
96
96
|
}
|